2024-04-24 05:36:51 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.xdadan.erp.emis.mapper.EmisMonthpayUseApplyMapper">
|
|
|
|
|
|
2024-06-02 02:57:46 +00:00
|
|
|
<resultMap type="EmisMonthpayUseApply" id="EmisMonthpayUseApplyResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
2024-04-24 05:36:51 +00:00
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="custNo" column="cust_no" />
|
|
|
|
|
<result property="customerCode" column="customer_code" />
|
|
|
|
|
<result property="applySeq" column="apply_seq" />
|
|
|
|
|
<result property="applyDate" column="apply_date" />
|
|
|
|
|
<result property="applyName" column="apply_name" />
|
|
|
|
|
<result property="auditDate" column="audit_date" />
|
|
|
|
|
<result property="auditStatus" column="audit_status" />
|
|
|
|
|
<result property="auditReson" column="audit_reson" />
|
|
|
|
|
<result property="auditBy" column="audit_by" />
|
|
|
|
|
<result property="msgCode" column="msg_code" />
|
2024-06-02 02:57:46 +00:00
|
|
|
|
2024-04-24 05:36:51 +00:00
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectEmisMonthpayUseApplyVo">
|
|
|
|
|
select id, cust_no, customer_code, apply_seq, apply_date, apply_name, audit_date, audit_status, audit_reson, audit_by, msg_code, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_monthpay_use_apply
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectEmisMonthpayUseApplyList" parameterType="EmisMonthpayUseApply" resultMap="EmisMonthpayUseApplyResult">
|
|
|
|
|
<include refid="selectEmisMonthpayUseApplyVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="id != null "> and id = #{id}</if>
|
|
|
|
|
<if test="custNo != null and custNo != ''"> and cust_no like concat('%', #{custNo}, '%')</if>
|
|
|
|
|
<if test="customerCode != null and customerCode != ''"> and customer_code like concat('%', #{customerCode}, '%')</if>
|
|
|
|
|
<if test="applySeq != null and applySeq != ''"> and apply_seq like concat('%', #{applySeq}, '%')</if>
|
|
|
|
|
<if test="applyDate != null "> and apply_date = #{applyDate}</if>
|
|
|
|
|
<if test="applyName != null and applyName != ''"> and apply_name like concat('%', #{applyName}, '%')</if>
|
|
|
|
|
<if test="auditDate != null "> and audit_date = #{auditDate}</if>
|
|
|
|
|
<if test="auditStatus != null "> and audit_status = #{auditStatus}</if>
|
|
|
|
|
<if test="auditReson != null and auditReson != ''"> and audit_reson like concat('%', #{auditReson}, '%')</if>
|
|
|
|
|
<if test="auditBy != null and auditBy != ''"> and audit_by like concat('%', #{auditBy}, '%')</if>
|
|
|
|
|
<if test="msgCode != null and msgCode != ''"> and msg_code like concat('%', #{msgCode}, '%')</if>
|
|
|
|
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
|
|
|
|
<if test="tenantId != null and tenantId != ''"> and tenant_id like concat('%', #{tenantId}, '%')</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
|
|
|
|
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
|
|
|
|
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
|
|
|
|
<if test="createSite != null and createSite != ''"> and create_site like concat('%', #{createSite}, '%')</if>
|
|
|
|
|
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectEmisMonthpayUseApplyById" parameterType="Long" resultMap="EmisMonthpayUseApplyResult">
|
|
|
|
|
select id, cust_no, customer_code, apply_seq, apply_date, apply_name, audit_date, audit_status, audit_reson, audit_by, msg_code, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
|
|
|
|
from emis_monthpay_use_apply a
|
|
|
|
|
where a.id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertEmisMonthpayUseApply" parameterType="EmisMonthpayUseApply">
|
|
|
|
|
insert into emis_monthpay_use_apply
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">id,</if>
|
|
|
|
|
<if test="custNo != null and custNo != ''">cust_no,</if>
|
|
|
|
|
<if test="customerCode != null and customerCode != ''">customer_code,</if>
|
|
|
|
|
<if test="applySeq != null and applySeq != ''">apply_seq,</if>
|
|
|
|
|
<if test="applyDate != null">apply_date,</if>
|
|
|
|
|
<if test="applyName != null and applyName != ''">apply_name,</if>
|
|
|
|
|
<if test="auditDate != null">audit_date,</if>
|
|
|
|
|
<if test="auditStatus != null">audit_status,</if>
|
|
|
|
|
<if test="auditReson != null and auditReson != ''">audit_reson,</if>
|
|
|
|
|
<if test="auditBy != null and auditBy != ''">audit_by,</if>
|
|
|
|
|
<if test="msgCode != null and msgCode != ''">msg_code,</if>
|
|
|
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
|
|
|
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
|
|
<if test="createSite != null and createSite != ''">create_site,</if>
|
|
|
|
|
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">#{id},</if>
|
|
|
|
|
<if test="custNo != null and custNo != ''">#{custNo},</if>
|
|
|
|
|
<if test="customerCode != null and customerCode != ''">#{customerCode},</if>
|
|
|
|
|
<if test="applySeq != null and applySeq != ''">#{applySeq},</if>
|
|
|
|
|
<if test="applyDate != null">#{applyDate},</if>
|
|
|
|
|
<if test="applyName != null and applyName != ''">#{applyName},</if>
|
|
|
|
|
<if test="auditDate != null">#{auditDate},</if>
|
|
|
|
|
<if test="auditStatus != null">#{auditStatus},</if>
|
|
|
|
|
<if test="auditReson != null and auditReson != ''">#{auditReson},</if>
|
|
|
|
|
<if test="auditBy != null and auditBy != ''">#{auditBy},</if>
|
|
|
|
|
<if test="msgCode != null and msgCode != ''">#{msgCode},</if>
|
|
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
|
|
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
|
|
|
|
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateEmisMonthpayUseApply" parameterType="EmisMonthpayUseApply">
|
|
|
|
|
update emis_monthpay_use_apply
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="custNo != null and custNo != ''">cust_no = #{custNo},</if>
|
|
|
|
|
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
|
|
|
|
|
<if test="applySeq != null and applySeq != ''">apply_seq = #{applySeq},</if>
|
|
|
|
|
<if test="applyDate != null">apply_date = #{applyDate},</if>
|
|
|
|
|
<if test="applyName != null and applyName != ''">apply_name = #{applyName},</if>
|
|
|
|
|
<if test="auditDate != null">audit_date = #{auditDate},</if>
|
|
|
|
|
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
|
|
|
|
<if test="auditReson != null and auditReson != ''">audit_reson = #{auditReson},</if>
|
|
|
|
|
<if test="auditBy != null and auditBy != ''">audit_by = #{auditBy},</if>
|
|
|
|
|
<if test="msgCode != null and msgCode != ''">msg_code = #{msgCode},</if>
|
|
|
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
|
|
|
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
|
|
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
|
|
|
|
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteEmisMonthpayUseApplyById" parameterType="Long">
|
|
|
|
|
delete from emis_monthpay_use_apply where id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteEmisMonthpayUseApplyByIds" parameterType="String">
|
|
|
|
|
delete from emis_monthpay_use_apply where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</mapper>
|