From bf79a6ff857043ea023b3ecd70145754e027116f Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期二, 29 十月 2024 21:12:25 +0800
Subject: [PATCH] 2024-10-29 优化获取未关阀记录接口
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeIssueReportMapper.xml | 172 ++++++++++++++++++++++++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeIssueReport.java | 165 +++++++++++++++++++++++
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeIssueReportMapper.java | 27 +++
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml | 6
4 files changed, 370 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeIssueReportMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeIssueReportMapper.java
new file mode 100644
index 0000000..5d1f9ac
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSe/SeIssueReportMapper.java
@@ -0,0 +1,27 @@
+package com.dy.pipIrrGlobal.daoSe;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoSe.SeIssueReport;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-10-29 16:53
+ * @LastEditTime 2024-10-29 16:53
+ * @Description
+ */
+
+@Mapper
+public interface SeIssueReportMapper extends BaseMapper<SeIssueReport> {
+ int deleteByPrimaryKey(Long id);
+
+ int insert(SeIssueReport record);
+
+ int insertSelective(SeIssueReport record);
+
+ SeIssueReport selectByPrimaryKey(Long id);
+
+ int updateByPrimaryKeySelective(SeIssueReport record);
+
+ int updateByPrimaryKey(SeIssueReport record);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeIssueReport.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeIssueReport.java
new file mode 100644
index 0000000..c542e3c
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSe/SeIssueReport.java
@@ -0,0 +1,165 @@
+package com.dy.pipIrrGlobal.pojoSe;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.*;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @author ZhuBaoMin
+ * @date 2024-10-29 16:53
+ * @LastEditTime 2024-10-29 16:53
+ * @Description 闂涓婃姤瀹炰綋绫�
+ */
+
+@TableName(value="se_virtual_card", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+public class SeIssueReport {
+ /**
+ * 涓婚敭
+ */
+ private Long id;
+
+ /**
+ * 鍙嶉鍐呭
+ */
+ private String content;
+
+ /**
+ * 鐓х墖鍒楄〃
+ */
+ private String images;
+
+ /**
+ * 闊抽鍒楄〃
+ */
+ private String audios;
+
+ /**
+ * 瑙嗛鍒楄〃
+ */
+ private String videos;
+
+ /**
+ * 缁忓害
+ */
+ private BigDecimal lng;
+
+ /**
+ * 绾害
+ */
+ private BigDecimal lat;
+
+ /**
+ * 鍐滄埛ID
+ */
+ private Long clientId;
+
+ /**
+ * 涓婃姤鏃堕棿
+ */
+ private Date reportTime;
+
+ /**
+ * 鑱旂郴鐢佃瘽
+ */
+ private String phone;
+
+ /**
+ * 鐘舵��;1-鏈彈鐞嗭紝2-宸插彈鐞嗭紝3宸插垹闄�
+ */
+ private Byte state;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ public String getImages() {
+ return images;
+ }
+
+ public void setImages(String images) {
+ this.images = images;
+ }
+
+ public String getAudios() {
+ return audios;
+ }
+
+ public void setAudios(String audios) {
+ this.audios = audios;
+ }
+
+ public String getVideos() {
+ return videos;
+ }
+
+ public void setVideos(String videos) {
+ this.videos = videos;
+ }
+
+ public BigDecimal getLng() {
+ return lng;
+ }
+
+ public void setLng(BigDecimal lng) {
+ this.lng = lng;
+ }
+
+ public BigDecimal getLat() {
+ return lat;
+ }
+
+ public void setLat(BigDecimal lat) {
+ this.lat = lat;
+ }
+
+ public Long getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(Long clientId) {
+ this.clientId = clientId;
+ }
+
+ public Date getReportTime() {
+ return reportTime;
+ }
+
+ public void setReportTime(Date reportTime) {
+ this.reportTime = reportTime;
+ }
+
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+
+ public Byte getState() {
+ return state;
+ }
+
+ public void setState(Byte state) {
+ this.state = state;
+ }
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
index 8f00124..2f95192 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandHistoryMapper.xml
@@ -230,6 +230,12 @@
AND com.operator = #{operator}
AND (com.protocol = 'p206V1_0_1' AND (com.command_code = '92' OR com.command_code = '97' OR com.command_code = '99' OR com.command_code = 'A0' OR com.command_code = 'A1' OR com.command_code = 'A2'))
AND (
+ SELECT op_dt FROM rm_open_close_valve_last
+ WHERE rtu_addr = com.rtu_addr AND op_ic_card_no = com.param ->> '$.icCardNo'
+ ORDER BY op_dt DESC
+ LIMIT 1
+ ) IS NOT NULL
+ AND (
SELECT cl_dt FROM rm_open_close_valve_last
WHERE rtu_addr = com.rtu_addr AND op_ic_card_no = com.param ->> '$.icCardNo'
ORDER BY op_dt DESC
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeIssueReportMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeIssueReportMapper.xml
new file mode 100644
index 0000000..fb51563
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeIssueReportMapper.xml
@@ -0,0 +1,172 @@
+<?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.daoSe.SeIssueReportMapper">
+ <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoSe.SeIssueReport">
+ <!--@mbg.generated-->
+ <!--@Table se_issue_report-->
+ <id column="id" jdbcType="BIGINT" property="id" />
+ <result column="content" jdbcType="VARCHAR" property="content" />
+ <result column="images" jdbcType="VARCHAR" property="images" />
+ <result column="audios" jdbcType="VARCHAR" property="audios" />
+ <result column="videos" jdbcType="VARCHAR" property="videos" />
+ <result column="lng" jdbcType="DECIMAL" property="lng" />
+ <result column="lat" jdbcType="DECIMAL" property="lat" />
+ <result column="client_id" jdbcType="BIGINT" property="clientId" />
+ <result column="report_time" jdbcType="TIMESTAMP" property="reportTime" />
+ <result column="phone" jdbcType="VARCHAR" property="phone" />
+ <result column="state" jdbcType="TINYINT" property="state" />
+ </resultMap>
+ <sql id="Base_Column_List">
+ <!--@mbg.generated-->
+ id, content, images, audios, videos, lng, lat, client_id, report_time, phone, `state`
+ </sql>
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+ <!--@mbg.generated-->
+ select
+ <include refid="Base_Column_List" />
+ from se_issue_report
+ where id = #{id,jdbcType=BIGINT}
+ </select>
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+ <!--@mbg.generated-->
+ delete from se_issue_report
+ where id = #{id,jdbcType=BIGINT}
+ </delete>
+ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeIssueReport">
+ <!--@mbg.generated-->
+ insert into se_issue_report (id, content, images,
+ audios, videos, lng,
+ lat, client_id, report_time,
+ phone, `state`)
+ values (#{id,jdbcType=BIGINT}, #{content,jdbcType=VARCHAR}, #{images,jdbcType=VARCHAR},
+ #{audios,jdbcType=VARCHAR}, #{videos,jdbcType=VARCHAR}, #{lng,jdbcType=DECIMAL},
+ #{lat,jdbcType=DECIMAL}, #{clientId,jdbcType=BIGINT}, #{reportTime,jdbcType=TIMESTAMP},
+ #{phone,jdbcType=VARCHAR}, #{state,jdbcType=TINYINT})
+ </insert>
+ <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeIssueReport">
+ <!--@mbg.generated-->
+ insert into se_issue_report
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ id,
+ </if>
+ <if test="content != null">
+ content,
+ </if>
+ <if test="images != null">
+ images,
+ </if>
+ <if test="audios != null">
+ audios,
+ </if>
+ <if test="videos != null">
+ videos,
+ </if>
+ <if test="lng != null">
+ lng,
+ </if>
+ <if test="lat != null">
+ lat,
+ </if>
+ <if test="clientId != null">
+ client_id,
+ </if>
+ <if test="reportTime != null">
+ report_time,
+ </if>
+ <if test="phone != null">
+ phone,
+ </if>
+ <if test="state != null">
+ `state`,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="id != null">
+ #{id,jdbcType=BIGINT},
+ </if>
+ <if test="content != null">
+ #{content,jdbcType=VARCHAR},
+ </if>
+ <if test="images != null">
+ #{images,jdbcType=VARCHAR},
+ </if>
+ <if test="audios != null">
+ #{audios,jdbcType=VARCHAR},
+ </if>
+ <if test="videos != null">
+ #{videos,jdbcType=VARCHAR},
+ </if>
+ <if test="lng != null">
+ #{lng,jdbcType=DECIMAL},
+ </if>
+ <if test="lat != null">
+ #{lat,jdbcType=DECIMAL},
+ </if>
+ <if test="clientId != null">
+ #{clientId,jdbcType=BIGINT},
+ </if>
+ <if test="reportTime != null">
+ #{reportTime,jdbcType=TIMESTAMP},
+ </if>
+ <if test="phone != null">
+ #{phone,jdbcType=VARCHAR},
+ </if>
+ <if test="state != null">
+ #{state,jdbcType=TINYINT},
+ </if>
+ </trim>
+ </insert>
+ <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoSe.SeIssueReport">
+ <!--@mbg.generated-->
+ update se_issue_report
+ <set>
+ <if test="content != null">
+ content = #{content,jdbcType=VARCHAR},
+ </if>
+ <if test="images != null">
+ images = #{images,jdbcType=VARCHAR},
+ </if>
+ <if test="audios != null">
+ audios = #{audios,jdbcType=VARCHAR},
+ </if>
+ <if test="videos != null">
+ videos = #{videos,jdbcType=VARCHAR},
+ </if>
+ <if test="lng != null">
+ lng = #{lng,jdbcType=DECIMAL},
+ </if>
+ <if test="lat != null">
+ lat = #{lat,jdbcType=DECIMAL},
+ </if>
+ <if test="clientId != null">
+ client_id = #{clientId,jdbcType=BIGINT},
+ </if>
+ <if test="reportTime != null">
+ report_time = #{reportTime,jdbcType=TIMESTAMP},
+ </if>
+ <if test="phone != null">
+ phone = #{phone,jdbcType=VARCHAR},
+ </if>
+ <if test="state != null">
+ `state` = #{state,jdbcType=TINYINT},
+ </if>
+ </set>
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+ <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeIssueReport">
+ <!--@mbg.generated-->
+ update se_issue_report
+ set content = #{content,jdbcType=VARCHAR},
+ images = #{images,jdbcType=VARCHAR},
+ audios = #{audios,jdbcType=VARCHAR},
+ videos = #{videos,jdbcType=VARCHAR},
+ lng = #{lng,jdbcType=DECIMAL},
+ lat = #{lat,jdbcType=DECIMAL},
+ client_id = #{clientId,jdbcType=BIGINT},
+ report_time = #{reportTime,jdbcType=TIMESTAMP},
+ phone = #{phone,jdbcType=VARCHAR},
+ `state` = #{state,jdbcType=TINYINT}
+ where id = #{id,jdbcType=BIGINT}
+ </update>
+</mapper>
\ No newline at end of file
--
Gitblit v1.8.0