Commit 708119f165a714f0fe2fa2872a25ed3b0c83dc24
1 parent
197184979e
Exists in
master
and in
6 other branches
威海产后观察
Showing 1 changed file with 71 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostpartumRecordsFacade.java
View file @
708119f
| ... | ... | @@ -131,6 +131,7 @@ |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | PostpartumRecords postpartumRecords = new PostpartumRecords(); |
| 134 | + List<Records> recordList = new ArrayList<Records>(); | |
| 134 | 135 | if(CollectionUtils.isNotEmpty(prList)){ |
| 135 | 136 | postpartumRecords = prList.get(0); |
| 136 | 137 | //查询是否存在记录详情 |
| ... | ... | @@ -139,7 +140,7 @@ |
| 139 | 140 | RecordsQuery recordsQuery = new RecordsQuery(); |
| 140 | 141 | recordsQuery.setPostId(postId); |
| 141 | 142 | recordsQuery.setIsDelete("1");//查询有效的数据 |
| 142 | - List<Records> recordList = recordsService.getRecordsListQuery(recordsQuery); | |
| 143 | + recordList = recordsService.getRecordsListQuery(recordsQuery); | |
| 143 | 144 | if(CollectionUtils.isNotEmpty(recordList)){ |
| 144 | 145 | postpartumRecordsResult.setRecords(recordList); |
| 145 | 146 | }else{ |
| 146 | 147 | |
| ... | ... | @@ -206,11 +207,80 @@ |
| 206 | 207 | } |
| 207 | 208 | Records records = new Records(); |
| 208 | 209 | records.setFz(mr); |
| 210 | + records.setNz("(-)"); | |
| 209 | 211 | recordList.add(records); |
| 210 | 212 | postpartumRecordsResult.setRecords(recordList); |
| 211 | 213 | } |
| 212 | 214 | } |
| 213 | 215 | postpartumRecordsResult.convertToResult(postpartumRecords); |
| 216 | + }else{ | |
| 217 | + String deliveryMode = ""; | |
| 218 | + if (StringUtils.isNotEmpty(maternalDeliverModel.getDeliveryMode())) { | |
| 219 | + | |
| 220 | + StringBuilder sb = new StringBuilder(); | |
| 221 | + | |
| 222 | + Map m = JsonUtil.str2Obj(maternalDeliverModel.getDeliveryMode(), Map.class); | |
| 223 | + String fmfs = null; | |
| 224 | + if (m != null) { | |
| 225 | + Object b = m.get("fmfs"); | |
| 226 | + if (b != null) { | |
| 227 | + fmfs = b.toString(); | |
| 228 | + if (fmfs != null) { | |
| 229 | + if (fmfs.equals("1")) { | |
| 230 | + String fmName = FmTypeEnums.getFmNameById(fmfs); | |
| 231 | + sb.append(fmName); | |
| 232 | + /*if (null != m.get("scfs") && !"null".equals(m.get("scfs").toString())) { | |
| 233 | + sb.append(","); | |
| 234 | + String scfs = m.get("scfs").toString(); | |
| 235 | + sb.append(FmTypeEnums.getFmScNameById(scfs)); | |
| 236 | + }*/ | |
| 237 | + deliveryMode = sb.toString(); | |
| 238 | + } else if (fmfs.equals("2")) { | |
| 239 | + String fmName = FmTypeEnums.getFmNameById(fmfs); | |
| 240 | + deliveryMode = fmName; | |
| 241 | + } | |
| 242 | + } | |
| 243 | + } | |
| 244 | + } | |
| 245 | + } | |
| 246 | + List<MaternalDeliverModel.Baby> babyList = maternalDeliverModel.getBaby(); | |
| 247 | + if(CollectionUtils.isNotEmpty(babyList)){ | |
| 248 | + String mr = ""; | |
| 249 | + for(MaternalDeliverModel.Baby baby : babyList){ | |
| 250 | + String sex = ""; | |
| 251 | + String pregnancyOut = ""; | |
| 252 | + if("1".equals(baby.getBabyGender())){ | |
| 253 | + sex = "男"; | |
| 254 | + } | |
| 255 | + if(baby.getPregnancyOut() != null){ | |
| 256 | + if("活产".equals(RenShenJieJuEnums.getTitle(baby.getPregnancyOut()))){ | |
| 257 | + pregnancyOut = "活婴"; | |
| 258 | + } | |
| 259 | + } | |
| 260 | + String apgarScorePf1 = ""; | |
| 261 | + String apgarScorePf5 = ""; | |
| 262 | + String apgarScorePf10 = ""; | |
| 263 | + Map<String, String> m = JsonUtil.getMap(baby.getApgarScore()); | |
| 264 | + if (MapUtils.isNotEmpty(m)) { | |
| 265 | + apgarScorePf1 += m.get("pf1") == null ? "" : m.get("pf1"); | |
| 266 | + apgarScorePf5 += m.get("pf5") == null ? "" : m.get("pf5"); | |
| 267 | + apgarScorePf10 += m.get("pf10") == null ? "" : m.get("pf10"); | |
| 268 | + } | |
| 269 | + String apgarScore = ""; | |
| 270 | + | |
| 271 | + if (StringUtils.isNotEmpty(apgarScorePf1) || StringUtils.isNotEmpty(apgarScorePf5) || StringUtils.isNotEmpty(apgarScorePf10)) { | |
| 272 | + apgarScore = apgarScorePf1 + UnitConstants.FEN + " - " + apgarScorePf5 + UnitConstants.FEN + " - " + apgarScorePf10 + UnitConstants.FEN; | |
| 273 | + } | |
| 274 | + String babyWeight = UnitUtils.unitSplice(baby.getBabyWeight(), UnitConstants.G); | |
| 275 | + String babyHeight = UnitUtils.unitSplice(baby.getBabyHeight(), UnitConstants.CM); | |
| 276 | + mr+=" 于 "+baby.getDueTime()+" "+deliveryMode+"一"+sex+" "+pregnancyOut+",评"+apgarScore+",体重"+babyWeight+",身长"+babyHeight; | |
| 277 | + } | |
| 278 | + Records records = new Records(); | |
| 279 | + records.setFz(mr); | |
| 280 | + records.setNz("(-)"); | |
| 281 | + recordList.add(records); | |
| 282 | + postpartumRecordsResult.setRecords(recordList); | |
| 283 | + } | |
| 214 | 284 | } |
| 215 | 285 | postpartumRecordsResult.setName(patients.getUsername()); |
| 216 | 286 | postpartumRecordsResult.setBhnum(maternalDeliverModel.getBhNum()); |