From bb156855a7273e91af1f1123a5b84c606cb44c15 Mon Sep 17 00:00:00 2001
From: 叶松 <2217086471@qq.com>
Date: 星期五, 03 十一月 2023 10:26:27 +0800
Subject: [PATCH] 增加搅拌站消耗页面
---
hd/pipe/materialsManage/src/main/resources/mapping/THelmetDeviceMapper.xml | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 203 insertions(+), 1 deletions(-)
diff --git a/hd/pipe/materialsManage/src/main/resources/mapping/THelmetDeviceMapper.xml b/hd/pipe/materialsManage/src/main/resources/mapping/THelmetDeviceMapper.xml
index c8897d0..d2189f2 100644
--- a/hd/pipe/materialsManage/src/main/resources/mapping/THelmetDeviceMapper.xml
+++ b/hd/pipe/materialsManage/src/main/resources/mapping/THelmetDeviceMapper.xml
@@ -532,7 +532,7 @@
WHERE
user_id = #{userId}
<if test="strTime!=null and strTime!='' and endTime!=null and endTime!='' ">
- and sm_time between #{strTime} and #{endTime}
+ and DATE(sm_time) between #{strTime} and #{endTime}
</if>
GROUP BY
DATE( sm_time )
@@ -547,6 +547,208 @@
sm_time as smTime
from t_helmet_report where
user_id=#{userId}
+ <if test="strTime!=null and strTime!='' and endTime!=null and endTime!='' ">
+ and sm_time between #{strTime} and #{endTime}
+ </if>
order by sm_time desc
</select>
+
+ <insert id="smockIn" >
+ insert into t_data_smock
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="smokeId != null">
+ smoke_id,
+ </if>
+ <if test="time != null">
+ time,
+ </if>
+ <if test="i00 != null">
+ I00,
+ </if>
+ <if test="i01 != null">
+ I01,
+ </if>
+ <if test="i02 != null">
+ I02,
+ </if>
+ <if test="i03 != null">
+ I03,
+ </if>
+ <if test="i04 != null">
+ I04,
+ </if>
+ <if test="i05 != null">
+ I05,
+ </if>
+ <if test="i06 != null">
+ I06,
+ </if>
+ <if test="i07 != null">
+ I07,
+ </if>
+ <if test="i10 != null">
+ I10,
+ </if>
+ <if test="i11 != null">
+ I11,
+ </if>
+ <if test="q00 != null">
+ Q00,
+ </if>
+ <if test="q01 != null">
+ Q01,
+ </if>
+ <if test="q02 != null">
+ Q02,
+ </if>
+ <if test="q03 != null">
+ Q03,
+ </if>
+ <if test="q04 != null">
+ Q04,
+ </if>
+ <if test="q05 != null">
+ Q05,
+ </if>
+ <if test="vb0 != null">
+ VB0,
+ </if>
+ <if test="vb10 != null">
+ VB10,
+ </if>
+ <if test="vb11 != null">
+ VB11,
+ </if>
+ <if test="vb12 != null">
+ VB12,
+ </if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="smokeId != null">
+ #{smokeId,jdbcType=INTEGER},
+ </if>
+ <if test="time != null">
+ #{time,jdbcType=VARCHAR},
+ </if>
+ <if test="i00 != null">
+ #{i00,jdbcType=VARCHAR},
+ </if>
+ <if test="i01 != null">
+ #{i01,jdbcType=VARCHAR},
+ </if>
+ <if test="i02 != null">
+ #{i02,jdbcType=VARCHAR},
+ </if>
+ <if test="i03 != null">
+ #{i03,jdbcType=VARCHAR},
+ </if>
+ <if test="i04 != null">
+ #{i04,jdbcType=VARCHAR},
+ </if>
+ <if test="i05 != null">
+ #{i05,jdbcType=VARCHAR},
+ </if>
+ <if test="i06 != null">
+ #{i06,jdbcType=VARCHAR},
+ </if>
+ <if test="i07 != null">
+ #{i07,jdbcType=VARCHAR},
+ </if>
+ <if test="i10 != null">
+ #{i10,jdbcType=VARCHAR},
+ </if>
+ <if test="i11 != null">
+ #{i11,jdbcType=VARCHAR},
+ </if>
+ <if test="q00 != null">
+ #{q00,jdbcType=VARCHAR},
+ </if>
+ <if test="q01 != null">
+ #{q01,jdbcType=VARCHAR},
+ </if>
+ <if test="q02 != null">
+ #{q02,jdbcType=VARCHAR},
+ </if>
+ <if test="q03 != null">
+ #{q03,jdbcType=VARCHAR},
+ </if>
+ <if test="q04 != null">
+ #{q04,jdbcType=VARCHAR},
+ </if>
+ <if test="q05 != null">
+ #{q05,jdbcType=VARCHAR},
+ </if>
+ <if test="vb0 != null">
+ #{vb0,jdbcType=VARCHAR},
+ </if>
+ <if test="vb10 != null">
+ #{vb10,jdbcType=VARCHAR},
+ </if>
+ <if test="vb11 != null">
+ #{vb11,jdbcType=VARCHAR},
+ </if>
+ <if test="vb12 != null">
+ #{vb12,jdbcType=VARCHAR},
+ </if>
+ </trim>
+ </insert>
+
+ <select id="dataSmockList" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataSmock">
+ select
+ smoke_id as smokeId,
+ gateway_cyc as gatewayCyc,
+ FanS as fans,
+ V1Run as v1run,
+ UV1Run as uv1run,
+ FanRun as fanrun,
+ UV2Run as uv2run,
+ SSVRun as ssvrun,
+ DP as dp,
+ T as t,
+ OC as oc,
+ gatew as gatew,
+ NXRun as nxrun,
+ Alarm as alarm,
+ times as times,
+ RTC_VOLT as rtcVolt,
+ V2Run as v2run,
+ DXQVRun as dxqvrun,
+ Press as press,
+ Dc as dc
+ from t_data_smock
+ where 1=1
+ <if test="strTime!=null and endTime!=null and strTime!='' and endTime!='' ">
+ and times between #{strTime} and #{endTime}
+ </if>
+ order by times desc
+ </select>
+ <select id="dataValuesList" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataValue">
+ select
+ data_id as dataId,
+ device_id as deviceId,
+ device_name as deviceName,
+ account_number as accountNumber,
+ upload_time as uploadTime,
+ pm25 as pm25,
+ pm10 as pm10,
+ tsp as tsp,
+ temperature as temperature,
+ humidity as humidity,
+ data6 as data6,
+ wind_speed as windSpeed,
+ wind_direction as windDirection,
+ tvoc as tvoc,
+ no2 as no2,
+ co as co,
+ so2 as so2,
+ o3 as o3,
+ noise as noise
+ from t_data_value
+ where 1=1
+ <if test="strTime!=null and strTime!='' and endTime!=null and endTime!='' ">
+ and upload_time between #{strTime} and #{endTime}
+ </if>
+ order by upload_time desc
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3