diff --git a/hzims-service/message/message.iml b/hzims-service/message/message.iml index 4ad42fe..1daccae 100644 --- a/hzims-service/message/message.iml +++ b/hzims-service/message/message.iml @@ -1,363 +1,8 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/CentralMonitorController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/CentralMonitorController.java index 90a1dc8..00de1d9 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/CentralMonitorController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/CentralMonitorController.java @@ -58,4 +58,11 @@ public class CentralMonitorController extends BladeController { IPage result = monitorService.selectOriginalDataByRealIds(page, size, roleId,start,end); return R.data(result); } + + @GetMapping("/communications") + @ApiOperation("查询通讯告警图表数据") + @ApiOperationSupport(order = 4) + public R> communications(String roleId,Date start,@RequestParam Date end){ + return R.data(monitorService.communications(roleId,start,end)); + } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/CentralMonitorService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/CentralMonitorService.java index 1a8c211..cc3caf8 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/CentralMonitorService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/CentralMonitorService.java @@ -31,4 +31,5 @@ public interface CentralMonitorService{ */ IPage selectOriginalDataByRealIds(Integer page, Integer size, String roleId, Date start, Date end); + List communications(String roleId, Date start, Date end); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java index 991720d..e3f5b51 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java @@ -137,6 +137,52 @@ public class CentralMonitorServiceImpl implements CentralMonitorService { return iPage; } + /** + * 查询通讯告警图表数据 + * @param roleId + * @param start + * @param end + * @return + */ + @Override + public List communications(String roleId, Date start, Date end) { + OriginalDataQuery originalDataQuery = new OriginalDataQuery(); + originalDataQuery.setRealId(roleId); + originalDataQuery.setLimit(1); + originalDataQuery.setPage(100000); + // 当日 + if(ObjectUtil.isEmpty(start) && ObjectUtil.isEmpty(end)){ + Calendar calendar = Calendar.getInstance(); + originalDataQuery.setEndTime(calendar.getTime()); + calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY)); + calendar.add(Calendar.MINUTE,-calendar.get(Calendar.MINUTE)); + calendar.add(Calendar.SECOND,-calendar.get(Calendar.SECOND)); + calendar.add(Calendar.MILLISECOND,-calendar.get(Calendar.MILLISECOND)); + originalDataQuery.setBeginTime(calendar.getTime()); + }else{ + originalDataQuery.setBeginTime(start); + originalDataQuery.setEndTime(end); + } + Result> originalDataByRealIds = historyDataSearchClient.getOriginalDataByRealIds(originalDataQuery); + if (!originalDataByRealIds.isSuccess()) { + throw new ServiceException("数据不存在"); + } + HzPage data = originalDataByRealIds.getData(); + return data.getRecords().stream().map(item -> { + PointDataVo pointDataVo = new PointDataVo(); + BeanUtils.copyProperties(item, pointDataVo); + //通过站点id获取站点名称 + String code = pointDataVo.getStation(); + StationEntity station = stationService.getOne(Wrappers.lambdaQuery() + .eq(StationEntity::getCode,code) + ); + if(ObjectUtil.isNotEmpty(station)){ + pointDataVo.setStationName(station.getName()); + } + return pointDataVo; + }).collect(Collectors.toList()); + } + /** * LocalDateTime 转 date diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassController.java index 5299a0e..809c9c3 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/controller/ImsDutyClassController.java @@ -69,6 +69,22 @@ public class ImsDutyClassController extends BladeController { IPage pages = imsDutyClassService.page(Condition.getPage(query), queryWrapper); return R.data(pages); } + + @GetMapping("/dutyClasss") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查询列表", notes = "传入imsDutyClass") + @OperationAnnotation(moduleName = "值班管理",title = "值班配置",operatorType = OperatorType.MOBILE,businessType = + BusinessType.GENCODE,action + = "查询班次设置列表") + public R> dutyClasss(ImsDutyClassEntity imsDutyClass, Query query) { + LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new ImsDutyClassEntity(),imsDutyClass); + if(null != imsDutyClass.getCreateDept()){ + queryWrapper.eq(ImsDutyClassEntity::getCreateDept,imsDutyClass.getCreateDept()); + } + queryWrapper.orderByDesc(ImsDutyClassEntity::getCreateTime); + return R.data(imsDutyClassService.list(queryWrapper)); + } + /** * 查询所有班次列表(不分页) */ diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OverDetailsController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OverDetailsController.java index 39ec3c9..8a6340a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OverDetailsController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/controller/OverDetailsController.java @@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.validation.constraints.NotNull; +import java.util.List; @RestController @@ -37,4 +38,13 @@ public class OverDetailsController extends BladeController { public R> list(OverDetailsVo vo, Query query) { return service.pageCondition(vo, query); } -} + + + @GetMapping("/details") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "查询检修卡列表", notes = "查询条件:over_id") + public R> details(OverDetailsVo vo) { + return R.data(service.details(vo)); + } + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/OverDetailsService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/OverDetailsService.java index 65a357d..06f2822 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/OverDetailsService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/OverDetailsService.java @@ -19,4 +19,6 @@ public interface OverDetailsService extends IService { R> pageCondition(OverDetailsVo vo, Query query); boolean clear(List longList); + + List details(OverDetailsVo vo); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/OverDetailsServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/OverDetailsServiceImpl.java index 3cff480..2855220 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/OverDetailsServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/OverDetailsServiceImpl.java @@ -21,8 +21,10 @@ import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.ObjectUtil; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; import java.util.Optional; +import java.util.stream.Collectors; @Slf4j @Service @@ -71,4 +73,28 @@ public class OverDetailsServiceImpl extends ServiceImpl details(OverDetailsVo vo) { + QueryWrapper queryWrapper = new QueryWrapper() {{ + if(Optional.ofNullable(vo.getOverId()).isPresent()){ + eq("over_id",vo.getOverId()); + } + if(Optional.ofNullable(vo.getStatus()).isPresent()){ + eq("status",vo.getStatus()); + } + }}; + List details = this.list(queryWrapper); + if(CollectionUtil.isEmpty(details)){ + return new ArrayList<>(); + } + List records = OverDetailsWrapper.build().listVO(details); + return records.stream().peek(record->{ + OverConfigEntity configEntity = configService.getById(record.getOverConfigId()); + if(ObjectUtil.isEmpty(configEntity)){ + return; + } + record.setOverName(configEntity.getOverName()); + }).collect(Collectors.toList()); + } + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationAttributeController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationAttributeController.java index 2e1bed8..3352894 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationAttributeController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationAttributeController.java @@ -63,6 +63,21 @@ public class StationAttributeController extends BladeController { return R.data(stationAttributeService.page(Condition.getPage(query), queryWrapper)); } + @GetMapping("/attributes") + @ApiOperation("查詢屬性详情") + @ApiImplicitParams({ + @ApiImplicitParam(value = "stationId" , name = "站点ID", paramType = "path", dataType="String"), + @ApiImplicitParam(value = "emCode" , name = "设备编码", paramType = "path", dataType="String"), + @ApiImplicitParam(value = "emName" , name = "设备名称", paramType = "path", dataType="String"), + }) + @ApiOperationSupport(order = 6) + public R> attributes(StationAttributeDto attributeDto) { + StationAttributeEntity entity = BeanUtil.copy(attributeDto,StationAttributeEntity.class); + LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(new StationAttributeEntity(),entity); + queryWrapper.orderByAsc(StationAttributeEntity::getSort); + return R.data(stationAttributeService.list(queryWrapper)); + } + @PostMapping("/saveOrUpdateBatch") @ApiOperation("批量新增/修改") @ApiOperationSupport(order = 2) @@ -93,7 +108,7 @@ public class StationAttributeController extends BladeController { @GetMapping("/bandingMonitor") @ApiOperation("根据设备编码更新集中监控监测点绑定") - @ApiOperationSupport(order = 4) + @ApiOperationSupport(order = 5) public R> bandingMonitor(@ApiParam(value = "站点编码",required = true) String stationCode, @ApiParam(value = "设备编码",required = true) String emCode, @ApiParam(value = "站点类型",required = true) String stationType,