Browse Source

修改100号模型

main
sjh 1 year ago
parent
commit
4be2e7acd5
  1. 36
      src/main/java/com/biutag/supervision/service/ModelClueService.java

36
src/main/java/com/biutag/supervision/service/ModelClueService.java

@ -1265,43 +1265,23 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
String time = null;
try {
time = String.valueOf(param);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
Date parse = sdf.parse(time);
Instant instant = parse.toInstant();
ZoneId zoneId = ZoneId.systemDefault();
LocalDateTime localDateTime = instant.atZone(zoneId).toLocalDateTime();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分");
return formatter.format(localDateTime);
LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"));
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分"));
} catch (Exception e) {
try {
time = String.valueOf(param);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
Date parse = sdf.parse(time);
Instant instant = parse.toInstant();
ZoneId zoneId = ZoneId.systemDefault();
LocalDateTime localDateTime = instant.atZone(zoneId).toLocalDateTime();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分");
return formatter.format(localDateTime);
LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S"));
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分"));
} catch (Exception ex) {
try {
time = String.valueOf(param);
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
Date parse = sdf.parse(time);
Instant instant = parse.toInstant();
ZoneId zoneId = ZoneId.systemDefault();
LocalDateTime localDateTime = instant.atZone(zoneId).toLocalDateTime();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分");
return formatter.format(localDateTime);
LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分"));
} catch (Exception exx) {
try {
time = String.valueOf(param);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date parse = sdf.parse(time);
Instant instant = parse.toInstant();
ZoneId zoneId = ZoneId.systemDefault();
LocalDateTime localDateTime = instant.atZone(zoneId).toLocalDateTime();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分");
return formatter.format(localDateTime);
LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分"));
} catch (Exception exxx) {
log.info("日期转换异常{}", time, ex);
}

Loading…
Cancel
Save