|
|
@@ -337,11 +337,16 @@ public class WaybillManagementService {
|
|
|
List<Integer> statuses = initWaybillIndexStatus();
|
|
|
// 初始化各状态
|
|
|
List<WaybillStatusVO> statusVOS = new ArrayList<>();
|
|
|
+ // 已作废
|
|
|
+ List<Integer> abortStatues = new ArrayList<>();
|
|
|
+ abortStatues.add(CarWaybillQueryEnum.REJECT_ORDER.getCode());
|
|
|
+ abortStatues.add(CarWaybillEnum.REFUSE_TRAFFIC.getCode());
|
|
|
+ abortStatues.add(CarWaybillEnum.REVOKED.getCode());
|
|
|
statuses.forEach(e -> {
|
|
|
WaybillStatusVO waybillStatusVO = new WaybillStatusVO();
|
|
|
waybillStatusVO.setStatus(false);
|
|
|
- if(e.equals(CarWaybillEnum.PENDING_ORDER.getCode())) {
|
|
|
- // 默认选中 待接单 状态
|
|
|
+ if(e.equals(CarWaybillEnum.PENDING_ORDER.getCode()) && !abortStatues.contains(e)) {
|
|
|
+ // 默认选中 待接单 状态, 已作废的不选中
|
|
|
waybillStatusVO.setStatus(true);
|
|
|
}
|
|
|
waybillStatusVO.setCode(e);
|
|
|
@@ -783,6 +788,13 @@ public class WaybillManagementService {
|
|
|
if (CollectionUtils.isNotEmpty(_statuses)) {
|
|
|
criteria.and("status").in(_statuses);
|
|
|
}
|
|
|
+ // 查询时间段
|
|
|
+ if (Objects.nonNull(query.getStartDate()) && Objects.nonNull(query.getEndDate())) {
|
|
|
+ Date endDate = DateUtil.strDateTimeToDateTime(query.getEndDate());
|
|
|
+ criteria.and("createTime")
|
|
|
+ .gte(DateUtil.strDateTimeToDateTime(query.getStartDate()))
|
|
|
+ .lte(DateUtil.offsetDay(endDate, 1));
|
|
|
+ }
|
|
|
Query queryFormat = new Query(criteria);
|
|
|
// 总记录数
|
|
|
long total = mongoTemplate.count(queryFormat, SckwWaybillOrder.class);
|