同步代码
This commit is contained in:
parent
824bcc98cf
commit
5e119950e1
|
@ -94,4 +94,5 @@ public class OrderOutController {
|
|||
public Result<List<RouteOrderPageRes>> queryNotSubmit(@RequestBody OrderQueryData queryData) {
|
||||
return Result.Success(SUCCESS, orderQuery.queryNotSubmit(queryData));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -142,7 +142,8 @@ public class OrderQuery {
|
|||
private static RouteOrderPageRes getRouteOrderPageRes(RouteOrder routeOrder) {
|
||||
User currentUser = BaseContext.getCurrentUser();
|
||||
RouteOrderPageRes res = BeanUtil.copyProperties(routeOrder.reloadStatus(), RouteOrderPageRes.class);
|
||||
List<LocationRes> locationRes = routeOrder.getLegItems()
|
||||
List<Leg> legItems = routeOrder.getLegItems();
|
||||
List<LocationRes> locationRes = legItems
|
||||
.stream()
|
||||
.flatMap(leg -> Stream.of(leg.getOriginLocation(), leg.getDestinationLocation()))
|
||||
.map(LocationRes::copyFrom)
|
||||
|
@ -324,8 +325,9 @@ public class OrderQuery {
|
|||
}
|
||||
|
||||
public List<RouteOrderPageRes> queryNotSubmit(OrderQueryData queryData) {
|
||||
List<RouteOrder> byActualOrderNoNotNull = routeRepository.findByActualOrderNoNotNull(queryData);
|
||||
return byActualOrderNoNotNull.stream().filter(order -> order.reloadStatus().getOrderStatus().equals(ORDER_STATUS_APPROVAL))
|
||||
List<RouteOrder> routeOrders = routeRepository.findByActualOrderNoNotNull(queryData);
|
||||
routeOrders.forEach(route -> orderDomainService.queryLocation(route.getLegItems()));
|
||||
return routeOrders.stream().filter(order -> order.reloadStatus().getOrderStatus().equals(ORDER_STATUS_APPROVAL))
|
||||
.map(OrderQuery::getRouteOrderPageRes)
|
||||
.toList();
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.springframework.data.domain.Pageable;
|
|||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
|
@ -23,4 +24,5 @@ public interface JdbcLocationRepository extends CrudRepository<Location, Long> {
|
|||
List<Location> findByLocationNameContaining(String locationName);
|
||||
|
||||
Location findByLocationName(String locationName);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue