|
@@ -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;
|
|
@@ -56,7 +57,10 @@ public class CodeReader14Connect implements TCPConnectBase {
|
|
|
|
|
|
private ScheduledExecutorService scheduledExecutorService;
|
|
private ScheduledExecutorService scheduledExecutorService;
|
|
|
|
|
|
|
|
+ private MesService mesService;
|
|
|
|
+
|
|
{
|
|
{
|
|
|
|
+ mesService = SpringUtil.getBean(MesService.class);
|
|
retroactiveNowService = SpringUtil.getBean(RetroactiveNowService.class);
|
|
retroactiveNowService = SpringUtil.getBean(RetroactiveNowService.class);
|
|
scheduledExecutorService = SpringUtil.getBean(ScheduledExecutorService.class);
|
|
scheduledExecutorService = SpringUtil.getBean(ScheduledExecutorService.class);
|
|
}
|
|
}
|
|
@@ -191,6 +195,8 @@ public class CodeReader14Connect implements TCPConnectBase {
|
|
retroactiveNow.setStatus("7");
|
|
retroactiveNow.setStatus("7");
|
|
retroactiveNow.setDeviceId("Z1_TuiHuoXiaLiao_DMQ-1-27.14");
|
|
retroactiveNow.setDeviceId("Z1_TuiHuoXiaLiao_DMQ-1-27.14");
|
|
retroactiveNowService.finishProduce(retroactiveNow);
|
|
retroactiveNowService.finishProduce(retroactiveNow);
|
|
|
|
+ //反馈MES系统
|
|
|
|
+ mesService.tuiHuoXiaLiao(message);
|
|
//添加设备日志
|
|
//添加设备日志
|
|
SpringUtil.getApplicationContext().publishEvent(new DeviceLog("Z1_TuiHuoXiaLiao_DMQ-1-27.14", deviceName, "识别到码:" + message, "1"));
|
|
SpringUtil.getApplicationContext().publishEvent(new DeviceLog("Z1_TuiHuoXiaLiao_DMQ-1-27.14", deviceName, "识别到码:" + message, "1"));
|
|
}
|
|
}
|