From 1a32cec9ba0e406e840de620d777904e74f780fa Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 27 六月 2025 14:54:28 +0800
Subject: [PATCH] 增加远程开阀命令记录实体

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandOpenMapper.xml                |  181 ++++++++++++++++++++++++++++++++++++
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmCommandOpen.java      |   82 ++++++++++++++++
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandOpenMapper.java |   31 ++++++
 3 files changed, 294 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandOpenMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandOpenMapper.java
new file mode 100644
index 0000000..b0f63a4
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoRm/RmCommandOpenMapper.java
@@ -0,0 +1,31 @@
+package com.dy.pipIrrGlobal.daoRm;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dy.pipIrrGlobal.pojoRm.RmCommandOpen;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/6/27 10:31
+ * @Description
+ */
+@Mapper
+public interface RmCommandOpenMapper extends BaseMapper<RmCommandOpen> {
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(RmCommandOpen record);
+
+    int insertSelective(RmCommandOpen record);
+
+    RmCommandOpen selectByPrimaryKey(Long id);
+
+    List<RmCommandOpen> selectByIntakeId(Long intakeId);
+
+    int updateByPrimaryKeySelective(RmCommandOpen record);
+
+    int updateByPrimaryKey(RmCommandOpen record);
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmCommandOpen.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmCommandOpen.java
new file mode 100644
index 0000000..f6325b7
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoRm/RmCommandOpen.java
@@ -0,0 +1,82 @@
+package com.dy.pipIrrGlobal.pojoRm;
+
+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 lombok.*;
+
+import java.util.Date;
+
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/6/27 10:31
+ * @Description
+ */
+@TableName(value = "rm_command_open", autoResultMap = true)
+@Data
+@Builder
+@ToString
+@NoArgsConstructor
+@AllArgsConstructor
+public class RmCommandOpen implements BaseEntity {
+
+    public static final long serialVersionUID = 202506271017001L;
+    /**
+     * 涓婚敭
+     */
+    @TableId(type = IdType.INPUT)
+    public Long id;
+
+    /**
+     * 鍛戒护id
+     */
+    public Long comId;
+
+    /**
+     * 鍔熻兘鐮�
+     */
+    public String commandCode;
+
+    /**
+     * 鍔熻兘鍛戒护鍚嶇О
+     */
+    public String commandName;
+
+    /**
+     * 鍙栨按鍙d
+     */
+    public Long intakeId;
+
+    /**
+     * 鎺у埗鍣ㄥ湴鍧�
+     */
+    public String rtuAddr;
+
+    /**
+     * 鍗忚鍚嶇О
+     */
+    public String protocol;
+
+    /**
+     * 铏氭嫙鍗″彿
+     */
+    public Long vcNum;
+
+    /**
+     * 璁㈠崟鍙�
+     */
+    public String orderNo;
+
+    /**
+     * 鍛戒护鍙戦�佹椂闂�
+     */
+    public Date sendTime;
+
+    /**
+     * 鎿嶄綔浜猴紙鐢ㄦ埛锛�
+     */
+    public Long operator;
+
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandOpenMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandOpenMapper.xml
new file mode 100644
index 0000000..7e39e26
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmCommandOpenMapper.xml
@@ -0,0 +1,181 @@
+<?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.daoRm.RmCommandOpenMapper">
+  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmCommandOpen">
+    <!--@mbg.generated-->
+    <!--@Table rm_command_open-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="com_id" jdbcType="BIGINT" property="comId" />
+    <result column="command_code" jdbcType="VARCHAR" property="commandCode" />
+    <result column="command_name" jdbcType="VARCHAR" property="commandName" />
+    <result column="intake_id" jdbcType="BIGINT" property="intakeId" />
+    <result column="rtu_addr" jdbcType="VARCHAR" property="rtuAddr" />
+    <result column="protocol" jdbcType="VARCHAR" property="protocol" />
+    <result column="vc_num" jdbcType="BIGINT" property="vcNum" />
+    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
+    <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
+    <result column="operator" jdbcType="BIGINT" property="operator" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, com_id, command_code, command_name, intake_id, rtu_addr, protocol, vc_num, order_no, 
+    send_time, `operator`
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    <!--@mbg.generated-->
+    select 
+    <include refid="Base_Column_List" />
+    from rm_command_open
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <select id="selectByIntakeId" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    <!--@mbg.generated-->
+    select
+    <include refid="Base_Column_List" />
+    from rm_command_open
+    where intake_id = #{intakeId,jdbcType=BIGINT}
+    order by id DESC
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    <!--@mbg.generated-->
+    delete from rm_command_open
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmCommandOpen">
+    <!--@mbg.generated-->
+    insert into rm_command_open (id, com_id, command_code, 
+      command_name, intake_id, rtu_addr, 
+      protocol, vc_num, order_no, 
+      send_time, `operator`)
+    values (#{id,jdbcType=BIGINT}, #{comId,jdbcType=BIGINT}, #{commandCode,jdbcType=VARCHAR}, 
+      #{commandName,jdbcType=VARCHAR}, #{intakeId,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR}, 
+      #{protocol,jdbcType=VARCHAR}, #{vcNum,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, 
+      #{sendTime,jdbcType=TIMESTAMP}, #{operator,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmCommandOpen">
+    <!--@mbg.generated-->
+    insert into rm_command_open
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="comId != null">
+        com_id,
+      </if>
+      <if test="commandCode != null">
+        command_code,
+      </if>
+      <if test="commandName != null">
+        command_name,
+      </if>
+      <if test="intakeId != null">
+        intake_id,
+      </if>
+      <if test="rtuAddr != null">
+        rtu_addr,
+      </if>
+      <if test="protocol != null">
+        protocol,
+      </if>
+      <if test="vcNum != null">
+        vc_num,
+      </if>
+      <if test="orderNo != null">
+        order_no,
+      </if>
+      <if test="sendTime != null">
+        send_time,
+      </if>
+      <if test="operator != null">
+        `operator`,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="comId != null">
+        #{comId,jdbcType=BIGINT},
+      </if>
+      <if test="commandCode != null">
+        #{commandCode,jdbcType=VARCHAR},
+      </if>
+      <if test="commandName != null">
+        #{commandName,jdbcType=VARCHAR},
+      </if>
+      <if test="intakeId != null">
+        #{intakeId,jdbcType=BIGINT},
+      </if>
+      <if test="rtuAddr != null">
+        #{rtuAddr,jdbcType=VARCHAR},
+      </if>
+      <if test="protocol != null">
+        #{protocol,jdbcType=VARCHAR},
+      </if>
+      <if test="vcNum != null">
+        #{vcNum,jdbcType=BIGINT},
+      </if>
+      <if test="orderNo != null">
+        #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="sendTime != null">
+        #{sendTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="operator != null">
+        #{operator,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmCommandOpen">
+    <!--@mbg.generated-->
+    update rm_command_open
+    <set>
+      <if test="comId != null">
+        com_id = #{comId,jdbcType=BIGINT},
+      </if>
+      <if test="commandCode != null">
+        command_code = #{commandCode,jdbcType=VARCHAR},
+      </if>
+      <if test="commandName != null">
+        command_name = #{commandName,jdbcType=VARCHAR},
+      </if>
+      <if test="intakeId != null">
+        intake_id = #{intakeId,jdbcType=BIGINT},
+      </if>
+      <if test="rtuAddr != null">
+        rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
+      </if>
+      <if test="protocol != null">
+        protocol = #{protocol,jdbcType=VARCHAR},
+      </if>
+      <if test="vcNum != null">
+        vc_num = #{vcNum,jdbcType=BIGINT},
+      </if>
+      <if test="orderNo != null">
+        order_no = #{orderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="sendTime != null">
+        send_time = #{sendTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="operator != null">
+        `operator` = #{operator,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmCommandOpen">
+    <!--@mbg.generated-->
+    update rm_command_open
+    set com_id = #{comId,jdbcType=BIGINT},
+      command_code = #{commandCode,jdbcType=VARCHAR},
+      command_name = #{commandName,jdbcType=VARCHAR},
+      intake_id = #{intakeId,jdbcType=BIGINT},
+      rtu_addr = #{rtuAddr,jdbcType=VARCHAR},
+      protocol = #{protocol,jdbcType=VARCHAR},
+      vc_num = #{vcNum,jdbcType=BIGINT},
+      order_no = #{orderNo,jdbcType=VARCHAR},
+      send_time = #{sendTime,jdbcType=TIMESTAMP},
+      `operator` = #{operator,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>
\ No newline at end of file

--
Gitblit v1.8.0