Explorar o código

feature 代码提交

xiahan hai 1 ano
pai
achega
6e0a30b5ac

+ 1 - 1
bs-common/src/main/java/com/rongwei/safecommon/utils/SaveConstans.java

@@ -172,7 +172,7 @@ public class SaveConstans {
         /**
          * 考试试卷提醒内容
          */
-        public static final String TRAIN_NOTIFY_CONTENT = "考试:%s已发布,截止时间:%tF,请及时完成考试!";
+        public static final String TRAIN_NOTIFY_CONTENT = "%s已发布,截止时间:%tF,请及时完成考试!";
         /**
          * 我的培训课程提醒内容
          */

+ 5 - 7
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/service/impl/TrainingSendNotifyServiceImpl.java

@@ -147,15 +147,13 @@ public class TrainingSendNotifyServiceImpl implements TrainingSendNotifyService
         );
         Map<String, List<String>> paperMap = new HashMap<>();
         // 对试卷按照试卷名称分组
-        Map<String, List<EmpExamDo>> collect = examDoList.stream().collect(Collectors.groupingBy(EmpExamDo::getPapername, Collectors.toList()));
+        Map<String, List<EmpExamDo>> collect = examDoList.stream().collect(Collectors.groupingBy(info->info.getPaperid()+info.getPlanpaperid(), Collectors.toList()));
         collect.forEach((k,v)->{
-            paperMap.put(k, examDoList.stream().map(EmpExamDo::getEmpid).distinct().collect(Collectors.toList()));
-        });
-        // 培训课程取消提醒
-        paperMap.forEach((k, v) -> {
-            CXCommonUtils.sendNotify(CUT_OFF_PAPER_TITLE, String.format(CUT_OFF_PAPER_CONTENT, k), "",
-                    v, null, TRAINING);
+            EmpExamDo empExamDo = v.get(0);
+            CXCommonUtils.sendNotify(CUT_OFF_PAPER_TITLE, String.format(CUT_OFF_PAPER_CONTENT, empExamDo.getPapername(),empExamDo.getExamdeadtime()), "",
+                    v.stream().map(EmpExamDo::getEmpid).distinct().collect(Collectors.toList()), null, TRAINING);
         });
+
         return R.ok();
     }