fix 日志
This commit is contained in:
@@ -253,9 +253,9 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
log.debug("设备运转模式:等待工作");
|
||||
break;
|
||||
case 2:
|
||||
if (!requireSucess && StrUtil.isNotEmpty(barcode())) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "扫码器扫到的条码为:" + barcode());
|
||||
}
|
||||
// if (!requireSucess && StrUtil.isNotEmpty(barcode())) {
|
||||
// logServer.deviceExecuteLog(this.device_code, "", "", "扫码器扫到的条码为:" + barcode());
|
||||
// }
|
||||
//申请任务
|
||||
if (!StrUtil.isEmpty(barcode()) && !StrUtil.equals(barcode(), "NoRead") && barcode().trim().length() == 12 && !requireSucess) {
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始申请任务~~~~~~");
|
||||
@@ -577,10 +577,36 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
||||
message = "申请任务中...";
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始申请任务...条码信息:" + container_code);
|
||||
JSONObject apply = new JSONObject();
|
||||
apply.put("type", "6");
|
||||
apply.put("vehicle_code", container_code);
|
||||
apply.put("point_code", device_code);
|
||||
if(action == 4){
|
||||
if(this.itemProtocol.getItem_task() == 0 ){
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始申请一楼任务...上次指令号为0");
|
||||
return false;
|
||||
}
|
||||
Instruction inst = instructionService.findByCode(String.valueOf(this.itemProtocol.getItem_task()));
|
||||
if(ObjectUtil.isEmpty(inst)){
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始申请一楼任务...指令号:" + String.valueOf(this.itemProtocol.getItem_task() + "未找到对应指令"));
|
||||
return false;
|
||||
}
|
||||
TaskDto taskDto = taskserver.findByCode(inst.getTask_code());
|
||||
if(ObjectUtil.isEmpty(taskDto)){
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始申请一楼任务...指令号:" + String.valueOf(this.itemProtocol.getItem_task() + "未找到对应任务"));
|
||||
return false;
|
||||
}
|
||||
apply.put("type", "10");
|
||||
apply.put("vehicle_code", container_code);
|
||||
apply.put("point_code", device_code);
|
||||
apply.put("task_id", taskDto.getExt_task_id());
|
||||
|
||||
} else {
|
||||
apply.put("type", "6");
|
||||
apply.put("vehicle_code", container_code);
|
||||
apply.put("point_code", device_code);
|
||||
}
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始申请任务...请求参数:" + apply.toString());
|
||||
|
||||
String str = acsToWmsService.applyTaskToWms(apply);
|
||||
logServer.deviceExecuteLog(device_code, "", "", "开始申请任务...返回参数:" + str.toString());
|
||||
|
||||
JSONObject jo = JSON.parseObject(str);
|
||||
if (ObjectUtil.isEmpty(jo)) {
|
||||
message = "接口不通";
|
||||
|
||||
Reference in New Issue
Block a user