From c26a9d5eda9cb575df18fbf9a5a5c94869e99f88 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期三, 03 九月 2025 10:24:19 +0800
Subject: [PATCH] 获取轮灌组时取消项目ID
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdEt0Mapper.xml | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdEt0Mapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdEt0Mapper.xml
index 0109084..3474bc7 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdEt0Mapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdEt0Mapper.xml
@@ -17,6 +17,12 @@
<!--@mbg.generated-->
id, crop_id, weather_id, factor, max_tmp, min_tmp, dt, et0
</sql>
+ <sql id="Base_Column_List_with_alias">
+ <!--@mbg.generated-->
+ ${alias}.id, ${alias}.crop_id, ${alias}.weather_id,
+ ${alias}.factor, ${alias}.max_tmp, ${alias}.min_tmp,
+ ${alias}.dt, ${alias}.et0
+ </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
@@ -33,6 +39,33 @@
and weather_id = #{weatherId,jdbcType=BIGINT}
and dt = #{dt,jdbcType=DATE}
</select>
+
+ <select id="selectEt0ByDt" resultType="com.dy.pipIrrGlobal.pojoMd.MdEt0">
+ <!--@mbg.generated-->
+ select mc.id id, mc.id cropId, mc.name as cropName, et.et0 et0
+ from md_crops mc
+ left join md_et0 et on (et.crop_id = mc.id and et.dt = #{ymd,jdbcType=DATE})
+ where mc.stopped != 1
+ </select>
+ <!--鏍规嵁鎸囧畾鏉′欢鏌ヨ璁板綍-->
+ <select id="selectEt0ByCropAndDt" resultType="com.dy.pipIrrGlobal.pojoMd.MdEt0">
+ SELECT
+ <include refid="Base_Column_List_with_alias" >
+ <property name="alias" value="et"/>
+ </include>,
+ mc.name as cropName
+ from md_et0 et
+ inner join md_crops mc on et.crop_id = mc.id
+ <where>
+ <if test="cropId != null">
+ AND et.crop_id = #{cropId}
+ </if>
+ <if test = "timeStart != null and timeStart !='' and timeStop != null and timeStop != ''">
+ AND et.dt BETWEEN #{timeStart} AND #{timeStop}
+ </if>
+ </where>
+ ORDER BY et.id ASC
+ </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<!--@mbg.generated-->
delete from md_et0
--
Gitblit v1.8.0