| | |
| | | @Autowired |
| | | private ModelRbdNodeService modelRbdNodeService; |
| | | |
| | | @Autowired |
| | | private PythonLib pythonLib; |
| | | |
| | | @GetMapping("callPythonCalc") |
| | | @ApiOperation("信息") |
| | | public Result callPythonCalc() { |
| | | Result result = pythonLib.callPython(); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | @GetMapping("getPythonCalcResult") |
| | | @ApiOperation("信息") |
| | | public Result<String> getPythonCalcResult() { |
| | | String result = pythonLib.getPythonCalcResult(); |
| | | |
| | | return Result.ok(result); |
| | | } |
| | | |
| | | @GetMapping("page") |
| | | @ApiOperation("分页") |
| | |
| | | @ApiOperation("解析") |
| | | @LogOperation("解析") |
| | | public Result analyze(@RequestBody ModelRbd modelRbd) { |
| | | modelLineService.update(modelRbd); |
| | | update(modelRbd); |
| | | boolean result = modelLineService.analyze(modelRbd); |
| | | return result ? Result.ok() : Result.error("解析失败"); |
| | | } |
| | | |
| | | |
| | | @PostMapping("layout") |
| | | @ApiOperation("自动排版") |
| | | @LogOperation("自动排版") |
| | | public Result<ModelRbd> layout(@RequestBody ModelRbd modelRbd) { |
| | | boolean result = modelLineService.layout(modelRbd); |
| | | return result ? Result.ok(modelRbd) : Result.error("自动排版失败"); |
| | | } |
| | | |
| | | } |