<?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.social.mapper.TPaymentInfoMapper">

  <resultMap id="tPaymentInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo">
    <id property="id" column="ID"/>
    <result property="empName" column="EMP_NAME"/>
    <result property="empNo" column="EMP_NO"/>
    <result property="empId" column="EMP_ID"/>
    <result property="empIdcard" column="EMP_IDCARD"/>
    <result property="unitId" column="UNIT_ID"/>
    <result property="settleDomainId" column="SETTLE_DOMAIN_ID"/>
    <result property="socialHousehold" column="SOCIAL_HOUSEHOLD"/>
    <result property="socialSecurityNo" column="SOCIAL_SECURITY_NO"/>
    <result property="socialPayAddr" column="SOCIAL_PAY_ADDR"/>
    <result property="socialPayMonth" column="SOCIAL_PAY_MONTH"/>
    <result property="socialCreateMonth" column="SOCIAL_CREATE_MONTH"/>
    <result property="lockStatus" column="LOCK_STATUS"/>
    <result property="socialSettlementFlag" column="SOCIAL_SETTLEMENT_FLAG"/>
    <result property="fundSettlementFlag" column="FUND_SETTLEMENT_FLAG"/>
    <result property="sumAll" column="SUM_ALL"/>
    <result property="providentPayMonth" column="PROVIDENT_PAY_MONTH"/>
    <result property="providentCreateMonth" column="PROVIDENT_CREATE_MONTH"/>
    <result property="providentHousehold" column="PROVIDENT_HOUSEHOLD"/>
    <result property="providentPayAddr" column="PROVIDENT_PAY_ADDR"/>
    <result property="fundProvince" column="FUND_PROVINCE"/>
    <result property="fundCity" column="FUND_CITY"/>
    <result property="fundTown" column="FUND_TOWN"/>
    <result property="socialProvince" column="SOCIAL_PROVINCE"/>
    <result property="socialCity" column="SOCIAL_CITY"/>
    <result property="socialTown" column="SOCIAL_TOWN"/>
    <result property="socialId" column="SOCIAL_ID"/>
    <result property="fundId" column="FUND_ID"/>
    <result property="socialSum" column="SOCIAL_SUM"/>
    <result property="unitSocialSum" column="UNIT_SOCIAL_SUM"/>
    <result property="socialSecurityPersonalSum" column="SOCIAL_SECURITY_PERSONAL_SUM"/>
    <result property="providentSum" column="PROVIDENT_SUM"/>
    <result property="socialSettlementId" column="SOCIAL_SETTLEMENT_ID"/>
    <result property="fundSettlementId" column="FUND_SETTLEMENT_ID"/>
    <result property="salarySocialFlag" column="SALARY_SOCIAL_FLAG"/>
    <result property="salaryFundFlag" column="SALARY_FUND_FLAG"/>
    <result property="inauguralTeam" column="INAUGURAL_TEAM"/>
    <result property="telecomNumber" column="TELECOM_NUMBER"/>
    <result property="sortTime" column="SORT_TIME"/>
    <result property="agentId" column="AGENT_ID"/>
    <result property="financeBillId" column="FINANCE_BILL_ID"/>
    <result property="createBy" column="CREATE_BY"/>
    <result property="updateBy" column="UPDATE_BY"/>
    <result property="createName" column="CREATE_NAME"/>
    <result property="createTime" column="CREATE_TIME"/>
    <result property="updateTime" column="UPDATE_TIME"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.ID,
                a.EMP_NAME,
                a.EMP_NO,
                a.EMP_ID,
                a.EMP_IDCARD,
                a.UNIT_ID,
                a.SETTLE_DOMAIN_ID,
                a.SOCIAL_HOUSEHOLD,
                a.SOCIAL_SECURITY_NO,
                a.SOCIAL_PAY_ADDR,
                a.SOCIAL_PAY_MONTH,
                a.SOCIAL_CREATE_MONTH,
                a.LOCK_STATUS,
                a.SOCIAL_SETTLEMENT_FLAG,
                a.FUND_SETTLEMENT_FLAG,
                a.SUM_ALL,
                a.PROVIDENT_PAY_MONTH,
                a.PROVIDENT_CREATE_MONTH,
                a.PROVIDENT_HOUSEHOLD,
                a.PROVIDENT_PAY_ADDR,
                a.FUND_PROVINCE,
                a.FUND_CITY,
                a.FUND_TOWN,
                a.SOCIAL_PROVINCE,
                a.SOCIAL_CITY,
                a.SOCIAL_TOWN,
                a.SOCIAL_ID,
                a.FUND_ID,
                a.SOCIAL_SUM,
                a.UNIT_SOCIAL_SUM,
                a.SOCIAL_SECURITY_PERSONAL_SUM,
                a.PROVIDENT_SUM,
                a.SOCIAL_SETTLEMENT_ID,
                a.FUND_SETTLEMENT_ID,
                a.SALARY_SOCIAL_FLAG,
                a.SALARY_FUND_FLAG,
                a.INAUGURAL_TEAM,
                a.TELECOM_NUMBER,
                a.SORT_TIME,
                a.AGENT_ID,
                a.FINANCE_BILL_ID,
                a.CREATE_BY,
                a.UPDATE_BY,
                a.CREATE_NAME,
                a.CREATE_TIME,
                a.UPDATE_TIME
    </sql>
    <sql id="tPaymentInfo_where">
        <if test="tPaymentInfo != null">
                    <if test="tPaymentInfo.id != null and tPaymentInfo.id.trim() != ''">
                        AND a.ID = #{tPaymentInfo.id}
                    </if>
                    <if test="tPaymentInfo.empName != null and tPaymentInfo.empName.trim() != ''">
                        AND a.EMP_NAME = #{tPaymentInfo.empName}
                    </if>
                    <if test="tPaymentInfo.empNo != null and tPaymentInfo.empNo.trim() != ''">
                        AND a.EMP_NO = #{tPaymentInfo.empNo}
                    </if>
                    <if test="tPaymentInfo.empId != null and tPaymentInfo.empId.trim() != ''">
                        AND a.EMP_ID = #{tPaymentInfo.empId}
                    </if>
                    <if test="tPaymentInfo.empIdcard != null and tPaymentInfo.empIdcard.trim() != ''">
                        AND a.EMP_IDCARD = #{tPaymentInfo.empIdcard}
                    </if>
                    <if test="tPaymentInfo.unitId != null and tPaymentInfo.unitId.trim() != ''">
                        AND a.UNIT_ID = #{tPaymentInfo.unitId}
                    </if>
                    <if test="tPaymentInfo.settleDomainId != null and tPaymentInfo.settleDomainId.trim() != ''">
                        AND a.SETTLE_DOMAIN_ID = #{tPaymentInfo.settleDomainId}
                    </if>
                    <if test="tPaymentInfo.socialHousehold != null and tPaymentInfo.socialHousehold.trim() != ''">
                        AND a.SOCIAL_HOUSEHOLD = #{tPaymentInfo.socialHousehold}
                    </if>
                    <if test="tPaymentInfo.socialSecurityNo != null and tPaymentInfo.socialSecurityNo.trim() != ''">
                        AND a.SOCIAL_SECURITY_NO = #{tPaymentInfo.socialSecurityNo}
                    </if>
                    <if test="tPaymentInfo.socialPayAddr != null and tPaymentInfo.socialPayAddr.trim() != ''">
                        AND a.SOCIAL_PAY_ADDR = #{tPaymentInfo.socialPayAddr}
                    </if>
                    <if test="tPaymentInfo.socialPayMonth != null and tPaymentInfo.socialPayMonth.trim() != ''">
                        AND a.SOCIAL_PAY_MONTH = #{tPaymentInfo.socialPayMonth}
                    </if>
                    <if test="tPaymentInfo.socialCreateMonth != null and tPaymentInfo.socialCreateMonth.trim() != ''">
                        AND a.SOCIAL_CREATE_MONTH = #{tPaymentInfo.socialCreateMonth}
                    </if>
                    <if test="tPaymentInfo.lockStatus != null and tPaymentInfo.lockStatus.trim() != ''">
                        AND a.LOCK_STATUS = #{tPaymentInfo.lockStatus}
                    </if>
                    <if test="tPaymentInfo.socialSettlementFlag != null and tPaymentInfo.socialSettlementFlag.trim() != ''">
                        AND a.SOCIAL_SETTLEMENT_FLAG = #{tPaymentInfo.socialSettlementFlag}
                    </if>
                    <if test="tPaymentInfo.fundSettlementFlag != null and tPaymentInfo.fundSettlementFlag.trim() != ''">
                        AND a.FUND_SETTLEMENT_FLAG = #{tPaymentInfo.fundSettlementFlag}
                    </if>
                    <if test="tPaymentInfo.sumAll != null">
                        AND a.SUM_ALL = #{tPaymentInfo.sumAll}
                    </if>
                    <if test="tPaymentInfo.providentPayMonth != null and tPaymentInfo.providentPayMonth.trim() != ''">
                        AND a.PROVIDENT_PAY_MONTH = #{tPaymentInfo.providentPayMonth}
                    </if>
                    <if test="tPaymentInfo.providentCreateMonth != null and tPaymentInfo.providentCreateMonth.trim() != ''">
                        AND a.PROVIDENT_CREATE_MONTH = #{tPaymentInfo.providentCreateMonth}
                    </if>
                    <if test="tPaymentInfo.providentHousehold != null and tPaymentInfo.providentHousehold.trim() != ''">
                        AND a.PROVIDENT_HOUSEHOLD = #{tPaymentInfo.providentHousehold}
                    </if>
                    <if test="tPaymentInfo.providentPayAddr != null and tPaymentInfo.providentPayAddr.trim() != ''">
                        AND a.PROVIDENT_PAY_ADDR = #{tPaymentInfo.providentPayAddr}
                    </if>
                    <if test="tPaymentInfo.fundProvince != null and tPaymentInfo.fundProvince.trim() != ''">
                        AND a.FUND_PROVINCE = #{tPaymentInfo.fundProvince}
                    </if>
                    <if test="tPaymentInfo.fundCity != null and tPaymentInfo.fundCity.trim() != ''">
                        AND a.FUND_CITY = #{tPaymentInfo.fundCity}
                    </if>
                    <if test="tPaymentInfo.fundTown != null and tPaymentInfo.fundTown.trim() != ''">
                        AND a.FUND_TOWN = #{tPaymentInfo.fundTown}
                    </if>
                    <if test="tPaymentInfo.socialProvince != null and tPaymentInfo.socialProvince.trim() != ''">
                        AND a.SOCIAL_PROVINCE = #{tPaymentInfo.socialProvince}
                    </if>
                    <if test="tPaymentInfo.socialCity != null and tPaymentInfo.socialCity.trim() != ''">
                        AND a.SOCIAL_CITY = #{tPaymentInfo.socialCity}
                    </if>
                    <if test="tPaymentInfo.socialTown != null and tPaymentInfo.socialTown.trim() != ''">
                        AND a.SOCIAL_TOWN = #{tPaymentInfo.socialTown}
                    </if>
                    <if test="tPaymentInfo.socialId != null and tPaymentInfo.socialId.trim() != ''">
                        AND a.SOCIAL_ID = #{tPaymentInfo.socialId}
                    </if>
                    <if test="tPaymentInfo.fundId != null and tPaymentInfo.fundId.trim() != ''">
                        AND a.FUND_ID = #{tPaymentInfo.fundId}
                    </if>
                    <if test="tPaymentInfo.socialSum != null">
                        AND a.SOCIAL_SUM = #{tPaymentInfo.socialSum}
                    </if>
                    <if test="tPaymentInfo.unitSocialSum != null">
                        AND a.UNIT_SOCIAL_SUM = #{tPaymentInfo.unitSocialSum}
                    </if>
                    <if test="tPaymentInfo.socialSecurityPersonalSum != null">
                        AND a.SOCIAL_SECURITY_PERSONAL_SUM = #{tPaymentInfo.socialSecurityPersonalSum}
                    </if>
                    <if test="tPaymentInfo.providentSum != null">
                        AND a.PROVIDENT_SUM = #{tPaymentInfo.providentSum}
                    </if>
                    <if test="tPaymentInfo.socialSettlementId != null and tPaymentInfo.socialSettlementId.trim() != ''">
                        AND a.SOCIAL_SETTLEMENT_ID = #{tPaymentInfo.socialSettlementId}
                    </if>
                    <if test="tPaymentInfo.fundSettlementId != null and tPaymentInfo.fundSettlementId.trim() != ''">
                        AND a.FUND_SETTLEMENT_ID = #{tPaymentInfo.fundSettlementId}
                    </if>
                    <if test="tPaymentInfo.salarySocialFlag != null and tPaymentInfo.salarySocialFlag.trim() != ''">
                        AND a.SALARY_SOCIAL_FLAG = #{tPaymentInfo.salarySocialFlag}
                    </if>
                    <if test="tPaymentInfo.salaryFundFlag != null and tPaymentInfo.salaryFundFlag.trim() != ''">
                        AND a.SALARY_FUND_FLAG = #{tPaymentInfo.salaryFundFlag}
                    </if>
                    <if test="tPaymentInfo.inauguralTeam != null and tPaymentInfo.inauguralTeam.trim() != ''">
                        AND a.INAUGURAL_TEAM = #{tPaymentInfo.inauguralTeam}
                    </if>
                    <if test="tPaymentInfo.telecomNumber != null and tPaymentInfo.telecomNumber.trim() != ''">
                        AND a.TELECOM_NUMBER = #{tPaymentInfo.telecomNumber}
                    </if>
                    <if test="tPaymentInfo.sortTime != null and tPaymentInfo.sortTime.trim() != ''">
                        AND a.SORT_TIME = #{tPaymentInfo.sortTime}
                    </if>
                    <if test="tPaymentInfo.agentId != null and tPaymentInfo.agentId.trim() != ''">
                        AND a.AGENT_ID = #{tPaymentInfo.agentId}
                    </if>
                    <if test="tPaymentInfo.financeBillId != null and tPaymentInfo.financeBillId.trim() != ''">
                        AND a.FINANCE_BILL_ID = #{tPaymentInfo.financeBillId}
                    </if>
                    <if test="tPaymentInfo.createBy != null and tPaymentInfo.createBy.trim() != ''">
                        AND a.CREATE_BY = #{tPaymentInfo.createBy}
                    </if>
                    <if test="tPaymentInfo.updateBy != null and tPaymentInfo.updateBy.trim() != ''">
                        AND a.UPDATE_BY = #{tPaymentInfo.updateBy}
                    </if>
                    <if test="tPaymentInfo.createName != null and tPaymentInfo.createName.trim() != ''">
                        AND a.CREATE_NAME = #{tPaymentInfo.createName}
                    </if>
                    <if test="tPaymentInfo.createTime != null">
                        AND a.CREATE_TIME = #{tPaymentInfo.createTime}
                    </if>
                    <if test="tPaymentInfo.updateTime != null">
                        AND a.UPDATE_TIME = #{tPaymentInfo.updateTime}
                    </if>
        </if>
    </sql>
    <!--tPaymentInfo简单分页查询-->
    <select id="getTPaymentInfoPage" resultMap="tPaymentInfoMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_payment_info a
        <where>
            1=1
            <include refid="tPaymentInfo_where"/>
        </where>
    </select>
</mapper>