From 25db770e621f1259b8d5b7fd514207f7481c2d0f Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期三, 30 十月 2024 11:25:37 +0800
Subject: [PATCH] blade_cps路径改为smis
---
smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/SuperAggregateStateFeedbackMapper.xml | 65 +++++++++++++++++---------------
1 files changed, 34 insertions(+), 31 deletions(-)
diff --git a/smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/SuperAggregateStateFeedbackMapper.xml b/smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/SuperAggregateStateFeedbackMapper.xml
index 5e84995..24adb30 100644
--- a/smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/SuperAggregateStateFeedbackMapper.xml
+++ b/smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/SuperAggregateStateFeedbackMapper.xml
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qianwen.smartman.modules.mdc.mapper.SuperAggregateStateFeedbackMapper">
-
+ <!--
<sql id="superAggregateStateColumnSql">
ts as startTime,
end_time as endTime,
@@ -22,14 +22,13 @@
is_plan as isPlan,
feedback_id as feedbackId
</sql>
-
-
- <select id="getStatusDataByFactoryDate"
- resultType="com.qianwen.smartman.modules.mdc.entity.SuperAggregateState">
- select ts as startTime,
+ -->
+ <!-- 淇敼sql寮�濮� -->
+
+ <sql id="aggregateStateColumnSql">
end_time as endTime,
- duration_collect,
- value_collect,
+ duration_collect as durationCollect,
+ value_collect as valueCollect,
calendar_code as calendarCode,
factory_year as factoryYear,
factory_month as factoryMonth,
@@ -39,39 +38,43 @@
shift_time_type as shiftTimeType,
wcs,
rps,
+ is_deleted as isDeleted,
workstation_id as workstationId,
is_plan as isPlan,
feedback_id as feedbackId
- from iot_data.super_aggregate_state_with_feedback
- where factory_date <![CDATA[>=]]> #{startDate} and factory_date <![CDATA[<=]]> #{endDate}
- and wcs > 0 and is_deleted = false
- <if test="workstationIds != null and workstationIds.size() > 0">
- AND workstation_id IN
- <foreach collection="workstationIds" item="id" open="(" separator="," close=")">
- #{id}
- </foreach>
- </if>
- </select>
-
-
-
- <select id="getStatusData" resultType="com.qianwen.smartman.modules.mdc.entity.SuperAggregateState">
+ </sql>
+
+
+ <select id="getStatusData" resultType="com.qianwen.smartman.modules.mdc.entity.SuperAggregateState">
select
- <include refid="superAggregateStateColumnSql"/>
- from iot_data.super_aggregate_state_with_feedback
- where is_deleted = 0
- and wcs > 0 and is_deleted = false
- and ts <![CDATA[>=]]> #{startDate} and ts <![CDATA[<=]]> #{endDate}
+ <include refid="aggregateStateColumnSql"/>
+ from root.f2.aggregate_state_with_feedback_*
+ where is_deleted = false
+ and wcs > 0
+ and time <![CDATA[>=]]> #{startDate} and time <![CDATA[<=]]> #{endDate}
<if test="workstationIds != null and workstationIds.size() > 0">
AND workstation_id IN
<foreach collection="workstationIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
+ align by device
</select>
-
-
-
-
+
+ <select id="getStatusDataByFactoryDate"
+ resultType="com.qianwen.smartman.modules.mdc.entity.SuperAggregateState">
+ select
+ <include refid="aggregateStateColumnSql"/>
+ from root.f2.aggregate_state_with_feedback_*
+ where factory_date <![CDATA[>=]]> #{startFactoryDate} and factory_date <![CDATA[<=]]> #{endFactoryDate}
+ and wcs > 0 and is_deleted = false
+ <if test="workstationIds != null and workstationIds.size() > 0">
+ AND workstation_id IN
+ <foreach collection="workstationIds" item="id" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </if>
+ align by device
+ </select>
</mapper>
--
Gitblit v1.9.3