From ef77ac7224c9ff7468e0ad7daf50686eebbbd9fa Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期二, 25 二月 2025 16:21:51 +0800 Subject: [PATCH] 获取灌溉计划列表接口 --- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java index 246fb29..1e9be73 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java @@ -2,25 +2,25 @@ import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; +import com.dy.common.webUtil.QueryResultVo; import com.dy.pipIrrGlobal.pojoIr.IrIrrigatePlan; import com.dy.pipIrrGlobal.pojoIr.IrIrrigateSchedule; import com.dy.pipIrrGlobal.pojoIr.IrOpeningSchedule; import com.dy.pipIrrGlobal.pojoIr.IrPlanOperate; +import com.dy.pipIrrGlobal.voIr.VoIrrigatePlan; import com.dy.pipIrrGlobal.voIr.VoIrrigateSchedule; import com.dy.pipIrrWechat.irrigatePlan.dto.IrrigatePlan; import com.dy.pipIrrWechat.irrigatePlan.dto.IrrigateSchedule; import com.dy.pipIrrWechat.irrigatePlan.dto.PlanSimple; import com.dy.pipIrrWechat.irrigatePlan.enums.OperateTypeENUM; +import com.dy.pipIrrWechat.irrigatePlan.qo.QoIrrigatePlan; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.Date; import java.util.List; @@ -171,4 +171,20 @@ } return BaseResponseUtils.buildSuccess(); } + + /** + * 鑾峰彇鐏屾簤璁″垝鍒楄〃 + * @param vo + * @return + */ + @GetMapping(path = "/getIrrigatePlans") + public BaseResponse<QueryResultVo<List<VoIrrigatePlan>>> getIrrigatePlans(QoIrrigatePlan vo) { + try { + QueryResultVo<List<VoIrrigatePlan>> res = irrigatePlanSv.getIrrigatePlans(vo); + return BaseResponseUtils.buildSuccess(res); + } catch (Exception e) { + log.error("鑾峰彇杞亴缁勮褰曞紓甯�", e); + return BaseResponseUtils.buildException(e.getMessage()); + } + } } -- Gitblit v1.8.0