pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeBase.java
New file @@ -0,0 +1,47 @@ package com.dy.pipIrrGlobal.VoAllRound; import com.alibaba.fastjson2.annotation.JSONField; import com.alibaba.fastjson2.writer.ObjectWriterImplToString; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import lombok.Data; /** * @Author: liurunyu * @Date: 2025/1/14 16:01 * @Description */ @Data @JsonPropertyOrder({"id", "num", "lng","lat", "blockName", "rtuAddr"}) public class VoArIntakeBase { private static final long serialVersionUID = 202501141601001L; @JSONField(serializeUsing= ObjectWriterImplToString.class) public Long id; /** * ç¼å· */ public String num; /** * ç»åº¦ */ public Double lng; /** * 纬度 */ public Double lat; /** * çåº */ public String blockName; /** * æ§å¶å¨å°å */ public String rtuAddr ; } pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/VoAllRound/VoArIntakeRemote.java
New file @@ -0,0 +1,49 @@ package com.dy.pipIrrGlobal.VoAllRound; import com.alibaba.fastjson2.annotation.JSONField; import com.alibaba.fastjson2.writer.ObjectWriterImplToString; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import lombok.Data; import java.util.Date; /** * @Author: liurunyu * @Date: 2025/1/14 17:03 * @Description */ @Data @JsonPropertyOrder({"id", "onLine", "alarm", "alarmDt", "lastOpenDt", "lastCloseDt"}) public class VoArIntakeRemote { private static final long serialVersionUID = 202501141703001L; @JSONField(serializeUsing= ObjectWriterImplToString.class) public Long id; /** * å¨çº¿æ åµ, trueå¨çº¿ï¼false离线ï¼nullæªç¥ */ public Boolean onLine ; /** * ææ°æ¥è¦ä¿¡æ¯ */ public String alarm ; /** * ææ°æ¥è¦æ¶é´ */ public Date alarmDt ; /** * æåå¼éæ¶é´ */ public Date lastOpenDt ; /** * æåå ³éæ¶é´ */ public Date lastCloseDt ; } pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoAllRound/Ar4BaseMapper.java
New file @@ -0,0 +1,31 @@ package com.dy.pipIrrGlobal.daoAllRound; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.dy.pipIrrGlobal.VoAllRound.VoArIntakeBase; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; /** * @Author: liurunyu * @Date: 2025/1/14 16:45 * @Description */ @Mapper public interface Ar4BaseMapper extends BaseMapper<Object> { /** * æ¥è¯¢åæ°´å£åºæ¬ä¿¡æ¯ * @param intakeId * @return */ List<VoArIntakeBase> intakeInfo(@Param("intakeId") Long intakeId) ; /** * æ¥è¯¢åæ°´å£å ³èçRTUå°å * @param intakeId * @return */ List<String> intakeRtuAddr(@Param("intakeId") Long intakeId) ; } pipIrr-platform/pipIrr-global/src/main/resources/mapper/Ar4BaseMapper.xml
New file @@ -0,0 +1,26 @@ <?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.daoAllRound.Ar4BaseMapper"> <select id="intakeInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeBase"> select itb.id as id, itb.name as num, itb.lng as lng, itb.lat as lat, bb.name as blockName, pc.rtuAddr as rtuAddr from pr_intake itb LEFT JOIN ba_block bb on itb.blockId = bb.id LEFT JOIN pr_controller pc on itb.id = pc.intakeId where id = #{intakeId,jdbcType=BIGINT} </select> <select id="intakeRtuAddr" resultType="java.lang.String"> select rtuAddr from pr_controller where intakeId = #{intakeId,jdbcType=BIGINT} </select> </mapper> pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/PipIrrBaseApplication.java
@@ -18,9 +18,14 @@ }) } ) @MapperScan(basePackages={"com.dy.pipIrrGlobal.daoBa","com.dy.pipIrrGlobal.daoSe","com.dy.pipIrrGlobal.daoRm", "com.dy.pipIrrGlobal.daoPr","com.dy.pipIrrGlobal.daoFi","com.dy.pipIrrGlobal.daoOp" }) @MapperScan(basePackages={"com.dy.pipIrrGlobal.daoBa", "com.dy.pipIrrGlobal.daoSe", "com.dy.pipIrrGlobal.daoRm", "com.dy.pipIrrGlobal.daoPr", "com.dy.pipIrrGlobal.daoFi", "com.dy.pipIrrGlobal.daoOp", "com.dy.pipIrrGlobal.daoAllRound" }) public class PipIrrBaseApplication { public static void main(String[] args) { pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/allRound/Ar4BaseCtrl.java
New file @@ -0,0 +1,64 @@ package com.dy.pipIrrBase.allRound; import com.dy.common.aop.SsoAop; import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; import com.dy.common.webUtil.QueryResultVo; import com.dy.common.webUtil.ResultCodeMsg; import com.dy.pipIrrGlobal.VoAllRound.VoArIntakeBase; 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.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/1/14 15:56 * @Description æå ³åºç¡ä¿¡æ¯ç综å */ @Slf4j @Tag(name = "æå ³åºç¡ä¿¡æ¯ç综å", description = "æå ³åºç¡ä¿¡æ¯ç综å") @RestController @RequestMapping(path = "ar4Base") @SuppressWarnings("unchecked")//javaçæ¬è¶é«ï¼å¯¹æ³å约æè¶ä¸¥ï¼æä»¥é ç½®SuppressWarnings("unchecked") public class Ar4BaseCtrl { private Ar4BaseSv sv; @Autowired private void setSv(Ar4BaseSv sv) { this.sv = sv; } /** * 综åä¿¡æ¯ * åæ°´å£åºæ¬ä¿¡æ¯ * @return ææçåºæ°æ® */ @Operation(summary = "综åä¿¡æ¯", description = "åæ°´å£åºæ¬ä¿¡æ¯") @ApiResponses(value = { @ApiResponse( responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, description = "åæ°´å£åºæ¬ä¿¡æ¯ï¼BaseResponse.content:QueryResultVo{}ï¼", content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = VoArIntakeBase.class))} ) }) @GetMapping(path = "intakeInfo") @SsoAop() public BaseResponse<QueryResultVo<VoArIntakeBase>> intakeInfo(Long intakeId) { if (intakeId == null || intakeId.longValue() == 0L) { return BaseResponseUtils.buildException("åæ°´å£idä¸è½ä¸ºç©º"); } QueryResultVo<VoArIntakeBase> res = this.sv.intakeInfo(intakeId); return BaseResponseUtils.buildSuccess(res); } } pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/allRound/Ar4BaseSv.java
New file @@ -0,0 +1,40 @@ package com.dy.pipIrrBase.allRound; import com.dy.common.webUtil.QueryResultVo; import com.dy.pipIrrGlobal.VoAllRound.VoArIntakeBase; import com.dy.pipIrrGlobal.daoAllRound.Ar4BaseMapper; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * @Author: liurunyu * @Date: 2025/1/14 15:57 * @Description */ @Slf4j @Service public class Ar4BaseSv { private Ar4BaseMapper dao ; @Autowired private void setDao(Ar4BaseMapper dao){ this.dao = dao; } /** * åæ°´å£åºæ¬ä¿¡æ¯ * @return åæ°´å£åºæ¬ä¿¡æ¯ */ public QueryResultVo<VoArIntakeBase> intakeInfo(Long intakeId){ QueryResultVo<VoArIntakeBase> rsVo = new QueryResultVo<>() ; List<VoArIntakeBase> list = this.dao.intakeInfo(intakeId); if(list != null && list.size() > 0){ rsVo.obj = list.get(0) ; } return rsVo ; } } pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/allRound/˵Ã÷.txt
New file @@ -0,0 +1 @@ allRound代表综å