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
<?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">
<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="settleMonth" column="SETTLE_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"/>
<result property="annualBonusType" column="ANNUAL_BONUS_TYPE"/>
</resultMap>
<!--tConfigSalary简单分页查询-->
<select id="getTConfigSalaryPage" resultMap="tConfigSalaryMap">
SELECT
ID,
NAME,
DEPART_ID,
DEPART_NO,
DEPART_NAME,
SALARY_MONTH,
SETTLE_MONTH,
SOCIAL_MONTH,
FUND_MONTH,
SOCIAL_PRIORITY,
FUND_PRIORITY,
GRANT_TYPE,
ANNUAL_BONUS_TYPE
FROM t_config_salary
<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.settleMonth != null ">
AND SETTLE_MONTH = #{tConfigSalary.settleMonth}
</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>
<if test="tConfigSalary.annualBonusType != null ">
AND ANNUAL_BONUS_TYPE = #{tConfigSalary.annualBonusType}
</if>
<!--数据权限判断-->
<if test="settleDomainVos != null and settleDomainVos.size() > 0">
and DEPART_ID in
<foreach collection="settleDomainVos" item="param" index="index" open="(" close=")" separator=",">
#{param.id}
</foreach>
</if>
</where>
</select>
</mapper>