| | |
| | | @Slf4j |
| | | public class IndexCalculationUtils { |
| | | //检查是否存在当日数据 |
| | | public <I extends CheckIndex> I getCheckIndex(String key, List<I> checkIndexList, Class<I> clazz) { |
| | | I checkIndex; |
| | | public <T extends CheckIndex> T getCheckIndex(String key, List<T> checkIndexList, Class<T> clazz) { |
| | | T checkIndex; |
| | | |
| | | // 检查是否已存在今日数据 |
| | | Optional<I> existingIndex = checkIndexList.stream() |
| | | Optional<T> existingIndex = checkIndexList.stream() |
| | | .filter(index -> key.startsWith(ApiConstants.Province) ? |
| | | CheckConstants.Examine_Tag_Province.equals(index.getExamineTag()) && key.split("_")[1].equals(index.getDeptId().toString()) |
| | | : CheckConstants.Examine_Tag_County.equals(index.getExamineTag()) && key.equals(index.getDeptId().toString())) |