|
@@ -55,12 +55,12 @@
|
|
|
from s_meter_tree_contract mtc1 where project_id = #{projectId} and contract_id = #{contractId} and is_deleted = 0
|
|
|
</select>
|
|
|
<select id="getWBSTree" resultType="org.springblade.meter.vo.MeterFullTreeVO">
|
|
|
- select p_key_id,id,node_name as nodeName,parent_id,
|
|
|
+ select p_key_id,id, if(full_name is null,node_name,full_name) as node_name,parent_id,
|
|
|
if((select count(1) from m_wbs_tree_contract mtc2 where mtc2.project_id = #{projectId}
|
|
|
and mtc2.contract_id = #{contractId} and mtc2.type = 1 and is_deleted = 0 and mtc2.parent_id = mtc1.id) = 0,'false','true') as hasChild
|
|
|
from m_wbs_tree_contract mtc1 where project_id = #{projectId} and contract_id = #{contractId} and mtc1.type = 1 and node_type != 111 and is_deleted = 0
|
|
|
group by id
|
|
|
- order by sort asc
|
|
|
+ order by mtc1.sort,mtc1.full_name,mtc1.create_time
|
|
|
</select>
|
|
|
<select id="getContractName" resultType="java.lang.String">
|
|
|
select contract_name from m_contract_info where id = #{contractId}
|
|
@@ -76,7 +76,8 @@
|
|
|
group by meter_tree_id
|
|
|
</select>
|
|
|
<select id="getAllWbsNode" resultType="org.springblade.meter.vo.NodePartVO">
|
|
|
- select p_key_id,id,parent_id,node_type,node_name
|
|
|
+ select p_key_id,id,parent_id,node_type,
|
|
|
+ if(full_name is null,node_name,full_name) as node_name
|
|
|
from m_wbs_tree_contract where project_id = #{projectId} and contract_id = #{contractId} and type = 1 and is_deleted = 0
|
|
|
group by id
|
|
|
</select>
|