Lius
2024-04-02 4bd74ded216856176d47a87f69572084023be329
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/mapper/xml/MdcHomeMapper.xml
@@ -61,4 +61,45 @@
        </where>
    </select>
    <select id="getEquipmentDayUtilizationStatistics" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentStatisticalInfo">
        SELECT
            the_date,
            SUM ( process_long ) processLong,
            SUM ( open_long ) openLong
        FROM
            mdc_equipment_statistical_info
        <where>
            <if test="equipmentIdList != null and equipmentIdList.size() > 0 ">
                AND equipment_id IN
                <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")">
                    #{id}
                </foreach>
            </if>
            <if test="dateList != null and dateList.size() > 0 ">
                AND the_date IN
                <foreach collection="dateList" index="index" item="date" open="(" separator="," close=")">
                    #{date}
                </foreach>
            </if>
        </where>
        GROUP BY
            the_date
    </select>
    <select id="getEquipmentOEEMonthStatistics" resultType="org.jeecg.modules.mdc.entity.MdcOverallEquipmentEfficiency">
        SELECT
            *
        FROM
            mdc_overall_equipment_efficiency
        <where>
            AND valid_date = #{validDate}
            <if test="equipmentIdList != null and equipmentIdList.size() > 0 ">
                AND equipment_id IN
                <foreach collection="equipmentIdList" index="index" item="id" open="(" separator="," close=")">
                    #{id}
                </foreach>
            </if>
        </where>
    </select>
</mapper>