101 lines
5.2 KiB
XML
101 lines
5.2 KiB
XML
<?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.linke.finance.domain.tmsReceipt.repository.mapper.TmsReceiptMapper">
|
|
|
|
<resultMap type="com.linke.finance.domain.tmsReceipt.repository.po.TmsReceiptPO" id="TmsReceiptResult">
|
|
<result property="id" column="id" />
|
|
<result property="topOrganizationId" column="top_organization_id" />
|
|
<result property="organizationId" column="organization_id" />
|
|
<result property="organizationName" column="organization_name" />
|
|
<result property="receivePaymentNumber" column="receive_payment_number" />
|
|
<!--<result property="settlementPartyId" column="settlement_party_id" />-->
|
|
<result property="settlementPartyName" column="settlement_party_name" />
|
|
<result property="departmentName" column="department_name" />
|
|
<!--<result property="settlementPartyType" column="settlement_party_type" />-->
|
|
<result property="receivePaymentAmount" column="receive_payment_amount" />
|
|
<result property="receivePaymentTime" column="receive_payment_time" />
|
|
<result property="receiveVoucherUrl" column="receive_voucher_url" />
|
|
|
|
<result property="assignableAmount" column="assignable_amount" />
|
|
<result property="assignmentStatus" column="assignment_status" />
|
|
<result property="creditAmount" column="credit_amount" />
|
|
<result property="creditReason" column="credit_reason" />
|
|
<result property="serialNumber" column="serial_number" />
|
|
<result property="remark" column="remark" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="delFlag" column="del_flag" />
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTmsReceiptPo">
|
|
select id, top_organization_id,organization_id,organization_name,department_name,settlement_party_name,receive_payment_number, receive_payment_amount,
|
|
assignable_amount,assignment_status,credit_amount,credit_reason, receive_payment_time, serial_number,receive_voucher_url,
|
|
remark, create_by,create_by_name, create_time, update_by,update_by_name, update_time, del_flag from tms_receipt
|
|
</sql>
|
|
|
|
<sql id="selectTmsReceiptPo1">
|
|
<where>
|
|
and del_flag = 1
|
|
<if test="assignmentStatus != null and assignmentStatus > -1">
|
|
and assignment_status = #{assignmentStatus}
|
|
</if>
|
|
<if test="greaterThanAssignmentStatus != null and greaterThanAssignmentStatus > -1">
|
|
and assignment_status > #{greaterThanAssignmentStatus}
|
|
</if>
|
|
<if test="assignableStatusIn != null and assignableStatusIn > -1">
|
|
and assignment_status in (0,1)
|
|
</if>
|
|
<if test="receivePaymentTimeStart != null and receivePaymentTimeStart != ''">
|
|
AND date_format(receive_payment_time,'%Y-%m-%d') >= #{receivePaymentTimeStart}
|
|
</if>
|
|
<if test="receivePaymentTimeEnd != null and receivePaymentTimeEnd != ''">
|
|
AND date_format(receive_payment_time,'%Y-%m-%d') <= #{receivePaymentTimeEnd}
|
|
</if>
|
|
<if test="createTimeStart != null and createTimeStart != ''">
|
|
AND date_format(create_time,'%Y-%m-%d') >= #{createTimeStart}
|
|
</if>
|
|
<if test="createTimeEnd != null and createTimeEnd != ''">
|
|
AND date_format(create_time,'%Y-%m-%d') <= #{createTimeEnd}
|
|
</if>
|
|
|
|
<if test="receivePaymentNumber != null and receivePaymentNumber != ''">
|
|
and receive_payment_number = #{receivePaymentNumber}
|
|
</if>
|
|
<!-- <if test="settlementPartyId != null and settlementPartyId != ''">
|
|
and settlement_party_id = #{settlementPartyId}
|
|
</if>-->
|
|
<if test="settlementPartyName != null and settlementPartyName != ''">
|
|
and settlement_party_name = #{settlementPartyName}
|
|
</if>
|
|
<if test="departmentName != null and departmentName != ''">
|
|
and department_name LIKE CONCAT('%', #{departmentName},'%')
|
|
</if>
|
|
<if test="receivePaymentAmount != null ">
|
|
and receive_payment_amount = #{receivePaymentAmount}
|
|
</if>
|
|
<if test="receivePaymentTime != null ">
|
|
and receive_payment_time = #{receivePaymentTime}
|
|
</if>
|
|
<if test="serialNumber != null and serialNumber != ''">
|
|
and serial_number = #{serialNumber}
|
|
</if>
|
|
<if test="createByName != null and createByName != ''">
|
|
and create_by_name = #{createByName}
|
|
</if>
|
|
<if test="remark != null and remark != ''">
|
|
and remark = #{remark}
|
|
</if>
|
|
order by create_time desc
|
|
</where>
|
|
</sql>
|
|
|
|
<select id="queryList" parameterType="com.linke.finance.domain.tmsReceipt.repository.todo.TmsReceiptDO" resultMap="TmsReceiptResult">
|
|
<include refid="selectTmsReceiptPo"/>
|
|
<include refid="selectTmsReceiptPo1"/>
|
|
</select>
|
|
</mapper> |