Quellcode durchsuchen

小程序 待办工单 接口优化

workOrder0626
陈璐 vor 4 Monaten
Ursprung
Commit
f29e0c9600
1 geänderte Dateien mit 9 neuen und 6 gelöschten Zeilen
  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 Datei anzeigen

} }
//查询属于分配自己的数据 //查询属于分配自己的数据
List<WorkOrder> workOrders = myWorkList(user, query); List<WorkOrder> workOrders = myWorkList(user, query);
records.addAll(workOrders);

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


} }
//查询属于分配自己的数据 //查询属于分配自己的数据
List<WorkOrder> workOrders = myWorkList(user, query); List<WorkOrder> workOrders = myWorkList(user, query);
records.addAll(workOrders);
if (CollectionUtils.isEmpty(records) && CollectionUtils.isNotEmpty(workOrders)){
records = workOrders;
}
list = this.getWorkOrderList(records,user); list = this.getWorkOrderList(records,user);
//按照时间+分配人排序 //按照时间+分配人排序
List<WorkOrderInfoVo> newList = List<WorkOrderInfoVo> newList =
} }
//查询属于分配自己的数据 //查询属于分配自己的数据
List<WorkOrder> workOrders = myWorkList(user, query); List<WorkOrder> workOrders = myWorkList(user, query);
records.addAll(workOrders);
if (CollectionUtils.isEmpty(records) && CollectionUtils.isNotEmpty(workOrders)){
records = workOrders;
}
list = this.getWorkOrderList(records,user); list = this.getWorkOrderList(records,user);
//按照时间+分配人排序 //按照时间+分配人排序
List<WorkOrderInfoVo> newList = List<WorkOrderInfoVo> newList =

Laden…
Abbrechen
Speichern