|
@@ -13,6 +13,7 @@ import com.qmth.sop.business.entity.*;
|
|
|
import com.qmth.sop.business.exec.MySQLExec;
|
|
|
import com.qmth.sop.business.mapper.SysUserMapper;
|
|
|
import com.qmth.sop.business.service.*;
|
|
|
+import com.qmth.sop.business.util.SmsSendUtil;
|
|
|
import com.qmth.sop.common.contant.SpringContextHolder;
|
|
|
import com.qmth.sop.common.contant.SystemConstant;
|
|
|
import com.qmth.sop.common.enums.*;
|
|
@@ -126,6 +127,9 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
@Resource
|
|
|
TBCrmDetailService tbCrmDetailService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ SmsSendUtil smsSendUtil;
|
|
|
+
|
|
|
/**
|
|
|
* 根据deploymentId查找processDefinitionId
|
|
|
*
|
|
@@ -263,6 +267,23 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
Long.parseLong(approveUserIds.get(approveUserIds.size() - 1)),
|
|
|
FlowStatusEnum.valueOf(flowApproveParam.getApprove().name()), sysUser.getId());
|
|
|
flowResult = JSONObject.parseObject(tfCustomFlow.getFlowProcessVar(), FlowResult.class);
|
|
|
+
|
|
|
+ FlowTaskSmsResult flowTaskSmsResult = tfCustomFlowEntityService.getFlowTaskRemindSmsInfo(
|
|
|
+ tfCustomFlowEntity.getId(), Long.parseLong(approveUserIds.get(0)));
|
|
|
+ if (Objects.isNull(flowTaskSmsResult)) {
|
|
|
+ flowTaskSmsResult = tfCustomFlowEntityService.getFlowTaskRemindSmsInfo(tfCustomFlowEntity.getCrmNo(),
|
|
|
+ Long.parseLong(approveUserIds.get(0)));
|
|
|
+ }
|
|
|
+ Optional.ofNullable(flowTaskSmsResult).orElseThrow(() -> ExceptionResultEnum.USER_NO_EXISTS.exception());
|
|
|
+
|
|
|
+ Task task = taskService.createTaskQuery().processInstanceId(processInstance.getProcessInstanceId())
|
|
|
+ .singleResult();
|
|
|
+ Map<String, Object> templateParam = new HashMap<>();
|
|
|
+ templateParam.put("userName", flowTaskSmsResult.getRealName());
|
|
|
+ templateParam.put("serviceName", flowTaskSmsResult.getServiceName());
|
|
|
+ templateParam.put("customName", flowTaskSmsResult.getCustomName());
|
|
|
+ templateParam.put("flowName", maxTfCustomFlow.getType().getTitle() + "【" + task.getName() + "】");
|
|
|
+ smsSendUtil.sendSms(flowTaskSmsResult.getMobileNumber(), SystemConstant.SMS_SOP_DONE_CODE, templateParam);
|
|
|
} else if (Objects.nonNull(flowApproveParam.getTaskId())) {
|
|
|
taskTemp = taskService.createTaskQuery().taskId(String.valueOf(flowApproveParam.getTaskId()))
|
|
|
.singleResult();
|