|
|
@@ -770,13 +770,23 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
} |
|
|
|
//根据用户角色判断 1超级管理员 2部门管理员 3普通用户 |
|
|
|
if (RoleEnum.SUPER_ADMIN.getCode() == type) { |
|
|
|
//获取当前登录用户(超级管理员)已完成工单列表 |
|
|
|
//获取当前登录用户(被分配人员)的待处理工单列表 |
|
|
|
List<WorkOrder> workOrderData = workOrderMapper.selectList(Wrappers.<WorkOrder>lambdaQuery() |
|
|
|
.eq(WorkOrder::getMark, MarkEnum.VALID.getCode()) |
|
|
|
.like(WorkOrder::getAssignUser, user.getId()) |
|
|
|
.eq(WorkOrder::getStatus, 10) |
|
|
|
.eq(WorkOrder::getAssignDeptId, user.getDeptId()) |
|
|
|
.between(WorkOrder::getAssignTime, startTime, endTime)); |
|
|
|
if(CollectionUtil.isNotEmpty(workOrderData) || workOrderData.size() != 0){ |
|
|
|
vo.setWeekWorkOrderTodoSum(workOrderData.size()); |
|
|
|
} |
|
|
|
//获取当前登录用户的租户下的已完成工单列表 |
|
|
|
List<WorkOrder> workOrders = workOrderMapper.selectList(Wrappers.<WorkOrder>lambdaQuery() |
|
|
|
.eq(WorkOrder::getMark, MarkEnum.VALID.getCode()) |
|
|
|
.eq(WorkOrder::getTenantId, tenantId) |
|
|
|
.eq(WorkOrder::getStatus, 15) |
|
|
|
.between(WorkOrder::getUpdateTime, startTime, endTime)); |
|
|
|
if (StringUtils.isNotEmpty(workOrders)) { |
|
|
|
if (CollectionUtil.isNotEmpty(workOrders) || workOrders.size() != 0) { |
|
|
|
vo.setWeekWorkOrderFinishedSum(workOrders.size()); |
|
|
|
} |
|
|
|
} |
|
|
@@ -791,10 +801,9 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
.eq(WorkOrder::getMark, MarkEnum.VALID.getCode()) |
|
|
|
.like(WorkOrder::getAssignUser, user.getId()) |
|
|
|
.eq(WorkOrder::getStatus, 10) |
|
|
|
.eq(WorkOrder::getTenantId, tenantId) |
|
|
|
.eq(WorkOrder::getDeptId, user.getDeptId()) |
|
|
|
.eq(WorkOrder::getAssignDeptId, user.getDeptId()) |
|
|
|
.between(WorkOrder::getAssignTime, startTime, endTime)); |
|
|
|
if (StringUtils.isNotEmpty(workOrders)) { |
|
|
|
if (CollectionUtil.isNotEmpty(workOrders) || workOrders.size() != 0) { |
|
|
|
vo.setWeekWorkOrderTodoSum(workOrders.size()); |
|
|
|
} |
|
|
|
//获取当前登录用户(被分配人员)的已完成工单列表 |
|
|
@@ -802,10 +811,9 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO |
|
|
|
.eq(WorkOrder::getMark, MarkEnum.VALID.getCode()) |
|
|
|
.like(WorkOrder::getAssignUser, user.getId()) |
|
|
|
.eq(WorkOrder::getStatus, 15) |
|
|
|
.eq(WorkOrder::getTenantId, tenantId) |
|
|
|
.eq(WorkOrder::getDeptId, user.getDeptId()) |
|
|
|
.eq(WorkOrder::getAssignDeptId, user.getDeptId()) |
|
|
|
.between(WorkOrder::getUpdateTime, startTime, endTime)); |
|
|
|
if (StringUtils.isNotEmpty(result)) { |
|
|
|
if (CollectionUtil.isNotEmpty(result) || result.size() != 0) { |
|
|
|
vo.setWeekWorkOrderFinishedSum(result.size()); |
|
|
|
} |
|
|
|
} |