Selaa lähdekoodia

Merge branch 'dev' of http://219.151.181.73:3000/zhuwei/bladex into dev

laibulaizheli 2 viikkoa sitten
vanhempi
commit
0b0734cbb2

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

@@ -198,8 +198,8 @@
         CASE (select count(tcf.id) from u_tree_contract_first AS tcf where tcf.is_deleted = 0 and tcf.wbs_node_id =
         wtc.p_key_id) WHEN 0 THEN 'false' ELSE 'true'
         END AS isFirst,
-        ( SELECT count(1) from m_wbs_tree_contract where id in(SELECT parent_id from m_wbs_tree_contract a where
-        a.is_deleted=0 and a.type=2 and table_owner in(1,2,3)) and contract_id=wtc.contract_id and type =1 and
+        ( SELECT count(1) from m_wbs_tree_contract where id in(SELECT DISTINCT parent_id from m_wbs_tree_contract a where
+        a.is_deleted=0 and a.type=2 and a.contract_id = #{contractId} and table_owner in(1,2,3)) and contract_id=wtc.contract_id and type =1 and
         is_deleted=0 and (FIND_IN_SET(wtc.id,ancestors) or wtc.p_key_id=p_key_id)
         ) as allCount,
         (SELECT count(1) from u_information_query b where b.wbs_id in(SELECT p_key_id from m_wbs_tree_contract a