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. 4
      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)
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
* @Date 2023/4/13 13:40
*/
@Configuration
@EnableSwagger2
//@Configuration
//@EnableSwagger2
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
*/
@GetMapping("/selectCommunication/{page}/{size}")
@ApiOperation("查询通讯告警的最后一小时的运行数据")
@ApiOperationSupport(order = 2)
public R selectCommunication(@PathVariable Integer page,
@PathVariable Integer size,
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;
@Api(tags = "告警记录")
@Api(value = "告警记录",tags = "告警记录")
@RestController
@RequestMapping("/stAlamRecord")
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;
@Api(tags = "重点关注属性")
@Api(value = "重点关注属性",tags = "重点关注属性")
@RestController
@RequestMapping("/stFocusProperties")
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.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<ImsDutyClassMapper,
@Override
public List<DutyClassTypeTree> getDutyClassTree(Long deptId) {
List<DutyClassTypeTree> dutyClassTrees = this.baseMapper.getDutyClassTree(deptId);
dutyClassTrees.forEach(node -> {
node.setName(Optional.ofNullable(sysClient.getDeptName(node.getId())).map(R::getData).orElse(null));
});
return dutyClassTrees;
List<DutyClassTypeTree> 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;
}
}

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.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 {

4
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;
) 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