瀏覽代碼

代码提交

xiahan 1 年之前
父節點
當前提交
f4e44d984b

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

@@ -232,6 +232,6 @@ public class SaveConstans {
         /**
          * 点巡检任务提醒
          */
-        public static final String INSPECTION_TITLE = "%s的%s任务请及时完成”";
+        public static final String INSPECTION_CONTENT = "%s的%s任务请及时完成”";
     }
 }

+ 8 - 8
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/CheckTemplateServiceImpl.java

@@ -28,10 +28,10 @@ import org.springframework.stereotype.Service;
 import java.util.*;
 import java.util.stream.Collectors;
 
-import static com.rongwei.safecommon.utils.CXCommonUtils.DEFAULT_NOTIFY_STATUS;
-import static com.rongwei.safecommon.utils.SaveConstans.NotifyTitle.*;
+import static com.rongwei.safecommon.utils.CXCommonUtils.streamCodeGeneration;
+import static com.rongwei.safecommon.utils.SaveConstans.NotifyContent.INSPECTION_CONTENT;
+import static com.rongwei.safecommon.utils.SaveConstans.NotifyTitle.INSPECTION_TITLE;
 import static com.rongwei.safecommon.utils.SaveConstans.NotifyType.INSPECTION;
-import static com.rongwei.sfcommon.utils.CommonUtil.streamCodeGeneration;
 
 @Service("checkTemplateService")
 public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, CheckTemplateDo> implements CheckTemplateService {
@@ -316,8 +316,8 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
                         continue;
                     }
                     // 点检编号
-                    String pointcheckcode = streamCodeGeneration("asp_point_check_POINTCHECKCODE",
-                            "@{date:yyyyMMdd}@{serialNumber:#0000000}","date:yyyy", checkTemplate.getTenantid());
+                    String pointcheckcode =  streamCodeGeneration("asp_point_check_POINTCHECKCODE","@{date:yyyyMMdd}@{serialNumber:#0000000}","date:yyyy", checkTemplate.getTenantid());;
+
                     // 点检生成
                     PointCheckDo pointCheckDo = new PointCheckDo();
                     pointCheckDo.setId(SecurityUtil.getUUID());
@@ -431,12 +431,12 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
 
         if(!notifyType.isEmpty()){
             List<SysDictDo> dictsByType = commonDictService.getDictsByType("template-type");
-            notifyType.forEach((k,v)->{
+            notifyType.forEach((k,v)-> {
                 String pointcheckname = k.getPointcheckname();
                 String templatetype = k.getTemplatetype();
                 SysDictDo sysDictDo = dictsByType.stream().filter(info -> info.getValue().equals(templatetype)).findFirst().orElse(null);
-                CXCommonUtils.sendNotify(INSPECTION_TITLE, String.format(INSPECTION_TITLE,pointcheckname,sysDictDo==null?"":sysDictDo.getName()),
-                        null,v,k.getId(),INSPECTION,false);
+                CXCommonUtils.sendNotify(INSPECTION_TITLE, String.format(INSPECTION_CONTENT, pointcheckname, sysDictDo == null ? "" : sysDictDo.getName()),
+                        null, v, k.getId(), INSPECTION + "-" + shift, false);
             });
         }
         // 批量保存点检任务