소스 검색

新增的2个接口 新增筛选日期

王苗苗 1 주 전
부모
커밋
954fc42f51

+ 6 - 0
slibra-system/src/main/java/com/slibra/business/domain/AutoFeedback.java

@@ -73,4 +73,10 @@ public class AutoFeedback
     @Excel(name = "当前请求时间")
     private String updateTime;
 
+    //2025年05月09日16:40:08 新增请求参数
+    //开始日期
+    private String dateBegin;
+
+    //截止日期
+    private String dateEnd;
 }

+ 7 - 0
slibra-system/src/main/java/com/slibra/business/domain/ValidateCoef.java

@@ -88,4 +88,11 @@ public class ValidateCoef
     @Excel(name = "others")
     private String ext;
 
+    //2025年05月09日16:40:08 新增请求参数
+    //开始日期
+    private String dateBegin;
+
+    //截止日期
+    private String dateEnd;
+
 }

+ 21 - 18
slibra-system/src/main/resources/mapper/business/AutoFeedbackMapper.xml

@@ -23,24 +23,6 @@
         select id, req_time, update_time, source, feedback_type, base_para, control_coef, cate, subcate, coef, cf, ext from auto_feedback
     </sql>
 
-    <select id="selectAutoFeedbackList" parameterType="AutoFeedback" resultMap="AutoFeedbackResult">
-        <include refid="selectAutoFeedbackVo"/>
-        <where>
-            1 = 1
-            <if test="reqTime != null  and reqTime != ''"> and req_time = #{reqTime}</if>
-            <if test="source != null "> and source = #{source}</if>
-            <if test="feedbackType != null  and feedbackType != ''"> and feedback_type = #{feedbackType}</if>
-            <if test="basePara != null "> and base_para = #{basePara}</if>
-            <if test="controlCoef != null "> and control_coef = #{controlCoef}</if>
-            <if test="cate != null "> and cate = #{cate}</if>
-            <if test="subcate != null "> and subcate = #{subcate}</if>
-            <if test="coef != null "> and coef = #{coef}</if>
-            <if test="cf != null  and cf != ''"> and cf = #{cf}</if>
-            <if test="ext != null  and ext != ''"> and ext = #{ext}</if>
-        </where>
-        and del_flag = 0 order by id desc
-    </select>
-
     <select id="selectAutoFeedbackById" parameterType="Long" resultMap="AutoFeedbackResult">
         <include refid="selectAutoFeedbackVo"/>
         where id = #{id} and del_flag = 0
@@ -118,4 +100,25 @@
         <include refid="selectAutoFeedbackVo"/>
         where source = #{type} order by id desc limit 1
     </select>
+
+    <select id="selectAutoFeedbackList" parameterType="AutoFeedback" resultMap="AutoFeedbackResult">
+        <include refid="selectAutoFeedbackVo"/>
+        <where>
+            1 = 1
+            <if test="reqTime != null  and reqTime != ''"> and req_time = #{reqTime}</if>
+            <if test="source != null "> and source = #{source}</if>
+            <if test="feedbackType != null  and feedbackType != ''"> and feedback_type = #{feedbackType}</if>
+            <if test="basePara != null "> and base_para = #{basePara}</if>
+            <if test="controlCoef != null "> and control_coef = #{controlCoef}</if>
+            <if test="cate != null "> and cate = #{cate}</if>
+            <if test="subcate != null "> and subcate = #{subcate}</if>
+            <if test="coef != null "> and coef = #{coef}</if>
+            <if test="cf != null  and cf != ''"> and cf = #{cf}</if>
+            <if test="ext != null  and ext != ''"> and ext = #{ext}</if>
+            <!-- 2025年05月09日16:42:08 新增的筛选条件 -->
+            <if test="dateBegin != null "> and SUBSTRING(update_time, 1, 10)  &gt;= #{dateBegin}</if>
+            <if test="dateEnd != null "> and SUBSTRING(update_time, 1, 10)  &lt;= #{dateEnd}</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
 </mapper>

+ 28 - 23
slibra-system/src/main/resources/mapper/business/ValidateCoefMapper.xml

@@ -27,29 +27,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select id, validate_date, validate_time, source, coef, subcate, hyc_xsy1, hyc_xsy2, hyc_xsy3, carbon_calculate, carbon_real, CN, water_inflow, MLSS, MLVSS, ext from validate_coef
     </sql>
 
-    <select id="selectValidateCoefList" parameterType="ValidateCoef" resultMap="ValidateCoefResult">
-        <include refid="selectValidateCoefVo"/>
-        <where>
-            1 = 1
-            <if test="validateDate != null  and validateDate != ''"> and validate_date = #{validateDate}</if>
-            <if test="validateTime != null  and validateTime != ''"> and validate_time = #{validateTime}</if>
-            <if test="source != null "> and source = #{source}</if>
-            <if test="coef != null "> and coef = #{coef}</if>
-            <if test="subcate != null "> and subcate = #{subcate}</if>
-            <if test="hycXsy1 != null "> and hyc_xsy1 = #{hycXsy1}</if>
-            <if test="hycXsy2 != null "> and hyc_xsy2 = #{hycXsy2}</if>
-            <if test="hycXsy3 != null "> and hyc_xsy3 = #{hycXsy3}</if>
-            <if test="carbonCalculate != null "> and carbon_calculate = #{carbonCalculate}</if>
-            <if test="carbonReal != null "> and carbon_real = #{carbonReal}</if>
-            <if test="CN != null "> and CN = #{CN}</if>
-            <if test="waterInflow != null "> and water_inflow = #{waterInflow}</if>
-            <if test="MLSS != null "> and MLSS = #{MLSS}</if>
-            <if test="MLVSS != null "> and MLVSS = #{MLVSS}</if>
-            <if test="ext != null  and ext != ''"> and ext = #{ext}</if>
-        </where>
-        and del_flag = 0 order by id desc
-    </select>
-    
     <select id="selectValidateCoefById" parameterType="Long" resultMap="ValidateCoefResult">
         <include refid="selectValidateCoefVo"/>
         where id = #{id} and del_flag = 0
@@ -128,4 +105,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
+
+    <!-- 2025年05月09日16:49:11 下面是新增的SQL,不允许删除或者覆盖 -->
+    <select id="selectValidateCoefList" parameterType="ValidateCoef" resultMap="ValidateCoefResult">
+        <include refid="selectValidateCoefVo"/>
+        <where>
+            1 = 1
+            <if test="validateDate != null  and validateDate != ''"> and validate_date = #{validateDate}</if>
+            <if test="validateTime != null  and validateTime != ''"> and validate_time = #{validateTime}</if>
+            <if test="source != null "> and source = #{source}</if>
+            <if test="coef != null "> and coef = #{coef}</if>
+            <if test="subcate != null "> and subcate = #{subcate}</if>
+            <if test="hycXsy1 != null "> and hyc_xsy1 = #{hycXsy1}</if>
+            <if test="hycXsy2 != null "> and hyc_xsy2 = #{hycXsy2}</if>
+            <if test="hycXsy3 != null "> and hyc_xsy3 = #{hycXsy3}</if>
+            <if test="carbonCalculate != null "> and carbon_calculate = #{carbonCalculate}</if>
+            <if test="carbonReal != null "> and carbon_real = #{carbonReal}</if>
+            <if test="CN != null "> and CN = #{CN}</if>
+            <if test="waterInflow != null "> and water_inflow = #{waterInflow}</if>
+            <if test="MLSS != null "> and MLSS = #{MLSS}</if>
+            <if test="MLVSS != null "> and MLVSS = #{MLVSS}</if>
+            <if test="ext != null  and ext != ''"> and ext = #{ext}</if>
+            <!-- 下面是新增的SQL筛选条件 -->
+            <if test="dateBegin != null "> and validate_date &gt;= #{dateBegin}</if>
+            <if test="dateEnd != null "> and validate_date &lt;= #{dateEnd}</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
 </mapper>