工单汇总需求变更增加完成数量

tags/yfai-mes-ext-v1.7 yfai-mes-ext-v1.7
jun 8 months ago
parent 65e2a26cc8
commit 29efaba4ac

@ -37,7 +37,7 @@ public class MesWorkOrderDaoImpl implements IMesWorkOrderDao {
StringBuffer hql = new StringBuffer("select organize_code as organizeCode,part_no as partNo, date_format(plan_start_time, '%Y-%m-%d' ) as planStartTime, product_version as productVersion, " +
" sum(case when work_order_status = 40 then reported_qty else qty end ) as qty " +
" from mes_work_order where is_deleted=:isDeleted and is_valid = :isValid and organize_code = :organizeCode " +
" and work_order_type = :workOrderType and order_flag != :orderFlag and work_order_status in (20,30,40) and plan_start_time >= :today" +
" and work_order_type = :workOrderType and order_flag != :orderFlag and work_order_status in (20,30,40,50) and plan_start_time >= :today" +
" group by organize_code,part_no, date_format(plan_start_time, '%Y-%m-%d' ), product_version ");
Query query = entityManager.createNativeQuery(hql.toString());
query.setParameter("organizeCode", organizeCode);

Loading…
Cancel
Save