|
|
@ -44,6 +44,10 @@ public class HeatStartCommand extends BaseCommandHandler { |
|
|
|
throw new AppException(ResultCode.CRAFT_RUNNING); |
|
|
|
} |
|
|
|
return runAsync(() -> { |
|
|
|
if( deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).isFanOpen()){ |
|
|
|
heatModuleService.fanClose(heatModuleCode);//加热前,尝试关闭风扇 |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setFanOpen(false); |
|
|
|
} |
|
|
|
heatModuleService.heatRodOpen(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleCode, temperature); |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTargetTime(time); |
|
|
|
deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setHeatTemperature(temperature); |
|
|
|