浏览代码

20240904 导出任务修改

lwhhszx 1 年之前
父节点
当前提交
ffb4413506

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

@@ -128,7 +128,7 @@ public class MailSendService {
         map.put("title", "任务通知");
         map.put("template", "mail/eTask.html");
         map.put("value1", handlePerson);
-        map.put("img", "\\src\\main\\resources\\mail\\logo.png");
+        map.put("img", "/logo.png");
         map.put("email", email);
         map.put("value2", addPerson);
         map.put("value3", taskName);
@@ -151,7 +151,7 @@ public class MailSendService {
             map.put("title", "任务通知");
             map.put("template", "mail/eTaskDone.html");
             map.put("value1", personnel.getPersonnelName());
-            map.put("img", "\\src\\main\\resources\\mail\\logo.png");
+            map.put("img", "/logo.png");
             map.put("email", personnel.getPersonnelEmail());
             map.put("value2", taskTypeName);
             map.put("value3", taskName);
@@ -178,7 +178,7 @@ public class MailSendService {
             map.put("title", "监控通知");
             map.put("template", "mail/cycleTaskDone.html");
             map.put("value1", personnel.getPersonnelName());
-            map.put("img", "\\src\\main\\resources\\mail\\logo.png");
+            map.put("img", "/logo.png");
             map.put("email", personnel.getPersonnelEmail());
             map.put("value2", project.getName());
             String dateRange = "";
@@ -213,7 +213,7 @@ public class MailSendService {
         Map<String, Object> map = new LinkedHashMap<>();
         map.put("title", "监控通知");
         map.put("template", "mail/sysCycleStart.html");
-        map.put("img", "\\src\\main\\resources\\mail\\logo.png");
+        map.put("img", "/logo.png");
         if (systemDictList != null && systemDictList.size() > 0) {
             SystemDict systemDict = systemDictList.remove(0);
             map.put("email", systemDict.getValue());

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

@@ -493,6 +493,10 @@ public class ImportTaskService extends ServiceImpl<ImportTaskMapper, ImportTask>
             if (exportTaskDTO.getDefaultNum() != null) {
                 importTask.setDefaultNum(exportTaskDTO.getDefaultNum());
             }
+            if(exportTaskDTO.getDoneNum()!=null){
+                importTask.setDoneNum(exportTaskDTO.getDoneNum());
+
+            }
             importTask.setFinishTime(exportTaskDTO.getFinishTime());
             importTask.updateById();
         }
@@ -607,7 +611,7 @@ public class ImportTaskService extends ServiceImpl<ImportTaskMapper, ImportTask>
         importTask.setIfCreateBySys(true);
         if (importTask.getAllNum() !=null&&importTask.getAllNum() <= 0) {
             importTask.setState(2);
-            //mailSendService.sendCycleImportTaskDoneEmail(importTask);
+            mailSendService.sendCycleImportTaskDoneEmail(importTask);
             importTask.insert();
         } else {
             importTask.insert();

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

@@ -488,7 +488,7 @@ public class PatentExportService {
                 index++;
                 importTaskAMVO.setDoneNum(index);
 
-                this.sendWebSocketMessage(projectId, taskId, createId, total.intValue(), index, true);
+                this.sendWebSocketMessage(projectId, taskId, createId, total.intValue(), index, false);
 
             }
 
@@ -513,6 +513,7 @@ public class PatentExportService {
 
         }
 
+        this.sendWebSocketMessage(projectId, taskId, createId, total.intValue(), index, true);
 
         try (ByteArrayOutputStream out = new ByteArrayOutputStream()) {
 
@@ -524,12 +525,15 @@ public class PatentExportService {
             }
             exportTask.setFileGuid(fileGuid);
             exportTask.setState(2);
+            exportTask.setDoneNum(index);
             Integer reTaskId = importTaskService.updateExportTask(exportTask);
             if (reTaskId == null) {
                 throw new XiaoShiException("导出记录失败");
             }
 
-        } catch (FileNotFoundException e) {
+        }
+
+        catch (FileNotFoundException e) {
             e.printStackTrace();
             throw new FileNotFoundException();
         } catch (Exception e) {

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

@@ -33,9 +33,8 @@ public class SysImportPatentJobService extends QuartzJobBean {
 
     @Override
     public void executeInternal(JobExecutionContext context) throws JobExecutionException {
-//        mailSendService.sendSysCycleStartEmail();
-        LocalDate localDate = LocalDate.of(2024, 9, 1);
-        NowDateFirstMessVO messVO = DateUtils2.getNowDateFirstMessage(localDate);
+        mailSendService.sendSysCycleStartEmail();
+        NowDateFirstMessVO messVO = DateUtils2.getNowDateFirstMessage(null);
         Boolean isFirstDayOfWeek = messVO.getIsFirstDayOfWeek();
         Boolean isFirstDayOfMonth = messVO.getIsFirstDayOfMonth();
         Boolean isFirstDayOfQuarter = messVO.getIsFirstDayOfQuarter();