Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | 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{ | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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 { | 
|---|
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public interface Vo4Up { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setNo(Integer no) ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String toString() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public class ComCtrlVo { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Integer no ;//设å¤ç¼å· | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //å¯åå¨ä½ï¼trueæ¯ï¼falseå¦ | 
|---|
|  |  |  | //å¯ä»¥æ§è¡åè½ç  00ï¼01ï¼02ï¼03çå¨ä½ | 
|---|
|  |  |  | public boolean startTrueStopFalse;// | 
|---|
|  |  |  | 
|---|
|  |  |  | package com.dy.common.mw.protocol4Mqtt.pSdV1.comParam; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
|---|
|  |  |  | import lombok.AllArgsConstructor; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import lombok.NoArgsConstructor; | 
|---|
|  |  |  | 
|---|
|  |  |  | @NoArgsConstructor | 
|---|
|  |  |  | @AllArgsConstructor | 
|---|
|  |  |  | public class ComSetParamVo { | 
|---|
|  |  |  | //设å¤ç¼å· | 
|---|
|  |  |  | public Integer no ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // æ
æè®¾å®æ¶é´ | 
|---|
|  |  |  | public Integer stirDuration ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @JSONField(name = "flexem_message_id") | 
|---|
|  |  |  | public Integer messageId ;//æ¶æ¯ID | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Integer no ;//æµç«ç¼å·ï¼å
¶ä¸å¨JSONæ°æ®ä¸ï¼å
¶ä¸ä¸»é¢ä¸ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @JSONField(name = "è¥ææµé") | 
|---|
|  |  |  | public Float manureFlow ;//è¥ææµé | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | 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)) ; | 
|---|
|  |  |  | 
|---|
|  |  |  | sb.append("\n") ; | 
|---|
|  |  |  | return sb.toString() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | @JSONField(name = "flexem_message_id") | 
|---|
|  |  |  | public Integer messageId ;//æ¶æ¯ID | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Integer no ;//æµç«ç¼å·ï¼å
¶ä¸å¨JSONæ°æ®ä¸ï¼å
¶ä¸ä¸»é¢ä¸ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @JSONField(name = "å壤湿度1") | 
|---|
|  |  |  | public Float soilHumidity1 ;//å壤湿度1 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | 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)) ; | 
|---|
|  |  |  | 
|---|
|  |  |  | @JSONField(name = "flexem_message_id") | 
|---|
|  |  |  | public Integer messageId ;//æ¶æ¯ID | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Integer no ;//æµç«ç¼å·ï¼å
¶ä¸å¨JSONæ°æ®ä¸ï¼å
¶ä¸ä¸»é¢ä¸ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @JSONField(name = "æ
æè¿è¡") | 
|---|
|  |  |  | public Byte stirRunning ;//æ
æè¿è¡ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | 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)) ; | 
|---|
|  |  |  | 
|---|
|  |  |  | @JSONField(name = "flexem_message_id") | 
|---|
|  |  |  | public Integer messageId ;//æ¶æ¯ID | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Integer no ;//æµç«ç¼å·ï¼å
¶ä¸å¨JSONæ°æ®ä¸ï¼å
¶ä¸ä¸»é¢ä¸ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @JSONField(name = "äºæ°§å碳") | 
|---|
|  |  |  | public Integer carbonDioxide ;//äºæ°§å碳 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | 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)) ; | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * é»è¾å é¤ | 
|---|
|  |  |  | * @param id primaryKey | 
|---|
|  |  |  | * @return update count | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | int deleteLogicById(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); | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * é»è¾å é¤ | 
|---|
|  |  |  | * @param id primaryKey | 
|---|
|  |  |  | * @return update count | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | int deleteLogicById(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); | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * é»è¾å é¤ | 
|---|
|  |  |  | * @param id primaryKey | 
|---|
|  |  |  | * @return update count | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | int deleteLogicById(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); | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrGlobal.voPr; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson2.annotation.JSONField; | 
|---|
|  |  |  | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; | 
|---|
|  |  |  | 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 { | 
|---|
|  |  |  | @JSONField(serializeUsing= ObjectWriterImplToString.class) | 
|---|
|  |  |  | public Long id ; | 
|---|
|  |  |  | public String name ;//åç§° | 
|---|
|  |  |  | public Integer no ;//ç¼å· | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | private Long cardNum; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String orderNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //å
å¼åä½é¢ | 
|---|
|  |  |  | private Float balance; | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <?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> | 
|---|
|  |  |  | <delete id="deleteLogicById" parameterType="java.lang.Long"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | update pr_st_manure set deleted = 1 | 
|---|
|  |  |  | 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> | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <?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> | 
|---|
|  |  |  | <delete id="deleteLogicById" parameterType="java.lang.Long"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | update pr_st_soil set deleted = 1 | 
|---|
|  |  |  | 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> | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | <?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> | 
|---|
|  |  |  | <delete id="deleteLogicById" parameterType="java.lang.Long"> | 
|---|
|  |  |  | <!--@mbg.generated--> | 
|---|
|  |  |  | update pr_st_weather set deleted = 1 | 
|---|
|  |  |  | 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> | 
|---|
|  |  |  | 
|---|
|  |  |  | #   çå·ï¼ 60103 | 
|---|
|  |  |  | #   åå·ï¼ 60104 | 
|---|
|  |  |  | #   éå·ï¼ 60105 | 
|---|
|  |  |  | tcp.port=60000 | 
|---|
|  |  |  | tcp.port=60000ba_divide | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #RTUä¸è¡æ°æ®æå°é´éï¼å¤§äºè¿ä¸ªé´é认为设å¤ç¦»çº¿äºï¼æµæ§ä¸ä½éæ¯3ï¼è¡¨éä¸ä½æºæ¯6ï¼é»è®¤éç¨æ¶é´æé¿ç6 | 
|---|
|  |  |  | base.upData.min.interval=6 | 
|---|
|  |  |  | 
|---|
|  |  |  | # 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 | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrProject.mqtt.manure; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.pipIrrGlobal.pojoPr.PrStManure; | 
|---|
|  |  |  | 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 jakarta.validation.Valid; | 
|---|
|  |  |  | import lombok.RequiredArgsConstructor; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.http.MediaType; | 
|---|
|  |  |  | import org.springframework.validation.BindingResult; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | * @Date: 2025/6/19 10:41 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @Tag(name = "æ°´è¥æºç®¡ç", description = "æ°´è¥æºç®¡ç") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping(path = "manureStation") | 
|---|
|  |  |  | @RequiredArgsConstructor | 
|---|
|  |  |  | public class ManureCtrl { | 
|---|
|  |  |  | private ManureSv sv; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private void setSv(ManureSv sv){ | 
|---|
|  |  |  | this.sv = sv ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¾å°ä¸å¥æ°´è¥æºæ°æ® | 
|---|
|  |  |  | * @return ä¸å¥æ°´è¥æºæ°æ® | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "ä¸å¥æ°´è¥æº", description = "å¾å°ä¸å¥æ°´è¥æºæ°æ®") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "è¿åä¸å¥æ°´è¥æºæ°æ®ï¼BaseResponse.content:{}ï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = PrStManure.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "one") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<PrStManure> one(Long id){ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(this.sv.selectById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿åæ°´è¥æº | 
|---|
|  |  |  | * @param dto ä¿åæ°´è¥æºform表å对象 | 
|---|
|  |  |  | * @return æ¯å¦æå | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "ä¿åæ°´è¥æº", description = "æäº¤æ°´è¥æºæ°æ®ï¼form表åï¼ï¼è¿è¡ä¿å") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = Boolean.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE) | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> save(@RequestBody @Valid ManureDto dto, BindingResult bindingResult){ | 
|---|
|  |  |  | if(bindingResult != null && bindingResult.hasErrors()){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | PrStManure po = dto.toNewPo() ; | 
|---|
|  |  |  | po.deleted = 0 ; | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.save(po); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("ä¿åæ°´è¥æºå¼å¸¸", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ°æ®åºåå¨å¤±è´¥") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ç¼è¾ä¿®æ¹æ°´è¥æº | 
|---|
|  |  |  | * @param dto ä¿åæ°´è¥æºform表å对象 | 
|---|
|  |  |  | * @return æ¯å¦æå | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "ç¼è¾ä¿®æ¹æ°´è¥æº", description = "æäº¤æ°´è¥æºæ°æ®ï¼form表åï¼ï¼è¿è¡ä¿®æ¹") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = Boolean.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE) | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> update(@RequestBody @Valid ManureDto dto, BindingResult bindingResult){ | 
|---|
|  |  |  | if(bindingResult != null && bindingResult.hasErrors()){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | PrStManure po = dto.toPo() ; | 
|---|
|  |  |  | if(po.id == null){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ æ°æ®å®ä½ID") ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.update(po); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("ä¿åæ°´è¥æºå¼å¸¸", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ°æ®åºåå¨å¤±è´¥") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å é¤æ°´è¥æº | 
|---|
|  |  |  | * @param id æ°´è¥æºID | 
|---|
|  |  |  | * @return æ¯å¦æå | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "å é¤æ°´è¥æº", description = "æäº¤æ°´è¥æºIDï¼è¿è¡é»è¾å é¤") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = Boolean.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "delete") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> delete(Long id){ | 
|---|
|  |  |  | if(id == null){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("idä¸è½ä¸ºç©º") ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.delete(id); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("ä¿åæ°´è¥æºå¼å¸¸", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ°æ®åºåå¨å¤±è´¥") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrProject.mqtt.manure; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoPr.PrStManure; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import jakarta.validation.constraints.NotEmpty; | 
|---|
|  |  |  | import jakarta.validation.constraints.NotNull; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | * @Date: 2025/6/18 14:52 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @Schema(name = "æ°´è¥æº") | 
|---|
|  |  |  | public class ManureDto { | 
|---|
|  |  |  | public static final long serialVersionUID = 202506091032001L; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¸»é® | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public String id; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * æ°´è¥æºåç§° | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @NotEmpty(message = "æ°´è¥æºåç§°ä¸è½ä¸ºç©º") //ä¸è½ä¸ºç©ºä¹ä¸è½ä¸ºnull | 
|---|
|  |  |  | public String name; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * æ°´è¥æºç¼å· | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @NotNull(message = "æ°´è¥æºç¼å·ä¸è½ä¸ºç©º") //ä¸è½ä¸ºç©ºä¹ä¸è½ä¸ºnull | 
|---|
|  |  |  | public Integer no; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ç»åº¦ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Double lng; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * çº¬åº¦ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Double lat; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¤æ³¨ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public String remark; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public PrStManure toNewPo(){ | 
|---|
|  |  |  | PrStManure po = new PrStManure(); | 
|---|
|  |  |  | po.name = this.name; | 
|---|
|  |  |  | po.no = this.no; | 
|---|
|  |  |  | po.lng = this.lng; | 
|---|
|  |  |  | po.lat = this.lat; | 
|---|
|  |  |  | po.remark = this.remark; | 
|---|
|  |  |  | return po; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public PrStManure toPo(){ | 
|---|
|  |  |  | PrStManure po = this.toNewPo(); | 
|---|
|  |  |  | po.id = Long.parseLong(this.id) ; | 
|---|
|  |  |  | return po; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrProject.mqtt.manure; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoPr.PrStManureMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoPr.PrStManure; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voPr.VoMqttSimple; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¾å°ä¸ä¸ªå®ä½ | 
|---|
|  |  |  | * @param id å®ä½ID | 
|---|
|  |  |  | * @return å®ä½ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public PrStManure selectById(Long id){ | 
|---|
|  |  |  | return this.dao.selectById(id) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿åï¼æ·»å ï¼è§é¢çæ§ç¹ | 
|---|
|  |  |  | * @param po | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | Integer save(PrStManure po) { | 
|---|
|  |  |  | return dao.insert(po); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿®æ¹å®ä½ | 
|---|
|  |  |  | * @param po å®ä½ | 
|---|
|  |  |  | * @return æ°é | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public int update(PrStManure po) { | 
|---|
|  |  |  | return this.dao.updateByPrimaryKeySelective(po); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿åä¿®æ¹å®ä½ | 
|---|
|  |  |  | * @param id å®ä½ID | 
|---|
|  |  |  | * @return å½±åè®°å½æ°é | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public int delete(Long id){ | 
|---|
|  |  |  | return this.dao.deleteLogicById(id) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrProject.mqtt.soil; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.pipIrrGlobal.pojoPr.PrStSoil; | 
|---|
|  |  |  | 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 jakarta.validation.Valid; | 
|---|
|  |  |  | import lombok.RequiredArgsConstructor; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.http.MediaType; | 
|---|
|  |  |  | import org.springframework.validation.BindingResult; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | * @Date: 2025/6/19 10:41 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @Tag(name = "墿
ç«ç®¡ç", description = "墿
ç«ç®¡ç") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping(path = "soilStation") | 
|---|
|  |  |  | @RequiredArgsConstructor | 
|---|
|  |  |  | public class SoilCtrl { | 
|---|
|  |  |  | private SoilSv sv; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private void setSv(SoilSv sv){ | 
|---|
|  |  |  | this.sv = sv ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¾å°ä¸å¥å¢æ
ç«æ°æ® | 
|---|
|  |  |  | * @return ä¸å¥å¢æ
ç«æ°æ® | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "ä¸å¥å¢æ
ç«", description = "å¾å°ä¸å¥å¢æ
ç«æ°æ®") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "è¿åä¸å¥å¢æ
ç«æ°æ®ï¼BaseResponse.content:{}ï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = PrStSoil.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "one") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<PrStSoil> one(Long id){ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(this.sv.selectById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿å墿
ç« | 
|---|
|  |  |  | * @param dto ä¿å墿
ç«form表å对象 | 
|---|
|  |  |  | * @return æ¯å¦æå | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "ä¿å墿
ç«", description = "æäº¤å¢æ
ç«æ°æ®ï¼form表åï¼ï¼è¿è¡ä¿å") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = Boolean.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE) | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> save(@RequestBody @Valid SoilDto dto, BindingResult bindingResult){ | 
|---|
|  |  |  | if(bindingResult != null && bindingResult.hasErrors()){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | PrStSoil po = dto.toNewPo() ; | 
|---|
|  |  |  | po.deleted = 0 ; | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.save(po); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("ä¿å墿
ç«å¼å¸¸", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ°æ®åºåå¨å¤±è´¥") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ç¼è¾ä¿®æ¹å¢æ
ç« | 
|---|
|  |  |  | * @param dto ä¿å墿
ç«form表å对象 | 
|---|
|  |  |  | * @return æ¯å¦æå | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "ç¼è¾ä¿®æ¹å¢æ
ç«", description = "æäº¤å¢æ
ç«æ°æ®ï¼form表åï¼ï¼è¿è¡ä¿®æ¹") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = Boolean.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE) | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> update(@RequestBody @Valid SoilDto dto, BindingResult bindingResult){ | 
|---|
|  |  |  | if(bindingResult != null && bindingResult.hasErrors()){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | PrStSoil po = dto.toPo() ; | 
|---|
|  |  |  | if(po.id == null){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ æ°æ®å®ä½ID") ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.update(po); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("ä¿å墿
ç«å¼å¸¸", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ°æ®åºåå¨å¤±è´¥") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å é¤å¢æ
ç« | 
|---|
|  |  |  | * @param id å¢æ
ç«ID | 
|---|
|  |  |  | * @return æ¯å¦æå | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "å é¤å¢æ
ç«", description = "æäº¤å¢æ
ç«IDï¼è¿è¡é»è¾å é¤") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = Boolean.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "delete") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> delete(Long id){ | 
|---|
|  |  |  | if(id == null){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("idä¸è½ä¸ºç©º") ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.delete(id); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("ä¿å墿
ç«å¼å¸¸", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ°æ®åºåå¨å¤±è´¥") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrProject.mqtt.soil; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoPr.PrStSoil; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import jakarta.validation.constraints.NotEmpty; | 
|---|
|  |  |  | import jakarta.validation.constraints.NotNull; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | * @Date: 2025/6/18 14:52 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @Schema(name = "墿
ç«") | 
|---|
|  |  |  | public class SoilDto { | 
|---|
|  |  |  | public static final long serialVersionUID = 202506191032001L; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¸»é® | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public String id; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¢æ
ç«åç§° | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @NotEmpty(message = "墿
ç«åç§°ä¸è½ä¸ºç©º") //ä¸è½ä¸ºç©ºä¹ä¸è½ä¸ºnull | 
|---|
|  |  |  | public String name; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¢æ
ç«ç¼å· | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @NotNull(message = "墿
ç«ç¼å·ä¸è½ä¸ºç©º") //ä¸è½ä¸ºç©ºä¹ä¸è½ä¸ºnull | 
|---|
|  |  |  | public Integer no; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ç»åº¦ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Double lng; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * çº¬åº¦ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Double lat; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¤æ³¨ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public String remark; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public PrStSoil toNewPo(){ | 
|---|
|  |  |  | PrStSoil po = new PrStSoil(); | 
|---|
|  |  |  | po.name = this.name; | 
|---|
|  |  |  | po.no = this.no; | 
|---|
|  |  |  | po.lng = this.lng; | 
|---|
|  |  |  | po.lat = this.lat; | 
|---|
|  |  |  | po.remark = this.remark; | 
|---|
|  |  |  | return po; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public PrStSoil toPo(){ | 
|---|
|  |  |  | PrStSoil po = this.toNewPo(); | 
|---|
|  |  |  | po.id = Long.parseLong(this.id) ; | 
|---|
|  |  |  | return po; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrProject.mqtt.soil; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoPr.PrStSoilMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoPr.PrStSoil; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voPr.VoMqttSimple; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¾å°ä¸ä¸ªå®ä½ | 
|---|
|  |  |  | * @param id å®ä½ID | 
|---|
|  |  |  | * @return å®ä½ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public PrStSoil selectById(Long id){ | 
|---|
|  |  |  | return this.dao.selectById(id) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿åï¼æ·»å ï¼è§é¢çæ§ç¹ | 
|---|
|  |  |  | * @param po | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | Integer save(PrStSoil po) { | 
|---|
|  |  |  | return dao.insert(po); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿®æ¹å®ä½ | 
|---|
|  |  |  | * @param po å®ä½ | 
|---|
|  |  |  | * @return æ°é | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public int update(PrStSoil po) { | 
|---|
|  |  |  | return this.dao.updateByPrimaryKeySelective(po); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿åä¿®æ¹å®ä½ | 
|---|
|  |  |  | * @param id å®ä½ID | 
|---|
|  |  |  | * @return å½±åè®°å½æ°é | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public int delete(Long id){ | 
|---|
|  |  |  | return this.dao.deleteLogicById(id) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrProject.mqtt.weather; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.pipIrrGlobal.pojoPr.PrStWeather; | 
|---|
|  |  |  | 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 jakarta.validation.Valid; | 
|---|
|  |  |  | import lombok.RequiredArgsConstructor; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.http.MediaType; | 
|---|
|  |  |  | import org.springframework.validation.BindingResult; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | * @Date: 2025/6/19 10:41 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @Tag(name = "æ°è±¡ç«ç®¡ç", description = "æ°è±¡ç«ç®¡ç") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping(path = "weatherStation") | 
|---|
|  |  |  | @RequiredArgsConstructor | 
|---|
|  |  |  | public class WeatherCtrl { | 
|---|
|  |  |  | private WeatherSv sv; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private void setSv(WeatherSv sv){ | 
|---|
|  |  |  | this.sv = sv ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¾å°ä¸å¥æ°è±¡ç«æ°æ® | 
|---|
|  |  |  | * @return ä¸å¥æ°è±¡ç«æ°æ® | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "ä¸å¥æ°è±¡ç«", description = "å¾å°ä¸å¥æ°è±¡ç«æ°æ®") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "è¿åä¸å¥æ°è±¡ç«æ°æ®ï¼BaseResponse.content:{}ï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = PrStWeather.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "one") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<PrStWeather> one(Long id){ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(this.sv.selectById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿åæ°è±¡ç« | 
|---|
|  |  |  | * @param dto ä¿åæ°è±¡ç«form表å对象 | 
|---|
|  |  |  | * @return æ¯å¦æå | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "ä¿åæ°è±¡ç«", description = "æäº¤æ°è±¡ç«æ°æ®ï¼form表åï¼ï¼è¿è¡ä¿å") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = Boolean.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE) | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> save(@RequestBody @Valid WeatherDto dto, BindingResult bindingResult){ | 
|---|
|  |  |  | if(bindingResult != null && bindingResult.hasErrors()){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | PrStWeather po = dto.toNewPo() ; | 
|---|
|  |  |  | po.deleted = 0 ; | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.save(po); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("ä¿åæ°è±¡ç«å¼å¸¸", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ°æ®åºåå¨å¤±è´¥") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ç¼è¾ä¿®æ¹æ°è±¡ç« | 
|---|
|  |  |  | * @param dto ä¿åæ°è±¡ç«form表å对象 | 
|---|
|  |  |  | * @return æ¯å¦æå | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "ç¼è¾ä¿®æ¹æ°è±¡ç«", description = "æäº¤æ°è±¡ç«æ°æ®ï¼form表åï¼ï¼è¿è¡ä¿®æ¹") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = Boolean.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE) | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> update(@RequestBody @Valid WeatherDto dto, BindingResult bindingResult){ | 
|---|
|  |  |  | if(bindingResult != null && bindingResult.hasErrors()){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | PrStWeather po = dto.toPo() ; | 
|---|
|  |  |  | if(po.id == null){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ æ°æ®å®ä½ID") ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.update(po); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("ä¿åæ°è±¡ç«å¼å¸¸", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ°æ®åºåå¨å¤±è´¥") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å é¤æ°è±¡ç« | 
|---|
|  |  |  | * @param id æ°è±¡ç«ID | 
|---|
|  |  |  | * @return æ¯å¦æå | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "å é¤æ°è±¡ç«", description = "æäº¤æ°è±¡ç«IDï¼è¿è¡é»è¾å é¤") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = Boolean.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "delete") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Boolean> delete(Long id){ | 
|---|
|  |  |  | if(id == null){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("idä¸è½ä¸ºç©º") ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | int count; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | count = this.sv.delete(id); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("ä¿åæ°è±¡ç«å¼å¸¸", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(count <= 0){ | 
|---|
|  |  |  | return BaseResponseUtils.buildFail("æ°æ®åºåå¨å¤±è´¥") ; | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(true) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrProject.mqtt.weather; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoPr.PrStWeather; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.media.Schema; | 
|---|
|  |  |  | import jakarta.validation.constraints.NotEmpty; | 
|---|
|  |  |  | import jakarta.validation.constraints.NotNull; | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | * @Date: 2025/6/18 14:52 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | @Schema(name = "æ°è±¡ç«") | 
|---|
|  |  |  | public class WeatherDto { | 
|---|
|  |  |  | public static final long serialVersionUID = 202506191038001L; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¸»é® | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public String id; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * æ°è±¡ç«åç§° | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @NotEmpty(message = "æ°è±¡ç«åç§°ä¸è½ä¸ºç©º") //ä¸è½ä¸ºç©ºä¹ä¸è½ä¸ºnull | 
|---|
|  |  |  | public String name; | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * æ°è±¡ç«ç¼å· | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @NotNull(message = "æ°è±¡ç«ç¼å·ä¸è½ä¸ºç©º") //ä¸è½ä¸ºç©ºä¹ä¸è½ä¸ºnull | 
|---|
|  |  |  | public Integer no; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ç»åº¦ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Double lng; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * çº¬åº¦ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Double lat; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¤æ³¨ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public String remark; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public PrStWeather toNewPo(){ | 
|---|
|  |  |  | PrStWeather po = new PrStWeather(); | 
|---|
|  |  |  | po.name = this.name; | 
|---|
|  |  |  | po.no = this.no; | 
|---|
|  |  |  | po.lng = this.lng; | 
|---|
|  |  |  | po.lat = this.lat; | 
|---|
|  |  |  | po.remark = this.remark; | 
|---|
|  |  |  | return po; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public PrStWeather toPo(){ | 
|---|
|  |  |  | PrStWeather po = this.toNewPo(); | 
|---|
|  |  |  | po.id = Long.parseLong(this.id) ; | 
|---|
|  |  |  | return po; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrProject.mqtt.weather; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoPr.PrStWeatherMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoPr.PrStWeather; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voPr.VoMqttSimple; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | import org.springframework.transaction.annotation.Transactional; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * å¾å°ä¸ä¸ªå®ä½ | 
|---|
|  |  |  | * @param id å®ä½ID | 
|---|
|  |  |  | * @return å®ä½ | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public PrStWeather selectById(Long id){ | 
|---|
|  |  |  | return this.dao.selectById(id) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿åï¼æ·»å ï¼è§é¢çæ§ç¹ | 
|---|
|  |  |  | * @param po | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | Integer save(PrStWeather po) { | 
|---|
|  |  |  | return dao.insert(po); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿®æ¹å®ä½ | 
|---|
|  |  |  | * @param po å®ä½ | 
|---|
|  |  |  | * @return æ°é | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public int update(PrStWeather po) { | 
|---|
|  |  |  | return this.dao.updateByPrimaryKeySelective(po); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * ä¿åä¿®æ¹å®ä½ | 
|---|
|  |  |  | * @param id å®ä½ID | 
|---|
|  |  |  | * @return å½±åè®°å½æ°é | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public int delete(Long id){ | 
|---|
|  |  |  | return this.dao.deleteLogicById(id) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | åºäºMQTTåè®®çæ°´è¥æºãæ°è±¡ã墿
ç« | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrRemote.monitor.mqttSd1.fault; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | * @Date: 2025/6/16 17:36 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public class CdParam { | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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("mqttSd1FaultStartCtrl") | 
|---|
|  |  |  | @RequestMapping(path = "mqttSd1/faultStartCtrl") | 
|---|
|  |  |  | @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; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrRemote.monitor.mqttSd1.fault; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @Author: liurunyu | 
|---|
|  |  |  | * @Date: 2025/6/16 17:35 | 
|---|
|  |  |  | * @Description | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public class CdStopCtrl { | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | 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 { | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | voTermRecharge.setProjectNo(projectNo); | 
|---|
|  |  |  | voTermRecharge.setCardNum(po.getCardNum()); | 
|---|
|  |  |  | voTermRecharge.setOrderNo(orderNo); | 
|---|
|  |  |  | voTermRecharge.setBalance(afterRecharge); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | map.put("success", true); | 
|---|
|  |  |  | map.put("msg", "æä½æå"); | 
|---|