| | |
| | | package com.ycl.calculate; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ycl.platform.base.CheckIndex; |
| | | import com.ycl.platform.domain.entity.CheckIndexCar; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.entity.YwPoint; |
| | | import com.ycl.platform.domain.result.HK.SnapshotDataMonitorResult; |
| | | import com.ycl.platform.mapper.YwPointMapper; |
| | | import com.ycl.platform.service.ITMonitorService; |
| | | import constant.CheckConstants; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | // 检查是否已存在今日数据 |
| | | Optional<T> existingIndex = checkIndexList.stream() |
| | | .filter(index -> key.equals(index.getDeptId().toString()) && |
| | | (key.startsWith("Province_") ? CheckConstants.Examine_Tag_City.equals(index.getExamineTag()) |
| | | (key.startsWith("Province_") ? CheckConstants.Examine_Tag_Province.equals(index.getExamineTag()) |
| | | : CheckConstants.Examine_Tag_County.equals(index.getExamineTag()))) |
| | | .findFirst(); |
| | | |
| | |
| | | try { |
| | | checkIndex = clazz.getDeclaredConstructor().newInstance(); |
| | | checkIndex.setDeptId(key.startsWith("Province_") ? Long.parseLong(key.split("_")[1]) : Long.parseLong(key)); |
| | | checkIndex.setExamineTag(key.startsWith("Province_") ? CheckConstants.Examine_Tag_City : CheckConstants.Examine_Tag_County); |
| | | checkIndex.setExamineTag(key.startsWith("Province_") ? CheckConstants.Examine_Tag_Province : CheckConstants.Examine_Tag_County); |
| | | checkIndex.setCreateTime(new Date()); |
| | | } catch (Exception e) { |
| | | checkIndex = null; |