TElecEmployeeInfoMapper.xml 4.92 KB
Newer Older
fangxinjiang's avatar
fangxinjiang committed
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
<?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"/>
31 32 33
    <result property="unitName" column="UNIT_NAME"/>
    <result property="deptName" column="DEPT_NAME"/>
    <result property="deptNo" column="DEPT_NO"/>
fangxinjiang's avatar
fangxinjiang committed
34 35
    <result property="dataType" column="DATA_TYPE"/>
    <result property="attaInfo" column="ATTA_INFO"/>
36
    <result property="fileId" column="FILE_ID"/>
37
    <result property="deleteFlag" column="DELETE_FLAG"/>
fangxinjiang's avatar
fangxinjiang committed
38 39 40 41 42 43
    <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>
44 45 46

	<sql id="Base_Column_List">
		a.ID,
47
		b.EMP_NAME,
48
		a.EMP_IDCARD,
49 50 51 52
		b.EMP_NO,
		b.UNIT_NAME,
		b.deptNo,
		b.DEPT_NAME,
53 54
		a.DATA_TYPE,
		a.ATTA_INFO,
55
		a.FILE_ID,
56 57 58 59 60 61 62 63 64 65 66 67 68 69
		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() != ''">
70
			AND b.EMP_NAME = #{tElecEmployeeInfo.empName}
71 72 73 74
		</if>
		<if test="tElecEmployeeInfo.empIdcard != null and tElecEmployeeInfo.empIdcard.trim() != ''">
			AND a.EMP_IDCARD = #{tElecEmployeeInfo.empIdcard}
		</if>
75 76
		<if test="tElecEmployeeInfo.empCode != null and tElecEmployeeInfo.empCode.trim() != ''">
			AND b.EMP_CODE = #{tElecEmployeeInfo.empCode}
77
		</if>
78 79
		<if test="tElecEmployeeInfo.unitName != null and tElecEmployeeInfo.unitName.trim() != ''">
			AND b.UNIT_NAME like concat('%',#{tElecEmployeeInfo.unitName},'%')
80
		</if>
81 82
		<if test="tElecEmployeeInfo.deptName != null and tElecEmployeeInfo.deptName.trim() != ''">
			AND b.DEPT_NAME like concat('%',#{tElecEmployeeInfo.deptName},'%')
83
		</if>
84 85
		<if test="tElecEmployeeInfo.deptNo != null and tElecEmployeeInfo.deptNo.trim() != ''">
			AND b.DEPT_NO like concat('%',#{tElecEmployeeInfo.deptNo},'%')
86 87 88 89 90 91 92
		</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>
93 94 95
		<if test="tElecEmployeeInfo.fileId != null and tElecEmployeeInfo.fileId.trim() != ''">
			AND a.FILE_ID = #{tElecEmployeeInfo.fileId}
		</if>
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
		<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
119
		left join t_employee_project b on a.EMP_IDCARD = b.EMP_IDCARD
120
		<where>
121
			1=1  AND a.DELETE_FLAG = '0' AND b.DELETE_FLAG = '0'
122 123 124
			<include refid="tElecEmployeeInfo_where"/>
		</where>
	</select>
fangxinjiang's avatar
fangxinjiang committed
125
</mapper>