|
@@ -1603,7 +1603,7 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
|
|
|
return R.fail(200, "合同段不存在");
|
|
|
}
|
|
|
Set<String> syncPKeyIds = getSyncFlagIds(contractId, tableOwner);
|
|
|
- List<ContractCollectFolder> contractCollectNodes = jdbcTemplate.query("select node_id from m_contract_collect_folder where type = 1 and parent_id = " + folderId + " and node_parent_id = " + pKeyId, new BeanPropertyRowMapper<>(ContractCollectFolder.class));
|
|
|
+ List<ContractCollectFolder> contractCollectNodes = jdbcTemplate.query("select node_id, node_ancestors from m_contract_collect_folder where type = 1 and parent_id = " + folderId, new BeanPropertyRowMapper<>(ContractCollectFolder.class));
|
|
|
if (!contractCollectNodes.isEmpty()) {
|
|
|
Set<Long> pKeyIds = new LinkedHashSet<>();
|
|
|
Map<Long, String> collectMap = new HashMap<>();
|
|
@@ -1611,16 +1611,24 @@ public class ContractInfoServiceImpl extends BaseServiceImpl<ContractInfoMapper,
|
|
|
String ancestors = node.getNodeAncestors();
|
|
|
if (ancestors != null) {
|
|
|
String[] split = ancestors.split(",");
|
|
|
- for (String s : split) {
|
|
|
+ for (int i = 0; i < split.length; i++) {
|
|
|
+ String s = split[i];
|
|
|
if (StringUtil.isNumeric(s)) {
|
|
|
- pKeyIds.add(Long.parseLong(s));
|
|
|
+// pKeyIds.add(Long.parseLong(s));
|
|
|
+ if (s.equals(pKeyId + "") && i + 1 < split.length) {
|
|
|
+ pKeyIds.add(Long.parseLong(split[i + 1]));
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
collectMap.put(node.getNodeId(), "");
|
|
|
- pKeyIds.add(node.getNodeId());
|
|
|
+// pKeyIds.add(node.getNodeId());
|
|
|
+ }
|
|
|
+ List<WbsTreeContract> wbsTreeContractList = new ArrayList<>();
|
|
|
+ if (!pKeyIds.isEmpty()) {
|
|
|
+ wbsTreeContractList = wbsTreeContractMapper.selectList(Wrappers.<WbsTreeContract>lambdaQuery().in(WbsTreeContract::getPKeyId, pKeyIds).eq(WbsTreeContract::getPId, pKeyId));
|
|
|
}
|
|
|
- List<WbsTreeContract> wbsTreeContractList = wbsTreeContractMapper.selectList(Wrappers.<WbsTreeContract>lambdaQuery().in(WbsTreeContract::getPKeyId, pKeyIds).eq(WbsTreeContract::getPId, pKeyId));
|
|
|
if (!wbsTreeContractList.isEmpty()) {
|
|
|
String pKeyIdStr = wbsTreeContractList.stream().map(item -> item.getPKeyId() + "").collect(Collectors.joining(","));
|
|
|
List<WbsTreeContractStatistics> wbsTreeContractStatisticsList = jdbcTemplate.query("select id, leaf_num, fill_num, approve_num, complete_num,jl_fill_num, jl_approve_num, jl_complete_num from m_wbs_tree_contract_statistics where id in (" + pKeyIdStr + ")",
|