|
|
|
@ -362,22 +362,24 @@
|
|
|
|
|
group by check_result
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getPorOrderList" resultType="com.op.mes.domain.ProOrderWorkorder">
|
|
|
|
|
select pow.workorder_code_sap workorderCodeSap,
|
|
|
|
|
pow.product_name productName,
|
|
|
|
|
powb.batch_code batchCode,
|
|
|
|
|
powb.batch_quantity quantitySplit,
|
|
|
|
|
t.quantityFeedback quantityProduced
|
|
|
|
|
from pro_order_workorder pow
|
|
|
|
|
left join pro_order_workorder_batch powb on powb.workorder_id = pow.workorder_id
|
|
|
|
|
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 pow.workorder_code = t.workorder_code and powb.batch_code = t.batch
|
|
|
|
|
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'
|
|
|
|
|
order by powb.batch_code
|
|
|
|
|
select t0.*,t.quantityFeedback from
|
|
|
|
|
(
|
|
|
|
|
select pow.workorder_code_sap workorderCodeSap,
|
|
|
|
|
pow.product_name productName,
|
|
|
|
|
powb.batch_code batchCode,
|
|
|
|
|
powb.batch_quantity quantitySplit
|
|
|
|
|
from pro_order_workorder pow
|
|
|
|
|
left join pro_order_workorder_batch powb on powb.workorder_id = pow.workorder_id
|
|
|
|
|
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 (
|
|
|
|
|
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
|
|
|
|
|
order by t0.batchCode
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getHFProInfo" resultType="com.op.system.api.domain.dto.BoardDTO">
|
|
|
|
|
select t.*,isnull(be.unit_working_hours,0) unitPro from
|
|
|
|
|