zss
2024-12-20 c9e36e23b3f95f6027d78483dfc23021d1ec6261
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?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.yuanchu.mom.mapper.ClientSatisfactionMapper">
 
    <!-- 客户满意度调查 -->
    <select id="pageClientSatisfaction" resultType="com.yuanchu.mom.pojo.ClientSatisfaction">
        select *
        from (select *
              from cnas_client_satisfaction
              order by create_time desc
             ) a
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
    </select>
    <select id="exportWordClientSatisfaction" resultType="com.yuanchu.mom.dto.ClientSatisfactionDto">
        select *,
               CASE WHEN service_attitude = 0 THEN '☑'
                   ELSE '□' END AS serviceAttitude0,
               CASE WHEN service_attitude = 1 THEN '☑'
                   ELSE '□' END AS serviceAttitude1,
               CASE WHEN service_attitude = 2 THEN '☑'
                   ELSE '□' END AS serviceAttitude2,
               service_attitude_suggestion,
               CASE WHEN technical_competence = 0 THEN '☑'
                    ELSE '□' END AS technicalCompetence0,
               CASE WHEN technical_competence = 1 THEN '☑'
                    ELSE '□' END AS technicalCompetence1,
               CASE WHEN technical_competence = 2 THEN '☑'
                    ELSE '□' END AS technicalCompetence2,
               technical_competence_suggestion,
               CASE WHEN inspection_work = 0 THEN '☑'
                    ELSE '□' END AS inspectionWork0,
               CASE WHEN inspection_work = 1 THEN '☑'
                    ELSE '□' END AS inspectionWork1,
               CASE WHEN inspection_work = 2 THEN '☑'
                    ELSE '□' END AS inspectionWork2,
               inspection_work_suggestion,
               CASE WHEN reasonable_fees = 0 THEN '☑'
                    ELSE '□' END AS reasonableFees0,
               CASE WHEN reasonable_fees = 1 THEN '☑'
                    ELSE '□' END AS reasonableFees1,
               CASE WHEN reasonable_fees = 2 THEN '☑'
                    ELSE '□' END AS reasonableFees2
        from cnas_client_satisfaction
        where client_satisfaction_id = #{clientSatisfactionId}
    </select>
</mapper>