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
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TWorkHandlerInfoMapper">
<resultMap id="tWorkHandlerInfoMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TWorkHandlerInfo">
<id property="id" column="ID"/>
<result property="departNo" column="DEPART_NO"/>
<result property="departName" column="DEPART_NAME"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="infoFrom" column="INFO_FROM"/>
<result property="operUser" column="OPER_USER"/>
<result property="operTime" column="OPER_TIME"/>
<result property="operResult" column="OPER_RESULT"/>
<result property="operInfo" column="OPER_INFO"/>
<result property="reason" column="REASON"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.DEPART_NO,
a.DEPART_NAME,
a.EMP_NAME,
a.EMP_IDCARD,
a.DELETE_FLAG,
a.INFO_FROM,
a.OPER_USER,
a.OPER_TIME,
a.OPER_RESULT,
a.OPER_INFO,
a.REASON
</sql>
<resultMap id="tWorkHandlerInfoVoMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TWorkHandlerInfoVo">
<result property="departNo" column="DEPART_NO"/>
<result property="departName" column="DEPART_NAME"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="infoFrom" column="INFO_FROM"/>
<result property="operUser" column="OPER_USER"/>
<result property="operTime" column="OPER_TIME"/>
<result property="operResult" column="OPER_RESULT"/>
<result property="operInfo" column="OPER_INFO"/>
<result property="reason" column="REASON"/>
</resultMap>
<sql id="tWorkHandlerInfo_where">
<if test="tWorkHandlerInfo != null">
<if test="tWorkHandlerInfo.departNo != null and tWorkHandlerInfo.departNo.trim() != ''">
AND a.DEPART_NO = #{tWorkHandlerInfo.departNo}
</if>
<if test="tWorkHandlerInfo.departName != null and tWorkHandlerInfo.departName.trim() != ''">
AND a.DEPART_NAME = #{tWorkHandlerInfo.departName}
</if>
<if test="tWorkHandlerInfo.empName != null and tWorkHandlerInfo.empName.trim() != ''">
AND a.EMP_NAME like concat('%', #{tWorkHandlerInfo.empName} ,'%')
</if>
<if test="tWorkHandlerInfo.empIdcard != null and tWorkHandlerInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD like concat('%', #{tWorkHandlerInfo.empIdcard} ,'%')
</if>
<if test="tWorkHandlerInfo.infoFrom != null and tWorkHandlerInfo.infoFrom.trim() != ''">
AND a.INFO_FROM = #{tWorkHandlerInfo.infoFrom}
</if>
<if test="tWorkHandlerInfo.operUser != null and tWorkHandlerInfo.operUser.trim() != ''">
AND a.OPER_USER like concat('%', #{tWorkHandlerInfo.operUser} ,'%')
</if>
<if test="tWorkHandlerInfo.startTime != null and tWorkHandlerInfo.startTime.trim() != '' ">
AND a.OPER_TIME <![CDATA[ >= ]]> concat(#{tWorkHandlerInfo.startTime}, ' 00:00:00')
</if>
<if test="tWorkHandlerInfo.endTime != null and tWorkHandlerInfo.endTime.trim() != '' ">
AND a.OPER_TIME <![CDATA[ <= ]]> concat(#{tWorkHandlerInfo.endTime}, ' 23:59:59')
</if>
<if test="tWorkHandlerInfo.operResult != null and tWorkHandlerInfo.operResult.trim() != ''">
AND a.OPER_RESULT = #{tWorkHandlerInfo.operResult}
</if>
</if>
</sql>
<!--tWorkHandlerInfo简单分页查询-->
<select id="getTWorkHandlerInfoPage" resultMap="tWorkHandlerInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_work_handler_info a
<where>
1=1
<include refid="tWorkHandlerInfo_where"/>
</where>
order by a.OPER_TIME desc
</select>
<select id="noPageCountDiy" resultType="java.lang.Integer">
SELECT
count(1)
FROM t_work_handler_info a
<where>
1=1
<include refid="tWorkHandlerInfo_where"/>
</where>
</select>
<select id="noPageDiy" resultMap="tWorkHandlerInfoVoMap">
SELECT
a.DEPART_NO,
a.DEPART_NAME,
a.EMP_NAME,
a.EMP_IDCARD,
a.INFO_FROM,
a.OPER_USER,
a.OPER_TIME,
CASE WHEN a.OPER_RESULT=0 THEN "未执行"
WHEN a.OPER_RESULT =1 THEN "部分成功"
WHEN a.OPER_RESULT =2 THEN "全部成功"
ELSE a.OPER_RESULT END as "OPER_RESULT",
a.OPER_INFO,
a.REASON
FROM t_work_handler_info a
<where>
1=1
<include refid="tWorkHandlerInfo_where"/>
</where>
order by a.OPER_TIME desc
limit #{tWorkHandlerInfo.limitStart},#{tWorkHandlerInfo.limitEnd}
</select>
</mapper>