Commit 54a89560 sunke

出库到料架逻辑优化

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