From e76f0739e647fe8a7e0e2618914e2faff554b1b7 Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期一, 17 十一月 2025 17:33:23 +0800
Subject: [PATCH] 解决冲突

---
 mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/DeviceControlProfileController.java |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/DeviceControlProfileController.java b/mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/DeviceControlProfileController.java
new file mode 100644
index 0000000..1ebc89b
--- /dev/null
+++ b/mes-processes/mes-plcSend/src/main/java/com/mes/device/controller/DeviceControlProfileController.java
@@ -0,0 +1,35 @@
+package com.mes.device.controller;
+
+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 lombok.RequiredArgsConstructor;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("device/control")
+@Tag(name = "璁惧鎺у埗鍙傛暟", description = "璁惧鎺у埗鍙傛暟閰嶇疆鎺ュ彛")
+@RequiredArgsConstructor
+@Validated
+public class DeviceControlProfileController {
+
+    private final DeviceControlProfileService controlProfileService;
+
+    @GetMapping("/{deviceId}")
+    @Operation(summary = "鑾峰彇璁惧鎺у埗鍙傛暟")
+    public Result<DeviceControlProfile> getProfile(@PathVariable Long deviceId) {
+        return Result.success(controlProfileService.getProfile(deviceId));
+    }
+
+    @PostMapping("/{deviceId}")
+    @Operation(summary = "鏇存柊璁惧鎺у埗鍙傛暟")
+    public Result<Void> saveProfile(@PathVariable Long deviceId,
+                                    @RequestBody DeviceControlProfile profile) {
+        controlProfileService.updateProfile(deviceId, profile);
+        return Result.success(null);
+    }
+}
+

--
Gitblit v1.8.0