| | |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.production.dto.ProductProcessDto"> |
| | | SELECT |
| | | * |
| | | p.*, |
| | | dl.device_name AS deviceName |
| | | FROM |
| | | product_process p |
| | | left join device_ledger dl on p.device_ledger_id = dl.id |
| | | <where> |
| | | <if test="productProcessDto.name != null and productProcessDto.name != '' "> |
| | | AND p.name LIKE CONCAT('%',#{productProcessDto.name},'%') |
| | |
| | | pp.name AS processName, |
| | | SUM(pi.quantity) AS totalInput, |
| | | SUM(distinct ppo.scrap_qty) AS totalScrap, |
| | | SUM(distinct (ppo.quantity - ppo.scrap_qty)) AS totalOutput |
| | | SUM(distinct (ppo.quantity + IFNULL(ppo.add_qty, 0))) AS totalOutput |
| | | FROM |
| | | production_product_output ppo |
| | | INNER JOIN production_product_main ppm ON ppo.product_main_id = ppm.id |