Explorar el Código

小程序 待办工单 接口优化

workOrder0626
陈璐 hace 4 meses
padre
commit
f29e0c9600
Se han modificado 1 ficheros con 9 adiciones y 6 borrados
  1. +9
    -6
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java

+ 9
- 6
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java Ver fichero

@@ -196,15 +196,14 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
}
//查询属于分配自己的数据
List<WorkOrder> workOrders = myWorkList(user, query);
records.addAll(workOrders);

if (CollectionUtils.isEmpty(records) && CollectionUtils.isNotEmpty(workOrders)){
records = workOrders;
}
list = this.getWorkOrderList(records,user);
//按照时间+分配人排序
List<WorkOrderInfoVo> newList =
list.stream().sorted(Comparator.comparing(WorkOrderInfoVo::getCreateTime).thenComparing(WorkOrderInfoVo::getAssignUserName).reversed()).collect(Collectors.toList());
pageData.setRecords(newList);
long c = System.currentTimeMillis() - b;
System.out.printf("花费时间b:" + c);
return JsonResult.success(pageData);
}

@@ -235,7 +234,9 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
}
//查询属于分配自己的数据
List<WorkOrder> workOrders = myWorkList(user, query);
records.addAll(workOrders);
if (CollectionUtils.isEmpty(records) && CollectionUtils.isNotEmpty(workOrders)){
records = workOrders;
}
list = this.getWorkOrderList(records,user);
//按照时间+分配人排序
List<WorkOrderInfoVo> newList =
@@ -265,7 +266,9 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
}
//查询属于分配自己的数据
List<WorkOrder> workOrders = myWorkList(user, query);
records.addAll(workOrders);
if (CollectionUtils.isEmpty(records) && CollectionUtils.isNotEmpty(workOrders)){
records = workOrders;
}
list = this.getWorkOrderList(records,user);
//按照时间+分配人排序
List<WorkOrderInfoVo> newList =

Cargando…
Cancelar
Guardar