|
@@ -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);
|
|
|
});
|
|
|
}
|
|
|
// 批量保存点检任务
|