From eb5a6e5a54efa997971beffc909bcadc06dc8886 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 21 四月 2025 10:45:16 +0800 Subject: [PATCH] 1、江海测试系统设备类型默认为阀; 2、完善通信中间件测试消息推送代码; 3、增加队列数据结构注释; 4、121服务器相关的初始化配置文件bug修改; 5、其他注释完善。 --- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java | 62 +++++++++++++++++++++++++++++++ 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java new file mode 100644 index 0000000..6962e05 --- /dev/null +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java @@ -0,0 +1,62 @@ +package com.dy.pipIrrWechat.irrigation; + +import com.dy.common.webUtil.BaseResponse; +import com.dy.common.webUtil.BaseResponseUtils; +import com.dy.common.webUtil.QueryResultVo; +import com.dy.pipIrrGlobal.voIr.VoGroupSimple; +import com.dy.pipIrrGlobal.voIr.VoProjectSimple; +import com.dy.pipIrrWechat.irrigation.qo.QoGroup; +import com.dy.pipIrrWechat.irrigation.qo.QoProject; +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.RestController; + +import java.util.List; + +/** + * @author ZhuBaoMin + * @date 2025-02-20 8:59 + * @LastEditTime 2025-02-20 8:59 + * @Description + */ + +@Slf4j +@RestController +@RequestMapping(path = "irrigation") +@RequiredArgsConstructor +public class IrrigationCtrl { + private final IrrigationSv irrigationSv; + + + /** + * 鏍规嵁鍐滄埛缂栧彿鑾峰彇鐏屾簤鍗曞厓鍒楄〃 + * @param qo + * @return + */ + @GetMapping(path = "/getSimpleProjects") + public BaseResponse<List<VoProjectSimple>> getSimpleProjects(QoProject qo) { + try { + return BaseResponseUtils.buildSuccess(irrigationSv.getSimpleProjects(qo)); + } catch (Exception e) { + log.error("鑾峰彇椤圭洰璁板綍寮傚父", e); + return BaseResponseUtils.buildException(e.getMessage()); + } + } + + @GetMapping(path = "/getSimpleGroups") + public BaseResponse<List<VoGroupSimple>> getSimpleGroups(QoGroup qo) { + if(qo.getProjectId() == null) { + return BaseResponseUtils.buildErrorMsg("璇烽�夋嫨椤圭洰"); + } + + try { + //QueryResultVo<List<VoGroupSimple>> res = irrigationSv.getSimpleGroups(qo); + return BaseResponseUtils.buildSuccess(irrigationSv.getSimpleGroups(qo)); + } catch (Exception e) { + log.error("鑾峰彇杞亴缁勮褰曞紓甯�", e); + return BaseResponseUtils.buildException(e.getMessage()); + } + } +} -- Gitblit v1.8.0