From a82313d17b2b5d1c02e880122efc1b701c401dcf Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期三, 04 十二月 2024 09:58:58 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java | 30 ++++++++++++++++++++++-------- 1 files changed, 22 insertions(+), 8 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java index 000e7e4..2374f2f 100644 --- a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java @@ -215,10 +215,11 @@ @Override @DSTransactional(rollbackFor = Exception.class) - public void delete(String[] id) { - daPointDao.deleteBatchIds(Arrays.asList(id)); - daMeasurePointService.deleteByPoint(id); - daMathPointService.deleteByPoint(id); + public void delete(String[] ids) { + daPointDao.deleteBatchIds(Arrays.asList(ids)); + daMeasurePointService.deleteByPoint(ids); + daMathPointService.deleteByPoint(ids); + daCumulatePointService.deleteByPoint(ids); // 清空缓存 clearCache(); } @@ -319,10 +320,19 @@ @Override public List<DaPointDTO> getCumulatePoint(String freq) { - Map<String, Object> params = new HashMap<>(); + Map<String, Object> params = new HashMap<>(3); params.put("pointType", PointTypeEnum.CUMULATE.getCode()); params.put("isEnable", CommonConstant.IS_ENABLE); params.put("minfreqid", freq); + return daPointDao.getCumulatePoint(params); + } + + @Override + public List<DaPointDTO> getCumulatePoint(DaPointPageReqVO reqVO) { + Map<String, Object> params = new HashMap<>(3); + params.put("pointType", PointTypeEnum.CUMULATE.getCode()); + params.put("pointNo", reqVO.getPointNo()); + params.put("pointName", reqVO.getPointName()); return daPointDao.getCumulatePoint(params); } @@ -395,6 +405,13 @@ case CONSTANT: daPointEntity.setPointNo(daSequenceNumService.getAndIncreaseByCode(IncreaseCodeEnum.POINT_F.name())); break; + case CUMULATE: + DaCumulatePointDTO cumulatePoint = new DaCumulatePointDTO(); + cumulatePoint.setMomentPoint(importPoint.getMomentPoint()); + cumulatePoint.setLength(importPoint.getLength()); + cumulatePoint.setDivisor(importPoint.getDivisor()); + daCumulatePointService.add(cumulatePoint, daPointEntity.getId()); + daPointEntity.setPointNo(daSequenceNumService.getAndIncreaseByCode(IncreaseCodeEnum.POINT_L.name())); default: break; } @@ -418,9 +435,6 @@ measurePoint.setSourceId(sourcesIdMap.get(importPoint.getSourceType()).get(importPoint.getSourceName())); measurePoint.setTagNo(importPoint.getTagNo()); daMeasurePointService.update(measurePoint, new QueryWrapper<DaMeasurePointEntity>().eq("point_id",updatePoint.getId())); - - - respVO.getUpdatePointnames().add(importPoint.getPointName()); }); return respVO; -- Gitblit v1.9.3