no message
parent
10fab70085
commit
3297fe8c66
|
|
@ -560,27 +560,42 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
|
|||
double shipQuantity = log.getMovedQuantity()-log.getShipQuantity();
|
||||
log.setShipQuantity(shipQuantity);
|
||||
PickTicketDetail detail = log.getTask().getPickTicketDetail();
|
||||
Task task=log.getTask();
|
||||
//扣减发货单及其明细BOL数量、包箱数量,增加发货单及其明细的发运数量
|
||||
detail.ship(shipQuantity*log.getPackageUnit().getConvertFigure());
|
||||
detail.setStorageDate(log.getStorageDate());
|
||||
commonDao.store(detail);
|
||||
//将库存转移 到中转区库位
|
||||
Inventory inv=findByInventorys(log.getItemKey(),WarehouseHolder.getWarehouse(),log.getSrcLoc(),log.getSrcLP()==null?null:log.getSrcLP(),log.getInventoryStatus(),log.getStorageDate(),log.getSOI());
|
||||
if(inv==null){
|
||||
throw new BusinessException("未找到对应库存信息!");
|
||||
}
|
||||
System.out.println("库存序号:"+inv.getId());
|
||||
//非保中转库位;目标库位
|
||||
|
||||
inventoryManager.ship(pt.getDock().getId(),
|
||||
log.getItemKey(),
|
||||
shipQuantity,
|
||||
log.getPackageUnit().getId(),
|
||||
//null,
|
||||
log.getSrcLP()==null?null:log.getSrcLP().getId(),
|
||||
log.getInventoryStatus(),
|
||||
log.getStorageDate(),
|
||||
log.getSOI(),
|
||||
pt.getCode(),
|
||||
pt.getBillType());
|
||||
detail.setStorageDate(log.getStorageDate());
|
||||
|
||||
|
||||
Location destLocation=this.load(Location.class, 10720L);//10720
|
||||
Location srcLocation=inv.getLocation();//原库位
|
||||
Warehouse warehouse=this.load(Warehouse.class, 1000L);//非保仓库
|
||||
//非保中转库位;目标库位
|
||||
Inventory inv=new Inventory();
|
||||
inv.setLocation(destLocation);
|
||||
inv.setWarehouse(warehouse);
|
||||
inv.setQuantity(log.getMovedQuantity());
|
||||
inv.setQtyOfMasterPack(log.getMovedQuantity());
|
||||
inv.setPackageUnit(log.getPackageUnit());
|
||||
inv.setLP(log.getSrcLP());
|
||||
inv.setStatus(log.getInventoryStatus());
|
||||
inv.setStorageDate(log.getStorageDate());
|
||||
inv.setSOI(log.getSOI());
|
||||
inv.setWeight(log.getWeight());
|
||||
inv.setVolume(log.getVolume());
|
||||
inv.setItemKey(log.getItemKey());
|
||||
commonDao.store(inv);
|
||||
//移位日志;原记录扣减;新记录增加
|
||||
inventoryManager.recordLog(InventoryLogType.MOVE, -1, task.getBillCode(), null, srcLocation, (inv.getLP()==null?null:inv.getLP().getLP()), inv.getItemKey(), inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), log.getId(), null);
|
||||
inventoryManager.recordLog(InventoryLogType.MOVE, 1, task.getBillCode(), null, destLocation, (inv.getLP()==null?null:inv.getLP().getLP()), inv.getItemKey(), inv.getStorageDate(), inv.getSOI(), inv.getQuantity(), null, inv.getStatus(), log.getId(), null);
|
||||
}
|
||||
updatePreAllocate(pt.getId());
|
||||
updatePickTicketQuantity(pt.getId());
|
||||
|
|
@ -615,7 +630,7 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
|
|||
+ "and SOI='"+soi+"' ";
|
||||
|
||||
if(LP!=null){
|
||||
sql+=" and LP='"+LP.getLP()+"' ";
|
||||
sql+=" and LP="+LP.getId()+" ";
|
||||
}
|
||||
if(!StringUtils.isEmpty(status)){
|
||||
sql+=" and STATUS='"+status+"' ";
|
||||
|
|
@ -630,7 +645,7 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
|
|||
session.close();
|
||||
}
|
||||
|
||||
if(!list.isEmpty()){
|
||||
if(list!=null){
|
||||
Inventory inv=this.load(Inventory.class, list.get(0).longValue());
|
||||
return inv;
|
||||
}else{
|
||||
|
|
|
|||
Loading…
Reference in New Issue