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; String time = null;
try { try {
time = String.valueOf(param); time = String.valueOf(param);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"));
Date parse = sdf.parse(time); return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分"));
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);
} catch (Exception e) { } catch (Exception e) {
try { try {
time = String.valueOf(param); time = String.valueOf(param);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S"); LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S"));
Date parse = sdf.parse(time); return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分"));
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);
} catch (Exception ex) { } catch (Exception ex) {
try { try {
time = String.valueOf(param); time = String.valueOf(param);
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
Date parse = sdf.parse(time); return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分"));
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);
} catch (Exception exx) { } catch (Exception exx) {
try { try {
time = String.valueOf(param); time = String.valueOf(param);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); LocalDateTime localDateTime = LocalDateTime.parse(time, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
Date parse = sdf.parse(time); return localDateTime.format(DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分"));
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);
} catch (Exception exxx) { } catch (Exception exxx) {
log.info("日期转换异常{}", time, ex); log.info("日期转换异常{}", time, ex);
} }

Loading…
Cancel
Save