| | |
| | | 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; |