|
@@ -46,14 +46,19 @@ public class ZhcxReprotSameDayRealTimeInspectionStatisticsServiceImpl extends Se
|
|
|
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ calendar.setTime(new Date());
|
|
|
+ calendar.set(Calendar.HOUR_OF_DAY, 0);
|
|
|
+ calendar.set(Calendar.MINUTE, 0);
|
|
|
+ calendar.set(Calendar.SECOND, 0);
|
|
|
+
|
|
|
+ Date date0 = calendar.getTime();
|
|
|
|
|
|
//前一小时开始时间
|
|
|
+ calendar.setTime(new Date());
|
|
|
calendar.add(Calendar.HOUR_OF_DAY, -1);;
|
|
|
calendar.set(Calendar.MINUTE, 0);
|
|
|
calendar.set(Calendar.SECOND, 0);
|
|
|
calendar.set(Calendar.MILLISECOND, 0);
|
|
|
- String startTime = dateFormat.format(calendar.getTime());
|
|
|
-
|
|
|
//统计时间
|
|
|
Date statisticsTime = calendar.getTime();
|
|
|
|
|
@@ -63,7 +68,7 @@ public class ZhcxReprotSameDayRealTimeInspectionStatisticsServiceImpl extends Se
|
|
|
String endTime = dateFormat.format(calendar.getTime());
|
|
|
|
|
|
//前一小时报验单
|
|
|
- List<SameDayRealTimeInspectionVo> inspetionList = dao.getInspetion(startTime, endTime);
|
|
|
+ List<SameDayRealTimeInspectionVo> inspetionList = dao.getInspetion(dateFormat.format(date0), endTime);
|
|
|
|
|
|
//数据处理
|
|
|
analysisDataData(inspetionList, statisticsTime);
|