| | |
| | | <!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, |
| | |
| | | is_plan as isPlan, |
| | | feedback_id as feedbackId |
| | | </sql> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | --> |
| | | <!-- 修改sql开始 --> |
| | | |
| | | <sql id="aggregateStateColumnSql"> |
| | |
| | | rps, |
| | | is_deleted as isDeleted, |
| | | workstation_id as workstationId, |
| | | is_plan as isPlan |
| | | is_plan as isPlan, |
| | | feedback_id as feedbackId |
| | | </sql> |
| | | |
| | | <!-- 由于表数据一样(iot_data.super_aggregate_state_with_feedback),我们也没有反馈,所以暂时都查一个表 --> |
| | | |
| | | <select id="getStatusData" resultType="com.qianwen.smartman.modules.mdc.entity.SuperAggregateState"> |
| | | select |
| | | <include refid="aggregateStateColumnSql"/> |
| | | from root.f2.aggregate_state_* |
| | | from root.f2.aggregate_state_with_feedback_* |
| | | where is_deleted = false |
| | | and wcs > 0 |
| | | and time <![CDATA[>=]]> #{startDate} and time <![CDATA[<=]]> #{endDate} |
| | |
| | | resultType="com.qianwen.smartman.modules.mdc.entity.SuperAggregateState"> |
| | | select |
| | | <include refid="aggregateStateColumnSql"/> |
| | | from root.f2.aggregate_state_* |
| | | 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"> |