Commit 7f651cc172b59ceb541e4e6a4372b44945409065

Authored by zhangchao
1 parent f250373ba5
Exists in dev

#fix:优化出生证明一件事功能

Showing 3 changed files with 53 additions and 28 deletions

platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ 7f651cc
... ... @@ -445,7 +445,17 @@
445 445 private String dept;
446 446 //大同审核建档 0为待审核 1为正常
447 447 private boolean isArchive=false;
  448 + //病历号(住院号)
  449 + private String blNo;
448 450  
  451 + public String getBlNo() {
  452 + return blNo;
  453 + }
  454 +
  455 + public void setBlNo(String blNo) {
  456 + this.blNo = blNo;
  457 + }
  458 +
449 459 public boolean isArchive() {
450 460 return isArchive;
451 461 }
... ... @@ -785,6 +795,10 @@
785 795 condition = condition.and("highRiskFileCode", highRiskFileCode, MongoOper.IS);
786 796 }
787 797  
  798 + if (StringUtils.isNotEmpty(blNo)){
  799 + condition = condition.and("blNo", blNo, MongoOper.IS);
  800 +
  801 + }
788 802 if (null != isComplete) {
789 803 condition = condition.and("isComplete", isComplete, MongoOper.IS);
790 804 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BirthController.java View file @ 7f651cc
... ... @@ -45,11 +45,11 @@
45 45 @RequestMapping(value = "/getPatientList", method = RequestMethod.GET)
46 46 @ResponseBody
47 47 @TokenRequired
48   - public BaseResponse getPatientList(HttpServletRequest request,String vcCardNo
  48 + public BaseResponse getPatientList(HttpServletRequest request,String blNo
49 49 ,String cardNo,String name,String fmDateStart,String fmDateEnd,Integer page,Integer limit){
50 50 LoginContext loginState = (LoginContext) request.getAttribute("loginContext");
51 51 PatientsQuery patientsQuery=new PatientsQuery();
52   - patientsQuery.setVcCardNo(vcCardNo);
  52 + patientsQuery.setBlNo(blNo);
53 53 patientsQuery.setCardNo(cardNo);
54 54 patientsQuery.setName(name);
55 55 patientsQuery.setPage(page);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyNutritionFacade.java View file @ 7f651cc
... ... @@ -1688,29 +1688,34 @@
1688 1688  
1689 1689 //获取对应月龄的医生建议
1690 1690 BabyDietSuggestModel dietDoctorSuggests = mongoTemplate.findOne(Query.query(Criteria.where("type").is(1).and("monthAge").is(month)), BabyDietSuggestModel.class);
1691   - List<List<String>> doctorSuggests = dietDoctorSuggests.getDoctorSuggests();
1692   - List<Map<String,Integer>> tempList = list.subList(0, items);
1693   - for (int i = 0; i < tempList.size() ; i++)
1694   - {
1695   - //没有添加对应月龄的食物 add 0 为未添加 1为添加
1696   - if (tempList.get(i).get("add") != null && tempList.get(i).get("add") != 1)
  1691 + if (dietDoctorSuggests!= null){
  1692 + List<List<String>> doctorSuggests = dietDoctorSuggests.getDoctorSuggests();
  1693 + List<Map<String,Integer>> tempList = list.subList(0, items);
  1694 + for (int i = 0; i < tempList.size() ; i++)
1697 1695 {
1698   - dss.add(doctorSuggests.get(i));
1699   - }
1700   - else
1701   - { //对应月龄添加了食物,才再判断是否爱吃 love 0为不爱吃 1为爱吃
1702   - if(tempList.get(i).get("love") != null && tempList.get(i).get("love") != 1)
  1696 + //没有添加对应月龄的食物 add 0 为未添加 1为添加
  1697 + if (tempList.get(i).get("add") != null && tempList.get(i).get("add") != 1)
1703 1698 {
1704   - noLovelType = tempList.get(i).get("type") < noLovelType ? tempList.get(i).get("type") : noLovelType;
  1699 + dss.add(doctorSuggests.get(i));
1705 1700 }
  1701 + else
  1702 + { //对应月龄添加了食物,才再判断是否爱吃 love 0为不爱吃 1为爱吃
  1703 + if(tempList.get(i).get("love") != null && tempList.get(i).get("love") != 1)
  1704 + {
  1705 + noLovelType = tempList.get(i).get("type") < noLovelType ? tempList.get(i).get("type") : noLovelType;
  1706 + }
  1707 + }
1706 1708 }
1707 1709 }
1708 1710  
  1711 +
1709 1712 data.put("suggests", null);
1710 1713 if (noLovelType != 100)
1711 1714 {
1712 1715 BabyDietSuggestModel dietSuggestModel1 = mongoTemplate.findOne(Query.query(Criteria.where("type").is(2).and("level").is(noLovelType)), BabyDietSuggestModel.class);
1713   - data.put("suggests", dietSuggestModel1.getSuggests());
  1716 + if (dietSuggestModel1!=null){
  1717 + data.put("suggests", dietSuggestModel1.getSuggests());
  1718 + }
1714 1719 }
1715 1720 data.put("doctorSuggests", dss);
1716 1721 }
1717 1722  
1718 1723  
1719 1724  
1720 1725  
1721 1726  
... ... @@ -2251,29 +2256,35 @@
2251 2256  
2252 2257 //获取对应月龄的医生建议
2253 2258 BabyDietSuggestModel dietDoctorSuggests = mongoTemplate.findOne(Query.query(Criteria.where("type").is(1).and("monthAge").is(month)), BabyDietSuggestModel.class);
2254   - List<List<String>> doctorSuggests = dietDoctorSuggests.getQhdfyDoctorSuggests();
2255   - List<Map<String,Integer>> tempList = list.subList(start, end);
2256   - for (int i = 0; i < tempList.size() ; i++)
2257   - {
2258   - //没有添加对应月龄的食物 add 0 为未添加 1为添加
2259   - if (tempList.get(i).get("add") != null && tempList.get(i).get("add") != 1)
  2259 + if (dietDoctorSuggests!=null){
  2260 + List<List<String>> doctorSuggests = dietDoctorSuggests.getQhdfyDoctorSuggests();
  2261 + List<Map<String,Integer>> tempList = list.subList(start, end);
  2262 + for (int i = 0; i < tempList.size() ; i++)
2260 2263 {
2261   - dss.add(doctorSuggests.get(i));
2262   - }
2263   - else
2264   - { //对应月龄添加了食物,才再判断是否爱吃 love 0为不爱吃 1为爱吃
2265   - if(tempList.get(i).get("love") != null && tempList.get(i).get("love") != 1)
  2264 + //没有添加对应月龄的食物 add 0 为未添加 1为添加
  2265 + if (tempList.get(i).get("add") != null && tempList.get(i).get("add") != 1)
2266 2266 {
2267   - noLovelType = tempList.get(i).get("type") < noLovelType ? tempList.get(i).get("type") : noLovelType;
  2267 + dss.add(doctorSuggests.get(i));
2268 2268 }
  2269 + else
  2270 + { //对应月龄添加了食物,才再判断是否爱吃 love 0为不爱吃 1为爱吃
  2271 + if(tempList.get(i).get("love") != null && tempList.get(i).get("love") != 1)
  2272 + {
  2273 + noLovelType = tempList.get(i).get("type") < noLovelType ? tempList.get(i).get("type") : noLovelType;
  2274 + }
  2275 + }
2269 2276 }
2270 2277 }
2271 2278  
  2279 +
2272 2280 data.put("suggests", null);
2273 2281 if (noLovelType != 100)
2274 2282 {
2275 2283 BabyDietSuggestModel dietSuggestModel1 = mongoTemplate.findOne(Query.query(Criteria.where("type").is(2).and("level").is(noLovelType)), BabyDietSuggestModel.class);
2276   - data.put("suggests", dietSuggestModel1.getSuggests());
  2284 + if (dietSuggestModel1!=null){
  2285 + data.put("suggests", dietSuggestModel1.getSuggests());
  2286 + }
  2287 +
2277 2288 }
2278 2289 data.put("doctorSuggests", dss);
2279 2290 }