| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.dynamic.datasource.annotation.DSTransactional; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.util.object.ConvertUtils; |
| | |
| | | |
| | | |
| | | @Override |
| | | public PageResult<DaPointEntity> queryPage(DaPointPageReqVO reqVO) { |
| | | return daPointDao.selectPage(reqVO); |
| | | public PageResult<DaPointDTO> queryPage(DaPointPageReqVO reqVO) { |
| | | IPage<DaPointDTO> page = daPointDao.selectPage(reqVO); |
| | | return new PageResult<DaPointDTO>(page.getRecords(), page.getTotal()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public List<DaPointDTO> list(Map<String, Object> params) { |
| | | Object page = params.get("page"); |
| | | Object limit = params.get("limit"); |
| | | Object pointType = params.get("pointType"); |
| | | List<String> pointNos = new ArrayList<>(); |
| | | if (params.get("pointNos") != null) { |
| | |
| | | measurePoint.setSourceId(dataPoint.getSourceOption().get(1)); |
| | | measurePoint.setTagNo(dataPoint.getSourceOption().get(2)); |
| | | daMeasurePointService.update(measurePoint); |
| | | } else if (PointTypeEnum.CALCULATE_POINT.equals(dataPoint.getPointType())) { |
| | | } else if (PointTypeEnum.CALCULATE_POINT.getName().equals(dataPoint.getPointType())) { |
| | | daMathPointService.update(dataPoint.getMathPoint()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @DSTransactional(rollbackFor = Exception.class) |
| | | public void delete(String[] ids) { |
| | | daPointDao.deleteBatchIds(Arrays.asList(ids)); |
| | | daMeasurePointService.deleteByPoint(ids); |
| | | daMathPointService.deleteByPoint(ids); |
| | | public void delete(String[] id) { |
| | | daPointDao.deleteBatchIds(Arrays.asList(id)); |
| | | daMeasurePointService.deleteByPoint(id); |
| | | daMathPointService.deleteByPoint(id); |
| | | } |
| | | |
| | | @Override |