yangbin
2025-02-19 efdecc7019261f8fdc875505281f54ef7a3bfbce
lxzn-module-mdc/src/main/java/org/jeecg/modules/mdc/service/impl/EquipmentStatisticalInfoServiceImpl.java
@@ -1,10 +1,14 @@
package org.jeecg.modules.mdc.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.mdc.entity.EquipmentStatisticalInfo;
import org.jeecg.modules.mdc.mapper.EquipmentStatisticalInfoMapper;
import org.jeecg.modules.mdc.service.IEquipmentStatisticalInfoService;
import org.jeecg.modules.mdc.subcontrol.vo.LastWeekDataVo;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @author Lius
@@ -12,4 +16,26 @@
 */
@Service
public class EquipmentStatisticalInfoServiceImpl extends ServiceImpl<EquipmentStatisticalInfoMapper, EquipmentStatisticalInfo> implements IEquipmentStatisticalInfoService {
    @Override
    public List<LastWeekDataVo> findDataForBigScreen(List<String> equipmentIdList, String monday, String saturday) {
        return this.baseMapper.findDataForBigScreen(equipmentIdList, monday, saturday);
    }
    @Override
    public Integer findEquipmentId(List<String> equipmentIdList, String date) {
        List<String> list = this.baseMapper.findEquipmentId(equipmentIdList, date);
        return list.size();
    }
    @Override
    public List<LastWeekDataVo> findDataRankingForBigScreen(List<String> equipmentIdList, String monday, String saturday) {
        return this.baseMapper.findDataRankingForBigScreen(equipmentIdList, monday, saturday);
    }
    @Override
    public Long selectSize(String equipmentId, String monday, String saturday) {
        return this.baseMapper.selectCount(new LambdaQueryWrapper<EquipmentStatisticalInfo>().
                eq(EquipmentStatisticalInfo::getEquipment, equipmentId).ge(EquipmentStatisticalInfo::getTheDate, monday).le(EquipmentStatisticalInfo::getTheDate, saturday));
    }
}