|
|
@ -1,6 +1,9 @@ |
|
|
|
package com.qyft.gd.controller; |
|
|
|
|
|
|
|
import com.qyft.gd.model.dto.PauseCraftsDto; |
|
|
|
import com.qyft.gd.model.dto.ResumeCraftsDto; |
|
|
|
import com.qyft.gd.model.dto.StartCraftsDTO; |
|
|
|
import com.qyft.gd.model.dto.StopCraftsDto; |
|
|
|
import com.qyft.gd.model.entity.Crafts; |
|
|
|
import com.qyft.gd.service.CraftsService; |
|
|
|
import com.qyft.gd.service.CraftsStepService; |
|
|
@ -79,22 +82,22 @@ public class CraftsController { |
|
|
|
|
|
|
|
@Operation(summary = "暂停执行工艺") |
|
|
|
@PostMapping("/pause") |
|
|
|
public Result<String> pauseCrafts(@Parameter(description = "加热区id") @RequestParam String heatId) { |
|
|
|
craftsStepService.pauseCrafts(heatId); |
|
|
|
public Result<String> pauseCrafts(@Parameter(description = "加热区id") @RequestBody PauseCraftsDto pauseCraftsDto) { |
|
|
|
craftsStepService.pauseCrafts(pauseCraftsDto.getHeatId()); |
|
|
|
return Result.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@Operation(summary = "恢复执行工艺") |
|
|
|
@PostMapping("/resume") |
|
|
|
public Result<String> resumeCrafts(@Parameter(description = "加热区id") @RequestParam String heatId) { |
|
|
|
craftsStepService.resumeCrafts(heatId); |
|
|
|
public Result<String> resumeCrafts(@Parameter(description = "加热区id") @RequestBody ResumeCraftsDto resumeCraftsDto) { |
|
|
|
craftsStepService.resumeCrafts(resumeCraftsDto.getHeatId()); |
|
|
|
return Result.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@Operation(summary = "停止执行工艺") |
|
|
|
@PostMapping("/stop") |
|
|
|
public Result<String> stopCrafts(@Parameter(description = "加热区id") @RequestParam String heatId) { |
|
|
|
boolean isSuccess = craftsStepService.stopCrafts(heatId); |
|
|
|
public Result<String> stopCrafts(@Parameter(description = "加热区id") @RequestBody StopCraftsDto stopCraftsDto) { |
|
|
|
boolean isSuccess = craftsStepService.stopCrafts(stopCraftsDto.getHeatId()); |
|
|
|
if (isSuccess) { |
|
|
|
return Result.success(); |
|
|
|
} |
|
|
|