Explorar o código

增加近半年过滤分支

chenw %!s(int64=6) %!d(string=hai) anos
pai
achega
d0c1ea3a93

+ 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"));
                 formatValue = "";
                 break;
+            case "halfyear" :
+                formatValue = localDate.plusMonths(-6).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ","
+                        + localDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+                break;
             case "year" :
                 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"));