| 对比新文件 |
| | |
| | | <?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.ruoyi.account.mapper.purchase.AccountPurchasePaymentMapper"> |
| | | |
| | | <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.pojo.purchase.AccountPurchasePayment"> |
| | | <id column="id" property="id" /> |
| | | <result column="account_payment_application_id" property="accountPaymentApplicationId" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="dept_id" property="deptId" /> |
| | | <result column="supplier_id" property="supplierId" /> |
| | | <result column="payment_date" property="paymentDate" /> |
| | | <result column="payment_method" property="paymentMethod" /> |
| | | <result column="payment_amount" property="paymentAmount" /> |
| | | <result column="payment_number" property="paymentNumber" /> |
| | | <result column="remark" property="remark" /> |
| | | </resultMap> |
| | | <select id="listPageAccountPurchasePayment" |
| | | resultType="com.ruoyi.account.bean.vo.purchase.AccountPurchasePaymentVo"> |
| | | select app.*, |
| | | sm.supplier_name, |
| | | sm.bank_account_num, |
| | | sm.bank_account_name, |
| | | apa.invoice_application_no AS invoiceApplicationNo, |
| | | if(asd.receipt_number is not null, true, false) as isAccountStatemen |
| | | from account_purchase_payment app |
| | | left join supplier_manage sm on app.supplier_id = sm.id |
| | | left join account_payment_application apa on app.account_payment_application_id=apa.id |
| | | left join account_statement_details asd on app.payment_number = asd.receipt_number |
| | | <where> |
| | | <if test="req.supplierId != null"> |
| | | AND app.supplier_id = #{req.supplierId} |
| | | </if> |
| | | <if test="req.paymentMethod != null and req.paymentMethod != ''"> |
| | | AND app.payment_method LIKE CONCAT('%',#{req.paymentMethod},'%') |
| | | </if> |
| | | <if test="req.paymentNumber != null and req.paymentNumber != ''"> |
| | | AND app.payment_number LIKE CONCAT('%',#{req.paymentNumber},'%') |
| | | </if> |
| | | <if test="req.startDate != null and req.endDate != null"> |
| | | AND app.payment_date BETWEEN #{req.startDate} AND #{req.endDate} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="selectPayment" resultType="com.ruoyi.home.dto.IncomeExpenseAnalysisDto"> |
| | | SELECT DATE_FORMAT(payment_date, #{dateFormat}) AS dateStr, |
| | | IFNULL(SUM(payment_amount), 0) AS amount |
| | | FROM account_purchase_payment |
| | | WHERE payment_date BETWEEN #{startStr} AND #{endStr} |
| | | GROUP BY dateStr |
| | | ORDER BY dateStr |
| | | </select> |
| | | |
| | | </mapper> |