From 5d2d6fdff67f8f9a7e65abdbb4b87dba07dcb32b Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期二, 02 九月 2025 10:23:02 +0800
Subject: [PATCH] 上传修改

---
 ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml |  151 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 149 insertions(+), 2 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml
index a6ec0a5..eca8971 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TResultWorkEvaluateMapper.xml
@@ -40,13 +40,13 @@
             <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
                 AND t1.create_time BETWEEN #{query.startTime} AND #{query.endTime}
             </if>
-            <if test="query.status != null and query.status != -1">
+            <if test="query.status != null">
                 AND t1.status = #{query.status}
             </if>
             <if test="query.status == null">
                 AND t1.status != -1
             </if>
-            <if test="query.teamIds != null and query.teamIds > 0">
+            <if test="query.teamIds != null and query.teamIds.size() > 0">
                 AND t1.team_id in
                 <foreach collection="query.teamIds" item="id" open="(" separator="," close=")">
                     #{id}
@@ -56,5 +56,152 @@
         </where>
         group by t1.team_id
     </select>
+    <select id="chemistEvaluateList" resultType="com.ruoyi.system.vo.TResultWorkEvaluateVO">
+        select trwe.id, trwe.dispatch_id, trwe.user_id, trwe.result_report_id,trwe.evaluate_type, trwe.evaluate_one,
+               trwe.evaluate_two, trwe.evaluate_three, trwe.evaluate_four, trwe.evaluate_five, trwe.evaluate_six,
+               trwe.status, trwe.evaluate_person_id, trwe.evaluate_time,trwe.result_evaluate_json,trwe.team_id, trwe.create_time,
+               trwe.update_time, trwe.create_by, trwe.update_by, trwe.disabled, tpp.project_name as projectName,
+               ted.experiment_code as experimentCode,ted.experiment_name as experimentName
+        from t_result_work_evaluate trwe
+        left join t_experiment_dispatch ted on trwe.dispatch_id = ted.id
+        left join t_project_proposal tpp on ted.proposal_id = tpp.id
+        <where>
+            <if test="query.teamName != null and query.teamName != ''">
+                and tpp.team_name like concat('%',#{query.teamName},'%')
+            </if>
+            <if test="query.projectName != null and query.projectName != ''">
+                and tpp.project_name like concat('%',#{query.projectName},'%')
+            </if>
+            <if test="query.experimentCode != null and query.experimentCode != ''">
+                and ted.experiment_code like concat('%',#{query.experimentCode},'%')
+            </if>
+            <if test="query.experimentName != null and query.experimentName != ''">
+                and ted.experiment_name like concat('%',#{query.experimentName},'%')
+            </if>
+            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+                AND trwe.evaluate_time BETWEEN #{query.startTime} AND #{query.endTime}
+            </if>
+            <if test="query.status != null">
+                AND trwe.status = #{query.status}
+            </if>
+            <if test="query.teamIds != null and query.teamIds.size() > 0">
+                AND trwe.team_id in
+                <foreach collection="query.teamIds" item="id" open="(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
+            AND trwe.evaluate_type = 2
+            AND trwe.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        </where>
+        ORDER BY trwe.evaluate_time DESC
+    </select>
+    <select id="testerEvaluateList" resultType="com.ruoyi.system.vo.TResultWorkEvaluateVO">
+        select trwe.id, trwe.dispatch_id, trwe.user_id, trwe.result_report_id,trwe.evaluate_type, trwe.evaluate_one,
+               trwe.evaluate_two, trwe.evaluate_three, trwe.evaluate_four, trwe.evaluate_five, trwe.evaluate_six,
+               trwe.status, trwe.evaluate_person_id, trwe.evaluate_time,trwe.result_evaluate_json,trwe.team_id, trwe.create_time,
+               trwe.update_time, trwe.create_by, trwe.update_by, trwe.disabled, tpp.project_name as projectName,
+               ted.experiment_code as experimentCode,ted.experiment_name as experimentName
+        from t_result_work_evaluate trwe
+        left join t_experiment_dispatch ted on trwe.dispatch_id = ted.id
+        left join t_project_proposal tpp on ted.proposal_id = tpp.id
+        <where>
+            <if test="query.teamName != null and query.teamName != ''">
+                and tpp.team_name like concat('%',#{query.teamName},'%')
+            </if>
+            <if test="query.experimentCode != null and query.experimentCode != ''">
+                and ted.experiment_code like concat('%',#{query.experimentCode},'%')
+            </if>
+            <if test="query.experimentName != null and query.experimentName != ''">
+                and ted.experiment_name like concat('%',#{query.experimentName},'%')
+            </if>
+            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+                AND trwe.evaluate_time BETWEEN #{query.startTime} AND #{query.endTime}
+            </if>
+            <if test="query.status != null">
+                AND trwe.status = #{query.status}
+            </if>
+            <if test="query.teamIds != null and query.teamIds.size() > 0">
+                AND trwe.team_id in
+                <foreach collection="query.teamIds" item="id" open="(" separator="," close=")">
+                    #{id}
+                </foreach>
+            </if>
+            AND trwe.evaluate_type = 3
+            AND trwe.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        </where>
+        ORDER BY trwe.evaluate_time DESC
+    </select>
+    <select id="getEvaluateChemistPageList" resultType="com.ruoyi.system.vo.ResultEvaluateChemistTesterVO">
+        select trwe.evaluate_time,CASE WHEN trwe.id IS NOT NULL THEN 1 ELSE 0 END AS isEvaluate,trwe.id,
+        tedp.id AS participantsId,tpp.project_name AS projectName,tpp.project_stage AS projectStage,
+        ted.experiment_code AS experimentCode,ted.experiment_name AS experimentName,su.nick_name AS laboratoryChemistName,
+        tedp.dispatch_id AS dispatchId,trwe.result_evaluate_json AS resultEvaluateJson
+        from t_experiment_dispatch_participants tedp
+        left join t_experiment_dispatch ted on ted.id = tedp.dispatch_id
+        left join t_result_work_evaluate trwe on ted.id = trwe.dispatch_id and trwe.evaluate_type = 2
+        left join t_project_proposal tpp on ted.proposal_id = tpp.id
+        left join sys_user su on tedp.user_id = su.user_id
+        <where>
+            <if test="query.experimentCode != null and query.experimentCode != ''">
+                and ted.experiment_code like concat('%',#{query.experimentCode},'%')
+            </if>
+            <if test="query.experimentName != null and query.experimentName != ''">
+                and ted.experiment_name like concat('%',#{query.experimentName},'%')
+            </if>
+            <if test="query.projectName != null and query.projectName != ''">
+                and tpp.project_name like concat('%',#{query.projectName},'%')
+            </if>
+            <if test="query.userId != null">
+                and tedp.user_id = #{query.userId}
+            </if>
+            <if test="query.userId != null">
+                and trwe.user_id = #{query.userId}
+            </if>
+            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+                AND trwe.evaluate_time BETWEEN #{query.startTime} AND #{query.endTime}
+            </if>
+            <if test="query.projectStage != null">
+                AND tpp.project_stage = #{query.projectStage}
+            </if>
+            AND ted.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        </where>
+        ORDER BY trwe.evaluate_time DESC
+    </select>
+    <select id="getEvaluateTesterPageList" resultType="com.ruoyi.system.vo.ResultEvaluateChemistTesterVO">
+        select trwe.evaluate_time,CASE WHEN trwe.id IS NOT NULL THEN 1 ELSE 0 END AS isEvaluate,trwe.id,
+        tedp.id AS participantsId,tpp.project_name AS projectName,tpp.project_stage AS projectStage,
+        ted.experiment_code AS experimentCode,ted.experiment_name AS experimentName,su.nick_name AS laboratoryTesterName,
+        tedp.dispatch_id AS dispatchId,trwe.result_evaluate_json AS resultEvaluateJson
+        from t_experiment_dispatch_participants tedp
+        left join t_experiment_dispatch ted on ted.id = tedp.dispatch_id
+        left join t_result_work_evaluate trwe on ted.id = trwe.dispatch_id and trwe.evaluate_type = 3
+        left join t_project_proposal tpp on ted.proposal_id = tpp.id
+        left join sys_user su on tedp.user_id = su.user_id
+        <where>
+            <if test="query.experimentCode != null and query.experimentCode != ''">
+                and ted.experiment_code like concat('%',#{query.experimentCode},'%')
+            </if>
+            <if test="query.experimentName != null and query.experimentName != ''">
+                and ted.experiment_name like concat('%',#{query.experimentName},'%')
+            </if>
+            <if test="query.projectName != null and query.projectName != ''">
+                and tpp.project_name like concat('%',#{query.projectName},'%')
+            </if>
+            <if test="query.userId != null">
+                and tedp.user_id = #{query.userId}
+            </if>
+            <if test="query.userId != null">
+                and trwe.user_id = #{query.userId}
+            </if>
+            <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
+                AND trwe.evaluate_time BETWEEN #{query.startTime} AND #{query.endTime}
+            </if>
+            <if test="query.projectStage != null">
+                AND tpp.project_stage = #{query.projectStage}
+            </if>
+            AND ted.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
+        </where>
+        ORDER BY trwe.evaluate_time DESC
+    </select>
 
 </mapper>

--
Gitblit v1.7.1