|
|
|
@ -29,6 +29,7 @@ import lombok.AllArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.LocalDateTime; |
|
|
|
import java.time.ZoneId; |
|
|
|
import java.time.ZoneId; |
|
|
|
@ -2295,33 +2296,12 @@ public class PointServiceImpl implements PointService { |
|
|
|
return " 无时间数据 "; |
|
|
|
return " 无时间数据 "; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static String getDateString(Object param) { |
|
|
|
private static String getDateString(Date date) { |
|
|
|
if (param != null) { |
|
|
|
if (date != null) { |
|
|
|
String time = null; |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
time = String.valueOf(param); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年M月d日"); |
|
|
|
LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")); |
|
|
|
return sdf.format(date); |
|
|
|
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日")); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
try { |
|
|
|
|
|
|
|
time = String.valueOf(param); |
|
|
|
|
|
|
|
LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S")); |
|
|
|
|
|
|
|
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日")); |
|
|
|
|
|
|
|
} catch (Exception ex) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
time = String.valueOf(param); |
|
|
|
|
|
|
|
LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); |
|
|
|
|
|
|
|
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日")); |
|
|
|
|
|
|
|
} catch (Exception exx) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
time = String.valueOf(param); |
|
|
|
|
|
|
|
LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
|
|
|
|
|
|
|
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日")); |
|
|
|
|
|
|
|
} catch (Exception exxx) { |
|
|
|
|
|
|
|
System.out.println("时间" + time + "解析失败" + ex); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return " 无时间数据 "; |
|
|
|
return " 无时间数据 "; |
|
|
|
|