huang
2025-11-18 1566e4c7604d85737ea67fe6757e71b8185fa48e
mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/DeviceControlProfileController.java
@@ -3,15 +3,15 @@
import com.mes.device.service.DeviceControlProfileService;
import com.mes.device.vo.DeviceControlProfile;
import com.mes.vo.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("device/control")
@Tag(name = "设备控制参数", description = "设备控制参数配置接口")
@Api(tags = "设备控制参数")
@RequiredArgsConstructor
@Validated
public class DeviceControlProfileController {
@@ -19,13 +19,13 @@
    private final DeviceControlProfileService controlProfileService;
    @GetMapping("/{deviceId}")
    @Operation(summary = "获取设备控制参数")
    @ApiOperation("获取设备控制参数")
    public Result<DeviceControlProfile> getProfile(@PathVariable Long deviceId) {
        return Result.success(controlProfileService.getProfile(deviceId));
    }
    @PostMapping("/{deviceId}")
    @Operation(summary = "更新设备控制参数")
    @ApiOperation("更新设备控制参数")
    public Result<Void> saveProfile(@PathVariable Long deviceId,
                                    @RequestBody DeviceControlProfile profile) {
        controlProfileService.updateProfile(deviceId, profile);