看板接口sql修改

master
zhaoxiaolin 6 months ago
parent 90d1e52de8
commit df6d74daca

@ -362,22 +362,24 @@
group by check_result group by check_result
</select> </select>
<select id="getPorOrderList" resultType="com.op.mes.domain.ProOrderWorkorder"> <select id="getPorOrderList" resultType="com.op.mes.domain.ProOrderWorkorder">
select pow.workorder_code_sap workorderCodeSap, select t0.*,t.quantityFeedback from
pow.product_name productName, (
powb.batch_code batchCode, select pow.workorder_code_sap workorderCodeSap,
powb.batch_quantity quantitySplit, pow.product_name productName,
t.quantityFeedback quantityProduced powb.batch_code batchCode,
from pro_order_workorder pow powb.batch_quantity quantitySplit
left join pro_order_workorder_batch powb on powb.workorder_id = pow.workorder_id from pro_order_workorder pow
left join ( left join pro_order_workorder_batch powb on powb.workorder_id = pow.workorder_id
select workorder_code,batch,sum(quantity_feedback) quantityFeedback from mes_report_work where pow.del_flag = '0' and CONVERT(varchar(10),pow.product_date, 120) = CONVERT(varchar(10),GETDATE(), 120)
where CONVERT(varchar(10),feedback_time, 120) = CONVERT(varchar(10),GETDATE(), 120) and pow.workorder_name = #{equCode} and pow.parent_order ='0' and powb.del_flag = '0'
and del_flag = '0' ) t0
group by workorder_code,batch left join (
)t on pow.workorder_code = t.workorder_code and powb.batch_code = t.batch select workorder_code,batch,sum(quantity_feedback) quantityFeedback from mes_report_work
where pow.del_flag = '0' and CONVERT(varchar(10),pow.product_date, 120) = CONVERT(varchar(10),GETDATE(), 120) where CONVERT(varchar(10),feedback_time, 120) = CONVERT(varchar(10),GETDATE(), 120)
and pow.workorder_name = #{equCode} and pow.parent_order ='0' and powb.del_flag = '0' and del_flag = '0'
order by powb.batch_code group by workorder_code,batch
)t on t0.workorderCodeSap = t.workorder_code and t0.batchCode = t.batch
order by t0.batchCode
</select> </select>
<select id="getHFProInfo" resultType="com.op.system.api.domain.dto.BoardDTO"> <select id="getHFProInfo" resultType="com.op.system.api.domain.dto.BoardDTO">
select t.*,isnull(be.unit_working_hours,0) unitPro from select t.*,isnull(be.unit_working_hours,0) unitPro from

Loading…
Cancel
Save