소스 검색

fixed chart Data bug

15928045575 2 년 전
부모
커밋
5ca91f8824
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/service/CommonService.java

+ 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);
         }