rev
This commit is contained in:
@@ -486,12 +486,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
Resp resp = acsToWmsService.applyTask(request);
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||
return true;
|
||||
@@ -519,12 +519,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -551,12 +551,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -584,12 +584,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -616,12 +616,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -648,12 +648,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -680,12 +680,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -712,12 +712,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -743,12 +743,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -774,12 +774,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -486,12 +486,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
Resp resp = acsToWmsService.applyTask(request);
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||
return true;
|
||||
@@ -519,12 +519,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -551,12 +551,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -584,12 +584,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -616,12 +616,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -648,12 +648,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -680,12 +680,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -712,12 +712,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -743,12 +743,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -774,12 +774,12 @@ public class ConveyorPressStationDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -397,12 +397,12 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
message = RequestMethodEnum.getName("order_verify") + "order_verify 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
Resp resp = acsToWmsService.applyTask(request);
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("order_verify") + "order_verify 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("order_verify") + "order_verify 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||
}
|
||||
@@ -419,12 +419,12 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
message = RequestMethodEnum.getName("order_finish") + "order_finish 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
Resp resp = acsToWmsService.applyTask(request);
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("order_finish") + "order_finish 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("order_finish") + "order_finish 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||
}
|
||||
|
||||
@@ -376,12 +376,12 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
||||
message = RequestMethodEnum.getName("apply_one_grab") + "apply_one_grab 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
Resp resp = acsToWmsService.applyTask(request);
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_one_grab") + "apply_one_grab 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_one_grab") + "apply_one_grab 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||
return true;
|
||||
|
||||
@@ -919,7 +919,7 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
|
||||
request.setRequestNo(IdUtil.simpleUUID());
|
||||
request.setRequestDate(AgvUtil.getDate());
|
||||
Resp resp = acsToWmsService.applyTask(request);
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.nl.acs.device_driver.lnsh.lnsh_press;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -11,9 +12,12 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.device.device_driver.standard_inspect.ReadUtil;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
import org.nl.acs.device_driver.RequestMethodEnum;
|
||||
import org.nl.acs.device_driver.RouteableDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest;
|
||||
import org.nl.acs.ext.wms.data.Resp;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
@@ -24,12 +28,15 @@ import org.nl.acs.order.service.ProduceshiftorderService;
|
||||
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||
import org.nl.acs.route.service.RouteLineService;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.modules.lucene.service.LuceneExecuteLogService;
|
||||
import org.nl.modules.lucene.service.dto.LuceneLogDto;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.openscada.opc.lib.da.Server;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -59,6 +66,8 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
|
||||
|
||||
ProduceshiftorderService produceshiftorderService = SpringContextHolder.getBean("produceshiftorderServiceImpl");
|
||||
|
||||
LuceneExecuteLogService lucene = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||
|
||||
//放货准备锁
|
||||
String putReadyLock = null;
|
||||
//有货标记
|
||||
@@ -125,7 +134,7 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
|
||||
mode = this.itemProtocol.getMode();
|
||||
error = this.itemProtocol.getError();
|
||||
status = this.itemProtocol.getStatus();
|
||||
open_time = this.itemProtocol.getOpen_time();
|
||||
//open_time = this.itemProtocol.getOpen_time();
|
||||
standby_time = this.itemProtocol.getStandby_time();
|
||||
production_time = this.itemProtocol.getProduction_time();
|
||||
error_time = this.itemProtocol.getError_time();
|
||||
@@ -191,6 +200,8 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
|
||||
}
|
||||
|
||||
} catch (Exception var17) {
|
||||
log.info(var17.getMessage());
|
||||
message = "错误:" + var17.getMessage();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -211,35 +222,23 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
|
||||
message = "";
|
||||
Instruction instruction = null;
|
||||
List toInstructions;
|
||||
switch (mode) {
|
||||
case 1:
|
||||
log.debug("设备运转模式:等待工作");
|
||||
return;
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
//排产单确认
|
||||
if (!requireSucess && !"0".equals(order_No) && StrUtil.isNotBlank(order_No)) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("workorder_code", order_No);
|
||||
json.put("type", "1");
|
||||
enterProduction(json);
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
//工单完成反馈
|
||||
if (!requireSucess && !"0".equals(order_No) && StrUtil.isNotBlank(order_No)) {
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("workorder_code", order_No);
|
||||
json.put("qty", qty);
|
||||
json.put("unqualified_qty", unqualified);
|
||||
json.put("type", "2");
|
||||
enterProduction(json);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (mode > 2 && !requireSucess) {
|
||||
if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get(String.valueOf(mode)))) {
|
||||
String modethod = this.device.getExtraValue().get(String.valueOf(mode)).toString();
|
||||
try {
|
||||
applyRequest(modethod);
|
||||
} catch (Exception e) {
|
||||
message = "错误:" + e.getMessage();
|
||||
this.setIserror(true);
|
||||
}
|
||||
} else {
|
||||
message = "无效模式请求,驱动未配置此请求方法";
|
||||
}
|
||||
} else {
|
||||
message = "无请求";
|
||||
}
|
||||
|
||||
}
|
||||
last_mode = mode;
|
||||
@@ -267,6 +266,72 @@ public class LnshPressDeviceDriver extends AbstractOpcDeviceDriver implements De
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 请求
|
||||
*
|
||||
* @param
|
||||
*/
|
||||
public synchronized boolean applyRequest(String modethod) throws Exception {
|
||||
Object obj1 = this;
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
return false;
|
||||
} else {
|
||||
this.instruction_require_time = date;
|
||||
Object obj = this.getClass().getDeclaredConstructor().newInstance();
|
||||
Method method1 = this.getClass().getMethod(modethod, null);
|
||||
method1.invoke(this, null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public synchronized boolean order_verify() {
|
||||
if (!"0".equals(order_No) && StrUtil.isNotBlank(order_No)) {
|
||||
ApplyTaskRequest request = new ApplyTaskRequest();
|
||||
request.setDevice_code(this.getDevice_code());
|
||||
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
|
||||
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
|
||||
request.setOrder_code(this.getOrder_No());
|
||||
message = RequestMethodEnum.getName("order_verify") + "order_verify 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
Resp resp = acsToWmsService.applyTask(request);
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("order_verify") + "order_verify 接口请求失败" + resp.getMessage();
|
||||
}
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public synchronized boolean order_finish() {
|
||||
if (!"0".equals(order_No) && StrUtil.isNotBlank(order_No)) {
|
||||
ApplyTaskRequest request = new ApplyTaskRequest();
|
||||
request.setDevice_code(this.getDevice_code());
|
||||
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
|
||||
request.setRequest_medthod_name(RequestMethodEnum.getName(Thread.currentThread().getStackTrace()[1].getMethodName()));
|
||||
request.setOrder_code(this.getOrder_No());
|
||||
message = RequestMethodEnum.getName("order_finish") + "order_finish 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
Resp resp = acsToWmsService.applyTask(request);
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("order_finish") + "order_finish 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排产单确认
|
||||
*
|
||||
|
||||
@@ -202,7 +202,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
List toInstructions;
|
||||
|
||||
|
||||
if (mode > 2) {
|
||||
if (mode > 2 && !requireSucess) {
|
||||
if (ObjectUtil.isNotEmpty(this.device.getExtraValue().get(String.valueOf(mode)))) {
|
||||
String modethod = this.device.getExtraValue().get(String.valueOf(mode)).toString();
|
||||
try {
|
||||
@@ -486,12 +486,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
Resp resp = acsToWmsService.applyTask(request);
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||
return true;
|
||||
@@ -519,12 +519,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -551,12 +551,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -584,12 +584,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -616,12 +616,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -648,12 +648,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_force_take_full_vehicle_in_storage") + "apply_force_take_full_vehicle_in_storage 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -680,12 +680,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("barcode_sucess_apply") + "barcode_sucess_apply 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -712,12 +712,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -743,12 +743,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
@@ -774,12 +774,12 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(this.mode);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求失败" + resp.getComment();;
|
||||
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求失败" + resp.getMessage();;
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -27,9 +27,8 @@ public class LmsUtil {
|
||||
String isConnect = paramService.findByCode("hasWms").getValue();
|
||||
if (StrUtil.equals("0", isConnect)) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "false");
|
||||
result.put("code", "1");
|
||||
result.put("comment", "参数配置表中-hasWms为:0");
|
||||
result.put("400", "500");
|
||||
result.put("message", "参数配置表中-hasWms为:0");
|
||||
log.info("请求LMS异常返回参数:{}", String.valueOf(result));
|
||||
return String.valueOf(result);
|
||||
//throw new BadRequestException("参数配置表中-hasWms为:0");
|
||||
@@ -46,9 +45,8 @@ public class LmsUtil {
|
||||
return body;
|
||||
} catch (Exception e) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "false");
|
||||
result.put("code", "1");
|
||||
result.put("comment", e.getMessage());
|
||||
result.put("code", "500");
|
||||
result.put("message", e.getMessage());
|
||||
log.info("请求LMS异常返回参数:{}", String.valueOf(result));
|
||||
return String.valueOf(result);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ public class RespUtil {
|
||||
public static <T> Resp getResp(String result, T t) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
Resp<T> resp = new Resp<>();
|
||||
resp.setData(t);
|
||||
resp = JSONObject.toJavaObject(jsonObject, Resp.class);
|
||||
return resp;
|
||||
}
|
||||
|
||||
@@ -9,24 +9,7 @@ import lombok.Data;
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class Resp<T> {
|
||||
/**
|
||||
* 成功返回true,失败返回false
|
||||
*/
|
||||
public String result;
|
||||
public class Resp<T> extends BaseResponse {
|
||||
|
||||
/**
|
||||
* 错误码(0表示成功)1代表入库目的位置有货,其他更多情况待定
|
||||
*/
|
||||
public String code;
|
||||
|
||||
/**
|
||||
* 错误信息,如果成功则为null
|
||||
*/
|
||||
public String comment;
|
||||
|
||||
/**
|
||||
* 报文携带的数据
|
||||
*/
|
||||
public T data;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,10 @@ spring:
|
||||
druid:
|
||||
db-type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
# url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:rl_mg_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:Root.123456}
|
||||
# 初始连接数
|
||||
initial-size: 5
|
||||
# 最小连接数
|
||||
|
||||
@@ -159,6 +159,67 @@
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span">交互相关:</span>
|
||||
</div>
|
||||
<div class="crud-opts2" style="margin-bottom: 5px;">
|
||||
<span class="crud-opts-right2">
|
||||
<!--左侧插槽-->
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="insertdtl()"
|
||||
>
|
||||
新增一行
|
||||
</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div class="app-container">
|
||||
<el-table :data="modeform.tableData" border fit highlight-current-row style="width: 100%;" class="tb-edit">
|
||||
<el-table-column label="mode" prop="模式" width="180">
|
||||
<template scope="scope">
|
||||
<el-input-number value="3" :min="3" v-model="scope.row.mode" size="mini" />
|
||||
<span v-show="scope.row.edit">{{ scope.row.mode }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="request" prop="请求方法" width="180">
|
||||
<template scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.request"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in requestMethodList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="170" >
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click.native.prevent="deleteRow(scope.$index, modeform.tableData)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span">PLC读取字段:</span>
|
||||
@@ -294,8 +355,61 @@ export default {
|
||||
dataOpcservers: [],
|
||||
dataOpcPlcs: [],
|
||||
deviceList: [],
|
||||
requestMethodList: [],
|
||||
data1: [],
|
||||
data2: [],
|
||||
modeform: {
|
||||
tableData: [
|
||||
{
|
||||
mode: '3',
|
||||
request: 'order_verify'
|
||||
},
|
||||
{
|
||||
mode: '4',
|
||||
request: 'order_finish'
|
||||
},
|
||||
{
|
||||
mode: '5',
|
||||
request: 'apply_put_full_vehicle'
|
||||
},
|
||||
{
|
||||
mode: '6',
|
||||
request: 'apply_put_empty_vehicle'
|
||||
},
|
||||
{
|
||||
mode: '7',
|
||||
request: 'apply_take_empty_vehicle'
|
||||
},
|
||||
{
|
||||
mode: '8',
|
||||
request: 'apply_take_full_vehicle'
|
||||
},
|
||||
{
|
||||
mode: '9',
|
||||
request: 'apply_force_take_full_vehicle'
|
||||
},
|
||||
{
|
||||
mode: '10',
|
||||
request: 'apply_force_take_full_vehicle_in_storage'
|
||||
},
|
||||
{
|
||||
mode: '11',
|
||||
request: 'barcode_sucess_apply'
|
||||
},
|
||||
{
|
||||
mode: '12',
|
||||
request: 'get_vehicle_info'
|
||||
},
|
||||
{
|
||||
mode: '13',
|
||||
request: 'force_no_package'
|
||||
},
|
||||
{
|
||||
mode: '14',
|
||||
request: 'apply_labelling'
|
||||
}
|
||||
]
|
||||
},
|
||||
form: {
|
||||
inspect_in_stocck: true,
|
||||
ignore_pickup_check: true,
|
||||
@@ -349,9 +463,19 @@ export default {
|
||||
deviceCrud.selectDeviceList().then(data => {
|
||||
this.deviceList = data
|
||||
})
|
||||
deviceCrud.selectRequestMethodList().then(data => {
|
||||
this.requestMethodList = data
|
||||
})
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
insertdtl() {
|
||||
this.modeform.tableData.push({mode: '', request: '' })
|
||||
},
|
||||
deleteRow(index, rows) {
|
||||
debugger
|
||||
rows.splice(index, 1)
|
||||
},
|
||||
finishReadEdit(data) {
|
||||
// 编辑的是code列,并且值包含mode
|
||||
if (data.code.indexOf('mode') !== -1) {
|
||||
@@ -518,7 +642,7 @@ export default {
|
||||
parentForm.is_route = true
|
||||
parentForm.plc_id = this.plc_id
|
||||
parentForm.opc_id = this.opc_id
|
||||
updateConfig(parentForm, this.form, null, this.data1, this.data2).then(res => {
|
||||
updateConfig(parentForm, this.form, this.modeform, this.data1, this.data2).then(res => {
|
||||
this.notify('保存成功', 'success')
|
||||
this.configLoading = false
|
||||
}).catch(err => {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user