|
@@ -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 =
|
|
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'
|
|
wtc.p_key_id) WHEN 0 THEN 'false' ELSE 'true'
|
|
END AS isFirst,
|
|
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
|
|
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)
|
|
is_deleted=0 and (FIND_IN_SET(wtc.id,ancestors) or wtc.p_key_id=p_key_id)
|
|
) as allCount,
|
|
) as allCount,
|