Просмотр исходного кода

20240929 添加查新对比记录

lwhhszx 11 месяцев назад
Родитель
Сommit
0988080098

+ 1 - 1
src/main/java/cn/cslg/pas/controller/CommonController.java

@@ -158,7 +158,7 @@ public class CommonController {
         qrtzTaskDTO.setQuartzVO(quartzVO);
         qrtzTaskDTO.setJobClass("cn.cslg.pas.service.quartzService.SysImportPatentJobService");
         qrtzTaskDTO.setCron("0 0 0 * * ? *");
-//        qrtzTaskDTO.setCron("0/10 * * * * ?");
+//     qrtzTaskDTO.setCron("0/10 * * * * ?");
         jobService.addJob(qrtzTaskDTO);
         return Response.success("");
     }

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

@@ -182,10 +182,15 @@ public class MailSendService {
         try {
             res = permissionService.getPersonnelByIdsFromPCS(personIds);
         } catch (Exception e) {
+            e.printStackTrace();
         }
         if (!res.equals("")) {
             JSONObject jsonObject = JSONObject.parseObject(res);
             List<Personnel> personnels = JSON.parseArray(jsonObject.getString("data"), Personnel.class);
+            LambdaQueryWrapper<SystemDict> queryWrapper = new LambdaQueryWrapper<>();
+            queryWrapper.in(SystemDict::getType, "CYCLE_IMPORT_BCC");
+            List<SystemDict> systemDictList = systemDictService.list(queryWrapper);
+
 
             for (Personnel personnel:personnels){
             Map<String, Object> map = new LinkedHashMap<>();
@@ -195,6 +200,14 @@ public class MailSendService {
             map.put("img", "/logo.png");
             map.put("email", personnel.getPersonnelEmail());
             map.put("value2", project.getName());
+
+                if (systemDictList.size() > 0&&personnel.getId().equals(createId)) {
+                    String[] bcs = new String[systemDictList.size()];
+                    for (int i = 0; i <= systemDictList.size()-1; i++) {
+                        bcs[i] = systemDictList.get(i).getValue();
+                    }
+                    map.put("bcc", bcs);
+                }
             String dateRange = "";
             if (importTask != null) {
                 if (importTask.getLastUpdateToDate() != null) {

+ 28 - 29
src/main/resources/application-dev.yml

@@ -31,38 +31,37 @@ spring:
         exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
   quartz:
     #相关属性配置
-    properties:
-      org:
-        quartz:
-          scheduler:
-            instanceName: DefaultQuartzScheduler
-            instanceId: AUTO
-          jobStore:
-            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
-            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
-            tablePrefix: QRTZ_
-            isClustered: false
-            clusterCheckinInterval: 10000
-            useProperties: false
-          threadPool:
-            class: org.quartz.simpl.SimpleThreadPool
-            threadCount: 10
-            threadPriority: 5
-            threadsInheritContextClassLoaderOfInitializingThread: true
-          dataSource:
-            default:
-              URL: jdbc:mysql://192.168.2.24:3306/pas_prod2?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8
-              user: root
-              password: rrzTwWAYX8Gxh5JH
-              driver: com.mysql.jdbc.Driver
+#    properties:
+#      org:
+#        quartz:
+#          scheduler:
+#            instanceName: DefaultQuartzScheduler
+#            instanceId: AUTO
+#          jobStore:
+#            class: org.springframework.scheduling.quartz.LocalDataSourceJobStore
+#            driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
+#            tablePrefix: QRTZ_
+#            isClustered: false
+#            clusterCheckinInterval: 10000
+#            useProperties: false
+#          threadPool:
+#            class: org.quartz.simpl.SimpleThreadPool
+#            threadCount: 10
+#            threadPriority: 5
+#            threadsInheritContextClassLoaderOfInitializingThread: true
+#          dataSource:
+#            default:
+#              URL: jdbc:mysql://192.168.2.24:3306/pas_prod2?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8
+#              user: root
+#              password: rrzTwWAYX8Gxh5JH
+#              driver: com.mysql.jdbc.Driver
 
     #数据库方式
-    job-store-type: jdbc
+    job-store-type: memory
     #初始化表结构
-    jdbc:
-      initialize-schema:  never
-authorUrl: http://localhost:8885
-PCSUrl: http://localhost:8885
+
+authorUrl: http://localhost:8880
+PCSUrl: http://localhost:8880
 #OPSUrl: http://192.168.2.24:5001
 OPSUrl: http://139.224.24.90:5001
 PASUrl: http://localhost:8879