package com.dy.pipIrrIrrigate.irrigatePlan; import com.dy.common.aop.SsoAop; import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; import com.dy.pipIrrGlobal.voIr.VoGroupSimple; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * @author ZhuBaoMin * @date 2024-11-28 17:20 * @LastEditTime 2024-11-28 17:20 * @Description 灌溉计划控制类 */ @Slf4j @RestController @RequestMapping(path = "irrigatePlan") @RequiredArgsConstructor public class IrrigatePlanCtrl { private final IrrigatePlanSv irrigatePlanSv; /** * 根据农户编号获取轮灌组列表 * @return */ @GetMapping(path = "/getGroups") @SsoAop() public BaseResponse> getGroups(@RequestParam("clientId") Long clientId) { try { return BaseResponseUtils.buildSuccess(irrigatePlanSv.getGroups(clientId)); } catch (Exception e) { log.error("获取任务类型异常", e); return BaseResponseUtils.buildException(e.getMessage()); } } }