From 4f3a98f19143865cdc1de4791e8a95d96bd40c65 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期五, 01 八月 2025 13:27:59 +0800
Subject: [PATCH] yys 密码已重置

---
 cnas-process/src/main/resources/mapper/QualitySuperviseDetailsMapper.xml |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/cnas-process/src/main/resources/mapper/QualitySuperviseDetailsMapper.xml b/cnas-process/src/main/resources/mapper/QualitySuperviseDetailsMapper.xml
new file mode 100644
index 0000000..0e8b619
--- /dev/null
+++ b/cnas-process/src/main/resources/mapper/QualitySuperviseDetailsMapper.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.ruoyi.process.mapper.QualitySuperviseDetailsMapper">
+
+    <!-- 璐ㄩ噺鐩戠潱璁″垝璇︽儏鍒楄〃 -->
+    <select id="pageQualitySuperviseDetail" resultType="com.ruoyi.process.dto.QualitySuperviseDetailsDto">
+        select *
+        from (select cd.*,
+        cr.is_according,
+        ca.is_correct,
+        cc.supervise_details_correct_id,
+        case
+        when cr.is_finish = 1 then 3
+        when cr.is_finish = 0 then 2
+        when cr.supervise_details_record_id is not null then 1
+        else 0
+        end record_status,
+        case
+        when ca.is_finish = 1 then 3
+        when ca.is_finish = 0 then 2
+        when ca.supervise_details_according_id is not null then 1
+        else 0
+        end according_status,
+        case
+        when cc.is_finish = 1 then 3
+        when cc.is_finish = 0 then 2
+        when cc.supervise_details_correct_id is not null then 1
+        else 0
+        end correct_status
+        from cnas_quality_supervise_details cd
+        left join cnas_quality_supervise_details_record cr
+        on cr.supervise_details_id = cd.supervise_details_id
+        left join cnas_quality_supervise_details_according ca
+        on ca.supervise_details_id = cd.supervise_details_id
+        left join cnas_quality_supervise_details_correct cc
+        on cc.supervise_details_id = cd.supervise_details_id
+        where 1=1
+        <choose>
+            <when test="causeType != null and causeType == 1">
+                and cd.supervise_reason not like '%鍔ㄦ��%'
+            </when>
+            <when test="causeType != null and causeType == 2">
+                and cd.supervise_reason like '%鍔ㄦ��%'
+            </when>
+            <otherwise>
+                and cd.supervise_reason not like '%鍔ㄦ��%'
+            </otherwise>
+        </choose>
+              order by STR_TO_DATE(CONCAT(cd.supervise_time, '.01'), '%Y.%m.%d')) a
+        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
+            ${ew.customSqlSegment}
+        </if>
+    </select>
+</mapper>

--
Gitblit v1.9.3