Commit 54a89560 sunke

出库到料架逻辑优化

1 个父辈 002c9fad
...@@ -89,6 +89,7 @@ public class InquiryShelfBean { ...@@ -89,6 +89,7 @@ public class InquiryShelfBean {
if(!canOut){ if(!canOut){
log.info("未完成的大料数量["+unFinishedBigTaskCount+"]已可放满下一料架"+nextShelf.tempRfid()+"["+emptyLocCount+"],大料任务["+task.getBarcode()+"]暂停出库"); log.info("未完成的大料数量["+unFinishedBigTaskCount+"]已可放满下一料架"+nextShelf.tempRfid()+"["+emptyLocCount+"],大料任务["+task.getBarcode()+"]暂停出库");
} }
return canOut;
} }
} }
} }
...@@ -285,7 +286,7 @@ public class InquiryShelfBean { ...@@ -285,7 +286,7 @@ public class InquiryShelfBean {
String cShelf = StorageConstants.SHEFL_TYPE.C; String cShelf = StorageConstants.SHEFL_TYPE.C;
ShelfInfo packageCShelf = getOrAddShelfInfo(hSerial, cShelf); ShelfInfo packageCShelf = getOrAddShelfInfo(hSerial, cShelf);
int packageCLoc = packageCShelf.addLimitLoc(barcode, StorageConstants.REEL_TYPE.PACKAGE); int packageCLoc = packageCShelf.addLimitLoc(barcode, StorageConstants.REEL_TYPE.PACKAGE);
log.info("包装料预留C型料架:工单"+outItem.getSo()+"["+outItem.getSlotlocation()+"]"+outItem.getPn()+"添加架位["+emptyShelfInfo.tempRfid() + "]["+ packageCLoc +"]=["+packageCShelf.tempRfid() + "]["+ loc +"]=" + barcode); log.info("包装料预留C型料架:工单"+outItem.getSo()+"["+outItem.getSlotlocation()+"]"+outItem.getPn()+"添加架位["+packageCShelf.tempRfid() + "]["+ packageCLoc +"]=["+emptyShelfInfo.tempRfid() + "]["+ loc +"]=" + barcode);
} }
}else{ }else{
int loc = emptyShelfInfo.addEmptyLoc(); int loc = emptyShelfInfo.addEmptyLoc();
...@@ -520,31 +521,54 @@ public class InquiryShelfBean { ...@@ -520,31 +521,54 @@ public class InquiryShelfBean {
String hSerial = appendInfo.gethSerial(); String hSerial = appendInfo.gethSerial();
Map<String, ShelfInfo> shelfMap = hSerialShelfMap.get(hSerial); Map<String, ShelfInfo> shelfMap = hSerialShelfMap.get(hSerial);
if(shelfMap != null){ if(shelfMap != null){
//该料架是否已经绑定过
ShelfInfo bindedShelf = findSameShelf(hSerial,rfid);
if(appendInfo.isFirstReelAction()){ if(appendInfo.isFirstReelAction()){
//首盘料,要按位置放 //首盘料,要按位置放
if(bindedShelf != null){
//已经绑定过
boolean putInResult = bindedShelf.putInLimitLoc(rfid,loc, barcode);
if(putInResult){
updateShelfInfo(bindedShelf);
log.info("首盘料["+task.getBarcode()+"]使用料架" + rfid +"["+loc+"]缓存更新成功");
return true;
}
}else{
for (ShelfInfo shelfInfo : shelfMap.values()) { for (ShelfInfo shelfInfo : shelfMap.values()) {
boolean putInResult = shelfInfo.putInLimitLoc(rfid,loc, barcode); boolean putInResult = shelfInfo.putInLimitLoc(rfid,loc, barcode);
if(putInResult){ if(putInResult){
updateShelfInfo(shelfInfo); updateShelfInfo(shelfInfo);
log.info("首盘料["+task.getBarcode()+"]更新料架" + rfid +"["+loc+"]缓存成功"); log.info("首盘料["+task.getBarcode()+"]使用新料架" + rfid +"["+loc+"]缓存更新成功");
return true; return true;
} }
} }
}
}else{ }else{
//非首盘 //非首盘
if(bindedShelf != null){
//已经绑定过
boolean putInResult = bindedShelf.putInLoc(rfid,loc, barcode);
if(putInResult){
updateShelfInfo(bindedShelf);
log.info("物料["+task.getBarcode()+"]使用料架" + rfid +"["+loc+"]缓存更新成功");
return true;
}
}else{
for (ShelfInfo shelfInfo : shelfMap.values()) { for (ShelfInfo shelfInfo : shelfMap.values()) {
boolean putInResult = shelfInfo.putInLoc(rfid,loc, barcode); boolean putInResult = shelfInfo.putInLoc(rfid,loc, barcode);
if(putInResult){ if(putInResult){
updateShelfInfo(shelfInfo); updateShelfInfo(shelfInfo);
log.info("物料["+task.getBarcode()+"]更新料架" + rfid +"["+loc+"]缓存成功"); log.info("物料["+task.getBarcode()+"]使用新料架" + rfid +"["+loc+"]缓存更新成功");
return true; return true;
} }
} }
} }
}
}else{ }else{
log.info("未找到["+hSerial+"]相关料架"); log.info("未找到["+hSerial+"]相关料架");
} }
log.error("物料["+task.getBarcode()+"]("+task.getAppendInfo().getTempRfid()+"["+task.getAppendInfo().getRfidLoc()+"])更新料架" + rfid +"["+loc+"]缓存失败"); log.error("物料["+task.getBarcode()+"]("+task.getAppendInfo().getTempRfid()+"["+task.getAppendInfo().getRfidLoc()+"])料架" + rfid +"["+loc+"]缓存更新失败");
return false; return false;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!