Commit 0b1d453915cb52f37692f5ab5741ab444def2c12
Exists in
master
and in
8 other branches
Merge remote-tracking branch 'origin/master'
Showing 3 changed files
platform-common/src/main/java/com/lyms/platform/common/result/BaseResponse.java
View file @
0b1d453
1 | 1 | package com.lyms.platform.common.result; |
2 | 2 | |
3 | 3 | |
4 | +import com.lyms.platform.common.utils.DateUtil; | |
5 | + | |
4 | 6 | /** |
5 | 7 | * 基础的返回模型 |
6 | 8 | * |
... | ... | @@ -16,6 +18,10 @@ |
16 | 18 | |
17 | 19 | protected String errormsg; |
18 | 20 | protected int errorcode; |
21 | + | |
22 | + public String getNow() { | |
23 | + return DateUtil.getymd(); | |
24 | + } | |
19 | 25 | |
20 | 26 | public BaseResponse() { |
21 | 27 | super(); |
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
0b1d453
... | ... | @@ -20,6 +20,10 @@ |
20 | 20 | public static final int DAY_SECONDS = 86399; |
21 | 21 | public static final int DAY_FULL_SECONDS = 86400; |
22 | 22 | |
23 | + public static String getymd() { | |
24 | + return y_m_d.format(new Date()); | |
25 | + } | |
26 | + | |
23 | 27 | public static String getymdhmss() { |
24 | 28 | return yyyyMMddHHmmssSSS.format(new Date()); |
25 | 29 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
0b1d453
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 | antExQuery.setStart(DateUtil.parseYMD(DateUtil.getyyyy_MM_dd(new Date()))); |
78 | 78 | List<AntenatalExaminationModel> list = antenatalExaminationService.queryAntenatalExamination(antExQuery.convertToQuery()); |
79 | 79 | if (CollectionUtils.isNotEmpty(list)) { |
80 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("同一天只能建一次复诊"); | |
80 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.DATA_EXIST).setErrormsg("同一天只能建一次复诊"); | |
81 | 81 | } |
82 | 82 | model.setPid( patientsService.findOnePatientById(antExAddRequest.getParentId()).getPid()); |
83 | 83 | antenatalExaminationService.addOneBabyAnt(model); |
... | ... | @@ -447,7 +447,7 @@ |
447 | 447 | } |
448 | 448 | |
449 | 449 | if (null == patients) { |
450 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("该孕妇还未在本院建档不能进行产检"); | |
450 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.DEPT_NOT_EXISTS).setErrormsg("该孕妇还未在本院建档不能进行产检"); | |
451 | 451 | } |
452 | 452 | |
453 | 453 | AntexListResult antexListResult = new AntexListResult(); |