|
@@ -632,10 +632,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();
|
|
@@ -653,16 +653,18 @@ 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<>();
|
|
|
- //查询质检合同节点填表信息
|
|
|
- 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,",") +")";
|
|
|
+ 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,",") +")";
|
|
|
|
|
|
- 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());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|