标准征求意见流程-流程图、流程历史对接
This commit is contained in:
@@ -95,4 +95,12 @@ public class BusProcessHistory {
|
||||
private String taskStatusShow;
|
||||
@TableField(exist = false)
|
||||
private String taskKeyShow;
|
||||
@TableField(exist = false)
|
||||
private String bpnId;
|
||||
@TableField(exist = false)
|
||||
private String prcId;
|
||||
@TableField(exist = false)
|
||||
private String prcName;
|
||||
@TableField(exist = false)
|
||||
private String prcNum;
|
||||
}
|
||||
|
||||
+28
-4
@@ -8,6 +8,7 @@ import com.ydw.bat.wkflow.business_auth.LawsUserInfoService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.entity.*;
|
||||
import com.ydw.bat.wkflow.business_main.datas.mapper.BusProcessHistoryMapper;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessHistoryService;
|
||||
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessNameService;
|
||||
import com.ydw.bat.wkflow.util.enums.FlowTypeEnum;
|
||||
import com.ydw.bat.wkflow.util.enums.StandardCommentNewProcessNodeKeyEnum;
|
||||
import com.ydw.bat.wkflow.util.enums.TaskStatusEnum;
|
||||
@@ -28,6 +29,9 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
||||
@Autowired
|
||||
LawsUserInfoService lawsUserInfoService;
|
||||
|
||||
@Autowired
|
||||
private IBusProcessNameService busProcessNameService;
|
||||
|
||||
@Override
|
||||
public List<BusProcessHistory> queryFlowHistoryList(BusProcessHistory busProcessHistory) {
|
||||
QueryWrapper<BusProcessHistory> bphQueryWrap = new QueryWrapper<>();
|
||||
@@ -38,7 +42,7 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
||||
);
|
||||
// bphQueryWrap.isNotNull("task_id");
|
||||
List<BusProcessHistory> bphList = this.list(bphQueryWrap);
|
||||
this.disposeData(bphList);
|
||||
this.disposeData(bphList,busProcessHistory.getActiProcInstId());
|
||||
List<BusProcessHistory> firstBphList = bphList.stream().filter(bph -> StringUtils.isEmpty(bph.getManyPId())).distinct().collect(Collectors.toList());
|
||||
for (BusProcessHistory processHistory : firstBphList) {
|
||||
if (StringUtils.equals(processHistory.getIsMany(),"1")) {
|
||||
@@ -119,9 +123,16 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
||||
*
|
||||
* @param datas
|
||||
*/
|
||||
private List<BusProcessHistory> disposeData(List<BusProcessHistory> datas) {
|
||||
private List<BusProcessHistory> disposeData(List<BusProcessHistory> datas,String actiProcInstId) {
|
||||
List<BusProcessHistory> results = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(datas)) {
|
||||
BusProcessName bpn = null;
|
||||
if (StringUtils.isNotEmpty(actiProcInstId)) {
|
||||
QueryWrapper<BusProcessName> bpnQueryWrap = new QueryWrapper<>();
|
||||
bpnQueryWrap.lambda().eq(BusProcessName::getPrcId,actiProcInstId);
|
||||
bpn = this.busProcessNameService.getOne(bpnQueryWrap);
|
||||
}
|
||||
|
||||
for (BusProcessHistory data : datas) {
|
||||
if (StringUtils.isNotEmpty(data.getUserId())) {
|
||||
ResponseMessage<UserVO> assignee = lawsUserInfoService.getByIdFeignClientWithDisabled(data.getUserId());
|
||||
@@ -144,6 +155,13 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
||||
taskKeyShow = StandardCommentNewProcessNodeKeyEnum.getLableByValue(data.getTaskKey());
|
||||
}
|
||||
data.setTaskKeyShow(taskKeyShow);
|
||||
|
||||
if (ObjectUtils.isNotEmpty(bpn)) {
|
||||
data.setPrcName(bpn.getPrcName());
|
||||
data.setPrcId(bpn.getPrcId());
|
||||
data.setPrcNum(bpn.getPrcNum());
|
||||
data.setBpnId(bpn.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
return results;
|
||||
@@ -246,7 +264,7 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
||||
this.setQueryCondition(busProcessHistory, bphQueryWrap);
|
||||
bphQueryWrap.orderByAsc("order_num", "create_time");
|
||||
List<BusProcessHistory> bphList = this.list(bphQueryWrap);
|
||||
this.disposeData(bphList);
|
||||
this.disposeData(bphList,busProcessHistory.getActiProcInstId());
|
||||
|
||||
FlowTypeEnum flowTypeEnum = FlowTypeEnum.getFlowTypeEnumByValue(busProcessHistory.getFlowType());
|
||||
switch (flowTypeEnum) {
|
||||
@@ -293,7 +311,13 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
||||
String taskStatus = "";
|
||||
String userNames = "";
|
||||
if (CollectionUtils.isNotEmpty(bphListByTaskKey)) {
|
||||
userNames = bphListByTaskKey.stream().filter(bph -> StringUtils.isNotEmpty(bph.getUserName())).map(BusProcessHistory::getUserName).distinct().collect(Collectors.joining(","));
|
||||
userNames = bphListByTaskKey.stream().filter(bph -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.isNotEmpty(bph.getUserName())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).map(BusProcessHistory::getUserName).distinct().collect(Collectors.joining(","));
|
||||
taskStatus = TaskStatusEnum.DONE.getValue();
|
||||
for (BusProcessHistory busProcessHistory : bphListByTaskKey) {
|
||||
if (StringUtils.isEmpty(busProcessHistory.getTaskId())
|
||||
|
||||
Reference in New Issue
Block a user