瀏覽代碼

工单问题 工单小程序接口调整

tags/v1.3.4
陈璐 4 月之前
父節點
當前提交
1d85422d6e
共有 1 個文件被更改,包括 13 次插入6 次删除
  1. +13
    -6
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java

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

@@ -156,7 +156,14 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}
//登录用户信息
User user = CurrentUserUtil.getUserInfo();
// User user = CurrentUserUtil.getUserInfo();
User user = new User();
user.setId("0d695f6ff9441e0ba21cdd86d5cafcbd")
.setDataPermission(1)
.setTenantId("f9c3de911d228b6e51eafb510aeaea7d")
.setDeptId("e2efb06b239beed004ef9672fed72934");


if (ObjectUtil.isNull(user)) {
return JsonResult.error(WorkOrderEnum.USER_IS_NOT_EXIST.getCode(), WorkOrderEnum.USER_IS_NOT_EXIST.getMsg());
}
@@ -186,7 +193,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
if (RoleEnum.SUPER_ADMIN.getCode() == type) {
//查询当前租户下所有工单数据
IPage<WorkOrder> workPageData = workOrderMapper.selectPage(page, Wrappers.<WorkOrder>lambdaQuery()
.in(WorkOrder::getStatus, 5, 12)
.in(WorkOrder::getStatus, 5)
.eq(WorkOrder::getTenantId, tenantId)
.between(null != query.getOrderStartTime() && null != query.getOrderEndTime(), WorkOrder::getCreateTime, query.getOrderStartTime(), query.getOrderEndTime())
.eq(WorkOrder::getMark, MarkEnum.VALID.getCode())
@@ -222,7 +229,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO

//查询当前部门及子部门下所有工单数据
IPage<WorkOrder> workPageData = workOrderMapper.selectPage(page, Wrappers.<WorkOrder>lambdaQuery()
.in(WorkOrder::getStatus, 5, 12)
.in(WorkOrder::getStatus, 5)
.in(WorkOrder::getDeptId,deptIdList)
.eq(WorkOrder::getTenantId, tenantId)
.between(null != query.getOrderStartTime() && null != query.getOrderEndTime(), WorkOrder::getCreateTime, query.getOrderStartTime(), query.getOrderEndTime())
@@ -251,7 +258,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
return JsonResult.error(QueryDeptChildListCodeEnum.DEPT_ID_IS_NULL.getCode(),QueryDeptChildListCodeEnum.DEPT_ID_IS_NULL.getMsg());
}
IPage<WorkOrder> workPageData = workOrderMapper.selectPage(page, Wrappers.<WorkOrder>lambdaQuery()
.in(WorkOrder::getStatus, 5, 12)
.in(WorkOrder::getStatus, 5)
.eq(WorkOrder::getDeptId,deptId)
.eq(WorkOrder::getTenantId, tenantId)
.between(null != query.getOrderStartTime() && null != query.getOrderEndTime(), WorkOrder::getCreateTime, query.getOrderStartTime(), query.getOrderEndTime())
@@ -375,7 +382,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
return vo;
}).collect(Collectors.toList());
//当待处理问题总数为0时,此工单不出现在代办工单列表并且工单状态修改为15已完成
List<WorkOrderInfoVo> collect = workOrderList.stream().filter(f -> f.getPromTodo() == 0).collect(Collectors.toList());
List<WorkOrderInfoVo> collect = workOrderList.stream().filter(f -> f.getPromTodo() == 0 && !f.getStatus().equals(WorkOrderStatusEnum.PENDING_REJECT.getCode())).collect(Collectors.toList());
if (null != collect) {
for (WorkOrderInfoVo workOrderInfoVo : collect) {
//每一个工单对应的状态发生改变,一个工单id对应一个工单
@@ -390,7 +397,7 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
}
}
//工单的待处理问题个数不为0时 重新返回
WorkOrderInfoList = workOrderList.stream().filter(h -> h.getPromTodo() != 0).collect(Collectors.toList());
WorkOrderInfoList = workOrderList.stream().filter(h -> h.getPromTodo() != 0 || h.getStatus().equals(WorkOrderStatusEnum.PENDING_REJECT.getCode())).collect(Collectors.toList());

System.out.println("----->"+ WorkOrderInfoList);


Loading…
取消
儲存