yuan
2 天以前 600a8ae0735a911b2d9feb75cceb2dc21f1e2dbf
src/main/resources/mapper/production/ProductionAccountMapper.xml
@@ -124,8 +124,10 @@
        select date_format(scheduling_date, '%m-%d') as dateStr,
               cast(ifnull(sum(finished_num), 0) as decimal(18,2)) as numberOfCompleted,
               cast(ifnull(sum(work_hours), 0) as decimal(18,2)) as amount,
               cast(0 as decimal(18,2)) as passRate
               cast(sum(ppo.quantity) / sum(ppo.quantity + ppo.scrap_qty) * 100.00 as decimal(18,2)) as passRate
        from production_account
        left join production_product_main ppm on ppm.id = production_account.production_product_main_id
        left join production_product_output ppo on ppo.production_product_main_id = ppm.id
        where scheduling_date >= #{startDate}
          and scheduling_date <= #{endDate}
        group by date_format(scheduling_date, '%m-%d')