|
@@ -277,10 +277,6 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
|| tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
|
|
|
activitiService.sendSopFlowDoneSms(maxTfCustomFlow.getType(), tfCustomFlowEntity, task.getName(),
|
|
|
Long.parseLong(approveUserIds.get(0)));
|
|
|
- TBCrmDetail tbCrmDetail = (TBCrmDetail) flowApproveParam.getVar().get(SystemConstant.CRM_DETAIL);
|
|
|
- taskService.setVariable(task.getId(), SystemConstant.CRM_DETAIL, tbCrmDetail);
|
|
|
- activitiService.sendSopFlowDoneMsg(maxTfCustomFlow.getType(), tfCustomFlowEntity, tfFlowApprove,
|
|
|
- Long.parseLong(task.getId()), task.getName(), tbCrmDetail.getId());
|
|
|
}
|
|
|
} else if (Objects.nonNull(flowApproveParam.getTaskId())) {
|
|
|
taskTemp = taskService.createTaskQuery().taskId(String.valueOf(flowApproveParam.getTaskId()))
|
|
@@ -460,6 +456,10 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
TBCrmDetail tbCrmDetail = tbCrmDetailService.findBySopNo(tfCustomFlowEntity.getCode());
|
|
|
taskService.setVariable(task.getId(), SystemConstant.CRM_DETAIL, tbCrmDetail);
|
|
|
}
|
|
|
+ if (multiInstance && Objects.nonNull(nrOfCompletedInstances) && Objects.nonNull(nrOfInstances)
|
|
|
+ && nrOfCompletedInstances.intValue() == nrOfInstances.intValue()) {
|
|
|
+ taskService.setVariable(task.getId(), SystemConstant.FINISH, true);
|
|
|
+ }
|
|
|
taskService.setVariable(task.getId(), SystemConstant.FLOW_CUSTOM, tfCustomFlow);
|
|
|
taskService.setVariable(task.getId(), SystemConstant.FLOW_APPROVE, tfFlowApprove);
|
|
|
taskService.setVariable(task.getId(), SystemConstant.FLOW_ENTITY, tfCustomFlowEntity);
|
|
@@ -1364,14 +1364,13 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
*
|
|
|
* @param type
|
|
|
* @param tfCustomFlowEntity
|
|
|
- * @param tfFlowApprove
|
|
|
+ * @param setup
|
|
|
* @param taskId
|
|
|
* @param taskName
|
|
|
- * @param noticeId
|
|
|
*/
|
|
|
@Override
|
|
|
- public void sendSopFlowDoneMsg(TFCustomTypeEnum type, TFCustomFlowEntity tfCustomFlowEntity,
|
|
|
- TFFlowApprove tfFlowApprove, Long taskId, String taskName, Long noticeId) {
|
|
|
+ public void sendSopFlowDoneMsg(TFCustomTypeEnum type, TFCustomFlowEntity tfCustomFlowEntity, Integer setup,
|
|
|
+ Long taskId, String taskName) {
|
|
|
TBCrmDetail tbCrmDetail = null;
|
|
|
if (Objects.nonNull(taskId)) {
|
|
|
tbCrmDetail = (TBCrmDetail) taskService.getVariable(taskId.toString(), SystemConstant.CRM_DETAIL);
|
|
@@ -1400,16 +1399,9 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
}
|
|
|
receiveUserId = crmProjectResult.getRegionCoordinatorList().get(0).getUserId();//研究生固定区域协调人
|
|
|
}
|
|
|
- int count = 0;
|
|
|
- if (type == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW && tfFlowApprove.getSetup().intValue() == 3) {
|
|
|
- count = sysMessageService.countByInAudit(MessageTypeEnum.CLOUD_MARK_SOP, tfCustomFlowEntity.getCode(),
|
|
|
- noticeId, receiveUserId, tfFlowApprove.getSetup().intValue());
|
|
|
- }
|
|
|
- if (count == 0) {
|
|
|
- SysMessage sysMessage = new SysMessage(tfCustomFlowEntity.getCrmNo(), tfCustomFlowEntity.getCode(),
|
|
|
- messageTypeEnum, type.name(), crmProjectResult.getServiceUnitId(), receiveUserId,
|
|
|
- stringJoiner.toString(), -1L, tfFlowApprove.getSetup(), taskName, noticeId);
|
|
|
- sysMessageService.saveSysMessage(Arrays.asList(sysMessage));
|
|
|
- }
|
|
|
+ SysMessage sysMessage = new SysMessage(tfCustomFlowEntity.getCrmNo(), tfCustomFlowEntity.getCode(),
|
|
|
+ messageTypeEnum, type.name(), crmProjectResult.getServiceUnitId(), receiveUserId,
|
|
|
+ stringJoiner.toString(), -1L, setup, taskName);
|
|
|
+ sysMessageService.saveSysMessage(Arrays.asList(sysMessage));
|
|
|
}
|
|
|
}
|