| | |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.util.object.BeanUtils; |
| | | import com.iailab.framework.common.util.object.ConvertUtils; |
| | | import com.iailab.module.data.api.point.dto.ApiPointDTO; |
| | | import com.iailab.module.data.channel.common.service.ChannelSourceService; |
| | | import com.iailab.module.data.common.enums.CommonConstant; |
| | | import com.iailab.module.data.common.enums.IsEnableEnum; |
| | |
| | | @Resource |
| | | private DaPointCollectStatusService daPointCollectStatusService; |
| | | |
| | | private static Map<String, DaPointDTO> pointIdMap = new ConcurrentHashMap<>(); |
| | | private static Map<String, ApiPointDTO> pointIdMap = new ConcurrentHashMap<>(); |
| | | |
| | | private static Map<String, DaPointDTO> pointNoMap = new ConcurrentHashMap<>(); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public DaPointDTO getSimpleInfoById(String id) { |
| | | public ApiPointDTO getSimpleInfoById(String id) { |
| | | if (pointIdMap.containsKey(id)) { |
| | | return pointIdMap.get(id); |
| | | } |
| | | DaPointDTO dto = ConvertUtils.sourceToTarget(daPointDao.selectById(id), DaPointDTO.class); |
| | | ApiPointDTO dto = ConvertUtils.sourceToTarget(daPointDao.selectById(id), ApiPointDTO.class); |
| | | if (dto == null) { |
| | | return null; |
| | | } |
| | | pointIdMap.put(id, dto); |
| | | return pointIdMap.get(id); |
| | | return dto; |
| | | } |
| | | |
| | | @Override |