diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml index 4d619ce2..8c32ecec 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml @@ -365,6 +365,7 @@ select t0.*,t.quantityFeedback from ( select pow.workorder_code_sap workorderCodeSap, + pow.workorder_code workorderCode, pow.product_name productName, powb.batch_code batchCode, powb.batch_quantity quantitySplit @@ -373,12 +374,12 @@ where pow.del_flag = '0' and CONVERT(varchar(10),pow.product_date, 120) = CONVERT(varchar(10),GETDATE(), 120) and pow.workorder_name = #{equCode} and pow.parent_order ='0' and powb.del_flag = '0' ) t0 - left join ( + left join ( select workorder_code,batch,sum(quantity_feedback) quantityFeedback from mes_report_work where CONVERT(varchar(10),feedback_time, 120) = CONVERT(varchar(10),GETDATE(), 120) and del_flag = '0' group by workorder_code,batch - )t on t0.workorderCodeSap = t.workorder_code and t0.batchCode = t.batch + )t on t0.workorderCode = t.workorder_code and t0.batchCode = t.batch order by t0.batchCode