yangys
2025-08-12 8ede6183253248e497d391a0902bb5d41181b3bf
blade-service/blade-mdm/src/main/java/org/springblade/mdm/gkw/programnode/controller/MachineFileController.java
@@ -19,6 +19,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;
import java.util.List;
/**
@@ -49,12 +50,19 @@
   @GetMapping("/file-content")
   @Operation(summary = "获取机床目录文件内容", description = "工控网目录文件列表")
   public R<String> machineFileContent(Long id) {
      return R.data("临时内容");
      String content = machineFileService.getMachineFileContent(id);
      return R.data(content);
   }
   @PostMapping("/file-save")
   @Operation(summary = "保存机床文件", description = "保存机床文件到磁盘")
   public R<Void> machineFileSave(Long id,String content) {
      try {
         machineFileService.saveFileConent(id,content);
      } catch (IOException e) {
         log.error(e.getMessage());
         return R.fail(e.getMessage());
      }
      return R.success();
   }