| | |
| | | </select> |
| | | |
| | | <select id="flowCardToOptimizeCount"> |
| | | select count(*) from pp.flow_card where order_id = #{orderId} and engineering_occupancy=1 |
| | | select count(*) from pp.flow_card where order_id = #{orderId} and project_no is not null |
| | | </select> |
| | | |
| | | <select id="getFlowCardDetail" > |
| | |
| | | |
| | | <select id="getOrderDetailByProductionId"> |
| | | select * from (select a.*, |
| | | a.quantity as 'baiscQuantity', |
| | | #{glassThickness} as 'thickness', |
| | | IF(a.height >= a.width, a.height, a.width) as 'long', |
| | | IF(a.height < a.width, a.height, a.width) as 'short' |
| | | from sd.order_detail as a |
| | | left join sd.order_glass_detail as b |
| | | on a.order_id = b.order_id and a.order_number = b.order_number |
| | | where a.order_id = #{orderId} and b.production_id = #{productionId} |
| | | |
| | | group by a.order_number) as c |
| | | <if test="type=='scope'"> |
| | | where c.`long` <= #{inLenMax} |
| | | and c.`long` >= #{inLenMin} |
| | | and c.`short` >= #{inShortMin} |
| | | and c.`short` <= #{inShortMax} |
| | | </if> |
| | | <if test="type=='notScope'"> |
| | | where !(c.`long` <= #{inLenMax} |
| | | and c.`long` >= #{inLenMin} |
| | | and c.`short` >= #{inShortMin} |
| | | and c.`short` <= #{inShortMax}) |
| | | </if> |
| | | order by c.`long` desc |
| | | </select> |
| | | |
| | |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | od.order_number, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height, |
| | | ogd.child_height as height |
| | | from sd.order_glass_detail as ogd |
| | | left join sd.order_detail as od on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | left join sd.`order` as o on o.order_id = ogd.order_id |