|
@@ -1345,15 +1345,20 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
//首先查询需要复制的节点及其下级所有子节点的信息
|
|
|
WbsTreeContract needCopyNode = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(vo.getNeedCopyPrimaryKeyId());
|
|
|
// 获取当前节点的所有子节点
|
|
|
- String vocational = SnowFlakeUtil.getId() + "";
|
|
|
+ /*String vocational = SnowFlakeUtil.getId() + "";*/
|
|
|
+
|
|
|
//新增施工台账
|
|
|
List<WbsTreeContract> saveList = new ArrayList<>();
|
|
|
List<ConstructionLedger> saveLedger = new ArrayList<>();
|
|
|
- // 获取附件
|
|
|
+
|
|
|
+ //获取子级节点、表信息
|
|
|
List<WbsTreeContract> nodeChildAll = informationQueryService.getNodeChildAllByNodeId(needCopyNode.getId() + "", needCopyNode.getContractId(), vo.getNeedCopyPrimaryKeyId());
|
|
|
- // 获取实体表列对象
|
|
|
+ //获取数据源表(附件复制使用)
|
|
|
+ Set<WbsTreeContract> oldTabs = nodeChildAll.stream().filter(f -> (new Integer(2).equals(f.getType()))).collect(Collectors.toSet());
|
|
|
+
|
|
|
+ //获取实体表列对象
|
|
|
List<QueryProcessDataVO> nodeTabCols = informationQueryService.getNodeChildTabColsAllByNodeId(needCopyNode.getId() + "", needCopyNode.getContractId());
|
|
|
- // 转化为map
|
|
|
+ //转化为map
|
|
|
Map<String, String> nodeTabColsMap = nodeTabCols.stream().collect(Collectors.toMap(QueryProcessDataVO::getQueryType, QueryProcessDataVO::getAncestors, (key1, key2) -> key2));
|
|
|
StringBuilder copeSql = new StringBuilder();
|
|
|
|
|
@@ -1432,14 +1437,24 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- //保存节点信息
|
|
|
+
|
|
|
+ //复制保存节点、表信息
|
|
|
R<Boolean> booleanR = this.saveOrCopyNodeTree(saveList, saveLedger, 32, needCopyNode);
|
|
|
- //复制数据逻辑
|
|
|
+
|
|
|
+ //复制元素表附件信息
|
|
|
+ List<WbsTreeContract> newTabs = saveList.stream().filter(f -> (new Integer(2).equals(f.getType()))).collect(Collectors.toList());
|
|
|
+ if (newTabs.size() > 0 && oldTabs.size() > 0 && vo.getIsCopyData() == 1) {
|
|
|
+ this.addCopyTabFile(newTabs, oldTabs);
|
|
|
+ }
|
|
|
+
|
|
|
+ //复制表单数据
|
|
|
if (copeSql.length() >= 10) {
|
|
|
jdbcTemplate.execute(copeSql.toString());
|
|
|
}
|
|
|
- //获取父节点信息
|
|
|
+
|
|
|
+ //更新redis缓存
|
|
|
informationQueryService.AsyncWbsTree(needCopyNode.getParentId() + "", needCopyNode.getParentId() + "", needCopyNode.getContractId(), "", "1");
|
|
|
+
|
|
|
return booleanR;
|
|
|
|
|
|
} else if (("2").equals(vo.getCopyType())) {
|
|
@@ -1473,7 +1488,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
|
|
|
WbsTreeContract needCopyNodeRoot = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(vo.getNeedCopyPrimaryKeyId());
|
|
|
if (needCopyNodeRoot != null) {
|
|
|
- //缓存需要复制的节点信息、表信息
|
|
|
+ //缓存需要复制的节点、表信息
|
|
|
Map<String, List<WbsTreeContract>> needCopyNodeAndTabMap = new HashMap<>();
|
|
|
List<WbsTreeContract> needCopyChildNodes = this.getChildNodes(needCopyNodeRoot);
|
|
|
if (ObjectUtil.isEmpty(needCopyChildNodes) || needCopyChildNodes.size() == 0) {
|
|
@@ -1593,18 +1608,23 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
//入库
|
|
|
Boolean row = false;
|
|
|
if (nodes.size() > 0) {
|
|
|
+ //复制新增节点
|
|
|
row = wbsTreeContractClient.saveBatch(nodes);
|
|
|
}
|
|
|
if (tabs.size() > 0) {
|
|
|
+ //复制新增表
|
|
|
row = wbsTreeContractClient.saveBatch(tabs);
|
|
|
if (addChildNodesTablesOldAll.size() > 0 && vo.getIsCopyData() == 1) {
|
|
|
+ //复制新增表附件
|
|
|
this.addCopyTabFile(tabs, addChildNodesTablesOldAll);
|
|
|
}
|
|
|
}
|
|
|
if (resultTablesData.size() > 0) {
|
|
|
+ //复制新增表数据
|
|
|
jdbcTemplate.execute(StringUtils.join(resultTablesData, ""));
|
|
|
}
|
|
|
if (row && asyncWbsTreeNodes.size() > 0) {
|
|
|
+ //更新redis缓存
|
|
|
List<WbsTreeContract> collect = asyncWbsTreeNodes.stream().distinct().collect(Collectors.toList());
|
|
|
for (WbsTreeContract asyncWbsTreeNode : collect) {
|
|
|
informationQueryService.AsyncWbsTree("", asyncWbsTreeNode.getId() + "", contractId, "", "1");
|
|
@@ -1658,6 +1678,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
Map<String, List<TableFile>> tableFileOldMap = tableFileClient.getTabFilesByTabIds(StringUtils.join(tabFileIds, ",")).stream().collect(Collectors.groupingBy(TableFile::getTabId));
|
|
|
if (tableFileOldMap != null && tableFileOldMap.size() > 0) {
|
|
|
List<TableFile> resultFileData = new ArrayList<>();
|
|
|
+ List<Long> updatePKeyIds = new ArrayList<>();
|
|
|
for (WbsTreeContract tabOld : addChildNodesTablesOld) {
|
|
|
for (WbsTreeContract tabNew : addChildNodesTables) {
|
|
|
//获取对应表
|
|
@@ -1670,12 +1691,21 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
file.setId(SnowFlakeUtil.getId());
|
|
|
});
|
|
|
resultFileData.addAll(tab);
|
|
|
+ //修改文件状态
|
|
|
+ if (ObjectUtil.isNotEmpty(tabOld) && tabOld.getTabFileType() == 2) {
|
|
|
+ updatePKeyIds.add(tabNew.getPKeyId());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (resultFileData.size() > 0) {
|
|
|
+ //入库
|
|
|
tableFileClient.saveBatch(resultFileData);
|
|
|
+ if (updatePKeyIds.size() > 0) {
|
|
|
+ //修改文件状态
|
|
|
+ wbsTreeContractClient.updateTabFileTypeByPkeyIds(updatePKeyIds);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1702,10 +1732,6 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
//表单所属方,只有勾选了对应的所属方权限才复制数据;勾选了复制数据才能复制,否则只是创建节点、表
|
|
|
if (tabOwner.contains(needTab.getTableOwner()) && isCopyData == 1) {
|
|
|
|
|
|
- //源表obj对象,文件附件使用
|
|
|
- if (!needTab.getTabFileType().equals(toCopyNodeTab.getTabFileType())) {
|
|
|
- toCopyNodeTab.setTabFileType(needTab.getTabFileType()); //已上传
|
|
|
- }
|
|
|
//目标表obj对象,文件附件使用
|
|
|
addChildNodesTablesAll.add(toCopyNodeTab);
|
|
|
|
|
@@ -1736,9 +1762,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
/**
|
|
|
* 新增复制的节点、表的数据构造
|
|
|
*/
|
|
|
- private void addCopyNodesAndTabsBuildData(List<WbsTreeContract> addNodeList, List<WbsTreeContract> addTabList, List<WbsTreeContract> needNodes, List<WbsTreeContract> needTabs, WbsTreeContract
|
|
|
- needCopyNode, WbsTreeContract toCopyNode, List<String> resultTablesData, Integer isSameNode, String
|
|
|
- tabOwner, Integer isCopyData) {
|
|
|
+ private void addCopyNodesAndTabsBuildData(List<WbsTreeContract> addNodeList, List<WbsTreeContract> addTabList, List<WbsTreeContract> needNodes, List<WbsTreeContract> needTabs, WbsTreeContract needCopyNode, WbsTreeContract toCopyNode, List<String> resultTablesData, Integer isSameNode, String tabOwner, Integer isCopyData) {
|
|
|
int var = 0;
|
|
|
if (needNodes.size() == 1) {
|
|
|
//判断是否为最下级节点
|
|
@@ -1766,6 +1790,9 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
obj.setFullName(toCopyNode.getNodeName());
|
|
|
obj.setPartitionCode(toCopyNode.getPartitionCode());
|
|
|
obj.setCreateTime(new Date());
|
|
|
+ //获取当前复制的节点的sort
|
|
|
+ obj.setSort(ObjectUtils.isNotEmpty(needNode.getSort()) ? needNode.getSort() : 0);
|
|
|
+
|
|
|
addNodeList.add(obj);
|
|
|
break;
|
|
|
}
|
|
@@ -1790,6 +1817,9 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
//初始化PDF路径
|
|
|
obj.setPdfUrl(null);
|
|
|
obj.setCreateTime(new Date());
|
|
|
+ //获取当前复制的表的sort
|
|
|
+ obj.setSort(ObjectUtils.isNotEmpty(needTab.getSort()) ? needTab.getSort() : 0);
|
|
|
+
|
|
|
addTabList.add(obj);
|
|
|
|
|
|
//表单所属方,只有勾选了对应的所属方权限才复制数据;勾选了复制数据才能复制,否则只是创建节点、表
|
|
@@ -1850,6 +1880,9 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
obj.setId(id);
|
|
|
obj.setParentId(newParentId);
|
|
|
obj.setCreateTime(new Date());
|
|
|
+ //获取当前复制的节点的sort
|
|
|
+ obj.setSort(ObjectUtils.isNotEmpty(node.getSort()) ? node.getSort() : 0);
|
|
|
+
|
|
|
addNodeList.add(obj);
|
|
|
|
|
|
//构造当前节点下所有元素表
|
|
@@ -1877,6 +1910,9 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
//初始化PDF路径
|
|
|
objTab.setPdfUrl(null);
|
|
|
objTab.setCreateTime(new Date());
|
|
|
+ //获取当前复制的表的sort
|
|
|
+ objTab.setSort(ObjectUtils.isNotEmpty(needTab.getSort()) ? needTab.getSort() : 0);
|
|
|
+
|
|
|
addTabList.add(objTab);
|
|
|
|
|
|
//表单所属方,只有勾选了对应的所属方权限才复制数据;勾选了复制数据才能复制,否则只是创建节点、表
|
|
@@ -1911,6 +1947,8 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
needCopyNode.setNodeName(toCopyNode.getNodeName());
|
|
|
needCopyNode.setFullName(toCopyNode.getNodeName());
|
|
|
needCopyNode.setPartitionCode(toCopyNode.getPartitionCode());
|
|
|
+ needCopyNode.setCreateTime(new Date());
|
|
|
+
|
|
|
addNodeList.add(needCopyNode);
|
|
|
}
|
|
|
}
|
|
@@ -2181,7 +2219,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
* 生成施工日志记录
|
|
|
*/
|
|
|
private void createLedger(WbsTreeContract
|
|
|
- newData, List<ConstructionLedger> saveLedger, Map<String, WbsTreeContract> contractNodeMap, Map<String, WbsTreePrivate> projectNodeMap) {
|
|
|
+ newData, List<ConstructionLedger> saveLedger, Map<String, WbsTreeContract> contractNodeMap, Map<String, WbsTreeContract> projectNodeMap) {
|
|
|
//工序,需要新增施工台账
|
|
|
ConstructionLedger ledger = new ConstructionLedger();
|
|
|
//获取这个节点的原始信息
|
|
@@ -2203,13 +2241,13 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
}
|
|
|
} else if (projectNodeMap != null) {
|
|
|
if (projectNodeMap.containsKey(newData.getOldId())) {
|
|
|
- WbsTreePrivate contractNode = projectNodeMap.get(newData.getOldId());
|
|
|
+ WbsTreeContract contractNode = projectNodeMap.get(newData.getOldId());
|
|
|
if (contractNode.getParentId() != null && StringUtils.isNotEmpty(contractNode.getParentId().toString())) {
|
|
|
- WbsTreePrivate parentNode;
|
|
|
+ WbsTreeContract parentNode;
|
|
|
if (projectNodeMap.containsKey(contractNode.getParentId().toString())) {
|
|
|
parentNode = projectNodeMap.get(contractNode.getParentId().toString());
|
|
|
} else {
|
|
|
- parentNode = this.wbsTreePrivateClient.queryPeersNodeByProjectIdAndId(contractNode.getProjectId(), contractNode.getParentId());
|
|
|
+ parentNode = this.wbsTreeContractClient.queryCurrentNodeAllParent(Long.parseLong(contractNode.getContractId()), contractNode.getParentId());
|
|
|
}
|
|
|
if (parentNode != null) {
|
|
|
ledger.setStation(StringUtils.isNotEmpty(parentNode.getFullName()) ? parentNode.getFullName() : parentNode.getNodeName());
|
|
@@ -2484,7 +2522,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
selectList.addAll(allSelectedNodeList);
|
|
|
|
|
|
//所有相关节点集合
|
|
|
- List<WbsTreePrivate> selectedNodeList = new ArrayList<>();
|
|
|
+ List<WbsTreeContract> selectedNodeList = new ArrayList<>();
|
|
|
|
|
|
//检查新增类型
|
|
|
if ("1".equals(vo.getSaveType())) {
|
|
@@ -2492,12 +2530,12 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
//当前节点及其子节点时,半选说明其下的子节点并不是全部选中的,所以这时候只需要根据全选的查询其全部子节点即可
|
|
|
if (allSelectedNodeList.size() > 0) {
|
|
|
//查询数据
|
|
|
- selectedNodeList = this.unifiedCode(allSelectedNodeList, treeContract);
|
|
|
+ selectedNodeList = this.unifiedCode(allSelectedNodeList, treeContract, "1");
|
|
|
|
|
|
//检查当前操作的节点是否是填报节点,如果是则需要查询相关联表格
|
|
|
- List<WbsTreePrivate> submitNodeList = selectedNodeList.stream().filter(treePrivate -> Arrays.asList("1,2,3,4".split(",")).contains(treePrivate.getMajorDataType().toString())).distinct().collect(Collectors.toList());
|
|
|
+ List<WbsTreeContract> submitNodeList = selectedNodeList.stream().filter(treeContract1 -> Arrays.asList("1,2,3,4".split(",")).contains(treeContract1.getMajorDataType().toString())).distinct().collect(Collectors.toList());
|
|
|
|
|
|
- List<WbsTreePrivate> childList = new ArrayList<>();
|
|
|
+ List<WbsTreeContract> childList = new ArrayList<>();
|
|
|
if (submitNodeList.size() > 0) {
|
|
|
this.foreachQueryChild(submitNodeList, childList);
|
|
|
//将表格数据设置
|
|
@@ -2506,11 +2544,11 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
|
|
|
if (childList.size() > 0) {
|
|
|
//处理重复的数据
|
|
|
- Iterator<WbsTreePrivate> iterator = childList.iterator();
|
|
|
+ Iterator<WbsTreeContract> iterator = childList.iterator();
|
|
|
while (iterator.hasNext()) {
|
|
|
- WbsTreePrivate next = iterator.next();
|
|
|
- for (WbsTreePrivate treePrivate : selectedNodeList) {
|
|
|
- if (treePrivate.getPKeyId().equals(next.getPKeyId())) {
|
|
|
+ WbsTreeContract next = iterator.next();
|
|
|
+ for (WbsTreeContract wbsTreeContract : selectedNodeList) {
|
|
|
+ if (wbsTreeContract.getPKeyId().equals(next.getPKeyId())) {
|
|
|
//删掉重复数据
|
|
|
iterator.remove();
|
|
|
break;
|
|
@@ -2528,20 +2566,18 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
//todo 仅当前节点操作
|
|
|
if (allSelectedNodeList.size() > 0) {
|
|
|
//查询数据
|
|
|
- selectedNodeList = this.unifiedCode(allSelectedNodeList, treeContract);
|
|
|
+ selectedNodeList = this.unifiedCode(allSelectedNodeList, treeContract, "0");
|
|
|
|
|
|
//检查当前操作的节点是否是填报节点,如果是则需要查询相关联表格
|
|
|
- List<WbsTreePrivate> submitNodeList = selectedNodeList.stream().filter(treePrivate -> Arrays.asList("1,2,3,4".split(",")).contains(treePrivate.getMajorDataType().toString())).distinct().collect(Collectors.toList());
|
|
|
+ List<WbsTreeContract> submitNodeList = selectedNodeList.stream().filter(treePrivate -> Arrays.asList("1,2,3,4".split(",")).contains(treePrivate.getMajorDataType().toString())).distinct().collect(Collectors.toList());
|
|
|
|
|
|
- List<WbsTreePrivate> childList = new ArrayList<>();
|
|
|
+ List<WbsTreeContract> childList = new ArrayList<>();
|
|
|
if (submitNodeList.size() > 0) {
|
|
|
this.foreachQueryChild(submitNodeList, childList);
|
|
|
//将表格数据设置
|
|
|
selectedNodeList.addAll(childList);
|
|
|
}
|
|
|
}
|
|
|
- //处理半选
|
|
|
- this.disposeHalfSelectList(treeContract, halfSelectedNodeList, selectedNodeList);
|
|
|
}
|
|
|
|
|
|
//保存集合
|
|
@@ -2550,7 +2586,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
if (selectedNodeList.size() > 0) {
|
|
|
//重塑关键信息
|
|
|
Map<Long, Long> OldIdToNewIdMap = new HashMap<>();
|
|
|
- Map<String, WbsTreePrivate> nodeMap = new HashMap<>();
|
|
|
+ Map<String, WbsTreeContract> nodeMap = new HashMap<>();
|
|
|
selectedNodeList.forEach(half -> {
|
|
|
OldIdToNewIdMap.put(half.getId(), SnowFlakeUtil.getId());
|
|
|
nodeMap.put(half.getId().toString(), half);
|
|
@@ -2567,7 +2603,22 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
if (new Integer("1").equals(half.getType())) {
|
|
|
newData.setId(OldIdToNewIdMap.containsKey(half.getId()) ? OldIdToNewIdMap.get(half.getId()) : SnowFlakeUtil.getId());
|
|
|
}
|
|
|
- newData.setParentId(OldIdToNewIdMap.containsKey(half.getParentId()) ? OldIdToNewIdMap.get(half.getParentId()) : treeContract.getId().equals(half.getParentId()) || treeContract.getOldId().equals(half.getParentId().toString()) ? treeContract.getId() : SnowFlakeUtil.getId());
|
|
|
+
|
|
|
+ //设置父级id
|
|
|
+ if (("1").equals(vo.getSaveType())) {
|
|
|
+ //当前节点及其子节点操作
|
|
|
+ newData.setParentId(OldIdToNewIdMap.containsKey(half.getParentId()) ? OldIdToNewIdMap.get(half.getParentId()) : treeContract.getId().equals(half.getParentId()) || treeContract.getOldId().equals(half.getParentId().toString()) ? treeContract.getId() : SnowFlakeUtil.getId());
|
|
|
+ } else {
|
|
|
+ //仅当前节点新增操作时,父级id=选择新增的节点父级id
|
|
|
+ if (new Integer("1").equals(half.getType())) {
|
|
|
+ //节点
|
|
|
+ newData.setParentId(half.getParentId());
|
|
|
+ } else if (new Integer("2").equals(half.getType())) {
|
|
|
+ //表
|
|
|
+ newData.setParentId(OldIdToNewIdMap.containsKey(half.getParentId()) ? OldIdToNewIdMap.get(half.getParentId()) : treeContract.getId().equals(half.getParentId()) || treeContract.getOldId().equals(half.getParentId().toString()) ? treeContract.getId() : SnowFlakeUtil.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//记录旧ID
|
|
|
newData.setOldId(half.getId().toString());
|
|
|
//设置合同段等信息
|
|
@@ -2635,21 +2686,20 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
R<Boolean> booleanR = this.saveOrCopyNodeTree(saveList, saveLedger, 2, treeContract);
|
|
|
|
|
|
//更新redis
|
|
|
- List<WbsTreeContractTreeVOS> wbsTreeContractTreeVOS = this.informationQueryService.queryContractTree(treeContract.getId() + "", treeContract.getContractId(), "", "1");
|
|
|
-
|
|
|
informationQueryService.AsyncWbsTree(treeContract.getId() + "", treeContract.getId() + "", treeContract.getContractId(), "", "1");
|
|
|
+ informationQueryService.AsyncWbsTree(treeContract.getParentId() + "", treeContract.getParentId() + "", treeContract.getContractId(), "", "1");
|
|
|
return booleanR;
|
|
|
}
|
|
|
|
|
|
- private List<WbsTreePrivate> unifiedCode
|
|
|
- (List<AddContractTreeNodeVO.Node> allSelectedNodeList, WbsTreeContract treeContract) {
|
|
|
+ private List<WbsTreeContract> unifiedCode(List<AddContractTreeNodeVO.Node> allSelectedNodeList, WbsTreeContract treeContract, String saveType) {
|
|
|
//获取主键
|
|
|
- List<String> halfSelectedList = allSelectedNodeList.stream().map(AddContractTreeNodeVO.Node::getPrimaryKeyId).distinct().collect(Collectors.toList());
|
|
|
+ List<Long> halfSelectedList = allSelectedNodeList.stream().map(AddContractTreeNodeVO.Node::getPrimaryKeyId).map(Long::parseLong).distinct().collect(Collectors.toList());
|
|
|
//查询数据
|
|
|
- List<WbsTreePrivate> selectedNodeList = this.wbsTreePrivateClient.queryByPKeyIds(halfSelectedList);
|
|
|
- //剔除与当前操作节点相同的ID
|
|
|
- selectedNodeList.removeIf(wbsTreePrivate -> treeContract.getId().equals(wbsTreePrivate.getId()) || treeContract.getOldId().equals(wbsTreePrivate.getId().toString()));
|
|
|
-
|
|
|
+ List<WbsTreeContract> selectedNodeList = this.wbsTreeContractClient.queryContractTreeNodeByPKIds(halfSelectedList);
|
|
|
+ //剔除与当前操作节点相同的ID,(如果saveType=1,表示当前及子级节点,那么就要剔除自己本身,否则视为仅当前节点操作,会存在自己本身)
|
|
|
+ if (("1").equals(saveType)) {
|
|
|
+ selectedNodeList.removeIf(wbsTreePrivate -> treeContract.getId().equals(wbsTreePrivate.getId()) || treeContract.getOldId().equals(wbsTreePrivate.getId().toString()));
|
|
|
+ }
|
|
|
return selectedNodeList;
|
|
|
}
|
|
|
|
|
@@ -2710,13 +2760,12 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
/**
|
|
|
* 处理半选集合
|
|
|
*/
|
|
|
- private void disposeHalfSelectList(@RequestBody WbsTreeContract
|
|
|
- treeContract, List<AddContractTreeNodeVO.Node> allSelectedNodeList, List<WbsTreePrivate> selectedNodeList) {
|
|
|
+ private void disposeHalfSelectList(@RequestBody WbsTreeContract treeContract, List<AddContractTreeNodeVO.Node> allSelectedNodeList, List<WbsTreeContract> selectedNodeList) {
|
|
|
if (allSelectedNodeList != null && allSelectedNodeList.size() > 0) {
|
|
|
//获取主键
|
|
|
- List<String> allSelectedList = allSelectedNodeList.stream().map(AddContractTreeNodeVO.Node::getPrimaryKeyId).distinct().collect(Collectors.toList());
|
|
|
+ List<Long> allSelectedList = allSelectedNodeList.stream().map(AddContractTreeNodeVO.Node::getPrimaryKeyId).map(Long::parseLong).distinct().collect(Collectors.toList());
|
|
|
//查询对应数据
|
|
|
- List<WbsTreePrivate> allSelectedNodeLists = this.wbsTreePrivateClient.queryByPKeyIds(allSelectedList);
|
|
|
+ List<WbsTreeContract> allSelectedNodeLists = this.wbsTreeContractClient.queryContractTreeNodeByPKIds(allSelectedList);
|
|
|
//剔除与当前操作节点相同的ID
|
|
|
allSelectedNodeLists.removeIf(wbsTreePrivate -> treeContract.getId().equals(wbsTreePrivate.getId()) || treeContract.getOldId().equals(wbsTreePrivate.getId().toString()));
|
|
|
//设置到集合中
|
|
@@ -2730,9 +2779,9 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
* @param parentList 父节点集合
|
|
|
* @param childList 保存集合
|
|
|
*/
|
|
|
- private void foreachQueryChild(List<WbsTreePrivate> parentList, List<WbsTreePrivate> childList) {
|
|
|
+ private void foreachQueryChild(List<WbsTreeContract> parentList, List<WbsTreeContract> childList) {
|
|
|
parentList.forEach(parent -> {
|
|
|
- List<WbsTreePrivate> childs = this.wbsTreePrivateClient.queryChildByParentId(parent);
|
|
|
+ List<WbsTreeContract> childs = this.wbsTreeContractClient.queryChildByParentId(parent, "", "");
|
|
|
|
|
|
if (childs != null && childs.size() > 0) {
|
|
|
//添加入结果集
|