Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wanglf3 2024-03-13 16:34:59 +08:00
commit 47f497e25d
5 changed files with 14 additions and 8 deletions

View File

@ -101,7 +101,7 @@ public class OrderOutController {
}
@ApiOperation("分页查询行程规划订单")
@ApiOperation("查询未同步行程规划订单")
@PostMapping("/query/not/submit")
public Result<List<RouteOrderPageRes>> queryNotSubmit(@RequestBody OrderQueryData queryData) {
return Result.Success(SUCCESS, orderQuery.queryNotSubmit(queryData));

View File

@ -93,7 +93,6 @@ public class OrderQuery {
List<RouteOrder> routeOrders = routeRepository.findByActualOrderNoNotNull(currentUser.getEmployeeNo());
if (routeOrders == null || routeOrders.isEmpty()) {
return new PageResult<>(0, null);
}
@ -282,7 +281,7 @@ public class OrderQuery {
res.setLocationResList(locationRes);
res.setUserName(currentUser.getName());
if(LocalDateTime.now().isAfter(routeOrder.getEndTime())){
if (LocalDateTime.now().isAfter(routeOrder.getEndTime())) {
res.setIfCanBeFinished(CAN_BE_FINISHED);
} else {
res.setIfCanBeFinished(CAN_NOT_BE_FINISHED);
@ -292,7 +291,7 @@ public class OrderQuery {
public RouteOrder queryById(Long routeId) {
RouteOrder routeOrder = routeRepository.queryById(routeId);
if (routeOrder.getLegItems() != null && routeOrder.getLegItems().isEmpty()) {
if (routeOrder.getLegItems() != null && routeOrder.getLegItems().isEmpty()) {
orderDomainService.queryLocation(routeOrder.getLegItems());
}
return routeOrder;
@ -508,7 +507,13 @@ public class OrderQuery {
public List<RouteOrderPageRes> queryNotSubmit(OrderQueryData queryData) {
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))
Stream<RouteOrder> stream = routeOrders.stream();
if (queryData.getSupplierName() != null) {
stream = stream
.filter(it -> it.getSupplierName() == null || it.getSupplierName().equals(queryData.getSupplierName()));
}
return stream
.filter(order -> order.reloadStatus().getOrderStatus().equals(ORDER_STATUS_APPROVAL))
.map(OrderQuery::getRouteOrderPageRes)
.toList();
}

View File

@ -17,4 +17,5 @@ public class OrderQueryData extends BaseQuery {
private String orderNo;
private String instructions;
private String keywords;
private String supplierName;
}

View File

@ -5,9 +5,9 @@ public class BPMConstant {
public static final String H3_BPM = "H3BPM";
public static final String FSSC = "FSSC";
public static final String FSSC_NAME = "集团财务共享平台";
public static final String FSSC_NAME = "正泰集团股份有限公司";
public static final String XN_FSSC = "XNFSSC";
public static final String XN_FSSC_NAME = "新能财务共享平台";
public static final String XN_FSSC_NAME = "正泰新能科技股份有限公司";
public static final String XNYS_BPM = "XNYSBPM";
public static final String AN_FSSC = "ANFSSC";
public static final String ANYS_BPM = "ANYSBPM";

View File

@ -123,7 +123,7 @@ public class RouteRepositoryImpl implements RouteRepository {
@Override
public List<RouteOrder> findByActualOrderNoNotNull(OrderQueryData orderQueryData) {
String employeeNo = BaseContext.getCurrentUser().getEmployeeNo().toString();
String employeeNo = BaseContext.getCurrentUser().getEmployeeNo();
return jdbcRouteRepository.findByUserIdAndApproveOrderNo_ActualOrderNoNotNullOrApproveOrderNo_CreatorAndApproveOrderNo_ActualOrderNoNotNull(employeeNo, employeeNo);
}