浏览代码

资料填报导图bug

liuyc 2 年之前
父节点
当前提交
97acd9b85a

+ 5 - 2
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml

@@ -305,8 +305,11 @@
                 wtc1.is_deleted = 0 and wtc1.contract_id = wtc.contract_id AND wtc1.major_data_type IN(1,2,3,4)
             </otherwise>
         </choose>
-        LEFT JOIN u_information_query AS iq ON (iq.wbs_id = wtc1.p_key_id OR iq.wbs_id = wtc.p_key_id) AND classify =
-        #{classify} AND iq.type != 3
+        LEFT JOIN u_information_query AS iq ON (iq.wbs_id = wtc1.p_key_id OR iq.wbs_id = wtc.p_key_id)
+        <if test=" classify != null and classify!='' ">
+            AND classify = #{classify}
+        </if>
+        AND iq.type != 3
         WHERE
         wtc.contract_id IN
         <foreach collection="contractIds" item="contractId" open="(" separator="," close=")">

+ 6 - 5
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/InformationQueryServiceImpl.java

@@ -149,6 +149,7 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
         }
         return result;
     }
+
     //删除节点用
     @Override
     public List<QueryProcessDataVO> queryProcessDataByParentIdAndContractId2(String parentId, Integer classify, String contractId) {
@@ -812,14 +813,14 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
             if (contractIds.size() > 0) {
                 if (StringUtils.isNotEmpty(parentId)) {
                     //子节点
-                    rootTreeNode = this.queryContractTreeSupervision(contractIds, parentId, Integer.parseInt(classifyType));
+                    rootTreeNode = this.queryContractTreeSupervision(contractIds, parentId, classifyType != null && ObjectUtil.isNotEmpty(classifyType) ? Integer.parseInt(classifyType) : null);
                 } else {
                     //根节点
-                    rootTreeNode = this.queryContractTreeSupervision(contractIds, "0", Integer.parseInt(classifyType));
+                    rootTreeNode = this.queryContractTreeSupervision(contractIds, "0", classifyType != null && ObjectUtil.isNotEmpty(classifyType) ? Integer.parseInt(classifyType) : null);
 
                     //设置根节点数量统计
                     for (WbsTreeContractTreeVOS root : rootTreeNode) {
-                        List<WbsTreeContractTreeVOS> rootZi = this.queryContractTreeSupervision(Func.toStrList(root.getContractIdRelation()), root.getId().toString(), Integer.parseInt(classifyType));
+                        List<WbsTreeContractTreeVOS> rootZi = this.queryContractTreeSupervision(Func.toStrList(root.getContractIdRelation()), root.getId().toString(), classifyType != null && ObjectUtil.isNotEmpty(classifyType) ? Integer.parseInt(classifyType) : null);
                         List<Long> collect = rootZi.stream().map(WbsTreeContractTreeVOS::getSubmitCounts).collect(Collectors.toList());
                         Long reduce = collect.stream().reduce(0L, Long::sum);
                         root.setSubmitCounts(reduce);
@@ -885,8 +886,8 @@ public class InformationQueryServiceImpl extends BaseServiceImpl<InformationQuer
     }
 
     @Override
-    public List<QueryProcessDataVO> getNodeChildTabColsWithValueByTabName(String initTabName,String pKeyId) {
-        return baseMapper.getNodeChildTabColsWithValueByTabName(initTabName,pKeyId);
+    public List<QueryProcessDataVO> getNodeChildTabColsWithValueByTabName(String initTabName, String pKeyId) {
+        return baseMapper.getNodeChildTabColsWithValueByTabName(initTabName, pKeyId);
     }
 
     @Override