| | |
| | | ; |
| | | </select> |
| | | |
| | | <select id="SelectOrderNumber" > |
| | | <select id="selectOrderNumber" > |
| | | select ifnull(count(ogd.production_id),0) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productIdVl} |
| | | </select> |
| | | |
| | | <update id="AddOrderWorkMp" > |
| | | <update id="addOrderWorkMp" > |
| | | update 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 |
| | | |
| | |
| | | </update> |
| | | |
| | | <!-- 删除工单--> |
| | | <update id="DeleteOrderWorkMp"> |
| | | <update id="deleteOrderWorkMp"> |
| | | update 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 |
| | | set ogd.production_id=null, |
| | |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <select id="SelectWorkCount"> |
| | | <select id="selectWorkCount"> |
| | | select COUNT(distinct order_number) |
| | | from order_glass_detail |
| | | where ISNULL(production_id) |
| | | and order_id = #{orderId} |
| | | </select> |
| | | |
| | | <select id="SelectYesWorkCount"> |
| | | <select id="selectYesWorkCount"> |
| | | select COUNT(distinct order_number) |
| | | from order_glass_detail |
| | | where order_id = #{orderId} |
| | | </select> |
| | | |
| | | <update id="UpdateWorkType"> |
| | | <update id="updateWorkType"> |
| | | update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId} |
| | | </update> |
| | | </mapper> |