ソースを参照

新增查询历史配置碳源投加记录

王苗苗 6 ヶ月 前
コミット
b2a4059f20

+ 10 - 9
src/main/java/com/xlht/xlhtproject/controller/TXinyiMedicineParamController.java

@@ -37,15 +37,6 @@ public class TXinyiMedicineParamController extends BaseController
     }
 
 
-    /**
-     * 获取智能投药参数设置详细信息最新的一条数据
-     */
-    @GetMapping(value = "/getLatestRecord")
-    public AjaxResult getLatestRecord()
-    {
-        return success(tXinyiMedicineParamService.getLatestRecord());
-    }
-
 
     /**
      * 新增智能投药参数设置
@@ -60,5 +51,15 @@ public class TXinyiMedicineParamController extends BaseController
     }
 
 
+    /**
+     * 获取智能投药参数设置详细信息的历史记录-统计使用
+     */
+    @GetMapping(value = "/getList")
+    public AjaxResult getList(TXinyiMedicineParam tXinyiMedicineParam)
+    {
+        return success(tXinyiMedicineParamService.selectTXinyiMedicineParamList(tXinyiMedicineParam));
+    }
+
+
 
 }

+ 8 - 0
src/main/java/com/xlht/xlhtproject/domain/TXinyiMedicineParam.java

@@ -152,4 +152,12 @@ public class TXinyiMedicineParam
 
     /** 备注 */
     private String remark;
+
+    //请求参数
+
+    /**  开始时间 */
+    private String timeBegin;
+
+    /** 截止时间 */
+    private String timeEnd;
 }

+ 3 - 0
src/main/resources/mapper/TXinyiMedicineParamMapper.xml

@@ -88,6 +88,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="tdb != null "> and tdb = #{tdb}</if>
             <if test="medicineAmount != null "> and medicine_amount = #{medicineAmount}</if>
             <if test="revision != null "> and revision = #{revision}</if>
+            <!-- 下面是新增的SQL检索条件 -->
+            <if test="timeBegin != null  and timeBegin != ''"> and SUBSTRING (CONVERT ( VARCHAR, create_time, 120 ), 1, 10 ) &gt;= #{timeBegin}</if>
+            <if test="timeEnd != null  and timeEnd != ''"> and SUBSTRING (CONVERT ( VARCHAR, create_time, 120 ), 1, 10 ) &lt;= #{timeEnd}</if>
         </where>
         and del_flag = 0 order by id desc
     </select>