From aa36d81e83b27c52d126af07a186bf8a9cc9a4f6 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期四, 26 六月 2025 14:36:55 +0800 Subject: [PATCH] 1、增加墒情日数据查询功能; 2、完善代码。 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmSoilHistoryMapper.xml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmSoilHistoryMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmSoilHistoryMapper.xml index 4a66ef7..b05d596 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmSoilHistoryMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmSoilHistoryMapper.xml @@ -31,6 +31,57 @@ from rm_soil_history where id = #{id,jdbcType=BIGINT} </select> + <!--鏍规嵁鎸囧畾鏉′欢鏌ヨ鍘嗗彶璁板綍鏁伴噺--> + <select id="selectCount" resultType="java.lang.Long"> + SELECT + COUNT(*) AS recordCount + FROM rm_soil_history htb + INNER JOIN pr_st_soil mtb ON mtb.id = htb.soil_id + <where> + <if test="soilId != null"> + AND htb.soil_id = #{soilId} + </if> + <if test = "no != null"> + AND mtb.no = #{no} + </if> + <if test = "name != null and name !=''"> + AND mtb.name LIKE CONCAT('%',#{name},'%') + </if> + <if test = "timeStart != null and timeStop != null"> + AND htb.dt BETWEEN #{timeStart} AND #{timeStop} + </if> + </where> + </select> + + <!--鏍规嵁鎸囧畾鏉′欢鏌ヨ鍘嗗彶璁板綍--> + <select id="selectSome" resultType="com.dy.pipIrrGlobal.voRm.VoSoil"> + SELECT + <include refid="Base_Column_List" />, + mtb.`name` AS soilName + FROM rm_soil_history htb + INNER JOIN pr_st_soil mtb ON mtb.id = htb.soil_id + <where> + <if test="soilId != null"> + AND htb.soil_id = #{soilId} + </if> + <if test = "no != null"> + AND mtb.no = #{no} + </if> + <if test = "name != null and name !=''"> + AND mtb.name LIKE CONCAT('%',#{name},'%') + </if> + <if test = "timeStart != null and timeStop != null"> + AND htb.dt BETWEEN #{timeStart} AND #{timeStop} + </if> + </where> + ORDER BY htb.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> + <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> <!--@mbg.generated--> delete from rm_soil_history -- Gitblit v1.8.0