|
@@ -225,6 +225,18 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
//获取被复制节点的表格
|
|
|
List<WbsTreeContract> tableList = this.wbsTreeContractClient.queryChildByParentId(this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(copyVO.getNeedCopyPrimaryKeyId()), "queryTable", "");
|
|
|
if(tableList != null && tableList.size() > 0){
|
|
|
+ //获取合同段信息
|
|
|
+ ContractInfo contract = this.contractClient.getContractById(Long.parseLong(tableList.get(0).getContractId()));
|
|
|
+ if(new Integer("1").equals(contract.getIsCopyData())){
|
|
|
+ //说明开启数据复制限制,根据合同段类型判断哪些数据是能够被复制的
|
|
|
+ String removeString = new Integer("1").equals(contract.getContractType()) ? "1,2,3" : "5,6,7";
|
|
|
+ //删除掉不符合条件的数据
|
|
|
+ tableList.removeIf(table -> Arrays.asList(removeString.split(",")).contains(table.getTableType().toString()));
|
|
|
+ }
|
|
|
+ if(tableList.size() <= 0){
|
|
|
+ return R.data(300, false, "当前合同段已开启数据隔离,当前节点下未找到符合复制条件的数据");
|
|
|
+ }
|
|
|
+
|
|
|
//获取表格的业务数据
|
|
|
Map<String, List<List<Map<String, Object>>>> tableBusinessDataMap = new HashMap<>();
|
|
|
for(WbsTreeContract treeContract : tableList){
|
|
@@ -454,7 +466,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
List<String> urls = new ArrayList<>();
|
|
|
result.forEach(query -> urls.add(StringUtils.isNotEmpty(query.getEVisaPdfUrl()) ? query.getEVisaPdfUrl() : query.getPdfUrl()));
|
|
|
//删除空数据
|
|
|
- urls.removeIf(StringUtils::isNotEmpty);
|
|
|
+ urls.removeIf(StringUtils::isEmpty);
|
|
|
//打包下载
|
|
|
FileUtils.batchDownloadFileToZip(urls, response);
|
|
|
}
|
|
@@ -1365,7 +1377,7 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
WbsTreeContract node = this.wbsTreeContractClient.getContractWbsTreeByPrimaryKeyId(vo.getWbsId());
|
|
|
if(!new Integer("6").equals(node.getDeptCategory()) && !Arrays.asList("1,2,3,4".split(",")).contains(node.getMajorDataType().toString())){
|
|
|
//不是工序,则查询当前节点下的所有填报节点
|
|
|
- List<QueryProcessDataVO> queryDataResult = this.informationQueryService.queryProcessDataByParentIdAndContractId(node.getId().toString(), contract.getContractType(), vo.getContractId().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()));
|
|
@@ -1376,6 +1388,9 @@ public class InformationWriteQueryController extends BladeController {
|
|
|
}
|
|
|
//设置进集合中
|
|
|
vo.setWbsIds(submitNodeKeyIds);
|
|
|
+ if(StringUtils.isNotEmpty(vo.getContractIdRelation())){
|
|
|
+ vo.setContractId(Long.valueOf(vo.getContractIdRelation()));
|
|
|
+ }
|
|
|
|
|
|
return R.data(this.informationQueryService.selectInformationQueryPage(Condition.getPage(query), vo));
|
|
|
}
|