| | |
| | | <select id="getOrderList"> |
| | | select * from (select |
| | | o.*, |
| | | ifnull(sum(fgi.quantity_available),0) as goodsQuantity |
| | | ifnull(sum(fgi.quantity_available),0) as goodsQuantity, |
| | | if(DATEDIFF(o.delivery_date, CURDATE()) < 3 and o.delivery < 2, 'timeOut','' ) as timeOut |
| | | from |
| | | sd.`order` as o |
| | | left join mm.finished_goods_inventory as fgi |
| | |
| | | ) as acc |
| | | order by |
| | | <if test="orderBy == null "> |
| | | id desc |
| | | order_id desc |
| | | </if> |
| | | <if test="orderBy == 'desc'"> |
| | | ${field} desc |
| | |
| | | select warehousing from `order` |
| | | where order_id = #{orderId} |
| | | </select> |
| | | |
| | | <select id="getProcessIdByOptimizeHeatDetail"> |
| | | select process_id from pp.optimize_heat_detail as a |
| | | where a.project_no = #{projectId} |
| | | and a.layout_id = #{layoutId} |
| | | and a.sort = #{sort} |
| | | </select> |
| | | |
| | | <select id="scannerGlassInfo"> |
| | | select c.order_id as orderId, |
| | | b.order_number as orderNumber, |
| | | b.technology_number as technologyNumber, |
| | | a.process_id as processId, |
| | | c.customer_name as customerName, |
| | | concat(a.width," * " , a.height) as size, |
| | | b.area, |
| | | b.glass_child as glassChild, |
| | | d.product_name as productName, |
| | | d.building_number as buildingNumber, |
| | | d.remarks as remarks, |
| | | d.processing_note as processingNote |
| | | from pp.optimize_heat_detail as a |
| | | left join sd.order_glass_detail as b |
| | | on b.order_number = a.order_sort |
| | | and b.technology_number = a. layer |
| | | and b.order_id = #{orderId} |
| | | left join sd.order as c |
| | | on c.order_id = b.order_id |
| | | left join sd.order_detail as d |
| | | on c.order_id = d.order_id |
| | | and d.order_number = a.order_sort |
| | | where a.project_no = #{projectNo} |
| | | and a.layout_id = #{layoutId} |
| | | and a.sort = #{sort} |
| | | </select> |
| | | </mapper> |