From 325180b7de27e486b5427d1918078b0e4f5bbab9 Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期一, 16 十二月 2024 10:31:54 +0800 Subject: [PATCH] 优化接口 获得全部取水口 重构返回结构,增加片区名称字段、增加县镇村名称字段 --- pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java index 5753595..cb60cfe 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java @@ -9,6 +9,7 @@ import com.dy.pipIrrGlobal.excel.CellWriteHandler; import com.dy.pipIrrGlobal.excel.ExcelUtil; import com.dy.pipIrrGlobal.pojoPr.PrIntake; +import com.dy.pipIrrGlobal.voPr.VoAllIntake; import com.dy.pipIrrGlobal.voPr.VoIntake; import com.dy.pipIrrGlobal.voPr.VoOnLineIntake; import com.dy.pipIrrGlobal.voSe.VoActiveCard; @@ -75,9 +76,9 @@ }) @GetMapping(path = "all") @SsoAop() - public BaseResponse<QueryResultVo<List<PrIntake>>> all() { + public BaseResponse<QueryResultVo<List<VoAllIntake>>> all() { try { - QueryResultVo<List<PrIntake>> res = this.intakeSv.selectAll(); + QueryResultVo<List<VoAllIntake>> res = this.intakeSv.selectAll(); if (res == null) { return BaseResponseUtils.buildErrorMsg(ProjectResultCode.NO_INTAKES.getMessage()); } else { @@ -126,11 +127,7 @@ @SsoAop() public BaseResponse<QueryResultVo<List<VoIntake>>> getIntakes(QueryVo vo) { try { - QueryResultVo<List<VoIntake>> res = intakeSv.getIntakes(vo); - if (res == null) { - return BaseResponseUtils.buildErrorMsg(ProjectResultCode.NO_INTAKES.getMessage()); - } - return BaseResponseUtils.buildSuccess(res); + return BaseResponseUtils.buildSuccess(intakeSv.getIntakes(vo)); } catch (Exception e) { log.error("鑾峰彇鍙栨按鍙h褰曞紓甯�", e); return BaseResponseUtils.buildException(e.getMessage()); -- Gitblit v1.8.0