| | |
| | | <if test="remark != null and remark != ''"> |
| | | , remark= #{remark} |
| | | </if> |
| | | <if test="container != null and container != ''"> |
| | | , box_no= #{container} |
| | | </if> |
| | | where order_number=#{flowCard.orderNumber} and order_id=#{flowCard.order.orderId} |
| | | </update> |
| | | |
| | |
| | | storage_region, |
| | | `status`, |
| | | enter_storage_time, |
| | | box_no, |
| | | update_time, |
| | | end_time, |
| | | remark |
| | |
| | | #{flowCard.order.orderId} ,#{flowCard.orderNumber},#{flowCard.processId},#{flowCard.inventoryQuantity},ROUND(#{flowCard.orderDetail.width}*#{flowCard.orderDetail.height}/1000000,2), |
| | | ROUND(#{flowCard.orderDetail.width}*#{flowCard.orderDetail.height}*#{flowCard.inventoryQuantity}/1000000,2), |
| | | #{flowCard.inventoryQuantity},null,#{storageRegion}, |
| | | 0,now(),now(),null,#{remark} |
| | | 0,now(),#{container},now(),null,#{remark} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | left join sd.order_detail od on fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on |
| | | o.order_id=fc.order_id |
| | | <where> |
| | | and fc.received_quantity <![CDATA[<]]> fc.min_inventory_quantity |
| | | and fc.received_quantity <![CDATA[<]]> fc.min_inventory_quantity and o.create_order>0 |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | | and o.order_id regexp #{flowCard.order.orderId} |
| | | </if> |
| | |
| | | select fc.order_number as order_number,fc.process_id from pp.flow_card fc left join sd.order_detail od on |
| | | fc.order_id=od.order_id and fc.order_number=od.order_number inner join sd.`order` o on o.order_id=fc.order_id |
| | | <where> |
| | | and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity |
| | | and fc.received_quantity <![CDATA[<]]> fc.inventory_quantity and o.create_order>0 |
| | | <if test="flowCard.order.orderId != null and flowCard.order.orderId != ''"> |
| | | and o.order_id regexp #{flowCard.order.orderId} |
| | | </if> |
| | |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | and fgi.status = 0 and fgi.quantity_available>0 |
| | | and fgi.status = 0 and fgi.quantity_available>0 and o.create_order>0 |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | |
| | | left join sd.order_detail od on fgi.order_id = od.order_id and fgi.order_number = od.order_number |
| | | left join sd.`order` o on fgi.order_id = o.order_id |
| | | <where> |
| | | and fgi.status = 0 and fgi.quantity_available>0 |
| | | and fgi.status = 0 and fgi.quantity_available>0 and o.create_order>0 |
| | | <if test="finishedGoodsInventory.orderDetail.width != null and finishedGoodsInventory.orderDetail.width != ''"> |
| | | and od.width regexp #{finishedGoodsInventory.orderDetail.width} |
| | | </if> |
| | |
| | | where order_number=#{orderNumber} and order_id=#{orderId} and delivery_id=#{deliveryId} and delivery_detail_state=0 |
| | | </select> |
| | | |
| | | <select id="getSelectDeliveryDetailDeliveryId" resultMap="selectDelivery"> |
| | | select dd.delivery_id, |
| | | dd.order_number, |
| | | dd.order_id, |
| | | o.project, |
| | | od.product_id, |
| | | od.product_name, |
| | | d.customer_name, |
| | | od.width, |
| | | od.height, |
| | | dd.quantity as dd_quantity, |
| | | od.warehouse_num, |
| | | od.delivery_num, |
| | | d.area, |
| | | od.building_number, |
| | | d.creator, |
| | | dd.delivery_detail_remakes, |
| | | dd.create_time |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id = d.delivery_id |
| | | left join sd.order_detail od on od.order_id = dd.order_id and dd.order_number = od.order_number |
| | | left join sd.`order` o on o.order_id = dd.order_id |
| | | |
| | | where dd.delivery_id= #{deliveryId} |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |