Commit 75fef641fec2039c7592704a292486a4adff4f58
1 parent
7e24a54f6f
Exists in
master
and in
6 other branches
修复bug
Showing 1 changed file with 8 additions and 10 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AreaCountFacade.java
View file @
75fef64
| 1 | 1 | package com.lyms.platform.operate.web.facade; |
| 2 | 2 | |
| 3 | 3 | |
| 4 | -import com.alibaba.fastjson.JSONObject; | |
| 5 | 4 | import com.lyms.platform.beans.AddressBean; |
| 6 | 5 | import com.lyms.platform.biz.service.*; |
| 7 | 6 | import com.lyms.platform.common.base.PageInfo; |
| 8 | 7 | |
| 9 | 8 | |
| ... | ... | @@ -40,20 +39,14 @@ |
| 40 | 39 | import org.springframework.data.mongodb.core.aggregation.Aggregation; |
| 41 | 40 | import org.springframework.data.mongodb.core.aggregation.AggregationOperation; |
| 42 | 41 | import org.springframework.data.mongodb.core.aggregation.AggregationResults; |
| 43 | -import org.springframework.data.mongodb.core.aggregation.SortOperation; | |
| 44 | 42 | import org.springframework.data.mongodb.core.query.Criteria; |
| 45 | 43 | import org.springframework.data.mongodb.core.query.Query; |
| 46 | 44 | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| 47 | 45 | import org.springframework.stereotype.Component; |
| 48 | 46 | |
| 49 | 47 | import javax.servlet.http.HttpServletResponse; |
| 50 | -import java.time.Instant; | |
| 51 | -import java.time.LocalDate; | |
| 52 | -import java.time.ZoneId; | |
| 53 | -import java.time.temporal.TemporalAdjusters; | |
| 54 | 48 | import java.util.*; |
| 55 | 49 | import java.util.concurrent.*; |
| 56 | -import java.util.stream.Collectors; | |
| 57 | 50 | |
| 58 | 51 | import static org.springframework.data.mongodb.core.aggregation.Aggregation.project; |
| 59 | 52 | |
| 60 | 53 | |
| ... | ... | @@ -1140,10 +1133,15 @@ |
| 1140 | 1133 | * @return |
| 1141 | 1134 | */ |
| 1142 | 1135 | public Date getStartDate() { |
| 1143 | - LocalDate with = LocalDate.now().plusYears(0).with(TemporalAdjusters.firstDayOfYear()); | |
| 1136 | + /* LocalDate with = LocalDate.now().plusYears(0).with(TemporalAdjusters.firstDayOfYear()); | |
| 1144 | 1137 | ZoneId zoneId = ZoneId.systemDefault(); |
| 1145 | - Instant instant = with.atStartOfDay().atZone(zoneId).toInstant(); | |
| 1146 | - return Date.from(instant); | |
| 1138 | + Instant instant = with.atStartOfDay().atZone(zoneId).toInstant();*/ | |
| 1139 | + Calendar cal = Calendar.getInstance(); | |
| 1140 | + cal.setTime(new Date()); | |
| 1141 | + cal.set(Calendar.MONTH, 0); | |
| 1142 | + cal.set(Calendar.DAY_OF_MONTH, 1); | |
| 1143 | + Date startDate = cal.getTime(); | |
| 1144 | + return startDate; | |
| 1147 | 1145 | } |
| 1148 | 1146 | |
| 1149 | 1147 | /** |