yuanchao hace 2 meses
padre
commit
41f4cca19c

+ 18 - 4
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/message/PmsMessage.java

@@ -26,10 +26,25 @@ public class PmsMessage {
     private IotOpeationFillService iotOpeationFillService;
 
     public void sendMessage(Long businessId, String name, String businessType, Long userId, String mobile){
+
+        IotOpeationFillDO fillDO = iotOpeationFillService.getIotOpeationFill(businessId);
+
         Map<String, Object> templateParams = new HashMap<>();
-        templateParams.put("name", name);
-        templateParams.put("businessType", businessType);
-        templateParams.put("businessId", businessId);
+
+        if(PmsConstants.GENERATE_OPERATION.equals(businessType)){
+            templateParams.put("name", name);
+            templateParams.put("businessType", businessType);
+            templateParams.put("businessId", businessId);
+            templateParams.put("deptId",fillDO.getDeptId());
+            templateParams.put("userId",userId);
+            templateParams.put("orderStatus",fillDO.getOrderStatus());
+
+        }else{
+            templateParams.put("name", name);
+            templateParams.put("businessType", businessType);
+            templateParams.put("businessId", businessId);
+        }
+
         notifyMessageSendApi.sendSingleMessageToAdmin(new NotifySendSingleToUserReqDTO()
                 .setUserId(userId).setTemplateCode(businessType).setTemplateParams(templateParams));
         if (StrUtil.isNotBlank(mobile)) {
@@ -47,7 +62,6 @@ public class PmsMessage {
             String url = "";
 
             if(PmsConstants.GENERATE_OPERATION.equals(businessType)){
-                IotOpeationFillDO fillDO = iotOpeationFillService.getIotOpeationFill(businessId);
                 url="https://iot.deepoil.cc/dingding?deptId="+fillDO.getDeptId()+"&userId="+userId
                         +"&createTime="+fillDO.getCreateTime()+"&id="+businessId+"&orderStatus="+fillDO.getOrderStatus()+"&type="+businessType;
             }else{