Commit c047d5d110dc65788b1ce3fcd585f04b76f55fa9
1 parent
8ffc7a82cd
Exists in
master
and in
8 other branches
增加设置parentid
Showing 2 changed files with 37 additions and 26 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyOrderFacade.java
View file @
c047d5d
| ... | ... | @@ -32,9 +32,8 @@ |
| 32 | 32 | import java.util.*; |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * | |
| 36 | 35 | * 申请单门面 |
| 37 | - * | |
| 36 | + * <p> | |
| 38 | 37 | * Created by Administrator on 2016/6/15 0015. |
| 39 | 38 | */ |
| 40 | 39 | @Component |
| ... | ... | @@ -68,7 +67,7 @@ |
| 68 | 67 | * 增加转诊申请 |
| 69 | 68 | * |
| 70 | 69 | * @param referralApplyOrderAddRequest |
| 71 | - * @param type 2 孕妇 1 儿童 | |
| 70 | + * @param type 2 孕妇 1 儿童 | |
| 72 | 71 | * @return |
| 73 | 72 | */ |
| 74 | 73 | public BaseResponse addOneReferralApplyOrder(ReferralApplyOrderAddRequest referralApplyOrderAddRequest, Integer userId, Integer type) { |
| 75 | 74 | |
| ... | ... | @@ -78,12 +77,12 @@ |
| 78 | 77 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 79 | 78 | patientsQuery.setId(referralApplyOrderModel.getParentId()); |
| 80 | 79 | |
| 81 | - ReferralApplyOrderQuery referralApplyOrderQuery=new ReferralApplyOrderQuery(); | |
| 80 | + ReferralApplyOrderQuery referralApplyOrderQuery = new ReferralApplyOrderQuery(); | |
| 82 | 81 | referralApplyOrderQuery.setParentId(referralApplyOrderModel.getParentId()); |
| 83 | 82 | String hospital = autoMatchFacade.getHospitalId(userId); |
| 84 | 83 | referralApplyOrderQuery.setOutHospitalId(hospital); |
| 85 | 84 | List<ReferralApplyOrderModel> list = applyOrderService.queryReferralApplyOrderWithQuery(referralApplyOrderQuery); |
| 86 | - if(CollectionUtils.isEmpty(list)){ | |
| 85 | + if (CollectionUtils.isEmpty(list)) { | |
| 87 | 86 | if (2 == type) { |
| 88 | 87 | //查询产妇信息 |
| 89 | 88 | List<Patients> patientses = patientsService.queryPatient(patientsQuery); |
| ... | ... | @@ -102,7 +101,8 @@ |
| 102 | 101 | referralApplyOrderModel.setSex(SexEnum.WOMAN.getId()); |
| 103 | 102 | referralApplyOrderModel.setBirth(patients.getBirth()); |
| 104 | 103 | referralApplyOrderModel.setExpVip(patients.getExpVip()); |
| 105 | - int days= DateUtil.daysBetween(patients.getLastMenses(),new Date());; | |
| 104 | + int days = DateUtil.daysBetween(patients.getLastMenses(), new Date()); | |
| 105 | + ; | |
| 106 | 106 | referralApplyOrderModel.setPid(patients.getPid()); |
| 107 | 107 | referralApplyOrderModel.setDueWeek(com.lyms.platform.common.utils.StringUtils.dueWeek(days)); |
| 108 | 108 | } |
| ... | ... | @@ -231,6 +231,16 @@ |
| 231 | 231 | zhuanRname = zhuanc1.getName(); |
| 232 | 232 | } |
| 233 | 233 | referralApplyOrderResult.convertToResult(list.get(0), patients, zhuanCName, zhuanRname); |
| 234 | + Map map = new HashMap(); | |
| 235 | + if (StringUtils.isNotEmpty(list.get(0).getApplyDoctor())) { | |
| 236 | + Users users = usersService.getUsers(Integer.valueOf(list.get(0).getApplyDoctor())); | |
| 237 | + if (null != users) { | |
| 238 | + map.put("id", users.getId()); | |
| 239 | + map.put("name", users.getName()); | |
| 240 | + } | |
| 241 | + } | |
| 242 | + referralApplyOrderResult.setApplyDoctor(map); | |
| 243 | + | |
| 234 | 244 | } |
| 235 | 245 | return new BaseObjectResponse().setData(referralApplyOrderResult).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); |
| 236 | 246 | } |
| 237 | 247 | |
| 238 | 248 | |
| 239 | 249 | |
| ... | ... | @@ -266,15 +276,15 @@ |
| 266 | 276 | referralApplyOrderQuery.setName(applyOrderQueryRequest.getName()); |
| 267 | 277 | referralApplyOrderQuery.setCardNo(applyOrderQueryRequest.getCardNo()); |
| 268 | 278 | referralApplyOrderQuery.setPhone(applyOrderQueryRequest.getPhone()); |
| 269 | - String hospital=autoMatchFacade.getHospitalId(userId); | |
| 279 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
| 270 | 280 | referralApplyOrderQuery.setHospitalName(organizationService.getOrganization(Integer.valueOf(hospital)).getName()); |
| 271 | 281 | //1 转入 0转出 |
| 272 | 282 | if ("1".equals(applyOrderQueryRequest.getAction())) { |
| 273 | - referralApplyOrderQuery.setTransferredHospital(hospital); | |
| 283 | + referralApplyOrderQuery.setTransferredHospital(hospital); | |
| 274 | 284 | } else if ("0".equals(applyOrderQueryRequest.getAction())) { |
| 275 | - referralApplyOrderQuery.setOutHospitalId(hospital); | |
| 285 | + referralApplyOrderQuery.setOutHospitalId(hospital); | |
| 276 | 286 | } |
| 277 | - if(null!=applyOrderQueryRequest.getTyVip() &&Boolean.TRUE.equals(applyOrderQueryRequest.getTyVip())){ | |
| 287 | + if (null != applyOrderQueryRequest.getTyVip() && Boolean.TRUE.equals(applyOrderQueryRequest.getTyVip())) { | |
| 278 | 288 | referralApplyOrderQuery.setExpVip(1); |
| 279 | 289 | } |
| 280 | 290 | |
| ... | ... | @@ -298,16 +308,16 @@ |
| 298 | 308 | babyModelQuery.setYn(YnEnums.YES.getId()); |
| 299 | 309 | List<BabyModel> babyModel=babyBookbuildingService.queryBabyBuildByCond(babyModelQuery);*/ |
| 300 | 310 | babyApplyOrderResult.convert(applyOrderModel, zhuanCName, zhuanRname); |
| 301 | - List <String> diagnoseList = babyCheckFacade.getBabyLastDiagnose(applyOrderModel.getPid()); | |
| 302 | - String diagnose = ""; | |
| 303 | - if (CollectionUtils.isNotEmpty(diagnoseList)) { | |
| 304 | - diagnose = ""; | |
| 305 | - for (String obj : diagnoseList) { | |
| 306 | - BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(obj); | |
| 307 | - if (basicConfig != null) { | |
| 308 | - diagnose += basicConfig.getName() + " "; | |
| 309 | - } | |
| 310 | - } | |
| 311 | + List<String> diagnoseList = babyCheckFacade.getBabyLastDiagnose(applyOrderModel.getPid()); | |
| 312 | + String diagnose = ""; | |
| 313 | + if (CollectionUtils.isNotEmpty(diagnoseList)) { | |
| 314 | + diagnose = ""; | |
| 315 | + for (String obj : diagnoseList) { | |
| 316 | + BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(obj); | |
| 317 | + if (basicConfig != null) { | |
| 318 | + diagnose += basicConfig.getName() + " "; | |
| 319 | + } | |
| 320 | + } | |
| 311 | 321 | babyApplyOrderResult.sethRisk(diagnose); |
| 312 | 322 | } |
| 313 | 323 | |
| ... | ... | @@ -343,7 +353,7 @@ |
| 343 | 353 | referralApplyOrderQuery.setLimit(applyOrderQueryRequest.getLimit()); |
| 344 | 354 | referralApplyOrderQuery.setType(applyOrderQueryRequest.getType()); |
| 345 | 355 | |
| 346 | - String hospital=autoMatchFacade.getHospitalId(userId); | |
| 356 | + String hospital = autoMatchFacade.getHospitalId(userId); | |
| 347 | 357 | referralApplyOrderQuery.setHospitalName(organizationService.getOrganization(Integer.valueOf(hospital)).getName()); |
| 348 | 358 | //1 转入 0转出 |
| 349 | 359 | if ("1".equals(applyOrderQueryRequest.getAction())) { |
| ... | ... | @@ -381,7 +391,7 @@ |
| 381 | 391 | applyOrderResult.setApplyDoctor(users.getName()); |
| 382 | 392 | } |
| 383 | 393 | } |
| 384 | - HighScoreResult highScoreResult= antenatalExaminationFacade.findLastRisk(orderModel.getPid(), true); | |
| 394 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(orderModel.getPid(), true); | |
| 385 | 395 | applyOrderResult.setrRisk(highScoreResult.gethighRiskStr()); |
| 386 | 396 | applyOrderResult.setScore(highScoreResult.getScore()); |
| 387 | 397 | applyOrderResult.setrLevel(highScoreResult.getLevelStr()); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ReferralApplyOrderResult.java
View file @
c047d5d
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | |
| 8 | 8 | import java.util.Date; |
| 9 | 9 | import java.util.List; |
| 10 | +import java.util.Map; | |
| 10 | 11 | |
| 11 | 12 | /** |
| 12 | 13 | * Created by Administrator on 2016/7/7 0007. |
| ... | ... | @@ -61,7 +62,7 @@ |
| 61 | 62 | //转院方式 |
| 62 | 63 | private String transferMode; |
| 63 | 64 | //申请医生 |
| 64 | - private String applyDoctor; | |
| 65 | + private java.util.Map applyDoctor; | |
| 65 | 66 | //转出医院 |
| 66 | 67 | private String zhuanCName; |
| 67 | 68 | //转入医院 |
| 68 | 69 | |
| ... | ... | @@ -99,11 +100,11 @@ |
| 99 | 100 | this.age = age; |
| 100 | 101 | } |
| 101 | 102 | |
| 102 | - public String getApplyDoctor() { | |
| 103 | + public Map getApplyDoctor() { | |
| 103 | 104 | return applyDoctor; |
| 104 | 105 | } |
| 105 | 106 | |
| 106 | - public void setApplyDoctor(String applyDoctor) { | |
| 107 | + public void setApplyDoctor(Map applyDoctor) { | |
| 107 | 108 | this.applyDoctor = applyDoctor; |
| 108 | 109 | } |
| 109 | 110 | |
| ... | ... | @@ -253,7 +254,7 @@ |
| 253 | 254 | setTransferredDisease(destModel.getTransferredDisease()); |
| 254 | 255 | setPotentialRisk(destModel.getPotentialRisk()); |
| 255 | 256 | setTransferMode(destModel.getTransferMode()); |
| 256 | - setApplyDoctor(destModel.getApplyDoctor()); | |
| 257 | + | |
| 257 | 258 | setTransferredHospital(destModel.getTransferredHospital()); |
| 258 | 259 | setZhuanCName(zhuanCName); |
| 259 | 260 | setZhuanRname(zhuanRname); |