diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java index 71054f0..fdd0378 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java @@ -132,4 +132,6 @@ public class OperMaintenanceLibraryEntity extends TenantEntity { @QueryField(condition = SqlCondition.LIKE) private Long createDept; + @ApiModelProperty("班次树,机构-班次类型-班次") + private String dutyClassTree; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/Swagger2Config.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/Swagger2Config.java index 18d9559..971515b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/Swagger2Config.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/Swagger2Config.java @@ -20,8 +20,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; * @Serial 1.0 * @Date 2023/4/13 13:40 */ -@Configuration -@EnableSwagger2 +//@Configuration +//@EnableSwagger2 public class Swagger2Config implements WebMvcConfigurer { 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 afea65f..90a1dc8 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 @@ -48,6 +48,8 @@ public class CentralMonitorController extends BladeController { * @return */ @GetMapping("/selectCommunication/{page}/{size}") + @ApiOperation("查询通讯告警的最后一小时的运行数据") + @ApiOperationSupport(order = 2) public R selectCommunication(@PathVariable Integer page, @PathVariable Integer size, String roleId, diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StAlamRecordController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StAlamRecordController.java index 545f561..48d89e4 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StAlamRecordController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StAlamRecordController.java @@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.*; import java.util.Date; -@Api(tags = "告警记录") +@Api(value = "告警记录",tags = "告警记录") @RestController @RequestMapping("/stAlamRecord") public class StAlamRecordController { diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java index d4324cd..5f4e853 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java @@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; -@Api(tags = "重点关注属性") +@Api(value = "重点关注属性",tags = "重点关注属性") @RestController @RequestMapping("/stFocusProperties") public class StFocusPropertiesController { diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java index a923cc2..4f6e03f 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java @@ -12,10 +12,12 @@ import org.apache.commons.lang3.StringUtils; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.CollectionUtil; +import org.springblade.core.tool.utils.Func; import org.springblade.system.feign.ISysClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Comparator; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; @@ -113,10 +115,10 @@ public class ImsDutyClassServiceImpl extends BaseServiceImpl getDutyClassTree(Long deptId) { List dutyClassTrees = this.baseMapper.getDutyClassTree(deptId); - dutyClassTrees.forEach(node -> { - node.setName(Optional.ofNullable(sysClient.getDeptName(node.getId())).map(R::getData).orElse(null)); - }); - return dutyClassTrees; + List result = dutyClassTrees.stream().peek(node -> node.setName(Optional.ofNullable(sysClient.getDeptName(node.getId())).map(R::getData).orElse(null))) + .filter(t -> Func.isNotEmpty(t.getName())) + .sorted(Comparator.comparing(DutyClassTypeTree::getName)).collect(Collectors.toList()); + return result; } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java index d845d0f..8bc2c87 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java @@ -3,6 +3,7 @@ package com.hnac.hzims.operational.maintenance.controller; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; import com.hnac.hzims.operational.maintenance.service.MaintenanceService; +import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; @@ -25,6 +26,7 @@ import java.util.List; @RequiredArgsConstructor @RestController @RequestMapping("/maintenance") +@Api(value = "日常维护管理",tags = "日常维护管理") public class MaintenanceController { diff --git a/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 b/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 index 94cf96e..5ad9b92 100644 --- a/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 +++ b/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 @@ -30,4 +30,6 @@ CREATE TABLE `HZIMS_OPER_CONSTRUCTION` ( `UPDATE_USER` BIGINT(20) NULL DEFAULT NULL COMMENT '修改人', `UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`ID`) USING BTREE -) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC; \ No newline at end of file +) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC; + +alter table `hzims_oper_maintenance_library` add column `duty_class_tree` VARCHAR(100) NULL COMMENT '班次树,机构/班次类型/班次'; \ No newline at end of file