package com.se.simu.controller; import com.se.simu.service.SwwFilesDealService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; /** * sww 文件交易控制器 * * @author xingjinshuang@smartearth.cn * @date 2025/02/20 */ @Api(tags = "SEM相关接口") @CrossOrigin(origins = "*") @RequiredArgsConstructor @RestController @RequestMapping("/api/v1/sww") public class SwwFilesDealController { // 处理 Sww 文件的相关逻辑 @Resource private SwwFilesDealService swwFilesDealService; /** * Sww 文件读取模拟 */ @ApiOperation("1 - Sww 文件读取模拟") @PostMapping("/read") public ResponseEntity readSwwFile() throws Exception { String filePath = "D:\\0a_project\\simulation\\other\\result_new.sem.db"; return ResponseEntity.ok(swwFilesDealService.readSwwFile(filePath)); } }