46 lines
1.3 KiB
Java
46 lines
1.3 KiB
Java
package com.gunshi.project.xyt.service;
|
|
|
|
import com.gunshi.project.xyt.entity.so.RealRainBaseSo;
|
|
import com.gunshi.project.xyt.entity.vo.RealRainListVo;
|
|
import com.gunshi.project.xyt.mapper.RealRainMapper;
|
|
import lombok.Data;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.commons.compress.utils.Lists;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import java.util.Comparator;
|
|
import java.util.List;
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.concurrent.Executors;
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
/**
|
|
* Description:
|
|
* Created by wanyan on 2024/7/8
|
|
*
|
|
* @author wanyan
|
|
* @version 1.0
|
|
*/
|
|
@Service
|
|
@Data
|
|
@Slf4j
|
|
public class RealRainService {
|
|
|
|
@Autowired
|
|
private RealRainMapper realRainMapper;
|
|
|
|
/**
|
|
* 实时雨情-降雨信息-查询接口
|
|
*
|
|
* @param realRainBaseSo
|
|
* @return
|
|
*/
|
|
public List<RealRainListVo> getRealRainList(RealRainBaseSo realRainBaseSo) {
|
|
List<RealRainListVo> result = realRainMapper.getRealRainList(realRainBaseSo.getStm(), realRainBaseSo.getEtm());
|
|
|
|
result.sort(Comparator.comparing(RealRainListVo::getDrp, Comparator.nullsFirst(Double::compareTo)).reversed().thenComparing(RealRainListVo::getStcd));
|
|
return result;
|
|
}
|
|
}
|