This commit is contained in:
2023-02-01 22:20:30 +08:00
parent 0c33d53ea9
commit ccfaa17962
3 changed files with 9 additions and 18 deletions

View File

@@ -266,13 +266,13 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
break; break;
case 4: case 4:
//申请捆扎 //申请捆扎
if (move > 0 && !requireApplyLaStrangulationSuccess) { if (move > 0 && !requireSucess) {
applyLaStrangulation(); applyLaStrangulation();
} }
break; break;
case 5: case 5:
//申请贴标 //申请贴标
if (move > 0 && !requireApplyLabelingSuccess) { if (move > 0 && !requireSucess) {
applyLabeling(); applyLabeling();
} }
@@ -451,17 +451,6 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
if (this.requireSucess) { if (this.requireSucess) {
requireSucess = "1"; requireSucess = "1";
} }
String requireApplyLabelingSuccess ="0";
if (this.requireApplyLabelingSuccess) {
requireApplyLabelingSuccess = "1";
}
String requireApplyLaStrangulationSuccess ="0";
if (this.requireApplyLaStrangulationSuccess) {
requireApplyLaStrangulationSuccess = "1";
}
jo.put("requireApplyLabelingSuccess", requireApplyLabelingSuccess);
jo.put("requireApplyLaStrangulationSuccess", requireApplyLaStrangulationSuccess);
jo.put("device_name", this.getDevice().getDevice_name()); jo.put("device_name", this.getDevice().getDevice_name());
jo.put("mode", mode); jo.put("mode", mode);
jo.put("move", move); jo.put("move", move);
@@ -808,7 +797,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
this.writing(list); this.writing(list);
this.writing(list); this.writing(list);
message = "申请捆扎成功"; message = "申请捆扎成功";
requireApplyLaStrangulationSuccess = true; requireSucess = true;
} else { } else {
message = "未返回尺寸信息"; message = "未返回尺寸信息";
} }

View File

@@ -231,13 +231,13 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
break; break;
case 4: case 4:
//申请捆扎 //申请捆扎
if (move > 0 && !requireApplyLaStrangulationSuccess) { if (move > 0 && !requireSucess) {
applyLaStrangulation(); applyLaStrangulation();
} }
break; break;
case 5: case 5:
//申请贴标 //申请贴标
if (move > 0 && !requireApplyLabelingSuccess) { if (move > 0 && !requireSucess) {
applyLabeling(); applyLabeling();
} }
@@ -702,7 +702,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
this.writing(list); this.writing(list);
this.writing(list); this.writing(list);
message ="申请贴标下发电气信号成功"; message ="申请贴标下发电气信号成功";
requireApplyLabelingSuccess = true; requireSucess = true;
} else { } else {
message = "申请贴标失败,"+applyLabelingAndBindingResponse.getMessage(); message = "申请贴标失败,"+applyLabelingAndBindingResponse.getMessage();
} }
@@ -774,7 +774,7 @@ public class SiemensConveyorLabelingDeviceDriver extends AbstractOpcDeviceDriver
this.writing(list); this.writing(list);
this.writing(list); this.writing(list);
message ="申请贴标成功"; message ="申请贴标成功";
requireApplyLaStrangulationSuccess = true; requireSucess = true;
} else { } else {
message = "未返回尺寸信息"; message = "未返回尺寸信息";
} }

View File

@@ -25,6 +25,7 @@ import org.nl.modules.quartz.domain.QuartzLog;
import org.nl.modules.quartz.repository.QuartzLogRepository; import org.nl.modules.quartz.repository.QuartzLogRepository;
import org.nl.modules.quartz.service.QuartzJobService; import org.nl.modules.quartz.service.QuartzJobService;
import org.nl.modules.wql.util.SpringContextHolder; import org.nl.modules.wql.util.SpringContextHolder;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext; import org.quartz.JobExecutionContext;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.quartz.QuartzJobBean; import org.springframework.scheduling.quartz.QuartzJobBean;
@@ -41,6 +42,7 @@ import java.util.concurrent.ThreadPoolExecutor;
@Async @Async
@SuppressWarnings({"unchecked", "all"}) @SuppressWarnings({"unchecked", "all"})
@Slf4j @Slf4j
@DisallowConcurrentExecution
public class ExecutionJob extends QuartzJobBean { public class ExecutionJob extends QuartzJobBean {
/** /**