<?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.TSalaryExcelCheckMapper">

  <resultMap id="tSalaryExcelCheckMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TSalaryExcelCheck">
    <id property="id" column="id"/>
    <result property="name" column="NAME"/>
    <result property="departId" column="DEPART_ID"/>
    <result property="departName" column="DEPART_NAME"/>
    <result property="departNo" column="DEPART_NO"/>
    <result property="mainName" column="MAIN_NAME"/>
    <result property="subName" column="SUB_NAME"/>
	  <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"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.id,
                a.NAME,
                a.DEPART_ID,
                a.DEPART_NAME,
                a.DEPART_NO,
                a.CREATE_USER,
                a.CREATE_TIME,
                a.MAIN_NAME,
                a.SUB_NAME,
				a.CREATE_BY,
				a.CREATE_NAME,
				a.CREATE_TIME,
				a.UPDATE_BY,
				a.UPDATE_TIME
    </sql>
    <sql id="tSalaryExcelCheck_where">
        <if test="tSalaryExcelCheck != null">
                    <if test="tSalaryExcelCheck.id != null and tSalaryExcelCheck.id.trim() != ''">
                        AND a.id = #{tSalaryExcelCheck.id}
                    </if>
                    <if test="tSalaryExcelCheck.name != null and tSalaryExcelCheck.name.trim() != ''">
                        AND a.NAME = #{tSalaryExcelCheck.name}
                    </if>
                    <if test="tSalaryExcelCheck.departId != null and tSalaryExcelCheck.departId.trim() != ''">
                        AND a.DEPART_ID = #{tSalaryExcelCheck.departId}
                    </if>
                    <if test="tSalaryExcelCheck.departName != null and tSalaryExcelCheck.departName.trim() != ''">
                        AND a.DEPART_NAME = #{tSalaryExcelCheck.departName}
                    </if>
                    <if test="tSalaryExcelCheck.departNo != null and tSalaryExcelCheck.departNo.trim() != ''">
                        AND a.DEPART_NO = #{tSalaryExcelCheck.departNo}
                    </if>
                    <if test="tSalaryExcelCheck.mainName != null and tSalaryExcelCheck.mainName.trim() != ''">
                        AND a.MAIN_NAME = #{tSalaryExcelCheck.mainName}
                    </if>
                    <if test="tSalaryExcelCheck.subName != null and tSalaryExcelCheck.subName.trim() != ''">
                        AND a.SUB_NAME = #{tSalaryExcelCheck.subName}
                    </if>
        </if>
    </sql>
    <!--tSalaryExcelCheck简单分页查询-->
    <select id="getTSalaryExcelCheckPage" resultMap="tSalaryExcelCheckMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_salary_excel_check a
        <where>
            1=1
            <include refid="tSalaryExcelCheck_where"/>
        </where>
    </select>
</mapper>
