核算时暴露日期解析异常
This commit is contained in:
parent
ea1a46839d
commit
c1db3883b0
|
|
@ -296,6 +296,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
reuslt = year;
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return new DataType(DataType.NUMBER, reuslt);
|
||||
|
|
@ -328,6 +329,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
reuslt = month + 1;
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return new DataType(DataType.NUMBER, reuslt);
|
||||
|
|
@ -356,6 +358,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
reuslt = day;
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return new DataType(DataType.NUMBER, reuslt);
|
||||
|
|
@ -385,6 +388,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
reuslt = hour;
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return new DataType(DataType.NUMBER, reuslt);
|
||||
|
|
@ -414,6 +418,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
reuslt = minute;
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return new DataType(DataType.NUMBER, reuslt);
|
||||
|
|
@ -440,6 +445,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
reuslt = seconds;
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return new DataType(DataType.NUMBER, reuslt);
|
||||
|
|
@ -466,6 +472,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
weekNum = getDateTimeValue(date, "WM", "WEEKNUM");
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return new DataType(DataType.NUMBER, weekNum);
|
||||
}
|
||||
|
|
@ -963,6 +970,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
weekDay = getDateTimeValue(new Date(), "DW", "WEEKDAY");
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return new DataType(DataType.NUMBER, weekDay > 0 ? (weekDay - 1) : weekDay);
|
||||
}
|
||||
|
|
@ -1099,6 +1107,7 @@ public class DateTimeServiceImpl implements DateTimeService {
|
|||
ndate = sdf.parse(dateStr);
|
||||
} catch (ParseException e) {
|
||||
logger.error("err", e);
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return ndate;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue