项目合规评估 入库 操作

This commit is contained in:
yuezhihang
2022-02-21 16:43:29 +08:00
parent 697f5722eb
commit 41dbca2772
5 changed files with 42 additions and 15 deletions
@@ -5,26 +5,27 @@
<select id="selectPages"
resultType="com.adc.da.slrs.sarStandardComplianceAssessResult.entity.unCountDTO">
select PRODUCT_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.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,
(SELECT count(*) FROM sar_stand_unqualified WHERE sar_stand_unqualified.STAND_ID = #{product.standId}) 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 ) unCounts,
(SELECT count(*) FROM sar_standard_compliance_product_assess sspa WHERE sspa.STAND_ID=#{product.standId} ) allCounts
FROM
sar_stand_project_library
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
WHERE
sar_stand_project_library.project_number in ( SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
AND CLOSE_STATE = '1'
<if test="null != product.productName and ''!= product.productName">
and product_name like concat(concat('%',#{product.productName}),'%')
and sar_stand_project_library.project_name like concat(concat('%',#{product.productName}),'%')
</if>
<if test="null != product.productId and ''!= product.productId">
and project_number like concat(concat('%',#{product.productId}),'%')
and sar_stand_project_library.project_number like concat(concat('%',#{product.productId}),'%')
</if>
group by
PRODUCT_NAME,
sar_stand_project_library.project_name,
sar_stand_project_library.project_group,
sar_stand_project_library.product_line,
sar_stand_project_library.project_manager,
@@ -32,7 +33,7 @@
sar_stand_project_library.id,
ts_user.UNAME
ORDER BY
PRODUCT_NAME ASC
sar_stand_project_library.project_name ASC
limit ${(page-1)*pageSize},${pageSize}
</select>
@@ -45,15 +46,14 @@
LEFT JOIN ts_user ON ts_user.USID = sar_stand_project_library.project_manager
WHERE
sar_stand_project_library.project_number in (SELECT product_id FROM sar_standard_compliance_product_assess WHERE STAND_ID=#{product.standId})
AND CLOSE_STATE = '1'
<if test="null != product.productName and ''!= product.productName">
and product_name like concat(concat('%',#{product.productName}),'%')
and sar_stand_project_library.project_name like concat(concat('%',#{product.productName}),'%')
</if>
<if test="null != product.productId and ''!= product.productId">
and project_number like concat(concat('%',#{product.productId}),'%')
</if>
group by
PRODUCT_NAME,
sar_stand_project_library.project_name,
sar_stand_project_library.project_group,
sar_stand_project_library.product_line,
sar_stand_project_library.project_manager,
@@ -61,6 +61,6 @@
sar_stand_project_library.id,
ts_user.UNAME
ORDER BY
PRODUCT_NAME ASC
sar_stand_project_library.project_name ASC
</select>
</mapper>