Sfoglia il codice sorgente

设备子系统———testin338bug修复,修复内容点检提醒中增加设备名称和设备编号

zhoudazhuang 1 anno fa
parent
commit
b8435396e0

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

@@ -343,7 +343,7 @@ public class SaveConstans {
         /**
          * 点巡检任务提醒
          */
-        public static final String INSPECTION_CONTENT = "【%s】的【%s】任务请及时完成";
+        public static final String INSPECTION_CONTENT = "【%s】的【%s】【%s】【%s】任务请及时完成";
         /**
          * 保养检修工单提醒内容
          */

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

@@ -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);
             });
         }

+ 31 - 0
cx-safe-check/cx-save-check-entity/src/main/java/com/rongwe/scentity/domian/PointCheckNewsVo.java

@@ -0,0 +1,31 @@
+package com.rongwe.scentity.domian;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.rongwei.rwcommon.base.BaseDo;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 点检任务表
+ * 
+ * @author chglee
+ * @email 1992lcg@163.com
+ * @date 2020-07-17 09:33:23
+ */
+@Data
+public class PointCheckNewsVo extends PointCheckDo implements Serializable {
+	/**
+	 * 检查项名称
+	 */
+	private String checkitemname;
+
+	/**
+	 * 检查项编号
+	 */
+	private String checkitemcode;
+}