|
@@ -1400,14 +1400,14 @@ public class InformationWriteQueryController extends BladeController {
|
|
@ApiImplicitParam(name = "contractId", value = "合同段ID", required = true)
|
|
@ApiImplicitParam(name = "contractId", value = "合同段ID", required = true)
|
|
})
|
|
})
|
|
public R<List<WbsTreeContractTreeVOS>> queryMappingStructureTree(@RequestParam String parentId, @RequestParam String contractId, @RequestParam String contractIdRelation) {
|
|
public R<List<WbsTreeContractTreeVOS>> queryMappingStructureTree(@RequestParam String parentId, @RequestParam String contractId, @RequestParam String contractIdRelation) {
|
|
- List<WbsTreeContractTreeVOS> result = this.queryContractTree(parentId, contractId, contractIdRelation);
|
|
|
|
|
|
+ List<WbsTreeContractTreeVOS> result = this.queryContractTree(parentId, contractId, contractIdRelation,null);
|
|
if (result.size() == 1) {
|
|
if (result.size() == 1) {
|
|
//只有一个子节点,继续向下
|
|
//只有一个子节点,继续向下
|
|
int size;
|
|
int size;
|
|
WbsTreeContractTreeVOS vos = result.get(0);
|
|
WbsTreeContractTreeVOS vos = result.get(0);
|
|
do {
|
|
do {
|
|
try {
|
|
try {
|
|
- List<WbsTreeContractTreeVOS> childResult = this.queryContractTree(vos.getId().toString(), contractId, vos.getContractIdRelation());
|
|
|
|
|
|
+ List<WbsTreeContractTreeVOS> childResult = this.queryContractTree(vos.getId().toString(), contractId, vos.getContractIdRelation(),null);
|
|
|
|
|
|
vos.setChildren(childResult);
|
|
vos.setChildren(childResult);
|
|
size = childResult.size();
|
|
size = childResult.size();
|
|
@@ -2030,7 +2030,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
if (StringUtils.isNotEmpty(primaryKeyId)) {
|
|
if (StringUtils.isNotEmpty(primaryKeyId)) {
|
|
parentId = primaryKeyId;
|
|
parentId = primaryKeyId;
|
|
}
|
|
}
|
|
- List<WbsTreeContractTreeVOS> rootTreeNode = this.queryContractTree(parentId, contractId, contractIdRelation);
|
|
|
|
|
|
+ List<WbsTreeContractTreeVOS> rootTreeNode = this.queryContractTree(parentId, contractId, contractIdRelation,null);
|
|
rootTreeNode.removeIf(vos -> (vos.getNodeType() != null && vos.getNodeType() == 111));
|
|
rootTreeNode.removeIf(vos -> (vos.getNodeType() != null && vos.getNodeType() == 111));
|
|
|
|
|
|
return R.data(rootTreeNode);
|
|
return R.data(rootTreeNode);
|
|
@@ -2046,13 +2046,18 @@ public class InformationWriteQueryController extends BladeController {
|
|
@ApiOperation(value = "获取当前合同段的划分树")
|
|
@ApiOperation(value = "获取当前合同段的划分树")
|
|
@ApiImplicitParams(value = {
|
|
@ApiImplicitParams(value = {
|
|
@ApiImplicitParam(name = "parentId", value = "父节点,为空则查询第一级节点"),
|
|
@ApiImplicitParam(name = "parentId", value = "父节点,为空则查询第一级节点"),
|
|
- @ApiImplicitParam(name = "contractId", value = "合同段ID", required = true)
|
|
|
|
|
|
+ @ApiImplicitParam(name = "contractId", value = "合同段ID", required = true),
|
|
|
|
+ @ApiImplicitParam(name = "classifyType", value = "所属方,监理、总监办的资料查询使用,=1施工数据(默认),=2监理数据")
|
|
})
|
|
})
|
|
- public R<List<WbsTreeContractTreeVOS>> queryContractWbsTreeByContractIdAndType(@RequestParam String primaryKeyId, @RequestParam String parentId, @RequestParam String contractId, @RequestParam String contractIdRelation) {
|
|
|
|
|
|
+ public R<List<WbsTreeContractTreeVOS>> queryContractWbsTreeByContractIdAndType(@RequestParam String primaryKeyId,
|
|
|
|
+ @RequestParam String parentId,
|
|
|
|
+ @RequestParam String contractId,
|
|
|
|
+ @RequestParam String contractIdRelation,
|
|
|
|
+ String classifyType) {
|
|
if (StringUtils.isNotEmpty(primaryKeyId)) {
|
|
if (StringUtils.isNotEmpty(primaryKeyId)) {
|
|
parentId = primaryKeyId;
|
|
parentId = primaryKeyId;
|
|
}
|
|
}
|
|
- return R.data(this.queryContractTree(parentId, contractId, contractIdRelation));
|
|
|
|
|
|
+ return R.data(this.queryContractTree(parentId, contractId, contractIdRelation,classifyType));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -2097,7 +2102,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
@ApiImplicitParam(name = "contractId", value = "合同段ID", required = true)
|
|
@ApiImplicitParam(name = "contractId", value = "合同段ID", required = true)
|
|
})
|
|
})
|
|
public R<List<WbsTreeContractTreeVOS>> queryContractWbsTreeByFirstInfo(@RequestParam String parentId, @RequestParam String contractId, @RequestParam String contractIdRelation) {
|
|
public R<List<WbsTreeContractTreeVOS>> queryContractWbsTreeByFirstInfo(@RequestParam String parentId, @RequestParam String contractId, @RequestParam String contractIdRelation) {
|
|
- List<WbsTreeContractTreeVOS> rootTreeNode = this.queryContractTree(parentId, contractId, contractIdRelation);
|
|
|
|
|
|
+ List<WbsTreeContractTreeVOS> rootTreeNode = this.queryContractTree(parentId, contractId, contractIdRelation,null);
|
|
//查询被标记为首件的数据
|
|
//查询被标记为首件的数据
|
|
rootTreeNode = rootTreeNode.stream().filter(WbsTreeContractTreeVOS::getIsFirst).collect(Collectors.toList());
|
|
rootTreeNode = rootTreeNode.stream().filter(WbsTreeContractTreeVOS::getIsFirst).collect(Collectors.toList());
|
|
|
|
|
|
@@ -2107,7 +2112,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
/**
|
|
/**
|
|
* 查询合同段划分树公共代码
|
|
* 查询合同段划分树公共代码
|
|
*/
|
|
*/
|
|
- private List<WbsTreeContractTreeVOS> queryContractTree(String parentId, String contractId, String contractIdRelation) {
|
|
|
|
|
|
+ private List<WbsTreeContractTreeVOS> queryContractTree(String parentId, String contractId, String contractIdRelation,String classifyType) {
|
|
List<WbsTreeContractTreeVOS> rootTreeNode;
|
|
List<WbsTreeContractTreeVOS> rootTreeNode;
|
|
|
|
|
|
//获取合同段,检查是否是监理合同段
|
|
//获取合同段,检查是否是监理合同段
|
|
@@ -2124,14 +2129,14 @@ public class InformationWriteQueryController extends BladeController {
|
|
//原始classify=2时查不出数量统计,所以改成传1
|
|
//原始classify=2时查不出数量统计,所以改成传1
|
|
if (StringUtils.isNotEmpty(parentId)) {
|
|
if (StringUtils.isNotEmpty(parentId)) {
|
|
//子节点
|
|
//子节点
|
|
- rootTreeNode = this.informationQueryService.queryContractTreeSupervision(contractIds, parentId, 1);
|
|
|
|
|
|
+ rootTreeNode = this.informationQueryService.queryContractTreeSupervision(contractIds, parentId, Integer.parseInt(classifyType));
|
|
} else {
|
|
} else {
|
|
//根节点
|
|
//根节点
|
|
- rootTreeNode = this.informationQueryService.queryContractTreeSupervision(contractIds, "0", 1);
|
|
|
|
|
|
+ rootTreeNode = this.informationQueryService.queryContractTreeSupervision(contractIds, "0", Integer.parseInt(classifyType));
|
|
|
|
|
|
//设置根节点数量统计
|
|
//设置根节点数量统计
|
|
for (WbsTreeContractTreeVOS root : rootTreeNode) {
|
|
for (WbsTreeContractTreeVOS root : rootTreeNode) {
|
|
- List<WbsTreeContractTreeVOS> rootZi = this.informationQueryService.queryContractTreeSupervision(Func.toStrList(root.getContractIdRelation()), root.getId().toString(), 1);
|
|
|
|
|
|
+ List<WbsTreeContractTreeVOS> rootZi = this.informationQueryService.queryContractTreeSupervision(Func.toStrList(root.getContractIdRelation()), root.getId().toString(), Integer.parseInt(classifyType));
|
|
List<Long> collect = rootZi.stream().map(WbsTreeContractTreeVOS::getSubmitCounts).collect(Collectors.toList());
|
|
List<Long> collect = rootZi.stream().map(WbsTreeContractTreeVOS::getSubmitCounts).collect(Collectors.toList());
|
|
Long reduce = collect.stream().reduce(0L, Long::sum);
|
|
Long reduce = collect.stream().reduce(0L, Long::sum);
|
|
root.setSubmitCounts(reduce);
|
|
root.setSubmitCounts(reduce);
|