Procházet zdrojové kódy

本年类型时间值错误修改

chenw před 6 roky
rodič
revize
bd44cd3b40

+ 2 - 2
bi-server/src/main/java/com/usoftchina/bi/server/utils/ScreenUtil.java

@@ -212,11 +212,11 @@ public class ScreenUtil {
                 break;
                 break;
             case "year" :
             case "year" :
                 formatValue = localDate.plusYears(0).with(TemporalAdjusters.firstDayOfYear()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ","
                 formatValue = localDate.plusYears(0).with(TemporalAdjusters.firstDayOfYear()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ","
-                        + localDate.plusWeeks(0).with(TemporalAdjusters.firstDayOfYear()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+                        + localDate.plusYears(0).with(TemporalAdjusters.lastDayOfYear()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
                 break;
                 break;
             case "lastyear" :
             case "lastyear" :
                 formatValue = localDate.plusYears(-1).with(TemporalAdjusters.firstDayOfYear()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ","
                 formatValue = localDate.plusYears(-1).with(TemporalAdjusters.firstDayOfYear()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ","
-                        + localDate.plusWeeks(-1).with(TemporalAdjusters.firstDayOfYear()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+                        + localDate.plusWeeks(-1).with(TemporalAdjusters.lastDayOfYear()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
                 break;
                 break;
             default:
             default:
                 formatValue = value;
                 formatValue = value;