Commit a8f3d41663cd9e7eeaf7cb669b52e1f209a824d4
Exists in
master
and in
7 other branches
Merge remote-tracking branch 'origin/master'
Showing 5 changed files
- platform-dal/src/main/java/com/lyms/platform/pojo/DischargeAbstractBabyModel.java
- platform-dal/src/main/java/com/lyms/platform/pojo/DischargeAbstractMotherModel.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/request/DischargeAbstractSaveRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DischargeAbstractQueryResult.java
platform-dal/src/main/java/com/lyms/platform/pojo/DischargeAbstractBabyModel.java
View file @
a8f3d41
| ... | ... | @@ -18,6 +18,8 @@ |
| 18 | 18 | |
| 19 | 19 | private String id; |
| 20 | 20 | |
| 21 | + private String pId; | |
| 22 | + | |
| 21 | 23 | /** |
| 22 | 24 | * @auther HuJiaqi |
| 23 | 25 | * @createTime 2016年12月05日 17时03分 |
| ... | ... | @@ -294,6 +296,14 @@ |
| 294 | 296 | |
| 295 | 297 | public void setCreateDate(Date createDate) { |
| 296 | 298 | this.createDate = createDate; |
| 299 | + } | |
| 300 | + | |
| 301 | + public String getpId() { | |
| 302 | + return pId; | |
| 303 | + } | |
| 304 | + | |
| 305 | + public void setpId(String pId) { | |
| 306 | + this.pId = pId; | |
| 297 | 307 | } |
| 298 | 308 | } |
platform-dal/src/main/java/com/lyms/platform/pojo/DischargeAbstractMotherModel.java
View file @
a8f3d41
| ... | ... | @@ -18,6 +18,8 @@ |
| 18 | 18 | |
| 19 | 19 | private String id; |
| 20 | 20 | |
| 21 | + private String pId; | |
| 22 | + | |
| 21 | 23 | /** |
| 22 | 24 | * @auther HuJiaqi |
| 23 | 25 | * @createTime 2016年12月05日 15时46分 |
| ... | ... | @@ -129,6 +131,14 @@ |
| 129 | 131 | |
| 130 | 132 | public void setOperatorId(Integer operatorId) { |
| 131 | 133 | this.operatorId = operatorId; |
| 134 | + } | |
| 135 | + | |
| 136 | + public String getpId() { | |
| 137 | + return pId; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setpId(String pId) { | |
| 141 | + this.pId = pId; | |
| 132 | 142 | } |
| 133 | 143 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.java
View file @
a8f3d41
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | import com.lyms.platform.operate.web.request.DischargeAbstractSaveRequest; |
| 14 | 14 | import com.lyms.platform.operate.web.result.*; |
| 15 | 15 | import com.lyms.platform.permission.service.UsersService; |
| 16 | +import com.lyms.platform.pojo.BabyModel; | |
| 16 | 17 | import com.lyms.platform.pojo.DischargeAbstractBabyModel; |
| 17 | 18 | import com.lyms.platform.pojo.DischargeAbstractMotherModel; |
| 18 | 19 | import com.lyms.platform.pojo.Patients; |
| ... | ... | @@ -71,6 +72,7 @@ |
| 71 | 72 | dischargeAbstractMotherModel.setCreateDate(new Date()); |
| 72 | 73 | dischargeAbstractMotherModel.setOperatorId(dischargeAbstractSaveRequest.getOperatorId()); |
| 73 | 74 | dischargeAbstractMotherModel.setAfterMakeBabyDays(DateUtil.getDays(DateUtil.parseYMD(dischargeAbstractSaveRequest.getFmDate()), new Date())); |
| 75 | + dischargeAbstractMotherModel.setpId(dischargeAbstractSaveRequest.getpId()); | |
| 74 | 76 | if (StringUtils.isEmpty(dischargeAbstractMotherModel.getId())) { |
| 75 | 77 | dischargeAbstractMotherModel = dischargeAbstractMotherService.save(dischargeAbstractMotherModel); |
| 76 | 78 | } else { |
| ... | ... | @@ -87,6 +89,7 @@ |
| 87 | 89 | dischargeAbstractBabyModel.setCreateDate(new Date()); |
| 88 | 90 | dischargeAbstractBabyModel.setbCGAndHBVVaccinationDate(DateUtil.parseYMD(baby.getbCGAndHBVVaccinationDate())); |
| 89 | 91 | dischargeAbstractBabyModel.sethBIGInjectDate(DateUtil.parseYMD(baby.gethBIGInjectDate())); |
| 92 | + dischargeAbstractBabyModel.setpId(baby.getpId()); | |
| 90 | 93 | if (StringUtils.isEmpty(dischargeAbstractBabyModel.getId())) { |
| 91 | 94 | dischargeAbstractBabyModelList.add(dischargeAbstractBabyModel); |
| 92 | 95 | } else { |
| ... | ... | @@ -139,6 +142,7 @@ |
| 139 | 142 | dischargeAbstractQueryResult.setUserName(patients.getUsername()); |
| 140 | 143 | dischargeAbstractQueryResult.setAge(DateUtil.getAge(patients.getBirth(), new Date())); |
| 141 | 144 | dischargeAbstractQueryResult.setFmDate(DateUtil.getyyyy_MM_dd(patients.getFmDate())); |
| 145 | + dischargeAbstractQueryResult.setMotherPId(patients.getPid()); | |
| 142 | 146 | |
| 143 | 147 | // 这里之所以转换时以为前端已经写好了,并且这个循环也不是很慢 |
| 144 | 148 | try { |
| 145 | 149 | |
| 146 | 150 | |
| ... | ... | @@ -163,21 +167,31 @@ |
| 163 | 167 | dischargeAbstractQueryResult.setGestationalWeeks(PredictedStatisticsFacade.getGestationalWeeks(patients.getLastMenses(), patients.getType(), patients.getDueStatus())); |
| 164 | 168 | dischargeAbstractQueryResult.setDueDate(patients.getDueDate() == null ? "" : new SimpleDateFormat("yyyy年MM月dd日").format(patients.getDueDate())); |
| 165 | 169 | |
| 166 | - // 查询母亲信息 | |
| 167 | - DischargeAbstractMotherQuery dischargeAbstractMotherQuery = new DischargeAbstractMotherQuery(); | |
| 168 | - dischargeAbstractMotherQuery.setPatientId(patients.getId()); | |
| 169 | - List<DischargeAbstractMotherModel> dischargeAbstractMotherModelList = dischargeAbstractMotherService.query(dischargeAbstractMotherQuery); | |
| 170 | - | |
| 171 | - // 查询活产数 | |
| 170 | + // 查询活产数和babyPid | |
| 172 | 171 | BabyModelQuery babyModelQuery = new BabyModelQuery(); |
| 173 | 172 | babyModelQuery.setYn(YnEnums.YES.getId()); |
| 174 | 173 | babyModelQuery.setParentId(patients.getId()); |
| 175 | 174 | babyModelQuery.setPregnancyOut(RenShenJieJuEnums.O.getId()); |
| 176 | 175 | try { |
| 177 | - dischargeAbstractQueryResult.setLivingNumber(babyService.queryBabyWithQuery(babyModelQuery).size()); | |
| 176 | + List<BabyModel> babyModelList = babyService.queryBabyWithQuery(babyModelQuery); | |
| 177 | + if (CollectionUtils.isEmpty(babyModelList)) { | |
| 178 | + dischargeAbstractQueryResult.setLivingNumber(0); | |
| 179 | + } else { | |
| 180 | + dischargeAbstractQueryResult.setLivingNumber(babyModelList.size()); | |
| 181 | + List<String> babyPidList = new ArrayList<>(); | |
| 182 | + for (BabyModel babyModel : babyModelList) { | |
| 183 | + babyPidList.add(babyModel.getPid()); | |
| 184 | + } | |
| 185 | + dischargeAbstractQueryResult.setBabyPIdList(babyPidList); | |
| 186 | + } | |
| 178 | 187 | } catch (Exception e) { |
| 179 | 188 | // 什么都不干 |
| 180 | 189 | } |
| 190 | + | |
| 191 | + // 查询母亲信息 | |
| 192 | + DischargeAbstractMotherQuery dischargeAbstractMotherQuery = new DischargeAbstractMotherQuery(); | |
| 193 | + dischargeAbstractMotherQuery.setPatientId(patients.getId()); | |
| 194 | + List<DischargeAbstractMotherModel> dischargeAbstractMotherModelList = dischargeAbstractMotherService.query(dischargeAbstractMotherQuery); | |
| 181 | 195 | |
| 182 | 196 | if (dischargeAbstractMotherModelList == null || dischargeAbstractMotherModelList.size() == 0) { |
| 183 | 197 | dischargeAbstractQueryResult.setStatus("2"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/DischargeAbstractSaveRequest.java
View file @
a8f3d41
| ... | ... | @@ -55,6 +55,8 @@ |
| 55 | 55 | */ |
| 56 | 56 | private List<Baby> babyList; |
| 57 | 57 | |
| 58 | + private String pId; | |
| 59 | + | |
| 58 | 60 | public static class Baby { |
| 59 | 61 | |
| 60 | 62 | /** |
| ... | ... | @@ -64,6 +66,8 @@ |
| 64 | 66 | */ |
| 65 | 67 | private String id; |
| 66 | 68 | |
| 69 | + private String pId; | |
| 70 | + | |
| 67 | 71 | /** |
| 68 | 72 | * @auther HuJiaqi |
| 69 | 73 | * @createTime 2016年12月05日 17时56分 |
| ... | ... | @@ -176,6 +180,14 @@ |
| 176 | 180 | */ |
| 177 | 181 | private String orderScreenDescription; |
| 178 | 182 | |
| 183 | + public String getpId() { | |
| 184 | + return pId; | |
| 185 | + } | |
| 186 | + | |
| 187 | + public void setpId(String pId) { | |
| 188 | + this.pId = pId; | |
| 189 | + } | |
| 190 | + | |
| 179 | 191 | public String getId() { |
| 180 | 192 | return id; |
| 181 | 193 | } |
| ... | ... | @@ -307,6 +319,7 @@ |
| 307 | 319 | public String getOrderScreenDescription() { |
| 308 | 320 | return orderScreenDescription; |
| 309 | 321 | } |
| 322 | + | |
| 310 | 323 | public void setOrderScreenDescription(String orderScreenDescription) { |
| 311 | 324 | this.orderScreenDescription = orderScreenDescription; |
| 312 | 325 | } |
| ... | ... | @@ -375,6 +388,14 @@ |
| 375 | 388 | |
| 376 | 389 | public void setFmDate(String fmDate) { |
| 377 | 390 | this.fmDate = fmDate; |
| 391 | + } | |
| 392 | + | |
| 393 | + public String getpId() { | |
| 394 | + return pId; | |
| 395 | + } | |
| 396 | + | |
| 397 | + public void setpId(String pId) { | |
| 398 | + this.pId = pId; | |
| 378 | 399 | } |
| 379 | 400 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DischargeAbstractQueryResult.java
View file @
a8f3d41
| ... | ... | @@ -113,6 +113,26 @@ |
| 113 | 113 | |
| 114 | 114 | private Integer dueStatus; |
| 115 | 115 | |
| 116 | + private String motherPId; | |
| 117 | + | |
| 118 | + private List<String> babyPIdList; | |
| 119 | + | |
| 120 | + public String getMotherPId() { | |
| 121 | + return motherPId; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public void setMotherPId(String motherPId) { | |
| 125 | + this.motherPId = motherPId; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public List<String> getBabyPIdList() { | |
| 129 | + return babyPIdList; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public void setBabyPIdList(List<String> babyPIdList) { | |
| 133 | + this.babyPIdList = babyPIdList; | |
| 134 | + } | |
| 135 | + | |
| 116 | 136 | public Integer getDueStatus() { |
| 117 | 137 | return dueStatus; |
| 118 | 138 | } |