|
@@ -264,12 +264,12 @@ public class ArchiveTreeContractSyncImpl {
|
|
|
if (contractIndfo.getContractType() == 2) {
|
|
|
List<ContractRelationJlyz> list = contractInfoService.searchContractRelationInfo(contractId.toString());
|
|
|
for (ContractRelationJlyz contractRelationJlyz: list) {
|
|
|
- syncBusinessData(projectId,contractRelationJlyz.getId(),2);
|
|
|
+ syncBusinessData(projectId,contractRelationJlyz.getId(),2,contractId);
|
|
|
}
|
|
|
|
|
|
}else {
|
|
|
//将项目未锁定案卷拆卷
|
|
|
- syncBusinessData(projectId,contractId,1);
|
|
|
+ syncBusinessData(projectId,contractId,1,contractId);
|
|
|
}
|
|
|
contractInfoService.updateIsArchivesAutoById(contractId, 0);
|
|
|
|
|
@@ -289,7 +289,7 @@ public class ArchiveTreeContractSyncImpl {
|
|
|
* @param projectId
|
|
|
* @param contractId
|
|
|
*/
|
|
|
- public void syncBusinessData(Long projectId,Long contractId,Integer classify) {
|
|
|
+ public void syncBusinessData(Long projectId,Long contractId,Integer classify,Long orgContractId) {
|
|
|
|
|
|
log.info("同步文件 projectId:"+projectId+"-contractId:"+contractId);
|
|
|
|
|
@@ -345,7 +345,7 @@ public class ArchiveTreeContractSyncImpl {
|
|
|
|
|
|
//同步质检关联节点
|
|
|
syncNodes(contractId, informationQueryList, wbsTreeContractVO6Map, wbsTreeKeyToSortMap,
|
|
|
- wbsTreeKeyToIdMap, archiveKeyIdMap, contractIndfo,classify);
|
|
|
+ wbsTreeKeyToIdMap, archiveKeyIdMap, contractIndfo,classify,orgContractId);
|
|
|
|
|
|
|
|
|
//wbs的keyId到 归档树的映射
|
|
@@ -432,9 +432,14 @@ public class ArchiveTreeContractSyncImpl {
|
|
|
private void syncNodes(Long contractId, List<InformationQuery> informationQueryList,
|
|
|
Map<Long, WbsTreeContractVO6> wbsTreeContractVO6Map, Map<Long, Integer> wbsTreeKeyToSortMap,
|
|
|
Map<Long, Long> wbsTreeKeyToIdMap, Map<Long, ArchiveFile> archiveKeyIdMap,
|
|
|
- ContractInfo contractIndfo,Integer classify) {
|
|
|
- // 获取关联节点
|
|
|
- List<ArchiveTreeContract> associatedNodes = getWbsAssociatedNodes(contractId.toString());
|
|
|
+ ContractInfo contractIndfo,Integer classify,Long orgContractId) {
|
|
|
+ // 获取关联节点的合同段id
|
|
|
+ Long associatedContractId = contractId;
|
|
|
+ if (classify == 2) {
|
|
|
+ associatedContractId = orgContractId;
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ArchiveTreeContract> associatedNodes = getWbsAssociatedNodes(associatedContractId.toString());
|
|
|
if (associatedNodes == null || associatedNodes.isEmpty()) {
|
|
|
return;
|
|
|
}
|
|
@@ -455,7 +460,7 @@ public class ArchiveTreeContractSyncImpl {
|
|
|
List<ArchiveTreeContract> archiveTreeContracts = getArchiveTreeContractsWbs(contractId, node.getId(),classify);
|
|
|
|
|
|
// 更新archiveTreeContractIdMap映射
|
|
|
- archiveTreeContractIdMap.clear();
|
|
|
+ archiveTreeContractIdMap.clear();
|
|
|
for (ArchiveTreeContract ar : archiveTreeContracts) {
|
|
|
archiveTreeContractIdMap.put(ar.getExtKeyId(), ar.getId());
|
|
|
}
|