|
@@ -312,7 +312,7 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
|
|
|
}
|
|
|
List<PointCheckDo> pointChecks = new ArrayList<>();
|
|
|
List<PointCheckItemDo> pointCheckItems = new ArrayList<>();
|
|
|
- Map<PointCheckDo,List<String>> notifyType = new HashMap<>();
|
|
|
+ Map<PointCheckNewsVo,List<String>> notifyType = new HashMap<>();
|
|
|
// 每班几次就生成几个任务
|
|
|
for(List<CheckTemplateItemsDo> checkItems:items){
|
|
|
// 点检名称 班次+模板名称+当前日期
|
|
@@ -335,6 +335,7 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
|
|
|
|
|
|
// 点检生成
|
|
|
PointCheckDo pointCheckDo = new PointCheckDo();
|
|
|
+ PointCheckNewsVo pointCheckVo = new PointCheckNewsVo();
|
|
|
pointCheckDo.setId(SecurityUtil.getUUID());
|
|
|
pointCheckDo.setPointcheckname(poName);
|
|
|
pointCheckDo.setPointcheckcode(pointcheckcode);
|
|
@@ -351,6 +352,10 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
|
|
|
pointCheckDo.setTenantid(checkTemplate.getTenantid());
|
|
|
pointCheckDo.setSource("1");
|
|
|
pointCheckDo.setTemplatetype(templatetype);
|
|
|
+ BeanUtil.copyProperties(pointCheckDo,pointCheckVo);
|
|
|
+ //添加设备名称和设备编号
|
|
|
+ pointCheckVo.setCheckitemname(checkItemsdo.getCheckitemname());
|
|
|
+ pointCheckVo.setCheckitemcode(checkItemsdo.getCheckitemcode());
|
|
|
//设备负责人
|
|
|
List<CheckItemsDutyuserDo> checkItemsDutyusers =checkItemsDutyuserService.list(new LambdaQueryWrapper<CheckItemsDutyuserDo>()
|
|
|
.eq(BaseDo::getDeleted,"0")
|
|
@@ -359,7 +364,7 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
|
|
|
|
|
|
// 组织需要发送德消息
|
|
|
if (!checkItemsDutyusers.isEmpty()){
|
|
|
- notifyType.put(pointCheckDo,checkItemsDutyusers.stream().map(CheckItemsDutyuserDo::getDutyuserid).distinct().collect(Collectors.toList()));
|
|
|
+ notifyType.put(pointCheckVo,checkItemsDutyusers.stream().map(CheckItemsDutyuserDo::getDutyuserid).distinct().collect(Collectors.toList()));
|
|
|
}
|
|
|
//设置点检人
|
|
|
// String pcids = null;
|
|
@@ -449,8 +454,11 @@ public class CheckTemplateServiceImpl extends ServiceImpl<CheckTemplateDao, Chec
|
|
|
notifyType.forEach((k,v)-> {
|
|
|
String pointcheckname = k.getPointcheckname();
|
|
|
String templatetype = k.getTemplatetype();
|
|
|
+ //发送消息提醒添加设备名称和设备编号拼接
|
|
|
+ String checkitemname = k.getCheckitemname();
|
|
|
+ String checkitemcode = k.getCheckitemcode();
|
|
|
SysDictDo sysDictDo = dictsByType.stream().filter(info -> info.getValue().equals(templatetype)).findFirst().orElse(null);
|
|
|
- CXCommonUtils.sendNotify(INSPECTION_TITLE, String.format(INSPECTION_CONTENT, pointcheckname, sysDictDo == null ? "" : sysDictDo.getName()),
|
|
|
+ CXCommonUtils.sendNotify(INSPECTION_TITLE, String.format(INSPECTION_CONTENT, pointcheckname,checkitemname,checkitemcode, sysDictDo == null ? "" : sysDictDo.getName()),
|
|
|
null, v, k.getId(), INSPECTION + "-" + shift, false);
|
|
|
});
|
|
|
}
|