From 778beabb28bd760a9fc466aaed537eb98e777982 Mon Sep 17 00:00:00 2001
From: gongzuming <gongzuming>
Date: 星期五, 13 九月 2024 15:10:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master-v2' into master-v2
---
src/main/java/com/mzl/flower/web/payment/DeliveryOrderController.java | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/mzl/flower/web/payment/DeliveryOrderController.java b/src/main/java/com/mzl/flower/web/payment/DeliveryOrderController.java
index 9ed9801..d1e7b97 100644
--- a/src/main/java/com/mzl/flower/web/payment/DeliveryOrderController.java
+++ b/src/main/java/com/mzl/flower/web/payment/DeliveryOrderController.java
@@ -37,20 +37,31 @@
@GetMapping("/station/list")
@ApiOperation(value = "查询我的集货站列表")
- public ResponseEntity<ReturnDataDTO<List<StationStatisticDTO>>> statisticStationList(String name){
- LocalDateTime now = LocalDateTime.now();
- LocalDateTime towAm = LocalDate.now().atTime(2, 0, 0);
- LocalDateTime fivePm = LocalDate.now().atTime(17, 0, 0);
+ public ResponseEntity<ReturnDataDTO<List<StationStatisticDTO>>> statisticStationList(String name
+ , String status, String date){
+ /*if(StringUtils.isEmpty(date)){
+ throw new ValidationException("请选择日期");
+ }*/
LocalDateTime startDate;
LocalDateTime endDate;
- if(now.isAfter(towAm)){
- startDate = fivePm.plusDays(-1);
- endDate = fivePm;
+ LocalDate localDate = deliveryOrderService.parseLocalDate(date);
+ if(localDate != null){
+ endDate = localDate.atTime(17, 0, 0);
+ startDate = endDate.plusDays(-1);
} else {
- startDate = fivePm.plusDays(-2);
- endDate = fivePm.plusDays(-1);
+ LocalDateTime now = LocalDateTime.now();
+ LocalDateTime towAm = LocalDate.now().atTime(2, 0, 0);
+ LocalDateTime fivePm = LocalDate.now().atTime(17, 0, 0);
+ if(now.isAfter(towAm)){
+ startDate = fivePm.plusDays(-1);
+ endDate = fivePm;
+ } else {
+ startDate = fivePm.plusDays(-2);
+ endDate = fivePm.plusDays(-1);
+ }
}
- return returnData(R.SUCCESS.getCode(), deliveryOrderService.statisticStationList(name,startDate,endDate));
+
+ return returnData(R.SUCCESS.getCode(), deliveryOrderService.statisticStationList(name, startDate, endDate, status));
}
--
Gitblit v1.9.3