| | |
| | | import com.se.simu.domain.vo.CreateSimuVo; |
| | | import com.se.simu.domain.vo.R; |
| | | import com.se.simu.domain.vo.SimuVo; |
| | | import com.se.simu.helper.StringHelper; |
| | | import com.se.simu.service.GedbService; |
| | | import com.se.simu.service.ResultService; |
| | | import com.se.simu.service.SimuService; |
| | |
| | | if (null == vo.getTotal() || vo.getTotal() < 1 || vo.getTotal() > 1000) { |
| | | return fail("降雨量不能为空,且取值在1~1000之间"); |
| | | } |
| | | if (null == vo.getDuration() || vo.getDuration() < 1 || vo.getDuration() > 120) { |
| | | return fail("仿真时长不能为空,且取值在1~120之间"); |
| | | if (null == vo.getDuration() || vo.getDuration() < 1 || vo.getDuration() > 10080) { |
| | | return fail("仿真时长不能为空,且取值在1~10080之间"); |
| | | } |
| | | if (null == vo.getMinx() || null == vo.getMiny() || null == vo.getMaxx() || null == vo.getMaxy()) { |
| | | return fail("选择范围不能为空", false); |
| | |
| | | } |
| | | |
| | | return success(paged.getRecords(), paged.getTotal()); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "当前时间 *") |
| | | @GetMapping("/getTime") |
| | | public Object getTime() { |
| | | return System.currentTimeMillis(); |
| | | } |
| | | |
| | | @ApiOperation(value = "testCallExe *") |
| | | @GetMapping("/testCallExe") |
| | | public R<Object> testCallExe() { |
| | | try { |
| | | DataPo data = new DataPo(); |
| | | data.setInPath("20241010095328"); |
| | | |
| | | String str = uwService.callExe(data); |
| | | |
| | | return success(str); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "testResuslt *") |
| | | @GetMapping("/testResuslt") |
| | | public R<Object> testResuslt() { |
| | | try { |
| | | DataPo data = new DataPo(); |
| | | data.setEpsg(4548); |
| | | data.setInPath("20241010095328"); |
| | | data.setStartTime(StringHelper.YMDHMS_FORMAT.parse("2024-09-30 00:00:00")); |
| | | |
| | | resultService.process(data); |
| | | |
| | | return success("ok"); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "testSww2Tif *") |
| | | @GetMapping("/testSww2Tif") |
| | | public R<Object> testSww2Tif() { |
| | | try { |
| | | DataPo data = new DataPo(); |
| | | data.setEpsg(4548); |
| | | data.setInPath("20241010095328"); |
| | | data.setStartTime(StringHelper.YMDHMS_FORMAT.parse("2024-09-30 00:00:00")); |
| | | |
| | | Object rs = uwService.copeDrainFiles(data); |
| | | |
| | | return success(rs); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | } |