| | |
| | | } |
| | | |
| | | @Override |
| | | public PageResult<ApiPointDTO> getPointPage(HashMap map) { |
| | | IPage<ApiPointDTO> page = daPointDao.getPointPage(getPage(map, Constant.CREATE_TIME, false),map); |
| | | return new PageResult<>(page.getRecords(), page.getTotal()); |
| | | } |
| | | |
| | | @Override |
| | | public List<DaPointDTO> getMathPoint(String freq) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("pointType", PointTypeEnum.CALCULATE_POINT.getCode()); |
| | |
| | | DaPointEntity updatePoint = BeanUtils.toBean(importPoint, DaPointEntity.class); |
| | | updatePoint.setId(existPoint.getId()); |
| | | baseDao.updateById(updatePoint); |
| | | DaMeasurePointEntity measurePoint = new DaMeasurePointEntity(); |
| | | measurePoint.setSourceType(importPoint.getSourceType()); |
| | | measurePoint.setSourceId(sourcesIdMap.get(importPoint.getSourceType()).get(importPoint.getSourceName())); |
| | | measurePoint.setTagNo(importPoint.getTagNo()); |
| | | daMeasurePointService.update(measurePoint, new QueryWrapper<DaMeasurePointEntity>().eq("point_id",updatePoint.getId())); |
| | | switch (PointTypeEnum.getEumByCode(updatePoint.getPointType())) { |
| | | case MEASURE_POINT: |
| | | DaMeasurePointEntity measurePoint = new DaMeasurePointEntity(); |
| | | measurePoint.setSourceType(importPoint.getSourceType()); |
| | | measurePoint.setSourceId(sourcesIdMap.get(importPoint.getSourceType()).get(importPoint.getSourceName())); |
| | | measurePoint.setTagNo(importPoint.getTagNo()); |
| | | daMeasurePointService.update(measurePoint, new QueryWrapper<DaMeasurePointEntity>().eq("point_id",updatePoint.getId())); |
| | | |
| | | |
| | | break; |
| | | case CALCULATE_POINT: |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | respVO.getUpdatePointnames().add(importPoint.getPointName()); |
| | | }); |
| | | return respVO; |