企标制修订-技术标准流程-流程图、流程历史
This commit is contained in:
+45
-9
@@ -9,6 +9,7 @@ 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.mapper.BusProcessHistoryMapper;
|
||||||
import com.ydw.bat.wkflow.business_main.datas.service.IBusProcessHistoryService;
|
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.business_main.datas.service.IBusProcessNameService;
|
||||||
|
import com.ydw.bat.wkflow.util.enums.BussLibraryNodeKeyEnum;
|
||||||
import com.ydw.bat.wkflow.util.enums.FlowTypeEnum;
|
import com.ydw.bat.wkflow.util.enums.FlowTypeEnum;
|
||||||
import com.ydw.bat.wkflow.util.enums.StandardCommentNewProcessNodeKeyEnum;
|
import com.ydw.bat.wkflow.util.enums.StandardCommentNewProcessNodeKeyEnum;
|
||||||
import com.ydw.bat.wkflow.util.enums.TaskStatusEnum;
|
import com.ydw.bat.wkflow.util.enums.TaskStatusEnum;
|
||||||
@@ -38,7 +39,7 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
|||||||
this.setQueryCondition(busProcessHistory, bphQueryWrap);
|
this.setQueryCondition(busProcessHistory, bphQueryWrap);
|
||||||
bphQueryWrap.orderByAsc("order_num","create_time");
|
bphQueryWrap.orderByAsc("order_num","create_time");
|
||||||
bphQueryWrap.lambda().and(
|
bphQueryWrap.lambda().and(
|
||||||
query -> query.isNull(BusProcessHistory::getTaskId).eq(BusProcessHistory::getIsMany,"1").or().isNotNull(BusProcessHistory::getTaskId)
|
query -> query.isNull(BusProcessHistory::getTaskId).isNull(BusProcessHistory::getUserId).eq(BusProcessHistory::getIsMany,"1").or().isNotNull(BusProcessHistory::getTaskId)
|
||||||
);
|
);
|
||||||
// bphQueryWrap.isNotNull("task_id");
|
// bphQueryWrap.isNotNull("task_id");
|
||||||
List<BusProcessHistory> bphList = this.list(bphQueryWrap);
|
List<BusProcessHistory> bphList = this.list(bphQueryWrap);
|
||||||
@@ -57,14 +58,14 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
|||||||
}
|
}
|
||||||
Date endTime = null;
|
Date endTime = null;
|
||||||
if (StringUtils.equals(taskStatus,TaskStatusEnum.DONE.getValue())) {
|
if (StringUtils.equals(taskStatus,TaskStatusEnum.DONE.getValue())) {
|
||||||
Collections.sort(childList,new Comparator<BusProcessHistory>(){
|
// Collections.sort(childList,new Comparator<BusProcessHistory>(){
|
||||||
@Override
|
// @Override
|
||||||
public int compare(BusProcessHistory o1, BusProcessHistory o2) {
|
// public int compare(BusProcessHistory o1, BusProcessHistory o2) {
|
||||||
return o2.getEndTime().compareTo(o1.getEndTime());
|
// return o2.getEndTime().compareTo(o1.getEndTime());
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
endTime = childList.get(0).getEndTime();
|
endTime = childList.get(childList.size()-1).getEndTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
String userNames = childList.stream().map(BusProcessHistory::getUserName).distinct().collect(Collectors.joining(","));
|
String userNames = childList.stream().map(BusProcessHistory::getUserName).distinct().collect(Collectors.joining(","));
|
||||||
@@ -78,7 +79,17 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return firstBphList;
|
List<BusProcessHistory> results = new ArrayList<>();
|
||||||
|
if (CollectionUtils.isNotEmpty(firstBphList)) {
|
||||||
|
results = firstBphList.stream().filter(bph -> {
|
||||||
|
boolean flag = false;
|
||||||
|
if (StringUtils.equals(bph.getIsMany(),"2") || (StringUtils.equals(bph.getIsMany(),"1") && CollectionUtils.isNotEmpty(bph.getChildren()))) {
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}).distinct().collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -153,6 +164,8 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
|||||||
String taskKeyShow = "";
|
String taskKeyShow = "";
|
||||||
if (StringUtils.equals(data.getFlowType(),FlowTypeEnum.BZZQYJLC.getValue())) {
|
if (StringUtils.equals(data.getFlowType(),FlowTypeEnum.BZZQYJLC.getValue())) {
|
||||||
taskKeyShow = StandardCommentNewProcessNodeKeyEnum.getLableByValue(data.getTaskKey());
|
taskKeyShow = StandardCommentNewProcessNodeKeyEnum.getLableByValue(data.getTaskKey());
|
||||||
|
} else if (StringUtils.equals(data.getFlowType(),FlowTypeEnum.QBZXD_JSBZ.getValue())) {
|
||||||
|
taskKeyShow = BussLibraryNodeKeyEnum.getLableByValue(data.getTaskKey());
|
||||||
}
|
}
|
||||||
data.setTaskKeyShow(taskKeyShow);
|
data.setTaskKeyShow(taskKeyShow);
|
||||||
|
|
||||||
@@ -271,6 +284,9 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
|||||||
case BZZQYJLC:
|
case BZZQYJLC:
|
||||||
result = this.getBzzqyjlcImgDataList(bphList);
|
result = this.getBzzqyjlcImgDataList(bphList);
|
||||||
break;
|
break;
|
||||||
|
case QBZXD_JSBZ:
|
||||||
|
result = this.getQbzxdJsbzImgDataList(bphList);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -311,6 +327,26 @@ public class IBusProcessHistoryServiceImpl extends ServiceImpl<BusProcessHistory
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获取企标制修订-技术标准流程图数据
|
||||||
|
* @param bphList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<Map<String, Object>> getQbzxdJsbzImgDataList(List<BusProcessHistory> bphList) {
|
||||||
|
List<Map<String, Object>> result = new ArrayList<>();
|
||||||
|
|
||||||
|
for (BussLibraryNodeKeyEnum nodeKeyEnum : BussLibraryNodeKeyEnum.values()) {
|
||||||
|
Map<String, Object> tasksMap = this.getTasksMap(
|
||||||
|
bphList,
|
||||||
|
nodeKeyEnum.getValue(),
|
||||||
|
nodeKeyEnum.getLable()
|
||||||
|
);
|
||||||
|
if (ObjectUtils.isNotEmpty(tasksMap)) {
|
||||||
|
result.add(tasksMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private Map<String, Object> getTasksMap(List<BusProcessHistory> bphList,String taskKey,String taskKeyName) {
|
private Map<String, Object> getTasksMap(List<BusProcessHistory> bphList,String taskKey,String taskKeyName) {
|
||||||
Map<String, Object> tasksMap = new HashMap<>();
|
Map<String, Object> tasksMap = new HashMap<>();
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ public class BLApplicantAfter implements TaskListener{
|
|||||||
qbbxPBph.setId(qbbxPBphId);
|
qbbxPBph.setId(qbbxPBphId);
|
||||||
qbbxPBph.setActiProcInstId(delegateTask.getProcessInstanceId());
|
qbbxPBph.setActiProcInstId(delegateTask.getProcessInstanceId());
|
||||||
qbbxPBph.setTaskKey(BussLibraryNodeKeyEnum.BUSS_LIBRARY2.getValue());
|
qbbxPBph.setTaskKey(BussLibraryNodeKeyEnum.BUSS_LIBRARY2.getValue());
|
||||||
qbbxPBph.setFlowType(FlowTypeEnum.BZZQYJLC.getValue());
|
qbbxPBph.setFlowType(FlowTypeEnum.QBZXD_JSBZ.getValue());
|
||||||
qbbxPBph.setOrderNum(BussLibraryNodeKeyEnum.BUSS_LIBRARY2.getOrderNum());
|
qbbxPBph.setOrderNum(BussLibraryNodeKeyEnum.BUSS_LIBRARY2.getOrderNum());
|
||||||
qbbxPBph.setIsSub("2");
|
qbbxPBph.setIsSub("2");
|
||||||
qbbxPBph.setIsMany("1");
|
qbbxPBph.setIsMany("1");
|
||||||
@@ -283,7 +283,7 @@ public class BLApplicantAfter implements TaskListener{
|
|||||||
zqyjPBph.setId(zqyjPBphId);
|
zqyjPBph.setId(zqyjPBphId);
|
||||||
zqyjPBph.setActiProcInstId(delegateTask.getProcessInstanceId());
|
zqyjPBph.setActiProcInstId(delegateTask.getProcessInstanceId());
|
||||||
zqyjPBph.setTaskKey(BussLibraryNodeKeyEnum.BUSS_LIBRARY5.getValue());
|
zqyjPBph.setTaskKey(BussLibraryNodeKeyEnum.BUSS_LIBRARY5.getValue());
|
||||||
zqyjPBph.setFlowType(FlowTypeEnum.BZZQYJLC.getValue());
|
zqyjPBph.setFlowType(FlowTypeEnum.QBZXD_JSBZ.getValue());
|
||||||
zqyjPBph.setOrderNum(BussLibraryNodeKeyEnum.BUSS_LIBRARY5.getOrderNum());
|
zqyjPBph.setOrderNum(BussLibraryNodeKeyEnum.BUSS_LIBRARY5.getOrderNum());
|
||||||
zqyjPBph.setIsSub("2");
|
zqyjPBph.setIsSub("2");
|
||||||
zqyjPBph.setIsMany("1");
|
zqyjPBph.setIsMany("1");
|
||||||
|
|||||||
Reference in New Issue
Block a user