Browse Source

Merge branch 'develop' of http://192.168.11.14:51037/gitadmin/tuoheng_freeway into feature_v1.0

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
2a558c1c18
57 changed files with 681 additions and 164 deletions
  1. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/UserController.java
  2. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/DeptConverMapper.java
  3. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/InspectionConverMapper.java
  4. +4
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/InspectionFileConverMapper.java
  5. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/InspectionFileHandleConverMapper.java
  6. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/ReportConverMapper.java
  7. +20
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/UserConverMapper.java
  8. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/WorkOrderConverMapper.java
  9. +14
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/UserMapper.java
  10. +5
    -20
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/user/QueryUserPageListRequest.java
  11. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/query/QueryDeptInfoService.java
  12. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/query/QueryListTreeService.java
  13. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/InspectionFileServiceImpl.java
  14. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionDetailsByIdService.java
  15. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java
  16. +1
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryNewInspectionListService.java
  17. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/DeleteHandle.java
  18. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ExecuteHandle.java
  19. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/GenerateInspectionFieldHander.java
  20. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/LiveHandle.java
  21. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/PlayBackHandle.java
  22. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemCountHandle.java
  23. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemDetailsHandle.java
  24. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemVerifyHandle.java
  25. +1
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ResubmitHandle.java
  26. +8
    -6
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/handle/QueryInspectionFileHandleByInspectionFileIdService.java
  27. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFileDistributionListService.java
  28. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListByInspectionIdService.java
  29. +16
    -16
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListByWorkOrderIdService.java
  30. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListService.java
  31. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/query/QueryInspectionHandleReportService.java
  32. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/query/QueryInspectionReportService.java
  33. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/IUserService.java
  34. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/UserServiceImpl.java
  35. +1
    -20
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/delete/DeleteUserService.java
  36. +27
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/query/QueryUserInfoByIdService.java
  37. +101
    -35
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/query/QueryUserPageListService.java
  38. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/workorder/query/QueryWorkOrderPageListService.java
  39. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/dept/DeptInfoVo.java
  40. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/dept/DeptTreeVo.java
  41. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionDetailsVo.java
  42. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileDistributionListVo.java
  43. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileHandleReportVo.java
  44. +3
    -3
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileHandleVo.java
  45. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFilePageListByInspectionIdVo.java
  46. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFilePageListVo.java
  47. +1
    -7
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileReportVo.java
  48. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileVo.java
  49. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionListVo.java
  50. +1
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionReportVo.java
  51. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionVo.java
  52. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/QueryInspectionPageListVo.java
  53. +207
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/user/UserInfoVo.java
  54. +210
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/user/UserPageListVo.java
  55. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/workorder/WorkOrderDetailsVo.java
  56. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/workorder/WorkOrderPageListVo.java
  57. +14
    -1
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/UserMapper.xml

+ 3
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/UserController.java View File

@@ -43,9 +43,9 @@ public class UserController {
* @param id 用户ID
* @return
*/
@GetMapping("/detail/{id}")
public JsonResult detail(@PathVariable("id") String id) {
return userService.detail(id);
@GetMapping("/info/{id}")
public JsonResult getUserInfo(@PathVariable("id") String id) {
return userService.getUserInfo(id);
}

/**

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/DeptConverMapper.java View File

@@ -1,8 +1,8 @@
package com.tuoheng.admin.conver;

import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.vo.DeptInfoVo;
import com.tuoheng.admin.vo.DeptTreeVo;
import com.tuoheng.admin.vo.dept.DeptInfoVo;
import com.tuoheng.admin.vo.dept.DeptTreeVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;


+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/InspectionConverMapper.java View File

@@ -3,8 +3,8 @@ package com.tuoheng.admin.conver;
import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.request.inspection.AddInspectionRequest;
import com.tuoheng.admin.request.inspection.EditInspectionRequest;
import com.tuoheng.admin.vo.InspectionDetailsVo;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionDetailsVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;


+ 4
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/InspectionFileConverMapper.java View File

@@ -3,7 +3,10 @@ package com.tuoheng.admin.conver;
import com.tuoheng.admin.entity.InspectionFile;
import com.tuoheng.admin.entity.InspectionFileDistribution;
import com.tuoheng.admin.entity.InspectionFileExtend;
import com.tuoheng.admin.vo.*;
import com.tuoheng.admin.vo.inspection.InspectionFileDistributionListVo;
import com.tuoheng.admin.vo.inspection.InspectionFilePageListByInspectionIdVo;
import com.tuoheng.admin.vo.inspection.InspectionFilePageListVo;
import com.tuoheng.admin.vo.inspection.InspectionFileReportVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/InspectionFileHandleConverMapper.java View File

@@ -1,7 +1,7 @@
package com.tuoheng.admin.conver;

import com.tuoheng.admin.entity.InspectionFileHandle;
import com.tuoheng.admin.vo.InspectionFileHandleVo;
import com.tuoheng.admin.vo.inspection.InspectionFileHandleVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/ReportConverMapper.java View File

@@ -2,7 +2,7 @@ package com.tuoheng.admin.conver;

import com.tuoheng.admin.entity.Inspection;
import com.tuoheng.admin.entity.Report;
import com.tuoheng.admin.vo.InspectionReportVo;
import com.tuoheng.admin.vo.inspection.InspectionReportVo;
import com.tuoheng.admin.vo.ReportPageListVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

+ 20
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/UserConverMapper.java View File

@@ -0,0 +1,20 @@
package com.tuoheng.admin.conver;

import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.vo.user.UserInfoVo;
import com.tuoheng.admin.vo.user.UserPageListVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface UserConverMapper {

UserConverMapper INSTANCE = Mappers.getMapper(UserConverMapper.class);

UserInfoVo fromUserToUserInfoVo(User user);

List<UserPageListVo> fromUserListToUserPageVoList(List<User> userList);

}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/conver/WorkOrderConverMapper.java View File

@@ -1,7 +1,7 @@
package com.tuoheng.admin.conver;

import com.tuoheng.admin.entity.WorkOrder;
import com.tuoheng.admin.vo.WorkOrderPageListVo;
import com.tuoheng.admin.vo.workorder.WorkOrderPageListVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;


+ 14
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/UserMapper.java View File

@@ -1,7 +1,13 @@
package com.tuoheng.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tuoheng.admin.entity.InspectionFileExtend;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListRequest;
import com.tuoheng.admin.request.user.QueryUserPageListRequest;
import org.apache.ibatis.annotations.Param;

import java.util.Map;

@@ -16,4 +22,12 @@ public interface UserMapper extends BaseMapper<User> {

Integer updateByIdList(Map<String, Object> map);

/**
* 查询任务问题分页列表
*
* @param request 巡检任务查询实体
* @return 巡检任务集合
*/
Page<User> selectPageList(@Param("page") IPage page, @Param("request") QueryUserPageListRequest request);

}

+ 5
- 20
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/user/QueryUserPageListRequest.java View File

@@ -9,6 +9,11 @@ import lombok.Data;
@Data
public class QueryUserPageListRequest extends BaseQuery {

/**
* 租户ID
*/
private String tenantId;

/**
* 用户账号
*/
@@ -19,26 +24,6 @@ public class QueryUserPageListRequest extends BaseQuery {
*/
private String realname;

/**
* 性别:1男 2女 3保密
*/
private Integer gender;

/**
* 终端 1 web端 2 小程序端
*/
private Integer terminalType;

/**
* 用户类型
*/
private Integer type;

/**
* 用户状态:1在用 2停用
*/
private Integer status;

/**
* 角色ID
*/

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/query/QueryDeptInfoService.java View File

@@ -8,7 +8,7 @@ import com.tuoheng.admin.entity.*;
import com.tuoheng.admin.enums.code.dept.QueryDeptInfoCodeEnum;
import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.DeptInfoVo;
import com.tuoheng.admin.vo.dept.DeptInfoVo;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/dept/query/QueryListTreeService.java View File

@@ -6,7 +6,7 @@ import com.tuoheng.admin.conver.DeptConverMapper;
import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.enums.code.dept.QueryDeptTreeListCodeEnum;
import com.tuoheng.admin.mapper.DeptMapper;
import com.tuoheng.admin.vo.DeptTreeVo;
import com.tuoheng.admin.vo.dept.DeptTreeVo;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/InspectionFileServiceImpl.java View File

@@ -25,7 +25,7 @@ import com.tuoheng.admin.service.inspectionfile.query.QueryInspectionFilePageLis
import com.tuoheng.admin.service.inspectionfile.query.QueryInspectionFilePageListService;
import com.tuoheng.admin.service.inspectionfile.update.UpdateInspectionFileQuestionTypeService;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.InspectionFileVo;
import com.tuoheng.admin.vo.inspection.InspectionFileVo;
import com.tuoheng.admin.vo.ListByDeptUserTypeVo;
import com.tuoheng.common.core.enums.ServiceExceptionEnum;
import com.tuoheng.common.core.exception.ServiceException;

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionDetailsByIdService.java View File

@@ -9,7 +9,7 @@ import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.enums.code.inspection.QueryInspectionDetailsByIdCodeEnum;
import com.tuoheng.admin.mapper.InspectionHistoryMapper;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.vo.InspectionDetailsVo;
import com.tuoheng.admin.vo.inspection.InspectionDetailsVo;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryInspectionPageListService.java View File

@@ -16,7 +16,7 @@ import com.tuoheng.admin.mapper.UserMapper;
import com.tuoheng.admin.request.inspection.QueryInspectionPageListRequest;
import com.tuoheng.admin.service.inspection.query.handle.GenerateInspectionFieldHander;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;

+ 1
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryNewInspectionListService.java View File

@@ -10,8 +10,7 @@ import com.tuoheng.admin.enums.code.inspection.QueryInspectionListServiceEnum;
import com.tuoheng.admin.enums.code.inspectionfile.ListByDeptUserTypeEnum;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.mapper.UserMapper;
import com.tuoheng.admin.query.InspectionFileQuery;
import com.tuoheng.admin.vo.InspectionListVo;
import com.tuoheng.admin.vo.inspection.InspectionListVo;
import com.tuoheng.common.core.enums.ServiceExceptionEnum;
import com.tuoheng.common.core.exception.ServiceException;
import com.tuoheng.common.core.utils.JsonResult;

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/DeleteHandle.java View File

@@ -3,7 +3,7 @@ package com.tuoheng.admin.service.inspection.query.handle;
import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ExecuteHandle.java View File

@@ -5,7 +5,7 @@ import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.enums.InspectionTypeEnum;
import com.tuoheng.admin.enums.UserTypeEnum;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/GenerateInspectionFieldHander.java View File

@@ -2,7 +2,7 @@ package com.tuoheng.admin.service.inspection.query.handle;

import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;

public interface GenerateInspectionFieldHander {


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/LiveHandle.java View File

@@ -4,7 +4,7 @@ import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.enums.InspectionTypeEnum;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/PlayBackHandle.java View File

@@ -3,7 +3,7 @@ package com.tuoheng.admin.service.inspection.query.handle;
import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemCountHandle.java View File

@@ -8,7 +8,7 @@ import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.InspectionFileStatusEnum;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.mapper.InspectionFileMapper;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemDetailsHandle.java View File

@@ -3,7 +3,7 @@ package com.tuoheng.admin.service.inspection.query.handle;
import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ProblemVerifyHandle.java View File

@@ -3,7 +3,7 @@ package com.tuoheng.admin.service.inspection.query.handle;
import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


+ 1
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/handle/ResubmitHandle.java View File

@@ -4,8 +4,7 @@ import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.InspectionStatusEnum;
import com.tuoheng.admin.enums.InspectionTypeEnum;
import com.tuoheng.admin.service.inspection.query.handle.GenerateInspectionFieldHander;
import com.tuoheng.admin.vo.InspectionVo;
import com.tuoheng.admin.vo.inspection.InspectionVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


+ 8
- 6
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/handle/QueryInspectionFileHandleByInspectionFileIdService.java View File

@@ -5,13 +5,12 @@ import com.tuoheng.admin.conver.InspectionFileHandleConverMapper;
import com.tuoheng.admin.entity.InspectionFile;
import com.tuoheng.admin.entity.InspectionFileHandle;
import com.tuoheng.admin.entity.QuestionType;
import com.tuoheng.admin.enums.code.inspectionfile.QueryInspectionFilePageListByInspectionIdCodeEnum;
import com.tuoheng.admin.enums.code.inspectionfilehandle.QueryInspectionFileHandleByInspectionFileIdCodeEnum;
import com.tuoheng.admin.mapper.InspectionFileHandleMapper;
import com.tuoheng.admin.mapper.InspectionFileMapper;
import com.tuoheng.admin.mapper.InspectionMapper;
import com.tuoheng.admin.mapper.QuestionTypeMapper;
import com.tuoheng.admin.vo.InspectionFileHandleVo;
import com.tuoheng.admin.vo.inspection.InspectionFileHandleVo;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
@@ -92,21 +91,25 @@ public class QueryInspectionFileHandleByInspectionFileIdService {
*/
private InspectionFileHandleVo buildInspectionFileHandleVo(InspectionFile inspectionFile, InspectionFileHandle inspectionFileHandle) {
InspectionFileHandleVo inspectionFileHandleVo;
List<String> handlerImageList = null;
String handlerImages = "";
if (null != inspectionFileHandle) {
inspectionFileHandleVo = InspectionFileHandleConverMapper.INSTANCE.fromInspectionFileHandleToInspectionFileHandleVo(inspectionFileHandle);

if (!StringUtils.isEmpty(inspectionFileHandle.getHandlerImage())) {
handlerImageList = new ArrayList<>();
String[] arr = inspectionFileHandle.getHandlerImage().split(",");
List<String> list = Arrays.stream(arr).map(String::toString).collect(Collectors.toList());
for (String str : list) {
handlerImageList.add(CommonConfig.imageURL + str);
handlerImages += CommonConfig.imageURL + str + ",";
}
}
} else {
inspectionFileHandleVo = new InspectionFileHandleVo();
}
if (StringUtils.isNotEmpty(handlerImages)) {
handlerImages = handlerImages.substring(0, handlerImages.length() - 1);
inspectionFileHandleVo.setHandlerImages(handlerImages);
}

QuestionType questionType = questionTypeMapper.selectOne(new LambdaQueryWrapper<QuestionType>()
.eq(QuestionType::getId, inspectionFile.getQuestionId())
.eq(QuestionType::getMark, 1));
@@ -116,7 +119,6 @@ public class QueryInspectionFileHandleByInspectionFileIdService {
}
inspectionFileHandleVo.setQuestionId(inspectionFile.getQuestionId());
inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail());
inspectionFileHandleVo.setHandlerImageList(handlerImageList);
return inspectionFileHandleVo;
}
}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFileDistributionListService.java View File

@@ -8,7 +8,7 @@ import com.tuoheng.admin.enums.code.inspection.QueryInspectionPageListCodeEnum;
import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFileDistributionListRequest;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.InspectionFileDistributionListVo;
import com.tuoheng.admin.vo.inspection.InspectionFileDistributionListVo;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListByInspectionIdService.java View File

@@ -11,7 +11,7 @@ import com.tuoheng.admin.enums.code.inspection.QueryInspectionPageListCodeEnum;
import com.tuoheng.admin.enums.code.inspectionfile.QueryInspectionFilePageListByInspectionIdCodeEnum;
import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListByInspectionIdRequest;
import com.tuoheng.admin.vo.InspectionFilePageListByInspectionIdVo;
import com.tuoheng.admin.vo.inspection.InspectionFilePageListByInspectionIdVo;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;

+ 16
- 16
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListByWorkOrderIdService.java View File

@@ -11,7 +11,7 @@ import com.tuoheng.admin.enums.code.inspectionfile.QueryInspectionFilePageListBy
import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFileWorkOrderPageListRequest;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.InspectionFileHandleVo;
import com.tuoheng.admin.vo.inspection.InspectionFileHandleVo;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
@@ -142,7 +142,7 @@ public class QueryInspectionFilePageListByWorkOrderIdService {
InspectionFileHandleVo inspectionFileHandleVo;
User user;
QuestionType questionType;
List<String> handlerImageList = null;
String handlerImages = "";
InspectionFileHandle inspectionFileHandle;
for (InspectionFile inspectionFile : inspectionFileList) {
inspectionFileHandleVo = new InspectionFileHandleVo();
@@ -164,26 +164,26 @@ public class QueryInspectionFilePageListByWorkOrderIdService {
if (ObjectUtil.isNotNull(inspectionFileHandleMap)) {
inspectionFileHandle = inspectionFileHandleMap.get(inspectionFile.getId());
if (null != inspectionFileHandle) {
if (!StringUtils.isEmpty(inspectionFileHandle.getHandlerImage())) {
handlerImageList = new ArrayList<>();
String[] arr = inspectionFileHandle.getHandlerImage().split(",");
List<String> list = Arrays.stream(arr).map(String::toString).collect(Collectors.toList());
for (String str : list) {
handlerImageList.add(CommonConfig.imageURL + str);
}
}

if (ObjectUtil.isNotNull(inspectionFileHandleUserMap)) {
user = inspectionFileHandleUserMap.get(inspectionFileHandle.getHandlerUser());
if (null != user) {
inspectionFileHandleVo.setHandlerUsername(user.getRealname());
}

inspectionFileHandleVo.setHandlerUser(inspectionFileHandle.getHandlerUser());
inspectionFileHandleVo.setHandlerImageList(handlerImageList);
inspectionFileHandleVo.setHandlerTime(inspectionFileHandle.getHandlerTime());
inspectionFileHandleVo.setHandlerResult(inspectionFileHandle.getHandlerResult());
}
if (StringUtils.isNotEmpty(inspectionFileHandle.getHandlerImage())) {
String[] arr = inspectionFileHandle.getHandlerImage().split(",");
List<String> list = Arrays.stream(arr).map(String::toString).collect(Collectors.toList());
for (String str : list) {
handlerImages += CommonConfig.imageURL + str + ",";
}
}
if (StringUtils.isNotEmpty(handlerImages)) {
handlerImages = handlerImages.substring(0, handlerImages.length() - 1);
inspectionFileHandleVo.setHandlerImages(handlerImages);
}
inspectionFileHandleVo.setHandlerUser(inspectionFileHandle.getHandlerUser());
inspectionFileHandleVo.setHandlerTime(inspectionFileHandle.getHandlerTime());
inspectionFileHandleVo.setHandlerResult(inspectionFileHandle.getHandlerResult());
}
}
inspectionFileHandleVoList.add(inspectionFileHandleVo);

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListService.java View File

@@ -11,7 +11,7 @@ import com.tuoheng.admin.enums.code.inspection.QueryInspectionPageListCodeEnum;
import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.request.inspectionfile.QueryInspectionFilePageListRequest;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.InspectionFilePageListVo;
import com.tuoheng.admin.vo.inspection.InspectionFilePageListVo;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;

+ 3
- 3
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/query/QueryInspectionHandleReportService.java View File

@@ -13,9 +13,9 @@ import com.tuoheng.admin.mapper.InspectionFileHandleMapper;
import com.tuoheng.admin.mapper.InspectionFileMapper;
import com.tuoheng.admin.mapper.ReportMapper;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.InspectionFileHandleReportVo;
import com.tuoheng.admin.vo.InspectionFileReportVo;
import com.tuoheng.admin.vo.InspectionReportVo;
import com.tuoheng.admin.vo.inspection.InspectionFileHandleReportVo;
import com.tuoheng.admin.vo.inspection.InspectionFileReportVo;
import com.tuoheng.admin.vo.inspection.InspectionReportVo;
import com.tuoheng.common.core.config.common.CommonConfig;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/report/query/QueryInspectionReportService.java View File

@@ -8,8 +8,8 @@ import com.tuoheng.admin.enums.code.report.QueryInspectionReportCodeEnum;
import com.tuoheng.admin.mapper.InspectionFileMapper;
import com.tuoheng.admin.mapper.ReportMapper;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.InspectionFileReportVo;
import com.tuoheng.admin.vo.InspectionReportVo;
import com.tuoheng.admin.vo.inspection.InspectionFileReportVo;
import com.tuoheng.admin.vo.inspection.InspectionReportVo;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/IUserService.java View File

@@ -33,7 +33,7 @@ public interface IUserService {
* @param id 用户ID
* @return
*/
JsonResult detail(@PathVariable("id") String id);
JsonResult getUserInfo(@PathVariable("id") String id);

/**
* 添加用户

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/UserServiceImpl.java View File

@@ -75,7 +75,7 @@ public class UserServiceImpl implements IUserService {
* @return
*/
@Override
public JsonResult detail(String id) {
public JsonResult getUserInfo(String id) {
return queryUserInfoByIdService.getUserInfo(id);
}


+ 1
- 20
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/delete/DeleteUserService.java View File

@@ -45,7 +45,7 @@ public class DeleteUserService {
* @return
*/
public JsonResult deleteByIdList(List<String> idList) {
log.info("进入删除用户业务接口");
log.info("进入删除用户业务接口, idList={}", idList);
String tenantId = CurrentUserUtil.getTenantId();
JsonResult result = this.check(tenantId, idList);
if (0 != result.getCode()) {
@@ -74,26 +74,7 @@ public class DeleteUserService {
if (CollectionUtil.isEmpty(idList)) {
return JsonResult.error(DeleteUserCodeEnum.USER_ID_IS_NULL.getCode(), DeleteUserCodeEnum.USER_ID_IS_NULL.getMsg());
}

return JsonResult.success();
}
/**
*
* 构建实体字段数据
*
* @param user
*/
private void buildUser(User user) {
if (StringUtils.isNotNull(user.getAvatar()) && user.getAvatar().contains(CommonConfig.imageURL)) {
user.setAvatar(user.getAvatar().replaceAll(CommonConfig.imageURL, ""));
} else {
//添加默认头像
user.setAvatar("imagedir/n1o1j9ndau_1670488066287.png");
}
user.setCityName("");
user.setUpdateUser(CurrentUserUtil.getUserId());
user.setUpdateTime(DateUtils.now());
}


}

+ 27
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/query/QueryUserInfoByIdService.java View File

@@ -2,10 +2,16 @@ package com.tuoheng.admin.service.user.query;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tuoheng.admin.conver.UserConverMapper;
import com.tuoheng.admin.entity.Dept;
import com.tuoheng.admin.entity.Role;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.enums.code.user.QueryUserInfoByIdCodeEnum;
import com.tuoheng.admin.mapper.DeptMapper;
import com.tuoheng.admin.mapper.RoleMapper;
import com.tuoheng.admin.mapper.UserMapper;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.user.UserInfoVo;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
@@ -26,6 +32,12 @@ public class QueryUserInfoByIdService {
@Autowired
private UserMapper userMapper;

@Autowired
private DeptMapper deptMapper;

@Autowired
private RoleMapper roleMapper;

/**
* 获取部门树形列表
*
@@ -41,7 +53,21 @@ public class QueryUserInfoByIdService {

User user = (User) result.getData();

return JsonResult.success(user);
UserInfoVo userInfoVo = UserConverMapper.INSTANCE.fromUserToUserInfoVo(user);
Dept dept = deptMapper.selectOne(new LambdaQueryWrapper<Dept>()
.eq(Dept::getId, userInfoVo.getDeptId())
.eq(Dept::getMark, 1));
if (ObjectUtil.isNotNull(dept)) {
userInfoVo.setDeptName(dept.getName());
}

Role role = roleMapper.selectOne(new LambdaQueryWrapper<Role>()
.eq(Role::getId, userInfoVo.getRoleId())
.eq(Role::getMark, 1));
if (ObjectUtil.isNotNull(role)) {
userInfoVo.setRoleName(role.getRoleName());
}
return JsonResult.success(userInfoVo);
}

/**
@@ -65,7 +91,6 @@ public class QueryUserInfoByIdService {
if (!user.getTenantId().equals(CurrentUserUtil.getTenantId())) {
return JsonResult.error(QueryUserInfoByIdCodeEnum.NON_TENANT_USER.getCode(), QueryUserInfoByIdCodeEnum.NON_TENANT_USER.getMsg());
}

return JsonResult.success(user);
}


+ 101
- 35
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/user/query/QueryUserPageListService.java View File

@@ -1,19 +1,28 @@
package com.tuoheng.admin.service.user.query;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tuoheng.admin.entity.User;
import com.tuoheng.admin.conver.UserConverMapper;
import com.tuoheng.admin.entity.*;
import com.tuoheng.admin.mapper.DeptMapper;
import com.tuoheng.admin.mapper.RoleMapper;
import com.tuoheng.admin.mapper.UserMapper;
import com.tuoheng.admin.request.user.QueryUserPageListRequest;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.user.UserPageListVo;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
* 查询用户分页列表业务层处理
*
@@ -31,6 +40,9 @@ public class QueryUserPageListService {
@Autowired
private DeptMapper deptMapper;

@Autowired
private RoleMapper roleMapper;

/**
* 获取部门树形列表
*
@@ -45,17 +57,29 @@ public class QueryUserPageListService {
}

String tenantId = CurrentUserUtil.getTenantId();

QueryWrapper<User> queryWrapper = this.buildQueryWrapper(request);
request.setTenantId(tenantId);

// 查询分页数据
IPage<User> page = new Page<>(request.getPage(), request.getLimit());
IPage<User> pageData = userMapper.selectPage(page, queryWrapper);
IPage<User> pageData = userMapper.selectPageList(page, request);

// if (CollectionUtil.isEmpty(pageData)) {
// log.info("查询用户分页列表业务:获取用户列表为空");
// }
return JsonResult.success();
if (null == pageData || pageData.getTotal() == 0) {
log.info("获取任务分页列表为空");
return JsonResult.success();
}

// 构造返回结果对象
List<UserPageListVo> userPageListVoList = this.buildUserPageListVoList(pageData.getRecords());

// 重写返回结果对象
IPage<UserPageListVo> userPageListVoPageData = new Page<>();
userPageListVoPageData.setPages(pageData.getPages());
userPageListVoPageData.setCurrent(pageData.getCurrent());
userPageListVoPageData.setSize(pageData.getSize());
userPageListVoPageData.setTotal(pageData.getTotal());
userPageListVoPageData.setRecords(userPageListVoList);

return JsonResult.success(userPageListVoPageData);
}

/**
@@ -65,38 +89,80 @@ public class QueryUserPageListService {
* @return
*/
private JsonResult check(QueryUserPageListRequest request) {

return JsonResult.success();
}

private QueryWrapper<User> buildQueryWrapper(QueryUserPageListRequest request) {
// 查询条件
QueryWrapper<User> queryWrapper = new QueryWrapper<>();
// 只显示非管理员用户
//queryWrapper.ne("is_admin", 1);
// 租户ID
queryWrapper.eq("tenant_id", CurrentUserUtil.getTenantId());
// 真实姓名
if (!StringUtils.isEmpty(request.getRealname())) {
queryWrapper.like("realname", request.getRealname());
}
// 用户账号
if (!StringUtils.isEmpty(request.getUsername())) {
queryWrapper.eq("username", request.getUsername());
/**
* 1)、查找问题类型字段
* 2)、拼接缩略图路径
*
* @param userList
* @return
*/
private List<UserPageListVo> buildUserPageListVoList(List<User> userList) {
Map<String, Dept> deptMap = this.getDeptMap(userList);
Map<Integer, Role> roleMap = this.getRoletMap(userList);
List<UserPageListVo> userPageListVoList = UserConverMapper.INSTANCE.fromUserListToUserPageVoList(userList);
Dept dept;
Role role;
for (UserPageListVo userPageListVo : userPageListVoList) {
if (ObjectUtil.isNotNull(deptMap)) {
dept = deptMap.get(userPageListVo.getDeptId());
if (null != dept) {
userPageListVo.setDeptName(dept.getName());
}
}
if (ObjectUtil.isNotNull(roleMap)) {
role = roleMap.get(userPageListVo.getRoleId());
if (null != role) {
userPageListVo.setRoleName(role.getRoleName());
}
}
}
return userPageListVoList;
}

//根据角色id查询
if (StringUtils.isNotNull((request.getRoleId()))) {
queryWrapper.eq("role_id", request.getRoleId());
/**
*
* 获取部门列表,放到map,减少循环次数
*
* @param userList
* @return
*/
private Map<String, Dept> getDeptMap(List<User> userList) {
if (CollectionUtil.isEmpty(userList)) {
return null;
}

// 状态筛选
if (StringUtils.isNotNull(request.getStatus())) {
queryWrapper.eq("status", request.getStatus());
List<String> deptIdList = userList.stream().map(o -> o.getDeptId()).collect(Collectors.toList());
List<Dept> deptList = deptMapper.selectList(new LambdaQueryWrapper<Dept>()
.in(Dept::getId, deptIdList)
.eq(Dept::getMark, 1));
if (CollectionUtil.isEmpty(deptList)) {
return null;
}
queryWrapper.eq("mark", 1);
queryWrapper.orderByDesc("create_time");
Map<String, Dept> deptMap = deptList.stream().collect(Collectors.toMap(Dept::getId, Function.identity()));
return deptMap;
}

return queryWrapper;
/**
*
* 获取角色列表,放到map,减少循环次数
*
* @param userList
* @return
*/
private Map<Integer, Role> getRoletMap(List<User> userList) {
if (CollectionUtil.isEmpty(userList)) {
return null;
}
List<String> roleIdList = userList.stream().map(o -> o.getDeptId()).collect(Collectors.toList());
List<Role> roleList = roleMapper.selectList(new LambdaQueryWrapper<Role>()
.in(Role::getId, roleIdList)
.eq(Role::getMark, 1));
if (CollectionUtil.isEmpty(roleList)) {
return null;
}
Map<Integer, Role> roleMap = roleList.stream().collect(Collectors.toMap(Role::getId, Function.identity()));
return roleMap;
}
}

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/workorder/query/QueryWorkOrderPageListService.java View File

@@ -13,7 +13,7 @@ import com.tuoheng.admin.enums.code.inspection.QueryInspectionPageListCodeEnum;
import com.tuoheng.admin.mapper.*;
import com.tuoheng.admin.request.workorder.QueryWorkOrderPageListRequest;
import com.tuoheng.admin.utils.CurrentUserUtil;
import com.tuoheng.admin.vo.WorkOrderPageListVo;
import com.tuoheng.admin.vo.workorder.WorkOrderPageListVo;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/DeptInfoVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/dept/DeptInfoVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.dept;

import com.tuoheng.admin.dto.RoadSectionDto;
import lombok.Data;

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/DeptTreeVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/dept/DeptTreeVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.dept;

import lombok.Data;


tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionDetailsVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionDetailsVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.admin.entity.InspectionHistory;

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionFileDistributionListVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileDistributionListVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionFileHandleReportVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileHandleReportVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionFileHandleVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileHandleVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
@@ -52,9 +52,9 @@ public class InspectionFileHandleVo {
private String handlerUsername;

/**
* 处理后图片列表
* 处理后图片列表,多个用","隔开
*/
private List<String> handlerImageList;
private String handlerImages;

/**
* 处理结果

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionFilePageListByInspectionIdVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFilePageListByInspectionIdVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import lombok.Data;


tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionFilePageListVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFilePageListVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionFileReportVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileReportVo.java View File

@@ -1,13 +1,7 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.admin.entity.InspectionFile;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
* 返回巡检问题报告视图Vo
*

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionFileVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import lombok.Data;


tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionListVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionListVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionReportVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionReportVo.java View File

@@ -1,7 +1,6 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.admin.entity.InspectionFile;
import lombok.Data;

import java.math.BigDecimal;

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/InspectionVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.core.common.BaseEntity;

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/QueryInspectionPageListVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/QueryInspectionPageListVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.inspection;

import com.tuoheng.common.core.common.BaseQuery;
import lombok.Data;

+ 207
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/user/UserInfoVo.java View File

@@ -0,0 +1,207 @@
package com.tuoheng.admin.vo.user;

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

import java.util.Date;

/**
* 返回用户分页列表视图Vo
*
* @author wanjing
* @team tuoheng
* @date 2022-12-20
*/
@Data
public class UserInfoVo {

/**
* 用户ID
*/
private String id;

/**
* 用户编号
*/
private String code;

/**
* 真实姓名
*/
private String realname;

/**
* 昵称
*/
private String nickname;

/**
* 性别:1男 2女 3保密
*/
private Integer gender;

/**
* 头像
*/
private String avatar;

/**
* 手机号码
*/
private String mobile;

/**
* 邮箱地址
*/
private String email;

/**
* 出生日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;

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

/**
* 部门名称
*/
private String deptName;

/**
* 省份编码
*/
private String provinceCode;

/**
* 城市编码
*/
private String cityCode;

/**
* 区县编码
*/
private String districtCode;

/**
* 街道编码
*/
private String streetCode;

/**
* 详细地址
*/
private String address;

/**
* 所属城市
*/
private String cityName;

/**
* 登录用户名
*/
private String username;

/**
* 用户类型:1管理员
*/
private Integer type;

/**
* 驾照类型:1飞行执照 2飞行许可证
*/
private Integer driverType;

/**
* 驾照编号
*/
private String driverCode;

/**
* 个人简介
*/
private String intro;

/**
* 状态:1正常 2禁用
*/
private Integer status;

/**
* 备注
*/
private String note;

/**
* 显示顺序
*/
private Integer sort;

/**
* 登录次数
*/
private Integer loginNum;

/**
* 最近登录IP
*/
private String loginIp;

/**
* 最近登录时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date loginTime;

/**
* 添加人
*/
private String createUser;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

/**
* 更新人
*/
private String updateUser;

/**
* 更新时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;

/**
* 有效标识
*/
private Integer mark;

/**
* 角色id
*/
private Integer roleId;

/**
* 角色名称
*/
private String roleName;

/**
* 标识id 小程序,pc
*/
private String clientId;

}

+ 210
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/user/UserPageListVo.java View File

@@ -0,0 +1,210 @@
package com.tuoheng.admin.vo.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* 返回用户分页列表视图Vo
*
* @author wanjing
* @team tuoheng
* @date 2022-12-20
*/
@Data
public class UserPageListVo {

/**
* 用户ID
*/
private String id;

/**
* 用户编号
*/
private String code;

/**
* 真实姓名
*/
private String realname;

/**
* 昵称
*/
private String nickname;

/**
* 性别:1男 2女 3保密
*/
private Integer gender;

/**
* 头像
*/
private String avatar;

/**
* 手机号码
*/
private String mobile;

/**
* 邮箱地址
*/
private String email;

/**
* 出生日期
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;

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

/**
* 部门名称
*/
private String deptName;

/**
* 省份编码
*/
private String provinceCode;

/**
* 城市编码
*/
private String cityCode;

/**
* 区县编码
*/
private String districtCode;

/**
* 街道编码
*/
private String streetCode;

/**
* 详细地址
*/
private String address;

/**
* 所属城市
*/
private String cityName;

/**
* 登录用户名
*/
private String username;

/**
* 用户类型:1管理员
*/
private Integer type;

/**
* 驾照类型:1飞行执照 2飞行许可证
*/
private Integer driverType;

/**
* 驾照编号
*/
private String driverCode;

/**
* 个人简介
*/
private String intro;

/**
* 状态:1正常 2禁用
*/
private Integer status;

/**
* 备注
*/
private String note;

/**
* 显示顺序
*/
private Integer sort;

/**
* 登录次数
*/
private Integer loginNum;

/**
* 最近登录IP
*/
private String loginIp;

/**
* 最近登录时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date loginTime;

/**
* 添加人
*/
private String createUser;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;

/**
* 更新人
*/
private String updateUser;

/**
* 更新时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;

/**
* 有效标识
*/
private Integer mark;

/**
* 角色id
*/
private Integer roleId;

/**
* 角色名称
*/
private String roleName;

/**
* 标识id 小程序,pc
*/
private String clientId;

}

tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/WorkOrderDetailsVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/workorder/WorkOrderDetailsVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.workorder;

import lombok.Data;


tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/WorkOrderPageListVo.java → tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/workorder/WorkOrderPageListVo.java View File

@@ -1,4 +1,4 @@
package com.tuoheng.admin.vo;
package com.tuoheng.admin.vo.workorder;

import lombok.Data;


+ 14
- 1
tuoheng-service/tuoheng-admin/src/main/resources/mapper/UserMapper.xml View File

@@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="clientId" column="client_id" />
</resultMap>
<sql id="selectThUserVo">
<sql id="selectUserVo">
id, tenant_id, code, realname, nickname, gender, avatar, mobile, email, birthday, dept_id, province_code, city_code, district_code, street_code, address, city_name, username, password, type, driver_type, driver_code, salt, intro, status, note, sort, login_num, login_ip, login_time, create_user, create_time, update_user, update_time, role_id, client_id, mark
</sql>
@@ -65,4 +65,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
</update>
<select id="selectPageList" parameterType="com.tuoheng.admin.request.user.QueryUserPageListRequest" resultMap="UserResult">
select <include refid="selectUserVo"/>
from th_oauth_user
<where>
<if test="1 == 1"> and mark = 1 </if>
<if test="request.tenantId != null and request.tenantId != ''"> and tenant_id = #{request.tenantId} </if>
<if test="request.username != null and request.username != ''"> and username like concat('%', #{request.username}, '%') </if>
<if test="request.realname != null and request.realname != ''"> and realname like concat('%', #{request.realname}, '%') </if>
<if test="request.roleId != null and request.roleId != 0"> and role_id = #{request.roleId} </if>
</where>
order by create_time desc
</select>
</mapper>

Loading…
Cancel
Save