Commit 03106a8847135786f19da5b8cb789b1091c66695
1 parent
0fddeb6220
Exists in
master
and in
1 other branch
1
Showing 2 changed files with 15 additions and 1 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
03106a8
| ... | ... | @@ -16,6 +16,8 @@ |
| 16 | 16 | public static SimpleDateFormat md = new SimpleDateFormat("MM-dd"); |
| 17 | 17 | public static SimpleDateFormat m_d = new SimpleDateFormat("MM/dd"); |
| 18 | 18 | public static SimpleDateFormat y_m_d_h_m_s = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| 19 | + public static SimpleDateFormat y_m_d_h_m1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | |
| 20 | + | |
| 19 | 21 | public static SimpleDateFormat y_m_d_h_m = new SimpleDateFormat("yyyyMMddHHmm"); |
| 20 | 22 | public static SimpleDateFormat yyyyMMddHHmmssSSS = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| 21 | 23 | public static final int DAY_SECONDS = 86399; |
| ... | ... | @@ -293,6 +295,18 @@ |
| 293 | 295 | return null; |
| 294 | 296 | } |
| 295 | 297 | } |
| 298 | + | |
| 299 | + public static Date parseYMDHM(String s) { | |
| 300 | + if (s == null) { | |
| 301 | + return null; | |
| 302 | + } | |
| 303 | + try { | |
| 304 | + return y_m_d_h_m1.parse(s); | |
| 305 | + } catch (Exception e) { | |
| 306 | + return null; | |
| 307 | + } | |
| 308 | + } | |
| 309 | + | |
| 296 | 310 | |
| 297 | 311 | public static String getyyyy_MM_dd_hms(Date d) { |
| 298 | 312 | if (d == null) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java
View file @
03106a8
| ... | ... | @@ -441,7 +441,7 @@ |
| 441 | 441 | BabyModel babyModel = fillBaby(patients, deliverAddRequest); |
| 442 | 442 | babyModel.setDeliverOrg(hospital); |
| 443 | 443 | baby.setId(baby1.getId()); |
| 444 | - babyModel.setBirth(DateUtil.parseYMD(baby.getDueTime())); | |
| 444 | + babyModel.setBirth(DateUtil.parseYMDHM(baby.getDueTime())); | |
| 445 | 445 | babyModel.setYn(YnEnums.YES.getId()); |
| 446 | 446 | babyModel.setDueType(fmfs); |
| 447 | 447 | babyModel.setVisitstatus(VisitStatusEnums.UNVISIT.getId()); |