Commit 0dc2d786755f2370d68781102d6e1965d367f438
1 parent
b56303b124
Exists in
dev
#fix:优化出生证明功能模块
Showing 3 changed files with 10 additions and 4 deletions
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java
View file @
0dc2d78
... | ... | @@ -996,7 +996,7 @@ |
996 | 996 | condition = condition.and("id", idns, MongoOper.NIN); |
997 | 997 | } |
998 | 998 | |
999 | - if (null != vcCardNo) { | |
999 | + if (StringUtils.isNotEmpty(vcCardNo)) { | |
1000 | 1000 | condition = condition.and("vcCardNo", vcCardNo, MongoOper.IS); |
1001 | 1001 | } |
1002 | 1002 | if (StringUtils.isNotEmpty(cardNo)) { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BirthController.java
View file @
0dc2d78
... | ... | @@ -6,6 +6,7 @@ |
6 | 6 | import com.lyms.platform.common.base.LoginContext; |
7 | 7 | import com.lyms.platform.common.result.BaseResponse; |
8 | 8 | import com.lyms.platform.common.utils.DateUtil; |
9 | +import com.lyms.platform.common.utils.StringUtils; | |
9 | 10 | import com.lyms.platform.operate.web.facade.PatientServiceFacade; |
10 | 11 | import com.lyms.platform.operate.web.result.BirthResult; |
11 | 12 | import com.lyms.platform.query.PatientsQuery; |
... | ... | @@ -36,8 +37,11 @@ |
36 | 37 | patientsQuery.setName(name); |
37 | 38 | patientsQuery.setPage(page); |
38 | 39 | patientsQuery.setLimit(limit); |
39 | - patientsQuery.setFmDateStart(DateUtil.parseYMDHMS(fmDateStart+" 00:00:00")); | |
40 | - patientsQuery.setFmDateEnd(DateUtil.parseYMDHMS(fmDateEnd+" 23:59:59")); | |
40 | + if (StringUtils.isNotEmpty(fmDateStart)){ | |
41 | + patientsQuery.setFmDateStart(DateUtil.parseYMDHMS(fmDateStart+" 00:00:00")); | |
42 | + patientsQuery.setFmDateEnd(DateUtil.parseYMDHMS(fmDateEnd+" 23:59:59")); | |
43 | + } | |
44 | + | |
41 | 45 | return patientServiceFacade.getPuerperaList(loginState.getId(),patientsQuery); |
42 | 46 | } |
43 | 47 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientServiceFacade.java
View file @
0dc2d78
... | ... | @@ -1915,9 +1915,10 @@ |
1915 | 1915 | BaseResponse baseResponse = new BaseResponse(); |
1916 | 1916 | |
1917 | 1917 | Patients patients= patientsService.findOnePatientById(parentId); |
1918 | - if (patients.getType()!=3){ | |
1918 | + if (patients==null||patients.getType()!=3){ | |
1919 | 1919 | baseResponse.setErrorcode(ErrorCodeConstants.DATA_EXIST); |
1920 | 1920 | baseResponse.setErrormsg("数据异常"); |
1921 | + return baseResponse; | |
1921 | 1922 | } |
1922 | 1923 | BabyModelQuery babyQuery=new BabyModelQuery(); |
1923 | 1924 | babyQuery.setYn(1); |
... | ... | @@ -1980,6 +1981,7 @@ |
1980 | 1981 | } |
1981 | 1982 | baseResponse.setData(birthResults); |
1982 | 1983 | } |
1984 | + baseResponse.setErrormsg("成功"); | |
1983 | 1985 | baseResponse.setPageInfo(patientsQuery.getPageInfo()); |
1984 | 1986 | return baseResponse; |
1985 | 1987 | } |