Преглед изворни кода

[审批][修改][修改流程展示]

release_toaliyun_real
luozukai пре 7 година
родитељ
комит
851286cf66
2 измењених фајлова са 30 додато и 4 уклоњено
  1. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java
  2. +26
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java

+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxFlowRecord.java Прегледај датотеку

@@ -57,6 +57,10 @@ public class WxFlowRecord implements Serializable {
private Integer isLastStart;
@Transient
private Integer limit;
//1普通 2会签 3或签
@Transient
private Integer taskType;


public WxFlowRecord(){}
public WxFlowRecord(Long businessId){


+ 26
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Прегледај датотеку

@@ -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) {


Loading…
Откажи
Сачувај