Commit aa69b9a4 LN

API001,API002 errormsg加前缀

1 个父辈 c2c57d26
...@@ -236,6 +236,7 @@ public class TaskController { ...@@ -236,6 +236,7 @@ public class TaskController {
} }
//取消任务不需要屏蔽库位 //取消任务不需要屏蔽库位
taskService.cancelTask(taskId); taskService.cancelTask(taskId);
log.info("cancel 取消任务 id="+taskId+",barcode="+task.getBarcode()+", posName="+task.getPosName());
} }
return new ResponseEntity<>(HttpStatus.OK); return new ResponseEntity<>(HttpStatus.OK);
} }
......
...@@ -206,7 +206,7 @@ public class MicronApi { ...@@ -206,7 +206,7 @@ public class MicronApi {
if (ObjectUtil.isNotEmpty(errmsg)) { if (ObjectUtil.isNotEmpty(errmsg)) {
log.info("API001 ,验证失败,错误信息:" + error + ";" + errmsg); log.info("API001 ,验证失败,错误信息:" + error + ";" + errmsg);
throw new ApiException("smfcore.api.001.error", error + ";" + errmsg); throw new ApiException("smfcore.api.001.error", "API001: "+ error + ";" + errmsg);
} else { } else {
log.info("API001 ,验证失败,获取数据失败:" + errmsg); log.info("API001 ,验证失败,获取数据失败:" + errmsg);
throw new ApiException("smfcore.api.fail", "{0} Failed to get data", new String[]{"API001 : " + result.getResponseData()}); throw new ApiException("smfcore.api.fail", "{0} Failed to get data", new String[]{"API001 : " + result.getResponseData()});
......
...@@ -475,6 +475,9 @@ public class LoadingUtil { ...@@ -475,6 +475,9 @@ public class LoadingUtil {
} }
} }
} }
if( ObjectUtil.isNotEmpty(msg)&&( !msg.toUpperCase().startsWith("API002"))) {
msg = "API002:" + msg;
}
log.info("更新 入库单[" + inList.getName() + "] rfid[" + item.getRfid() + "] :条码 [" + item.getRi() + "]库位[" + item.getPosName() + "]的状态=" + newS+",错误信息="+msg); log.info("更新 入库单[" + inList.getName() + "] rfid[" + item.getRfid() + "] :条码 [" + item.getRi() + "]库位[" + item.getPosName() + "]的状态=" + newS+",错误信息="+msg);
if (item.getState() != newS || item.getNgMsg()!=msg) { if (item.getState() != newS || item.getNgMsg()!=msg) {
item.setNgMsg(msg); item.setNgMsg(msg);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!