郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?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.gkhy.safePlatform.specialWork.repository.WorkProcessCheckInfoRepository">
 
    <resultMap id="WorkProcessCheckInfo" type="com.gkhy.safePlatform.specialWork.entity.WorkProcessCheckInfo">
        <result column="id" property="id" />
        <result column="work_apply_id" property="workApplyId" />
        <result column="work_permit_no" property="workPermitNo" />
        <result column="work_type" property="workType" />
        <result column="work_level" property="workLevel" />
        <result column="check_content" property="checkContent" />
        <result column="check_result" property="checkResult" />
        <result column="operation_time" property="operationTime" />
        <result column="operator_uid" property="operatorUid" />
        <result column="operator_uname" property="operatorUname" />
        <result column="operation_time" property="operationTime" />
        <result column="status" property="status" />
        <result column="source" property="source" />
        <result column="info" property="info" />
        <result column="mcResult" property="mc_result"/>
    </resultMap>
 
 
 
    <insert id="insertWorkProcessCheckInfo"
            parameterType="com.gkhy.safePlatform.specialWork.entity.WorkProcessCheckInfo">
        insert
        into work_process_check
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            <if test="id != null">
                id,
            </if>
            <if test="workApplyId != null">
                work_apply_id,
            </if>
            <if test="workPermitNo != null">
                work_permit_no,
            </if>
            <if test="workType != null">
                work_type,
            </if>
            <if test="workLevel != null">
                work_level,
            </if>
            <if test="operationTime != null">
                operation_time,
            </if>
            <if test="operatorUid != null">
                operator_uid,
            </if>
            <if test="operatorUname != null">
                operator_uname,
            </if>
            <if test="info != null">
                info,
            </if>
            <if test="status != null">
                status,
            </if>
            <if test="checkResult != null">
                check_result,
            </if>
            <if test="checkContent != null">
                check_content,
            </if>
            <if test="source != null">
                source,
            </if>
            <if test="mcResult != null">
                mc_result,
            </if>
        </trim>
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">
                #{id},
            </if>
            <if test="workApplyId != null">
                #{workApplyId},
            </if>
            <if test="workPermitNo != null">
                #{workPermitNo},
            </if>
            <if test="workType != null">
                #{workType},
            </if>
            <if test="workLevel != null">
                #{workLevel},
            </if>
            <if test="operationTime != null">
                #{operationTime},
            </if>
            <if test="operatorUid != null">
                #{operatorUid},
            </if>
            <if test="operatorUname != null">
                #{operatorUname},
            </if>
            <if test="info != null">
                #{info},
            </if>
            <if test="status != null">
                #{status},
            </if>
            <if test="checkResult != null">
                #{checkResult},
            </if>
            <if test="checkContent != null">
                #{checkContent},
            </if>
            <if test="source != null">
                #{source},
            </if>
            <if test="mcResult != null">
                #{mcResult},
            </if>
        </trim>
 
    </insert>
 
    <select id="listWorkProcessCheckInfoByPage"
            resultMap="WorkProcessCheckInfo">
 
        select
        checkInfo.id,
        checkInfo.work_apply_id,
        checkInfo.work_permit_no,
        checkInfo.work_type,
        checkInfo.work_level,
        checkInfo.operator_uname,
        checkInfo.operator_uid,
        checkInfo.operation_time,
        checkInfo.status,
        checkInfo.info,
        checkInfo.check_content,
        checkInfo.check_result,
        checkInfo.source,
        checkInfo.mc_result
        from work_process_check as checkInfo
        <where>
            <if test="query.workType != null">
                and checkInfo.work_type = #{query.workType}
            </if>
            <if test="query.workPermitNo != null and query.workPermitNo != ''">
                and checkInfo.work_permit_no like concat("%",#{query.workPermitNo},"%")
            </if>
            <if test="query.checkResult != null">
                and checkInfo.check_result = #{query.checkResult}
            </if>
        </where>
        order by checkInfo.operation_time desc
    </select>
</mapper>