15928045575 2 лет назад
Родитель
Сommit
5ca91f8824

+ 2 - 2
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/service/CommonService.java

@@ -292,7 +292,7 @@ public class CommonService {
 
     public Map<String,List<Object>> getDateByNull(String dateStart,String dateEnd,String[] arr) throws ParseException {
         Map<String,List<Object>>  map = new HashMap<>();
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH");
         Date start = sdf.parse(dateStart);
         Date end = sdf.parse(dateEnd);
 
@@ -307,7 +307,7 @@ public class CommonService {
                 temp = calendar.getTime();
                 map1.put("ts", sdf.format(temp.getTime()));
                 list.add(map1);
-                calendar.add(Calendar.HOUR_OF_DAY,24);
+                calendar.add(Calendar.HOUR_OF_DAY,1);
             }
             map.put(ar,list);
         }