Преглед изворни кода

修改应急代码

tags/V1.3.3
wanjing пре 1 година
родитељ
комит
c8116a2748
5 измењених фајлова са 20 додато и 14 уклоњено
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/query/AccidentQuery.java
  2. +0
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/accident/QueryAccidentCardListRequest.java
  3. +6
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/query/QueryAccidentCardPageListService.java
  4. +6
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/query/QueryAccidentPageListService.java
  5. +3
    -7
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/query/AccidentQuery.java Прегледај датотеку

@@ -43,6 +43,11 @@ public class AccidentQuery extends BaseQuery {
*/
private Date accidentEndTime;

/**
* 部门ID
*/
private String deptId;

/**
* 部门集合
*/

+ 0
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/accident/QueryAccidentCardListRequest.java Прегледај датотеку

@@ -1,10 +1,7 @@
package com.tuoheng.admin.request.accident;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**

+ 6
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/query/QueryAccidentCardPageListService.java Прегледај датотеку

@@ -153,7 +153,7 @@ public class QueryAccidentCardPageListService {
//当前租户下
User user = CurrentUserUtil.getUserInfo();
String tenantId = user.getTenantId();
List<String> deptIdList = this.getDeptIdList(user);
List<String> deptIdList = this.getDeptIdList(user, query.getDeptId());
query.setDeptIdList(deptIdList);
query.setTenantId(tenantId);
IPage<Accident> page = new Page<>(query.getPage(), query.getLimit());
@@ -207,8 +207,12 @@ public class QueryAccidentCardPageListService {
* @param user
* @return
*/
private List<String> getDeptIdList(User user) {
private List<String> getDeptIdList(User user, String deptId) {
List<String> deptIdList = new ArrayList<>();
if (StringUtils.isNotEmpty(deptId)) {
deptIdList.add(deptId);
return deptIdList;
}
if (DataPermissionEnum.ALL.getCode() == user.getDataPermission()) {
return null;
} else if (DataPermissionEnum.DEPT_AND_SUB_DEPT.getCode() == user.getDataPermission()) {

+ 6
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/query/QueryAccidentPageListService.java Прегледај датотеку

@@ -60,7 +60,7 @@ public class QueryAccidentPageListService {
User user = CurrentUserUtil.getUserInfo();
String tenantId = user.getTenantId();

List<String> deptIdList = this.getDeptIdList(user);
List<String> deptIdList = this.getDeptIdList(user, query.getDeptId());
query.setDeptIdList(deptIdList);
query.setTenantId(tenantId);

@@ -116,8 +116,12 @@ public class QueryAccidentPageListService {
* @param user
* @return
*/
private List<String> getDeptIdList(User user) {
private List<String> getDeptIdList(User user, String deptId) {
List<String> deptIdList = new ArrayList<>();
if (StringUtils.isNotEmpty(deptId)) {
deptIdList.add(deptId);
return deptIdList;
}
if (DataPermissionEnum.ALL.getCode() == user.getDataPermission()) {
return null;
} else if (DataPermissionEnum.DEPT_AND_SUB_DEPT.getCode() == user.getDataPermission()) {

+ 3
- 7
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java Прегледај датотеку

@@ -99,8 +99,9 @@ public class QueryInspectionPageListService {

public JsonResult getPageList(QueryInspectionPageListRequest request) {
// log.info("进入查询巡检任务分页列表业务");
String userId = CurrentUserUtil.getUserId();
String tenantId = CurrentUserUtil.getTenantId();
User user = CurrentUserUtil.getUserInfo();
String userId = user.getId();
String tenantId = user.getTenantId();
request.setTenantId(tenantId);

// 不查应急任务
@@ -112,11 +113,6 @@ public class QueryInspectionPageListService {
return result;
}

User user = userMapper.selectOne(new LambdaQueryWrapper<User>()
.eq(User::getTenantId, tenantId)
.eq(User::getId, userId)
.eq(User::getMark, 1));

Dept dept = deptMapper.selectOne(new LambdaQueryWrapper<Dept>()
.eq(Dept::getTenantId, tenantId)
.eq(Dept::getId, user.getDeptId())

Loading…
Откажи
Сачувај