TEmpEducationMapper.xml 5.46 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 31 32 33 34 35 36
<?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.TEmpEducationMapper">

  <resultMap id="tEmpEducationMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation">
    <id property="id" column="ID"/>
    <result property="empId" column="EMP_ID"/>
    <result property="empName" column="EMP_NAME"/>
    <result property="empCode" column="EMP_CODE"/>
    <result property="empIdcard" column="EMP_IDCARD"/>
    <result property="entryDate" column="ENTRY_DATE"/>
    <result property="educationName" column="EDUCATION_NAME"/>
    <result property="gradutionDate" column="GRADUTION_DATE"/>
    <result property="school" column="SCHOOL"/>
    <result property="educationSystem" column="EDUCATION_SYSTEM"/>
fangxinjiang's avatar
fangxinjiang committed
37
    <result property="highIdentification" column="HIGH_IDENTIFICATION"/>
fangxinjiang's avatar
fangxinjiang committed
38 39 40 41
    <result property="type" column="TYPE"/>
    <result property="collageSystem" column="COLLAGE_SYSTEM"/>
    <result property="deleteFlag" column="DELETE_FLAG"/>
    <result property="dispatchFlag" column="DISPATCH_FLAG"/>
fangxinjiang's avatar
fangxinjiang committed
42
	<result property="settleDomain" column="SETTLE_DOMAIN"/>
fangxinjiang's avatar
fangxinjiang committed
43 44 45 46 47
    <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"/>
48
	  <result property="major" column="MAJOR"/>
fangxinjiang's avatar
fangxinjiang committed
49
	  <result property="remark" column="REMARK"/>
fangxinjiang's avatar
fangxinjiang committed
50 51
	  <result property="certificationName" column="CERTIFICATION_NAME"/>

fangxinjiang's avatar
fangxinjiang committed
52
  </resultMap>
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
	<resultMap id="tEmpEducationExportMap" type="com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpEducationExportVo">
		<id property="id" column="ID"/>
		<result property="empName" column="EMP_NAME"/>
		<result property="empIdcard" column="EMP_IDCARD"/>
		<result property="entryDate" column="ENTRY_DATE"/>
		<result property="educationName" column="EDUCATION_NAME"/>
		<result property="gradutionDate" column="GRADUTION_DATE"/>
		<result property="school" column="SCHOOL"/>
		<result property="educationSystem" column="EDUCATION_SYSTEM"/>
		<result property="highIdentification" column="HIGH_IDENTIFICATION"/>
		<result property="type" column="TYPE"/>
		<result property="collageSystem" column="COLLAGE_SYSTEM"/>
		<result property="major" column="MAJOR"/>
		<result property="remark" column="REMARK"/>
		<result property="certificationName" column="CERTIFICATION_NAME"/>
68

69
	</resultMap>
70 71 72 73 74
	<update id="updateHighIdentification" parameterType="java.lang.String">
		update t_emp_education
		set HIGH_IDENTIFICATION='1'
		WHERE EMP_IDCARD=#{empIdcard}
	</update>
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
	<!--人员学历导出查询count fxj 2023-01-16-->
	<select id="noPageDiy" resultMap="tEmpEducationExportMap">
		select
		a.id,
		a.EMP_NAME,
		a.EMP_IDCARD,
		a.ENTRY_DATE,
		a.EDUCATION_NAME,
		a.GRADUTION_DATE,
		a.SCHOOL,
		a.EDUCATION_SYSTEM,
		case when a.HIGH_IDENTIFICATION = 0 then "是"
		when a.HIGH_IDENTIFICATION = 1 then "否"
		else null  end  as  "HIGH_IDENTIFICATION" ,
		a.type,
		a.COLLAGE_SYSTEM,
		a.MAJOR,
		a.REMARK,
		a.CERTIFICATION_NAME
		from t_emp_education a

		<where>
			a.DELETE_FLAG = '0'
			<include refid="education_where_export"/>
		</where>
		order by a.CREATE_TIME desc
		<if test="searchVo != null">
			<if test="searchVo.limitStart != null">
				limit #{searchVo.limitStart},#{searchVo.limitEnd}
			</if>
		</if>
	</select>

	<!--人员学历导出查询count fxj 2023-01-16-->
	<select id="noPageCountDiy" resultType="java.lang.Integer">
		select
		count(1)
		from t_emp_education a
		<where>
			a.DELETE_FLAG = '0'
			<include refid="education_where_export"/>
		</where>
	</select>
	<sql id="education_where_export">
		<if test="searchVo != null">
fangxinjiang's avatar
fangxinjiang committed
120
			<if test="idList != null">
121
				AND a.id in
fangxinjiang's avatar
fangxinjiang committed
122
				<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
123 124 125
					#{idStr}
				</foreach>
			</if>
fangxinjiang's avatar
fangxinjiang committed
126
			<if test="idList == null">
fangxinjiang's avatar
fangxinjiang committed
127
				<if test="searchVo.createTimeStart != null">
128 129
					AND a.CREATE_TIME >= #{searchVo.createTimeStart}
				</if>
fangxinjiang's avatar
fangxinjiang committed
130
				<if test="searchVo.createTimeEnd != null">
131 132 133
					AND a.CREATE_TIME <![CDATA[ <= ]]> #{searchVo.createTimeEnd}
				</if>
				<if test="searchVo.empName != null and searchVo.empName.trim() != ''">
fangxinjiang's avatar
fangxinjiang committed
134
					AND a.EMP_NAME like concat(#{searchVo.empName},'%')
135 136 137 138 139 140 141 142 143 144
				</if>
				<if test="searchVo.empIdcard != null and searchVo.empIdcard.trim() != ''">
					AND a.EMP_IDCARD like concat('%',#{searchVo.empIdcard},'%')
				</if>
				<if test="searchVo.createName != null and searchVo.createName.trim() != ''">
					AND a.CREATE_NAME = #{searchVo.createName}
				</if>
			</if>
		</if>
	</sql>
fangxinjiang's avatar
fangxinjiang committed
145
</mapper>