|
|
@@ -365,21 +365,8 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); |
|
|
|
} |
|
|
|
//获取登录用户信息 |
|
|
|
User userInfo1 = CurrentUserUtil.getUserInfo(); |
|
|
|
String username = userInfo1.getUsername(); |
|
|
|
if (null == username) { |
|
|
|
return JsonResult.error(WorkOrderEnum.USER_NAME_IS_NULL.getCode(), WorkOrderEnum.USER_NAME_IS_NULL.getMsg()); |
|
|
|
} |
|
|
|
User user = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
|
|
|
.eq(User::getMark, 1) |
|
|
|
.eq(User::getUsername, username)); |
|
|
|
if (ObjectUtil.isNull(user)) { |
|
|
|
return JsonResult.error(WorkOrderEnum.USER_IS_NOT_EXIST.getCode(), WorkOrderEnum.USER_IS_NOT_EXIST.getMsg()); |
|
|
|
} |
|
|
|
User user = CurrentUserUtil.getUserInfo(); |
|
|
|
String tenantId = user.getTenantId(); |
|
|
|
if (null == tenantId) { |
|
|
|
return JsonResult.error(WorkOrderEnum.DEPT_ID_IS_NULL.getCode(), WorkOrderEnum.DEPT_ID_IS_NULL.getMsg()); |
|
|
|
} |
|
|
|
query.setTenantId(tenantId); |
|
|
|
//根据登录用户判断角色 1超级管理员 2部门管理员 3普通用户 |
|
|
|
Integer type = user.getDataPermission(); |
|
|
@@ -401,8 +388,9 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
IPage<WorkOrder> workPageData = workOrderMapper.selectPage(page, new LambdaQueryWrapper<WorkOrder>() |
|
|
|
.eq(WorkOrder::getStatus, 15) |
|
|
|
.eq(WorkOrder::getTenantId, tenantId) |
|
|
|
.eq(WorkOrder::getAssignUser, user.getId()) |
|
|
|
.between(null != query.getOrderStartTime() && null != query.getOrderEndTime(), WorkOrder::getCreateTime, query.getOrderStartTime(), query.getOrderEndTime()) |
|
|
|
.eq(WorkOrder::getMark, 1) |
|
|
|
.eq(WorkOrder::getMark, MarkEnum.VALID.getCode()) |
|
|
|
.orderByDesc(WorkOrder::getCreateTime)); |
|
|
|
//设置每条工单对应的已完成问题数量 问题状态为25问题已处理 |
|
|
|
List<WorkOrderInfoVo> collect = workPageData.getRecords().stream().map(s -> { |