yangys
2024-04-01 14f1953b1944b3e53d8312e151902c4695faa2e1
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package com.qianwen.smartman.modules.mdc.service.impl;
 
import cn.hutool.core.date.LocalDateTimeUtil;
import java.time.LocalDate;
import java.util.List;
import com.qianwen.smartman.common.constant.DateConstant;
import com.qianwen.smartman.modules.mdc.entity.SuperAggregateOutput;
import com.qianwen.smartman.modules.mdc.enums.StatisticalMethodEnum;
import com.qianwen.smartman.modules.mdc.mapper.SuperAggregateOutputMapper;
import com.qianwen.smartman.modules.mdc.service.ISuperAggregateOutputService;
import org.springframework.stereotype.Service;
 
@Service
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/mdc/service/impl/SuperAggregateOutputServiceImpl.class */
public class SuperAggregateOutputServiceImpl implements ISuperAggregateOutputService {
    private final SuperAggregateOutputMapper baseMapper;
 
    public SuperAggregateOutputServiceImpl(final SuperAggregateOutputMapper baseMapper) {
        this.baseMapper = baseMapper;
    }
 
    @Override // org.springblade.modules.mdc.service.ISuperAggregateOutputService
    public List<SuperAggregateOutput> getOutputData(List<Long> workstationIds, StatisticalMethodEnum statisticalMethodEnum, LocalDate startDate, LocalDate endDate) {
        List<SuperAggregateOutput> superAggregateOutputList;
        if (StatisticalMethodEnum.SHIFT.equals(statisticalMethodEnum) || StatisticalMethodEnum.DAY.equals(statisticalMethodEnum) || StatisticalMethodEnum.WEEK.equals(statisticalMethodEnum) || StatisticalMethodEnum.MONTH.equals(statisticalMethodEnum)) {
            superAggregateOutputList = this.baseMapper.getOutputDataByFactoryDate(workstationIds, LocalDateTimeUtil.format(startDate, "yyyyMMdd"), LocalDateTimeUtil.format(endDate, "yyyyMMdd"));
        } else {
            superAggregateOutputList = this.baseMapper.getOutputDataByNaturalDate(workstationIds, LocalDateTimeUtil.format(startDate, DateConstant.PATTERN_DATE_TIME), LocalDateTimeUtil.format(endDate.plusDays(1L), DateConstant.PATTERN_DATE_TIME));
        }
        return superAggregateOutputList;
    }
 
    @Override // org.springblade.modules.mdc.service.ISuperAggregateOutputService
    public List<SuperAggregateOutput> queryPerfByDay(Long workstationId, String startTime, String endTime, Long employeeId) {
        return this.baseMapper.queryPerfByDay(workstationId, startTime, endTime, employeeId);
    }
 
    @Override // org.springblade.modules.mdc.service.ISuperAggregateOutputService
    public List<SuperAggregateOutput> queryPerfByWeek(Long workstationId, List<Integer> weeks, Long employeeId) {
        return this.baseMapper.queryPerfByWeek(workstationId, weeks, employeeId);
    }
 
    @Override // org.springblade.modules.mdc.service.ISuperAggregateOutputService
    public List<SuperAggregateOutput> queryPerfByMonth(Long workstationId, List<Integer> months, Long employeeId) {
        return this.baseMapper.queryPerfByMonth(workstationId, months, employeeId);
    }
 
    @Override // org.springblade.modules.mdc.service.ISuperAggregateOutputService
    public List<SuperAggregateOutput> queryPerfByEtDay(Long employeeId, String time) {
        return this.baseMapper.queryPerfByEtDay(employeeId, time);
    }
 
    @Override // org.springblade.modules.mdc.service.ISuperAggregateOutputService
    public List<SuperAggregateOutput> queryPerfByEtWeek(Long employeeId, Integer week) {
        return this.baseMapper.queryPerfByEtWeek(employeeId, week);
    }
 
    @Override // org.springblade.modules.mdc.service.ISuperAggregateOutputService
    public List<SuperAggregateOutput> queryPerfByEtMonth(Long employeeId, Integer month) {
        return this.baseMapper.queryPerfByEtMonth(employeeId, month);
    }
 
    @Override // org.springblade.modules.mdc.service.ISuperAggregateOutputService
    public List<SuperAggregateOutput> queryPerfByWtDay(Long workstationId, String time) {
        return this.baseMapper.queryPerfByWtDay(workstationId, time);
    }
 
    @Override // org.springblade.modules.mdc.service.ISuperAggregateOutputService
    public List<SuperAggregateOutput> queryPerfByWtWeek(Long workstationId, Integer week) {
        return this.baseMapper.queryPerfByWtWeek(workstationId, week);
    }
 
    @Override // org.springblade.modules.mdc.service.ISuperAggregateOutputService
    public List<SuperAggregateOutput> queryPerfByWtMonth(Long workstationId, Integer month) {
        return this.baseMapper.queryPerfByWtMonth(workstationId, month);
    }
}