|
|
@@ -60,6 +60,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.security.Signature;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
+import java.time.Duration;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.ZoneId;
|
|
|
@@ -3852,6 +3853,13 @@ public class HouseOrderController implements HouseOrderAPI {
|
|
|
return CommonResult.ok(vo);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public CommonResult dateBillType() {
|
|
|
+ List<String> dateBillTypeList=houseOrderService.dateBillType();
|
|
|
+
|
|
|
+ return CommonResult.ok(dateBillTypeList);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
// 获取签名
|
|
|
@@ -3873,18 +3881,17 @@ public class HouseOrderController implements HouseOrderAPI {
|
|
|
// String a="第一个订单"+"\n"+"第二个订单";
|
|
|
// System.out.println(a);
|
|
|
|
|
|
- DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
- DateTimeFormatter dateTimeFormatter2 = DateTimeFormatter.ofPattern("yyyy-MM");
|
|
|
|
|
|
-// 计算上个免费的订单
|
|
|
- LocalDateTime end = LocalDateTime.now().withDayOfMonth(1).withHour(0).withMinute(0).withSecond(0);
|
|
|
- LocalDateTime start = end.minusMonths(1);
|
|
|
+ // 入住天数
|
|
|
+ DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ LocalDateTime start = LocalDateTime.parse("2024-12-31 15:17:27", dateTimeFormatter);
|
|
|
+ LocalDateTime end = LocalDateTime.parse("2025-01-01 13:00:00", dateTimeFormatter);
|
|
|
|
|
|
- String dateBill=start.toLocalDate().format(dateTimeFormatter2);
|
|
|
- String dateBill2=start.format(dateTimeFormatter2);
|
|
|
- System.out.println("dateBill = " + dateBill);
|
|
|
- System.out.println("dateBill2 = " + dateBill2);
|
|
|
+ LocalDate startDate = start.toLocalDate();
|
|
|
+ LocalDate endDate = end.toLocalDate();
|
|
|
|
|
|
+ int daysBetween = (int) startDate.until(endDate, ChronoUnit.DAYS);
|
|
|
+ System.out.println("daysBetween = " + daysBetween);
|
|
|
}
|
|
|
|
|
|
/**
|