Commit 80138ff007a5b2738991aacc811fdb26913bfe9f
1 parent
35838cde2e
Exists in
master
and in
1 other branch
出院小结bug修改
Showing 3 changed files with 47 additions and 18 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyCheckController.java
View file @
80138ff
... | ... | @@ -163,7 +163,7 @@ |
163 | 163 | @RequestParam(value = "highRisk", required = false) String highRisk, |
164 | 164 | @RequestParam(value = "waskSon", required = false) String waskSon, |
165 | 165 | Integer page, Integer limit, HttpServletRequest request) { |
166 | - return babyCheckFacade.babyCheckList(checkTime, queryNo, startCheckMonthAge, endCheckMonthAge, nextDate, highRisk, waskSon, limit, page, getUserId(request)); | |
166 | + return babyCheckFacade.babyCheckList(checkTime, queryNo, startCheckMonthAge, endCheckMonthAge, nextDate, highRisk, waskSon, page, limit, getUserId(request)); | |
167 | 167 | } |
168 | 168 | |
169 | 169 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
80138ff
... | ... | @@ -755,14 +755,14 @@ |
755 | 755 | return br; |
756 | 756 | } |
757 | 757 | |
758 | - | |
759 | 758 | public BaseResponse babyCheckList(String checkTime, String queryNo, Integer checkMonthAge, Integer endCheckMonthAge, String nextDate, String highRisk, String waskSon, Integer page, Integer limit, Integer userId) { |
760 | 759 | boolean flag = false; |
761 | 760 | List<String> hospital = groupsFacade.findGroupHospital(userId, false); |
762 | 761 | Criteria criteria = Criteria.where("yn").ne("0").and("hospitalId").in(hospital); |
763 | 762 | Criteria pCriteria = Criteria.where("yn").ne("0").and("hospitalId").in(hospital); |
764 | 763 | if (org.apache.commons.lang.StringUtils.isNotBlank(queryNo)) { |
765 | - pCriteria.orOperator(Criteria.where("mcertNo").regex(queryNo), Criteria.where("name").regex(queryNo), Criteria.where("fphone").regex(queryNo)); | |
764 | + pCriteria.orOperator(Criteria.where("mcertNo").regex(queryNo), Criteria.where("name").regex(queryNo), | |
765 | + Criteria.where("fphone").regex(queryNo), Criteria.where("vcCardNo").regex(queryNo)); | |
766 | 766 | flag = true; |
767 | 767 | } |
768 | 768 | if (flag) { |
769 | 769 | |
770 | 770 | |
771 | 771 | |
772 | 772 | |
... | ... | @@ -805,23 +805,42 @@ |
805 | 805 | if (StringUtils.isNotEmpty(babyCheckModel.getBuildId())) { |
806 | 806 | BabyModel babyModel = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(babyCheckModel.getBuildId())), BabyModel.class); |
807 | 807 | map.put("babyName", babyModel.getName()); |
808 | - map.put("sex", babyModel.getSex()); | |
808 | + map.put("sex", babyModel.getSex() != 0 ? "男" : "女"); | |
809 | 809 | map.put("mName", babyModel.getMname()); |
810 | 810 | map.put("mCardNo", babyModel.getCardNo()); |
811 | 811 | map.put("checkMonthAge", DateUtil.getBabyMonthAge(babyModel.getBirth(), babyCheckModel.getCheckDate())); |
812 | + map.put("monthAge", DateUtil.getMonth(babyModel.getBirth(), babyCheckModel.getCheckDate())); | |
812 | 813 | } |
813 | 814 | map.put("checkTime", DateUtil.getyyyy_MM_dd(babyCheckModel.getCheckDate())); |
814 | 815 | map.put("nextCheckTime", DateUtil.getyyyy_MM_dd(babyCheckModel.getNextDate())); |
815 | - map.put("highRisk", babyCheckModel.getHighRisk() == 1 ? "高危儿" : "-"); | |
816 | - map.put("waskSon", babyCheckModel.getWaskSon() == 1 ? "低弱儿" : "-"); | |
816 | + if (null != babyCheckModel.getHighRisk()) { | |
817 | + map.put("highRisk", babyCheckModel.getHighRisk() == 1 ? "高危儿" : "-"); | |
818 | + } else { | |
819 | + map.put("highRisk", "-"); | |
820 | + } | |
821 | + if (null != babyCheckModel.getWaskSon()) { | |
822 | + map.put("waskSon", babyCheckModel.getWaskSon() == 1 ? "低弱儿" : "-"); | |
823 | + } else { | |
824 | + map.put("waskSon", "-"); | |
825 | + } | |
817 | 826 | map.put("height", babyCheckModel.getHeight()); |
818 | 827 | map.put("weight", babyCheckModel.getWeight()); |
819 | 828 | list.add(map); |
820 | 829 | } |
821 | - pageResult.setGrid(list); | |
822 | - return RespBuilder.buildSuccess(pageResult); | |
823 | - } | |
830 | + if (null != checkMonthAge && null != endCheckMonthAge) { | |
831 | + for (Map<String, Object> mapList : list) { | |
832 | + if ((int) mapList.get("monthAge") >= checkMonthAge && (int) mapList.get("monthAge") <= endCheckMonthAge) { | |
833 | + list.add(mapList); | |
834 | + } | |
835 | + } | |
836 | + pageResult.setGrid(list); | |
837 | + return RespBuilder.buildSuccess(pageResult); | |
838 | + } else { | |
839 | + pageResult.setGrid(list); | |
840 | + return RespBuilder.buildSuccess(pageResult); | |
841 | + } | |
824 | 842 | |
843 | + } | |
825 | 844 | |
826 | 845 | public void getBabyCheckList(String[] ids, PersonModel personModel, List<Map<String, String>> list) { |
827 | 846 | List<BabyCheckModel> checkModels; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DischargeAbstractFacade.java
View file @
80138ff
... | ... | @@ -13,12 +13,10 @@ |
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.operate.web.service.impl.BaseServiceImpl; |
16 | +import com.lyms.platform.permission.model.Users; | |
16 | 17 | import com.lyms.platform.permission.service.CouponService; |
17 | 18 | import com.lyms.platform.permission.service.UsersService; |
18 | -import com.lyms.platform.pojo.BabyModel; | |
19 | -import com.lyms.platform.pojo.DischargeAbstractBabyModel; | |
20 | -import com.lyms.platform.pojo.DischargeAbstractMotherModel; | |
21 | -import com.lyms.platform.pojo.Patients; | |
19 | +import com.lyms.platform.pojo.*; | |
22 | 20 | import com.lyms.platform.query.BabyModelQuery; |
23 | 21 | import com.lyms.platform.query.DischargeAbstractBabyQuery; |
24 | 22 | import com.lyms.platform.query.DischargeAbstractMotherQuery; |
... | ... | @@ -404,9 +402,9 @@ |
404 | 402 | Criteria pCriteria = Criteria.where("yn").ne("0").and("hospitalId").in(hospital); |
405 | 403 | boolean flag = false; |
406 | 404 | if (StringUtils.isNotEmpty(queryNo)) { |
407 | - pCriteria.orOperator(Criteria.where("cardNo").is(queryNo), | |
408 | - Criteria.where("username").is(queryNo), Criteria.where("phone").is(queryNo) | |
409 | - , Criteria.where("vcCardNo").is(queryNo)); | |
405 | + pCriteria.orOperator(Criteria.where("cardNo").regex(queryNo), | |
406 | + Criteria.where("username").regex(queryNo), Criteria.where("phone").regex(queryNo) | |
407 | + , Criteria.where("vcCardNo").regex(queryNo)); | |
410 | 408 | flag = true; |
411 | 409 | } |
412 | 410 | if (StringUtils.isNotEmpty(fmDate)) { |
... | ... | @@ -452,6 +450,9 @@ |
452 | 450 | map.put("phoen", patients.getPhone()); |
453 | 451 | map.put("age", patients.getAge() + "岁"); |
454 | 452 | map.put("fmDate", DateUtil.getyyyy_MM_dd(patients.getFmDate())); |
453 | + | |
454 | + MaternalDeliverModel maternalDeliverModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(patients.getId())), MaternalDeliverModel.class); | |
455 | + map.put("tireNumber", maternalDeliverModel.getTireNumber()); | |
455 | 456 | String rFactor = commonService.resloveFactor(patients.getRiskFactorId()); |
456 | 457 | if (patients.getoRiskFactor() != null && !"null".equals(patients.getoRiskFactor())) { |
457 | 458 | if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(rFactor)) { |
458 | 459 | |
... | ... | @@ -462,11 +463,20 @@ |
462 | 463 | } |
463 | 464 | map.put("highRisk", rFactor); |
464 | 465 | } |
466 | + map.put("id", dischargeAbstract.getId()); | |
465 | 467 | map.put("leaveHospitalDate", DateUtil.getyyyy_MM_dd(dischargeAbstract.getLeaveHospitalDate())); |
466 | 468 | map.put("description", dischargeAbstract.getDescription()); |
467 | 469 | map.put("afterMakeBabyDays", dischargeAbstract.getAfterMakeBabyDays()); |
468 | - map.put("litterIndex", ""); | |
469 | - map.put("inputPerson", dischargeAbstract.getInputMan()); | |
470 | + String bookbuildingDoctor = ""; | |
471 | + if (com.lyms.platform.common.utils.StringUtils.isNotEmpty(dischargeAbstract.getInputMan())) { | |
472 | + Users user = usersService.getUsers(Integer.valueOf(dischargeAbstract.getInputMan())); | |
473 | + if (user != null) { | |
474 | + bookbuildingDoctor = user.getName(); | |
475 | + } else { | |
476 | + System.out.println(dischargeAbstract.getId() + ";no user inputMan" + dischargeAbstract.getInputMan()); | |
477 | + } | |
478 | + } | |
479 | + map.put("inputPerson", bookbuildingDoctor); | |
470 | 480 | map.put("inputdate", DateUtil.getyyyy_MM_dd(dischargeAbstract.getCreateDate())); |
471 | 481 | |
472 | 482 | data.add(map); |