huminmin
8 天以前 a723ddd9b7cfefc94af4f15c1f9f30e59cd38ecc
src/main/resources/mapper/account/sales/AccountSalesCollectionMapper.xml
@@ -20,13 +20,17 @@
    </resultMap>
    <select id="listPageAccountSalesCollection"
            resultType="com.ruoyi.account.bean.vo.sales.AccountSalesCollectionVo">
       select * from (select ascc.*,
       select
           A.* ,
           if(asd.receipt_number is not null, true, false) as isAccountStatemen
       from (select ascc.*,
               c.customer_name,
               GROUP_CONCAT(sour.outbound_batches SEPARATOR ',') AS outboundBatches
        from account_sales_collection ascc
        left join customer c on ascc.customer_id = c.id
        left join stock_out_record sour on FIND_IN_SET(sour.id, ascc.stock_out_record_ids) > 0
        GROUP BY ascc.id)A
       left join account_statement_details asd on A.collection_number = asd.receipt_number
         <where>
            <if test="req.customerId != null">
                 AND A.customer_id = #{req.customerId}
@@ -89,7 +93,7 @@
         SELECT DATE_FORMAT(collection_date, #{dateFormat}) AS dateStr,
                IFNULL(SUM(collection_amount), 0)            AS amount
         FROM account_sales_collection
         WHERE collection_date BETWEEN #{startDate} AND #{endDate}
         WHERE collection_date BETWEEN #{startStr} AND #{endStr}
         GROUP BY dateStr
         ORDER BY dateStr
    </select>