TStatisticsTaxDeclarerMapper.xml 7.15 KB
<?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.TStatisticsTaxDeclarerMapper">

  <resultMap id="tStatisticsTaxDeclarerMap" type="com.yifu.cloud.plus.v1.yifu.salary.entity.TStatisticsTaxDeclarer">
    <id property="id" column="id"/>
    <result property="invoiceTitle" column="INVOICE_TITLE"/>
    <result property="settleDepartId" column="SETTLE_DEPART_ID"/>
    <result property="settleDepartNo" column="SETTLE_DEPART_NO"/>
    <result property="settleDepartName" column="SETTLE_DEPART_NAME"/>
    <result property="declareMonth" column="DECLARE_MONTH"/>
    <result property="empId" column="EMP_ID"/>
    <result property="empName" column="EMP_NAME"/>
    <result property="empIdcard" column="EMP_IDCARD"/>
    <result property="phone" column="PHONE"/>
    <result property="userStatus" column="user_status"/>
    <result property="userType" column="user_type"/>
    <result property="taxMonth" column="tax_month"/>
    <result property="unitId" column="UNIT_ID"/>
    <result property="unitNo" column="UNIT_NO"/>
    <result property="unitName" column="UNIT_NAME"/>
    <result property="salaryTax" column="salary_tax"/>
    <result property="specialDeduMoney" column="special_dedu_money"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.id,
                a.INVOICE_TITLE,
                a.SETTLE_DEPART_ID,
                a.SETTLE_DEPART_NO,
                a.SETTLE_DEPART_NAME,
                a.DECLARE_MONTH,
                a.EMP_ID,
                a.EMP_NAME,
                a.EMP_IDCARD,
                a.PHONE,
                a.user_status,
                a.user_type,
                a.tax_month,
                a.UNIT_ID,
                a.UNIT_NO,
                a.UNIT_NAME,
                a.salary_tax,
                a.special_dedu_money
    </sql>
    <sql id="tStatisticsTaxDeclarer_where">
        <if test="tStatisticsTaxDeclarer != null">
                    <if test="tStatisticsTaxDeclarer.id != null and tStatisticsTaxDeclarer.id.trim() != ''">
                        AND a.id = #{tStatisticsTaxDeclarer.id}
                    </if>
                    <if test="tStatisticsTaxDeclarer.invoiceTitle != null and tStatisticsTaxDeclarer.invoiceTitle.trim() != ''">
                        AND a.INVOICE_TITLE = #{tStatisticsTaxDeclarer.invoiceTitle}
                    </if>
                    <if test="tStatisticsTaxDeclarer.settleDepartId != null and tStatisticsTaxDeclarer.settleDepartId.trim() != ''">
                        AND a.SETTLE_DEPART_ID = #{tStatisticsTaxDeclarer.settleDepartId}
                    </if>
                    <if test="tStatisticsTaxDeclarer.settleDepartNo != null and tStatisticsTaxDeclarer.settleDepartNo.trim() != ''">
                        AND a.SETTLE_DEPART_NO = #{tStatisticsTaxDeclarer.settleDepartNo}
                    </if>
                    <if test="tStatisticsTaxDeclarer.settleDepartName != null and tStatisticsTaxDeclarer.settleDepartName.trim() != ''">
                        AND a.SETTLE_DEPART_NAME = #{tStatisticsTaxDeclarer.settleDepartName}
                    </if>
                    <if test="tStatisticsTaxDeclarer.declareMonth != null and tStatisticsTaxDeclarer.declareMonth.trim() != ''">
                        AND a.DECLARE_MONTH = #{tStatisticsTaxDeclarer.declareMonth}
                    </if>
                    <if test="tStatisticsTaxDeclarer.empId != null and tStatisticsTaxDeclarer.empId.trim() != ''">
                        AND a.EMP_ID = #{tStatisticsTaxDeclarer.empId}
                    </if>
                    <if test="tStatisticsTaxDeclarer.empName != null and tStatisticsTaxDeclarer.empName.trim() != ''">
                        AND a.EMP_NAME = #{tStatisticsTaxDeclarer.empName}
                    </if>
                    <if test="tStatisticsTaxDeclarer.empIdcard != null and tStatisticsTaxDeclarer.empIdcard.trim() != ''">
                        AND a.EMP_IDCARD = #{tStatisticsTaxDeclarer.empIdcard}
                    </if>
                    <if test="tStatisticsTaxDeclarer.phone != null and tStatisticsTaxDeclarer.phone.trim() != ''">
                        AND a.PHONE = #{tStatisticsTaxDeclarer.phone}
                    </if>
                    <if test="tStatisticsTaxDeclarer.userStatus != null and tStatisticsTaxDeclarer.userStatus.trim() != ''">
                        AND a.user_status = #{tStatisticsTaxDeclarer.userStatus}
                    </if>
                    <if test="tStatisticsTaxDeclarer.userType != null and tStatisticsTaxDeclarer.userType.trim() != ''">
                        AND a.user_type = #{tStatisticsTaxDeclarer.userType}
                    </if>
                    <if test="tStatisticsTaxDeclarer.taxMonth != null and tStatisticsTaxDeclarer.taxMonth.trim() != ''">
                        AND a.tax_month = #{tStatisticsTaxDeclarer.taxMonth}
                    </if>
                    <if test="tStatisticsTaxDeclarer.unitId != null and tStatisticsTaxDeclarer.unitId.trim() != ''">
                        AND a.UNIT_ID = #{tStatisticsTaxDeclarer.unitId}
                    </if>
                    <if test="tStatisticsTaxDeclarer.unitNo != null and tStatisticsTaxDeclarer.unitNo.trim() != ''">
                        AND a.UNIT_NO = #{tStatisticsTaxDeclarer.unitNo}
                    </if>
                    <if test="tStatisticsTaxDeclarer.unitName != null and tStatisticsTaxDeclarer.unitName.trim() != ''">
                        AND a.UNIT_NAME = #{tStatisticsTaxDeclarer.unitName}
                    </if>
                    <if test="tStatisticsTaxDeclarer.salaryTax != null">
                        AND a.salary_tax = #{tStatisticsTaxDeclarer.salaryTax}
                    </if>
                    <if test="tStatisticsTaxDeclarer.specialDeduMoney != null">
                        AND a.special_dedu_money = #{tStatisticsTaxDeclarer.specialDeduMoney}
                    </if>
        </if>
    </sql>
    <!--tStatisticsTaxDeclarer简单分页查询-->
    <select id="getTStatisticsTaxDeclarerPage" resultMap="tStatisticsTaxDeclarerMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_statistics_tax_declarer a
        <where>
            1=1
            <include refid="tStatisticsTaxDeclarer_where"/>
        </where>
    </select>
</mapper>