瀏覽代碼

修改小程序七天工单数据

tags/v1.0.0^2
chengwang 1 年之前
父節點
當前提交
659966c98d
共有 1 個文件被更改,包括 16 次插入8 次删除
  1. +16
    -8
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java

+ 16
- 8
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java 查看文件

@@ -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());
}
}

Loading…
取消
儲存