| | |
| | | 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 = t1.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 >= DATE_FORMAT(#{salesLedgerDto.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="salesLedgerDto.entryDateEnd != null and salesLedgerDto.entryDateEnd != '' "> |
| | | AND t4.scheduling_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | AND t4.scheduling_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | group by t4.id |