Commit 18ca3b71 zshaohui

1.如果当前入库单已经完成,后续的物料就要ng,等待下一个入库单 才可以入库 2.提示消息变成英文 3.入库单校验增加物料编号和批次号 不符合提示

1 个父辈 900175f7
......@@ -51,7 +51,7 @@ public class MicronSpApiListener extends BaseSmfApiListener {
if (ObjectUtil.isNotEmpty(storage.getInListName())) {
//如果入库单还在执行中,验证是否可以入库
InList inList = inListCache.getInList(storage.getInListName());
if (inList.getStatus() <= INLIST_STATUS.WAIT) {
//if (inList.getStatus() <= INLIST_STATUS.WAIT) {
log.info("canPutInAfterResolve 料仓【"+storage.getName()+"】入库单【"+inList.getName()+"】入库, 调用 depositCreateMA");
try {
//验证是否属于入库单中的数据和已入库数量是否满足
......@@ -61,18 +61,18 @@ public class MicronSpApiListener extends BaseSmfApiListener {
if (barcode.getPartNumber().equals(inListItem.getPN()) && barcode.getBatch().equals(inListItem.getBatch())) {
hasBarcode = true;
if (inListItem.getInNum() >= inListItem.getNum()) {
throw new ValidateException("smfcore.inlist.pnItemOk", "入库单[{0}]的物料[{1}]已入库完成", new String[]{inList.getName(), inListItem.getPN()});
throw new ValidateException("smfcore.inlist.pnItemOk", "The material [{1}] of the incoming order [{0}] has been entered into the warehouse", new String[]{inList.getName(), inListItem.getPN()+"_"+inListItem.getBatch()});
}
}
}
if (!hasBarcode){
throw new ValidateException("smfcore.inlist.noPn", "入库单[{0}]没有物料[{1}]入库需求", new String[]{inList.getName(), barcode.getPartNumber()});
throw new ValidateException("smfcore.inlist.noPn", "Inbound order [{0}] has no material [{1}] inbound requirement", new String[]{inList.getName(), barcode.getPartNumber()+"_"+barcode.getBatch()});
}
Date expireDate = barcode.getExpireDate();
if (expireDate != null) {
if (System.currentTimeMillis() > expireDate.getTime()) {
throw new ValidateException("smfcore.error.barcode.expired", "物料已过期,无法入库.");
throw new ValidateException("smfcore.error.barcode.expired", "Reel expired, storage failed");
}
}
......@@ -84,7 +84,7 @@ public class MicronSpApiListener extends BaseSmfApiListener {
log.error("MicronSpApiListener canPutInAfterResolve depositCreateMA error: " + apiException.getMessage());
throw new ValidateException(apiException.msgKey, apiException.defaultMsg, apiException.msgParam);
}
}
//}
}
//普通入库验证 调用return
......
......@@ -75,8 +75,8 @@ public class MicronSpTimerProcess {
depositExceedTime = 1;
}
long timeOutTime = 60 * 60 * 1000 * depositExceedTime;
List<InList> lists = inListCache.getTimeOutInListMap(timeOutTime);
List<InList> inLists = new ArrayList<>();
List<InList> inLists = inListCache.getTimeOutInListMap(timeOutTime);
//List<InList> inLists = new ArrayList<>();
for (InList inList :
inLists) {
//判断是否超时
......@@ -86,8 +86,9 @@ public class MicronSpTimerProcess {
List<InListItem> newItemsList=new ArrayList<>();
for (InListItem item :
inList.getInListItems()) {
if (item.getInNum() <= 0) {
if (item.getNum() - item.getInNum() > 0) {
//发送邮件
log.info("sendEmail入库单:"+inList.getName());
Micron20031Api.sendEmail(Micron20031Api.Email_TO, Micron20031Api.Email_CC, inList.getName(), item.getRi());
log.info("sendEmail [" + inList.getName() + "] [" + item.getRi() + "] 给[" + Micron20031Api.Email_TO + "][" + Micron20031Api.Email_CC + "] 成功");
item.setSendEmail(true);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!