|
@@ -219,9 +219,8 @@ public class TaskClientImpl implements TaskClient {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void saveFixedFlowLink(Long fixedFlowId, String name, Integer type, String userIds, Long projectId, Long contractId, Integer sort) {
|
|
|
+ public void saveFixedFlowLink(Long fixedFlowId, String name, Integer type, String userIds, Long projectId, Long contractId, Integer linkSort,Integer userSort) {
|
|
|
Map<Long, String> userMap = iUserClient.selectUserAll().stream().filter(f -> ObjectUtil.isNotEmpty(f.getRealName())).collect(Collectors.toMap(User::getId, User::getRealName));
|
|
|
- int sortLink = 1;
|
|
|
for (String userId : userIds.split(",")) {
|
|
|
FixedFlowLink fixedFlowLink = new FixedFlowLink();
|
|
|
fixedFlowLink.setFixedFlowId(fixedFlowId);
|
|
@@ -229,12 +228,10 @@ public class TaskClientImpl implements TaskClient {
|
|
|
fixedFlowLink.setFixedFlowLinkType(type);
|
|
|
fixedFlowLink.setFixedFlowLinkUser(Long.parseLong(userId));
|
|
|
fixedFlowLink.setFixedFlowLinkUserName(userMap.get(Long.parseLong(userId)));
|
|
|
- if (type.equals(1)) {
|
|
|
- fixedFlowLink.setFixedFlowLinkSort(sortLink++);
|
|
|
- }
|
|
|
+ fixedFlowLink.setFixedFlowLinkSort(linkSort);
|
|
|
fixedFlowLink.setProjectId(projectId);
|
|
|
fixedFlowLink.setContractId(contractId);
|
|
|
- fixedFlowLink.setFixedFlowBranchSort(sort);
|
|
|
+ fixedFlowLink.setFixedFlowBranchSort(userSort+=1);
|
|
|
fixedFlowLinkServiceImpl.save(fixedFlowLink);
|
|
|
}
|
|
|
}
|
|
@@ -245,8 +242,8 @@ public class TaskClientImpl implements TaskClient {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void updateFixedFlowLink(Long fixedFlowId, String name, Integer type, String userIds, Long projectId, Long contractId, Integer sort) {
|
|
|
- this.saveFixedFlowLink(fixedFlowId, name, type, userIds, projectId, contractId, sort);
|
|
|
+ public void updateFixedFlowLink(Long fixedFlowId, String name, Integer type, String userIds, Long projectId, Long contractId, Integer linkSort,Integer userSort) {
|
|
|
+ this.saveFixedFlowLink(fixedFlowId, name, type, userIds, projectId, contractId, linkSort,userSort);
|
|
|
}
|
|
|
|
|
|
@Override
|