| | |
| | | package com.flightfeather.monitor.service.impl; |
| | | |
| | | import com.flightfeather.monitor.domain.ds1.mapper.DustStatisticsValueMapper; |
| | | import com.flightfeather.monitor.mapper.FugitiveDustMapper; |
| | | import com.flightfeather.monitor.pojo.*; |
| | | import com.flightfeather.monitor.service.FugitiveDustService; |
| | | import com.flightfeather.monitor.utils.StringUtil; |
| | | import com.github.pagehelper.Page; |
| | | import com.github.pagehelper.PageHelper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | |
| | | |
| | | @Autowired |
| | | private FugitiveDustMapper fugitiveDustMapper; |
| | | |
| | | @Autowired |
| | | private DustStatisticsValueMapper dustStatisticsValueMapper; |
| | | |
| | | @Override |
| | | public PageBean page(Integer page, Integer pageSize, String siteName, String mnCode, String beginTime, String endTime,String[] scenarioType) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PageBean pageAnalysisTime(Integer page, Integer pageSize, String siteName, String beginTime, String endTime) { |
| | | public PageBean pageAnalysisTime(Integer page, Integer pageSize, String siteName, String beginTime, |
| | | String endTime, String orderProp, |
| | | Boolean asc) { |
| | | //设置分页参数 |
| | | PageHelper.startPage(page,pageSize); |
| | | //执行查询 |
| | | List<AnalysisDustData> infoList=fugitiveDustMapper.analysisByTime(siteName,beginTime,endTime); |
| | | Page<AnalysisDustData> p = PageHelper.startPage(page, pageSize); |
| | | //获取查询结果 |
| | | Page<AnalysisDustData> p=(Page<AnalysisDustData>)infoList; |
| | | String prop = StringUtil.INSTANCE.camelCaseToUnderline(orderProp); |
| | | dustStatisticsValueMapper.selectByOrder(siteName, beginTime, endTime, prop, asc); |
| | | |
| | | //封装PageBean对象*/ |
| | | PageBean pageBean=new PageBean(p.getTotal(),p.getResult()); |
| | | return pageBean; |
| | | //封装PageBean对象 |
| | | return new PageBean(p.getTotal(), p.getResult()); |
| | | } |
| | | |
| | | @Override |