fix 日志
This commit is contained in:
@@ -253,9 +253,9 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
log.debug("设备运转模式:等待工作");
|
log.debug("设备运转模式:等待工作");
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (!requireSucess && StrUtil.isNotEmpty(barcode())) {
|
// if (!requireSucess && StrUtil.isNotEmpty(barcode())) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "扫码器扫到的条码为:" + barcode());
|
// logServer.deviceExecuteLog(this.device_code, "", "", "扫码器扫到的条码为:" + barcode());
|
||||||
}
|
// }
|
||||||
//申请任务
|
//申请任务
|
||||||
if (!StrUtil.isEmpty(barcode()) && !StrUtil.equals(barcode(), "NoRead") && barcode().trim().length() == 12 && !requireSucess) {
|
if (!StrUtil.isEmpty(barcode()) && !StrUtil.equals(barcode(), "NoRead") && barcode().trim().length() == 12 && !requireSucess) {
|
||||||
logServer.deviceExecuteLog(this.device_code, "", "", "开始申请任务~~~~~~");
|
logServer.deviceExecuteLog(this.device_code, "", "", "开始申请任务~~~~~~");
|
||||||
@@ -577,10 +577,36 @@ public class StandardCoveyorControlWithScannerDeviceDriver extends AbstractOpcDe
|
|||||||
message = "申请任务中...";
|
message = "申请任务中...";
|
||||||
logServer.deviceExecuteLog(device_code, "", "", "开始申请任务...条码信息:" + container_code);
|
logServer.deviceExecuteLog(device_code, "", "", "开始申请任务...条码信息:" + container_code);
|
||||||
JSONObject apply = new JSONObject();
|
JSONObject apply = new JSONObject();
|
||||||
apply.put("type", "6");
|
if(action == 4){
|
||||||
apply.put("vehicle_code", container_code);
|
if(this.itemProtocol.getItem_task() == 0 ){
|
||||||
apply.put("point_code", device_code);
|
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);
|
String str = acsToWmsService.applyTaskToWms(apply);
|
||||||
|
logServer.deviceExecuteLog(device_code, "", "", "开始申请任务...返回参数:" + str.toString());
|
||||||
|
|
||||||
JSONObject jo = JSON.parseObject(str);
|
JSONObject jo = JSON.parseObject(str);
|
||||||
if (ObjectUtil.isEmpty(jo)) {
|
if (ObjectUtil.isEmpty(jo)) {
|
||||||
message = "接口不通";
|
message = "接口不通";
|
||||||
|
|||||||
Reference in New Issue
Block a user