Browse Source

fix:移至加热、加液指令不需要校验是否有逻辑状态是否有托盘,待增加传感器后使用传感器判断

master
白凤吉 2 months ago
parent
commit
f625358f75
  1. 8
      src/main/java/com/iflytop/gd/app/command/control/MoveToHeatAreaCommand.java
  2. 8
      src/main/java/com/iflytop/gd/app/command/control/MoveToSolutionAreaCommand.java

8
src/main/java/com/iflytop/gd/app/command/control/MoveToHeatAreaCommand.java

@ -65,10 +65,10 @@ public class MoveToHeatAreaCommand extends BaseCommandHandler {
// if (heatModuleTray) {
// throw new AppException(ResultCode.TARGET_HEAT_MODULE_OCCUPIED);
// }
SolutionModuleState solutionModuleState = deviceStateService.getDeviceState().getSolutionModule();
if(solutionModuleState.getTrayStatus() == 0){
throw new AppException(ResultCode.SOLUTION_MODULE_NO_TRAY);
}
// SolutionModuleState solutionModuleState = deviceStateService.getDeviceState().getSolutionModule();
// if(solutionModuleState.getTrayStatus() == 0){
// throw new AppException(ResultCode.SOLUTION_MODULE_NO_TRAY);
// }
if (trayState != null && trayState.getCrafts() != null) {
throw new AppException(ResultCode.CRAFT_RUNNING);
}

8
src/main/java/com/iflytop/gd/app/command/control/MoveToSolutionAreaCommand.java

@ -61,10 +61,10 @@ public class MoveToSolutionAreaCommand extends BaseCommandHandler {
//校验目标加热位是否有托盘
try {
deviceStateService.getCommandMutexState().get().setMoveToSolutionAreaCommandExecuting(true);
HeatModuleState heatModuleState = deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode);
if(heatModuleState.getTrayStatus() == 0){
throw new AppException(ResultCode.TARGET_HEAT_MODULE_NO_TRAY);
}
// HeatModuleState heatModuleState = deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode);
// if(heatModuleState.getTrayStatus() == 0){
// throw new AppException(ResultCode.TARGET_HEAT_MODULE_NO_TRAY);
// }
// Boolean heatModuleTray = heatModuleService.heatModuleSensorState(heatModuleCode);
// if (!heatModuleTray) {
// throw new AppException(ResultCode.TARGET_HEAT_MODULE_NO_TRAY);

Loading…
Cancel
Save