|
|
|
@@ -588,6 +588,7 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
wxFlowRecord.setUserName(userName.trim()); |
|
|
|
wxFlowRecord.setStatus(EnumFlowRecordStatus.ASSIGNEE.getCode()); |
|
|
|
wxFlowRecord.setTaskKey(assignee.getKey()); |
|
|
|
wxFlowRecord.setTaskType(assignee.getType()); |
|
|
|
resultList.add(0,wxFlowRecord); |
|
|
|
|
|
|
|
//不是最后一个节点,设置下一个待审批节点代办人 |
|
|
|
@@ -610,6 +611,7 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
wxFlowRecord.setUserName(userName.trim()); |
|
|
|
wxFlowRecord.setStatus(EnumFlowRecordStatus.ASSIGNEE.getCode()); |
|
|
|
wxFlowRecord.setTaskKey(UUID.randomUUID().toString()); |
|
|
|
wxFlowRecord.setTaskType(assignee.getType()); |
|
|
|
resultList.add(0,wxFlowRecord); |
|
|
|
break; |
|
|
|
} |
|
|
|
@@ -635,10 +637,20 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
if(r.getTaskKey() == null) |
|
|
|
r.setTaskKey(r.getTaskName()); |
|
|
|
WxFlowRecord mapR = map.get(r.getTaskKey()); |
|
|
|
if(mapR != null) |
|
|
|
mapR.setUserName(mapR.getUserName()+","+r.getUserName()); |
|
|
|
else |
|
|
|
map.put(r.getTaskKey(),r); |
|
|
|
if(mapR != null) { |
|
|
|
//如果是会签代办,合并后去掉已经完成的 |
|
|
|
if(EnumTaskType.AND.getCode().equals(mapR.getTaskType()) |
|
|
|
&& EnumFlowRecordStatus.ASSIGNEE.getCode().equals(mapR.getStatus()) |
|
|
|
&& r.getTaskKey().equals(mapR.getTaskKey()) |
|
|
|
){ |
|
|
|
String newName = mapR.getUserName().replace(r.getUserName(),""); |
|
|
|
mapR.setUserName(subUserName(newName)); |
|
|
|
continue; |
|
|
|
} |
|
|
|
mapR.setUserName(mapR.getUserName() + "," + r.getUserName()); |
|
|
|
}else{ |
|
|
|
map.put(r.getTaskKey(), r); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
List<WxFlowRecord> flowRecordList = new ArrayList<>(); |
|
|
|
@@ -649,6 +661,16 @@ public class WxFlowServiceImpl implements WxFlowService { |
|
|
|
return new ResultData(flowRecordList); |
|
|
|
} |
|
|
|
|
|
|
|
public String subUserName(String name){ |
|
|
|
if(name.startsWith(",")){ |
|
|
|
return name.substring(1,name.length()); |
|
|
|
} |
|
|
|
if(name.endsWith(",")){ |
|
|
|
return name.substring(0,name.length()-1); |
|
|
|
} |
|
|
|
return name.replace(",,",","); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) |
|
|
|
public ResultData apply(Map<String, String> params,Long userId,String userName,String tenantId) { |
|
|
|
|