fix 申请任务
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user