|
@@ -2,6 +2,7 @@ package com.warewms.hailiang.connect;
|
|
|
|
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
import com.github.rholder.retry.*;
|
|
import com.github.rholder.retry.*;
|
|
|
|
+import com.warewms.hailiang.MES.MesService;
|
|
import com.warewms.hailiang.config.CodeReadProperties;
|
|
import com.warewms.hailiang.config.CodeReadProperties;
|
|
import com.warewms.hailiang.connect.base.TCPConnectBase;
|
|
import com.warewms.hailiang.connect.base.TCPConnectBase;
|
|
import com.warewms.hailiang.domain.Device;
|
|
import com.warewms.hailiang.domain.Device;
|
|
@@ -55,12 +56,14 @@ public class CodeReader5Connect implements TCPConnectBase {
|
|
|
|
|
|
private ChannelPipeline pipeline;
|
|
private ChannelPipeline pipeline;
|
|
|
|
|
|
|
|
+ private MesService mesService;
|
|
|
|
|
|
private RetroactiveNowService retroactiveNowService;
|
|
private RetroactiveNowService retroactiveNowService;
|
|
|
|
|
|
private PlcConnectServiceRunner plcConnectServiceRunner;
|
|
private PlcConnectServiceRunner plcConnectServiceRunner;
|
|
|
|
|
|
{
|
|
{
|
|
|
|
+ mesService = SpringUtil.getBean(MesService.class);
|
|
retroactiveNowService = SpringUtil.getBean(RetroactiveNowService.class);
|
|
retroactiveNowService = SpringUtil.getBean(RetroactiveNowService.class);
|
|
plcConnectServiceRunner = SpringUtil.getBean(PlcConnectServiceRunner.class);
|
|
plcConnectServiceRunner = SpringUtil.getBean(PlcConnectServiceRunner.class);
|
|
}
|
|
}
|
|
@@ -175,6 +178,8 @@ public class CodeReader5Connect implements TCPConnectBase {
|
|
retroactiveNow.setDeviceId("Z1_XiMian_DMQ-1-27.5");
|
|
retroactiveNow.setDeviceId("Z1_XiMian_DMQ-1-27.5");
|
|
retroactiveNowService.updateData(retroactiveNow);
|
|
retroactiveNowService.updateData(retroactiveNow);
|
|
plcConnectServiceRunner.getPlcServer(DeviceNameEnum.XIMIANPLC.getDeviceName()).writeBoolean(XiMianPlcEnum.ISREAD.getMetadata(), false);
|
|
plcConnectServiceRunner.getPlcServer(DeviceNameEnum.XIMIANPLC.getDeviceName()).writeBoolean(XiMianPlcEnum.ISREAD.getMetadata(), false);
|
|
|
|
+ //上传ME系统
|
|
|
|
+ mesService.processFeedback(message,"1");
|
|
//添加设备日志
|
|
//添加设备日志
|
|
SpringUtil.getApplicationContext().publishEvent(new DeviceLog("Z1_XiMian_DMQ-1-27.5", deviceName, "识别到码:" + message, "1"));
|
|
SpringUtil.getApplicationContext().publishEvent(new DeviceLog("Z1_XiMian_DMQ-1-27.5", deviceName, "识别到码:" + message, "1"));
|
|
}
|
|
}
|