| | |
| | | |
| | | import com.se.simu.service.SemFilesSimuService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | 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.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * sem文件创建模拟 |
| | | */ |
| | | @ApiOperation("1-sem文件创建模拟") |
| | | @PostMapping("/create") |
| | | public ResponseEntity<Object> createSimuBySemFile() throws Exception { |
| | | return ResponseEntity.ok(semFilesSimuService.createSimuBySemFile()); |
| | | } |
| | | |
| | | /** |
| | | * sem文件读取模拟 |
| | | */ |
| | | @ApiOperation("2-sem文件读取模拟") |
| | | @ApiImplicitParam(name = "filePath", value = "文件地址", required = true, dataType = "String", paramType = "query", example = "D:\\app\\simulation\\other\\1211SEM样例\\管点.sem", dataTypeClass = String.class) |
| | | @PostMapping("/read") |
| | | public ResponseEntity<Object> readSemFile(@RequestParam("filePath") String filePath) throws Exception { |
| | | return ResponseEntity.ok(semFilesSimuService.readSemFile(filePath)); |
| | | } |
| | | |
| | | |
| | | } |