| | |
| | | ifnull(f.completed_quantity,0) as thisQuantitySum ,-- 本工序完工和 |
| | | if(c.quantity-f.completed_quantity = 0 ,true,false) as saveFlag, |
| | | e.other_columns, |
| | | if(ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),'')!='', |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')),''), |
| | | od.building_number) as s01Value |
| | | if(ifnull(JSON_UNQUOTE(JSON_EXTRACT(e.other_columns, '$.S01')),'')!='', |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(e.other_columns, '$.S01')),''), |
| | | e.building_number) as s01Value, |
| | | IF(count(pl.id)>0,'已补片','') as patchStatusOther, |
| | | |
| | | <if test="nextProcess != null and nextProcess != ''"> -- 非最后一道工序 |
| | |
| | | ) as minQuantity -- 修改最小数 |
| | | </if> |
| | | <if test="nextProcess == null or nextProcess == ''"> -- 最后一道工序 |
| | | # c.received_quantity, -- 已入库数量 |
| | | # c.inventory_quantity, -- 库存数量 |
| | | c.received_quantity, -- 已入库数量 |
| | | c.inventory_quantity, -- 库存数量 |
| | | if(ifnull(inventory_quantity,0) |
| | | -ifnull(c.received_quantity,0) |
| | | >= a.completed_quantity,0, |
| | | (a.completed_quantity-(ifnull(c.inventory_quantity,0) |
| | | -ifnull(c.received_quantity,0))) |
| | | >= a.completed_quantity,a.completed_quantity, |
| | | (ifnull(c.inventory_quantity,0) |
| | | -ifnull(c.received_quantity,0)) |
| | | ) |
| | | as minQuantity -- 修改最小数 |
| | | </if> |
| | |
| | | |
| | | SELECT * FROM sd.basic_data |
| | | WHERE basic_type='product' AND basic_category='process' AND basic_name='钢化' |
| | | |
| | | UNION |
| | | |
| | | SELECT * FROM sd.basic_data |
| | | WHERE basic_type='product' AND basic_category='process' AND basic_name='热弯' |
| | | ) AS combined_results; |
| | | </select> |
| | | |