|
|
@@ -426,6 +426,7 @@ public class WsSettlementService extends CrudService<WsSettlementMapper, WsCompa
|
|
|
private LocalDate localDateFormat(LocalDate date, int day, int scale) {
|
|
|
LocalDate localDate = date;
|
|
|
String format = "";
|
|
|
+ String dayStr = day < 10 ? "0" + day : "" + day;
|
|
|
switch (scale) {
|
|
|
case 1:
|
|
|
//月第一天
|
|
|
@@ -433,12 +434,12 @@ public class WsSettlementService extends CrudService<WsSettlementMapper, WsCompa
|
|
|
//上月最后一天
|
|
|
LocalDate lastMonthDay = firstDay.minusDays(1);
|
|
|
format = dateFormat(localDate2Date(lastMonthDay));
|
|
|
- format = format.substring(0, 8) + day;
|
|
|
+ format = format.substring(0, 8) + dayStr;
|
|
|
localDate = LocalDate.parse(format);
|
|
|
break;
|
|
|
case 2:
|
|
|
format = dateFormat(localDate2Date(localDate));
|
|
|
- format = format.substring(0, 8) + day;
|
|
|
+ format = format.substring(0, 8) + dayStr;
|
|
|
localDate = LocalDate.parse(format);
|
|
|
break;
|
|
|
default:
|