Explorar el Código

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/V1.3.3
wanjing hace 1 año
padre
commit
feb576902b
Se han modificado 1 ficheros con 2 adiciones y 9 borrados
  1. +2
    -9
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryNewInspectionListService.java

+ 2
- 9
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryNewInspectionListService.java Ver fichero

@@ -44,14 +44,7 @@ public class QueryNewInspectionListService {
public JsonResult getList() {
//获取登录用户信息
User user = CurrentUserUtil.getUserInfo();
if (ObjectUtil.isNull(user)) {
JsonResult.error(ListByDeptUserTypeEnum.USER_IS_NULL.getCode(), ListByDeptUserTypeEnum.USER_IS_NULL.getMsg());
}
String tenantId = user.getTenantId();
if (StringUtils.isEmpty(tenantId)) {
JsonResult.error(ListByDeptUserTypeEnum.TENANT_ID_IS_NULL.getCode(), ListByDeptUserTypeEnum.TENANT_ID_IS_NULL.getMsg());
}

//判断用户角色 1超级管理员 2部门管理员 3普通用户
if (null == user.getDataPermission()) {
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
@@ -64,7 +57,7 @@ public class QueryNewInspectionListService {
.orderByDesc(Inspection::getCreateTime)
.last("limit 5"));
if (CollectionUtil.isEmpty(inspectionList)) {
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
return JsonResult.success();
}
if (DataPermissionEnum.ALL.getCode() == user.getDataPermission() || DataPermissionEnum.DEPT.getCode() == user.getDataPermission()) {
Stream<InspectionListVo> inspections = this.getInspectionListVoStream(inspectionList);
@@ -85,7 +78,7 @@ public class QueryNewInspectionListService {
.orderByDesc(Inspection::getCreateTime)
.last("limit 5"));
if (CollectionUtil.isEmpty(inspectionList)) {
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
return JsonResult.success();
}
Stream<InspectionListVo> inspectionListVoStream = this.getInspectionListVoStream(inspectionList);
return JsonResult.success(inspectionListVoStream);

Cargando…
Cancelar
Guardar