Bläddra i källkod

Merge remote-tracking branch 'origin/master' into prod_test

lwhhszx 1 år sedan
förälder
incheckning
f01eb59d62

+ 4 - 0
src/main/java/cn/cslg/pas/common/vo/ImportTaskAMVO.java

@@ -1,8 +1,10 @@
 package cn.cslg.pas.common.vo;
 
 import cn.cslg.pas.common.dto.es.EsCustomFieldDTO;
+import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Data;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -96,4 +98,6 @@ public class ImportTaskAMVO {
     private List<EsCustomFieldDTO> fieldDTOS;
     private Integer pdfType;
     private String updateCycle;
+    private Date updateToDate;
+    private Date lastUpdateToDate;
 }

+ 7 - 3
src/main/java/cn/cslg/pas/controller/ProductCategoryController.java

@@ -85,10 +85,14 @@ public class ProductCategoryController {
 
     @Operation(summary = "删除产品类别")
     @PostMapping("/deleteProductCategory")
-    public String deleteProductCategory(@RequestBody List<Integer> ids) throws Exception {
+    public Response deleteProductCategory(@RequestBody List<Integer> ids) throws Exception {
         Business business = businessFactory.getClass("productCategoryService");
-        business.deleteMessage(ids);
-        return Response.success();
+        try {
+            business.deleteMessage(ids);
+        } catch (Exception e) {
+            return Response.error(e.getMessage());
+        }
+        return Response.success(1);
     }
 
 }

+ 13 - 1
src/main/java/cn/cslg/pas/service/MailSendService.java

@@ -187,7 +187,7 @@ public class MailSendService {
                     if (importTask.getUpdateToDate() != null) {
                         String toDateStr = DateUtils2.dateTimeToPatentStr(importTask.getUpdateToDate());
                         String fromDateStr = DateUtils2.dateTimeToPatentStr(importTask.getLastUpdateToDate());
-                        dateRange = toDateStr + "~" + fromDateStr;
+                        dateRange = fromDateStr + "~" + toDateStr;
                     }
 
                 } else if (importTask.getUpdateToDate() != null) {
@@ -199,6 +199,18 @@ public class MailSendService {
             }
             map.put("value3", dateRange);
             map.put("value4", importTask.getAllNum());
+
+            LambdaQueryWrapper<SystemDict> queryWrapper = new LambdaQueryWrapper<>();
+            queryWrapper.in(SystemDict::getType, "CYCLE_IMPORT_BCC");
+            List<SystemDict> systemDictList = systemDictService.list(queryWrapper);
+
+            if (systemDictList.size() > 0) {
+                String[] bcs = new String[systemDictList.size()];
+                for (int i = 0; i < systemDictList.size(); i++) {
+                    bcs[i] = systemDictList.get(i).getValue();
+                }
+                map.put("bcc", bcs);
+            }
             rabbitMQUtils.sendEmailMessage(map);
         }
     }

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

@@ -513,7 +513,6 @@ public class PatentExportService {
 
         }
 
-        this.sendWebSocketMessage(projectId, taskId, createId, total.intValue(), index, true);
 
         try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
 
@@ -527,6 +526,7 @@ public class PatentExportService {
             exportTask.setState(2);
             exportTask.setDoneNum(index);
             Integer reTaskId = importTaskService.updateExportTask(exportTask);
+            this.sendWebSocketMessage(projectId, taskId, createId, total.intValue(), index, true);
             if (reTaskId == null) {
                 throw new XiaoShiException("导出记录失败");
             }

+ 1 - 1
src/main/java/cn/cslg/pas/service/importPatent/WebVOTransformService.java

@@ -1006,7 +1006,7 @@ public class WebVOTransformService {
     public List<EsCustomFieldDTO> getEsCustomFieldDTOList(ImportTaskAMVO importTaskAMVO) {
         UploadParamsVO.Field field = new UploadParamsVO.Field();
         field.setKey("监控周期:4");
-        Date date = new Date();
+        Date date = importTaskAMVO.getUpdateToDate();
         String cycle = DateUtils2.getDateIndexStr(date, importTaskAMVO.getUpdateCycle());
 
         field.setFieldList(Arrays.asList(cycle));

+ 3 - 1
src/main/java/cn/cslg/pas/service/quartzService/SysImportPatentJobService.java

@@ -34,7 +34,7 @@ public class SysImportPatentJobService extends QuartzJobBean {
 
     @Override
     public void executeInternal(JobExecutionContext context) throws JobExecutionException {
-       // mailSendService.sendSysCycleStartEmail();
+        mailSendService.sendSysCycleStartEmail();
         CheckDateConditionVO checkDateConditionVO = DateUtils2.checkDateCycleCondition(null);
         Boolean ifMeetMonth = checkDateConditionVO.getIfMeetMonth();
         Boolean ifMeetQuarter = checkDateConditionVO.getIfMeetQuarter();
@@ -79,3 +79,5 @@ public class SysImportPatentJobService extends QuartzJobBean {
 
 
 }
+
+