lrj hace 7 meses
padre
commit
3467d5990c

+ 16 - 15
src/main/java/cn/cslg/pas/service/business/PatentExportService.java

@@ -320,7 +320,7 @@ public class PatentExportService {
     }
 
 
-    public Integer updateTaskStateToDoing(Integer taskId,Long total) {
+    public Integer updateTaskStateToDoing(Integer taskId, Long total) {
         ImportTask importTask = importTaskService.getById(taskId);
         if (importTask == null) {
             throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, "导入任务不存在");
@@ -392,7 +392,7 @@ public class PatentExportService {
 
         EsCustomFieldBatchVO esVO = exportTask.getEsVO();
         List<PatentExportVO> selectedFields = esVO.getSelected();
-        selectedFields=selectedFields.stream().filter(PatentExportVO::getSelected).collect(Collectors.toList());
+        selectedFields = selectedFields.stream().filter(PatentExportVO::getSelected).collect(Collectors.toList());
         Integer taskId = exportTask.getTaskId();
         Integer projectId = exportTask.getProjectId();
         String createId = exportTask.getCreateId();
@@ -433,16 +433,16 @@ public class PatentExportService {
         Long startNum = null;
         Long endNum = null;
         if (esVO.getStartNumber() != null) {
-            startNum =0l+esVO.getStartNumber();
+            startNum = 0l + esVO.getStartNumber();
         }
         if (esVO.getEndNumber() != null) {
-            endNum = 0l+esVO.getEndNumber();
+            endNum = 0l + esVO.getEndNumber();
         }
 
         if (startNum == null) {
             startNum = 1l;
         }
-        Long toNum = startNum+9l;
+        Long toNum = startNum + 9l;
         if (endNum != null && endNum < toNum) {
             toNum = endNum;
         }
@@ -470,7 +470,7 @@ public class PatentExportService {
             firstRecords.getTotal();
         }
 
-        this.updateTaskStateToDoing(taskId,total);
+        this.updateTaskStateToDoing(taskId, total);
         List<PatentColumnDTO> firstPatentList = (List<PatentColumnDTO>) firstRecords.getData();
         List<String> firstPatentNos = firstPatentList.stream().map(PatentColumnDTO::getPatentNo).collect(Collectors.toList());
 
@@ -532,7 +532,7 @@ public class PatentExportService {
         esQueryPatentFieldsDTO.setPatentNos(inNos);
         List<EsPatentFieldsVO> esPatentFieldsVOS = esCustomFieldService.getPatentFields(esQueryPatentFieldsDTO);
 //        List<Patent> patentList = esPatentService.getPatentsByNo(inNos, true, null, null);
-        List<PatentColumnDTO> patentList = esPatentService.getPatentsByNo1(inNos, true, null, null,projectId);
+        List<PatentColumnDTO> patentList = esPatentService.getPatentsByNo1(inNos, true, null, null, projectId);
         for (int i = 0; i < patentList.size(); i++) {
 
             PatentColumnDTO patent = patentList.get(i);
@@ -566,13 +566,11 @@ public class PatentExportService {
                 throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, "导出记录失败");
             }
 
-        }
-
-        catch (FileNotFoundException e) {
+        } catch (FileNotFoundException e) {
             e.printStackTrace();
             throw new FileNotFoundException();
         } catch (Exception e) {
-e.printStackTrace();
+            e.printStackTrace();
         }
     }
 
@@ -630,18 +628,21 @@ e.printStackTrace();
                         if (innerPatentFieldsVO != null) {
                             List<FieldValueVO> fieldValueVOS = innerPatentFieldsVO.getFieldValueVOS();
                             if (!fieldValueVOS.isEmpty()) {
-                                StringBuffer sb = new StringBuffer();
+                                List<String> sb = new ArrayList<>();
+
                                 for (FieldValueVO fieldValueVO : fieldValueVOS) {
                                     String valueStr = fieldValueVO.getValue();
-                                    sb.append(valueStr);
+                                    sb.add(valueStr);
                                 }
                                 HSSFCell cell = row.createCell(j);
                                 ExcelUtils.setExcelCellStyle(commonCellStyle);
                                 commonCellStyle.setVerticalAlignment(VerticalAlignment.TOP);
                                 commonCellStyle.setWrapText(true);
                                 cell.setCellStyle(commonCellStyle);
-                                cell.setCellValue(sb.toString());
-
+                                if (sb.size() > 0) {
+                                    String trueSb = StringUtils.join(sb, "\n");
+                                    cell.setCellValue(trueSb);
+                                }
 
                             }
                         }

+ 3 - 3
src/main/resources/application-dev.yml

@@ -60,12 +60,12 @@ spring:
     job-store-type: memory
     #初始化表结构
 
-authorUrl: http://192.168.2.24:8871
-PCSUrl: http://192.168.2.24:8871
+authorUrl: http://localhost:8871
+PCSUrl: http://localhost:8871
 #OPSUrl: http://192.168.2.24:5001
 OPSUrl: http://139.224.24.90:5001
 PASUrl: http://localhost:8879
-FMSUrl: http://127.0.0.1:8803
+FMSUrl: http://192.168.2.24:8803
 WDUrl: http://1.116.113.26:81
 PythonUrl: http://192.168.2.24:8001
 FileSource: 1

+ 14 - 1
src/main/resources/jsons/invalidReportProject.json

@@ -90,7 +90,7 @@
   "ifShow":"true",
   "defaultHidden": "false"
 },
-  {"name":"报告结果",
+  {"name":"无效结果",
     "type":"Array",
     "value":"cronNames",
     "field": "cronNames",
@@ -420,5 +420,18 @@
     "ifGroup": "false",
     "ifShow":"false",
     "ifAsCondition": "true"
+  },
+  {
+    "name": "无效决定号",
+    "type": "String",
+    "value": "issueNumber",
+    "field": "issueNumber",
+    "sqlField": "t.issue_number",
+    "sqlClass": "getComSql",
+    "orderClass": "getComOrder",
+    "ifSearch": "false",
+    "ifGroup": "false",
+    "defaultHidden": "true",
+    "ifShow": "true"
   }
 ]