maven
4 天以前 47200ddd17698ae4afefd0d25c6b1b9551bcf14f
src/main/resources/mapper/production/SalesLedgerProductionAccountingMapper.xml
@@ -12,22 +12,21 @@
        t4.finished_num,
        t4.work_hours,
        t4.process,
        t3.product_name as productCategory,
        t2.model as specificationModel,
        t2.unit
        t3.product_category,
        t3.specification_model,
        t3.unit
        FROM
        sales_ledger_production_accounting t4
        left join product_model t2 on t2.id = t4.sales_ledger_product_id
        left join product t3 on t3.id = t2.product_id
        left join sales_ledger_product t3 on t4.sales_ledger_product_id = t3.id and t3.type = 3
        <where>
            <if test="salesLedgerDto.schedulingUserName != null and salesLedgerDto.schedulingUserName != '' ">
                AND  t4.scheduling_user_name LIKE CONCAT('%',#{salesLedgerDto.schedulingUserName},'%')
                AND t4.scheduling_user_name LIKE CONCAT('%',#{salesLedgerDto.schedulingUserName},'%')
            </if>
            <if test="salesLedgerDto.entryDateStart != null and salesLedgerDto.entryDateStart != '' ">
                AND t4.scheduling_date &gt;= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d')
            </if>
            <if test="salesLedgerDto.entryDateEnd != null and salesLedgerDto.entryDateEnd != '' ">
                AND  t4.scheduling_date &lt;= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d')
                AND t4.scheduling_date &lt;= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d')
            </if>
        </where>
        group by t4.id