|
@@ -29,6 +29,8 @@
|
|
|
<id column="separate_accounts_info_id" property="separateAccountsInfoId"/>
|
|
|
<id column="voucher_no" property="voucherNo"/>
|
|
|
<id column="account_number" property="accountNumber"/>
|
|
|
+ <id column="payer_type" property="payerType"/>
|
|
|
+ <id column="payer_name" property="payerName"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="PageResultMap" type="com.trade.service.finance.disbursement.vo.BillingDisbursementPageVo">
|
|
@@ -55,7 +57,7 @@
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
id
|
|
|
- , voucher_no, account_number
|
|
|
+ , voucher_no, account_number, payer_type, payer_name
|
|
|
, customer_user_id, payment_basic_id, separate_accounts_info_id, business_number, entry_business_number, sales_contract_no, contract_name, importer_cert_no, importer_enterprise_name, agency_cert_no, agency_enterprise_name, financier_identifier, payment_type, status, transaction_number, payment_amount, payment_currency, payment_date, payee_type, source, deleted, gmt_create, gmt_modified
|
|
|
</sql>
|
|
|
<select id="selectByPage"
|
|
@@ -65,10 +67,10 @@
|
|
|
t1.id, t1.sales_contract_no, t1.contract_name, t1.importer_cert_no, t1.importer_enterprise_name,
|
|
|
t1.agency_cert_no, t1.agency_enterprise_name, t1.financier_identifier, t1.payment_type, t1.status,
|
|
|
t1.transaction_number, t1.business_number, t1.payment_amount, t1.payment_currency, t1.payment_date,
|
|
|
- t1.entry_business_number, t1.payee_type, t1.gmt_create
|
|
|
+ t1.entry_business_number, t1.payee_type, t1.gmt_create,
|
|
|
e.name AS enterprise_name, e.customer_identifier_no
|
|
|
from billing_disbursement t1 left join enterprise e on t1.customer_user_id = e.customer_id
|
|
|
- where t1.deleted = 0
|
|
|
+ where t1.deleted = 0 and source = 1
|
|
|
<if test="paymentType != null and paymentType != ''">
|
|
|
AND t1.payment_type = #{paymentType}
|
|
|
</if>
|
|
@@ -99,4 +101,54 @@
|
|
|
ORDER BY t1.gmtCreate DESC
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <resultMap id="PageCResultMap" type="com.trade.service.finance.disbursement.vo.ReceivePaymentPageVo">
|
|
|
+ <id column="id" property="id"/>
|
|
|
+ <id column="business_number" property="businessNumber"/>
|
|
|
+ <id column="sales_contract_no" property="salesContractNo"/>
|
|
|
+ <id column="contract_name" property="contractName"/>
|
|
|
+ <id column="importer_cert_no" property="importerCertNo"/>
|
|
|
+ <id column="importer_enterprise_name" property="importerEnterpriseName"/>
|
|
|
+ <id column="payer_name" property="payerName"/>
|
|
|
+ <id column="payment_type" property="paymentType"/>
|
|
|
+ <id column="payer_type" property="payerType"/>
|
|
|
+ <id column="payment_amount" property="receivePaymentAmount"/>
|
|
|
+ <id column="payment_currency" property="receivePaymentCurrency"/>
|
|
|
+ <id column="payment_date" property="paymentDate"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="selectByPageForCustomer"
|
|
|
+ resultMap="PageCResultMap"
|
|
|
+ resultType="com.trade.service.finance.disbursement.dto.ReceivePaymentSearchDto">
|
|
|
+ select
|
|
|
+ t1.id, t1.sales_contract_no, t1.contract_name, t1.importer_cert_no, t1.importer_enterprise_name,
|
|
|
+ t1.payer_name, t1.payment_type, t1.payer_type,
|
|
|
+ t1.business_number, t1.payment_amount, t1.payment_currency, t1.payment_date
|
|
|
+ from billing_disbursement t1 where t1.deleted = 0
|
|
|
+ <if test="customerUserId != null">
|
|
|
+ AND t1.customer_user_id = #{customerUserId}
|
|
|
+ </if>
|
|
|
+ <if test="paymentType != null and paymentType != ''">
|
|
|
+ AND t1.payment_type = #{paymentType}
|
|
|
+ </if>
|
|
|
+ <if test="agencyCertNo != null and agencyCertNo != ''">
|
|
|
+ AND t1.agency_cert_no = #{agencyCertNo}
|
|
|
+ </if>
|
|
|
+ <if test="payerType != null and payerType != ''">
|
|
|
+ AND t1.payer_type = #{payerType}
|
|
|
+ </if>
|
|
|
+ <if test="contractNo != null and contractNo != ''">
|
|
|
+ AND t1.sales_contract_no = #{contractNo}
|
|
|
+ </if>
|
|
|
+ <if test="payerName != null and payerName != ''">
|
|
|
+ AND t1.payer_name = #{payerName}
|
|
|
+ </if>
|
|
|
+ <if test="beginTime != null">
|
|
|
+ AND t1.payment_date <![CDATA[ >= ]]> #{beginTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ AND t1.payment_date <![CDATA[ <= ]]> #{endTime}
|
|
|
+ </if>
|
|
|
+ ORDER BY t1.payment_date DESC
|
|
|
+ </select>
|
|
|
</mapper>
|