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