bug 52667 修复
This commit is contained in:
+32
-7
@@ -8,14 +8,27 @@
|
|||||||
select sar_stand_project_library.project_name as productName,sar_stand_project_library.project_group as projectGroup,
|
select sar_stand_project_library.project_name as productName,sar_stand_project_library.project_group as projectGroup,
|
||||||
sar_stand_project_library.id as sarId,
|
sar_stand_project_library.id as sarId,
|
||||||
sar_stand_project_library.product_line as productLine,sar_stand_project_library.project_number as productId,
|
sar_stand_project_library.product_line as productLine,sar_stand_project_library.project_number as productId,
|
||||||
sar_stand_project_library.project_manager as projectManager,ts_user.UNAME as uName,
|
team.ids as projectManager,team.name as uName,
|
||||||
(SELECT count(*) FROM sar_stand_unqualified WHERE sar_stand_unqualified.STAND_ID = #{product.standId} AND CLOSE_STATE = '1' ) unCount,
|
(SELECT count(*) FROM sar_stand_unqualified WHERE sar_stand_unqualified.STAND_ID = #{product.standId} AND CLOSE_STATE = '1' ) unCount,
|
||||||
(SELECT count(*) FROM sar_standard_compliance_product_assess sspa WHERE sspa.STAND_ID=#{product.standId} and sspa.no_involve is not null and sspa.no_involve !='' ) unCounts,
|
(SELECT count(*) FROM sar_standard_compliance_product_assess sspa WHERE sspa.STAND_ID=#{product.standId} and sspa.no_involve is not null and sspa.no_involve !='' ) unCounts,
|
||||||
(SELECT count(*) FROM sar_standard_compliance_product_assess sspa WHERE sspa.STAND_ID=#{product.standId} ) allCounts
|
(SELECT count(*) FROM sar_standard_compliance_product_assess sspa WHERE sspa.STAND_ID=#{product.standId} ) allCounts
|
||||||
FROM
|
FROM
|
||||||
sar_stand_project_library
|
sar_stand_project_library
|
||||||
LEFT JOIN sar_stand_unqualified ON sar_stand_unqualified.product_id = sar_stand_project_library.project_number
|
LEFT JOIN sar_stand_unqualified ON sar_stand_unqualified.product_id = sar_stand_project_library.project_number
|
||||||
LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager
|
<!--LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager-->
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(sar_stand_project_team.name) as name ,GROUP_CONCAT(sar_stand_project_team.user_id) as ids ,sar_stand_project_team.project_code
|
||||||
|
FROM
|
||||||
|
sar_stand_project_team
|
||||||
|
LEFT JOIN sar_stand_project_team AS a ON a.project_code = sar_stand_project_team.project_code
|
||||||
|
AND a.id != sar_stand_project_team.id
|
||||||
|
group by
|
||||||
|
sar_stand_project_team.project_code
|
||||||
|
)
|
||||||
|
as team
|
||||||
|
ON team.project_code = sar_stand_project_library.project_number
|
||||||
|
|
||||||
WHERE
|
WHERE
|
||||||
sar_stand_project_library.project_number in ( SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
|
sar_stand_project_library.project_number in ( SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
|
||||||
<if test="null != product.productName and ''!= product.productName">
|
<if test="null != product.productName and ''!= product.productName">
|
||||||
@@ -28,10 +41,10 @@
|
|||||||
sar_stand_project_library.project_name,
|
sar_stand_project_library.project_name,
|
||||||
sar_stand_project_library.project_group,
|
sar_stand_project_library.project_group,
|
||||||
sar_stand_project_library.product_line,
|
sar_stand_project_library.product_line,
|
||||||
sar_stand_project_library.project_manager,
|
team.ids,
|
||||||
sar_stand_project_library.project_number,
|
sar_stand_project_library.project_number,
|
||||||
sar_stand_project_library.id,
|
sar_stand_project_library.id,
|
||||||
ts_user.UNAME
|
team.name
|
||||||
ORDER BY
|
ORDER BY
|
||||||
sar_stand_project_library.project_name ASC
|
sar_stand_project_library.project_name ASC
|
||||||
limit ${(page-1)*pageSize},${pageSize}
|
limit ${(page-1)*pageSize},${pageSize}
|
||||||
@@ -43,7 +56,19 @@
|
|||||||
FROM
|
FROM
|
||||||
sar_stand_project_library
|
sar_stand_project_library
|
||||||
LEFT JOIN sar_stand_unqualified ON sar_stand_unqualified.product_id = sar_stand_project_library.project_number
|
LEFT JOIN sar_stand_unqualified ON sar_stand_unqualified.product_id = sar_stand_project_library.project_number
|
||||||
LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager
|
<!--LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager-->
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(sar_stand_project_team.name) as name ,GROUP_CONCAT(sar_stand_project_team.user_id) as ids ,sar_stand_project_team.project_code
|
||||||
|
FROM
|
||||||
|
sar_stand_project_team
|
||||||
|
LEFT JOIN sar_stand_project_team AS a ON a.project_code = sar_stand_project_team.project_code
|
||||||
|
AND a.id != sar_stand_project_team.id
|
||||||
|
group by
|
||||||
|
sar_stand_project_team.project_code
|
||||||
|
)
|
||||||
|
as team
|
||||||
|
ON team.project_code = sar_stand_project_library.project_number
|
||||||
WHERE
|
WHERE
|
||||||
sar_stand_project_library.project_number in (SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
|
sar_stand_project_library.project_number in (SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
|
||||||
<if test="null != product.productName and ''!= product.productName">
|
<if test="null != product.productName and ''!= product.productName">
|
||||||
@@ -56,10 +81,10 @@
|
|||||||
sar_stand_project_library.project_name,
|
sar_stand_project_library.project_name,
|
||||||
sar_stand_project_library.project_group,
|
sar_stand_project_library.project_group,
|
||||||
sar_stand_project_library.product_line,
|
sar_stand_project_library.product_line,
|
||||||
sar_stand_project_library.project_manager,
|
team.ids,
|
||||||
sar_stand_project_library.project_number,
|
sar_stand_project_library.project_number,
|
||||||
sar_stand_project_library.id,
|
sar_stand_project_library.id,
|
||||||
ts_user.UNAME
|
team.name
|
||||||
ORDER BY
|
ORDER BY
|
||||||
sar_stand_project_library.project_name ASC
|
sar_stand_project_library.project_name ASC
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user