Commit aa50346482a35b3ea9787ebd29864437154a7769
1 parent
916c2f5ab6
Exists in
master
and in
1 other branch
出院小结增加活产数
Showing 3 changed files with 34 additions and 6 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/DischargeAbstractController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DischargeAbstractQueryResult.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/DischargeAbstractController.java
View file @
aa50346
| ... | ... | @@ -65,7 +65,7 @@ |
| 65 | 65 | */ |
| 66 | 66 | @TokenRequired |
| 67 | 67 | @ResponseBody |
| 68 | - @RequestMapping(value = "query", method = RequestMethod.POST, consumes = "application/json") | |
| 68 | + @RequestMapping(value = "query", method = RequestMethod.GET, consumes = "application/json") | |
| 69 | 69 | public BaseObjectResponse query(HttpServletRequest httpServletRequest, @RequestBody DischargeAbstractQueryRequest dischargeAbstractSaveRequest) { |
| 70 | 70 | BaseObjectResponse baseObjectResponse; |
| 71 | 71 | try { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.java
View file @
aa50346
| 1 | 1 | package com.lyms.platform.operate.web.facade; |
| 2 | 2 | |
| 3 | -import com.lyms.platform.biz.service.BasicConfigService; | |
| 4 | -import com.lyms.platform.biz.service.DischargeAbstractBabyService; | |
| 5 | -import com.lyms.platform.biz.service.DischargeAbstractMotherService; | |
| 6 | -import com.lyms.platform.biz.service.PatientsService; | |
| 3 | +import com.lyms.platform.biz.service.*; | |
| 7 | 4 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 5 | +import com.lyms.platform.common.enums.RenShenJieJuEnums; | |
| 8 | 6 | import com.lyms.platform.common.enums.YnEnums; |
| 9 | 7 | import com.lyms.platform.common.utils.BeanUtils; |
| 10 | 8 | import com.lyms.platform.common.utils.DateUtil; |
| ... | ... | @@ -17,6 +15,7 @@ |
| 17 | 15 | import com.lyms.platform.pojo.DischargeAbstractBabyModel; |
| 18 | 16 | import com.lyms.platform.pojo.DischargeAbstractMotherModel; |
| 19 | 17 | import com.lyms.platform.pojo.Patients; |
| 18 | +import com.lyms.platform.query.BabyModelQuery; | |
| 20 | 19 | import com.lyms.platform.query.DischargeAbstractBabyQuery; |
| 21 | 20 | import com.lyms.platform.query.DischargeAbstractMotherQuery; |
| 22 | 21 | import com.lyms.platform.query.PatientsQuery; |
| ... | ... | @@ -49,6 +48,9 @@ |
| 49 | 48 | @Autowired |
| 50 | 49 | private BasicConfigService basicConfigService; |
| 51 | 50 | |
| 51 | + @Autowired | |
| 52 | + private BabyService babyService; | |
| 53 | + | |
| 52 | 54 | public DischargeAbstractSaveResult save(DischargeAbstractSaveRequest dischargeAbstractSaveRequest) { |
| 53 | 55 | |
| 54 | 56 | DischargeAbstractSaveResult dischargeAbstractSaveResult = new DischargeAbstractSaveResult(); |
| ... | ... | @@ -125,6 +127,17 @@ |
| 125 | 127 | DischargeAbstractMotherQuery dischargeAbstractMotherQuery = new DischargeAbstractMotherQuery(); |
| 126 | 128 | dischargeAbstractMotherQuery.setPatientId(patients.getId()); |
| 127 | 129 | List<DischargeAbstractMotherModel> dischargeAbstractMotherModelList = dischargeAbstractMotherService.query(dischargeAbstractMotherQuery); |
| 130 | + | |
| 131 | + // 查询活产数 | |
| 132 | + BabyModelQuery babyModelQuery = new BabyModelQuery(); | |
| 133 | + babyModelQuery.setYn(YnEnums.YES.getId()); | |
| 134 | + babyModelQuery.setParentId(patients.getId()); | |
| 135 | + babyModelQuery.setPregnancyOut(RenShenJieJuEnums.O.getId()); | |
| 136 | + try { | |
| 137 | + dischargeAbstractQueryResult.setLivingNumber(babyService.queryBabyWithQuery(babyModelQuery).size()); | |
| 138 | + } catch (Exception e) { | |
| 139 | + // 什么都不干 | |
| 140 | + } | |
| 128 | 141 | |
| 129 | 142 | if (dischargeAbstractMotherModelList == null || dischargeAbstractMotherModelList.size() == 0) { |
| 130 | 143 | dischargeAbstractQueryResult.setStatus("2"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DischargeAbstractQueryResult.java
View file @
aa50346
| ... | ... | @@ -89,11 +89,18 @@ |
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | 91 | * @auther HuJiaqi |
| 92 | + * @createTime 2016年12月12日 11时35分 | |
| 93 | + * @discription 活产数 | |
| 94 | + */ | |
| 95 | + private Integer livingNumber; | |
| 96 | + | |
| 97 | + /** | |
| 98 | + * @auther HuJiaqi | |
| 92 | 99 | * @createTime 2016年12月06日 14时17分 |
| 93 | 100 | * @discription 母亲model |
| 94 | 101 | */ |
| 95 | 102 | private DischargeAbstractMotherQueryModel dischargeAbstractMotherQueryModel; |
| 96 | - | |
| 103 | + | |
| 97 | 104 | /** |
| 98 | 105 | * @auther HuJiaqi |
| 99 | 106 | * @createTime 2016年12月06日 14时18分 |
| ... | ... | @@ -203,6 +210,14 @@ |
| 203 | 210 | |
| 204 | 211 | public void setFmDate(String fmDate) { |
| 205 | 212 | this.fmDate = fmDate; |
| 213 | + } | |
| 214 | + | |
| 215 | + public Integer getLivingNumber() { | |
| 216 | + return livingNumber; | |
| 217 | + } | |
| 218 | + | |
| 219 | + public void setLivingNumber(Integer livingNumber) { | |
| 220 | + this.livingNumber = livingNumber; | |
| 206 | 221 | } |
| 207 | 222 | } |