|
@@ -41,6 +41,9 @@ public class FactWellServiceImpl implements FactWellService {
|
|
|
public List<FactWellGroupList> getDayGroupList(String wellId){
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.setTime(getToDay()); // 设置当前天日期
|
|
|
+ calendar.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
+ calendar.add(Calendar.DAY_OF_MONTH, -1);
|
|
|
+ //上月最后一天
|
|
|
Date endTime = calendar.getTime();
|
|
|
|
|
|
calendar.add(Calendar.DAY_OF_MONTH, -29);
|
|
@@ -81,11 +84,15 @@ public class FactWellServiceImpl implements FactWellService {
|
|
|
public List<FactWellGroupList> getMonthGroupList(String wellId){
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
calendar.setTime(getToDay());
|
|
|
+
|
|
|
calendar.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
- //当月1号
|
|
|
+ calendar.add(Calendar.DAY_OF_MONTH, -1);
|
|
|
+ //上一月最后一天
|
|
|
Date endTime = calendar.getTime();
|
|
|
+
|
|
|
//11月前的1号
|
|
|
calendar.add(Calendar.MONTH, -11);
|
|
|
+ calendar.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
Date startTime = calendar.getTime();
|
|
|
|
|
|
return getMonthGroupList(wellId, startTime, endTime);
|