From 8485affcb0d4de05059d80cb1e844d6b18291654 Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期五, 16 五月 2025 14:35:49 +0800 Subject: [PATCH] 修正 --- src/main/resources/mapper/RiskPlanDataMapper.xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/src/main/resources/mapper/RiskPlanDataMapper.xml b/src/main/resources/mapper/RiskPlanDataMapper.xml index c26ef96..b0aa752 100644 --- a/src/main/resources/mapper/RiskPlanDataMapper.xml +++ b/src/main/resources/mapper/RiskPlanDataMapper.xml @@ -8,4 +8,47 @@ select id,identification_user identificationUser,identification_user_id identificationUserId from risk_assess_plan_identification_user </select> + + <select id="getPageCount" resultType="Long" parameterType="com.gkhy.labRiskManage.domain.riskReport.model.bo.AssessQueryBO"> + select count(a.id) from ( + SELECT DISTINCT p.id as id FROM risk_assess_plan p + <if test="userTag != null and userTag == 0"> + <if test="userId != null and tag != null and tag == 1"> + INNER JOIN risk_assess_plan_identification_user q ON p.id = q.risk_assess_plan_id AND q.delete_status = 0 + AND q.identification_user_id = #{userId} + </if> + <if test="userId != null and tag != null and tag == 2"> + INNER JOIN risk_assess_plan_evaluate_user h ON p.id = h.risk_assess_plan_id AND h.delete_status = 0 AND + h.evaluate_user_id = #{userId} + </if> + </if> + WHERE p.delete_status = 0 + <if test="experimentId != null"> + AND p.experiment_id = #{experimentId} + </if> + <if test="assessPlanName != null and assessPlanName != ''"> + AND p.assess_plan_name LIKE CONCAT('%',#{assessPlanName},'%') + </if> + <if test="tag != null and tag == 2"> + AND p.identification_time IS NOT NULL + </if> + <if test="tag != null and tag == 3"> + AND p.evaluate_time IS NOT NULL + </if> + <if test="planExecStatus != null and planExecStatus == 5"> + AND p.plan_exec_status >= 3 + </if> + <if test="planExecStatus != null and planExecStatus != 5"> + AND p.plan_exec_status = #{planExecStatus} + </if> + <if test="planIds != null and !planIds.isEmpty()"> + AND p.id IN + <foreach collection="planIds" open="(" separator="," close=")"> + #{id} + </foreach> + </if> + GROUP BY p.id + ) a + </select> + </mapper> \ No newline at end of file -- Gitblit v1.9.2