|
@@ -656,6 +656,9 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ TFCustomFlow tfCustomFlow = tfCustomFlowService.findById(tfCustomFlowEntity.gettFCustomFlowId());
|
|
|
+ tbSopInfoService.saveDynamicSop(tfCustomFlow, tfCustomFlowEntity.getCode(),
|
|
|
+ tfCustomFlowEntity.getFlowId(), flowTaskResult);
|
|
|
}
|
|
|
setupMap.put(flowTaskResult.getTaskKey(), flowTaskResult);
|
|
|
tfCustomFlowEntity.setFlowProcessVar(JacksonUtil.parseJson(flowResult));
|
|
@@ -1217,34 +1220,102 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
Objects.nonNull(sopInfoListParam.getDingPlan()) ? sopInfoListParam.getDingPlan().toString() : null);
|
|
|
for (Map m : list.getRecords()) {
|
|
|
String engineerUsersId = (String) m.get("engineer_users_id_1");
|
|
|
+ String regionManagerId = (String) m.get("region_manager_id_1");
|
|
|
+ String projectManagerId = (String) m.get("project_manager_id_1");
|
|
|
+ String regionCoordinatorId = (String) m.get("region_coordinator_id_1");
|
|
|
List<Long> userIdList = new ArrayList<>();
|
|
|
Map<Long, String> map = new HashMap<>();
|
|
|
Map<Long, String> engineerMap = new HashMap<>();//工程师map
|
|
|
+ Map<Long, String> regionManagerMap = new HashMap<>();//大区经理map
|
|
|
+ Map<Long, String> projectManagerMap = new HashMap<>();//项目经理map
|
|
|
+ Map<Long, String> regionCoordinatorMap = new HashMap<>();//区域协调人map
|
|
|
if (Objects.nonNull(engineerUsersId)) {
|
|
|
if (engineerUsersId.contains(SystemConstant.LIST_JOIN_SPLIT)) {
|
|
|
String[] strs = engineerUsersId.split(",");
|
|
|
for (int i = 0; i < strs.length; i++) {
|
|
|
userIdList.add(Long.parseLong(strs[i]));
|
|
|
+ map.put(Long.parseLong(strs[i]), "engineer_users_id_1");
|
|
|
engineerMap.put(Long.parseLong(strs[i]), "engineer_users_id_1");
|
|
|
}
|
|
|
} else {
|
|
|
userIdList.add(Long.parseLong(engineerUsersId));
|
|
|
+ map.put(Long.parseLong(engineerUsersId), "engineer_users_id_1");
|
|
|
engineerMap.put(Long.parseLong(engineerUsersId), "engineer_users_id_1");
|
|
|
}
|
|
|
}
|
|
|
+ if (Objects.nonNull(regionManagerId)) {
|
|
|
+ if (regionManagerId.contains(SystemConstant.LIST_JOIN_SPLIT)) {
|
|
|
+ String[] strs = regionManagerId.split(",");
|
|
|
+ for (int i = 0; i < strs.length; i++) {
|
|
|
+ userIdList.add(Long.parseLong(strs[i]));
|
|
|
+ map.put(Long.parseLong(strs[i]), "region_manager_id_1");
|
|
|
+ regionManagerMap.put(Long.parseLong(strs[i]), "region_manager_id_1");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ userIdList.add(Long.parseLong(regionManagerId));
|
|
|
+ regionManagerMap.put(Long.parseLong(regionManagerId), "region_manager_id_1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(projectManagerId)) {
|
|
|
+ if (projectManagerId.contains(SystemConstant.LIST_JOIN_SPLIT)) {
|
|
|
+ String[] strs = projectManagerId.split(",");
|
|
|
+ for (int i = 0; i < strs.length; i++) {
|
|
|
+ userIdList.add(Long.parseLong(strs[i]));
|
|
|
+ map.put(Long.parseLong(strs[i]), "project_manager_id_1");
|
|
|
+ projectManagerMap.put(Long.parseLong(strs[i]), "project_manager_id_1");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ userIdList.add(Long.parseLong(projectManagerId));
|
|
|
+ projectManagerMap.put(Long.parseLong(projectManagerId), "project_manager_id_1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (Objects.nonNull(regionCoordinatorId)) {
|
|
|
+ if (regionCoordinatorId.contains(SystemConstant.LIST_JOIN_SPLIT)) {
|
|
|
+ String[] strs = regionCoordinatorId.split(",");
|
|
|
+ for (int i = 0; i < strs.length; i++) {
|
|
|
+ userIdList.add(Long.parseLong(strs[i]));
|
|
|
+ map.put(Long.parseLong(strs[i]), "region_coordinator_id_1");
|
|
|
+ regionCoordinatorMap.put(Long.parseLong(strs[i]), "region_coordinator_id_1");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ userIdList.add(Long.parseLong(regionCoordinatorId));
|
|
|
+ regionCoordinatorMap.put(Long.parseLong(regionCoordinatorId), "region_coordinator_id_1");
|
|
|
+ }
|
|
|
+ }
|
|
|
if (!CollectionUtils.isEmpty(userIdList)) {
|
|
|
List<OrgUserNameDto> orgUserNameDtoList = sysUserService.findOrgUserName(userIdList);
|
|
|
- StringJoiner stringJoiner = new StringJoiner(SystemConstant.LIST_JOIN_SPLIT);
|
|
|
+ StringJoiner stringJoinerEngineer = new StringJoiner(SystemConstant.LIST_JOIN_SPLIT);
|
|
|
+ StringJoiner stringJoinerRegionManager = new StringJoiner(SystemConstant.LIST_JOIN_SPLIT);
|
|
|
+ StringJoiner stringJoinerProjectManager = new StringJoiner(SystemConstant.LIST_JOIN_SPLIT);
|
|
|
+ StringJoiner stringJoinerRegionCoordinator = new StringJoiner(SystemConstant.LIST_JOIN_SPLIT);
|
|
|
for (OrgUserNameDto s : orgUserNameDtoList) {
|
|
|
if (map.containsKey(s.getId())) {
|
|
|
m.put(map.get(s.getId()), s.getOrgUserName());
|
|
|
}
|
|
|
if (engineerMap.containsKey(s.getId())) {
|
|
|
- stringJoiner.add(s.getOrgUserName());
|
|
|
+ stringJoinerEngineer.add(s.getOrgUserName());
|
|
|
+ }
|
|
|
+ if (regionManagerMap.containsKey(s.getId())) {
|
|
|
+ stringJoinerRegionManager.add(s.getOrgUserName());
|
|
|
+ }
|
|
|
+ if (projectManagerMap.containsKey(s.getId())) {
|
|
|
+ stringJoinerProjectManager.add(s.getOrgUserName());
|
|
|
}
|
|
|
+ if (regionCoordinatorMap.containsKey(s.getId())) {
|
|
|
+ stringJoinerRegionCoordinator.add(s.getOrgUserName());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!CollectionUtils.isEmpty(engineerMap)) {
|
|
|
+ m.put("engineer_users_id_1", stringJoinerEngineer.toString());
|
|
|
+ }
|
|
|
+ if (!CollectionUtils.isEmpty(engineerMap)) {
|
|
|
+ m.put("region_manager_id_1", stringJoinerRegionManager.toString());
|
|
|
+ }
|
|
|
+ if (!CollectionUtils.isEmpty(engineerMap)) {
|
|
|
+ m.put("project_manager_id_1", stringJoinerProjectManager.toString());
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(engineerMap)) {
|
|
|
- m.put("engineer_users_id_1", stringJoiner.toString());
|
|
|
+ m.put("region_coordinator_id_1", stringJoinerRegionCoordinator.toString());
|
|
|
}
|
|
|
}
|
|
|
|