|
@@ -1573,6 +1573,30 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
projectManagerUserIds.add(Long.parseLong(value));
|
|
projectManagerUserIds.add(Long.parseLong(value));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
|
|
|
|
+ FlowTaskResult flowTaskResultTemp = this.getFormProperties(tfCustomFlowEntity, 1);
|
|
|
|
+ List<FlowFormWidgetResult> flowFormWidgetResultTempList = flowTaskResultTemp.getFormProperty();
|
|
|
|
+ for (FlowFormWidgetResult f : flowFormWidgetResultTempList) {
|
|
|
|
+ if (f.getFormId().contains(ProcessLimitedEnum.ENGINEER_USERS_ID.getKey()) && Objects.nonNull(
|
|
|
|
+ f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":null}")) {
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(f.getValue());
|
|
|
|
+ JSONArray jsonArray = jsonObject.getJSONArray(SystemConstant.VALUE);
|
|
|
|
+ for (int i = 0; i < jsonArray.size(); i++) {
|
|
|
|
+ enginessUserIds.add(Long.parseLong(jsonArray.getString(i)));
|
|
|
|
+ }
|
|
|
|
+ } else if (f.getFormId().contains(ProcessLimitedEnum.REGION_COORDINATOR_ID.getKey()) && Objects.nonNull(
|
|
|
|
+ f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":null}")) {
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(f.getValue());
|
|
|
|
+ String value = jsonObject.getString(SystemConstant.VALUE);
|
|
|
|
+ regionCoordinatorUserIds.add(Long.parseLong(value));
|
|
|
|
+ } else if (f.getFormId().contains(ProcessLimitedEnum.PROJECT_MANAGER_ID.getKey()) && Objects.nonNull(
|
|
|
|
+ f.getValue()) && !Objects.equals(f.getValue(), "{\"value\":null}")) {
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(f.getValue());
|
|
|
|
+ String value = jsonObject.getString(SystemConstant.VALUE);
|
|
|
|
+ projectManagerUserIds.add(Long.parseLong(value));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (tfFlowApprove.getStatus() != FlowStatusEnum.FINISH && tfFlowApprove.getStatus() != FlowStatusEnum.END) {
|
|
if (tfFlowApprove.getStatus() != FlowStatusEnum.FINISH && tfFlowApprove.getStatus() != FlowStatusEnum.END) {
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
CrmProjectResult crmProjectResult = tbCrmService.findCrmProjectInfo(tfCustomFlowEntity.getCode(),
|
|
CrmProjectResult crmProjectResult = tbCrmService.findCrmProjectInfo(tfCustomFlowEntity.getCode(),
|
|
@@ -1606,8 +1630,8 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
tbSopLogService.save(tbSopLog);
|
|
tbSopLogService.save(tbSopLog);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ List<AllocationParam> allocationParams = new ArrayList<>();
|
|
if (tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW && scopeEnum != scopeOldEnum) {//教务处sop流程待审核人
|
|
if (tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW && scopeEnum != scopeOldEnum) {//教务处sop流程待审核人
|
|
- List<AllocationParam> allocationParams = new ArrayList<>();
|
|
|
|
Task task = taskService.createTaskQuery().processInstanceId(tfCustomFlowEntity.getFlowId().toString())
|
|
Task task = taskService.createTaskQuery().processInstanceId(tfCustomFlowEntity.getFlowId().toString())
|
|
.singleResult();
|
|
.singleResult();
|
|
Optional.ofNullable(task).orElseThrow(() -> ExceptionResultEnum.FLOW_TASK_NO_DATA.exception());
|
|
Optional.ofNullable(task).orElseThrow(() -> ExceptionResultEnum.FLOW_TASK_NO_DATA.exception());
|
|
@@ -1626,6 +1650,8 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
Arrays.asList(tfFlowLogExchange.getApproveId()) :
|
|
Arrays.asList(tfFlowLogExchange.getApproveId()) :
|
|
Arrays.asList(crmProjectResult.getProjectManagerList().get(0).getUserId()),
|
|
Arrays.asList(crmProjectResult.getProjectManagerList().get(0).getUserId()),
|
|
"[系统]"));
|
|
"[系统]"));
|
|
|
|
+ tbSopInfoService.sopApproverExchange(tbCrmDetail.getId(), new SopAllocationParam(
|
|
|
|
+ new UserArchivesAllocationParam(allocationParams, tbCrmDetail.getId())));
|
|
}
|
|
}
|
|
if (!CollectionUtils.isEmpty(allocationParams)) {
|
|
if (!CollectionUtils.isEmpty(allocationParams)) {
|
|
tbSopInfoService.sopApproverExchange(tbCrmDetail.getId(), new SopAllocationParam(
|
|
tbSopInfoService.sopApproverExchange(tbCrmDetail.getId(), new SopAllocationParam(
|
|
@@ -1635,11 +1661,8 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
allocationParams.add(new AllocationParam(SopRoleTypeEnum.REGION_COORDINATOR,
|
|
allocationParams.add(new AllocationParam(SopRoleTypeEnum.REGION_COORDINATOR,
|
|
Arrays.asList(crmProjectResult.getRegionCoordinatorList().get(0).getUserId()), "[系统]"));
|
|
Arrays.asList(crmProjectResult.getRegionCoordinatorList().get(0).getUserId()), "[系统]"));
|
|
}
|
|
}
|
|
- tbUserArchivesAllocationService.editCrmAllocation(
|
|
|
|
- new UserArchivesAllocationParam(allocationParams, tbCrmDetail.getId()));
|
|
|
|
}
|
|
}
|
|
} else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
|
|
} else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {
|
|
- List<AllocationParam> allocationParams = new ArrayList<>();
|
|
|
|
if (!CollectionUtils.isEmpty(projectManagerUserIds)) {
|
|
if (!CollectionUtils.isEmpty(projectManagerUserIds)) {
|
|
allocationParams.add(
|
|
allocationParams.add(
|
|
new AllocationParam(SopRoleTypeEnum.PROJECT_MANAGER, projectManagerUserIds, "[系统]"));
|
|
new AllocationParam(SopRoleTypeEnum.PROJECT_MANAGER, projectManagerUserIds, "[系统]"));
|
|
@@ -1653,6 +1676,8 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
allocationParams.add(
|
|
allocationParams.add(
|
|
new AllocationParam(SopRoleTypeEnum.REGION_COORDINATOR, regionCoordinatorUserIds, "[系统]"));
|
|
new AllocationParam(SopRoleTypeEnum.REGION_COORDINATOR, regionCoordinatorUserIds, "[系统]"));
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+ if (!CollectionUtils.isEmpty(allocationParams)) {
|
|
tbUserArchivesAllocationService.editCrmAllocation(
|
|
tbUserArchivesAllocationService.editCrmAllocation(
|
|
new UserArchivesAllocationParam(allocationParams, tbCrmDetail.getId()));
|
|
new UserArchivesAllocationParam(allocationParams, tbCrmDetail.getId()));
|
|
}
|
|
}
|