diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java index 8b81ad8..6d11012 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmInfoController.java @@ -114,6 +114,39 @@ public class EmInfoController extends BladeController { return R.data(pages); } + @RequestMapping(value = "/devices", method = {RequestMethod.GET, RequestMethod.POST}) + @ApiOperationSupport(order = 3) + @ApiOperation(value = "查询设备列表", notes = "传入查询参数") + @ApiImplicitParams({ + }) + @OperationAnnotation(moduleName = "设备管理",title = "设备信息",operatorType = OperatorType.MOBILE,businessType = + BusinessType.GENCODE, + action = "查询设备信息列表") + public R> devices(@ApiIgnore @RequestParam Map em_info, Query query) { + QueryWrapper queryWrapper = Condition.getQueryWrapper(em_info, EmInfoEntity.class); + queryWrapper.lambda().eq(EmInfoEntity::getGpid, 0); + queryWrapper.orderByDesc("create_time"); + List devices = em_infoService.list( queryWrapper); + if(CollectionUtil.isEmpty(devices)){ + return R.data(new ArrayList<>()); + } + // 获取站点列表 - 填充站点编码、站点类型、站点名称 + R> stations = stationClient.list(new StationEntity()); + if(!stations.isSuccess() || CollectionUtil.isEmpty(stations.getData())) { + return R.data(devices); + } + return R.data(devices.stream().peek(device -> { + Optional stationOptional = stations.getData().stream() + .filter(station -> Func.isNotEmpty(station.getRefDept()) && station.getRefDept().equals(device.getDepartment())).findAny(); + if(stationOptional.isPresent()) { + StationEntity stationEntity = stationOptional.get(); + device.setStationCode(stationEntity.getCode()); + device.setStationType(stationEntity.getType()); + device.setStationName(stationEntity.getName()); + } + }).collect(Collectors.toList())); + } + /** * 查看子设备列表 分页(树结构) */ diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/service/impl/InterruptionServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/service/impl/InterruptionServiceImpl.java index 085eb63..2dc4d81 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/service/impl/InterruptionServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/interruption/service/impl/InterruptionServiceImpl.java @@ -53,7 +53,7 @@ public class InterruptionServiceImpl extends ServiceImpl interruptions = this.list(queryWrapper); diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java index 448a90b..73f8e2a 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/ai/controller/RobotController.java @@ -92,6 +92,25 @@ public class RobotController extends BladeController { } /** + * 分页 代码自定义代号 + */ + @GetMapping("/robots") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "查看机器人列表", notes = "传入st_robot") + @ApiImplicitParams({ + }) + @Operate(label = "查看机器人列表",type = BusinessType.QUERY,ignore = false) + public R> robots(@ApiIgnore @RequestParam(required = false) Map st_robot) { + QueryWrapper queryWrapper = Condition.getQueryWrapper( st_robot, RobotEntity.class); + List robots = st_robotService.list(queryWrapper); + robots.stream().filter(robot -> Func.isNotEmpty(robot.getUserId())).forEach(robotEntity -> { + User user = UserCache.getUser(robotEntity.getUserId()); + robotEntity.setUserName(Optional.ofNullable(user).map(User::getName).orElse(null)); + }); + return R.data(robots); + } + + /** * 新增 代码自定义代号 */ @PostMapping("/save") diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java index 72fa80b..a16cbb7 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java @@ -57,4 +57,6 @@ public interface ProjectService extends IService { * @return 机构-项目树 */ List> deptProjectTree(ProjectDTO project); + + List projects(String emCode, ContentDTO content); } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java index b3725f8..94fb2de 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java @@ -41,6 +41,7 @@ import java.util.stream.Stream; /** * 巡检项目service + * @author ysj */ @Service @AllArgsConstructor @@ -161,6 +162,40 @@ public class ProjectServiceImpl extends ServiceImpl projects(String deviceCodes, ContentDTO content) { + return Stream.of(deviceCodes.split(",")).map(emCode -> { + LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery() + .eq(ProjectEntity::getEmCode, emCode) + .eq(ProjectEntity::getStatus, ObjectConstants.ProjectEnableEnum.YES.getEnableType()); + // 根据设备编号获取项目 + ProjectEntity project = this.getOne(queryWrapper); + ProjectVO projectVO = ProjectWrapper.build().entityVO(project); + if(Func.isNotEmpty(project)) { + // 获取巡检项目下的巡检内容 + LambdaQueryWrapper projectContentQuery = Wrappers.lambdaQuery() + .select(ProjectContentEntity::getContentId) + .eq(ProjectContentEntity::getProjectId, project.getId()); + ProjectContentService projectContentService = SpringUtil.getBean(ProjectContentServiceImpl.class); + List projectContentList = projectContentService.list(projectContentQuery); + if(CollectionUtil.isNotEmpty(projectContentList)) { + List contentIdList = projectContentList.stream().map(ProjectContentEntity::getContentId).collect(Collectors.toList()); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.in(CollectionUtil.isNotEmpty(contentIdList),ContentEntity::getId, contentIdList); + List contents = contentService.list(wrapper); + projectVO.setContentList(ContentWrapper.build().listVO(contents)); + } + } + return projectVO; + }).collect(Collectors.toList()); + } + + /** * 获取项目树中 机构下巡检项目的子集 * @param project 筛选条件 * @param deptId 机构ID diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java index f0e12a3..8625fd6 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java @@ -177,6 +177,14 @@ public class ProjectController { return R.data(projectService.getProjectAndContentByEmCode(emCode,content,query)); } + @GetMapping("/projects") + @ApiOperation(value = "根据设备编号获取项目以及内容列表(分页展示)") + @ApiOperationSupport(order = 10) + public R> projects(String emCode, ContentDTO content) { + return R.data(projectService.projects(emCode,content)); + } + + @GetMapping("/getProjectAndContentByEmCodes") @ApiOperation(value = "根据多个设备编号(逗号分隔)获取项目以及内容列表(分页展示)") @ApiOperationSupport(order = 8) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java index f50f9d3..3d4e2e6 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java @@ -113,7 +113,7 @@ public class HomeServiceImpl implements HomeService { count.setCount(stations.stream().filter(station->serve.equals(station.getServeType()) && type.equals(station.getType())).count()); } count.setType(String.valueOf(type)); - count.setTypeName(DictCache.getValue("stationType", type)); + count.setTypeName(DictCache.getValue("stationType", String.valueOf(type))); return count; }).collect(Collectors.toList()))); return counts.stream().sorted(Comparator.comparing(StationCountVo::getServeType)).collect(Collectors.toList()); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/OperMaintenanceTaskController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/OperMaintenanceTaskController.java index a414138..9dec0cc 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/OperMaintenanceTaskController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/OperMaintenanceTaskController.java @@ -122,6 +122,21 @@ public class OperMaintenanceTaskController extends BladeController { return taskService.list(req); } + /** + * 分页 + */ + @PostMapping("/maintenances") + @ApiOperationSupport(order = 60) + @ApiOperation(value = "查询日常维护任务") + @ApiImplicitParams({ + }) + @OperationAnnotation(moduleName = "日常维护", title = "日常维护记录", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE, + action = "分页查询日常维护记录列表") + public R> maintenances(@RequestBody OperMaintenanceTaskDTO param) { + return R.data(taskService.maintenances(param)); + } + + @PostMapping("/exportMaintenance") @ApiOperationSupport(order = 2) @ApiOperation(value = "日常维护记录导出") diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/IOperMaintenanceTaskService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/IOperMaintenanceTaskService.java index 483e90e..b6b4090 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/IOperMaintenanceTaskService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/IOperMaintenanceTaskService.java @@ -103,4 +103,6 @@ public interface IOperMaintenanceTaskService extends IService getMaintenanceListStatistics(String startTime, String endTime,Long deptId); List exportMaintenance(OperMaintenanceTaskDTO req); + + List maintenances(OperMaintenanceTaskDTO param); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java index 213d1d4..c5e6e35 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java @@ -638,6 +638,21 @@ public class OperMaintenanceTaskServiceImpl extends ServiceImpl maintenances(OperMaintenanceTaskDTO param) { + Wrapper queryWrapper = getQueryWrapper(param); + List maintenances = this.list(queryWrapper); + if(CollectionUtil.isEmpty(maintenances)){ + return new ArrayList<>(); + } + return OperMaintenanceTaskWrapper.build().listVO(maintenances); + } + private VoteChartVo getVoteChartVo(List list) { VoteChartVo voteChartVo = new VoteChartVo(); List finishIds = Optional.ofNullable(list).orElse(new ArrayList<>()).stream().filter(s -> StringUtil.isNotBlank(s.getFlowTaskName())&&"结束".equals(s.getFlowTaskName())).map(BaseEntity::getId).collect(Collectors.toList()); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java index f5382aa..afea424 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationVideoTypeController.java @@ -9,6 +9,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzims.common.utils.Condition; import com.hnac.hzims.operational.station.dto.StationVideoTypeDTO; import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity; @@ -29,16 +30,13 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; - -import org.springblade.core.mp.support.Condition; + import org.springblade.core.mp.support.Query; -import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.StringUtil; -import org.springblade.system.entity.AuthClient; import org.springblade.system.entity.Dept; import org.springblade.system.feign.ISysClient; import org.springframework.beans.factory.annotation.Value; @@ -250,12 +248,22 @@ public class StationVideoTypeController extends BladeController { @ApiOperationSupport(order = 120) @ApiOperation(value = "获取Flv配置列表", notes = "获取Flv配置列表") public R getFlvVideoConfig(VideoConfigEntity req,Query query) { - LambdaQueryWrapper queryWrapper = com.hnac.hzims.common.utils.Condition.getQueryWrapper(VideoConfigEntity.class, req); + LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(VideoConfigEntity.class, req); queryWrapper.eq(VideoConfigEntity::getCreateUser,AuthUtil.getUserId()); - IPage page = videoConfigService.page(com.hnac.hzims.common.utils.Condition.getPage(query), queryWrapper); + IPage page = videoConfigService.page(Condition.getPage(query), queryWrapper); return R.data(page); } + @GetMapping("/flvVideoConfigs") + @ApiOperationSupport(order = 120) + @ApiOperation(value = "获取Flv配置列表", notes = "获取Flv配置列表") + public R flvVideoConfigs(VideoConfigEntity req) { + LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(VideoConfigEntity.class, req); + queryWrapper.eq(VideoConfigEntity::getCreateUser,AuthUtil.getUserId()); + return R.data(videoConfigService.list(queryWrapper)); + } + + @PostMapping ("/updateFlvVideoConfig") @ApiOperationSupport(order = 120) @ApiOperation(value = "更新Flv配置列表", notes = "更新Flv配置列表") diff --git a/hzims-service/weather/src/main/java/com/hnac/hzims/weather/config/XxlJobConfig.java b/hzims-service/weather/src/main/java/com/hnac/hzims/weather/config/XxlJobConfig.java index 2c12319..1d65b1e 100644 --- a/hzims-service/weather/src/main/java/com/hnac/hzims/weather/config/XxlJobConfig.java +++ b/hzims-service/weather/src/main/java/com/hnac/hzims/weather/config/XxlJobConfig.java @@ -42,7 +42,7 @@ public class XxlJobConfig { log.info(">>>>>>>>>>> xxl-job config init."); XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor(); xxlJobSpringExecutor.setAdminAddresses(adminAddresses); - xxlJobSpringExecutor.setAppName(appName); + xxlJobSpringExecutor.setAppname(appName); xxlJobSpringExecutor.setIp(ip); xxlJobSpringExecutor.setPort(port); System.out.println(">>>>>>>>>>> xxl-rpc, port " + port);