add标准版-压制码垛机械手工单
This commit is contained in:
@@ -61,6 +61,10 @@ public class ItemProtocol {
|
|||||||
return this.getOpcIntegerValue(item_heartbeat);
|
return this.getOpcIntegerValue(item_heartbeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getTo_weight() {
|
||||||
|
return this.getOpcIntegerValue(item_to_weight);
|
||||||
|
}
|
||||||
|
|
||||||
public int getMode() {
|
public int getMode() {
|
||||||
return this.getOpcIntegerValue(item_mode);
|
return this.getOpcIntegerValue(item_mode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import org.nl.acs.device_driver.RouteableDeviceDriver;
|
|||||||
import org.nl.acs.device_driver.StandardRequestMethod;
|
import org.nl.acs.device_driver.StandardRequestMethod;
|
||||||
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver;
|
||||||
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
import org.nl.acs.device_driver.driver.ExecutableDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.lnsh.lnsh_mixing_mill.LnshMixingMillDeviceDriver;
|
||||||
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
|
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskResponse;
|
||||||
import org.nl.acs.ext.wms.data.Resp;
|
import org.nl.acs.ext.wms.data.Resp;
|
||||||
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest;
|
import org.nl.acs.ext.wms.data.AcsToWmsData.applyTask.ApplyTaskRequest;
|
||||||
@@ -26,6 +27,7 @@ import org.nl.acs.instruction.service.dto.Instruction;
|
|||||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||||
import org.nl.acs.monitor.DeviceStageMonitor;
|
import org.nl.acs.monitor.DeviceStageMonitor;
|
||||||
import org.nl.acs.opc.Device;
|
import org.nl.acs.opc.Device;
|
||||||
|
import org.nl.acs.opc.DeviceAppService;
|
||||||
import org.nl.acs.route.service.RouteLineService;
|
import org.nl.acs.route.service.RouteLineService;
|
||||||
import org.nl.acs.task.service.TaskService;
|
import org.nl.acs.task.service.TaskService;
|
||||||
import org.nl.modules.lucene.service.LuceneExecuteLogService;
|
import org.nl.modules.lucene.service.LuceneExecuteLogService;
|
||||||
@@ -53,6 +55,8 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
|
|
||||||
DeviceService deviceservice = SpringContextHolder.getBean("deviceServiceImpl");
|
DeviceService deviceservice = SpringContextHolder.getBean("deviceServiceImpl");
|
||||||
|
|
||||||
|
LuceneExecuteLogService lucene = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||||
|
|
||||||
RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl");
|
RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl");
|
||||||
|
|
||||||
TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl");
|
TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl");
|
||||||
@@ -61,10 +65,12 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
|
|
||||||
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
|
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
|
||||||
|
|
||||||
LuceneExecuteLogService lucene = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
DeviceAppService deviceAppService = SpringContextHolder.getBean("deviceAppServiceImpl");
|
||||||
|
|
||||||
|
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
|
int move = 0;
|
||||||
|
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int action = 0;
|
int action = 0;
|
||||||
int last_action = 0;
|
int last_action = 0;
|
||||||
@@ -335,6 +341,7 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求
|
* 请求
|
||||||
*
|
*
|
||||||
@@ -353,6 +360,313 @@ public class LnshPalletizingManipulatorDeviceDriver extends AbstractOpcDeviceDri
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请补满料盅托盘
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
public synchronized boolean apply_put_full_vehicle() {
|
||||||
|
if(move == 0) {
|
||||||
|
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()));
|
||||||
|
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||||
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||||
|
if (resp.getCode() == 200) {
|
||||||
|
this.writing(200);
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
} else {
|
||||||
|
this.writing(400);
|
||||||
|
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||||
|
}
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message = RequestMethodEnum.getName("apply_put_full_vehicle") + "apply_put_full_vehicle 设备有货未请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请补空料盅托盘
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
public synchronized boolean apply_put_empty_vehicle() {
|
||||||
|
if(move == 0) {
|
||||||
|
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()));
|
||||||
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||||
|
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||||
|
if (resp.getCode() == 200) {
|
||||||
|
this.writing(200);
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
} else {
|
||||||
|
this.writing(400);
|
||||||
|
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 接口请求失败" + resp.getMessage();;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message = RequestMethodEnum.getName("apply_put_empty_vehicle") + "apply_put_empty_vehicle 设备有货未请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请取走空料盅托盘
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
public synchronized boolean apply_take_empty_vehicle() {
|
||||||
|
if(move == 0) {
|
||||||
|
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()));
|
||||||
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||||
|
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||||
|
if (resp.getCode() == 200) {
|
||||||
|
this.writing(200);
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
} else {
|
||||||
|
this.writing(400);
|
||||||
|
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 接口请求失败" + resp.getMessage();;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 设备有货未请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请取走满料盅托盘
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
public synchronized boolean apply_take_full_vehicle() {
|
||||||
|
if(move > 0) {
|
||||||
|
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()));
|
||||||
|
if(ObjectUtil.isNotEmpty(this.getDevice().getExtraValue().get("link_device_code"))){
|
||||||
|
Device device = deviceAppService.findDeviceByCode(this.getDevice().getExtraValue().get("link_device_code").toString());
|
||||||
|
if(ObjectUtil.isNotEmpty(device)){
|
||||||
|
LnshMixingMillDeviceDriver lnshMixingMillDeviceDriver;
|
||||||
|
if(device.getDeviceDriver() instanceof LnshMixingMillDeviceDriver){
|
||||||
|
lnshMixingMillDeviceDriver = (LnshMixingMillDeviceDriver) device.getDeviceDriver();
|
||||||
|
request.setMix_mum(String.valueOf(lnshMixingMillDeviceDriver.getMix_num()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||||
|
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||||
|
|
||||||
|
if (resp.getCode() == 200) {
|
||||||
|
this.writing(200);
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
} else {
|
||||||
|
this.writing(400);
|
||||||
|
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message = RequestMethodEnum.getName("apply_take_full_vehicle") + "apply_take_full_vehicle 设备无货未请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请强制取走满料盅托盘
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
public synchronized boolean apply_force_take_full_vehicle() {
|
||||||
|
if(move > 0) {
|
||||||
|
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()));
|
||||||
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||||
|
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 (resp.getCode() == 200) {
|
||||||
|
this.writing(200);
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
} else {
|
||||||
|
this.writing(400);
|
||||||
|
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 接口请求失败" + resp.getMessage();;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message = RequestMethodEnum.getName("apply_force_take_full_vehicle") + "apply_force_take_full_vehicle 设备无货未请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请强制满托入缓存
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
public synchronized boolean apply_force_take_full_vehicle_in_storage() {
|
||||||
|
if(move > 0) {
|
||||||
|
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()));
|
||||||
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||||
|
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 (resp.getCode() == 200) {
|
||||||
|
this.writing(200);
|
||||||
|
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.getMessage();;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
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));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扫码成功申请
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
public synchronized boolean barcode_success_apply() {
|
||||||
|
if(move > 0) {
|
||||||
|
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()));
|
||||||
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||||
|
message = RequestMethodEnum.getName("barcode_success_apply") + "barcode_success_apply 接口请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||||
|
if (resp.getCode() == 200) {
|
||||||
|
this.writing(200);
|
||||||
|
this.writing(resp.getIs_standing_finish(),"1");
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
} else {
|
||||||
|
this.writing(400);
|
||||||
|
message = RequestMethodEnum.getName("barcode_success_apply") + "barcode_success_apply 接口请求失败" + resp.getMessage();;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message = RequestMethodEnum.getName("barcode_success_apply") + "barcode_success_apply 设备无货未请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取组盘信息
|
||||||
|
*
|
||||||
|
* @param
|
||||||
|
*/
|
||||||
|
public synchronized boolean get_vehicle_info() {
|
||||||
|
if(move > 0) {
|
||||||
|
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()));
|
||||||
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||||
|
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||||
|
|
||||||
|
if (resp.getCode() == 200) {
|
||||||
|
this.writing(200);
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
} else {
|
||||||
|
this.writing(400);
|
||||||
|
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 接口请求失败" + resp.getMessage();;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message = RequestMethodEnum.getName("get_vehicle_info") + "get_vehicle_info 设备无货未请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 强制去包装-不包装
|
||||||
|
*/
|
||||||
|
public synchronized boolean force_no_package() {
|
||||||
|
if(move > 0) {
|
||||||
|
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()));
|
||||||
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||||
|
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||||
|
|
||||||
|
if (resp.getCode() == 200) {
|
||||||
|
this.writing(200);
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
} else {
|
||||||
|
this.writing(400);
|
||||||
|
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 接口请求失败" + resp.getMessage();;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message = RequestMethodEnum.getName("force_no_package") + "force_no_package 设备无货未请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请贴标
|
||||||
|
*/
|
||||||
|
public synchronized boolean apply_labelling() {
|
||||||
|
if(move > 0) {
|
||||||
|
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()));
|
||||||
|
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||||
|
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||||
|
|
||||||
|
if (resp.getCode() == 200) {
|
||||||
|
this.writing(200);
|
||||||
|
this.setRequireSucess(true);
|
||||||
|
} else {
|
||||||
|
this.writing(400);
|
||||||
|
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 接口请求失败" + resp.getMessage();;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
message = RequestMethodEnum.getName("apply_labelling") + "apply_labelling 设备无货未请求LMS...";
|
||||||
|
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean apply_one_grab() {
|
public boolean apply_one_grab() {
|
||||||
GrabRequest request = new GrabRequest();
|
GrabRequest request = new GrabRequest();
|
||||||
request.setDevice_code(this.getDevice_code());
|
request.setDevice_code(this.getDevice_code());
|
||||||
|
|||||||
@@ -692,7 +692,7 @@ public class ItemProtocol {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getOpcStringValue(String protocol) {
|
public String getOpcStringValue(String protocol) {
|
||||||
String value = this.driver.getStringValue(protocol);
|
String value = this.driver.getStringValue(protocol);
|
||||||
if (StrUtil.isBlank(value)) {
|
if (StrUtil.isBlank(value)) {
|
||||||
@@ -783,7 +783,6 @@ public class ItemProtocol {
|
|||||||
list.add(new ItemDto(item_to_feedback, "机器人动作反馈", "DB8.W0"));
|
list.add(new ItemDto(item_to_feedback, "机器人动作反馈", "DB8.W0"));
|
||||||
list.add(new ItemDto(item_to_error, "故障代码", "DB8.W1"));
|
list.add(new ItemDto(item_to_error, "故障代码", "DB8.W1"));
|
||||||
list.add(new ItemDto(item_to_material, "物料", "DB8.S2"));
|
list.add(new ItemDto(item_to_material, "物料", "DB8.S2"));
|
||||||
|
|
||||||
list.add(new ItemDto(item_to_product_code, "产品编号", "DB8.D258"));
|
list.add(new ItemDto(item_to_product_code, "产品编号", "DB8.D258"));
|
||||||
list.add(new ItemDto(item_to_AlongSide, "A长边", "DB8.D262"));
|
list.add(new ItemDto(item_to_AlongSide, "A长边", "DB8.D262"));
|
||||||
list.add(new ItemDto(item_to_BshortSide, "B短边", "DB8.D266"));
|
list.add(new ItemDto(item_to_BshortSide, "B短边", "DB8.D266"));
|
||||||
|
|||||||
@@ -194,7 +194,66 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</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="300">
|
||||||
|
<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">
|
<el-card class="box-card" shadow="never">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span class="role-span">PLC读取字段:</span>
|
<span class="role-span">PLC读取字段:</span>
|
||||||
@@ -332,6 +391,59 @@ export default {
|
|||||||
deviceList: [],
|
deviceList: [],
|
||||||
data1: [],
|
data1: [],
|
||||||
data2: [],
|
data2: [],
|
||||||
|
requestMethodList: [],
|
||||||
|
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_success_apply'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode: '12',
|
||||||
|
request: 'get_vehicle_info'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode: '13',
|
||||||
|
request: 'force_no_package'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
mode: '14',
|
||||||
|
request: 'apply_labelling'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
form: {
|
form: {
|
||||||
inspect_in_stocck: true,
|
inspect_in_stocck: true,
|
||||||
ignore_pickup_check: true,
|
ignore_pickup_check: true,
|
||||||
@@ -385,6 +497,9 @@ export default {
|
|||||||
deviceCrud.selectDeviceList().then(data => {
|
deviceCrud.selectDeviceList().then(data => {
|
||||||
this.deviceList = data
|
this.deviceList = data
|
||||||
})
|
})
|
||||||
|
deviceCrud.selectRequestMethodList().then(data => {
|
||||||
|
this.requestMethodList = data
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user