update mm.finished_goods_inventory
set inventory=inventory+#{quantity},quantity_available=quantity_available+#{quantity},
update_time=now(),area=actual_signal_area*quantity_available
where order_number=#{orderNumber} and order_id=#{orderId}
update mm.finished_goods_inventory
set inventory=inventory-#{quantity},quantity_available=quantity_available-#{quantity},
update_time=now(),area=actual_signal_area*quantity_available
where order_number=#{orderNumber} and order_id=#{orderId}
update mm.finished_goods_inventory
set quantity_available=quantity_available+#{quantity},
update_time=now(),area=actual_signal_area*quantity_available
where order_number=#{orderNumber} and order_id=#{orderId}
update mm.finished_goods_inventory
set quantity_available=quantity_available-#{quantity},
update_time=now(),area=actual_signal_area*quantity_available
where order_number=#{orderNumber} and order_id=#{orderId}
update mm.finished_goods_inventory
set inventory=inventory+#{quantity}
where order_number=#{orderNumber} and order_id=#{orderId}
update mm.finished_goods_inventory
set inventory=inventory-#{quantity}
where order_number=#{orderNumber} and order_id=#{orderId}
update sd.delivery_detail
set delivery_detail_state=#{state}
where order_number=#{orderNumber} and order_id=#{orderId} and delivery_id=#{deliveryId}
update mm.finished_goods_inventory
set inventory=0,quantity_available=0,
update_time=now(),area=0,status=1
where order_number=#{orderDetail.deliveryDetail.orderNumber} and order_id=#{orderDetail.deliveryDetail.orderId}
update sd.`order`
set warehousing=#{state}
where order_id=#{orderId}
update sd.`order`
set delivery=#{state}
where order_id=#{orderId}
update sd.`delivery`
set stock_state=#{state}
where delivery_id=#{deliveryId}
update sd.order_detail
set warehouse_num=warehouse_num+${quantity},update_time=now()
where order_number=#{orderNumber} and order_id=#{orderId}
update sd.order_detail
set warehouse_num=warehouse_num-${quantity}
where order_number=#{orderNumber} and order_id=#{orderId}
update sd.order_detail
set warehouse_num=${quantity},update_time=now()
where order_number=#{orderNumber} and order_id=#{orderId}
update pp.flow_card
set received_quantity=received_quantity+${inventoryQuantity},storage_time=now()
where order_number=#{orderNumber} and process_id=#{processId} and order_id=#{order.orderId}
update pp.flow_card
set received_quantity=received_quantity-${finishedOperateLog.quantity},storage_time=now()
where order_number=#{finishedOperateLog.operationNumber} and process_id=#{finishedOperateLog.processId} and order_id=#{finishedOperateLog.orderId}
update mm.finished_goods_inventory
set inventory=inventory+${flowCard.inventoryQuantity},quantity_available=quantity_available+${flowCard.inventoryQuantity},
update_time=now(),area=actual_signal_area*quantity_available
, storage_region= #{storageRegion}
, remark= #{remark}
where order_number=#{flowCard.orderNumber} and order_id=#{flowCard.order.orderId}
update mm.finished_goods_inventory
set inventory=inventory-${finishedOperateLog.quantity},quantity_available=quantity_available-${finishedOperateLog.quantity},
update_time=now(),area=actual_signal_area*quantity_available
where order_number=#{finishedOperateLog.operationNumber} and order_id=#{finishedOperateLog.orderId}
insert into mm.finished_goods_inventory (order_id,
order_number,
process_id,
inventory,
actual_signal_area,
area,
quantity_available,
warehouse_number,
storage_region,
`status`,
enter_storage_time,
update_time,
end_time,
remark
)
values (
#{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}
)
insert into mm.finished_goods_inventory (order_id,
order_number,
process_id,
inventory,
actual_signal_area,
area,
quantity_available,
warehouse_number,
storage_region,
`status`,
enter_storage_time,
update_time,
end_time,
remark
)
values (
#{orderDetail.orderId} ,#{orderDetail.orderNumber},"",#{orderDetail.quantity},#{orderDetail.computeArea},
#{orderDetail.computeGrossArea},
#{orderDetail.quantity},null,"",
0,now(),now(),null,""
)
update mm.finished_goods_inventory
set inventory=${orderDetail.quantity},quantity_available=${orderDetail.quantity},
update_time=now(),area=actual_signal_area*quantity_available
where order_number=#{orderDetail.orderNumber} and order_id=#{orderDetail.orderId}