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
|
* @date 2023/10/24 14:04
|
*/
|
@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));
|
}
|
}
|