|
@@ -5,6 +5,7 @@ import com.warewms.common.core.redis.RedisCache;
|
|
import com.warewms.hailiang.enums.*;
|
|
import com.warewms.hailiang.enums.*;
|
|
import com.warewms.hailiang.init.PlcConnectServiceRunner;
|
|
import com.warewms.hailiang.init.PlcConnectServiceRunner;
|
|
import com.warewms.hailiang.init.TcpServiceRunner;
|
|
import com.warewms.hailiang.init.TcpServiceRunner;
|
|
|
|
+import com.warewms.hailiang.service.DeviceLogService;
|
|
import com.warewms.hailiang.service.ProcessRealizationService;
|
|
import com.warewms.hailiang.service.ProcessRealizationService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -31,6 +32,8 @@ public class TraceJob {
|
|
@Autowired
|
|
@Autowired
|
|
private RedisCache redisCache;
|
|
private RedisCache redisCache;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ DeviceLogService deviceLogService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 测试
|
|
* 测试
|
|
@@ -158,4 +161,12 @@ public class TraceJob {
|
|
processRealizationService.CodeReadingProcess("CodeReader14");
|
|
processRealizationService.CodeReadingProcess("CodeReader14");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 清空PLC信号日志
|
|
|
|
+ */
|
|
|
|
+ public void cleanPLCDeviceLog() {
|
|
|
|
+ int i = deviceLogService.cleanUpDataFromAWeekAgo();
|
|
|
|
+ log.info("已清除三个月前的数据,数量:{}",i);
|
|
|
|
+ }
|
|
}
|
|
}
|