add rgv状态

This commit is contained in:
USER-20220102CG\noblelift
2023-07-07 13:43:01 +08:00
parent 4a0fae0317
commit b2e30944c7
5 changed files with 18 additions and 7 deletions

View File

@@ -266,9 +266,18 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
System.out.println("下发agv数据:" + Bytes2HexString(b)); System.out.println("下发agv数据:" + Bytes2HexString(b));
dos.write(b); dos.write(b);
dos.flush(); dos.flush();
} catch (IOException e) { } catch (Exception e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); try{
Thread.sleep(5000);
log.info("再次下发agv数据:" + Bytes2HexString(b));
System.out.println("再次下发agv数据:" + Bytes2HexString(b));
dos.write(b);
dos.flush();
} catch (Exception e1){
e1.printStackTrace();
}
} }
} }
} }

View File

@@ -16,7 +16,7 @@ public class Resp<T> {
public String result; public String result;
/** /**
* 错误码0表示成功1代表入库目的位置有货其他更多情况待定 * 错误码
*/ */
public String code; public String code;

View File

@@ -38,6 +38,7 @@ import org.nl.acs.ext.wms.liKuData.OutConfirmRequest;
import org.nl.acs.ext.wms.liKuData.Resp; import org.nl.acs.ext.wms.liKuData.Resp;
import org.nl.acs.ext.wms.service.AcsToLiKuService; import org.nl.acs.ext.wms.service.AcsToLiKuService;
import org.nl.acs.ext.wms.service.WmsToAcsService; import org.nl.acs.ext.wms.service.WmsToAcsService;
import org.nl.acs.history.ErrorUtil;
import org.nl.acs.instruction.service.InstructionService; import org.nl.acs.instruction.service.InstructionService;
import org.nl.acs.instruction.service.dto.Instruction; import org.nl.acs.instruction.service.dto.Instruction;
import org.nl.acs.monitor.DeviceStageMonitor; import org.nl.acs.monitor.DeviceStageMonitor;
@@ -291,11 +292,12 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
} else if (device.getDeviceDriver() instanceof DeviceStatusDeviceDriver) { } else if (device.getDeviceDriver() instanceof DeviceStatusDeviceDriver) {
deviceStatusDeviceDriver = (DeviceStatusDeviceDriver) device.getDeviceDriver(); deviceStatusDeviceDriver = (DeviceStatusDeviceDriver) device.getDeviceDriver();
jo.put("device_code", deviceStatusDeviceDriver.getDevice().getDevice_code()); jo.put("device_code", deviceStatusDeviceDriver.getDevice().getDevice_code());
jo.put("device_code", deviceStatusDeviceDriver.getDevice().getDevice_name()); jo.put("device_name", deviceStatusDeviceDriver.getDevice().getDevice_name());
jo.put("x", deviceStatusDeviceDriver.getX()); jo.put("x", deviceStatusDeviceDriver.getX());
jo.put("y", deviceStatusDeviceDriver.getY()); jo.put("y", deviceStatusDeviceDriver.getY());
jo.put("power", deviceStatusDeviceDriver.getPower()); jo.put("power", deviceStatusDeviceDriver.getPower());
jo.put("error", deviceStatusDeviceDriver.getAlarm()); jo.put("error", deviceStatusDeviceDriver.getAlarm());
jo.put("error_name", ErrorUtil.getDictDetail("rgv_error_type", String.valueOf(deviceStatusDeviceDriver.getAlarm())));
//楼层 //楼层
jo.put("map_id", deviceStatusDeviceDriver.getMap_id()); jo.put("map_id", deviceStatusDeviceDriver.getMap_id());
jo.put("pallet", deviceStatusDeviceDriver.getPallet()); jo.put("pallet", deviceStatusDeviceDriver.getPallet());

View File

@@ -192,9 +192,9 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
if (true) { if (true) {
this.logItemChanged(itemId, accessor_value, value, itemDto); this.logItemChanged(itemId, accessor_value, value, itemDto);
} }
// if(!ObjectUtil.isEmpty(value)){ if(!ObjectUtil.isEmpty(value)){
accessor_value.setValue(itemId, value); accessor_value.setValue(itemId, value);
// } }
} }
} }

View File

@@ -153,7 +153,7 @@ public class OpcServerServiceImpl implements OpcServerService, ApplicationAutoIn
OpcUtl.writeValue(group, values); OpcUtl.writeValue(group, values);
} catch (Exception var4) { } catch (Exception var4) {
this.clearServer(code); this.clearServer(code);
log.warn("写入出错opc server {} 重新加载", code, var4); log.info("写入出错opc server {} 重新加载", code, var4);
ThreadUtl.sleep(5000L); ThreadUtl.sleep(5000L);
throw var4; throw var4;
} }