|
@@ -25,40 +25,40 @@
|
|
|
fine_id, refund_amount, refund_reason, statue, user_id, refund_date
|
|
|
</sql>
|
|
|
|
|
|
- <!--条件分页查询罚款退款记录-->
|
|
|
- <select id="selectPage" resultType="com.dayou.vo.FinanceFineRefundVO">
|
|
|
+ <sql id="financeFineRefundVOSql">
|
|
|
SELECT refund.id AS id,
|
|
|
- refund.fine_id AS fineId,
|
|
|
- oFund.order_id AS orderId,
|
|
|
- oFund.order_name AS orderName,
|
|
|
- <if test="dto != null and dto.businessType == 'ASSET_BUSINESS' or dto.businessType == 'MAJOR_BUSINESS'">
|
|
|
- pFund.production_no AS productionNo,
|
|
|
- `order`.bailor AS bailor,
|
|
|
- </if>
|
|
|
- <if test="dto != null and dto.businessType == 'PERSONAL_BUSINESS'">
|
|
|
- `order`.order_id AS productionNo,
|
|
|
- CONCAT(`order`.bailorA, IF(`order`.bailorB IS NOT NULL AND `order`.bailorB != '', ',', ''), `order`.bailorB) AS bailor,
|
|
|
- </if>
|
|
|
- <if test="dto != null and dto.businessType == 'ASSET_BUSINESS'">
|
|
|
- CASE pFund.production_type WHEN 'LETTER' THEN '意见函' WHEN 'CONSULT' THEN '咨询报告' WHEN 'REPORT' THEN '评估报告' ELSE '-' END AS productionType,
|
|
|
- </if>
|
|
|
- <if test="dto != null and dto.businessType == 'MAJOR_BUSINESS'">
|
|
|
- CASE pFund.production_type WHEN 'LETTER' THEN '复评函' WHEN 'REPORT' THEN '报告' WHEN 'STATEMENT' THEN '价值意见书' ELSE '-' END AS productionType,
|
|
|
- </if>
|
|
|
- <if test="dto != null and dto.businessType == 'PERSONAL_BUSINESS'">
|
|
|
- CASE pro.production WHEN 'FINAL' THEN '结果报告' WHEN 'TECHNIC' THEN '技术报告' ELSE '-' END AS productionType,
|
|
|
- </if>
|
|
|
- user.name AS clientManagerName,
|
|
|
- customer.name AS customerName,
|
|
|
- subCustomer.name AS customerSubName,
|
|
|
- fine.real_fine_amount AS finedAmount,
|
|
|
- refund.refund_amount AS refundAmount,
|
|
|
- refund.refund_date AS refundDate,
|
|
|
- refund.refund_amount AS refundAmount,
|
|
|
- refund.refund_reason AS refundReason,
|
|
|
- refund.status AS status,
|
|
|
- operator.name AS operator,
|
|
|
- refund.refund_date AS refundDate
|
|
|
+ refund.fine_id AS fineId,
|
|
|
+ oFund.order_id AS orderId,
|
|
|
+ oFund.order_name AS orderName,
|
|
|
+ <if test="dto != null and dto.businessType == 'ASSET_BUSINESS' or dto.businessType == 'MAJOR_BUSINESS'">
|
|
|
+ pFund.production_no AS productionNo,
|
|
|
+ `order`.bailor AS bailor,
|
|
|
+ </if>
|
|
|
+ <if test="dto != null and dto.businessType == 'PERSONAL_BUSINESS'">
|
|
|
+ `order`.order_id AS productionNo,
|
|
|
+ CONCAT(`order`.bailorA, IF(`order`.bailorB IS NOT NULL AND `order`.bailorB != '', ',', ''), `order`.bailorB) AS bailor,
|
|
|
+ </if>
|
|
|
+ <if test="dto != null and dto.businessType == 'ASSET_BUSINESS'">
|
|
|
+ CASE pFund.production_type WHEN 'LETTER' THEN '意见函' WHEN 'CONSULT' THEN '咨询报告' WHEN 'REPORT' THEN '评估报告' ELSE '-' END AS productionType,
|
|
|
+ </if>
|
|
|
+ <if test="dto != null and dto.businessType == 'MAJOR_BUSINESS'">
|
|
|
+ CASE pFund.production_type WHEN 'LETTER' THEN '复评函' WHEN 'REPORT' THEN '报告' WHEN 'STATEMENT' THEN '价值意见书' ELSE '-' END AS productionType,
|
|
|
+ </if>
|
|
|
+ <if test="dto != null and dto.businessType == 'PERSONAL_BUSINESS'">
|
|
|
+ CASE pro.production WHEN 'FINAL' THEN '结果报告' WHEN 'TECHNIC' THEN '技术报告' ELSE '-' END AS productionType,
|
|
|
+ </if>
|
|
|
+ user.name AS clientManagerName,
|
|
|
+ customer.name AS customerName,
|
|
|
+ subCustomer.name AS customerSubName,
|
|
|
+ fine.real_fine_amount AS finedAmount,
|
|
|
+ fine.created AS punishDate,
|
|
|
+ refund.refund_amount AS refundAmount,
|
|
|
+ refund.refund_date AS refundDate,
|
|
|
+ refund.refund_amount AS refundAmount,
|
|
|
+ refund.refund_reason AS refundReason,
|
|
|
+ refund.status AS status,
|
|
|
+ operator.name AS operator,
|
|
|
+ refund.refund_date AS refundDate
|
|
|
FROM finance_fine_refund AS refund
|
|
|
LEFT JOIN finance_fine AS fine ON fine.deleted = 0 AND fine.id = refund.fine_id
|
|
|
LEFT JOIN order_fund AS oFund ON oFund.deleted = 0 AND oFund.id = fine.order_fund_id
|
|
@@ -109,6 +109,16 @@
|
|
|
<if test="dto != null and dto.startRefundDate != null and dto.startRefundDate!= null">
|
|
|
AND refund.refund_date BETWEEN #{dto.startRefundDate} AND #{dto.startRefundDate}
|
|
|
</if>
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!--条件分页查询罚款退款记录-->
|
|
|
+ <select id="selectPage" resultType="com.dayou.vo.FinanceFineRefundVO">
|
|
|
+ <include refid="financeFineRefundVOSql" />
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--导出罚款退款记录-->
|
|
|
+ <select id="exportList" resultType="com.dayou.vo.FinanceFineRefundVO">
|
|
|
+ <include refid="financeFineRefundVOSql" />
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|