zhubaomin
2025-09-03 c26a9d5eda9cb575df18fbf9a5a5c94869e99f88
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java
@@ -52,15 +52,6 @@
    private final IrrigatePlanSv irrigatePlanSv;
    private final CommandSv commandSv;
    /**
     * 创建灌溉计划
     * 1. 添加灌溉计划
     * 2. 添加灌溉次序
     * 3. 添加灌溉计划操作记录
     * @param planAndSchedule
     * @param bindingResult
     * @return
     */
    @PostMapping(path = "createPlan", consumes = MediaType.APPLICATION_JSON_VALUE)
    //@Transactional(rollbackFor = Exception.class)
    public BaseResponse<Boolean> createPlan(@RequestBody @Valid IrrigatePlan planAndSchedule, BindingResult bindingResult){
@@ -165,12 +156,6 @@
        return BaseResponseUtils.buildSuccess();
    }
    /**
     * 删除灌溉计划
     * @param planSimple
     * @param bindingResult
     * @return
     */
    @PostMapping(path = "deletePlan")
    public BaseResponse<Boolean> deletePlan(@RequestBody @Valid PlanSimple planSimple, BindingResult bindingResult) {
        if(bindingResult != null && bindingResult.hasErrors()){
@@ -184,15 +169,6 @@
        return BaseResponseUtils.buildSuccess() ;
    }
    /**
     * 发布灌溉计划
     * 1. 修改灌溉计划状态为发布状态
     * 2. 添加灌溉计划操作记录
     * 3. 生成开阀计划
     * @param planSimple
     * @param bindingResult
     * @return
     */
    @PostMapping(path = "publishPlan", consumes = MediaType.APPLICATION_JSON_VALUE)
    //@Transactional(rollbackFor = Exception.class)
    public BaseResponse<Boolean> publishPlan(@RequestBody @Valid PlanSimple planSimple, BindingResult bindingResult){
@@ -290,11 +266,6 @@
        //return BaseResponseUtils.buildSuccess();
    }
    /**
     * 根据计划ID获取计划最新状态
     * @param planId
     * @return
     */
    @GetMapping(path = "/getPlanLatestState")
    public BaseResponse<Integer> getPlanLatestState(@RequestParam Long planId) {
        if(planId == null) {
@@ -309,12 +280,6 @@
        }
    }
    /**
     * 终止灌溉计划
     * @param planSimple
     * @param bindingResult
     * @return
     */
    @PostMapping(path = "terminatePlan", consumes = MediaType.APPLICATION_JSON_VALUE)
    //@Transactional(rollbackFor = Exception.class)
    public BaseResponse<Boolean> terminatePlan(@RequestBody @Valid PlanSimple planSimple, BindingResult bindingResult){
@@ -397,10 +362,6 @@
        return BaseResponseUtils.buildSuccess();
    }
    /**
     * 获取未完成的计划列表,小程序计划列表页使用
     * @return
     */
    @GetMapping(path = "/getNotCompletePlans")
    public BaseResponse<List<VoPlans>> getNotCompletePlans() {
        try {
@@ -412,10 +373,6 @@
        }
    }
    /**
     * 获取已完成的计划列表,小程序计划列表页使用
     * @return
     */
    @GetMapping(path = "/getCompletedPlans")
    public BaseResponse<QueryResultVo<List<VoPlans>>> getCompletedPlans(QueryConditionVo qo) {
        try {
@@ -426,11 +383,6 @@
        }
    }
    /**
     * 根据计划ID获取计划发布结果
     * @param planId
     * @return
     */
    @GetMapping(path = "/getPublishResults")
    public BaseResponse<VoPlanDetails> getPublishResults(@RequestParam Long planId) {
        if(planId == null) {
@@ -446,11 +398,6 @@
        }
    }
    /**
     * 根据计划ID获取计划终止操作结果
     * @param planId
     * @return
     */
    @GetMapping(path = "/getTerminateResults")
    public BaseResponse<VoPlanDetails> getTerminateResults(@RequestParam Long planId) {
        if(planId == null) {