Kaynağa Gözat

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

release_toaliyun_real
luozukai 7 yıl önce
ebeveyn
işleme
851286cf66
2 değiştirilmiş dosya ile 30 ekleme ve 4 silme
  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 Dosyayı Görüntüle

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



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


+ 26
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Dosyayı Görüntüle

@@ -588,6 +588,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxFlowRecord.setUserName(userName.trim()); wxFlowRecord.setUserName(userName.trim());
wxFlowRecord.setStatus(EnumFlowRecordStatus.ASSIGNEE.getCode()); wxFlowRecord.setStatus(EnumFlowRecordStatus.ASSIGNEE.getCode());
wxFlowRecord.setTaskKey(assignee.getKey()); wxFlowRecord.setTaskKey(assignee.getKey());
wxFlowRecord.setTaskType(assignee.getType());
resultList.add(0,wxFlowRecord); resultList.add(0,wxFlowRecord);


//不是最后一个节点,设置下一个待审批节点代办人 //不是最后一个节点,设置下一个待审批节点代办人
@@ -610,6 +611,7 @@ public class WxFlowServiceImpl implements WxFlowService {
wxFlowRecord.setUserName(userName.trim()); wxFlowRecord.setUserName(userName.trim());
wxFlowRecord.setStatus(EnumFlowRecordStatus.ASSIGNEE.getCode()); wxFlowRecord.setStatus(EnumFlowRecordStatus.ASSIGNEE.getCode());
wxFlowRecord.setTaskKey(UUID.randomUUID().toString()); wxFlowRecord.setTaskKey(UUID.randomUUID().toString());
wxFlowRecord.setTaskType(assignee.getType());
resultList.add(0,wxFlowRecord); resultList.add(0,wxFlowRecord);
break; break;
} }
@@ -635,10 +637,20 @@ public class WxFlowServiceImpl implements WxFlowService {
if(r.getTaskKey() == null) if(r.getTaskKey() == null)
r.setTaskKey(r.getTaskName()); r.setTaskKey(r.getTaskName());
WxFlowRecord mapR = map.get(r.getTaskKey()); 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<>(); List<WxFlowRecord> flowRecordList = new ArrayList<>();
@@ -649,6 +661,16 @@ public class WxFlowServiceImpl implements WxFlowService {
return new ResultData(flowRecordList); 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 @Override
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class}) @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class})
public ResultData apply(Map<String, String> params,Long userId,String userName,String tenantId) { public ResultData apply(Map<String, String> params,Long userId,String userName,String tenantId) {


Yükleniyor…
İptal
Kaydet