TSalaryStandardMapper.xml 18.4 KB
Newer Older
hongguangwu's avatar
hongguangwu 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 37 38 39 40 41 42 43
<?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.salary.mapper.TSalaryStandardMapper">

  <resultMap id="tSalaryStandardMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryStandard">
    <id property="id" column="ID"/>
    <result property="deptId" column="DEPT_ID"/>
    <result property="deptName" column="DEPT_NAME"/>
    <result property="deptNo" column="DEPT_NO"/>
    <result property="settlementAmount" column="SETTLEMENT_AMOUNT"/>
    <result property="belongDeptId" column="BELONG_DEPT_ID"/>
    <result property="belongDeptCode" column="BELONG_DEPT_CODE"/>
    <result property="settlementMonth" column="SETTLEMENT_MONTH"/>
    <result property="formType" column="FORM_TYPE"/>
    <result property="remark" column="REMARK"/>
    <result property="salaryMonth" column="SALARY_MONTH"/>
    <result property="moneyFrom" column="MONEY_FROM"/>
    <result property="status" column="STATUS"/>
    <result property="submitTime" column="SUBMIT_TIME"/>
    <result property="deleteFlag" column="DELETE_FLAG"/>
    <result property="auditUser" column="AUDIT_USER"/>
    <result property="auditTime" column="AUDIT_TIME"/>
huyuchen's avatar
huyuchen committed
44
    <result property="auditRemark" column="AUDIT_REMARK"/>
hongguangwu's avatar
hongguangwu committed
45 46 47 48 49 50 51
    <result property="province" column="PROVINCE"/>
    <result property="city" column="CITY"/>
    <result property="town" column="TOWN"/>
    <result property="type" column="TYPE"/>
    <result property="ownNums" column="OWN_NUMS"/>
    <result property="ownMoney" column="OWN_MONEY"/>
    <result property="ownRemark" column="OWN_REMARK"/>
hongguangwu's avatar
hongguangwu committed
52 53 54 55
    <result property="haveSalaryFlag" column="HAVE_SALARY_FLAG"/>
    <result property="haveSpecialFlag" column="HAVE_SPECIAL_FLAG"/>
    <result property="haveSalaryRemark" column="HAVE_SALARY_REMARK"/>
    <result property="haveSpecialRemark" column="HAVE_SPECIAL_REMARK"/>
hongguangwu's avatar
hongguangwu committed
56 57 58 59 60 61 62 63
    <result property="submitRemark" column="SUBMIT_REMARK"/>
    <result property="createBy" column="CREATE_BY"/>
    <result property="createName" column="CREATE_NAME"/>
    <result property="createTime" column="CREATE_TIME"/>
    <result property="updateBy" column="UPDATE_BY"/>
    <result property="updateTime" column="UPDATE_TIME"/>
    <result property="unitId" column="UNIT_ID"/>
    <result property="unitName" column="UNIT_NAME"/>
64 65
    <result property="sendTime" column="SEND_TIME"/>
    <result property="sendMonth" column="SEND_MONTH"/>
huyuchen's avatar
huyuchen committed
66 67 68 69 70 71 72
    <result property="invoiceTitle" column="INVOICE_TITLE"/>
    <result property="specialNums" column="SPECIAL_NUMS"/>
    <result property="specialMoney" column="SPECIAL_MONEY"/>
    <result property="salaryNums" column="SALARY_NUMS"/>
    <result property="salaryMoney" column="SALARY_MONEY"/>
    <result property="repeatMoney" column="REPEAT_MONEY"/>
    <result property="repeatNums" column="REPEAT_NUMS"/>
hongguangwu's avatar
hongguangwu committed
73
    <result property="isRepeat" column="IS_REPEAT"/>
huyuchen's avatar
huyuchen committed
74
    <result property="repeatRemark" column="REPEAT_REMARK"/>
75
	<result property="orderId" column="ORDER_ID"/>
hongguangwu's avatar
hongguangwu committed
76
	<result property="bpoFlag" column="BPO_FLAG"/>
hongguangwu's avatar
hongguangwu committed
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
  </resultMap>
    <sql id="Base_Column_List">
                a.ID,
                a.DEPT_ID,
                a.DEPT_NAME,
                a.DEPT_NO,
                a.SETTLEMENT_AMOUNT,
                a.BELONG_DEPT_ID,
                a.BELONG_DEPT_CODE,
                a.SETTLEMENT_MONTH,
                a.FORM_TYPE,
                a.REMARK,
                a.SALARY_MONTH,
                a.MONEY_FROM,
                a.STATUS,
                a.SUBMIT_TIME,
                a.DELETE_FLAG,
                a.AUDIT_USER,
                a.AUDIT_TIME,
huyuchen's avatar
huyuchen committed
96
                a.AUDIT_REMARK,
hongguangwu's avatar
hongguangwu committed
97 98 99 100 101 102 103
                a.PROVINCE,
                a.CITY,
                a.TOWN,
                a.TYPE,
                a.OWN_NUMS,
                a.OWN_MONEY,
                a.OWN_REMARK,
hongguangwu's avatar
hongguangwu committed
104 105 106 107
                a.HAVE_SALARY_FLAG,
                a.HAVE_SALARY_REMARK,
                a.HAVE_SPECIAL_FLAG,
                a.HAVE_SPECIAL_REMARK,
hongguangwu's avatar
hongguangwu committed
108 109 110 111 112 113 114 115
                a.SUBMIT_REMARK,
                a.CREATE_BY,
                a.CREATE_NAME,
                a.CREATE_TIME,
                a.UPDATE_BY,
                a.UPDATE_TIME,
                a.UNIT_ID,
                a.UNIT_NAME,
116 117
                a.UNIT_NO,
                a.SEND_TIME,
118
                a.SEND_MONTH,
huyuchen's avatar
huyuchen committed
119 120 121 122 123 124
                a.SPECIAL_NUMS,
                a.SPECIAL_MONEY,
                a.SALARY_NUMS,
                a.SALARY_MONEY,
                a.REPEAT_MONEY,
                a.REPEAT_NUMS,
hongguangwu's avatar
hongguangwu committed
125
                a.IS_REPEAT,
huyuchen's avatar
huyuchen committed
126
                a.REPEAT_REMARK,
127
				a.INVOICE_TITLE,
hongguangwu's avatar
hongguangwu committed
128 129
				a.ORDER_ID,
				a.BPO_FLAG
hongguangwu's avatar
hongguangwu committed
130 131 132 133 134 135 136 137 138
    </sql>
    <sql id="tSalaryStandard_where">
        <if test="tSalaryStandard != null">
                    <if test="tSalaryStandard.id != null and tSalaryStandard.id.trim() != ''">
                        AND a.ID = #{tSalaryStandard.id}
                    </if>
                    <if test="tSalaryStandard.deptId != null and tSalaryStandard.deptId.trim() != ''">
                        AND a.DEPT_ID = #{tSalaryStandard.deptId}
                    </if>
139 140 141
					<if test="tSalaryStandard.orderId != null and tSalaryStandard.orderId.trim() != ''">
						AND a.ORDER_ID = #{tSalaryStandard.orderId}
					</if>
hongguangwu's avatar
hongguangwu committed
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
                    <if test="tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''">
                        AND a.DEPT_NAME = #{tSalaryStandard.deptName}
                    </if>
                    <if test="tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''">
                        AND a.DEPT_NO = #{tSalaryStandard.deptNo}
                    </if>
                    <if test="tSalaryStandard.settlementAmount != null">
                        AND a.SETTLEMENT_AMOUNT = #{tSalaryStandard.settlementAmount}
                    </if>
                    <if test="tSalaryStandard.belongDeptId != null and tSalaryStandard.belongDeptId.trim() != ''">
                        AND a.BELONG_DEPT_ID = #{tSalaryStandard.belongDeptId}
                    </if>
                    <if test="tSalaryStandard.belongDeptCode != null and tSalaryStandard.belongDeptCode.trim() != ''">
                        AND a.BELONG_DEPT_CODE = #{tSalaryStandard.belongDeptCode}
                    </if>
                    <if test="tSalaryStandard.settlementMonth != null and tSalaryStandard.settlementMonth.trim() != ''">
                        AND a.SETTLEMENT_MONTH = #{tSalaryStandard.settlementMonth}
                    </if>
                    <if test="tSalaryStandard.formType != null and tSalaryStandard.formType.trim() != ''">
                        AND a.FORM_TYPE = #{tSalaryStandard.formType}
                    </if>
                    <if test="tSalaryStandard.remark != null and tSalaryStandard.remark.trim() != ''">
                        AND a.REMARK = #{tSalaryStandard.remark}
                    </if>
                    <if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''">
                        AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
                    </if>
                    <if test="tSalaryStandard.moneyFrom != null">
                        AND a.MONEY_FROM = #{tSalaryStandard.moneyFrom}
                    </if>
                    <if test="tSalaryStandard.status != null">
                        AND a.STATUS = #{tSalaryStandard.status}
                    </if>
                    <if test="tSalaryStandard.submitTime != null">
                        AND a.SUBMIT_TIME = #{tSalaryStandard.submitTime}
                    </if>
                    <if test="tSalaryStandard.deleteFlag != null">
                        AND a.DELETE_FLAG = #{tSalaryStandard.deleteFlag}
                    </if>
                    <if test="tSalaryStandard.auditUser != null and tSalaryStandard.auditUser.trim() != ''">
                        AND a.AUDIT_USER = #{tSalaryStandard.auditUser}
                    </if>
                    <if test="tSalaryStandard.auditTime != null">
                        AND a.AUDIT_TIME = #{tSalaryStandard.auditTime}
                    </if>
huyuchen's avatar
huyuchen committed
187 188
					<if test="tSalaryStandard.auditRemark != null and tSalaryStandard.auditRemark.trim() != ''">
						AND a.AUDIT_REMARK = #{tSalaryStandard.auditRemark}
huyuchen's avatar
huyuchen committed
189
					</if>
hongguangwu's avatar
hongguangwu committed
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
                    <if test="tSalaryStandard.province != null">
                        AND a.PROVINCE = #{tSalaryStandard.province}
                    </if>
                    <if test="tSalaryStandard.city != null">
                        AND a.CITY = #{tSalaryStandard.city}
                    </if>
                    <if test="tSalaryStandard.town != null">
                        AND a.TOWN = #{tSalaryStandard.town}
                    </if>
                    <if test="tSalaryStandard.type != null">
                        AND a.TYPE = #{tSalaryStandard.type}
                    </if>
                    <if test="tSalaryStandard.ownNums != null">
                        AND a.OWN_NUMS = #{tSalaryStandard.ownNums}
                    </if>
                    <if test="tSalaryStandard.ownMoney != null">
                        AND a.OWN_MONEY = #{tSalaryStandard.ownMoney}
                    </if>
huyuchen's avatar
huyuchen committed
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
			<if test="tSalaryStandard.specialNums != null">
				AND a.SPECIAL_NUMS = #{tSalaryStandard.specialNums}
			</if>
			<if test="tSalaryStandard.specialMoney != null">
				AND a.SPECIAL_MONEY = #{tSalaryStandard.specialMoney}
			</if>
			<if test="tSalaryStandard.salaryNums != null">
				AND a.SALARY_NUMS = #{tSalaryStandard.salaryNums}
			</if>
			<if test="tSalaryStandard.salaryMoney != null">
				AND a.SALARY_MONEY = #{tSalaryStandard.salaryMoney}
			</if>
			<if test="tSalaryStandard.repeatMoney != null">
				AND a.REPEAT_MONEY = #{tSalaryStandard.repeatMoney}
			</if>
			<if test="tSalaryStandard.repeatNums != null">
				AND a.REPEAT_NUMS = #{tSalaryStandard.repeatNums}
			</if>
hongguangwu's avatar
hongguangwu committed
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
                    <if test="tSalaryStandard.ownRemark != null and tSalaryStandard.ownRemark.trim() != ''">
                        AND a.OWN_REMARK = #{tSalaryStandard.ownRemark}
                    </if>
                    <if test="tSalaryStandard.submitRemark != null and tSalaryStandard.submitRemark.trim() != ''">
                        AND a.SUBMIT_REMARK = #{tSalaryStandard.submitRemark}
                    </if>
                    <if test="tSalaryStandard.createBy != null and tSalaryStandard.createBy.trim() != ''">
                        AND a.CREATE_BY = #{tSalaryStandard.createBy}
                    </if>
                    <if test="tSalaryStandard.createName != null and tSalaryStandard.createName.trim() != ''">
                        AND a.CREATE_NAME = #{tSalaryStandard.createName}
                    </if>
                    <if test="tSalaryStandard.createTime != null">
                        AND a.CREATE_TIME = #{tSalaryStandard.createTime}
                    </if>
                    <if test="tSalaryStandard.updateBy != null and tSalaryStandard.updateBy.trim() != ''">
                        AND a.UPDATE_BY = #{tSalaryStandard.updateBy}
                    </if>
                    <if test="tSalaryStandard.updateTime != null">
                        AND a.UPDATE_TIME = #{tSalaryStandard.updateTime}
                    </if>
                    <if test="tSalaryStandard.unitId != null and tSalaryStandard.unitId.trim() != ''">
                        AND a.UNIT_ID = #{tSalaryStandard.unitId}
                    </if>
                    <if test="tSalaryStandard.unitName != null and tSalaryStandard.unitName.trim() != ''">
                        AND a.UNIT_NAME = #{tSalaryStandard.unitName}
                    </if>
                    <if test="tSalaryStandard.unitNo != null and tSalaryStandard.unitNo.trim() != ''">
                        AND a.UNIT_NO = #{tSalaryStandard.unitNo}
                    </if>
256 257 258
					<if test="tSalaryStandard.sendMonth != null and tSalaryStandard.sendMonth.trim() != ''">
						AND a.SEND_MONTH = #{tSalaryStandard.sendMonth}
					</if>
hongguangwu's avatar
hongguangwu committed
259 260 261 262 263 264 265
        </if>
    </sql>
    <!--tSalaryStandard简单分页查询-->
    <select id="getTSalaryStandardPage" resultMap="tSalaryStandardMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_salary_standard a
fangxinjiang's avatar
fangxinjiang committed
266
        left join t_dept_see d on a.DEPT_NO = d.DEPT_NO
hongguangwu's avatar
hongguangwu committed
267
        <where>
hongguangwu's avatar
hongguangwu committed
268
            a.DELETE_FLAG = 0
fangxinjiang's avatar
fangxinjiang committed
269
            <!-- 薪资是否可查看 0 是 1否-->
fangxinjiang's avatar
fangxinjiang committed
270
            and (d.CAN_SEE = 0 OR d.id is null)
hongguangwu's avatar
hongguangwu committed
271
            <include refid="tSalaryStandard_where"/>
272 273 274
			<if test="tSalaryStandard.authSql != null and tSalaryStandard.authSql.trim() != ''">
				${tSalaryStandard.authSql}
			</if>
hongguangwu's avatar
hongguangwu committed
275
        </where>
276
		ORDER BY a.CREATE_TIME desc
hongguangwu's avatar
hongguangwu committed
277
    </select>
fangxinjiang's avatar
fangxinjiang committed
278 279 280 281 282 283 284 285 286
	<!--tSalaryStandard简单分页查询-->
	<select id="getTSalaryStandardPageApply" resultMap="tSalaryStandardMap">
		SELECT
		<include refid="Base_Column_List"/>
		FROM t_salary_standard a
		<where>
			a.DELETE_FLAG = 0
			<!-- 薪资是否可查看 0 是 1否-->
			<include refid="tSalaryStandard_where"/>
287 288 289
			<if test="tSalaryStandard.authSql != null and tSalaryStandard.authSql.trim() != ''">
				${tSalaryStandard.authSql}
			</if>
fangxinjiang's avatar
fangxinjiang committed
290 291 292
		</where>
		ORDER BY a.CREATE_TIME desc
	</select>
293 294 295 296 297 298
	<!--tSalaryStandard简单分页查询-->
	<select id="getTSalaryStandardAuditPage" resultMap="tSalaryStandardMap">
		SELECT
		<include refid="Base_Column_List"/>
		FROM t_salary_standard a
		<where>
huyuchen's avatar
huyuchen committed
299
			1=1
huyuchen's avatar
huyuchen committed
300
			AND a.DELETE_FLAG = 0
huyuchen's avatar
huyuchen committed
301 302
			<if test="tSalaryStandard != null">
				<if test="tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''">
huyuchen's avatar
huyuchen committed
303
					AND a.DEPT_NAME = #{tSalaryStandard.deptName}
huyuchen's avatar
huyuchen committed
304 305 306 307 308 309 310 311
				</if>
				<if test="tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''">
					AND a.DEPT_NO = #{tSalaryStandard.deptNo}
				</if>
				<if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''">
					AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
				</if>
				<if test="tSalaryStandard.status == null">
huyuchen's avatar
huyuchen committed
312
					AND (a.STATUS = 1 OR a.STATUS = 2 or a.STATUS = 5)
huyuchen's avatar
huyuchen committed
313 314 315 316 317
				</if>
				<if test="tSalaryStandard.status != null">
					AND a.STATUS = #{tSalaryStandard.status}
				</if>
			</if>
318
			ORDER BY CREATE_TIME DESC
319 320
		</where>
	</select>
fangxinjiang's avatar
fangxinjiang committed
321 322 323 324 325 326 327 328 329 330 331 332
	<resultMap id="salaryStandardExportMap" type="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardExportVo">
		<result property="status" column="STATUS"/>
		<result property="sendMonth" column="SEND_MONTH"/>
		<result property="deptName" column="DEPT_NAME"/>
		<result property="deptNo" column="DEPT_NO"/>
		<result property="settlementAmount" column="SETTLEMENT_AMOUNT"/>
		<result property="invoiceTitle" column="INVOICE_TITLE"/>
		<result property="createName" column="CREATE_NAME"/>
		<result property="salaryMonth" column="SALARY_MONTH"/>
		<result property="formType" column="FORM_TYPE"/>
		<result property="createTime" column="CREATE_TIME"/>
	</resultMap>
333
	<!--tSalaryStandard简单分页查询-->
fangxinjiang's avatar
fangxinjiang committed
334
	<select id="getSalaryStandardExport" resultMap="salaryStandardExportMap" parameterType="com.yifu.cloud.plus.v1.yifu.salary.vo.TSalaryStandardSearchVo">
335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351
		SELECT
		a.STATUS,
		a.SEND_MONTH,
		a.DEPT_NAME,
		a.DEPT_NO,
		a.SETTLEMENT_AMOUNT,
		a.ID,
		a.DEPT_ID,
		a.BELONG_DEPT_ID,
		a.BELONG_DEPT_CODE,
		a.SETTLEMENT_MONTH,
		a.INVOICE_TITLE,
		a.CREATE_NAME,
		a.SALARY_MONTH,
		a.FORM_TYPE,
		a.CREATE_TIME
		FROM t_salary_standard a
fangxinjiang's avatar
fangxinjiang committed
352
		LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
353
		<where>
fangxinjiang's avatar
fangxinjiang committed
354
			a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
fangxinjiang's avatar
fangxinjiang committed
355
			<include refid="where_export"/>
356 357 358
			<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
				${searchVo.authSql}
			</if>
fangxinjiang's avatar
fangxinjiang committed
359 360 361 362 363
			ORDER BY a.CREATE_TIME desc
			<if test="searchVo != null">
				<if test="searchVo.limitStart != null">
					limit #{searchVo.limitStart},#{searchVo.limitEnd}
				</if>
fangxinjiang's avatar
fangxinjiang committed
364
			</if>
fangxinjiang's avatar
fangxinjiang committed
365
		</where>
366 367
	</select>
	<!--tSalaryStandard简单分页查询-->
fangxinjiang's avatar
fangxinjiang committed
368
	<select id="getSalaryStandardExportCount"  resultType="java.lang.Integer">
369 370 371
		SELECT
		count(1)
		FROM t_salary_standard a
fangxinjiang's avatar
fangxinjiang committed
372
		LEFT JOIN t_dept_see d ON a.DEPT_NO = d.DEPT_NO
373
		<where>
fangxinjiang's avatar
fangxinjiang committed
374
			a.DELETE_FLAG = 0 AND (d.CAN_SEE = 0 OR d.id is null)
fangxinjiang's avatar
fangxinjiang committed
375
			<include refid="where_export"/>
376 377 378
			<if test="searchVo.authSql != null and searchVo.authSql.trim() != ''">
				${searchVo.authSql}
			</if>
379 380
		</where>
	</select>
381 382 383
	<sql id="where_page">
		<if test="tSalaryStandard != null">
			<if test="tSalaryStandard.deptName != null and tSalaryStandard.deptName.trim() != ''">
huyuchen's avatar
huyuchen committed
384
				AND a.DEPT_NAME like concat('%',#{tSalaryStandard.deptName},'%')
385 386 387 388 389 390 391
			</if>
			<if test="tSalaryStandard.deptNo != null and tSalaryStandard.deptNo.trim() != ''">
				AND a.DEPT_NO = #{tSalaryStandard.deptNo}
			</if>
			<if test="tSalaryStandard.salaryMonth != null and tSalaryStandard.salaryMonth.trim() != ''">
				AND a.SALARY_MONTH = #{tSalaryStandard.salaryMonth}
			</if>
fangxinjiang's avatar
fangxinjiang committed
392
			<!--<if test="tSalaryStandard.status == null">
fangxinjiang's avatar
fangxinjiang committed
393
				AND (a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5)
fangxinjiang's avatar
fangxinjiang committed
394
			</if>-->
395 396 397 398 399
			<if test="tSalaryStandard.status != null">
				AND a.STATUS = #{tSalaryStandard.status}
			</if>
		</if>
	</sql>
fangxinjiang's avatar
fangxinjiang committed
400
	<sql id="where_export">
fangxinjiang's avatar
fangxinjiang committed
401 402 403 404 405 406
		<if test="idList != null and idList.size>0">
			AND a.id in
			<foreach item="idStr" index="index" collection="idList" open="(" separator="," close=")">
				#{idStr}
			</foreach>
		</if>
fangxinjiang's avatar
fangxinjiang committed
407 408
		<if test="searchVo != null">
			<if test="searchVo.deptName != null and searchVo.deptName.trim() != ''">
huyuchen's avatar
huyuchen committed
409
				AND a.DEPT_NAME like concat('%',#{searchVo.deptName},'%')
fangxinjiang's avatar
fangxinjiang committed
410 411 412 413 414 415 416
			</if>
			<if test="searchVo.deptNo != null and searchVo.deptNo.trim() != ''">
				AND a.DEPT_NO = #{searchVo.deptNo}
			</if>
			<if test="searchVo.salaryMonth != null and searchVo.salaryMonth.trim() != ''">
				AND a.SALARY_MONTH = #{searchVo.salaryMonth}
			</if>
fangxinjiang's avatar
fangxinjiang committed
417
			<!--<if test="searchVo.status == null">
fangxinjiang's avatar
fangxinjiang committed
418
				AND (a.STATUS = 1 OR a.STATUS = 2 OR a.STATUS = 5)
fangxinjiang's avatar
fangxinjiang committed
419
			</if>-->
fangxinjiang's avatar
fangxinjiang committed
420 421 422 423 424
			<if test="searchVo.status != null">
				AND a.STATUS = #{searchVo.status}
			</if>
		</if>
	</sql>
hongguangwu's avatar
hongguangwu committed
425
</mapper>