Commit a8a5d940 sunke

取消包装料问题

1 个父辈 37daa1b1
......@@ -323,7 +323,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()+"添加架位["+packageCShelf.tempRfid() + "]["+ packageCLoc +"]=["+emptyShelfInfo.tempRfid() + "]["+ loc +"]=" + barcode);
log.info("包装料["+barcode+"]预留C型料架:工单"+outItem.getSo()+"["+outItem.getSlotlocation()+"]"+outItem.getPn()+"添加架位["+packageCShelf.tempRfid() + "]["+ packageCLoc +"]=["+emptyShelfInfo.tempRfid() + "]["+ loc +"]=" + barcode);
}
}else{
int loc = emptyShelfInfo.addEmptyLoc();
......@@ -575,7 +575,6 @@ public class InquiryShelfBean {
AppendInfo appendInfo = task.getAppendInfo();
String barcode = task.getBarcode();
String hSerial = appendInfo.gethSerial();
String taskShelfType = appendInfo.getShelfType();
Map<String, ShelfInfo> shelfMap = hSerialShelfMap.get(hSerial);
if(appendInfo.isFirstReelAction()){
//首盘料,解除绑定的位置
......@@ -592,6 +591,8 @@ public class InquiryShelfBean {
//补料盘,解除最后一个料架上的位置
ShelfInfo maxShelf = null;
String taskShelfType = appendInfo.getShelfType();
String targetShelfType = taskShelfType;
for (ShelfInfo shelfInfo : shelfMap.values()) {
int limitLoc = shelfInfo.getBarcodeLoc(barcode, taskShelfType);
if(limitLoc > 0){
......@@ -600,13 +601,17 @@ public class InquiryShelfBean {
if(result){
log.info("补料盘["+task.getBarcode()+"]任务取消,解除料架" + shelfInfo.tempRfid() +"的锁定架位绑定");
updateShelfInfo(shelfInfo);
}
if(!shelfInfo.isAShelf()){
//非包装料,只取消一个料架, 包装料需要取消C料架和A料架
return;
if(!task.isPackageReel()){
//非包装料,只取消一个架位就可以了(理论上非包装料也进入不到这里)
return;
}
}
}else{
if(shelfInfo.getShelfType().equals(taskShelfType)){
if(task.isPackageReel()){
//包装料还需要取消C料架
targetShelfType = StorageConstants.SHEFL_TYPE.C;
}
if(shelfInfo.getShelfType().equals(targetShelfType)){
if(maxShelf == null || shelfInfo.getRfidIndex() > maxShelf.getRfidIndex()){
maxShelf = shelfInfo;
}
......@@ -614,9 +619,9 @@ public class InquiryShelfBean {
}
}
if(maxShelf != null){
boolean result =maxShelf.cancelLoc(appendInfo.getShelfType(), barcode);
boolean result =maxShelf.cancelLoc(targetShelfType, barcode);
if(result){
log.info("补料盘["+task.getBarcode()+"]任务取消,解除料架" + maxShelf.tempRfid() +"架位绑定");
log.info("补料盘["+task.getBarcode()+"]任务取消,同类型最大料架" + maxShelf.tempRfid() +"架位置空");
updateShelfInfo(maxShelf);
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!