|
@@ -68,6 +68,7 @@
|
|
|
<result column="type" property="type"/>
|
|
|
<result column="partitionCode" property="partitionCode"/>
|
|
|
<result column="isConcealedWorksNode" property="isConcealedWorksNode"/>
|
|
|
+ <result column="submitCounts" property="submitCounts"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="intResultMap" type="java.lang.Integer"/>
|
|
@@ -100,13 +101,15 @@
|
|
|
(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,
|
|
|
- querys.nodeStatus AS colorStatus
|
|
|
+ querys.nodeStatus AS colorStatus,
|
|
|
+ querys.submitCounts AS submitCounts
|
|
|
FROM
|
|
|
m_wbs_tree_contract AS wtc
|
|
|
LEFT JOIN u_contract_tree_drawings AS ctd ON ctd.is_deleted = 0 and ctd.process_id = wtc.p_key_id
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
querys.pKeyId AS pKeyId,
|
|
|
+ querys.submitCounts AS submitCounts,
|
|
|
CASE
|
|
|
WHEN querys.nodeStatus LIKE CONCAT('%',1,'%') AND (querys.nodeStatus NOT LIKE CONCAT('%',2,'%') AND querys.nodeStatus NOT LIKE CONCAT('%',3,'%') AND querys.nodeStatus NOT LIKE CONCAT('%',4,'%')) THEN 1
|
|
|
WHEN querys.nodeStatus LIKE CONCAT('%',1,'%') AND (querys.nodeStatus LIKE CONCAT('%',2,'%') OR querys.nodeStatus LIKE CONCAT('%',3,'%') OR querys.nodeStatus LIKE CONCAT('%',4,'%')) THEN 2
|
|
@@ -117,6 +120,7 @@
|
|
|
(
|
|
|
SELECT
|
|
|
wtc.p_key_id AS pKeyId,
|
|
|
+ count(iq.id) AS submitCounts,
|
|
|
group_concat(
|
|
|
CASE
|
|
|
WHEN iq.status is null THEN 1
|
|
@@ -126,7 +130,14 @@
|
|
|
) AS nodeStatus
|
|
|
FROM
|
|
|
m_wbs_tree_contract AS wtc
|
|
|
- LEFT JOIN m_wbs_tree_contract AS wtc1 ON wtc1.ancestors like concat('%', wtc.id, '%') AND wtc1.is_deleted = 0 and wtc1.contract_id = wtc.contract_id AND wtc1.major_data_type IN(1,2,3,4)
|
|
|
+ <choose>
|
|
|
+ <when test="parentId == '0'">
|
|
|
+ LEFT JOIN m_wbs_tree_contract AS wtc1 ON wtc1.ancestors like concat('%', '0', '%') AND wtc1.is_deleted = 0 and wtc1.contract_id = wtc.contract_id AND wtc1.major_data_type IN(1,2,3,4)
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ LEFT JOIN m_wbs_tree_contract AS wtc1 ON wtc1.ancestors like concat('%', wtc.id, '%') AND 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
|
|
|
WHERE
|
|
|
wtc.contract_id IN
|
|
@@ -179,13 +190,15 @@
|
|
|
(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,
|
|
|
- querys.nodeStatus AS colorStatus
|
|
|
+ querys.nodeStatus AS colorStatus,
|
|
|
+ querys.submitCounts AS submitCounts
|
|
|
FROM
|
|
|
m_wbs_tree_contract AS wtc
|
|
|
LEFT JOIN u_contract_tree_drawings AS ctd ON ctd.is_deleted = 0 and ctd.process_id = wtc.p_key_id
|
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
|
querys.pKeyId AS pKeyId,
|
|
|
+ querys.submitCounts AS submitCounts,
|
|
|
CASE
|
|
|
WHEN querys.nodeStatus LIKE CONCAT('%',1,'%') AND (querys.nodeStatus NOT LIKE CONCAT('%',2,'%') AND querys.nodeStatus NOT LIKE CONCAT('%',3,'%') AND querys.nodeStatus NOT LIKE CONCAT('%',4,'%')) THEN 1
|
|
|
WHEN querys.nodeStatus LIKE CONCAT('%',1,'%') AND (querys.nodeStatus LIKE CONCAT('%',2,'%') OR querys.nodeStatus LIKE CONCAT('%',3,'%') OR querys.nodeStatus LIKE CONCAT('%',4,'%')) THEN 2
|
|
@@ -196,6 +209,7 @@
|
|
|
(
|
|
|
SELECT
|
|
|
wtc.p_key_id AS pKeyId,
|
|
|
+ count(iq.id) AS submitCounts,
|
|
|
group_concat(
|
|
|
CASE
|
|
|
WHEN iq.status is null THEN 1
|
|
@@ -206,7 +220,14 @@
|
|
|
) AS nodeStatus
|
|
|
FROM
|
|
|
m_wbs_tree_contract AS wtc
|
|
|
- LEFT JOIN m_wbs_tree_contract AS wtc1 ON wtc1.ancestors like concat('%', wtc.id, '%') AND wtc1.is_deleted = 0 and wtc1.contract_id = wtc.contract_id AND wtc1.major_data_type IN(1,2,3,4)
|
|
|
+ <choose>
|
|
|
+ <when test="parentId == '0' || parentId == 0 || parentId == '' || parentId == null">
|
|
|
+ LEFT JOIN m_wbs_tree_contract AS wtc1 ON wtc1.ancestors like concat('%', '0', '%') AND wtc1.is_deleted = 0 and wtc1.contract_id = wtc.contract_id AND wtc1.major_data_type IN(1,2,3,4)
|
|
|
+ </when>
|
|
|
+ <otherwise>
|
|
|
+ LEFT JOIN m_wbs_tree_contract AS wtc1 ON wtc1.ancestors like concat('%', wtc.id, '%') AND 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 iq.classify = #{classify} AND iq.type != 3
|
|
|
WHERE
|
|
|
wtc.contract_id = #{contractId}
|