Преглед изворни кода

Revert "质检多份节点复制时检查目标节点下有没有上报的数据"

This reverts commit 6d761c41612d6df533de9788ed5396f6d71a234f.
lvy пре 1 месец
родитељ
комит
866137ae31

+ 0 - 22
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -2286,28 +2286,6 @@ public R<Boolean> copyContractTreeNode(@RequestBody CopyContractTreeNodeVO vo) {
                 if (StringUtils.isEmpty(contractId)) {
                     contractId = toCopyNode.getContractId();
                 }
-                if (vo.getIsCopyData() == 1) {
-                    // 查询当前节点有没有数据,有数据则不能复制
-                    if(vo.getClassifyType() != null && !vo.getClassifyType().isEmpty()) {
-                        List<InformationQuery> queries = informationQueryService.list(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getContractId, contractId)
-                                .in(InformationQuery::getClassify, vo.getClassifyType()).eq(InformationQuery::getWbsId, toCopyNode.getPKeyId()).in(InformationQuery::getStatus, 1, 2));
-                        if (!queries.isEmpty()) {
-                            Map<Integer, List<InformationQuery>> map = queries.stream().collect(Collectors.groupingBy(InformationQuery::getClassify));
-                            if (vo.getClassifyType().contains("1")) {
-                                List<InformationQuery> queryList = map.get(1);
-                                if (queryList != null && !queryList.isEmpty()) {
-                                    throw new ServiceException(toCopyNode.getFullName() + "节点有施工上报数据,不允许复制");
-                                }
-                            }
-                            if (vo.getClassifyType().contains("2")) {
-                                List<InformationQuery> queryList = map.get(2);
-                                if (queryList != null && !queryList.isEmpty()) {
-                                    throw new ServiceException(toCopyNode.getFullName() + "节点有监理上报数据,不允许复制");
-                                }
-                            }
-                        }
-                    }
-                }
             }
 
             WbsTreeContract needCopyNodeRoot = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(vo.getNeedCopyPrimaryKeyId());