zuoxiao
3 天以前 39688299c37a4afc68afb705127948bf1e5e7e7f
Merge remote-tracking branch 'origin/master'
11个文件已修改
25个文件已添加
1146 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/MqttMsgParser.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/MqttTopic.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/Vo4Up.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/ProtocolParserSdV1.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/comParam/ComCtrlVo.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/comParam/ComSetParamVo.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/ManureVo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/SoilVo.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/StateVo.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/WeatherVo.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStManureMapper.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStSoilMapper.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStWeatherMapper.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrStManure.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrStSoil.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrStWeather.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voPr/VoMqttSimple.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStManureMapper.xml 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStSoilMapper.xml 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStWeatherMapper.xml 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/config.properties 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/MqttCtrl.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/MqttSimpleVo.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureCtrl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureDto.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureQo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/manure/ManureSv.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/soil/SoilSv.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/weather/WeatherSv.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/mqtt/说明.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/mqttSd1/fault/CdDto.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/mqttSd1/fault/CdParam.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/mqttSd1/fault/CdStartCtrl.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/mqttSd1/fault/CdStopCtrl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/monitor/mqttSd1/fault/CdSv.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/文档/水肥气象墒情/水肥站、气象站、墒情站协议.docx 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/MqttMsgParser.java
@@ -3,6 +3,7 @@
import com.dy.common.mw.protocol.Command;
import com.dy.common.mw.protocol4Mqtt.pSdV1.ProtocolConstantSdV1;
import com.dy.common.mw.protocol4Mqtt.pSdV1.ProtocolParserSdV1;
import com.dy.common.util.NumUtil;
import org.eclipse.paho.client.mqttv3.MqttMessage;
/**
@@ -14,14 +15,21 @@
    public static MqttTopic parseSubTopic(String topic) throws Exception {
        if(topic != null && topic.trim().length() != 0){
            String[] topicGrp = topic.split("/") ;
            if(topicGrp.length != 4){
            if(topicGrp.length != 5){
                throw new Exception("接收的mqtt消息主题不可识别") ;
            }else{
                if(NumUtil.isPlusIntNumber(topicGrp[4])){
                    throw new Exception("接收的mqtt消息主题不可识别") ;
                }
                if(Integer.parseInt(topicGrp[4]) <= 0){
                    throw new Exception("接收的mqtt消息主题不可识别") ;
                }
                MqttTopic vo = new MqttTopic() ;
                vo.orgTag = topicGrp[0] ;
                vo.protocol = topicGrp[1] ;
                vo.devId = topicGrp[2] ;
                vo.name = topicGrp[3] ;
                vo.type = topicGrp[3] ;
                vo.no = Integer.parseInt(topicGrp[4]) ;
                return vo ;
            }
        }else{
@@ -30,7 +38,7 @@
    }
    public static String createPubTopic(MqttTopic tp) throws Exception {
        return tp.orgTag + "/" + tp.protocol + "/" + tp.devId + "/" + tp.name;
        return tp.orgTag + "/" + tp.protocol + "/" + tp.devId + "/" + tp.type + "/" + tp.no;
    }
    public static MqttSubMsg parseSubMsg(MqttTopic subTopic, MqttMessage mqttMsg, MqttCallback callback) throws Exception {
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/MqttTopic.java
@@ -16,18 +16,19 @@
    public String orgTag ;//组织标识
    public String protocol ;//协议名称
    public String devId ;//设备(FBox)ID
    public String name;//消息主题末端名称
    public String type;//测站类型
    public Integer no;//测站编号
    public boolean isEmpty(){
        return orgTag == null || protocol == null || devId == null || name == null
                || orgTag.trim().length() == 0 || protocol.trim().length() == 0 || devId.trim().length() == 0 || name.trim().length() == 0 ;
        return orgTag == null || protocol == null || devId == null || type == null || no == null
                || orgTag.trim().length() == 0 || protocol.trim().length() == 0 || devId.trim().length() == 0 || type.trim().length() == 0 || no <= 0 ;
    }
    public String shortName(){
        return name;
        return type + "/" + no;
    }
    public String longName(){
        return orgTag + "/" + protocol + "/" + devId + "/" + name;
        return orgTag + "/" + protocol + "/" + devId + "/" + type + "/" + no;
    }
}
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/Vo4Up.java
@@ -6,5 +6,8 @@
 * @Description
 */
public interface Vo4Up {
    public void setNo(Integer no) ;
    String toString() ;
}
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/ProtocolParserSdV1.java
@@ -30,7 +30,7 @@
        MqttSubMsgSdV1 msg = new MqttSubMsgSdV1(subTopic, strTxt);
        Vo4Up vo ;
        DevRunInfo stInfo = null ;
        switch (subTopic.name) {
        switch (subTopic.type) {
            case ProtocolConstantSdV1.SubTopicWeather -> {
                vo = JSON.parseObject(strTxt, WeatherVo.class);
                break;
@@ -56,9 +56,10 @@
                break;
            }
            default -> {
                throw new Exception("接收到MQTT消息,协议" + subTopic.protocol + ",设备ID" + subTopic.devId + ",主题" + subTopic.name + "消息解析逻辑未实现");
                throw new Exception("接收到MQTT消息,协议" + subTopic.protocol + ",设备ID" + subTopic.devId + ",主题" + subTopic.type + "消息解析逻辑未实现");
            }
        }
        vo.setNo(subTopic.no) ;
        msg.vo4Up = vo ;
        callback.callback(msg);
        callback.notify(msg.deviceId, stInfo);
@@ -131,7 +132,7 @@
        msg.isCacheForOffLine = false ;
        msg.hasResponse = true ;
        msg.cd = CodeSdV1.cd_Fault ;
        msg.topic = new MqttTopic(orgTag, com.protocol, com.rtuAddr, ProtocolConstantSdV1.PubTopicFault) ;
        msg.topic = new MqttTopic(orgTag, com.protocol, com.rtuAddr, ProtocolConstantSdV1.PubTopicFault, cvo.no) ;
        msg.msg = JSON.toJSONString(new FaultClearVo(cvo.startTrueStopFalse ?(byte)1:0)) ;
        return msg ;
    }
@@ -147,7 +148,7 @@
        msg.isCacheForOffLine = false ;
        msg.hasResponse = true ;
        msg.cd = CodeSdV1.cd_Fault ;
        msg.topic = new MqttTopic(orgTag, com.protocol, com.rtuAddr, ProtocolConstantSdV1.PubTopicStir) ;
        msg.topic = new MqttTopic(orgTag, com.protocol, com.rtuAddr, ProtocolConstantSdV1.PubTopicStir, cvo.no) ;
        msg.msg = JSON.toJSONString(new StirStartVo(cvo.startTrueStopFalse ?(byte)1:0)) ;
        return msg ;
    }
@@ -163,7 +164,7 @@
        msg.isCacheForOffLine = false ;
        msg.hasResponse = true ;
        msg.cd = CodeSdV1.cd_Fault ;
        msg.topic = new MqttTopic(orgTag, com.protocol, com.rtuAddr, ProtocolConstantSdV1.PubTopicInject) ;
        msg.topic = new MqttTopic(orgTag, com.protocol, com.rtuAddr, ProtocolConstantSdV1.PubTopicInject, cvo.no) ;
        msg.msg = JSON.toJSONString(new InjectStartVo(cvo.startTrueStopFalse ?(byte)1:0)) ;
        return msg ;
    }
@@ -179,7 +180,7 @@
        msg.isCacheForOffLine = false ;
        msg.hasResponse = true ;
        msg.cd = CodeSdV1.cd_Fault ;
        msg.topic = new MqttTopic(orgTag, com.protocol, com.rtuAddr, ProtocolConstantSdV1.PubTopicIrr) ;
        msg.topic = new MqttTopic(orgTag, com.protocol, com.rtuAddr, ProtocolConstantSdV1.PubTopicIrr, cvo.no) ;
        msg.msg = JSON.toJSONString(new StirStartVo(cvo.startTrueStopFalse ?(byte)1:0)) ;
        return msg ;
    }
@@ -196,7 +197,7 @@
        msg.isCacheForOffLine = false ;
        msg.hasResponse = false ;
        msg.cd = CodeSdV1.cd_Param ;
        msg.topic = new MqttTopic(orgTag, com.protocol, com.rtuAddr, ProtocolConstantSdV1.PubTopicParam) ;
        msg.topic = new MqttTopic(orgTag, com.protocol, com.rtuAddr, ProtocolConstantSdV1.PubTopicParam, cvo.no) ;
        msg.msg = JSON.toJSONString(new ParamSetVo(cvo.stirDuration, cvo.injectDuration)) ;
        return msg ;
    }
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/comParam/ComCtrlVo.java
@@ -6,6 +6,9 @@
 * @Description
 */
public class ComCtrlVo {
    public Integer no ;//设备编号
    //启停动作,true是,false否
    //可以执行功能码 00,01,02,03的动作
    public boolean startTrueStopFalse;//
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/comParam/ComSetParamVo.java
@@ -1,6 +1,5 @@
package com.dy.common.mw.protocol4Mqtt.pSdV1.comParam;
import com.alibaba.fastjson2.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -14,6 +13,9 @@
@NoArgsConstructor
@AllArgsConstructor
public class ComSetParamVo {
    //设备编号
    public Integer no ;
    // æ…拌设定时间
    public Integer stirDuration ;
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/ManureVo.java
@@ -15,6 +15,8 @@
    @JSONField(name = "flexem_message_id")
    public Integer messageId ;//消息ID
    public Integer no ;//测站编号,其不在JSON数据中,其中主题中
    @JSONField(name = "肥料流量")
    public Float manureFlow ;//肥料流量
@@ -28,6 +30,12 @@
    public Long devDt ;//设备时间
    public String devDtStr ;//设备时间
    @Override
    public void setNo(Integer no ){
        this.no = no ;
    }
    public String getDevDtStr() {
        if(devDt == null){
            return DateTime.yyyy_MM_dd_HH_mm_ss(DateTime.getDate(devDt)) ;
@@ -49,4 +57,5 @@
        sb.append("\n") ;
        return sb.toString() ;
    }
}
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/SoilVo.java
@@ -15,6 +15,8 @@
    @JSONField(name = "flexem_message_id")
    public Integer messageId ;//消息ID
    public Integer no ;//测站编号,其不在JSON数据中,其中主题中
    @JSONField(name = "土壤湿度1")
    public Float soilHumidity1 ;//土壤湿度1
@@ -43,6 +45,12 @@
    public Long devDt ;//设备时间
    public String devDtStr ;//设备时间
    @Override
    public void setNo(Integer no ){
        this.no = no ;
    }
    public String getDevDtStr() {
        if(devDt == null){
            return DateTime.yyyy_MM_dd_HH_mm_ss(DateTime.getDate(devDt)) ;
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/StateVo.java
@@ -15,6 +15,8 @@
    @JSONField(name = "flexem_message_id")
    public Integer messageId ;//消息ID
    public Integer no ;//测站编号,其不在JSON数据中,其中主题中
    @JSONField(name = "搅拌运行")
    public Byte stirRunning ;//搅拌运行
@@ -31,6 +33,12 @@
    public Long devDt ;//设备时间
    public String devDtStr ;//设备时间
    @Override
    public void setNo(Integer no ){
        this.no = no ;
    }
    public String getDevDtStr() {
        if(devDt == null){
            return DateTime.yyyy_MM_dd_HH_mm_ss(DateTime.getDate(devDt)) ;
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol4Mqtt/pSdV1/upVos/WeatherVo.java
@@ -16,6 +16,8 @@
    @JSONField(name = "flexem_message_id")
    public Integer messageId ;//消息ID
    public Integer no ;//测站编号,其不在JSON数据中,其中主题中
    @JSONField(name = "二氧化碳")
    public Integer carbonDioxide ;//二氧化碳
@@ -42,6 +44,12 @@
    public Long devDt ;//设备时间
    public String devDtStr ;//设备时间
    @Override
    public void setNo(Integer no ){
        this.no = no ;
    }
    public String getDevDtStr() {
        if(devDt != null){
            return DateTime.yyyy_MM_dd_HH_mm_ss(DateTime.getDate(devDt)) ;
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrStManureMapper.java
New file
@@ -0,0 +1,30 @@
package com.dy.pipIrrGlobal.daoPr;
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
 * @Date: 2025/6/17 16:09
 * @Description
 */
@Mapper
public interface PrStManureMapper extends BaseMapper<PrStManure> {
    int deleteByPrimaryKey(Long id);
    int insert(PrStManure record);
    int insertSelective(PrStManure record);
    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
New file
@@ -0,0 +1,30 @@
package com.dy.pipIrrGlobal.daoPr;
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
 * @Date: 2025/6/17 16:09
 * @Description
 */
@Mapper
public interface PrStSoilMapper extends BaseMapper<PrStSoil> {
    int deleteByPrimaryKey(Long id);
    int insert(PrStSoil record);
    int insertSelective(PrStSoil record);
    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
New file
@@ -0,0 +1,30 @@
package com.dy.pipIrrGlobal.daoPr;
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
 * @Date: 2025/6/17 16:10
 * @Description
 */
@Mapper
public interface PrStWeatherMapper extends BaseMapper<PrStWeather> {
    int deleteByPrimaryKey(Long id);
    int insert(PrStWeather record);
    int insertSelective(PrStWeather record);
    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/pojoPr/PrStManure.java
New file
@@ -0,0 +1,75 @@
package com.dy.pipIrrGlobal.pojoPr;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
/**
 * @Author: liurunyu
 * @Date: 2025/6/17 16:09
 * @Description
 */
/**
 * æ°´è‚¥æœºï¼ˆç«™ï¼‰
 */
@TableName(value="pr_st_manure", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "水肥机(站)")
public class PrStManure implements BaseEntity {
    public static final long serialVersionUID = 202506171615001L;
    /**
    * ä¸»é”®
    */
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    public Long id;
    /**
     * æ°´è‚¥ç«™ç¼–号
     */
    @Schema(description = "水肥站编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Integer no ;
    /**
    * æ°´è‚¥ç«™åç§°
    */
    @Schema(description = "水肥站名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String name;
    /**
     * ç»åº¦
     */
    @Schema(description = "水肥站经度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double lng;
    /**
     * çº¬åº¦
     */
    @Schema(description = "水肥站纬度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double lat;
    /**
     * å¤‡æ³¨
     */
    @Schema(description = "备注信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String remark;
    /**
     * æ˜¯å¦åˆ é™¤ï¼ˆ1是,0否)
     */
    @Schema(description = "是否删除", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte deleted;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrStSoil.java
New file
@@ -0,0 +1,74 @@
package com.dy.pipIrrGlobal.pojoPr;
/**
 * @Author: liurunyu
 * @Date: 2025/6/17 16:09
 * @Description
 */
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
/**
 * å¢’情站
 */
@TableName(value="pr_st_soil", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "墒情站")
public class PrStSoil  implements BaseEntity {
    public static final long serialVersionUID = 202506171615002L;
    /**
    * ä¸»é”®
    */
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    public Long id;
    /**
     * å¢’情站编号
     */
    @Schema(description = "墒情站编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Integer no ;
    /**
    * å¢’情站名称
    */
    @Schema(description = "墒情站名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String name;
    /**
     * ç»åº¦
     */
    @Schema(description = "墒情站经度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double lng;
    /**
     * çº¬åº¦
     */
    @Schema(description = "墒情站纬度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double lat;
    /**
     * å¤‡æ³¨
     */
    @Schema(description = "备注信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String remark;
    /**
     * æ˜¯å¦åˆ é™¤ï¼ˆ1是,0否)
     */
    @Schema(description = "是否删除", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte deleted;
}
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoPr/PrStWeather.java
New file
@@ -0,0 +1,74 @@
package com.dy.pipIrrGlobal.pojoPr;
/**
 * @Author: liurunyu
 * @Date: 2025/6/17 16:10
 * @Description
 */
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
/**
 * æ°”象站
 */
@TableName(value="pr_st_weather", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Schema(name = "气象站")
public class PrStWeather implements BaseEntity {
    public static final long serialVersionUID = 202506171615003L;
    /**
    * ä¸»é”®
    */
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(type = IdType.INPUT)
    public Long id;
    /**
     * æ°”象站编号
     */
    @Schema(description = "气象站编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Integer no ;
    /**
    * æ°”象站名称
    */
    @Schema(description = "气象站名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String name;
    /**
     * ç»åº¦
     */
    @Schema(description = "气象站经度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double lng;
    /**
     * çº¬åº¦
     */
    @Schema(description = "气象站纬度", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Double lat;
    /**
     * å¤‡æ³¨
     */
    @Schema(description = "备注信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public String remark;
    /**
     * æ˜¯å¦åˆ é™¤ï¼ˆ1是,0否)
     */
    @Schema(description = "是否删除", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    public Byte deleted;
}
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
New file
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dy.pipIrrGlobal.daoPr.PrStManureMapper">
  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrStManure">
    <!--@mbg.generated-->
    <!--@Table pr_st_manure-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="no" jdbcType="INTEGER" property="no" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="lng" jdbcType="DOUBLE" property="lng" />
    <result column="lat" jdbcType="DOUBLE" property="lat" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, `no`, `name`, lng, lat, remark, deleted
  </sql>
  <sql id="part_Column_List">
    <!--@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
    <include refid="Base_Column_List" />
    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
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStManure">
    <!--@mbg.generated-->
    insert into pr_st_manure (id, `no`, `name`, lng,
      lat, remark, deleted)
    values (#{id,jdbcType=BIGINT}, #{no,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
        #{lng,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{remark,jdbcType=VARCHAR},
        #{deleted,jdbcType=TINYINT})
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStManure">
    <!--@mbg.generated-->
    insert into pr_st_manure
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="no != null">
        `no`,
      </if>
      <if test="name != null">
        `name`,
      </if>
      <if test="lng != null">
        lng,
      </if>
      <if test="lat != null">
        lat,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="no != null">
        #{no,jdbcType=INTEGER},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="lng != null">
        #{lng,jdbcType=DOUBLE},
      </if>
      <if test="lat != null">
        #{lat,jdbcType=DOUBLE},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStManure">
    <!--@mbg.generated-->
    update pr_st_manure
    <set>
      <if test="no != null">
        `no` = #{no,jdbcType=INTEGER},
      </if>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="lng != null">
        lng = #{lng,jdbcType=DOUBLE},
      </if>
      <if test="lat != null">
        lat = #{lat,jdbcType=DOUBLE},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStManure">
    <!--@mbg.generated-->
    update pr_st_manure
    set `no` = #{no,jdbcType=INTEGER},
      `name` = #{name,jdbcType=VARCHAR},
      lng = #{lng,jdbcType=DOUBLE},
      lat = #{lat,jdbcType=DOUBLE},
      remark = #{remark,jdbcType=VARCHAR},
      deleted = #{deleted,jdbcType=TINYINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStSoilMapper.xml
New file
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dy.pipIrrGlobal.daoPr.PrStSoilMapper">
  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrStSoil">
    <!--@mbg.generated-->
    <!--@Table pr_st_soil-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="no" jdbcType="INTEGER" property="no" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="lng" jdbcType="DOUBLE" property="lng" />
    <result column="lat" jdbcType="DOUBLE" property="lat" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, `no`, `name`, lng, lat, remark, deleted
  </sql>
  <sql id="part_Column_List">
    <!--@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
    <include refid="Base_Column_List" />
    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
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStSoil">
    <!--@mbg.generated-->
    insert into pr_st_soil (id, `no`, `name`, lng,
    lat, remark, deleted)
    values (#{id,jdbcType=BIGINT}, #{no,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
    #{lng,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{remark,jdbcType=VARCHAR},
    #{deleted,jdbcType=TINYINT})
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStSoil">
    <!--@mbg.generated-->
    insert into pr_st_soil
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="no != null">
        `no`,
      </if>
      <if test="name != null">
        `name`,
      </if>
      <if test="lng != null">
        lng,
      </if>
      <if test="lat != null">
        lat,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="no != null">
        #{no,jdbcType=INTEGER},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="lng != null">
        #{lng,jdbcType=DOUBLE},
      </if>
      <if test="lat != null">
        #{lat,jdbcType=DOUBLE},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStSoil">
    <!--@mbg.generated-->
    update pr_st_soil
    <set>
      <if test="no != null">
        `no` = #{no,jdbcType=INTEGER},
      </if>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="lng != null">
        lng = #{lng,jdbcType=DOUBLE},
      </if>
      <if test="lat != null">
        lat = #{lat,jdbcType=DOUBLE},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStSoil">
    <!--@mbg.generated-->
    update pr_st_soil
    set `no` = #{no,jdbcType=INTEGER},
    `name` = #{name,jdbcType=VARCHAR},
    lng = #{lng,jdbcType=DOUBLE},
    lat = #{lat,jdbcType=DOUBLE},
    remark = #{remark,jdbcType=VARCHAR},
    deleted = #{deleted,jdbcType=TINYINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrStWeatherMapper.xml
New file
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dy.pipIrrGlobal.daoPr.PrStWeatherMapper">
  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrStWeather">
    <!--@mbg.generated-->
    <!--@Table pr_st_weather-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="no" jdbcType="INTEGER" property="no" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="lng" jdbcType="DOUBLE" property="lng" />
    <result column="lat" jdbcType="DOUBLE" property="lat" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, `no`, `name`, lng, lat, remark, deleted
  </sql>
  <sql id="part_Column_List">
    <!--@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
    <include refid="Base_Column_List" />
    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
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStWeather">
    <!--@mbg.generated-->
    insert into pr_st_weather (id, `no`, `name`, lng,
    lat, remark, deleted)
    values (#{id,jdbcType=BIGINT}, #{no,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
    #{lng,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{remark,jdbcType=VARCHAR},
    #{deleted,jdbcType=TINYINT})
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStWeather">
    <!--@mbg.generated-->
    insert into pr_st_weather
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="no != null">
        `no`,
      </if>
      <if test="name != null">
        `name`,
      </if>
      <if test="lng != null">
        lng,
      </if>
      <if test="lat != null">
        lat,
      </if>
      <if test="remark != null">
        remark,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="no != null">
        #{no,jdbcType=INTEGER},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="lng != null">
        #{lng,jdbcType=DOUBLE},
      </if>
      <if test="lat != null">
        #{lat,jdbcType=DOUBLE},
      </if>
      <if test="remark != null">
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStWeather">
    <!--@mbg.generated-->
    update pr_st_weather
    <set>
      <if test="no != null">
        `no` = #{no,jdbcType=INTEGER},
      </if>
      <if test="name != null">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="lng != null">
        lng = #{lng,jdbcType=DOUBLE},
      </if>
      <if test="lat != null">
        lat = #{lat,jdbcType=DOUBLE},
      </if>
      <if test="remark != null">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrStWeather">
    <!--@mbg.generated-->
    update pr_st_weather
    set `no` = #{no,jdbcType=INTEGER},
    `name` = #{name,jdbcType=VARCHAR},
    lng = #{lng,jdbcType=DOUBLE},
    lat = #{lat,jdbcType=DOUBLE},
    remark = #{remark,jdbcType=VARCHAR},
    deleted = #{deleted,jdbcType=TINYINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/config.properties
@@ -24,7 +24,7 @@
#   ç”˜å·žï¼š 60103
#   å‡‰å·žï¼š 60104
#   é‡‘川: 60105
tcp.port=60000
tcp.port=60000ba_divide
#RTU上行数据最小间隔,大于这个间隔认为设备离线了,测控一体阀是3,表阀一体机是6,默认采用时间最长的6
base.upData.min.interval=6
@@ -32,21 +32,21 @@
# MQTT服务配置
#   mqtt.enable æ˜¯å¦å¯åЍ
#   mqtt.protocolAndDeviceIds åœ¨å­ç³»ç»Ÿï¼ˆorgTag)中接入的设备(FBox)所用协议及设备id集合,多个用逗号隔开,协议与ID用正斜杠隔开,例如:sd1/338220031439,sd1/338220031440
#   mqtt.subTopicAndQos è®¢é˜…主题与Qos,主题名与其Qos用逗号隔开,多个主题及Qos用分号隔开,例如:topic1,1;topic2,1;topic3,1
#   mqtt.subTopicAndQos è®¢é˜…主题与Qos,主题名与其Qos用逗号隔开,多个主题及Qos用分号隔开,主题名由站类型及编号组成,即一个FBox可以接入多个同类型的测站,站编号从1开始,站类型与编号用正斜杠隔开,例如:weather/1,1;weather/2,1;manure/1,1
# 233服务器:
#   å…ƒè°‹ï¼š mqtt.enable=false  mqtt.protocolAndDeviceIds= mqtt.topicAndQos=
#   æ²™ç›˜ï¼š mqtt.enable=false  mqtt.protocolAndDeviceIds= mqtt.topicAndQos=
#   æµ‹è¯•: mqtt.enable=false  mqtt.protocolAndDeviceIds= mqtt.topicAndQos=
#   æ¢…江: mqtt.enable=false  mqtt.protocolAndDeviceIds= mqtt.topicAndQos=
# 121服务器:
#   æ°‘勤: mqtt.enable=true  mqtt.protocolAndDeviceIds=? mqtt.topicAndQos=weather,1;soil,1;manure,1;state,1
#   æ°‘勤: mqtt.enable=true  mqtt.protocolAndDeviceIds=? mqtt.topicAndQos=weather/1,1;soil/1,1;manure/1,1;state/1,1
#   å»¶åº†ï¼š mqtt.enable=false  mqtt.protocolAndDeviceIds= mqtt.topicAndQos=
#   é»‘龙江: mqtt.enable=false  mqtt.protocolAndDeviceIds= mqtt.topicAndQos=
#   ç”˜å·žï¼š mqtt.enable=false  mqtt.protocolAndDeviceIds= mqtt.topicAndQos=
#   å‡‰å·žï¼š mqtt.enable=false  mqtt.protocolAndDeviceIds= mqtt.topicAndQos=
#   é‡‘川: mqtt.enable=true  mqtt.protocolAndDeviceIds=? mqtt.topicAndQos=weather,1;soil,1;manure,1;state,1
#   é‡‘川: mqtt.enable=true  mqtt.protocolAndDeviceIds=? mqtt.topicAndQos=weather/1,1;soil/1,1;manure/1,1;state/1,1
mqtt.enable=false
mqtt.protocolAndDeviceIds=sd1/338220031439,sd1/338220031440
mqtt.subTopicAndQos=weather,1;soil,1;manure,1;state,1
mqtt.subTopicAndQos=weather/1,1;soil/1,1;manure/1,1;state/1,1
#MQtt设备在一定时间(分钟)后未发布消息,认为设备离线
mqtt.noSubThenOff=10
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,45 @@
package com.dy.pipIrrRemote.monitor.mqttSd1.fault;
import com.alibaba.fastjson2.JSONObject;
import com.dy.common.util.Callback;
import com.dy.pipIrrRemote.common.dto.DtoBase;
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 ;
    @Override
    protected String checkDto(DtoBase dto) {
        return null;
    }
    @Override
    protected String dealComResult(String code, JSONObject resultData, Callback callback) {
        return null;
    }
}
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 {
}
pipIrr-platform/Îĵµ/Ë®·ÊÆøÏóÉÊÇé/Ë®·ÊÕ¾¡¢ÆøÏóÕ¾¡¢ÉÊÇéվЭÒé.docx
Binary files differ