Kaynağa Gözat

质检-资料填报-保存数据
1、刷新缓存的子查询去重

LHB 2 hafta önce
ebeveyn
işleme
edc2a8fa08

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

@@ -198,7 +198,7 @@
         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
+        ( 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,