Преглед изворни кода

增加近半年过滤分支

chenw пре 7 година
родитељ
комит
d0c1ea3a93
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      bi-server/src/main/java/com/usoftchina/bi/server/utils/ScreenUtil.java

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

@@ -207,6 +207,10 @@ public class ScreenUtil {
                         + quarterStart(-1).plusMonths(2).with(TemporalAdjusters.lastDayOfMonth()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
                         + quarterStart(-1).plusMonths(2).with(TemporalAdjusters.lastDayOfMonth()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
                 formatValue = "";
                 formatValue = "";
                 break;
                 break;
+            case "halfyear" :
+                formatValue = localDate.plusMonths(-6).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ","
+                        + localDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+                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.plusWeeks(0).with(TemporalAdjusters.firstDayOfYear()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));