From 5f988ae8e9516b0ec2406fef7d207b216e30c2af Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 13 十二月 2024 16:50:38 +0800
Subject: [PATCH] 优化接口 回复巡检员问题上报接口 已回复的加限制,只能回复一次
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml
index 25a5872..915a04f 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml
@@ -167,4 +167,57 @@
rtu_dt_last = #{rtuDtLast,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍鎬绘暟-->
+ <select id="getRecordCount" resultType="java.lang.Long">
+ select count(*)
+ from rm_intake_amount_day_last riadl
+ Left join pr_intake pint on pint.id = riadl.intake_id
+ <where>
+ <if test="intakeId != null and intakeId != '' ">
+ and rash.intake_id = #{intakeId}
+ </if>
+ <if test="intakeName != null and intakeName != '' ">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+ </if>
+ <if test="startDt != null">
+ and riadl.dt >= #{startDt,jdbcType=DATE}
+ </if>
+ <if test="endDt != null">
+ and riadl.dt <= #{endDt,jdbcType=DATE}
+ </if>
+ </where>
+ </select>
+ <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍-->
+ <select id="getIntakeAmountDayLast" resultType="com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay">
+ select
+ CAST(riadl.intake_id AS char)AS intakeId,
+ pint.name as intakeName,
+ riadl.dt as dt,
+ riadl.amount as amount,
+ riadl.dt_last as dtLast,
+ riadl.rtu_addr_last as rtuAddrLast,
+ CAST(riadl.controller_id_last AS char)AS controllerIdLast,
+ riadl.total_amount_last as totalAmountLast,
+ riadl.rtu_dt_last as rtuDtLast
+ from rm_intake_amount_day_last riadl
+ Left join pr_intake pint on pint.id = riadl.intake_id
+ <where>
+ <if test="intakeId != null and intakeId != '' ">
+ and rash.intake_id = #{intakeId}
+ </if>
+ <if test="intakeName != null and intakeName != '' ">
+ and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+ </if>
+ <if test="startDt != null">
+ and riadl.dt >= #{startDt,jdbcType=DATE}
+ </if>
+ <if test="endDt != null">
+ and riadl.dt <= #{endDt,jdbcType=DATE}
+ </if>
+ </where>
+ ORDER BY riadl.id DESC
+ <if test="pageCurr != null and pageSize != null">
+ LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
+ </if>
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0