gongchunyi
8 小时以前 93b93bacbe43fcd2f13884ec02782baf77193d35
src/main/resources/mapper/sales/SalesLedgerMapper.xml
@@ -55,6 +55,7 @@
        T1.customer_name,
        T1.entry_person,
        T1.remarks,
        T1.customer_remarks,
        T1.attachment_materials,
        T1.tenant_id,
        T1.contract_amount,
@@ -94,8 +95,22 @@
            <if test="salesLedgerDto.stockStatus != null">
                AND T1.stock_status = #{salesLedgerDto.stockStatus}
            </if>
            <if test="salesLedgerDto.width != null or salesLedgerDto.height != null">
                AND EXISTS (
                SELECT 1
                FROM sales_ledger_product SLP
                WHERE SLP.sales_ledger_id = T1.id
                AND SLP.type = 1
                <if test="salesLedgerDto.width != null">
                    AND SLP.width = #{salesLedgerDto.width}
                </if>
                <if test="salesLedgerDto.height != null">
                    AND SLP.height = #{salesLedgerDto.height}
                </if>
                )
            </if>
        </where>
        ORDER BY T1.entry_date DESC
        ORDER BY T1.entry_date DESC,T1.id DESC
    </select>
    <select id="selectIncomeStats" resultType="com.ruoyi.home.dto.IncomeExpenseAnalysisDto">