Przeglądaj źródła

消息通知,流程表达式,巡检路线查询

lipenghui 2 miesięcy temu
rodzic
commit
d52c2db9f3

+ 1 - 0
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/message/BpmMessageServiceImpl.java

@@ -87,6 +87,7 @@ public class BpmMessageServiceImpl implements BpmMessageService {
             String templateCode = "failure-report";
             templateParams.put("businessType", "failureReport");
             templateParams.put("businessId", reqDTO.getProcessInstanceId());
+            templateParams.put("processcode", reqDTO.getProcessInstanceId());
             notifyMessageSendApi.sendSingleMessageToAdmin(new NotifySendSingleToUserReqDTO()
                     .setUserId(reqDTO.getAssigneeUserId()).setTemplateCode(templateCode).setTemplateParams(templateParams));
             msg = "【PMS】故障上报流程 - 有新的故障上报需要审核"+",请前往 http://1.94.244.160:70/ 进行处理。"+"["+ DateUtil.format(new Date(),"yyyy-MM-dd hh:mm:ss")+"]";

+ 3 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/constant/PmsConstants.java

@@ -3,7 +3,10 @@ package cn.iocoder.yudao.module.pms.constant;
 public interface PmsConstants {
     String GENERATE_INSPECT = "generateInspect";
     String GENERATE_MAINTAIN = "generateMaintain";
+    String GENERATE_MAINTAIN_TEMPLATE = "generate-maintain";
     String GENERATE_MAINTENANCE = "generateMaintenance";
     String FAILURE_REPORT = "failureReport";
     String GENERATE_INSPECT_TEMPLATE = "genrate-inspect";
+    String GENERATE_OPERATE = "generateOperate";
+    String GENERATE_OPERATE_TEMPLATE = "generate-operate";
 }

+ 7 - 0
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/service/failure/IotFailureReportServiceImpl.java

@@ -95,6 +95,13 @@ public class IotFailureReportServiceImpl implements IotFailureReportService {
             iotMaintainDO.setFailureId(failureReportDO.getId());
             iotMaintainDO.setId(null);
             iotMaintainMapper.insert(iotMaintainDO);
+            //发送消息
+            Map<String, Object> templateParams = new HashMap<>();
+            templateParams.put("name", iotMaintainDO.getDeviceName());
+            templateParams.put("businessType", PmsConstants.GENERATE_MAINTAIN);
+            templateParams.put("businessId", iotMaintainDO.getId());
+            notifyMessageSendApi.sendSingleMessageToAdmin(new NotifySendSingleToUserReqDTO()
+                    .setUserId(failureReportDO.getAssigneeUserId()).setTemplateCode(PmsConstants.GENERATE_MAINTAIN_TEMPLATE).setTemplateParams(templateParams));
         } else if (bpmResult ==3 ) {
             //更新故障上报状态及审核状态
             IotFailureReportDO failureReportDO = iotFailureReportMapper.selectById(id);