Commit d53248bd authored by zhangsen's avatar zhangsen

bug修改

parent b1f9ed9f
...@@ -146,10 +146,11 @@ public class AnalyseController extends BaseController { ...@@ -146,10 +146,11 @@ public class AnalyseController extends BaseController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
startTime = DateUtils.convertDateToString(sevenAgoDayStartTime, DateUtils.DATE_TIME_PATTERN); startTime = DateUtils.convertDateToString(DateUtils.dateAddHours(sevenAgoDayStartTime, -8), DateUtils.DATE_TIME_PATTERN);
} }
DateUtils.dateAddHours(DateUtils.getCurrentDayStartTime(new Date()), -8);
if (StringUtils.isEmpty(endTime)) { if (StringUtils.isEmpty(endTime)) {
endTime = DateUtils.convertDateToString(new Date(), DateUtils.DATE_TIME_PATTERN); endTime = DateUtils.convertDateToString(DateUtils.dateAddHours(new Date(), -8), DateUtils.DATE_TIME_PATTERN);
} }
return ResponseHelper.buildResponse(commonServiceImpl.getInfluxdbDataByConditon(stationType,pointId,startTime, endTime)) ; return ResponseHelper.buildResponse(commonServiceImpl.getInfluxdbDataByConditon(stationType,pointId,startTime, endTime)) ;
} }
...@@ -188,10 +189,11 @@ public class AnalyseController extends BaseController { ...@@ -188,10 +189,11 @@ public class AnalyseController extends BaseController {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
startTime = DateUtils.convertDateToString(sevenAgoDayStartTime, DateUtils.DATE_TIME_PATTERN); startTime = DateUtils.convertDateToString(DateUtils.dateAddHours(sevenAgoDayStartTime, -8), DateUtils.DATE_TIME_PATTERN);
} }
DateUtils.dateAddHours(DateUtils.getCurrentDayStartTime(new Date()), -8);
if (StringUtils.isEmpty(endTime)) { if (StringUtils.isEmpty(endTime)) {
endTime = DateUtils.convertDateToString(new Date(), DateUtils.DATE_TIME_PATTERN); endTime = DateUtils.convertDateToString(DateUtils.dateAddHours(new Date(), -8), DateUtils.DATE_TIME_PATTERN);
} }
return ResponseHelper.buildResponse(commonServiceImpl.getInfluxdbDataByConditon(stationType,pointId,startTime, endTime)) ; return ResponseHelper.buildResponse(commonServiceImpl.getInfluxdbDataByConditon(stationType,pointId,startTime, endTime)) ;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment