You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB

2 months ago
  1. package com.iflytop.sgs.app.controller;
  2. import com.iflytop.sgs.app.model.vo.SetTargetTemperatureVO;
  3. import com.iflytop.sgs.app.service.HeatModuleService;
  4. import com.iflytop.sgs.common.result.Result;
  5. import io.swagger.v3.oas.annotations.Operation;
  6. import io.swagger.v3.oas.annotations.tags.Tag;
  7. import jakarta.validation.Valid;
  8. import lombok.RequiredArgsConstructor;
  9. import lombok.extern.slf4j.Slf4j;
  10. import org.springframework.web.bind.annotation.PostMapping;
  11. import org.springframework.web.bind.annotation.RequestBody;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RestController;
  14. /**
  15. * 加热模块控制 todo wmy 需要和前端同步参数 加热 烘干 退火
  16. */
  17. @Tag(name = "加热模块控制")
  18. @RestController
  19. @RequestMapping("/api/heat")
  20. @RequiredArgsConstructor
  21. @Slf4j
  22. public class HeatModuleController {
  23. private final HeatModuleService heatModuleService;
  24. @Operation(summary = "加热模块设定目标温度")
  25. @PostMapping("/target-temperature")
  26. public Result<String> setTargetTemperature(@Valid @RequestBody SetTargetTemperatureVO setTargetTemperatureVO) {
  27. heatModuleService.setTargetTemperature(setTargetTemperatureVO);
  28. return Result.success();
  29. }
  30. }