Commit 652927be zshaohui

如果有正在执行的任务,跳过createMA验证

1 个父辈 44842ca9
......@@ -215,12 +215,12 @@ public class CodeResolve {
needUpdate = true;
}
Date expireDate = barcodeFromRule.getExpireDate();
/*Date expireDate = barcodeFromRule.getExpireDate();
if (expireDate != null){
barcode.setExpireDate(expireDate);
log.info("重新设置"+codeBeanFromRule.getCodeStr()+"的过期日期");
needUpdate = true;
}
}*/
if(needUpdate){
try {
......
......@@ -507,12 +507,12 @@ public class Micron20031Api {
e.printStackTrace();
}
/*Object expiredDateObj = resultMap.get("expiredDate");
Object expiredDateObj = resultMap.get("expiredDate");
if (expiredDateObj != null) {
Date expiredDate = DateUtil.toDate(expiredDateObj.toString(), "MM-dd-yyyy");
Date expiredDate = DateUtil.toDate(expiredDateObj.toString(), "MM-dd-yyyy HH:mm:ss");
log.info("重新设置镁光的过期时间为:" + expiredDate);
barcode.setExpireDate(expiredDate);
}*/
}
return barcode;
}
......
......@@ -11,10 +11,13 @@ import com.neotel.smfcore.core.inList.service.po.InList;
import com.neotel.smfcore.core.inList.service.po.InListItem;
import com.neotel.smfcore.core.inList.util.InListCache;
import com.neotel.smfcore.core.storage.service.po.Storage;
import com.neotel.smfcore.core.system.service.po.DataLog;
import com.neotel.smfcore.core.system.util.TaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collection;
import java.util.Date;
import java.util.List;
......@@ -24,6 +27,11 @@ public class MicronSpApiListener extends BaseSmfApiListener {
@Autowired
private InListCache inListCache;
@Autowired
private TaskService taskService;
@Override
public boolean isForThisApi(String apiName) {
if (Micron20031Api.isEnable()) {
......@@ -35,6 +43,16 @@ public class MicronSpApiListener extends BaseSmfApiListener {
@Override
public Barcode canPutInAfterResolve(String inCheckUrl, CodeValidateParam params, Barcode barcode) throws ValidateException {
//判断有没有正在执行的入库操作,如果有 直接返回
Collection<DataLog> queueTasks = taskService.getQueueTasks();
for (DataLog queueTask : queueTasks) {
if (barcode.getBarcode().equals(queueTask.getBarcode())) {
if (queueTask.isPutInTask()) {
return barcode;
}
}
}
List<Storage> ids=params.getStorageList();
if(ids==null||ids.size()<=0){
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!