|
@@ -1970,13 +1970,25 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
|
|
|
if (!new Integer("6").equals(node.getNodeType()) && !Arrays.asList("1,2,3,4".split(",")).contains(node.getMajorDataType().toString())) {
|
|
if (!new Integer("6").equals(node.getNodeType()) && !Arrays.asList("1,2,3,4".split(",")).contains(node.getMajorDataType().toString())) {
|
|
//不是工序,则查询当前节点下的所有填报节点
|
|
//不是工序,则查询当前节点下的所有填报节点
|
|
- List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(node.getId().toString(), contract.getContractType(), StringUtils.isNotEmpty(vo.getContractIdRelation()) ? vo.getContractIdRelation() : vo.getContractId().toString());
|
|
|
|
- if (StringUtils.isNotEmpty(vo.getIsFirst())) {
|
|
|
|
- //如果是首件列表请求,则删掉没有标记为首件的数据
|
|
|
|
- queryDataResult.removeIf(data -> StringUtils.isEmpty(data.getFirstId()));
|
|
|
|
- }
|
|
|
|
- if (queryDataResult != null && queryDataResult.size() > 0) {
|
|
|
|
- submitNodeKeyIds.addAll(queryDataResult.stream().map(QueryProcessDataVO::getPrimaryKeyId).distinct().collect(Collectors.toList()));
|
|
|
|
|
|
+ if (node.getParentId() == 0){
|
|
|
|
+ String contractId = node.getContractId();
|
|
|
|
+ List<WbsTreeContract> treeS = wbsTreeContractClient.getContractWbsTreeByParentId(node.getId().toString(),contractId);
|
|
|
|
+ for (WbsTreeContract tree : treeS) {
|
|
|
|
+ List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(tree.getId().toString(), contract.getContractType(), StringUtils.isNotEmpty(vo.getContractIdRelation()) ? vo.getContractIdRelation() : vo.getContractId().toString());
|
|
|
|
+ if (queryDataResult != null && queryDataResult.size() > 0) {
|
|
|
|
+ submitNodeKeyIds.addAll(queryDataResult.stream().map(QueryProcessDataVO::getPrimaryKeyId).distinct().collect(Collectors.toList()));
|
|
|
|
+ queryDataResult.clear();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(node.getId().toString(), contract.getContractType(), StringUtils.isNotEmpty(vo.getContractIdRelation()) ? vo.getContractIdRelation() : vo.getContractId().toString());
|
|
|
|
+ if (StringUtils.isNotEmpty(vo.getIsFirst())) {
|
|
|
|
+ //如果是首件列表请求,则删掉没有标记为首件的数据
|
|
|
|
+ queryDataResult.removeIf(data -> StringUtils.isEmpty(data.getFirstId()));
|
|
|
|
+ }
|
|
|
|
+ if (queryDataResult != null && queryDataResult.size() > 0) {
|
|
|
|
+ submitNodeKeyIds.addAll(queryDataResult.stream().map(QueryProcessDataVO::getPrimaryKeyId).distinct().collect(Collectors.toList()));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//设置进集合中
|
|
//设置进集合中
|
|
@@ -2095,7 +2107,23 @@ public class InformationWriteQueryController extends BladeController {
|
|
contractIds.add(contractIdRelation);
|
|
contractIds.add(contractIdRelation);
|
|
}
|
|
}
|
|
if (contractIds.size() > 0) {
|
|
if (contractIds.size() > 0) {
|
|
- rootTreeNode = this.informationQueryService.queryContractTreeSupervision(contractIds, StringUtils.isNotEmpty(parentId) ? parentId : "0", 2);
|
|
|
|
|
|
+ if (StringUtils.isNotEmpty(parentId)) {
|
|
|
|
+ //子节点
|
|
|
|
+ rootTreeNode = this.informationQueryService.queryContractTreeSupervision(contractIds, parentId, 1);
|
|
|
|
+ } else {
|
|
|
|
+ //根节点
|
|
|
|
+ //classify = 2 时查不出数量统计,改成传1
|
|
|
|
+ rootTreeNode = this.informationQueryService.queryContractTreeSupervision(contractIds, "0", 1);
|
|
|
|
+
|
|
|
|
+ //设置根节点数量统计
|
|
|
|
+ for (WbsTreeContractTreeVOS root : rootTreeNode) {
|
|
|
|
+ List<WbsTreeContractTreeVOS> rootZi = this.informationQueryService.queryContractTreeSupervision(Func.toStrList(root.getContractIdRelation()), root.getId().toString(), 1);
|
|
|
|
+ List<Long> collect = rootZi.stream().map(WbsTreeContractTreeVOS::getSubmitCounts).collect(Collectors.toList());
|
|
|
|
+ Long reduce = collect.stream().reduce(0L, Long::sum);
|
|
|
|
+ root.setSubmitCounts(reduce);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
rootTreeNode = new ArrayList<>();
|
|
rootTreeNode = new ArrayList<>();
|
|
}
|
|
}
|