From d0b51c6d6f2b7a530c0557b6279cc6dfced223cf Mon Sep 17 00:00:00 2001 From: zhubaomin <470473919@qq.com> Date: 星期日, 27 四月 2025 19:01:04 +0800 Subject: [PATCH] 各轮灌组开阀时间提前10分钟,第一组除外,改为配置文件设置 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowmeterMapper.xml | 232 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 232 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowmeterMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowmeterMapper.xml new file mode 100644 index 0000000..408b346 --- /dev/null +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrFlowmeterMapper.xml @@ -0,0 +1,232 @@ +<?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.PrFlowmeterMapper"> + <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrFlowmeter"> + <!--@mbg.generated--> + <!--@Table pr_flowmeter--> + <id column="id" jdbcType="BIGINT" property="id" /> + <result column="monitoringId" jdbcType="BIGINT" property="monitoringId" /> + <result column="code" jdbcType="VARCHAR" property="code" /> + <result column="protocol" jdbcType="VARCHAR" property="protocol" /> + <result column="onlineState" jdbcType="TINYINT" property="onlineState" /> + <result column="reportTime" jdbcType="TIMESTAMP" property="reportTime" /> + <result column="addWays" jdbcType="TINYINT" property="addWays" /> + <result column="operator" jdbcType="BIGINT" property="operator" /> + <result column="operateDt" jdbcType="TIMESTAMP" property="operateDt" /> + <result column="remarks" jdbcType="VARCHAR" property="remarks" /> + <result column="deleted" jdbcType="TINYINT" property="deleted" /> + </resultMap> + <sql id="Base_Column_List"> + <!--@mbg.generated--> + id, monitoringId, code, protocol, onlineState, reportTime, addWays, `operator`, operateDt, remarks, + deleted + </sql> + <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> + <!--@mbg.generated--> + select + <include refid="Base_Column_List" /> + from pr_flowmeter + where id = #{id,jdbcType=BIGINT} + </select> + <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> + <!--@mbg.generated--> + delete from pr_flowmeter + where id = #{id,jdbcType=BIGINT} + </delete> + + <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowmeter"> + <!--@mbg.generated--> + insert into pr_flowmeter (id, code, protocol, + onlineState, reportTime, addWays, + `operator`, operateDt, remarks, + deleted) + values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, + #{onlineState,jdbcType=TINYINT}, #{reportTime,jdbcType=TIMESTAMP}, #{addWays,jdbcType=TINYINT}, + #{operator,jdbcType=BIGINT}, #{operateDt,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, + #{deleted,jdbcType=TINYINT}) + </insert> + + <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowmeter"> + <!--@mbg.generated--> + insert into pr_flowmeter + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="id != null"> + id, + </if> + <if test="code != null"> + code, + </if> + <if test="protocol != null"> + protocol, + </if> + <if test="onlineState != null"> + onlineState, + </if> + <if test="reportTime != null"> + reportTime, + </if> + <if test="addWays != null"> + addWays, + </if> + <if test="operator != null"> + `operator`, + </if> + <if test="operateDt != null"> + operateDt, + </if> + <if test="remarks != null"> + remarks, + </if> + <if test="deleted != null"> + deleted, + </if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="id != null"> + #{id,jdbcType=BIGINT}, + </if> + <if test="code != null"> + #{code,jdbcType=VARCHAR}, + </if> + <if test="protocol != null"> + #{protocol,jdbcType=VARCHAR}, + </if> + <if test="onlineState != null"> + #{onlineState,jdbcType=TINYINT}, + </if> + <if test="reportTime != null"> + #{reportTime,jdbcType=TIMESTAMP}, + </if> + <if test="addWays != null"> + #{addWays,jdbcType=TINYINT}, + </if> + <if test="operator != null"> + #{operator,jdbcType=BIGINT}, + </if> + <if test="operateDt != null"> + #{operateDt,jdbcType=TIMESTAMP}, + </if> + <if test="remarks != null"> + #{remarks,jdbcType=VARCHAR}, + </if> + <if test="deleted != null"> + #{deleted,jdbcType=TINYINT}, + </if> + </trim> + </insert> + <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrFlowmeter"> + <!--@mbg.generated--> + update pr_flowmeter + <set> + <if test="code != null"> + code = #{code,jdbcType=VARCHAR}, + </if> + <if test="protocol != null"> + protocol = #{protocol,jdbcType=VARCHAR}, + </if> + <if test="onlineState != null"> + onlineState = #{onlineState,jdbcType=TINYINT}, + </if> + <if test="reportTime != null"> + reportTime = #{reportTime,jdbcType=TIMESTAMP}, + </if> + <if test="addWays != null"> + addWays = #{addWays,jdbcType=TINYINT}, + </if> + <if test="operator != null"> + `operator` = #{operator,jdbcType=BIGINT}, + </if> + <if test="operateDt != null"> + operateDt = #{operateDt,jdbcType=TIMESTAMP}, + </if> + <if test="remarks != null"> + remarks = #{remarks,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.PrFlowmeter"> + <!--@mbg.generated--> + update pr_flowmeter + set code = #{code,jdbcType=VARCHAR}, + protocol = #{protocol,jdbcType=VARCHAR}, + onlineState = #{onlineState,jdbcType=TINYINT}, + reportTime = #{reportTime,jdbcType=TIMESTAMP}, + addWays = #{addWays,jdbcType=TINYINT}, + `operator` = #{operator,jdbcType=BIGINT}, + operateDt = #{operateDt,jdbcType=TIMESTAMP}, + remarks = #{remarks,jdbcType=VARCHAR}, + deleted = #{deleted,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + </update> + + <!--鎹紪鍙峰垹闄ゆ祦閲忚--> + <update id="deleteFlowmeterById"> + UPDATE pr_flowmeter SET deleted = 1 WHERE id = ${flowmeterId} + </update> + + <!--鏍规嵁娴侀噺璁$紪鍙疯幏鍙栨湭鍒犻櫎鐨勬祦閲忚鏁伴噺--> + <select id="getRecordCountOfFlowmeterByCode" resultType="java.lang.Integer"> + SELECT COUNT(*) AS recordCountOfFlowmeter FROM pr_flowmeter WHERE deleted = 0 AND id = ${flowmeterId} + </select> + + <!--鏍规嵁娴侀噺璁$紪鍙� 鎴栬�� 鍦ㄧ嚎鐘舵�� 鑾峰彇鏈垹闄ょ殑缁戝畾鐨勬祦閲忚鏁伴噺 --> + <select id="getRecordCountOfFlowMeterByOthers" resultType="_integer"> + SELECT COUNT(*) AS recordCountOfFlowmeter + from pr_flowmeter pfm + Left join pr_flow_monitoring pfmt on pfmt.id = pfm.monitoringId + <where> + pfm.deleted = 0 AND pfmt.deleted = 0 + <if test = "code != null and code !=''"> + AND pfm.code like CONCAT('%',#{code},'%') + </if> + <if test="onlineState != null "> + AND pfm.onlineState = #{onlineState} + </if> + </where> + </select> + + <!--鏍规嵁娴侀噺璁$紪鍙� 鎴栬�� 鍦ㄧ嚎鐘舵�� 鑾峰彇鏈垹闄ょ殑缁戝畾鐨勬祦閲忚璁板綍 --> + <select id="getFlowMeters" resultType="com.dy.pipIrrGlobal.voPr.VoFlowMeter"> + select CAST(pfm.id AS char) AS id, + pfm.code AS code, + pfm.onlineState AS onlineState, + pfmt.`name` AS `name`, + pfm.operateDt AS operateDt + from pr_flowmeter pfm + Left join pr_flow_monitoring pfmt on pfmt.id = pfm.monitoringId + <where> + pfm.deleted = 0 AND pfmt.deleted = 0 + <if test = "code != null and code !=''"> + AND pfm.code like CONCAT('%',#{code},'%') + </if> + <if test="onlineState != null "> + AND pfm.onlineState = #{onlineState} + </if> + </where> + ORDER BY pfm.operateDt 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="selectAll" resultMap="BaseResultMap"> + <!--@mbg.generated--> + select + <include refid="Base_Column_List"/> + from pr_flowmeter pfm + where deleted != 1 + </select> + <update id="flowmeterAddMonId"> + update pr_flowmeter + set monitoringId = #{monitoringId,jdbcType=BIGINT}, + `operator` = #{operator,jdbcType=BIGINT}, + operateDt = #{operateDt,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=BIGINT} + </update> +</mapper> \ No newline at end of file -- Gitblit v1.8.0