yangys
2025-04-11 120755e6874893d284fda5f617924d46960286c0
smart-man-boot/src/main/resources/com/qianwen/smartman/modules/mdc/mapper/SuperAggregateStateMapper.xml
@@ -6,7 +6,7 @@
        insert into iot_data.aggregate_state_${workstationId}
        values ${sql}
    </insert>
   <!--
    <insert id="saveState">
        insert into iot_data.aggregate_state_${workstationId} USING iot_data.super_aggregate_state
        TAGS(${workstationId}) values
@@ -16,14 +16,14 @@
            #{item.shiftIndex}, #{item.shiftTimeType}, #{item.wcs}, #{item.rps}, #{item.isDeleted},#{item.isPlan})
        </foreach>
    </insert>
    <update id="createTable">
        create table if not exists iot_data.aggregate_state_${workstationId} using super_aggregate_state tags
        (
            #{workstationId}
        )
    </update>
 -->
    <select id="countStatsShiftEndTimeNotNull" resultType="com.qianwen.smartman.modules.mdc.dto.CountResult">
        select sum(duration_collect) as nums, value_collect status
        from iot_data.super_aggregate_state
@@ -484,6 +484,8 @@
        </foreach>
         align by device
    </select>
    <!-- 这个有用吗 -->
    <select id="listCrossDay" resultType="com.qianwen.smartman.modules.mdc.entity.SuperAggregateState">
        select ts              as startTime,
               end_time        as endTime,
@@ -1039,7 +1041,7 @@
        where factory_date = #{factoryDate}
        and wcs > 0
        and shift_index = #{shiftIndex}
        and calendar_code = '${calendarCode}'
        and calendar_code = "#{calendarCode}"
        and is_deleted = false
        <if test="ids != null and ids.size() > 0">
            AND workstation_id IN