Browse Source

# 机构班次树优化

zhongwei
haungxing 9 months ago
parent
commit
f8e2765509
  1. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java
  2. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/Swagger2Config.java
  3. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/CentralMonitorController.java
  4. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StAlamRecordController.java
  5. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/StFocusPropertiesController.java
  6. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyClassServiceImpl.java
  7. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java
  8. 2
      hzims-service/operational/src/main/resources/db/4.0.0 .sql.1

2
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) @QueryField(condition = SqlCondition.LIKE)
private Long createDept; private Long createDept;
@ApiModelProperty("班次树,机构-班次类型-班次")
private String dutyClassTree;
} }

4
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 * @Serial 1.0
* @Date 2023/4/13 13:40 * @Date 2023/4/13 13:40
*/ */
@Configuration //@Configuration
@EnableSwagger2 //@EnableSwagger2
public class Swagger2Config implements WebMvcConfigurer { public class Swagger2Config implements WebMvcConfigurer {

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/CentralMonitorController.java

@ -48,6 +48,8 @@ public class CentralMonitorController extends BladeController {
* @return * @return
*/ */
@GetMapping("/selectCommunication/{page}/{size}") @GetMapping("/selectCommunication/{page}/{size}")
@ApiOperation("查询通讯告警的最后一小时的运行数据")
@ApiOperationSupport(order = 2)
public R selectCommunication(@PathVariable Integer page, public R selectCommunication(@PathVariable Integer page,
@PathVariable Integer size, @PathVariable Integer size,
String roleId, String roleId,

2
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; import java.util.Date;
@Api(tags = "告警记录") @Api(value = "告警记录",tags = "告警记录")
@RestController @RestController
@RequestMapping("/stAlamRecord") @RequestMapping("/stAlamRecord")
public class StAlamRecordController { public class StAlamRecordController {

2
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; import java.util.List;
@Api(tags = "重点关注属性") @Api(value = "重点关注属性",tags = "重点关注属性")
@RestController @RestController
@RequestMapping("/stFocusProperties") @RequestMapping("/stFocusProperties")
public class StFocusPropertiesController { public class StFocusPropertiesController {

10
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.mp.base.BaseServiceImpl;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.system.feign.ISysClient; import org.springblade.system.feign.ISysClient;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -113,10 +115,10 @@ public class ImsDutyClassServiceImpl extends BaseServiceImpl<ImsDutyClassMapper,
@Override @Override
public List<DutyClassTypeTree> getDutyClassTree(Long deptId) { public List<DutyClassTypeTree> getDutyClassTree(Long deptId) {
List<DutyClassTypeTree> dutyClassTrees = this.baseMapper.getDutyClassTree(deptId); List<DutyClassTypeTree> dutyClassTrees = this.baseMapper.getDutyClassTree(deptId);
dutyClassTrees.forEach(node -> { List<DutyClassTypeTree> result = dutyClassTrees.stream().peek(node -> node.setName(Optional.ofNullable(sysClient.getDeptName(node.getId())).map(R::getData).orElse(null)))
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 dutyClassTrees; return result;
} }
} }

2
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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse;
import com.hnac.hzims.operational.maintenance.service.MaintenanceService; import com.hnac.hzims.operational.maintenance.service.MaintenanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -25,6 +26,7 @@ import java.util.List;
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
@RequestMapping("/maintenance") @RequestMapping("/maintenance")
@Api(value = "日常维护管理",tags = "日常维护管理")
public class MaintenanceController { public class MaintenanceController {

2
hzims-service/operational/src/main/resources/db/4.0.0 .sql.1

@ -31,3 +31,5 @@ CREATE TABLE `HZIMS_OPER_CONSTRUCTION` (
`UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间', `UPDATE_TIME` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
PRIMARY KEY (`ID`) USING BTREE PRIMARY KEY (`ID`) USING BTREE
) ENGINE = INNODB CHARACTER SET = UTF8MB4 COLLATE = UTF8MB4_GENERAL_CI ROW_FORMAT = DYNAMIC; ) 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 '班次树,机构/班次类型/班次';
Loading…
Cancel
Save