TConfigSalaryMapper.xml 3.09 KB
Newer Older
hongguangwu's avatar
hongguangwu committed
1 2 3 4 5 6
<?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.yifu.cloud.plus.v1.yifu.salary.mapper.TConfigSalaryMapper">

fangxinjiang's avatar
fangxinjiang committed
7 8 9 10 11 12 13 14 15 16 17 18
	<resultMap id="tConfigSalaryMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TConfigSalary">
		<id property="id" column="ID"/>
		<result property="name" column="NAME"/>
		<result property="departId" column="DEPART_ID"/>
		<result property="departNo" column="DEPART_NO"/>
		<result property="departName" column="DEPART_NAME"/>
		<result property="salaryMonth" column="SALARY_MONTH"/>
		<result property="socialMonth" column="SOCIAL_MONTH"/>
		<result property="fundMonth" column="FUND_MONTH"/>
		<result property="socialPriority" column="SOCIAL_PRIORITY"/>
		<result property="fundPriority" column="FUND_PRIORITY"/>
		<result property="grantType" column="GRANT_TYPE"/>
19
		<result property="salaryNum" column="SALARY_NUM"/>
fangxinjiang's avatar
fangxinjiang committed
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
	</resultMap>

	<!--tConfigSalary简单分页查询-->
	<select id="getTConfigSalaryPage" resultMap="tConfigSalaryMap">
		SELECT
		ID,
		NAME,
		DEPART_ID,
		DEPART_NO,
		DEPART_NAME,
		SALARY_MONTH,
		SOCIAL_MONTH,
		FUND_MONTH,
		SOCIAL_PRIORITY,
		FUND_PRIORITY,
35 36
		GRANT_TYPE,
		SALARY_NUM
37
		FROM t_config_salary a
fangxinjiang's avatar
fangxinjiang committed
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
		<where>
			1=1
			<if test="tConfigSalary.id != null and tConfigSalary.id.trim() != ''">
				AND ID = #{tConfigSalary.id}
			</if>
			<if test="tConfigSalary.name != null and tConfigSalary.name.trim() != ''">
				AND NAME like '%${tConfigSalary.name}%'
			</if>
			<if test="tConfigSalary.departId != null and tConfigSalary.departId.trim() != ''">
				AND DEPART_ID = #{tConfigSalary.departId}
			</if>
			<if test="tConfigSalary.departNo != null and tConfigSalary.departNo.trim() != ''">
				AND DEPART_NO = #{tConfigSalary.departNo}
			</if>
			<if test="tConfigSalary.departName != null and tConfigSalary.departName.trim() != ''">
				AND DEPART_NAME = #{tConfigSalary.departName}
			</if>
			<if test="tConfigSalary.salaryMonth != null ">
				AND SALARY_MONTH = #{tConfigSalary.salaryMonth}
			</if>
			<if test="tConfigSalary.socialMonth != null ">
				AND SOCIAL_MONTH = #{tConfigSalary.socialMonth}
			</if>
			<if test="tConfigSalary.fundMonth != null ">
				AND FUND_MONTH = #{tConfigSalary.fundMonth}
			</if>
			<if test="tConfigSalary.socialPriority != null ">
				AND SOCIAL_PRIORITY = #{tConfigSalary.socialPriority}
			</if>
			<if test="tConfigSalary.fundPriority != null ">
				AND FUND_PRIORITY = #{tConfigSalary.fundPriority}
			</if>
			<if test="tConfigSalary.grantType != null ">
				AND GRANT_TYPE = #{tConfigSalary.grantType}
			</if>
73 74 75
			<if test="tConfigSalary.salaryNum != null ">
				AND SALARY_NUM = #{tConfigSalary.salaryNum}
			</if>
fangxinjiang's avatar
fangxinjiang committed
76
			<!--数据权限判断-->
fangxinjiang's avatar
fangxinjiang committed
77
			<if test="depatIds != null and depatIds.size() > 0">
fangxinjiang's avatar
fangxinjiang committed
78
				and DEPART_ID in
fangxinjiang's avatar
fangxinjiang committed
79 80
				<foreach collection="depatIds" item="param" index="index" open="(" close=")" separator=",">
					#{param}
fangxinjiang's avatar
fangxinjiang committed
81 82
				</foreach>
			</if>
83 84 85
			<if test="tConfigSalary.authSql != null and tConfigSalary.authSql.trim() != ''">
				${tConfigSalary.authSql}
			</if>
fangxinjiang's avatar
fangxinjiang committed
86
		</where>
fangxinjiang's avatar
fangxinjiang committed
87
		order by CREATE_TIME DESC
fangxinjiang's avatar
fangxinjiang committed
88 89 90
	</select>


hongguangwu's avatar
hongguangwu committed
91
</mapper>