TAutoPaymentDetailMapper.xml 8.46 KB
Newer Older
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
<?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.TAutoPaymentDetailMapper">

  <resultMap id="tAutoPaymentDetailMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.TAutoPaymentDetail">
    <id property="id" column="ID"/>
    <result property="repeatHandleFlag" column="REPEAT_HANDLE_FLAG"/>
    <result property="empName" column="EMP_NAME"/>
    <result property="certType" column="CERT_TYPE"/>
    <result property="certNum" column="CERT_NUM"/>
    <result property="paymentSalary" column="PAYMENT_SALARY"/>
    <result property="paymentBase" column="PAYMENT_BASE"/>
    <result property="rate" column="RATE"/>
    <result property="payLimit" column="PAY_LIMIT"/>
    <result property="empCode" column="EMP_CODE"/>
    <result property="insuranceType" column="INSURANCE_TYPE"/>
    <result property="payMonth" column="PAY_MONTH"/>
    <result property="createMonth" column="CREATE_MONTH"/>
    <result property="socialAddress" column="SOCIAL_ADDRESS"/>
    <result property="socialSecurityAccount" column="SOCIAL_SECURITY_ACCOUNT"/>
    <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="parentId" column="PARENT_ID"/>
48
    <result property="sourceType" column="SOURCE_TYPE"/>
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
  </resultMap>
    <sql id="Base_Column_List">
                a.ID,
                a.REPEAT_HANDLE_FLAG,
                a.EMP_NAME,
                a.CERT_TYPE,
                a.CERT_NUM,
                a.PAYMENT_SALARY,
                a.PAYMENT_BASE,
                a.RATE,
                a.PAY_LIMIT,
                a.EMP_CODE,
                a.INSURANCE_TYPE,
                a.PAY_MONTH,
                a.CREATE_MONTH,
                a.SOCIAL_ADDRESS,
                a.SOCIAL_SECURITY_ACCOUNT,
                a.CREATE_BY,
                a.CREATE_NAME,
                a.CREATE_TIME,
                a.UPDATE_BY,
                a.UPDATE_TIME,
71
                a.SOURCE_TYPE,
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
                a.PARENT_ID
    </sql>
    <sql id="tAutoPaymentDetail_where">
        <if test="tAutoPaymentDetail != null">
                    <if test="tAutoPaymentDetail.id != null and tAutoPaymentDetail.id.trim() != ''">
                        AND a.ID = #{tAutoPaymentDetail.id}
                    </if>
                    <if test="tAutoPaymentDetail.repeatHandleFlag != null and tAutoPaymentDetail.repeatHandleFlag.trim() != ''">
                        AND a.REPEAT_HANDLE_FLAG = #{tAutoPaymentDetail.repeatHandleFlag}
                    </if>
                    <if test="tAutoPaymentDetail.empName != null and tAutoPaymentDetail.empName.trim() != ''">
                        AND a.EMP_NAME = #{tAutoPaymentDetail.empName}
                    </if>
                    <if test="tAutoPaymentDetail.certType != null and tAutoPaymentDetail.certType.trim() != ''">
                        AND a.CERT_TYPE = #{tAutoPaymentDetail.certType}
                    </if>
                    <if test="tAutoPaymentDetail.certNum != null and tAutoPaymentDetail.certNum.trim() != ''">
                        AND a.CERT_NUM = #{tAutoPaymentDetail.certNum}
                    </if>
                    <if test="tAutoPaymentDetail.paymentSalary != null">
                        AND a.PAYMENT_SALARY = #{tAutoPaymentDetail.paymentSalary}
                    </if>
                    <if test="tAutoPaymentDetail.paymentBase != null">
                        AND a.PAYMENT_BASE = #{tAutoPaymentDetail.paymentBase}
                    </if>
                    <if test="tAutoPaymentDetail.rate != null and tAutoPaymentDetail.rate.trim() != ''">
                        AND a.RATE = #{tAutoPaymentDetail.rate}
                    </if>
                    <if test="tAutoPaymentDetail.payLimit != null">
                        AND a.PAY_LIMIT = #{tAutoPaymentDetail.payLimit}
                    </if>
                    <if test="tAutoPaymentDetail.empCode != null and tAutoPaymentDetail.empCode.trim() != ''">
                        AND a.EMP_CODE = #{tAutoPaymentDetail.empCode}
                    </if>
                    <if test="tAutoPaymentDetail.insuranceType != null and tAutoPaymentDetail.insuranceType.trim() != ''">
                        AND a.INSURANCE_TYPE = #{tAutoPaymentDetail.insuranceType}
                    </if>
                    <if test="tAutoPaymentDetail.payMonth != null and tAutoPaymentDetail.payMonth.trim() != ''">
                        AND a.PAY_MONTH = #{tAutoPaymentDetail.payMonth}
                    </if>
                    <if test="tAutoPaymentDetail.createMonth != null and tAutoPaymentDetail.createMonth.trim() != ''">
                        AND a.CREATE_MONTH = #{tAutoPaymentDetail.createMonth}
                    </if>
                    <if test="tAutoPaymentDetail.socialAddress != null and tAutoPaymentDetail.socialAddress.trim() != ''">
                        AND a.SOCIAL_ADDRESS = #{tAutoPaymentDetail.socialAddress}
                    </if>
                    <if test="tAutoPaymentDetail.socialSecurityAccount != null and tAutoPaymentDetail.socialSecurityAccount.trim() != ''">
                        AND a.SOCIAL_SECURITY_ACCOUNT = #{tAutoPaymentDetail.socialSecurityAccount}
                    </if>
                    <if test="tAutoPaymentDetail.createBy != null and tAutoPaymentDetail.createBy.trim() != ''">
                        AND a.CREATE_BY = #{tAutoPaymentDetail.createBy}
                    </if>
                    <if test="tAutoPaymentDetail.createName != null and tAutoPaymentDetail.createName.trim() != ''">
                        AND a.CREATE_NAME = #{tAutoPaymentDetail.createName}
                    </if>
                    <if test="tAutoPaymentDetail.createTime != null">
                        AND a.CREATE_TIME = #{tAutoPaymentDetail.createTime}
                    </if>
                    <if test="tAutoPaymentDetail.updateBy != null and tAutoPaymentDetail.updateBy.trim() != ''">
                        AND a.UPDATE_BY = #{tAutoPaymentDetail.updateBy}
                    </if>
                    <if test="tAutoPaymentDetail.updateTime != null">
                        AND a.UPDATE_TIME = #{tAutoPaymentDetail.updateTime}
                    </if>
                    <if test="tAutoPaymentDetail.parentId != null and tAutoPaymentDetail.parentId.trim() != ''">
                        AND a.PARENT_ID = #{tAutoPaymentDetail.parentId}
                    </if>
        </if>
    </sql>
    <!--tAutoPaymentDetail简单分页查询-->
    <select id="getTAutoPaymentDetailPage" resultMap="tAutoPaymentDetailMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_auto_payment_detail a
        <where>
            1=1
            <include refid="tAutoPaymentDetail_where"/>
        </where>
    </select>
151 152

	<delete id="deleteByParentId">
153
		delete from t_auto_payment_detail where PARENT_ID = #{parentId} and SOURCE_TYPE = #{sourceType}
154 155
	</delete>

156 157 158 159 160 161 162 163 164 165

	<!--tAutoPaymentDetail简单分页查询-->
	<select id="getListByParentId" resultMap="tAutoPaymentDetailMap">
		SELECT
			<include refid="Base_Column_List"/>
		FROM t_auto_payment_detail a
		where PARENT_ID = #{parentId} and REPEAT_HANDLE_FLAG = '0'
		order by a.SOURCE_TYPE,a.CERT_NUM
	</select>

166 167 168 169 170 171 172 173
	<!--tAutoPaymentDetail简单分页查询-->
	<select id="getCountByParentId" resultType="java.lang.Integer">
		SELECT
			count(1)
		FROM t_auto_payment_detail a
		where PARENT_ID = #{parentId} and REPEAT_HANDLE_FLAG = '0'
	</select>

174
</mapper>