|
@@ -16,6 +16,7 @@ import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
|
@@ -47,6 +48,8 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
|
private WebProperties webProperties;
|
|
private WebProperties webProperties;
|
|
@Autowired
|
|
@Autowired
|
|
private NotifyMessageSendApi notifyMessageSendApi;
|
|
private NotifyMessageSendApi notifyMessageSendApi;
|
|
|
|
+ @Value("${system.url}")
|
|
|
|
+ private String systemUrl;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void sendMessageWhenProcessInstanceApprove(BpmMessageSendWhenProcessInstanceApproveReqDTO reqDTO) {
|
|
public void sendMessageWhenProcessInstanceApprove(BpmMessageSendWhenProcessInstanceApproveReqDTO reqDTO) {
|
|
@@ -91,7 +94,7 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
|
notifyMessageSendApi.sendSingleMessageToAdmin(new NotifySendSingleToUserReqDTO()
|
|
notifyMessageSendApi.sendSingleMessageToAdmin(new NotifySendSingleToUserReqDTO()
|
|
.setUserId(reqDTO.getAssigneeUserId()).setTemplateCode(templateCode).setTemplateParams(templateParams));
|
|
.setUserId(reqDTO.getAssigneeUserId()).setTemplateCode(templateCode).setTemplateParams(templateParams));
|
|
msg = "您有新的故障上报流程待处理,请审批。"+"["+ DateUtil.format(new Date(),"yyyy-MM-dd hh:mm:ss")+"]";
|
|
msg = "您有新的故障上报流程待处理,请审批。"+"["+ DateUtil.format(new Date(),"yyyy-MM-dd hh:mm:ss")+"]";
|
|
- url="https://iot.deepoil.cc/dingding?id="+reqDTO.getProcessInstanceId()+"&type=failureReport&userId="+reqDTO.getAssigneeUserId();
|
|
|
|
|
|
+ url=systemUrl + "dingding?id="+reqDTO.getProcessInstanceId()+"&type=failureReport&userId="+reqDTO.getAssigneeUserId();
|
|
} else if ("委外维修工单流程".equals(reqDTO.getProcessInstanceName())){
|
|
} else if ("委外维修工单流程".equals(reqDTO.getProcessInstanceName())){
|
|
String templateCode = "maintain-out";
|
|
String templateCode = "maintain-out";
|
|
templateParams.put("businessType", "maintainOut");
|
|
templateParams.put("businessType", "maintainOut");
|
|
@@ -100,7 +103,7 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
|
notifyMessageSendApi.sendSingleMessageToAdmin(new NotifySendSingleToUserReqDTO()
|
|
notifyMessageSendApi.sendSingleMessageToAdmin(new NotifySendSingleToUserReqDTO()
|
|
.setUserId(reqDTO.getAssigneeUserId()).setTemplateCode(templateCode).setTemplateParams(templateParams));
|
|
.setUserId(reqDTO.getAssigneeUserId()).setTemplateCode(templateCode).setTemplateParams(templateParams));
|
|
msg = "您有新的委外维修流程,请审批。"+"["+ DateUtil.format(new Date(),"yyyy-MM-dd hh:mm:ss")+"]";
|
|
msg = "您有新的委外维修流程,请审批。"+"["+ DateUtil.format(new Date(),"yyyy-MM-dd hh:mm:ss")+"]";
|
|
- url="https://iot.deepoil.cc/dingding?id="+reqDTO.getProcessInstanceId()+"&type=maintainOut&userId="+reqDTO.getAssigneeUserId();
|
|
|
|
|
|
+ url=systemUrl + "dingding?id="+reqDTO.getProcessInstanceId()+"&type=maintainOut&userId="+reqDTO.getAssigneeUserId();
|
|
}
|
|
}
|
|
dingtalkSendApi.send(user.getMobile(), msg,"link",url);
|
|
dingtalkSendApi.send(user.getMobile(), msg,"link",url);
|
|
}
|
|
}
|