Lius
3 天以前 08394ddba46994e5b6c05080fc9b40b4daf36292
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcEquipmentStatisticalInfoMapper.xml
@@ -13,6 +13,10 @@
        SELECT TOP 1 process_long FROM mdc_equipment_statistical_info WHERE equipment_id = #{equipmentId} AND the_date = #{validDate}
    </select>
    <select id="findMdcEquipmentStatisticalInfo" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo">
        SELECT * FROM mdc_equipment_statistical_info WHERE equipment_id = #{equipmentId} AND the_date BETWEEN #{start} AND #{end}
    </select>
    <select id="findByEquipmentAndMonth" resultType="org.jeecg.modules.mdc.dto.MdcEquipmentStatisticalDto">
        SELECT
            SUM(open_long) openLong,
@@ -30,15 +34,15 @@
    <select id="findByEquipmentAndDate" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo">
        SELECT
            the_date,
            AVG ( open_long ) openLong,
            AVG ( wait_long ) waitLong,
            AVG ( process_long ) processLong,
            AVG ( close_long ) closeLong,
            AVG ( error_long ) errorLong
            AVG( open_long ) openLong,
            AVG( wait_long ) waitLong,
            AVG( process_long ) processLong,
            AVG( close_long ) closeLong,
            AVG( error_long ) errorLong
        FROM
            mdc_equipment_statistical_info
        <where>
            the_date = #{date}
            the_date BETWEEN #{start} AND #{end}
            AND equipment_id IN
            <foreach collection="equipmentList" index="index" item="id" open="(" separator="," close=")">
                #{id}
@@ -49,7 +53,7 @@
    </select>
    <select id="findByEquIdAndDate" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo">
        SELECT TOP 1 * FROM mdc_equipment_statistical_info WHERE equipment_id = #{equipmentId} AND the_date = #{date}
        SELECT * FROM mdc_equipment_statistical_info WHERE equipment_id = #{equipmentId} AND the_date BETWEEN #{start} AND #{end} ORDER BY the_date
    </select>
    <select id="findByEquIdAndMonth" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo">