|
|
@@ -300,6 +300,18 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
|
|
NotieBusinessTypeEnum.BPM.getValue(), NotifyTypeEnum.NOTIFY_TODO.getValue(),
|
|
|
NotifyPriorityEnum.MEDIUM.getValue(), 0, assigneeUser.getTenantId());
|
|
|
break;
|
|
|
+ case OUTBOUND_REGISTRATION:
|
|
|
+ elderlyInfo = bpmElderlyApi.getElderlyInfo(businessFormDO.getBusinessId2());
|
|
|
+ templateParams.put("nickname", user.getNickname());
|
|
|
+ templateParams.put("elderName", elderlyInfo.getElderName());
|
|
|
+ detailUrl = getProcessInstanceDetailUrl(reqDTO.getProcessInstanceId()) + "&businessId=" + businessFormDO.getBusinessId();
|
|
|
+ templateParams.put("detailUrl", detailUrl);
|
|
|
+ notifySendSingleToUserReqDTO = BpmMessageConvert.INSTANCE.messageConvert(reqDTO.getStartUserId(),
|
|
|
+ reqDTO.getProcessInstanceId(), "", detailUrl,
|
|
|
+ BpmMessageEnum.PROCESS_INSTANCE_APPROVE.getTemplateCode(), templateParams,
|
|
|
+ NotieBusinessTypeEnum.BPM.getValue(), NotifyTypeEnum.NOTIFY_TODO.getValue(),
|
|
|
+ NotifyPriorityEnum.MEDIUM.getValue(), 0, assigneeUser.getTenantId());
|
|
|
+ break;
|
|
|
case BED_CHANGE:
|
|
|
elderlyInfo = bpmElderlyChangeApi.getElderlyInfoByChangeId(businessFormDO.getBusinessId());
|
|
|
templateParams.put("nickname", user.getNickname());
|
|
|
@@ -388,6 +400,9 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
+ if (notifySendSingleToUserReqDTO == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
String corpUserId = assigneeUser.getCorpUserId() == null ? "" : assigneeUser.getCorpUserId().toString();
|
|
|
CorpWechatTextcard corpTextCard = new CorpWechatTextcard();
|
|
|
corpTextCard.setTitle(CorpMsgUtil.TITLE_APPROVE);
|
|
|
@@ -525,6 +540,18 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
|
|
NotieBusinessTypeEnum.BPM.getValue(), notifyType,
|
|
|
NotifyPriorityEnum.MEDIUM.getValue(), 0, assigneeUser.getTenantId());
|
|
|
break;
|
|
|
+ case OUTBOUND_REGISTRATION:
|
|
|
+ elderlyInfo = bpmElderlyApi.getElderlyInfo(businessFormDO.getBusinessId2());
|
|
|
+ templateParams.put("nickname", user.getNickname());
|
|
|
+ templateParams.put("elderName", elderlyInfo.getElderName());
|
|
|
+ detailUrl = getInstanceDetailUrl(reqDTO.getProcessInstanceId()) + "&businessId=" + businessFormDO.getBusinessId();
|
|
|
+ templateParams.put("detailUrl", detailUrl);
|
|
|
+ notifySendSingleToUserReqDTO = BpmMessageConvert.INSTANCE.messageConvert(reqDTO.getStartUserId(),
|
|
|
+ reqDTO.getProcessInstanceId(), "", detailUrl,
|
|
|
+ BpmMessageEnum.PROCESS_INSTANCE_REJECT.getTemplateCode(), templateParams,
|
|
|
+ NotieBusinessTypeEnum.BPM.getValue(), notifyType,
|
|
|
+ NotifyPriorityEnum.MEDIUM.getValue(), 0, assigneeUser.getTenantId());
|
|
|
+ break;
|
|
|
case BED_CHANGE:
|
|
|
detailUrl = getInstanceDetailUrl(reqDTO.getProcessInstanceId()) + "&businessId=" + businessFormDO.getBusinessId();
|
|
|
elderlyInfo = bpmElderlyChangeApi.getElderlyInfoByChangeId(businessFormDO.getBusinessId());
|
|
|
@@ -611,6 +638,9 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
+ if (notifySendSingleToUserReqDTO == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
String corpUserId = assigneeUser.getCorpUserId() == null ? "" : assigneeUser.getCorpUserId().toString();
|
|
|
CorpWechatTextcard corpTextCard = new CorpWechatTextcard();
|
|
|
corpTextCard.setTitle(CorpMsgUtil.TITLE_REFUSE);
|
|
|
@@ -831,6 +861,26 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if (BpmBusinessTypeEnum.OUTBOUND_REGISTRATION.getValue().equals(businessFormDO.getType())) {
|
|
|
+ elderlyInfo = bpmElderlyApi.getElderlyInfo(businessFormDO.getBusinessId2());
|
|
|
+ templateParams.put("nickname", user.getNickname());
|
|
|
+ templateParams.put("elderName", elderlyInfo.getElderName());
|
|
|
+ detailUrl = getInstanceDetailUrl(reqDTO.getProcessInstanceId()) + "&businessId=" + businessFormDO.getBusinessId();
|
|
|
+ templateParams.put("detailUrl", detailUrl);
|
|
|
+ notifySendSingleToUserReqDTO = BpmMessageConvert.INSTANCE.messageConvert(reqDTO.getAssigneeUserId(),
|
|
|
+ reqDTO.getProcessInstanceId(), reqDTO.getTaskId(), detailUrl,
|
|
|
+ BpmMessageEnum.TASK_ASSIGNED.getTemplateCode(), templateParams,
|
|
|
+ NotieBusinessTypeEnum.BPM.getValue(), NotifyTypeEnum.NOTIFY_TODO.getValue(),
|
|
|
+ NotifyPriorityEnum.MEDIUM.getValue(), 0, assigneeUser.getTenantId());
|
|
|
+ if (reqDTO.getStartUserId().equals(loginUserId)) {
|
|
|
+ notifyMessageSendApi.sendSingleMessageToAdminByDTO(BpmMessageConvert.INSTANCE.messageConvert(loginUserId,
|
|
|
+ reqDTO.getProcessInstanceId(), reqDTO.getTaskId(), detailUrl,
|
|
|
+ BpmMessageEnum.TASK_ASSIGNED.getTemplateCode(), templateParams,
|
|
|
+ NotieBusinessTypeEnum.BPM.getValue(), NotifyTypeEnum.NOTIFY_TODO.getValue(),
|
|
|
+ NotifyPriorityEnum.MEDIUM.getValue(), 1, assigneeUser.getTenantId()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (null == approveMethod && startNodeFlag) {
|
|
|
elderlyInfo = bpmElderlyApi.getElderlyInfo(businessFormDO.getBusinessId2());
|
|
|
templateParams.put("nickname", user.getNickname());
|
|
|
@@ -846,6 +896,9 @@ public class BpmMessageServiceImpl implements BpmMessageService {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (notifySendSingleToUserReqDTO == null) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
String corpUserId = assigneeUser.getCorpUserId() == null ? "" : assigneeUser.getCorpUserId().toString();
|
|
|
CorpWechatTextcard corpTextCard = new CorpWechatTextcard();
|
|
|
corpTextCard.setTitle(CorpMsgUtil.TITLE_HANDLED);
|