no message

main
HUOJIN\92525 2024-08-27 16:06:26 +08:00
parent 10fab70085
commit 3297fe8c66
1 changed files with 29 additions and 14 deletions

View File

@ -560,27 +560,42 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
double shipQuantity = log.getMovedQuantity()-log.getShipQuantity(); double shipQuantity = log.getMovedQuantity()-log.getShipQuantity();
log.setShipQuantity(shipQuantity); log.setShipQuantity(shipQuantity);
PickTicketDetail detail = log.getTask().getPickTicketDetail(); PickTicketDetail detail = log.getTask().getPickTicketDetail();
Task task=log.getTask();
//扣减发货单及其明细BOL数量、包箱数量增加发货单及其明细的发运数量 //扣减发货单及其明细BOL数量、包箱数量增加发货单及其明细的发运数量
detail.ship(shipQuantity*log.getPackageUnit().getConvertFigure()); detail.ship(shipQuantity*log.getPackageUnit().getConvertFigure());
detail.setStorageDate(log.getStorageDate()); detail.setStorageDate(log.getStorageDate());
commonDao.store(detail); commonDao.store(detail);
//将库存转移 到中转区库位
Inventory inv=findByInventorys(log.getItemKey(),WarehouseHolder.getWarehouse(),log.getSrcLoc(),log.getSrcLP()==null?null:log.getSrcLP(),log.getInventoryStatus(),log.getStorageDate(),log.getSOI()); inventoryManager.ship(pt.getDock().getId(),
if(inv==null){ log.getItemKey(),
throw new BusinessException("未找到对应库存信息!"); shipQuantity,
} log.getPackageUnit().getId(),
System.out.println("库存序号:"+inv.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 destLocation=this.load(Location.class, 10720L);//10720
Location srcLocation=inv.getLocation();//原库位
Warehouse warehouse=this.load(Warehouse.class, 1000L);//非保仓库 Warehouse warehouse=this.load(Warehouse.class, 1000L);//非保仓库
//非保中转库位;目标库位
Inventory inv=new Inventory();
inv.setLocation(destLocation); inv.setLocation(destLocation);
inv.setWarehouse(warehouse); 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); 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()); updatePreAllocate(pt.getId());
updatePickTicketQuantity(pt.getId()); updatePickTicketQuantity(pt.getId());
@ -615,7 +630,7 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
+ "and SOI='"+soi+"' "; + "and SOI='"+soi+"' ";
if(LP!=null){ if(LP!=null){
sql+=" and LP='"+LP.getLP()+"' "; sql+=" and LP="+LP.getId()+" ";
} }
if(!StringUtils.isEmpty(status)){ if(!StringUtils.isEmpty(status)){
sql+=" and STATUS='"+status+"' "; sql+=" and STATUS='"+status+"' ";
@ -630,7 +645,7 @@ public class DefaultMasterBolManager extends DefaultBaseManager implements Maste
session.close(); session.close();
} }
if(!list.isEmpty()){ if(list!=null){
Inventory inv=this.load(Inventory.class, list.get(0).longValue()); Inventory inv=this.load(Inventory.class, list.get(0).longValue());
return inv; return inv;
}else{ }else{