From b181d08b9c8c4f3f4d8c475a60506ba4d93c8382 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期三, 09 四月 2025 11:38:23 +0800 Subject: [PATCH] 灌溉计划详情页,包含计划信息、轮灌组信息、取水口命令发布员结果信息 --- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java | 85 +++++++++++++++++++++++++----------------- 1 files changed, 51 insertions(+), 34 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 2108113..1727a53 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 @@ -7,10 +7,7 @@ import com.dy.pipIrrGlobal.pojoIr.IrPlanOperate; import com.dy.pipIrrGlobal.pojoIr.IrPlanSchedule; import com.dy.pipIrrGlobal.pojoRm.RmCommandHistory; -import com.dy.pipIrrGlobal.voIr.VoIrrigateSchedule; -import com.dy.pipIrrGlobal.voIr.VoPlanSimple; -import com.dy.pipIrrGlobal.voIr.VoPlans; -import com.dy.pipIrrGlobal.voIr.VoToTerminateIntakes; +import com.dy.pipIrrGlobal.voIr.*; import com.dy.pipIrrGlobal.voRm.VoIntakeVc; import com.dy.pipIrrWechat.command.CommandSv; import com.dy.pipIrrWechat.command.dto.AutomaticClose; @@ -162,36 +159,6 @@ } return BaseResponseUtils.buildSuccess(); - } - - /** - * 鑾峰彇鏈畬鎴愮殑璁″垝鍒楄〃锛屽皬绋嬪簭璁″垝鍒楄〃椤典娇鐢� - * @return - */ - @GetMapping(path = "/getNotCompletePlans") - public BaseResponse<List<VoPlans>> getNotCompletePlans() { - try { - List<VoPlans> res = irrigatePlanSv.getNotCompletePlans(); - return BaseResponseUtils.buildSuccess(res); - } catch (Exception e) { - log.error("鑾峰彇鏈畬鐨勮鍒掑紓甯�", e); - return BaseResponseUtils.buildException(e.getMessage()); - } - } - - /** - * 鑾峰彇宸插畬鎴愮殑璁″垝鍒楄〃锛屽皬绋嬪簭璁″垝鍒楄〃椤典娇鐢� - * @return - */ - @GetMapping(path = "/getCompletedPlans") - public BaseResponse<List<VoPlans>> getCompletedPlans() { - try { - List<VoPlans> res = irrigatePlanSv.getCompletedPlans(); - return BaseResponseUtils.buildSuccess(res); - } catch (Exception e) { - log.error("鑾峰彇椤圭洰璁板綍寮傚父", e); - return BaseResponseUtils.buildException(e.getMessage()); - } } /** @@ -382,4 +349,54 @@ } return BaseResponseUtils.buildSuccess(); } + + /** + * 鑾峰彇鏈畬鎴愮殑璁″垝鍒楄〃锛屽皬绋嬪簭璁″垝鍒楄〃椤典娇鐢� + * @return + */ + @GetMapping(path = "/getNotCompletePlans") + public BaseResponse<List<VoPlans>> getNotCompletePlans() { + try { + List<VoPlans> res = irrigatePlanSv.getNotCompletePlans(); + return BaseResponseUtils.buildSuccess(res); + } catch (Exception e) { + log.error("鑾峰彇鏈畬鐨勮鍒掑紓甯�", e); + return BaseResponseUtils.buildException(e.getMessage()); + } + } + + /** + * 鑾峰彇宸插畬鎴愮殑璁″垝鍒楄〃锛屽皬绋嬪簭璁″垝鍒楄〃椤典娇鐢� + * @return + */ + @GetMapping(path = "/getCompletedPlans") + public BaseResponse<List<VoPlans>> getCompletedPlans() { + try { + List<VoPlans> res = irrigatePlanSv.getCompletedPlans(); + return BaseResponseUtils.buildSuccess(res); + } catch (Exception e) { + log.error("鑾峰彇椤圭洰璁板綍寮傚父", e); + return BaseResponseUtils.buildException(e.getMessage()); + } + } + + /** + * 鏍规嵁璁″垝ID鑾峰彇璁″垝鍙戝竷缁撴灉 + * @param planId + * @return + */ + @GetMapping(path = "/getPublishResults") + public BaseResponse<VoPlanDetails> getPublishResults(@RequestParam Long planId) { + if(planId == null) { + return BaseResponseUtils.buildErrorMsg("璁″垝ID涓嶈兘涓虹┖"); + } + + try { + VoPlanDetails res = irrigatePlanSv.getPublishResults(planId); + return BaseResponseUtils.buildSuccess(res); + } catch (Exception e) { + log.error("鑾峰彇璁″垝鍙戝竷缁撴灉寮傚父", e); + return BaseResponseUtils.buildException(e.getMessage()); + } + } } -- Gitblit v1.8.0