|
@@ -272,22 +272,22 @@ public class CalculatePremiumResponse extends BaseResponse implements Serializab
|
|
|
@JsonProperty("xbFlagCI")
|
|
@JsonProperty("xbFlagCI")
|
|
|
private String xbFlagCI;
|
|
private String xbFlagCI;
|
|
|
|
|
|
|
|
- public static final String DATE_FORMAT = "%s %s:%s:%s";
|
|
|
|
|
|
|
+ private static final String DATE_FORMAT = "%s %s:%s:%s";
|
|
|
|
|
|
|
|
- public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
+ private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
+
|
|
|
|
|
+ private static final String END_HOUR = "24";
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 获取上一秒时间
|
|
* 获取上一秒时间
|
|
|
*
|
|
*
|
|
|
* @return 上一秒时间
|
|
* @return 上一秒时间
|
|
|
*/
|
|
*/
|
|
|
- private String getInTheLastSecond(String dateTime) {
|
|
|
|
|
- if (dateTime.contains(TimeConstants.START_TIME)) {
|
|
|
|
|
- return dateTime;
|
|
|
|
|
|
|
+ private String getInTheLastSecond(String endDate, String endHour, String endMinute) {
|
|
|
|
|
+ if (END_HOUR.equals(endHour)) {
|
|
|
|
|
+ return endDate + " " + TimeConstants.END_TIME;
|
|
|
}
|
|
}
|
|
|
- LocalDateTime parse = LocalDateTime.parse(dateTime, DATE_TIME_FORMATTER);
|
|
|
|
|
- LocalDateTime localDateTime = parse.plusSeconds(-1);
|
|
|
|
|
- return localDateTime.format(DATE_TIME_FORMATTER);
|
|
|
|
|
|
|
+ return String.format(DATE_FORMAT, endDate, endHour, endMinute, "00");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private String nullData(String date, String dateTime) {
|
|
private String nullData(String date, String dateTime) {
|
|
@@ -302,7 +302,7 @@ public class CalculatePremiumResponse extends BaseResponse implements Serializab
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public String getJqEndTime() {
|
|
public String getJqEndTime() {
|
|
|
- return nullData(this.getEndDateCI(), getInTheLastSecond(String.format(DATE_FORMAT, this.getEndDateCI(), this.getEndHourCI(), this.getEndMinuteCI(), "00")));
|
|
|
|
|
|
|
+ return nullData(this.getEndDateCI(), getInTheLastSecond(this.getEndDateCI(), this.getEndHourCI(), this.getEndMinuteCI()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public String getSyStartTime() {
|
|
public String getSyStartTime() {
|
|
@@ -310,7 +310,7 @@ public class CalculatePremiumResponse extends BaseResponse implements Serializab
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public String getSyEndTime() {
|
|
public String getSyEndTime() {
|
|
|
- return nullData(this.getEndDate(), getInTheLastSecond(String.format(DATE_FORMAT, this.getEndDate(), this.getEndHour(), this.getEndMinute(), "00")));
|
|
|
|
|
|
|
+ return nullData(this.getEndDate(), getInTheLastSecond(this.getEndDate(), this.getEndHour(), this.getEndMinute()));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|