rev
This commit is contained in:
Binary file not shown.
@@ -217,7 +217,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
//标准版-机械手对接位
|
||||
if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
|
||||
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver();
|
||||
lnshPalletizingManipulatorSiteDeviceDriver.writing(3);
|
||||
lnshPalletizingManipulatorSiteDeviceDriver.writing(2);
|
||||
if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() != 0
|
||||
&& lnshPalletizingManipulatorSiteDeviceDriver.getMove() != 0
|
||||
&& (lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 3 || lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 1)
|
||||
@@ -364,7 +364,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
lnshFoldDiscSiteDeviceDriver = (LnshFoldDiscSiteDeviceDriver) device.getDeviceDriver();
|
||||
lnshFoldDiscSiteDeviceDriver.writing(3);
|
||||
if (lnshFoldDiscSiteDeviceDriver.getMode() != 0
|
||||
&& lnshFoldDiscSiteDeviceDriver.getMove() != 0) {
|
||||
&& lnshFoldDiscSiteDeviceDriver.getContainer_qty() > 0) {
|
||||
// && (lnshFoldDiscSiteDeviceDriver.getIo_action() == 3 || lnshFoldDiscSiteDeviceDriver.getIo_action() == 1)
|
||||
// && (lnshFoldDiscSiteDeviceDriver.getAction() == 3 || lnshFoldDiscSiteDeviceDriver.getAction() == 1)
|
||||
inst.setExecute_status("1");
|
||||
@@ -453,7 +453,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
//标准版-机械手对接位
|
||||
if (device.getDeviceDriver() instanceof LnshPalletizingManipulatorSiteDeviceDriver) {
|
||||
lnshPalletizingManipulatorSiteDeviceDriver = (LnshPalletizingManipulatorSiteDeviceDriver) device.getDeviceDriver();
|
||||
lnshPalletizingManipulatorSiteDeviceDriver.writing(5);
|
||||
lnshPalletizingManipulatorSiteDeviceDriver.writing(3);
|
||||
if (lnshPalletizingManipulatorSiteDeviceDriver.getMode() != 0
|
||||
&& lnshPalletizingManipulatorSiteDeviceDriver.getMove() == 0
|
||||
&& (lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 3 || lnshPalletizingManipulatorSiteDeviceDriver.getIo_action() == 2)
|
||||
@@ -592,7 +592,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
lnshFoldDiscSiteDeviceDriver = (LnshFoldDiscSiteDeviceDriver) device.getDeviceDriver();
|
||||
lnshFoldDiscSiteDeviceDriver.writing(5);
|
||||
if (lnshFoldDiscSiteDeviceDriver.getMode() != 0
|
||||
&& lnshFoldDiscSiteDeviceDriver.getMove() != 0
|
||||
&& lnshFoldDiscSiteDeviceDriver.getContainer_qty() == 0
|
||||
// && (lnshFoldDiscSiteDeviceDriver.getIo_action() == 3 || lnshFoldDiscSiteDeviceDriver.getIo_action() == 2)
|
||||
) {
|
||||
inst.setExecute_status("5");
|
||||
@@ -844,7 +844,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
lnshFoldDiscSiteDeviceDriver = (LnshFoldDiscSiteDeviceDriver) device.getDeviceDriver();
|
||||
lnshFoldDiscSiteDeviceDriver.writing(4);
|
||||
if (lnshFoldDiscSiteDeviceDriver.getMode() != 0
|
||||
&& lnshFoldDiscSiteDeviceDriver.getMove() == 0
|
||||
// && lnshFoldDiscSiteDeviceDriver.getContainer_qty() == 0
|
||||
// && (lnshFoldDiscSiteDeviceDriver.getIo_action() == 1 || lnshFoldDiscSiteDeviceDriver.getIo_action() == 3)
|
||||
// && (lnshFoldDiscSiteDeviceDriver.getAction() == 2 || lnshFoldDiscSiteDeviceDriver.getAction() == 3)
|
||||
) {
|
||||
@@ -1086,7 +1086,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic
|
||||
if (device.getDeviceDriver() instanceof LnshFoldDiscSiteDeviceDriver) {
|
||||
lnshFoldDiscSiteDeviceDriver = (LnshFoldDiscSiteDeviceDriver) device.getDeviceDriver();
|
||||
if (lnshFoldDiscSiteDeviceDriver.getMode() != 0
|
||||
&& lnshFoldDiscSiteDeviceDriver.getMove() != 0
|
||||
// && lnshFoldDiscSiteDeviceDriver.getMove() != 0
|
||||
// && (lnshFoldDiscSiteDeviceDriver.getIo_action() == 2 || lnshFoldDiscSiteDeviceDriver.getIo_action() == 3)
|
||||
) {
|
||||
inst.setExecute_status("6");
|
||||
|
||||
@@ -1,18 +1,175 @@
|
||||
package org.nl.acs.device_driver.driver;
|
||||
|
||||
import org.nl.acs.opc.OpcConfig;
|
||||
import org.nl.acs.opc.*;
|
||||
import org.nl.acs.udw.UnifiedDataAccessor;
|
||||
import org.nl.acs.udw.UnifiedDataAccessorFactory;
|
||||
import org.nl.acs.udw.UnifiedDataAppService;
|
||||
import org.nl.modules.wql.exception.WDKException;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.openscada.opc.lib.da.Group;
|
||||
import org.openscada.opc.lib.da.Item;
|
||||
import org.openscada.opc.lib.da.ItemState;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements OpcDeviceDriver {
|
||||
UnifiedDataAccessor opcUdw;
|
||||
|
||||
@Autowired
|
||||
private OpcServerService opcServerService = SpringContextHolder.getBean(OpcServerService .class);
|
||||
|
||||
public AbstractOpcDeviceDriver() {
|
||||
this.opcUdw = UnifiedDataAccessorFactory.getAccessor(OpcConfig.udw_opc_value_key);
|
||||
}
|
||||
|
||||
|
||||
private Date sendTime;
|
||||
private String last_items;
|
||||
private int noLog_sendTimeOut;
|
||||
private Date noLog_sendTime;
|
||||
private String noLog_last_items;
|
||||
|
||||
@Override
|
||||
public UnifiedDataAccessor getOpcValueAccessor() {
|
||||
return this.opcUdw;
|
||||
}
|
||||
|
||||
|
||||
public void checkcontrol(Map<String, Object> itemValues) throws Exception {
|
||||
Group group = opcServerService.getServer(this.getOpcServer());
|
||||
Map<String, Object> write = new HashMap();
|
||||
Map<String, Item> readitems = new LinkedHashMap();
|
||||
List<String> itemsString = new ArrayList();
|
||||
itemsString = new ArrayList<> (itemValues.keySet());
|
||||
Iterator is = itemsString.iterator();
|
||||
|
||||
while (is.hasNext()) {
|
||||
String string = (String) is.next();
|
||||
try {
|
||||
readitems.put(string, group.addItem(string));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
int i = 0;
|
||||
while(true) {
|
||||
//下发信号
|
||||
control( itemValues);
|
||||
Map<String, Object> read = new HashMap();
|
||||
Map<Item, ItemState> itemStatus = group.read(true, (Item[])readitems.values().toArray(new Item[0]));
|
||||
Set<Item> items = itemStatus.keySet();
|
||||
Iterator var15 = items.iterator();
|
||||
|
||||
while(var15.hasNext()) {
|
||||
Item item = (Item)var15.next();
|
||||
ItemState itemState = (ItemState)itemStatus.get(item);
|
||||
Object value = OpcUtl.getValue(item, itemState);
|
||||
read.put(item.getId(), value);
|
||||
}
|
||||
|
||||
boolean check = true;
|
||||
Iterator var24 = itemsString.iterator();
|
||||
|
||||
while(var24.hasNext()) {
|
||||
String itemString = (String)var24.next();
|
||||
if (!ObjectUtl.isEquals(itemValues.get(itemString), JsonUtl.parse(read.get(itemString)))) {
|
||||
check = false;
|
||||
}
|
||||
}
|
||||
if (check) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (i > 0) {
|
||||
ThreadUtl.sleep(300L);
|
||||
}
|
||||
|
||||
if (i > 3) {
|
||||
throw new WDKException("写入次数超过3次而失败");
|
||||
}
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean control(Map<String, Object> itemValues) {
|
||||
|
||||
Iterator<Map.Entry<String, Object>> it = itemValues.entrySet().iterator();
|
||||
|
||||
ItemValue p2[];
|
||||
p2 = new ItemValue[itemValues.size()];
|
||||
int i=0;
|
||||
while (it.hasNext()) {
|
||||
Map.Entry<String, Object> entry = it.next();
|
||||
System.out.println("即将写入值:"+entry.getKey() + ":" + entry.getValue());
|
||||
p2[i] = new ItemValue();
|
||||
p2[i].setItem_code(entry.getKey());
|
||||
p2[i].setItem_value(entry.getValue());
|
||||
i++;
|
||||
}
|
||||
|
||||
return this.control(p2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean control(ItemValue[] itemValues) {
|
||||
if (itemValues != null && itemValues.length != 0) {
|
||||
String this_items = JsonUtl.parseWithoutException(itemValues);
|
||||
boolean need_write = false;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
ItemValue[] var5 = itemValues;
|
||||
int var6 = itemValues.length;
|
||||
|
||||
for (int var7 = 0; var7 < var6; ++var7) {
|
||||
ItemValue itemValue = var5[var7];
|
||||
String code = itemValue.getItem_code();
|
||||
Object udw_value = this.getUdwValue(code);
|
||||
Object write_value = itemValue.getItem_value();
|
||||
sb.append(code);
|
||||
sb.append(":");
|
||||
sb.append(JsonUtl.parseWithoutException(udw_value));
|
||||
sb.append(";");
|
||||
if (!need_write && !UnifiedDataAppService.isEquals(udw_value, write_value)) {
|
||||
need_write = true;
|
||||
} else {
|
||||
//log.warn("下发信号点位{} 当前写入值:{} 与系统内存值:{} 相同,不再写入 ", code, write_value, udw_value );
|
||||
}
|
||||
}
|
||||
// need_write = true;
|
||||
|
||||
if (need_write) {
|
||||
Date date = new Date();
|
||||
/*if (StringUtl.isEqual(this_items, this.last_items) && date.getTime() - this.sendTime.getTime() < (long) WcsConfig.opc_write_repeat_check) {
|
||||
log.trace("发送时间因为小于{}毫秒,而被无视", WcsConfig.opc_write_repeat_check);
|
||||
return false;
|
||||
}*/
|
||||
|
||||
this.last_items = this_items;
|
||||
this.sendTime = date;
|
||||
/* this.execute_log.setResource(this.getDevice().getCode(), this.getDevice().getName());
|
||||
this.execute_log.log("原始记录{}->变更为{}", new Object[]{sb, this_items});
|
||||
OpcServerService opcServerService = OpcServerFactory.getOpcServerService();*/
|
||||
|
||||
OpcServerService opcServerService = SpringContextHolder.getBean(OpcServerServiceImpl.class);
|
||||
|
||||
opcServerService.writeInteger(this.getOpcServer(), itemValues);
|
||||
UnifiedDataAccessor opcValueAccessor = this.getOpcValueAccessor();
|
||||
ItemValue[] var17 = itemValues;
|
||||
int var18 = itemValues.length;
|
||||
|
||||
for (int var19 = 0; var19 < var18; ++var19) {
|
||||
ItemValue itemValue = var17[var19];
|
||||
String code = itemValue.getItem_code();
|
||||
Object value = itemValue.getItem_value();
|
||||
opcValueAccessor.setValue(code, value);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
throw new WDKException("下发 无内容");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,8 @@ public interface OpcDeviceDriver extends DeviceDriver {
|
||||
}
|
||||
|
||||
default Integer getIntegeregerValue(String protocol) {
|
||||
return (Integer) this.getValue(protocol);
|
||||
Object value = this.getValue(protocol)==null?"0":this.getValue(protocol);
|
||||
return Integer.parseInt(value.toString());
|
||||
}
|
||||
|
||||
default int[] getIntegeregerArrayValue(String protocol) {
|
||||
@@ -86,4 +87,7 @@ public interface OpcDeviceDriver extends DeviceDriver {
|
||||
return this.getOpcServer() + "." + this.getOpcPlc() + "." + this.getDeviceCode() + "." + item;
|
||||
}
|
||||
|
||||
default Object getUdwValue(String protocol) {
|
||||
return this.getOpcValueAccessor().getValue(protocol);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,12 +155,14 @@ public class LnshLaminatingMachineDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
request.setVehicle_type(String.valueOf(container_type));
|
||||
ApplySignalStatusResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)), ApplySignalStatusResponse.class);
|
||||
message = RequestMethodEnum.getName("real_time_set_point") + "real_time_set_point 接口请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "参数:" + JSON.toJSONString(request)));
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "请求参数:" + JSON.toJSONString(request)));
|
||||
|
||||
if (resp.getCode() == 200) {
|
||||
message = RequestMethodEnum.getName("real_time_set_point") + "real_time_set_point 接口请求成功" + resp.getMessage();;
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(request)));
|
||||
} else {
|
||||
message = RequestMethodEnum.getName("real_time_set_point") + "real_time_set_point 接口请求失败" + resp.getMessage();;
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message + "返回参数:" + JSON.toJSONString(request)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.nl.acs.device_driver.lnsh.lnsh_fold_disc_site;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -10,9 +11,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.AcsToWmsData.applyTask.ApplyTaskResponse;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
@@ -21,11 +25,14 @@ import org.nl.acs.monitor.DeviceStageMonitor;
|
||||
import org.nl.acs.opc.Device;
|
||||
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.Method;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -41,6 +48,8 @@ import java.util.Map;
|
||||
public class LnshFoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
|
||||
protected ItemProtocol itemProtocol = new ItemProtocol(this);
|
||||
|
||||
LuceneExecuteLogService lucene = SpringContextHolder.getBean("luceneExecuteLogServiceImpl");
|
||||
|
||||
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
|
||||
|
||||
DeviceService deviceservice = SpringContextHolder.getBean("deviceServiceImpl");
|
||||
@@ -190,17 +199,21 @@ public class LnshFoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
message = "";
|
||||
Instruction instruction = null;
|
||||
List toInstructions;
|
||||
switch (mode) {
|
||||
case 1:
|
||||
log.debug("设备运转模式:等待工作");
|
||||
break;
|
||||
case 2:
|
||||
// int max_emptypalletnum = Integer.parseInt(this.getDevice().getExtraValue().get("max_emptypalletnum").toString());
|
||||
// //当前数量等于最大数量,则生成搬运任务
|
||||
// if (!requireSucess && container_qty >= max_emptypalletnum) {
|
||||
// putStorage();
|
||||
// }
|
||||
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 = "无请求";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,34 +229,57 @@ public class LnshFoldDiscSiteDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
|
||||
|
||||
/**
|
||||
* 拆垛完成
|
||||
* 请求
|
||||
*
|
||||
* @param
|
||||
*/
|
||||
public synchronized boolean palletizing() {
|
||||
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;
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("device_code", device_code);
|
||||
json.put("type", "3");
|
||||
HttpResponse result = acsToWmsService.lnshApplyTaskToWms(json);
|
||||
if (ObjectUtil.isNotEmpty(result)) {
|
||||
if (result.getStatus() == HttpStatus.OK.value()) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
|
||||
this.writing(200);
|
||||
requireSucess = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Object obj = this.getClass().getDeclaredConstructor().newInstance();
|
||||
Method method1 = this.getClass().getMethod(modethod, null);
|
||||
method1.invoke(this, null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 申请取走空料盅托盘
|
||||
*
|
||||
* @param
|
||||
*/
|
||||
public synchronized boolean apply_take_empty_vehicle() {
|
||||
if(move == 1) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void writing(String param, String value) {
|
||||
|
||||
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||
|
||||
@@ -400,7 +400,7 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(200);
|
||||
this.writing(101);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
@@ -423,7 +423,7 @@ public class LnshMixingMillDeviceDriver extends AbstractOpcDeviceDriver implemen
|
||||
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(200);
|
||||
this.writing(102);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
|
||||
@@ -429,7 +429,7 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
||||
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(200);
|
||||
this.writing(101);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
@@ -452,7 +452,7 @@ public class LnshPackagePalletManipulatorDeviceDriver extends AbstractOpcDeviceD
|
||||
ApplyTaskResponse resp = JSON.toJavaObject(JSONObject.parseObject(acsToWmsService.applyTask(request)),ApplyTaskResponse.class);
|
||||
|
||||
if (resp.getCode() == 200) {
|
||||
this.writing(200);
|
||||
this.writing(102);
|
||||
this.setRequireSucess(true);
|
||||
} else {
|
||||
this.writing(400);
|
||||
|
||||
@@ -256,80 +256,83 @@ public class LnshPalletizingManipulatorSiteDeviceDriver extends AbstractOpcDevic
|
||||
String message = null;
|
||||
try {
|
||||
device_code = this.getDeviceCode();
|
||||
mode = this.itemProtocol.getMode();
|
||||
error = this.itemProtocol.getError();
|
||||
move = this.itemProtocol.getMove();
|
||||
task = this.itemProtocol.getTask();
|
||||
hasGoods = this.itemProtocol.getMove();
|
||||
io_action = this.itemProtocol.getIoAction();
|
||||
action = this.itemProtocol.getAction();
|
||||
weight = this.itemProtocol.getWeight();
|
||||
material = this.itemProtocol.getMaterial();
|
||||
barcode = this.itemProtocol.getBarcode();
|
||||
AlongSide = this.itemProtocol.getAlongSide();
|
||||
BshortSide = this.itemProtocol.getBshortSide();
|
||||
Htrapezoidal = this.itemProtocol.getHtrapezoidal();
|
||||
Wthickness = this.itemProtocol.getWthickness();
|
||||
encoder_qty = this.itemProtocol.getEncoder_qty();
|
||||
unqualified_qty = this.itemProtocol.getUnqualified_qty();
|
||||
mode = this.itemProtocol.getMode();
|
||||
error = this.itemProtocol.getError();
|
||||
move = this.itemProtocol.getMove();
|
||||
task = this.itemProtocol.getTask();
|
||||
hasGoods = this.itemProtocol.getMove();
|
||||
io_action = this.itemProtocol.getIoAction();
|
||||
action = this.itemProtocol.getAction();
|
||||
weight = this.itemProtocol.getWeight();
|
||||
material = this.itemProtocol.getMaterial();
|
||||
barcode = this.itemProtocol.getBarcode();
|
||||
AlongSide = this.itemProtocol.getAlongSide();
|
||||
BshortSide = this.itemProtocol.getBshortSide();
|
||||
Htrapezoidal = this.itemProtocol.getHtrapezoidal();
|
||||
Wthickness = this.itemProtocol.getWthickness();
|
||||
encoder_qty = this.itemProtocol.getEncoder_qty();
|
||||
unqualified_qty = this.itemProtocol.getUnqualified_qty();
|
||||
|
||||
product_code = this.itemProtocol.getProduct_code();
|
||||
AlongSide = this.itemProtocol.getAlongSide();
|
||||
BshortSide = this.itemProtocol.getBshortSide();
|
||||
Htrapezoidal = this.itemProtocol.getHtrapezoidal();
|
||||
Wthickness = this.itemProtocol.getWthickness();
|
||||
tray_qty = this.itemProtocol.getTray_qty();
|
||||
tray_high = this.itemProtocol.getTray_high();
|
||||
crib_category = this.itemProtocol.getCrib_category();
|
||||
palletX1_line = this.itemProtocol.getPalletX1_line();
|
||||
palletY1_row = this.itemProtocol.getPalletY1_row();
|
||||
palletA1_angle = this.itemProtocol.getPalletA1_angle();
|
||||
palletX2_line = this.itemProtocol.getPalletX2_line();
|
||||
palletY2_row = this.itemProtocol.getPalletY2_row();
|
||||
palletA2_angle = this.itemProtocol.getPalletA2_angle();
|
||||
palletX3_line = this.itemProtocol.getPalletX3_line();
|
||||
palletY3_row = this.itemProtocol.getPalletY3_row();
|
||||
palletA3_angle = this.itemProtocol.getPalletA3_angle();
|
||||
pressCribX1_line = this.itemProtocol.getPressCribX1_line();
|
||||
pressCribY1_row = this.itemProtocol.getPressCribY1_row();
|
||||
pressCribA1_angle = this.itemProtocol.getPressCribA1_angle();
|
||||
pressCribX2_line = this.itemProtocol.getPressCribX2_line();
|
||||
pressCribY2_row = this.itemProtocol.getPressCribY2_row();
|
||||
pressCribA2_angle = this.itemProtocol.getPressCribA2_angle();
|
||||
pressCribX3_line = this.itemProtocol.getPressCribX3_line();
|
||||
pressCribY3_row = this.itemProtocol.getPressCribY3_row();
|
||||
pressCribA3_angle = this.itemProtocol.getPressCribA3_angle();
|
||||
Zoffset = this.itemProtocol.getZoffset();
|
||||
pallet_layerQty = this.itemProtocol.getPallet_layerQty();
|
||||
pressCrib_layerQty = this.itemProtocol.getPressCrib_layerQty();
|
||||
codeLayerX1_interval = this.itemProtocol.getCodeLayerX1_interval();
|
||||
codeLayerY1_interval = this.itemProtocol.getCodeLayerY1_interval();
|
||||
codeLayerX2_interval = this.itemProtocol.getCodeLayerX2_interval();
|
||||
codeLayerY2_interval = this.itemProtocol.getCodeLayerY2_interval();
|
||||
codeLayerX3_interval = this.itemProtocol.getCodeLayerX3_interval();
|
||||
codeLayerY3_interval = this.itemProtocol.getcodeLayerY3_interval();
|
||||
codeLayerX1_offset = this.itemProtocol.getCodeLayerX1_offset();
|
||||
codeLayerY1_offset = this.itemProtocol.getCodeLayerY1_offset();
|
||||
codeLayerX2_offset = this.itemProtocol.getCodeLayerX2_offset();
|
||||
codeLayerY2_offset = this.itemProtocol.getCodeLayerY2_offset();
|
||||
codeLayerX3_offset = this.itemProtocol.getCodeLayerX3_offset();
|
||||
codeLayerY3_offset = this.itemProtocol.getCodeLayerY3_offset();
|
||||
pressLayerX1_interval = this.itemProtocol.getPressLayerX1_interval();
|
||||
pressLayerY1_interval = this.itemProtocol.getPressLayerY1_interval();
|
||||
pressLayerX2_interval = this.itemProtocol.getPressLayerX2_interval();
|
||||
pressLayerY2_interval = this.itemProtocol.getPressLayerY2_interval();
|
||||
pressLayerX3_interval = this.itemProtocol.getPressLayerX3_interval();
|
||||
pressLayerY3_interval = this.itemProtocol.getPressLayerY3_interval();
|
||||
pressLayerX1_offset = this.itemProtocol.getPressLayerX1_offset();
|
||||
pressLayerY1_offset = this.itemProtocol.getPressLayerY1_offset();
|
||||
pressLayerX2_offset = this.itemProtocol.getPressLayerX2_offset();
|
||||
pressLayerY2_offset = this.itemProtocol.getPressLayerY2_offset();
|
||||
pressLayerX3_offset = this.itemProtocol.getPressLayerX3_offset();
|
||||
pressLayerY3_offset = this.itemProtocol.getPressLayerY3_offset();
|
||||
tool_coordinate = this.itemProtocol.getTool_coordinate();
|
||||
tool_coordinate = this.itemProtocol.getTool_coordinate();
|
||||
product_code = this.itemProtocol.getProduct_code();
|
||||
AlongSide = this.itemProtocol.getAlongSide();
|
||||
BshortSide = this.itemProtocol.getBshortSide();
|
||||
Htrapezoidal = this.itemProtocol.getHtrapezoidal();
|
||||
Wthickness = this.itemProtocol.getWthickness();
|
||||
tray_qty = this.itemProtocol.getTray_qty();
|
||||
tray_high = this.itemProtocol.getTray_high();
|
||||
crib_category = this.itemProtocol.getCrib_category();
|
||||
palletX1_line = this.itemProtocol.getPalletX1_line();
|
||||
palletY1_row = this.itemProtocol.getPalletY1_row();
|
||||
palletA1_angle = this.itemProtocol.getPalletA1_angle();
|
||||
palletX2_line = this.itemProtocol.getPalletX2_line();
|
||||
palletY2_row = this.itemProtocol.getPalletY2_row();
|
||||
palletA2_angle = this.itemProtocol.getPalletA2_angle();
|
||||
palletX3_line = this.itemProtocol.getPalletX3_line();
|
||||
palletY3_row = this.itemProtocol.getPalletY3_row();
|
||||
palletA3_angle = this.itemProtocol.getPalletA3_angle();
|
||||
pressCribX1_line = this.itemProtocol.getPressCribX1_line();
|
||||
pressCribY1_row = this.itemProtocol.getPressCribY1_row();
|
||||
pressCribA1_angle = this.itemProtocol.getPressCribA1_angle();
|
||||
pressCribX2_line = this.itemProtocol.getPressCribX2_line();
|
||||
pressCribY2_row = this.itemProtocol.getPressCribY2_row();
|
||||
pressCribA2_angle = this.itemProtocol.getPressCribA2_angle();
|
||||
pressCribX3_line = this.itemProtocol.getPressCribX3_line();
|
||||
pressCribY3_row = this.itemProtocol.getPressCribY3_row();
|
||||
pressCribA3_angle = this.itemProtocol.getPressCribA3_angle();
|
||||
Zoffset = this.itemProtocol.getZoffset();
|
||||
pallet_layerQty = this.itemProtocol.getPallet_layerQty();
|
||||
pressCrib_layerQty = this.itemProtocol.getPressCrib_layerQty();
|
||||
codeLayerX1_interval = this.itemProtocol.getCodeLayerX1_interval();
|
||||
codeLayerY1_interval = this.itemProtocol.getCodeLayerY1_interval();
|
||||
codeLayerX2_interval = this.itemProtocol.getCodeLayerX2_interval();
|
||||
codeLayerY2_interval = this.itemProtocol.getCodeLayerY2_interval();
|
||||
codeLayerX3_interval = this.itemProtocol.getCodeLayerX3_interval();
|
||||
codeLayerY3_interval = this.itemProtocol.getcodeLayerY3_interval();
|
||||
codeLayerX1_offset = this.itemProtocol.getCodeLayerX1_offset();
|
||||
codeLayerY1_offset = this.itemProtocol.getCodeLayerY1_offset();
|
||||
codeLayerX2_offset = this.itemProtocol.getCodeLayerX2_offset();
|
||||
codeLayerY2_offset = this.itemProtocol.getCodeLayerY2_offset();
|
||||
codeLayerX3_offset = this.itemProtocol.getCodeLayerX3_offset();
|
||||
codeLayerY3_offset = this.itemProtocol.getCodeLayerY3_offset();
|
||||
pressLayerX1_interval = this.itemProtocol.getPressLayerX1_interval();
|
||||
pressLayerY1_interval = this.itemProtocol.getPressLayerY1_interval();
|
||||
pressLayerX2_interval = this.itemProtocol.getPressLayerX2_interval();
|
||||
pressLayerY2_interval = this.itemProtocol.getPressLayerY2_interval();
|
||||
pressLayerX3_interval = this.itemProtocol.getPressLayerX3_interval();
|
||||
pressLayerY3_interval = this.itemProtocol.getPressLayerY3_interval();
|
||||
pressLayerX1_offset = this.itemProtocol.getPressLayerX1_offset();
|
||||
pressLayerY1_offset = this.itemProtocol.getPressLayerY1_offset();
|
||||
pressLayerX2_offset = this.itemProtocol.getPressLayerX2_offset();
|
||||
pressLayerY2_offset = this.itemProtocol.getPressLayerY2_offset();
|
||||
pressLayerX3_offset = this.itemProtocol.getPressLayerX3_offset();
|
||||
pressLayerY3_offset = this.itemProtocol.getPressLayerY3_offset();
|
||||
tool_coordinate = this.itemProtocol.getTool_coordinate();
|
||||
tool_coordinate = this.itemProtocol.getTool_coordinate();
|
||||
if (mode != last_mode) {
|
||||
this.setRequireSucess(false);
|
||||
if(mode==2){
|
||||
writing(0);
|
||||
}
|
||||
logServer.deviceItemValue(this.device_code, "mode", String.valueOf(mode));
|
||||
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode:" + last_mode + " -> " + mode);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -258,8 +258,6 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
} else {
|
||||
message = "无请求";
|
||||
}
|
||||
|
||||
Object ignore_pickup_check = this.getExtraValue().get("ignore_pickup_check");
|
||||
}
|
||||
|
||||
last_mode = mode;
|
||||
@@ -599,7 +597,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
* @param
|
||||
*/
|
||||
public synchronized boolean apply_take_empty_vehicle() {
|
||||
if(move == 0) {
|
||||
if(move == 1) {
|
||||
ApplyTaskRequest request = new ApplyTaskRequest();
|
||||
request.setDevice_code(this.getDevice_code());
|
||||
request.setRequest_medthod_code(Thread.currentThread().getStackTrace()[1].getMethodName());
|
||||
@@ -619,7 +617,7 @@ public class LnshStationDeviceDriver extends AbstractOpcDeviceDriver implements
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 设备有货未请求LMS...";
|
||||
message = RequestMethodEnum.getName("apply_take_empty_vehicle") + "apply_take_empty_vehicle 设备无货未请求LMS...";
|
||||
lucene.deviceExecuteLog(new LuceneLogDto(this.device_code, message));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -22,4 +22,8 @@ public class ApplyTaskResponse extends BaseResponse {
|
||||
private String mix_num;
|
||||
|
||||
private String weight;
|
||||
|
||||
|
||||
//private String is_order_finish;
|
||||
|
||||
}
|
||||
|
||||
@@ -855,10 +855,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
jo.put("device_code", device.getDevice_code());
|
||||
jo.put("mode", lnshRGVDeviceDriver.getMode());
|
||||
jo.put("status", lnshRGVDeviceDriver.getStatus());
|
||||
jo.put("move1", lnshRGVDeviceDriver.getMove1());
|
||||
jo.put("move2", lnshRGVDeviceDriver.getMove2());
|
||||
jo.put("action1", lnshRGVDeviceDriver.getAction1());
|
||||
jo.put("action2", lnshRGVDeviceDriver.getAction2());
|
||||
jo.put("move1", lnshRGVDeviceDriver.getMove_1());
|
||||
jo.put("move2", lnshRGVDeviceDriver.getMove_2());
|
||||
jo.put("action1", lnshRGVDeviceDriver.getAction_1());
|
||||
jo.put("action2", lnshRGVDeviceDriver.getAction_2());
|
||||
jo.put("walk_y", lnshRGVDeviceDriver.getWalk_y());
|
||||
jo.put("error", lnshRGVDeviceDriver.getError());
|
||||
jo.put("task1", lnshRGVDeviceDriver.getTask1());
|
||||
@@ -1064,10 +1064,10 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
jo.put("device_code", device.getDevice_code());
|
||||
jo.put("mode", lnshRGVDeviceDriver.getMode());
|
||||
jo.put("status", lnshRGVDeviceDriver.getStatus());
|
||||
jo.put("move_1", lnshRGVDeviceDriver.getMove1());
|
||||
jo.put("move_2", lnshRGVDeviceDriver.getMove2());
|
||||
jo.put("action_1", lnshRGVDeviceDriver.getAction1());
|
||||
jo.put("action_2", lnshRGVDeviceDriver.getAction2());
|
||||
jo.put("move_1", lnshRGVDeviceDriver.getMove_1());
|
||||
jo.put("move_2", lnshRGVDeviceDriver.getMove_2());
|
||||
jo.put("action_1", lnshRGVDeviceDriver.getAction_1());
|
||||
jo.put("action_2", lnshRGVDeviceDriver.getAction_2());
|
||||
jo.put("walk_y", lnshRGVDeviceDriver.getWalk_y());
|
||||
jo.put("error", lnshRGVDeviceDriver.getError());
|
||||
jo.put("task1", lnshRGVDeviceDriver.getTask1());
|
||||
|
||||
125
acs/nladmin-system/src/main/java/org/nl/acs/opc/JsonUtl.java
Normal file
125
acs/nladmin-system/src/main/java/org/nl/acs/opc/JsonUtl.java
Normal file
@@ -0,0 +1,125 @@
|
||||
package org.nl.acs.opc;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.JavaType;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.databind.type.TypeFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class JsonUtl {
|
||||
private static ObjectMapper objectMapper = null;
|
||||
private static ObjectMapper objectMapperLog = null;
|
||||
|
||||
private JsonUtl() {
|
||||
}
|
||||
|
||||
private static ObjectMapper init() {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
SimpleModule simpleModule = new SimpleModule();
|
||||
// simpleModule.addSerializer(Enum.class, new EnumSerializer());
|
||||
// simpleModule.addSerializer(Date.class, new DateSerializer());
|
||||
// simpleModule.addDeserializer(Enum.class, new EnumDeserializer());
|
||||
// simpleModule.addDeserializer(Date.class, new DateDeserializers.DateDeserializer());
|
||||
objectMapper.registerModule(simpleModule);
|
||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
public static ObjectMapper getInstance() {
|
||||
if (objectMapper == null) {
|
||||
Class var0 = JsonUtl.class;
|
||||
synchronized(JsonUtl.class) {
|
||||
if (objectMapper == null) {
|
||||
objectMapper = init();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
public static ObjectMapper getInstanceLog() {
|
||||
if (objectMapperLog == null) {
|
||||
Class var0 = JsonUtl.class;
|
||||
synchronized(JsonUtl.class) {
|
||||
if (objectMapperLog == null) {
|
||||
objectMapperLog = init();
|
||||
objectMapperLog.setSerializationInclusion(Include.NON_NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return objectMapperLog;
|
||||
}
|
||||
|
||||
public static ObjectMapper getObjectMapper() {
|
||||
return getInstance();
|
||||
}
|
||||
|
||||
public static String parse(Object object) throws RuntimeException {
|
||||
try {
|
||||
return getObjectMapper().writeValueAsString(object);
|
||||
} catch (JsonProcessingException var2) {
|
||||
throw new RuntimeException(var2);
|
||||
}
|
||||
}
|
||||
|
||||
public static String parseWithoutException(Object object) {
|
||||
try {
|
||||
return parse(object);
|
||||
} catch (Exception var2) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static String parseLog(Object object) {
|
||||
try {
|
||||
return getInstanceLog().writeValueAsString(object);
|
||||
} catch (Exception var2) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T format(String json, Class<T> clazz) throws RuntimeException {
|
||||
try {
|
||||
return getObjectMapper().readValue(json, clazz);
|
||||
} catch (IOException var3) {
|
||||
throw new RuntimeException(var3);
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> List<T> formatList(String json, Class<T> clazz) throws RuntimeException {
|
||||
try {
|
||||
JavaType type = getObjectMapper().getTypeFactory().constructParametricType(List.class, new Class[]{clazz});
|
||||
return (List)getObjectMapper().readValue(json, type);
|
||||
} catch (IOException var3) {
|
||||
throw new RuntimeException(var3);
|
||||
}
|
||||
}
|
||||
|
||||
public static <T, U> Map<T, U> formatMap(String json, Class<T> clazzKey, Class<U> clazzValue) throws RuntimeException {
|
||||
try {
|
||||
JavaType type = getObjectMapper().getTypeFactory().constructParametricType(Map.class, new Class[]{clazzKey, clazzValue});
|
||||
return (Map)getObjectMapper().readValue(json, type);
|
||||
} catch (IOException var4) {
|
||||
throw new RuntimeException(var4);
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> List<List<T>> formatListTwo(String json, Class<T> clazz) throws RuntimeException {
|
||||
try {
|
||||
TypeFactory typeFactory = getObjectMapper().getTypeFactory();
|
||||
JavaType type = typeFactory.constructParametrizedType(List.class, List.class, new Class[]{clazz});
|
||||
type = typeFactory.constructParametrizedType(List.class, List.class, new JavaType[]{type});
|
||||
return (List)getObjectMapper().readValue(json, type);
|
||||
} catch (IOException var4) {
|
||||
throw new RuntimeException(var4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -248,4 +248,8 @@ public class TaskDto implements Serializable {
|
||||
*/
|
||||
private String direction;
|
||||
|
||||
/**
|
||||
* 放货设备编号(覆膜机)
|
||||
*/
|
||||
private String put_device_code;
|
||||
}
|
||||
|
||||
@@ -740,39 +740,39 @@ public class StageServiceImpl implements StageService {
|
||||
status = "故障";
|
||||
}
|
||||
|
||||
if (lnshRGVDeviceDriver.getMove1() == 0) {
|
||||
if (lnshRGVDeviceDriver.getMove_1() == 0) {
|
||||
move_1 = "无货";
|
||||
} else if (lnshRGVDeviceDriver.getMove1() == 1) {
|
||||
} else if (lnshRGVDeviceDriver.getMove_1() == 1) {
|
||||
move_1 = "有货";
|
||||
} else if (lnshRGVDeviceDriver.getMove1() == 2) {
|
||||
} else if (lnshRGVDeviceDriver.getMove_1() == 2) {
|
||||
move_1 = "有托盘有货";
|
||||
}
|
||||
|
||||
if (lnshRGVDeviceDriver.getMove2() == 0) {
|
||||
if (lnshRGVDeviceDriver.getMove_2() == 0) {
|
||||
move_2 = "无货";
|
||||
} else if (lnshRGVDeviceDriver.getMove2() == 1) {
|
||||
} else if (lnshRGVDeviceDriver.getMove_2() == 1) {
|
||||
move_2 = "有货";
|
||||
} else if (lnshRGVDeviceDriver.getMove2() == 2) {
|
||||
} else if (lnshRGVDeviceDriver.getMove_2() == 2) {
|
||||
move_2 = "有托盘有货";
|
||||
}
|
||||
|
||||
if (lnshRGVDeviceDriver.getAction1() == 1) {
|
||||
if (lnshRGVDeviceDriver.getAction_1() == 1) {
|
||||
action_1 = "取货中";
|
||||
} else if (lnshRGVDeviceDriver.getAction1() == 2) {
|
||||
} else if (lnshRGVDeviceDriver.getAction_1() == 2) {
|
||||
action_1 = "取货完成";
|
||||
} else if (lnshRGVDeviceDriver.getAction1() == 3) {
|
||||
} else if (lnshRGVDeviceDriver.getAction_1() == 3) {
|
||||
action_1 = "放货中";
|
||||
} else if (lnshRGVDeviceDriver.getAction1() == 4) {
|
||||
} else if (lnshRGVDeviceDriver.getAction_1() == 4) {
|
||||
action_1 = "放货完成";
|
||||
}
|
||||
|
||||
if (lnshRGVDeviceDriver.getAction2() == 1) {
|
||||
if (lnshRGVDeviceDriver.getAction_2() == 1) {
|
||||
action_2 = "取货中";
|
||||
} else if (lnshRGVDeviceDriver.getAction2() == 2) {
|
||||
} else if (lnshRGVDeviceDriver.getAction_2() == 2) {
|
||||
action_2 = "取货完成";
|
||||
} else if (lnshRGVDeviceDriver.getAction2() == 3) {
|
||||
} else if (lnshRGVDeviceDriver.getAction_2() == 3) {
|
||||
action_2 = "放货中";
|
||||
} else if (lnshRGVDeviceDriver.getAction2() == 4) {
|
||||
} else if (lnshRGVDeviceDriver.getAction_2() == 4) {
|
||||
action_2 = "放货完成";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user