fix 申请任务

This commit is contained in:
USER-20220102CG\noblelift
2023-06-17 16:11:03 +08:00
parent 57a95af649
commit e80490cff0

View File

@@ -938,31 +938,30 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
this.require_empty_in_time = date;
if (StrUtil.equals(paramService.findByCode(AcsConfig.HASWMS).getValue(), "1")) {
//message = "申请空盘入库任务中...";
message = "申请空盘入库任务中...";
// if(taskserver.querySameOriginTask(this.device_code) > 0 ){
// message = "已存在空盘出库任务不再请求";
// return;
// }
if(taskserver.querySameOriginTask(this.device_code) > 0 ){
message = "已存在空盘出库任务不再请求";
return;
}
JSONObject apply = new JSONObject();
apply.put("device_code", device_code);
apply.put("type", "2");
// String str = acsToWmsService.applyTaskToWms(apply);
// logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库,请求参数:" + apply);
//
// JSONObject jo = JSON.parseObject(str);
// if (ObjectUtil.isEmpty(jo)) {
// message = "申请空盘入库接口不通";
// } else {
// if (jo.getInteger("status") == 200) {
String str = acsToWmsService.applyTaskToWms(apply);
logServer.deviceExecuteLog(this.device_code, "", "", "申请空盘入库,请求参数:" + apply);
JSONObject jo = JSON.parseObject(str);
if (ObjectUtil.isEmpty(jo)) {
message = "申请空盘入库接口不通";
} else {
if (jo.getInteger("status") == 200) {
message = "申请空盘入库成功";
requireEmptyInSuccess = true;
// } else {
// message = "申请空盘入库失败," + jo.get("message").toString();
// }
// }
} else {
message = "申请空盘入库失败," + jo.get("message").toString();
}
}
}
}
}