pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStManureMapper.java
@@ -2,7 +2,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.dy.pipIrrGlobal.pojoPr.PrStManure; import com.dy.pipIrrGlobal.voPr.VoMqttSimple; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** * @Author: liurunyu @@ -19,6 +22,8 @@ PrStManure selectByPrimaryKey(Long id); List<VoMqttSimple> selectAllSimple() ; int updateByPrimaryKeySelective(PrStManure record); int updateByPrimaryKey(PrStManure record); pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStSoilMapper.java
@@ -2,7 +2,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.dy.pipIrrGlobal.pojoPr.PrStSoil; import com.dy.pipIrrGlobal.voPr.VoMqttSimple; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** * @Author: liurunyu @@ -19,6 +22,8 @@ PrStSoil selectByPrimaryKey(Long id); List<VoMqttSimple> selectAllSimple() ; int updateByPrimaryKeySelective(PrStSoil record); int updateByPrimaryKey(PrStSoil record); pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStWeatherMapper.java
@@ -2,7 +2,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.dy.pipIrrGlobal.pojoPr.PrStWeather; import com.dy.pipIrrGlobal.voPr.VoMqttSimple; import org.apache.ibatis.annotations.Mapper; import java.util.List; /** * @Author: liurunyu @@ -19,6 +22,8 @@ PrStWeather selectByPrimaryKey(Long id); List<VoMqttSimple> selectAllSimple() ; int updateByPrimaryKeySelective(PrStWeather record); int updateByPrimaryKey(PrStWeather record); pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoMqttSimple.java
New file @@ -0,0 +1,24 @@ package com.dy.pipIrrGlobal.voPr; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; /** * @Author: liurunyu * @Date: 2025/6/18 15:09 * @Description */ @Data @EqualsAndHashCode(callSuper = false) @ToString(callSuper = true) @NoArgsConstructor @AllArgsConstructor @Builder @Schema(name = "åä¸çæºç»¼åç«åç«ç®åå¼å¯¹è±¡") @JsonPropertyOrder({ "id", "name", "no"}) public class VoMqttSimple { public Long id ; public String name ;//åç§° public Integer no ;//ç¼å· } pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStManureMapper.xml
@@ -20,6 +20,10 @@ <!--@mbg.generated--> id, `no`, `name`, lng, lat, remark </sql> <sql id="simple_Column_List"> <!--@mbg.generated--> id, `no`, `name` </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <!--@mbg.generated--> select @@ -27,6 +31,13 @@ from pr_st_manure where id = #{id,jdbcType=BIGINT} </select> <select id="selectAllSimple" resultType="com.dy.pipIrrGlobal.voPr.VoMqttSimple"> <!--@mbg.generated--> select <include refid="simple_Column_List" /> from pr_st_manure where deleted != 1 ; </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <!--@mbg.generated--> delete from pr_st_manure pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStSoilMapper.xml
@@ -20,6 +20,10 @@ <!--@mbg.generated--> id, `no`, `name`, lng, lat, remark </sql> <sql id="simple_Column_List"> <!--@mbg.generated--> id, `no`, `name` </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <!--@mbg.generated--> select @@ -27,6 +31,13 @@ from pr_st_soil where id = #{id,jdbcType=BIGINT} </select> <select id="selectAllSimple" resultType="com.dy.pipIrrGlobal.voPr.VoMqttSimple"> <!--@mbg.generated--> select <include refid="simple_Column_List" /> from pr_st_soil where deleted != 1 ; </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <!--@mbg.generated--> delete from pr_st_soil pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStWeatherMapper.xml
@@ -20,6 +20,10 @@ <!--@mbg.generated--> id, `no`, `name`, lng, lat, remark </sql> <sql id="simple_Column_List"> <!--@mbg.generated--> id, `no`, `name` </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <!--@mbg.generated--> select @@ -27,6 +31,13 @@ from pr_st_weather where id = #{id,jdbcType=BIGINT} </select> <select id="selectAllSimple" resultType="com.dy.pipIrrGlobal.voPr.VoMqttSimple"> <!--@mbg.generated--> select <include refid="simple_Column_List" /> from pr_st_weather where deleted != 1 ; </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <!--@mbg.generated--> delete from pr_st_weather pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/MqttCtrl.java
New file @@ -0,0 +1,76 @@ package com.dy.pipIrrProject.mqtt; import com.dy.common.aop.SsoAop; import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; import com.dy.common.webUtil.ResultCodeMsg; import com.dy.pipIrrProject.mqtt.manure.ManureSv; import com.dy.pipIrrProject.mqtt.soil.SoilSv; import com.dy.pipIrrProject.mqtt.weather.WeatherSv; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @Author: liurunyu * @Date: 2025/6/18 14:55 * @Description */ @Slf4j @Tag(name = "åä¸çæºç»¼åç«", description = "åä¸çæºç»¼åç«ç®¡ç") @RestController @RequestMapping(path = "mqtt") @RequiredArgsConstructor public class MqttCtrl { private ManureSv manureSv ; private SoilSv soilSv ; private WeatherSv weatherSv ; @Autowired public void setSv(ManureSv manureSv, SoilSv soilSv, WeatherSv weatherSv) { this.manureSv = manureSv; this.soilSv = soilSv; this.weatherSv = weatherSv; } /** * 客æ·ç«¯è¯·æ±å¾å°æææ°´è¥æºãæ°è±¡ç«ã墿 ç«ç®åä¿¡æ¯ * @return æææ°´è¥æºãæ°è±¡ç«ã墿 ç«ç®åä¿¡æ¯ */ @Operation(summary = "è·å¾å ¨é¨æ°´è¥æºãæ°è±¡ç«ã墿 ç«ç®åä¿¡æ¯", description = "è¿åå ¨é¨æ°´è¥æºãæ°è±¡ç«ã墿 ç«ç®åä¿¡æ¯") @ApiResponses(value = { @ApiResponse( responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, description = "è¿åå ¨é¨æ°´è¥æºãæ°è±¡ç«ã墿 ç«ç®åä¿¡æ¯æ°æ®ï¼BaseResponse.content:TypesVo[{}]ï¼", content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = MqttSimpleVo.class))} ) }) @GetMapping(path = "allSimple") @SsoAop() public BaseResponse<MqttSimpleVo> allSimple() { try { MqttSimpleVo reVo = new MqttSimpleVo() ; reVo.manures = this.manureSv.allSimple() ; reVo.soils = this.soilSv.allSimple() ; reVo.weathers = this.weatherSv.allSimple() ; return BaseResponseUtils.buildSuccess(reVo); } catch (Exception e) { log.error("æ¥è¯¢å ¨é¨æ°´è¥æºãæ°è±¡ç«ã墿 ç«ç®åä¿¡æ¯å¼å¸¸", e); return BaseResponseUtils.buildException(e.getMessage()); } } } pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/MqttSimpleVo.java
New file @@ -0,0 +1,20 @@ package com.dy.pipIrrProject.mqtt; import com.dy.pipIrrGlobal.voPr.VoMqttSimple; import lombok.Data; import java.util.List; /** * @Author: liurunyu * @Date: 2025/6/18 15:22 * @Description */ @Data public class MqttSimpleVo { public List<VoMqttSimple> manures; public List<VoMqttSimple> soils; public List<VoMqttSimple> weathers; } pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureCtrl.java
New file @@ -0,0 +1,9 @@ package com.dy.pipIrrProject.mqtt.manure; /** * @Author: liurunyu * @Date: 2025/6/18 14:51 * @Description */ public class ManureCtrl { } pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureDto.java
New file @@ -0,0 +1,9 @@ package com.dy.pipIrrProject.mqtt.manure; /** * @Author: liurunyu * @Date: 2025/6/18 14:52 * @Description */ public class ManureDto { } pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureQo.java
New file @@ -0,0 +1,9 @@ package com.dy.pipIrrProject.mqtt.manure; /** * @Author: liurunyu * @Date: 2025/6/18 14:52 * @Description */ public class ManureQo { } pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java
New file @@ -0,0 +1,26 @@ package com.dy.pipIrrProject.mqtt.manure; import com.dy.pipIrrGlobal.daoPr.PrStManureMapper; import com.dy.pipIrrGlobal.voPr.VoMqttSimple; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * @Author: liurunyu * @Date: 2025/6/18 14:53 * @Description */ @Slf4j @Service public class ManureSv { @Autowired private PrStManureMapper dao; public List<VoMqttSimple> allSimple(){ return this.dao.selectAllSimple() ; } } pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilSv.java
New file @@ -0,0 +1,26 @@ package com.dy.pipIrrProject.mqtt.soil; import com.dy.pipIrrGlobal.daoPr.PrStSoilMapper; import com.dy.pipIrrGlobal.voPr.VoMqttSimple; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * @Author: liurunyu * @Date: 2025/6/18 15:14 * @Description */ @Slf4j @Service public class SoilSv { @Autowired private PrStSoilMapper dao; public List<VoMqttSimple> allSimple(){ return this.dao.selectAllSimple() ; } } pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherSv.java
New file @@ -0,0 +1,26 @@ package com.dy.pipIrrProject.mqtt.weather; import com.dy.pipIrrGlobal.daoPr.PrStWeatherMapper; import com.dy.pipIrrGlobal.voPr.VoMqttSimple; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * @Author: liurunyu * @Date: 2025/6/18 15:15 * @Description */ @Slf4j @Service public class WeatherSv { @Autowired private PrStWeatherMapper dao; public List<VoMqttSimple> allSimple(){ return this.dao.selectAllSimple() ; } } pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/˵Ã÷.txt
New file @@ -0,0 +1 @@ åºäºMQTTåè®®çæ°´è¥æºãæ°è±¡ã墿 ç« pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/mqttSd1/fault/CdDto.java
New file @@ -0,0 +1,16 @@ package com.dy.pipIrrRemote.monitor.mqttSd1.fault; import com.dy.pipIrrRemote.common.dto.DtoBase; import lombok.Data; import lombok.EqualsAndHashCode; /** * @Author: liurunyu * @Date: 2025/6/16 17:36 * @Description */ @Data @EqualsAndHashCode(callSuper=true) public class CdDto extends DtoBase { public static final long serialVersionUID = 202506161739001L; } pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/mqttSd1/fault/CdParam.java
New file @@ -0,0 +1,9 @@ package com.dy.pipIrrRemote.monitor.mqttSd1.fault; /** * @Author: liurunyu * @Date: 2025/6/16 17:36 * @Description */ public class CdParam { } pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/mqttSd1/fault/CdStartCtrl.java
New file @@ -0,0 +1,33 @@ package com.dy.pipIrrRemote.monitor.mqttSd1.fault; import com.dy.pipIrrRemote.monitor.common.ComCtrl; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @Author: liurunyu * @Date: 2025/6/16 17:35 * @Description */ @Slf4j @Tag(name = "è¿ç¨å½ä»¤", description = "æ¥è¯¢è®¾å¤ç»ç«¯å®æ¶å¼") @RestController("p202404V201Cd5BCtrl") @RequestMapping(path = "p202404V201/cd5B") @RequiredArgsConstructor @Scope("prototype") //å 为æå¯¹è±¡ç±»å±æ§ï¼æä»¥éç¨å忍¡å¼ï¼æ¯æ¬¡è¯·æ±æ°å»ºä¸ä¸ªå®ä¾å¯¹è±¡ public class CdStartCtrl extends ComCtrl { private static final String RtuSuccessMsg = "æ§å¶å¨æ¥æ¶å¹¶æ§è¡å½ä»¤æåï¼æ è¿åæ°æ®"; private static final String ComCode = "5B" ; @Autowired private CdSv sv ; } pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/mqttSd1/fault/CdStopCtrl.java
New file @@ -0,0 +1,9 @@ package com.dy.pipIrrRemote.monitor.mqttSd1.fault; /** * @Author: liurunyu * @Date: 2025/6/16 17:35 * @Description */ public class CdStopCtrl { } pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/mqttSd1/fault/CdSv.java
New file @@ -0,0 +1,15 @@ package com.dy.pipIrrRemote.monitor.mqttSd1.fault; import com.dy.pipIrrRemote.monitor.common.ComSv; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; /** * @Author: liurunyu * @Date: 2025/6/16 17:36 * @Description */ @Slf4j @Service("faultSv") public class CdSv extends ComSv { }