|
@@ -1,7 +1,9 @@
|
|
|
package com.ruoyi.taiye.job;
|
|
|
|
|
|
import com.ruoyi.ams.tm.service.ITsTaskService;
|
|
|
+import com.ruoyi.system.enums.PLCConnectNameEnum;
|
|
|
import com.ruoyi.system.enums.PLCEnum;
|
|
|
+import com.ruoyi.taiye.domain.DeviceLog;
|
|
|
import com.ruoyi.taiye.service.IDeviceLogService;
|
|
|
import com.ruoyi.taiye.service.ProcessService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -28,6 +30,7 @@ public class AMSJob {
|
|
|
*/
|
|
|
public void onePackingMachineUnloadingTask() {
|
|
|
boolean b = iTsTaskService.readPlcState(PLCEnum.PACKING_BLANK_0.getMetadata());
|
|
|
+ deviceLogService.insertDeviceLog(new DeviceLog(PLCConnectNameEnum.PACKING_MACHINE_1.getMetadata(),PLCConnectNameEnum.PACKING_MACHINE_1.getMetaName(),"获取到下料信号:"+b,"1"));
|
|
|
//下料信号读取
|
|
|
log.info("PLC下料信号读取-----"+b);
|
|
|
if (b) {
|
|
@@ -41,6 +44,7 @@ public class AMSJob {
|
|
|
*/
|
|
|
public void onePackingMachineUpEmptyPallets() {
|
|
|
boolean b = iTsTaskService.readPlcState(PLCEnum.PACKING_CALL_EMPTY_0.getMetadata());
|
|
|
+ deviceLogService.insertDeviceLog(new DeviceLog(PLCConnectNameEnum.PACKING_MACHINE_1.getMetadata(),PLCConnectNameEnum.PACKING_MACHINE_1.getMetaName(),"获取到上空信号:"+b,"1"));
|
|
|
//下料信号读取
|
|
|
log.info("PLC上空信号读取-----"+b);
|
|
|
if (b) {
|