| | |
| | | |
| | | import cn.hutool.core.date.LocalDateTimeUtil; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.util.List; |
| | | import com.qianwen.smartman.common.constant.DateConstant; |
| | | import com.qianwen.smartman.modules.mdc.entity.SuperAggregateOutput; |
| | |
| | | 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")); |
| | | superAggregateOutputList = this.baseMapper.getOutputDataByFactoryDate(workstationIds, Integer.parseInt(LocalDateTimeUtil.format(startDate, "yyyyMMdd")) , Integer.parseInt(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)); |
| | | //好像界面上没有调用 |
| | | //superAggregateOutputList = this.baseMapper.getOutputDataByNaturalDate(workstationIds, LocalDateTimeUtil.format(startDate, DateConstant.PATTERN_DATE_TIME), LocalDateTimeUtil.format(endDate.plusDays(1L), DateConstant.PATTERN_DATE_TIME)); |
| | | LocalDateTime startTime = LocalDateTime.of(startDate, LocalTime.MIN); |
| | | LocalDateTime endTime = LocalDateTime.of(endDate.plusDays(1L), LocalTime.MIN); |
| | | superAggregateOutputList = this.baseMapper.getOutputDataByNaturalDate(workstationIds, startTime,endTime ); |
| | | } |
| | | return superAggregateOutputList; |
| | | } |