| | |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | group by fc.process_id, fc.order_number |
| | | <choose> |
| | | <!-- 当 landingSequence != 1 且 flashback != 1 时,按 landing_sequence 倒序 --> |
| | | <when test="landingSequence != 1 and flashback != 1"> |
| | | ORDER BY landing_sequence,fc.id desc |
| | | </when> |
| | | <!-- landingSequence != 1 时,优先按 landing_sequence 倒序 --> |
| | | <when test="landingSequence != 1"> |
| | | ORDER BY landing_sequence DESC |
| | | </when> |
| | | <!-- flashback = 1 时正序 --> |
| | | <when test="flashback == 1"> |
| | | ORDER BY |
| | |
| | | ogd.glass_address, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | fc.quantity, |
| | | sum(fc.quantity) as quantity, |
| | | ROUND(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area, |
| | | ifnull(fcs.sort, '') as sort, |
| | | ogd.glass_child, |
| | |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | <choose> |
| | | <when test="landingSequence != 1 and flashback != 1"> |
| | | ORDER BY landing_sequence,fc.id desc |
| | | </when> |
| | | <!-- landingSequence != 1 时,优先按 landing_sequence 倒序 --> |
| | | <when test="landingSequence != 1"> |
| | | ORDER BY landing_sequence DESC |
| | | </when> |
| | | <!-- flashback = 1 时正序 --> |
| | | <when test="flashback == 1"> |
| | | ORDER BY |
| | |
| | | where fc.process_id = #{processId} and fc.`merge`=1 |
| | | group by fc.process_id, fc.order_number |
| | | <choose> |
| | | <when test="landingSequence != 1 and flashback != 1"> |
| | | ORDER BY landing_sequence,fc.id desc |
| | | </when> |
| | | <!-- landingSequence != 1 时,优先按 landing_sequence 倒序 --> |
| | | <when test="landingSequence != 1"> |
| | | ORDER BY landing_sequence DESC |
| | | </when> |
| | | <!-- flashback = 1 时正序 --> |
| | | <when test="flashback == 1"> |
| | | ORDER BY |
| | |
| | | contacts, |
| | | delivery_address as deliveryAddress, |
| | | od.processing_note as processingNote, |
| | | round(ogd.child_width) as width, |
| | | round(ogd.child_height) as height, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height, |
| | | fc.quantity, |
| | | CONCAT(round(ogd.child_width) , ' X ', round(ogd.child_height) ,' = ',fc.quantity ) as size, |
| | | CONCAT(ogd.child_width , ' X ', ogd.child_height ,' = ',fc.quantity ) as size, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | od.building_number as buildingNumber, |
| | |
| | | c.customer_abbreviation as customerAbbreviation, |
| | | p.product_abbreviation as productAbbreviation, |
| | | CONCAT(fc.process_id, '/', fc.technology_number) as processId, |
| | | SUBSTRING(fc.process_id,12 ) as processIdAD ,/*-流程卡简写-*/ |
| | | o.create_time as createTime, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')) AS figureNumber, |
| | |
| | | od.bend_radius as bendRadius, |
| | | ogd.glass_child as glassChild, |
| | | ogd.glass_address as glassAddress, |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color')) AS color |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color')) AS color, |
| | | CONCAT( |
| | | od.order_number,') ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_width AS CHAR))), |
| | | ' X ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_height AS CHAR))), |
| | | ' = ',fc.quantity ) as numberSize, |
| | | CONCAT( |
| | | od.order_number,')',' ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_width AS CHAR))), |
| | | ' X ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(ogd.child_height AS CHAR)))) as numberSizeQuantity |
| | | from sd.order as o |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join flow_card as fc on o.order_id = fc.order_id and |
| | |
| | | fcs.technology_number = fc.technology_number |
| | | and fcs.process = #{process} |
| | | where fc.process_id = #{processId} |
| | | and fc.order_number = #{orderNumber} |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | group by fc.process_id,od.order_number, ogd.technology_number, ogd.child_width, ogd.child_height |
| | | order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number) |
| | |
| | | contacts, |
| | | o.delivery_address as deliveryAddress, |
| | | od.processing_note as processingNote, |
| | | round(ogd.child_width) as width, |
| | | round(ogd.child_height) as height, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height, |
| | | pl.patch_num as quantity, |
| | | pl.order_sort as orderNumber, |
| | | pl.technology_number as technologyNumber, |
| | |
| | | and position(fc.technology_number in #{compound}) |
| | | group by fc.process_id, fc.order_number |
| | | <choose> |
| | | <when test="landingSequence != 1 and flashback != 1"> |
| | | ORDER BY landing_sequence,fc.id desc |
| | | </when> |
| | | <!-- landingSequence != 1 时,优先按 landing_sequence 倒序 --> |
| | | <when test="landingSequence != 1"> |
| | | ORDER BY landing_sequence DESC |
| | | </when> |
| | | <!-- flashback = 1 时正序 --> |
| | | <when test="flashback == 1"> |
| | | ORDER BY |
| | |
| | | and position(fc.technology_number in #{compound}) |
| | | group by fc.process_id, fc.order_number |
| | | <choose> |
| | | <when test="landingSequence != 1 and flashback != 1"> |
| | | ORDER BY landing_sequence,fc.id desc |
| | | </when> |
| | | <!-- landingSequence != 1 时,优先按 landing_sequence 倒序 --> |
| | | <when test="landingSequence != 1"> |
| | | ORDER BY landing_sequence DESC |
| | | </when> |
| | | <!-- flashback = 1 时正序 --> |
| | | <when test="flashback == 1"> |
| | | ORDER BY |