From 1bf92cd596e6d1c259e471dae605fca4d0ed8824 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期二, 10 九月 2024 12:13:33 +0800
Subject: [PATCH] 增加假的报警代码
---
collect/src/main/resources/com/qianwen/mdc/collect/mapper/iotdb/DeviceStateMapper.xml | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/collect/src/main/resources/com/qianwen/mdc/collect/mapper/iotdb/DeviceStateMapper.xml b/collect/src/main/resources/com/qianwen/mdc/collect/mapper/iotdb/DeviceStateMapper.xml
index af763c6..0b04822 100644
--- a/collect/src/main/resources/com/qianwen/mdc/collect/mapper/iotdb/DeviceStateMapper.xml
+++ b/collect/src/main/resources/com/qianwen/mdc/collect/mapper/iotdb/DeviceStateMapper.xml
@@ -5,7 +5,6 @@
<resultMap id="BaseResultMap" type="com.qianwen.mdc.collect.entity.iotdb.DeviceState">
<result column="workstation_id" jdbcType="BIGINT" property="workstationId"/>
<result column="value_collect" jdbcType="BIGINT" property="valueCollect"/>
- <result column="param_type" jdbcType="INTEGER" property="paramType"/>
<result column="calendar_code" jdbcType="VARCHAR" property="calendarCode"/>
<result column="factory_year" jdbcType="INTEGER" property="factoryYear"/>
<result column="factory_month" jdbcType="INTEGER" property="factoryMonth"/>
@@ -14,10 +13,11 @@
<result column="shift_index" jdbcType="INTEGER" property="shiftIndex"/>
<result column="shift_time_type" jdbcType="INTEGER" property="shiftTimeType"/>
<result column="wcs" jdbcType="INTEGER" property="wcs"/>
- <result column="rps" jdbcType="INTEGER" property="wcs"/>
+ <result column="rps" jdbcType="INTEGER" property="rps"/>
<result column="is_sync" jdbcType="BOOLEAN" property="isSync"/>
<result column="feedback_id" jdbcType="BIGINT" property="feedbackId"/>
<result column="is_deleted" jdbcType="BOOLEAN" property="isDeleted"/>
+ <result column="is_plan" jdbcType="BIGINT" property="isPlan"/>
<result column="employee_id" jdbcType="BIGINT" property="employeeId"/>
</resultMap>
<!--
@@ -80,9 +80,9 @@
where is_sync=false and is_fix_point=false and feedback_point_type=0 and is_deleted=false
order by time asc limit 1
</select>
-
+ <!-- -->
<select id="statesInTimeRange" resultMap="BaseResultMap">
- select <include refid="all_columns" /> FROM root.f2.aggregate_state_${workstationId}
+ select <include refid="all_columns" /> FROM root.f2.state_${workstationId}
<where>
is_deleted=false
<if test="timeRange.startTime != null">
@@ -92,6 +92,25 @@
</where>
order by time asc
+ align by device
+ </select>
+
+ <!-- 鍙兘鐢╝s 鍜宺esultType鐨勫舰寮忥紵锛燂紵 resultType="com.qianwen.mdc.collect.entity.iotdb.DeviceState"
+ <select id="statesInTimeRange" resultMap="BaseResultMap">
+ select <include refid="all_columns" /> FROM root.f2.state_${workstationId}
+ <where>
+ is_deleted=false
+ <if test="timeRange.startTime != null">
+ AND time >= #{timeRange.startTime}
+ </if>
+ AND time <= #{timeRange.endTime}
+ </where>
+
+ order by time asc
+ align by device
+ </select>-->
+ <select id="fixPointCountByDate" resultType="Long">
+ select count(factory_date) FROM root.f2.state_* where factory_date=#{factoryDate} and is_fix_point=true
</select>
</mapper>
--
Gitblit v1.9.3