yangbin
2025-02-20 710df8489c740910bda9a557d9a7fdc6cf39df41
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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));
    }
}