New file |
| | |
| | | package com.dy.pipIrrGlobal.VoAllRound; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | | * @Date: 2025/2/5 10:14 |
| | | * @Description |
| | | */ |
| | | @Data |
| | | @JsonPropertyOrder({ "intakeId", "amount", "amount", "money", "times" }) |
| | | public class VoArIntakeAmountDay { |
| | | public static final long serialVersionUID = 202502051005003L; |
| | | |
| | | /** |
| | | * åæ°´å£ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeId; |
| | | |
| | | /** |
| | | * æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date dt ; |
| | | |
| | | /** |
| | | * ç¨æ°´é |
| | | */ |
| | | public Double amount ; |
| | | |
| | | /** |
| | | * ç¨æ°´æ¶è´¹éé¢ |
| | | */ |
| | | public Double money ; |
| | | |
| | | /** |
| | | * ç¨æ°´æ¬¡æ° |
| | | */ |
| | | public Integer times ; |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.VoAllRound; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | | * @Date: 2025/2/5 10:14 |
| | | * @Description |
| | | */ |
| | | @Data |
| | | @JsonPropertyOrder({ "intakeId", "amount", "amount"}) |
| | | public class VoArIntakeAmountMonth { |
| | | public static final long serialVersionUID = 202502051005004L; |
| | | |
| | | /** |
| | | * åæ°´å£ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeId; |
| | | |
| | | /** |
| | | * æ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date dt ; |
| | | |
| | | /** |
| | | * ç¨æ°´é |
| | | */ |
| | | public Double amount ; |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.VoAllRound; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | | * @Date: 2025/2/5 9:59 |
| | | * @Description |
| | | */ |
| | | @Data |
| | | @JsonPropertyOrder({ "intakeId", "dt", "loss" }) |
| | | public class VoArIntakeLossDay { |
| | | public static final long serialVersionUID = 202502051001001L; |
| | | |
| | | /** |
| | | * åæ°´å£ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeId; |
| | | |
| | | /** |
| | | * æ¥ææ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date dt ; |
| | | |
| | | /** |
| | | * æ¥æ¼æé |
| | | */ |
| | | public Double loss ; |
| | | |
| | | } |
New file |
| | |
| | | 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/2/5 10:04 |
| | | * @Description |
| | | */ |
| | | @Data |
| | | @JsonPropertyOrder({ "intakeId", "dt", "loss" }) |
| | | public class VoArIntakeLossMonth { |
| | | public static final long serialVersionUID = 202502051005001L; |
| | | |
| | | /** |
| | | * åæ°´å£ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeId; |
| | | |
| | | /** |
| | | * æä»½ï¼æ ¼å¼ï¼ yyyy-mmï¼ |
| | | */ |
| | | public String dt ; |
| | | |
| | | /** |
| | | * æ¥æ¼æé |
| | | */ |
| | | public Double loss ; |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.VoAllRound; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | | * @Date: 2025/2/5 9:36 |
| | | * @Description |
| | | */ |
| | | @Data |
| | | @JsonPropertyOrder({ "intakeId", "clientId", |
| | | "clientName", "clientAddr", |
| | | "openTime" , "openType" , |
| | | "openIcNum" , "openRemainMoney" , |
| | | "closeTime" , "closeType" , |
| | | "closeIcNum" , "closeRemainMoney" , |
| | | "thisTime" , "thisAmount" , |
| | | "thisMoney" }) |
| | | public class VoArIntakeOpenCloseValve { |
| | | public static final long serialVersionUID = 202502050936001L; |
| | | |
| | | /** |
| | | * åæ°´å£ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeId; |
| | | |
| | | /** |
| | | * å¼å
³éåæ·ID |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long clientId; |
| | | |
| | | /** |
| | | * å¼å
³éåæ· |
| | | */ |
| | | public String clientName; |
| | | |
| | | /** |
| | | * åæ·å°å |
| | | */ |
| | | public String clientAddr; |
| | | |
| | | |
| | | /** |
| | | * å¼éæ¥ææ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date openTime ; |
| | | |
| | | /** |
| | | * å¼éç±»å |
| | | */ |
| | | @JSONField(serialize=false) |
| | | public Byte opType; |
| | | public String openType; |
| | | |
| | | /** |
| | | * å¼éICå¡ç¼å· |
| | | */ |
| | | public String openIcNum; |
| | | |
| | | /** |
| | | * å¼éæ¶å¡å
å©ä½éé¢ |
| | | */ |
| | | public Double openRemainMoney; |
| | | |
| | | |
| | | /** |
| | | * å
³éæ¥ææ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date closeTime ; |
| | | |
| | | /** |
| | | * å
³éç±»å |
| | | */ |
| | | @JSONField(serialize=false) |
| | | public Byte clType; |
| | | public String closeType; |
| | | |
| | | /** |
| | | * å
³éICå¡ç¼å· |
| | | */ |
| | | public String closeIcNum; |
| | | |
| | | /** |
| | | * å
³éæ¶å¡å
å©ä½éé¢ |
| | | */ |
| | | public Double closeRemainMoney; |
| | | |
| | | /** |
| | | * æ¬æ¬¡ç¨æ°´æ¶é¿ï¼åéï¼ |
| | | */ |
| | | public Integer thisTime; |
| | | /** |
| | | * æ¬æ¬¡ç¨æ°´é |
| | | */ |
| | | public Double thisAmount; |
| | | /** |
| | | * æ¬æ¬¡æ¶è´¹éé¢ |
| | | */ |
| | | public Double thisMoney; |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.dy.pipIrrGlobal.voRm.VoLossDay; |
| | | import com.dy.pipIrrGlobal.voRm.VoOpenCloseValve; |
| | | import com.dy.pipIrrGlobal.voSt.VoDayIntakeAmount; |
| | | import com.dy.pipIrrGlobal.voSt.VoDayLoss; |
| | | import com.dy.pipIrrGlobal.voSt.VoMonthAmount; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonPropertyOrder; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | |
| | | * @Description |
| | | */ |
| | | @Data |
| | | @JsonPropertyOrder({"id", "onLine", "alarm", "alarmDt", "lastOpenDt", "lastCloseDt"}) |
| | | @JsonPropertyOrder({"id", "onLine", "alarm", "alarmDt", "lastOpenDt", "lastCloseDt", "lossAmount", "lossDt"}) |
| | | public class VoArIntakeRemote { |
| | | private static final long serialVersionUID = 202501141703001L; |
| | | |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date lastCloseDt ; |
| | | |
| | | /** |
| | | * æåç»è®¡æ¼æé |
| | | */ |
| | | public Double lossAmount ; |
| | | |
| | | /** |
| | | * æåç»è®¡æ¼ææ¥æ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | public Date lossDt ; |
| | | |
| | | /** |
| | | * å¼å
³éè®°å½ |
| | | */ |
| | | public List<VoOpenCloseValve> openCloseRecords ; |
| | | |
| | | /** |
| | | * æ¥æ¼æè®°å½ |
| | | */ |
| | | public List<VoDayLoss> lossDayRecords ; |
| | | |
| | | /** |
| | | * ææ¼æè®°å½ |
| | | */ |
| | | public List<VoMonthAmount> lossMonthRecords ; |
| | | |
| | | /** |
| | | * æ¥ç¨æ°´ç»è®¡è®°å½ |
| | | */ |
| | | public List<VoDayIntakeAmount> amountDayRecords ; |
| | | |
| | | /** |
| | | * æç¨æ°´ç»è®¡è®°å½ |
| | | */ |
| | | public List<VoMonthAmount> amountMonthRecords ; |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | | * @Date: 2025/1/14 16:45 |
| | | * @Date: 2025/1/22 09:45 |
| | | * @Description |
| | | */ |
| | | @Mapper |
| | |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | | List<VoArIntakeRemote> alarmInfo(@Param("intakeId") Long intakeId) ; |
| | | List<VoArIntakeRemote> alarmLastInfo(@Param("intakeId") Long intakeId) ; |
| | | |
| | | /** |
| | | * æ¥è¯¢åæ°´å£ææ°å¼å
³éä¿¡æ¯ |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | | List<VoArIntakeRemote> openCloseValveInfo(@Param("intakeId") Long intakeId) ; |
| | | List<VoArIntakeRemote> openCloseValveLastInfo(@Param("intakeId") Long intakeId) ; |
| | | |
| | | /** |
| | | * æ¥è¯¢åæ°´å£ææ°æ¼æä¿¡æ¯ |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | | List<VoArIntakeRemote> lossLastInfo(@Param("intakeId") Long intakeId) ; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoAllRound; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.VoAllRound.*; |
| | | import io.swagger.v3.oas.models.security.SecurityScheme; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | | * @Date: 2025/1/22 14:45 |
| | | * @Description |
| | | */ |
| | | @Mapper |
| | | public interface Ar4StatisticsMapper extends BaseMapper<Object> { |
| | | |
| | | /** |
| | | * å¼å
³éè®°å½ |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | | List<VoArIntakeOpenCloseValve> openCloseRecords(@Param("intakeId") Long intakeId, @Param("start") Integer start, @Param("count") Integer count) ; |
| | | |
| | | /** |
| | | * æ¥æ¼æè®°å½ |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | | List<VoArIntakeLossDay> lossDayRecords(@Param("intakeId") Long intakeId, @Param("start") Integer start, @Param("count") Integer count) ; |
| | | |
| | | /** |
| | | * ææ¼æè®°å½ |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | | List<VoArIntakeLossMonth> lossMonthRecords(@Param("intakeId") Long intakeId, @Param("start") Integer start, @Param("count") Integer count) ; |
| | | |
| | | /** |
| | | * æ¥ç¨æ°´ç»è®¡è®°å½ |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | | List<VoArIntakeAmountDay> amountDayRecords(@Param("intakeId") Long intakeId, @Param("start") Integer start, @Param("count") Integer count) ; |
| | | |
| | | /** |
| | | * æç¨æ°´ç»è®¡è®°å½ |
| | | * @param intakeId |
| | | * @return |
| | | */ |
| | | List<VoArIntakeAmountMonth> amountMonthRecords(@Param("intakeId") Long intakeId, @Param("start") Integer start, @Param("count") Integer count) ; |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | public Double intakeLat; |
| | | |
| | | /** |
| | | * 年度 |
| | | */ |
| | | public Integer year ; |
| | | |
| | | /** |
| | | * æä»½ |
| | | */ |
| | | public Integer month ; |
| | | |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | public Double amount1; |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | |
| | | */ |
| | | public Double intakeLat; |
| | | |
| | | /** |
| | | * 年度 |
| | | */ |
| | | public Integer year ; |
| | | |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | public Double month1; |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoAllRound.Ar4RemoteMapper"> |
| | | |
| | | <select id="alarmInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote"> |
| | | <select id="alarmLastInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote"> |
| | | select |
| | | CONCAT( |
| | | IF(alarm_loss = 1, 'æ¼ææ¥è¦ï¼', ''), |
| | |
| | | where intake_id = #{intakeId,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="openCloseValveInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote"> |
| | | <select id="openCloseValveLastInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote"> |
| | | select |
| | | op_dt AS lastOpenDt, |
| | | cl_dt AS lastCloseDt |
| | |
| | | where intake_id = #{intakeId,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="lossLastInfo" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote"> |
| | | select |
| | | dt AS lossDt, |
| | | loss_amount AS lossAmount |
| | | from rm_loss_day_last rldl |
| | | where intake_id = #{intakeId,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | </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.daoAllRound.Ar4StatisticsMapper"> |
| | | |
| | | <select id="openCloseRecords" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeOpenCloseValve"> |
| | | select |
| | | tb.intake_id as intakeId, |
| | | sec.id as clientId, |
| | | sec.name as clientName, |
| | | sec.address as clientAddr, |
| | | tb.op_dt as openTime, |
| | | tb.op_type as opType, |
| | | tb.op_ic_card_no as openIcNum, |
| | | tb.op_remain_money as openRemainMoney, |
| | | tb.cl_dt as closeTime, |
| | | tb.cl_type as clType, |
| | | tb.cl_ic_card_no as closeIcNum, |
| | | tb.cl_remain_money as closeRemainMoney, |
| | | tb.cl_this_time as thisTime, |
| | | tb.cl_this_amount as thisAmount, |
| | | tb.cl_this_money as thisMoney |
| | | from rm_open_close_valve_history tb |
| | | left join se_client sec on tb.client_id = sec.id |
| | | where tb.intake_id = #{intakeId, jdbcType=BIGINT} |
| | | ORDER BY tb.id DESC |
| | | <trim prefix="limit "> |
| | | <if test="start != null and count != null"> |
| | | #{start, javaType=Integer, jdbcType=INTEGER}, #{count, javaType=Integer, jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | |
| | | <select id="lossDayRecords" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeLossDay"> |
| | | select |
| | | tb.intake_id as intakeId, |
| | | tb.dt AS dt, |
| | | tb.loss_amount AS loss |
| | | from rm_loss_day tb |
| | | where intake_id = #{intakeId, jdbcType=BIGINT} |
| | | ORDER BY tb.id DESC |
| | | <trim prefix="limit "> |
| | | <if test="start != null and count != null"> |
| | | #{start, javaType=Integer, jdbcType=INTEGER}, #{count, javaType=Integer, jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | |
| | | <select id="lossMonthRecords" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeLossMonth"> |
| | | select |
| | | tb.intake_id as intakeId, |
| | | CONCAT(tb.year, '-', tb.month) AS dt, |
| | | tb.amount AS loss |
| | | from st_loss_month tb |
| | | where intake_id = #{intakeId, jdbcType=BIGINT} |
| | | ORDER BY tb.id DESC |
| | | <trim prefix="limit "> |
| | | <if test="start != null and count != null"> |
| | | #{start, javaType=Integer, jdbcType=INTEGER}, #{count, javaType=Integer, jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="amountDayRecords" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeAmountDay"> |
| | | select |
| | | tb.intake_id as intakeId, |
| | | tb.dt AS dt, |
| | | tb.amount AS amount, |
| | | tb.money AS money, |
| | | tb.times AS times |
| | | from rm_intake_amount_day tb |
| | | where intake_id = #{intakeId, jdbcType=BIGINT} |
| | | ORDER BY tb.id DESC |
| | | <trim prefix="limit "> |
| | | <if test="start != null and count != null"> |
| | | #{start, javaType=Integer, jdbcType=INTEGER}, #{count, javaType=Integer, jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | |
| | | <select id="amountMonthRecords" resultType="com.dy.pipIrrGlobal.VoAllRound.VoArIntakeAmountMonth"> |
| | | select |
| | | tb.intake_id as intakeId, |
| | | CONCAT(tb.year, '-', tb.month) AS dt, |
| | | tb.amount AS amount |
| | | from st_intake_amount_month tb |
| | | where intake_id = #{intakeId, jdbcType=BIGINT} |
| | | ORDER BY tb.id DESC |
| | | <trim prefix="limit "> |
| | | <if test="start != null and count != null"> |
| | | #{start, javaType=Integer, jdbcType=INTEGER}, #{count, javaType=Integer, jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | 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.VoArIntakeRemote; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | |
| | | * @Description |
| | | */ |
| | | @Slf4j |
| | | @Tag(name = "æå
³è¿ç¨æä½ä¿¡æ¯ç综å", description = "æå
³è¿ç¨æä½ä¿¡æ¯ç综å") |
| | | @Tag(name = "åæ°´å£ç»¼åä¿¡æ¯ä¹ç¸å
³çæµæ°æ®", description = "åæ°´å£ç»¼åä¿¡æ¯ä¹ç¸å
³çæµæ°æ®") |
| | | @RestController |
| | | @RequestMapping(path = "ar4Remote") |
| | | @SuppressWarnings("unchecked")//javaçæ¬è¶é«ï¼å¯¹æ³å约æè¶ä¸¥ï¼æä»¥é
ç½®SuppressWarnings("unchecked") |
| | |
| | | |
| | | /** |
| | | * 综åä¿¡æ¯ |
| | | * åæ°´å£åºæ¬ä¿¡æ¯ |
| | | * @return ææçåºæ°æ® |
| | | * åæ°´å£çæµæ°æ® |
| | | * @return |
| | | */ |
| | | @Operation(summary = "综åä¿¡æ¯", description = "åæ°´å£åºæ¬ä¿¡æ¯") |
| | | @Operation(summary = "综åä¿¡æ¯", description = "åæ°´å£çæµæ°æ®") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "åæ°´å£åºæ¬ä¿¡æ¯ï¼BaseResponse.content:QueryResultVo{}ï¼", |
| | | description = "åæ°´å£çæµæ°æ®ï¼BaseResponse.content:VoArIntakeRemote{}ï¼", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = VoArIntakeRemote.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "intakeInfo") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<VoArIntakeRemote>> intakeInfo(Long intakeId) { |
| | | public BaseResponse<VoArIntakeRemote> intakeInfo(Long intakeId) { |
| | | if (intakeId == null || intakeId.longValue() == 0L) { |
| | | return BaseResponseUtils.buildException("åæ°´å£idä¸è½ä¸ºç©º"); |
| | | } |
| | | QueryResultVo<VoArIntakeRemote> res = this.sv.intakeInfo(intakeId); |
| | | VoArIntakeRemote res = this.sv.intakeInfo(intakeId); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } |
| | | } |
| | |
| | | import com.dy.pipIrrGlobal.VoAllRound.VoArIntakeRemote; |
| | | import com.dy.pipIrrGlobal.daoAllRound.Ar4BaseMapper; |
| | | import com.dy.pipIrrGlobal.daoAllRound.Ar4RemoteMapper; |
| | | import com.dy.pipIrrGlobal.daoAllRound.Ar4StatisticsMapper; |
| | | import com.dy.pipIrrGlobal.rtuMw.CodeLocal; |
| | | import com.dy.pipIrrGlobal.rtuMw.Web2RtuMw; |
| | | import com.dy.pipIrrGlobal.voPr.VoOnLineIntake; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.env.Environment; |
| | |
| | | * åæ°´å£åºæ¬ä¿¡æ¯ |
| | | * @return åæ°´å£åºæ¬ä¿¡æ¯ |
| | | */ |
| | | public QueryResultVo<VoArIntakeRemote> intakeInfo(Long intakeId){ |
| | | public VoArIntakeRemote intakeInfo(Long intakeId){ |
| | | VoArIntakeRemote rVo = new VoArIntakeRemote() ; |
| | | String rtuAddr = this.getRtuAddr(intakeId); |
| | | this.getRtuOnLine(intakeId, rtuAddr, rVo); |
| | | this.getAlarmInfo(intakeId, rtuAddr, rVo); |
| | | this.getOpenCloseValveInfo(intakeId, rtuAddr, rVo); |
| | | return null ; |
| | | this.getAlarmLastInfo(intakeId, rtuAddr, rVo); |
| | | this.getOpenCloseValveLastInfo(intakeId, rtuAddr, rVo); |
| | | this.getLossAmountLastInfo(intakeId, rtuAddr, rVo); |
| | | return rVo ; |
| | | } |
| | | |
| | | /** |
| | |
| | | * å¾å°åæ°´å£ææ°æ¥è¦ä¿¡æ¯ |
| | | * @param intakeId |
| | | */ |
| | | private void getAlarmInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){ |
| | | List<VoArIntakeRemote> list = remoteDao.alarmInfo(intakeId); |
| | | private void getAlarmLastInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){ |
| | | List<VoArIntakeRemote> list = remoteDao.alarmLastInfo(intakeId); |
| | | if(list != null && list.size() > 0){ |
| | | VoArIntakeRemote vo = list.get(0) ; |
| | | rVo.alarm = vo.alarm ; |
| | |
| | | * å¾å°åæ°´å£ææ°å¼å
³éä¿¡æ¯ |
| | | * @param intakeId |
| | | */ |
| | | private void getOpenCloseValveInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){ |
| | | List<VoArIntakeRemote> list = remoteDao.openCloseValveInfo(intakeId); |
| | | private void getOpenCloseValveLastInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){ |
| | | List<VoArIntakeRemote> list = remoteDao.openCloseValveLastInfo(intakeId); |
| | | if(list != null && list.size() > 0){ |
| | | VoArIntakeRemote vo = list.get(0) ; |
| | | rVo.lastOpenDt = vo.lastOpenDt ; |
| | | rVo.lastCloseDt = vo.lastCloseDt ; |
| | | } |
| | | } |
| | | /** |
| | | * å¾å°åæ°´å£ææ°æ¼æä¿¡æ¯ |
| | | * @param intakeId |
| | | */ |
| | | private void getLossAmountLastInfo(Long intakeId, String rtuAddr, VoArIntakeRemote rVo){ |
| | | List<VoArIntakeRemote> list = remoteDao.lossLastInfo(intakeId); |
| | | if(list != null && list.size() > 0){ |
| | | VoArIntakeRemote vo = list.get(0) ; |
| | | rVo.lossDt = vo.lossDt ; |
| | | rVo.lossAmount = vo.lossAmount ; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrStatistics.allRound; |
| | | |
| | | 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.VoAllRound.*; |
| | | 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; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | | * @Date: 2025/2/5 10:46 |
| | | * @Description |
| | | */ |
| | | @Slf4j |
| | | @Tag(name = "åæ°´å£ç»¼åä¿¡æ¯ä¹ç¸å
³ç»è®¡æ°æ®", description = "åæ°´å£ç»¼åä¿¡æ¯ä¹ç¸å
³ç»è®¡æ°æ®") |
| | | @RestController |
| | | @RequestMapping(path = "ar4Statistics") |
| | | @SuppressWarnings("unchecked")//javaçæ¬è¶é«ï¼å¯¹æ³å约æè¶ä¸¥ï¼æä»¥é
ç½®SuppressWarnings("unchecked") |
| | | public class Ar4StatisticsCtrl { |
| | | |
| | | private Ar4StatisticsSv sv; |
| | | |
| | | @Autowired |
| | | private void setSv(Ar4StatisticsSv sv) { |
| | | this.sv = sv; |
| | | } |
| | | |
| | | /** |
| | | * 综åä¿¡æ¯ |
| | | * åæ°´å£å¼å
³éæ°æ® |
| | | * @return |
| | | */ |
| | | @Operation(summary = "综åä¿¡æ¯", description = "åæ°´å£å¼å
³éæ°æ®") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "åæ°´å£å¼å
³éæ°æ®ï¼BaseResponse.content:VoArIntakeOpenCloseValve[{}]ï¼", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = VoArIntakeOpenCloseValve.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "openCloseValveInfo") |
| | | @SsoAop() |
| | | public BaseResponse<List<VoArIntakeOpenCloseValve>> openCloseValveInfo(Long intakeId) { |
| | | if (intakeId == null || intakeId.longValue() == 0L) { |
| | | return BaseResponseUtils.buildException("åæ°´å£idä¸è½ä¸ºç©º"); |
| | | } |
| | | List<VoArIntakeOpenCloseValve> res = this.sv.openCloseValveRecords(intakeId); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 综åä¿¡æ¯ |
| | | * åæ°´å£æ¥æ¼ææ°æ® |
| | | * @return |
| | | */ |
| | | @Operation(summary = "综åä¿¡æ¯", description = "åæ°´å£æ¥æ¼ææ°æ®") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "åæ°´å£æ¥æ¼ææ°æ®ï¼BaseResponse.content:VoArIntakeLossDay[{}]ï¼", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = VoArIntakeLossDay.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "lossDayRecords") |
| | | @SsoAop() |
| | | public BaseResponse<List<VoArIntakeLossDay>> lossDayRecords(Long intakeId) { |
| | | if (intakeId == null || intakeId.longValue() == 0L) { |
| | | return BaseResponseUtils.buildException("åæ°´å£idä¸è½ä¸ºç©º"); |
| | | } |
| | | List<VoArIntakeLossDay> res = this.sv.lossDayRecords(intakeId); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } |
| | | |
| | | /** |
| | | * 综åä¿¡æ¯ |
| | | * åæ°´å£ææ¼ææ°æ® |
| | | * @return |
| | | */ |
| | | @Operation(summary = "综åä¿¡æ¯", description = "åæ°´å£ææ¼ææ°æ®") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "åæ°´å£ææ¼ææ°æ®ï¼BaseResponse.content:VoArIntakeLossMonth[{}]ï¼", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = VoArIntakeLossMonth.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "lossMonthRecords") |
| | | @SsoAop() |
| | | public BaseResponse<List<VoArIntakeLossMonth>> lossMonthRecords(Long intakeId) { |
| | | if (intakeId == null || intakeId.longValue() == 0L) { |
| | | return BaseResponseUtils.buildException("åæ°´å£idä¸è½ä¸ºç©º"); |
| | | } |
| | | List<VoArIntakeLossMonth> res = this.sv.lossMonthRecords(intakeId); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } |
| | | |
| | | /** |
| | | * 综åä¿¡æ¯ |
| | | * åæ°´å£æ¥åæ°´æ°æ® |
| | | * @return |
| | | */ |
| | | @Operation(summary = "综åä¿¡æ¯", description = "åæ°´å£æ¥åæ°´æ°æ®") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "åæ°´å£æ¥åæ°´æ°æ®ï¼BaseResponse.content:VoArIntakeAmountDay[{}]ï¼", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = VoArIntakeAmountDay.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "amountDayRecords") |
| | | @SsoAop() |
| | | public BaseResponse<List<VoArIntakeAmountDay>> amountDayRecords(Long intakeId) { |
| | | if (intakeId == null || intakeId.longValue() == 0L) { |
| | | return BaseResponseUtils.buildException("åæ°´å£idä¸è½ä¸ºç©º"); |
| | | } |
| | | List<VoArIntakeAmountDay> res = this.sv.amountDayRecords(intakeId); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } |
| | | |
| | | /** |
| | | * 综åä¿¡æ¯ |
| | | * åæ°´å£æåæ°´æ°æ® |
| | | * @return |
| | | */ |
| | | @Operation(summary = "综åä¿¡æ¯", description = "åæ°´å£æåæ°´æ°æ®") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "åæ°´å£æåæ°´æ°æ®ï¼BaseResponse.content:VoArIntakeAmountDay[{}]ï¼", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = VoArIntakeAmountMonth.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "amountMonthRecords") |
| | | @SsoAop() |
| | | public BaseResponse<List<VoArIntakeAmountMonth>> amountMonthRecords(Long intakeId) { |
| | | if (intakeId == null || intakeId.longValue() == 0L) { |
| | | return BaseResponseUtils.buildException("åæ°´å£idä¸è½ä¸ºç©º"); |
| | | } |
| | | List<VoArIntakeAmountMonth> res = this.sv.amountMonthRecords(intakeId); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrStatistics.allRound; |
| | | |
| | | import com.dy.common.mw.protocol.p206V1.CommonV1; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.VoAllRound.*; |
| | | import com.dy.pipIrrGlobal.daoAllRound.Ar4StatisticsMapper; |
| | | 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/2/5 10:46 |
| | | * @Description |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class Ar4StatisticsSv { |
| | | |
| | | @Autowired |
| | | private Ar4StatisticsMapper statisticsDao; |
| | | |
| | | //è®°å½æ¡æ° |
| | | private static final int totalRecordsCount = 10 ; |
| | | |
| | | /** |
| | | * å¾å°åæ°´å£å¼å
³éè®°å½ï¼totalRecordsCountæ¡ï¼ |
| | | * @param intakeId |
| | | */ |
| | | public List<VoArIntakeOpenCloseValve> openCloseValveRecords(Long intakeId){ |
| | | List<VoArIntakeOpenCloseValve> list = statisticsDao.openCloseRecords(intakeId, 0, totalRecordsCount); |
| | | if(list != null && list.size() > 0){ |
| | | for (VoArIntakeOpenCloseValve vo : list) { |
| | | if(vo != null){ |
| | | if(vo.opType != null){ |
| | | vo.openType = CommonV1.openCloseValveType(vo.opType); |
| | | } |
| | | if(vo.clType != null){ |
| | | vo.closeType = CommonV1.openCloseValveType(vo.clType); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¾å°åæ°´å£æ¥æ¼æè®°å½ï¼totalRecordsCountæ¡ï¼ |
| | | * @param intakeId |
| | | */ |
| | | public List<VoArIntakeLossDay> lossDayRecords(Long intakeId){ |
| | | return statisticsDao.lossDayRecords(intakeId, 0, totalRecordsCount); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¾å°åæ°´å£ææ¼æè®°å½ï¼totalRecordsCountæ¡ï¼ |
| | | * @param intakeId |
| | | */ |
| | | public List<VoArIntakeLossMonth> lossMonthRecords(Long intakeId){ |
| | | return statisticsDao.lossMonthRecords(intakeId, 0, totalRecordsCount); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¾å°åæ°´å£æ¥ç¨æ°´è®°å½ï¼totalRecordsCountæ¡ï¼ |
| | | * @param intakeId |
| | | */ |
| | | public List<VoArIntakeAmountDay> amountDayRecords(Long intakeId){ |
| | | return statisticsDao.amountDayRecords(intakeId, 0, totalRecordsCount); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å¾å°åæ°´å£æç¨æ°´è®°å½ï¼totalRecordsCountæ¡ï¼ |
| | | * @param intakeId |
| | | */ |
| | | public List<VoArIntakeAmountMonth> amountMonthRecords(Long intakeId){ |
| | | return statisticsDao.amountMonthRecords(intakeId, 0, totalRecordsCount); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | allRound代表综å |