| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.wait_rework_quantity),0) |
| | | as quantity |
| | | FROM |
| | | sd.order_detail AS od |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) as quantity |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.wait_rework_quantity),0) as quantity |
| | | FROM sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | |
| | | |
| | | </select> |
| | | |
| | | <select id="historyProcessMp"> |
| | | select ifnull(GROUP_CONCAT(distinct rw.this_process),"") from reporting_work as rw where rw.process_id=#{processIdStr} |
| | | </select> |
| | | |
| | | <select id="historyDeviceMp"> |
| | | SELECT |
| | | bdp.id, |
| | | bdp.basic_type, |
| | | bdp.basic_name, |
| | | bd.basic_name AS basic_category |
| | | FROM |
| | | sd.basic_data AS bd |
| | | LEFT JOIN `basic_data_produce` AS bdp ON bd.id = bdp.basic_category |
| | | WHERE |
| | | bd.basic_category = "process" |
| | | AND bdp.basic_type = "device" |
| | | AND POSITION(bd.basic_name in CONCAT(#{historyProcess},#{process})) |
| | | </select> |
| | | |
| | | <select id="historyTeamsMp"> |
| | | SELECT |
| | | bdp.id, |
| | | bdp.basic_type, |
| | | bdp.basic_name, |
| | | bd.basic_name AS basic_category |
| | | FROM |
| | | sd.basic_data AS bd |
| | | LEFT JOIN `basic_data_produce` AS bdp ON bd.id = bdp.basic_category |
| | | WHERE |
| | | bd.basic_category = "process" |
| | | AND bdp.basic_type = "teamsgroups" |
| | | AND POSITION(bd.basic_name in CONCAT(#{historyProcess},#{process})) |
| | | </select> |
| | | |
| | | <select id="SelectHistoryProcessMp"> |
| | | SELECT |
| | | distinct |
| | | bd.basic_name AS basic_category |
| | | FROM |
| | | sd.basic_data AS bd |
| | | LEFT JOIN `basic_data_produce` AS bdp ON bd.id = bdp.basic_category |
| | | WHERE |
| | | bd.basic_category = "process" |
| | | AND bdp.basic_type = "teamsgroups" |
| | | AND POSITION(bd.basic_name in CONCAT(#{historyProcess},#{process})) |
| | | </select> |
| | | |
| | | </mapper> |