| | |
| | | JSONObject jsonObject = JSON.parseObject(id); |
| | | return CommonResult.success(trendAnalysisService.queryPointInfo(jsonObject.getString("id"))); |
| | | } |
| | | |
| | | @ApiOperation("首次报警点位数据查询") |
| | | @PostMapping("/firstInfo") |
| | | public CommonResult<List<TrendVo>> queryListByCount(@RequestBody TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum) { |
| | | return CommonResult.success(trendAnalysisService.queryListByCount(trendAnalysisParam,pageSize,pageNum)); |
| | | } |
| | | } |
| | |
| | | List<TrendVo> list(TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum); |
| | | |
| | | List<TrendVo> queryPointInfo(String id); |
| | | |
| | | List<TrendVo> queryListByCount(TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum); |
| | | } |
| | |
| | | import com.ycl.service.trend.TrendAnalysisService; |
| | | import com.ycl.vo.TrendVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.amqp.RabbitProperties; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class TrendAnalysisServiceImpl implements TrendAnalysisService { |
| | |
| | | return trendAnalysisMapper.selectTrendPointInfo(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<TrendVo> queryListByCount(TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum) { |
| | | return trendAnalysisMapper.selectTrendInfo(trendAnalysisParam).stream().filter(item->"1".equals(item.getCount())).collect(Collectors.toList()); |
| | | } |
| | | } |