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
<?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.TElecEmployeeInfoMapper">
<resultMap id="tElecEmployeeInfoMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TElecEmployeeInfo">
<id property="id" column="ID"/>
<result property="empName" column="EMP_NAME"/>
<result property="empIdcard" column="EMP_IDCARD"/>
<result property="empNo" column="EMP_NO"/>
<result property="unitName" column="UNIT_NAME"/>
<result property="deptName" column="DEPT_NAME"/>
<result property="deptNo" column="DEPT_NO"/>
<result property="dataType" column="DATA_TYPE"/>
<result property="attaInfo" column="ATTA_INFO"/>
<result property="fileId" column="FILE_ID"/>
<result property="deleteFlag" column="DELETE_FLAG"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="updateTime" column="UPDATE_TIME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
b.EMP_NAME,
a.EMP_IDCARD,
b.EMP_NO,
b.UNIT_NAME,
b.deptNo,
b.DEPT_NAME,
a.DATA_TYPE,
a.ATTA_INFO,
a.FILE_ID,
a.DELETE_FLAG,
a.UPDATE_BY,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME
</sql>
<sql id="tElecEmployeeInfo_where">
<if test="tElecEmployeeInfo != null">
<if test="tElecEmployeeInfo.id != null and tElecEmployeeInfo.id.trim() != ''">
AND a.ID = #{tElecEmployeeInfo.id}
</if>
<if test="tElecEmployeeInfo.empName != null and tElecEmployeeInfo.empName.trim() != ''">
AND b.EMP_NAME = #{tElecEmployeeInfo.empName}
</if>
<if test="tElecEmployeeInfo.empIdcard != null and tElecEmployeeInfo.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tElecEmployeeInfo.empIdcard}
</if>
<if test="tElecEmployeeInfo.empCode != null and tElecEmployeeInfo.empCode.trim() != ''">
AND b.EMP_CODE = #{tElecEmployeeInfo.empCode}
</if>
<if test="tElecEmployeeInfo.unitName != null and tElecEmployeeInfo.unitName.trim() != ''">
AND b.UNIT_NAME like concat('%',#{tElecEmployeeInfo.unitName},'%')
</if>
<if test="tElecEmployeeInfo.deptName != null and tElecEmployeeInfo.deptName.trim() != ''">
AND b.DEPT_NAME like concat('%',#{tElecEmployeeInfo.deptName},'%')
</if>
<if test="tElecEmployeeInfo.deptNo != null and tElecEmployeeInfo.deptNo.trim() != ''">
AND b.DEPT_NO like concat('%',#{tElecEmployeeInfo.deptNo},'%')
</if>
<if test="tElecEmployeeInfo.dataType != null and tElecEmployeeInfo.dataType.trim() != ''">
AND a.DATA_TYPE = #{tElecEmployeeInfo.dataType}
</if>
<if test="tElecEmployeeInfo.attaInfo != null and tElecEmployeeInfo.attaInfo.trim() != ''">
AND a.ATTA_INFO = #{tElecEmployeeInfo.attaInfo}
</if>
<if test="tElecEmployeeInfo.fileId != null and tElecEmployeeInfo.fileId.trim() != ''">
AND a.FILE_ID = #{tElecEmployeeInfo.fileId}
</if>
<if test="tElecEmployeeInfo.createBy != null and tElecEmployeeInfo.createBy.trim() != ''">
AND a.CREATE_BY = #{tElecEmployeeInfo.createBy}
</if>
<if test="tElecEmployeeInfo.createName != null and tElecEmployeeInfo.createName.trim() != ''">
AND a.CREATE_NAME = #{tElecEmployeeInfo.createName}
</if>
<if test="tElecEmployeeInfo.createTime != null">
AND a.CREATE_TIME = #{tElecEmployeeInfo.createTime}
</if>
<if test="tElecEmployeeInfo.updateBy != null and tElecEmployeeInfo.updateBy.trim() != ''">
AND a.UPDATE_BY = #{tElecEmployeeInfo.updateBy}
</if>
<if test="tElecEmployeeInfo.updateTime != null">
AND a.UPDATE_TIME = #{tElecEmployeeInfo.updateTime}
</if>
</if>
</sql>
<!--tElecEmployeeInfo简单分页查询-->
<select id="getTElecEmployeeInfoPage" resultMap="tElecEmployeeInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_elec_employee_info a
left join t_employee_project b on a.EMP_IDCARD = b.EMP_IDCARD
<where>
1=1 AND a.DELETE_FLAG = '0' AND b.DELETE_FLAG = '0'
<include refid="tElecEmployeeInfo_where"/>
</where>
</select>
</mapper>