Kaynağa Gözat

Revert "同步-同步合同段-非空判断"

This reverts commit 165f4a7e0f165dd8b1db88c43ec87134e71d81c6.
LHB 3 hafta önce
ebeveyn
işleme
311aca3074

+ 12 - 14
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/WbsSynchronousServiceImpl.java

@@ -631,10 +631,10 @@ public class WbsSynchronousServiceImpl {
                         .eq(WbsTreeContract::getContractId, contractInfo.getId())
                         .eq(WbsTreeContract::getIsTypePrivatePid, primaryKeyId));
                 //如果没有查询到,表示该合同下不存在该节点
-//                if (CollectionUtil.isEmpty(startContacts)) {
-//                    //不能抛异常  不然就会中止程序  开发阶段先抛异常,后续统一处理
-//                    throw new ServiceException("当前节点不存在");
-//                }
+                if (CollectionUtil.isEmpty(startContacts)) {
+                    //不能抛异常  不然就会中止程序  开发阶段先抛异常,后续统一处理
+                    throw new ServiceException("当前节点不存在");
+                }
                 for (WbsTreeContract wbsTreeContract : startContacts) {
                     //获取合同 当前节点的所有子节点数据
                     LambdaQueryWrapper<WbsTreeContract> wrapperContract = Wrappers.lambdaQuery();
@@ -652,18 +652,16 @@ public class WbsSynchronousServiceImpl {
                     //获取所有表单的父节点
                     List<Long> pIds = wbsTreeContracts.stream().filter(f -> f.getType() == 2).map(WbsTreeContract::getPId).collect(Collectors.toList());
                     HashMap<Long, Integer> informationQueryMap = new HashMap<>();
-                    if(CollectionUtil.isNotEmpty(pIds)){
-                        //查询质检合同节点填表信息
-                        String sql = "SELECT  c.wbs_id, c.STATUS FROM u_information_query c" +
-                                " JOIN ( SELECT wbs_id, MAX( update_time ) AS max_update_time FROM u_information_query WHERE contract_id = " + contractInfo.getId() + " GROUP BY wbs_id ) subquery ON c.wbs_id = subquery.wbs_id " +
-                                " AND c.update_time = subquery.max_update_time WHERE  c.contract_id = " + contractInfo.getId() + " and c.is_deleted = 0  and c.wbs_id in(" + StringUtil.join(pIds,",") +")";
+                    //查询质检合同节点填表信息
+                    String sql = "SELECT  c.wbs_id, c.STATUS FROM u_information_query c" +
+                            " JOIN ( SELECT wbs_id, MAX( update_time ) AS max_update_time FROM u_information_query WHERE contract_id = " + contractInfo.getId() + " GROUP BY wbs_id ) subquery ON c.wbs_id = subquery.wbs_id " +
+                            " AND c.update_time = subquery.max_update_time WHERE  c.contract_id = " + contractInfo.getId() + " and c.is_deleted = 0  and c.wbs_id in(" + StringUtil.join(pIds,",") +")";
 
-                        List<InformationQuery> informationQueries = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(InformationQuery.class));
-                        //质检节点填报信息
+                    List<InformationQuery> informationQueries = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(InformationQuery.class));
+                    //质检节点填报信息
 
-                        for (InformationQuery informationQuery : informationQueries) {
-                            informationQueryMap.put(informationQuery.getWbsId(), informationQuery.getStatus());
-                        }
+                    for (InformationQuery informationQuery : informationQueries) {
+                        informationQueryMap.put(informationQuery.getWbsId(), informationQuery.getStatus());
                     }