Commit d708eb0d LN

1.API006消息提示未显示。

2.中止后重新输入lineid
1 个父辈 fe67051e
......@@ -1119,8 +1119,22 @@ public class LiteOrderCache {
storagePosManager.save(pos);
outNum += pos.getBarcode().getAmount();
outReelCount += 1;
} else {
reelItem.setExecutFailReason(s.getDescription());
}
else if(s!=null && s.isReserved()){
String str=s.getDescription();
if(ObjectUtil.isNotEmpty(s.getMaterialStatus())){
str=str+";"+s.getMaterialStatus();
}
reelItem.setExecutFailReason(str);
reelItem.setStatus(OrderItemStatus.Reserved);
log.info("工单【" + orderNo + "】PN [" + item.getPn() + "] RI [" + item.getRi() + "] API009 验证失败,更改状态为 CheckFail");
}
else {
String str=s.getDescription();
if(ObjectUtil.isNotEmpty(s.getMaterialStatus())){
str=str+";"+s.getMaterialStatus();
}
reelItem.setExecutFailReason(str);
reelItem.setStatus(OrderItemStatus.CheckFail);
log.info("工单【" + orderNo + "】PN [" + item.getPn() + "] RI [" + item.getRi() + "] API009 验证失败,更改状态为 CheckFail");
}
......
......@@ -496,7 +496,7 @@ public class MicronApi {
}
}
public static List<Material> Api006(String operationId, List<String> pretasks) {
public static List<Material> Api006(String operationId, List<String> pretasks) throws ApiException {
/**
* {
* "operationId": <operationId>
......@@ -516,7 +516,7 @@ public class MicronApi {
materialList.add(new Material("serialNum2","partNumber2"));
return materialList;
}
try {
// try {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("operationId", operationId);
paramMap.put("pretasks", pretasks);
......@@ -554,10 +554,10 @@ public class MicronApi {
throw new ApiException("smfcore.api.fail", "{0} Failed to get data", new String[]{"API006:"+result.getResponseData()});
}
} catch (Exception e) {
log.error(url + "出错", e);
return null;
}
// } catch (Exception e) {
// log.error(url + "出错", e);
// return null;
// }
}
......
......@@ -167,6 +167,7 @@ public class LoadingUtil {
}
@Autowired
protected CodeResolve codeResolve;
public Boolean updateNgReel(ML5NgReelInfo reelInfo){
......
......@@ -110,10 +110,10 @@ private IStoragePosManager storagePosManager;
//先从缓存中获取数据
try{
dto = dataCache.getCache(key);
return dto;
}catch (Exception ex){
return null;
}
return dto;
}
@ApiOperation("点 Outside Shelf Dispatch 或 Controlled Dispatch 按钮,调用此接口获取出库页详情")
@AnonymousAccess
......@@ -125,22 +125,19 @@ private IStoragePosManager storagePosManager;
}
if (ObjectUtil.isEmpty(mode)) {
return ResultBean.newErrorResult(-1, "smfcore.micron.operationFailure", "操作失败");
}
}//判断是否生成,未关闭的工单
TaskDto dto = getTaskDtoByMode(mode);
//获取是否有此类型的工单信息
//code=0,,如果已经存在,直接返回列表页面
//code=1,没有数据,OutSide按钮进入上传工单页面 ,ControlledDispatch 按钮进入选择Pn或上传工单页面
//code=2,ControlledDispatch 进入输入lineID页面
List<LiteOrderItem> itemList = getLiteOrderItemList(mode);
if (itemList != null && !itemList.isEmpty()) {
if (dto!=null &&ObjectUtil.isNotEmpty(dto.getOperationId()) && ObjectUtil.isNotEmpty(dto.getLineId()) && itemList != null && !itemList.isEmpty()) {
//已存在,直接返回列表页面
List<DispatchItemDto> list = dispatchItemMapper.toDto(itemList);
return ResultBean.newOkResult(list);
} else {
//判断是否生成,未关闭的工单
TaskDto dto = getTaskDtoByMode(mode);
if (dto != null && ObjectUtil.isNotEmpty(dto.getOperationId())) {
if(ObjectUtil.isNotEmpty(dto.getLineId())||(mode.equals("RACK"))){
......@@ -165,12 +162,15 @@ private IStoragePosManager storagePosManager;
if (StringUtils.isNotBlank(operationId)) {
dto.setOperationId(operationId);
dataCache.updateCache(Constants.CACHE_DISPATCH + mode, dto);
//需要输入lineID
return ResultBean.newErrorResult(2, "", "");
} else {
return ResultBean.newErrorResult(-1, "smfcore.api.fail", "Api011 获取数据失败", new String[]{"API011"});
}
}
}
return ResultBean.newErrorResult(1, "", "");
// return ResultBean.newErrorResult(1, "", "");
}
......
......@@ -108,7 +108,7 @@ public class MicronPreTaskController {
String key = Constants.CACHE_DISPATCH + mode;
List<LiteOrderItem> itemList = getLiteOrderItemList(mode);
if (dto != null && itemList != null && !itemList.isEmpty()) {
if (dto != null && itemList != null && !itemList.isEmpty()) {
dto.setType(2);
dto.setItemList(itemList);
List<MaterialDispatchStatus> statusList = getStatusList(itemList);
......@@ -184,9 +184,14 @@ public class MicronPreTaskController {
return ResultBean.newErrorResult(-1,"smfcore.api.fail", "{0} Failed to get data",new String[]{"API005"});
}
} else {
materialList = MicronApi.Api006(operationId, pretasks);
if(materialList==null){
return ResultBean.newErrorResult(-1,"smfcore.api.fail", "{0} Failed to get data",new String[]{"API006"});
try {
materialList = MicronApi.Api006(operationId, pretasks);
if (materialList == null) {
return ResultBean.newErrorResult(-1, "smfcore.api.fail", "{0} Failed to get data", new String[]{"API006"});
}
} catch (ApiException apiException) {
return ResultBean.newErrorResult(-1, apiException.getMsgKey(), apiException.getMessage(), apiException.getMsgParam());
}
}
try{
......@@ -406,6 +411,9 @@ public class MicronPreTaskController {
List<LiteOrderItem> itemList = new ArrayList<>();
Collection<LiteOrder> liteOrder = liteOrderCache.getAllLiteOrder();
for (LiteOrder order : liteOrder) {
if(order.isClosed()){
continue;
}
if (mode.equals(order.getMode()) && !order.isClosed()) {
return order;
......
......@@ -31,4 +31,7 @@ public class OrderItemStatus {
//API009验证失败,不可用
public static final String CheckFail = "CheckFail";
//API009验证失败,不可用
public static final String Reserved = "Reserved";
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!