Commit a2e0fa03bf64b0da7d52422b17e19413a4f9e488

Authored by wangbo
1 parent 4dc7d3be58

月龄添加

Showing 2 changed files with 30 additions and 19 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/CheckItemManageServiceImpl.java View file @ a2e0fa0
... ... @@ -93,18 +93,23 @@
93 93 AntenatalExaminationModel examinationModels = antenatalExaminationModels.get(0);
94 94 if (examinationModels != null && StringUtils.isNotEmpty(examinationModels.getConfigItemId())) {
95 95 String strCept = examinationModels.getConfigItemId();
96   - String[] string = strCept.split(",");
97   - for (String s1 : string) {
98   - List<CheckItem> list1 = checkItemMapper.xcxGetCheckItemList(Integer.valueOf(s1).intValue());
99   - for (CheckItem checkItem : list1) {
100   - Map map = new HashMap();
101   - map.put("id", checkItem.getId());
102   - map.put("project", checkItem.getProject());
103   - map.put("projectInfo", checkItem.getProjectInfo());
104   - map.put("checkAttention", checkItem.getCheckAttention());
105   - list2.add(map);
  96 + if (StringUtils.isNotEmpty(strCept)) {
  97 + String[] string = strCept.split(",");
  98 + for (String s1 : string) {
  99 + if (StringUtils.isNotEmpty(s1)) {
  100 + List<CheckItem> list1 = checkItemMapper.xcxGetCheckItemList(Integer.valueOf(s1).intValue());
  101 + for (CheckItem checkItem : list1) {
  102 + Map map = new HashMap();
  103 + map.put("id", checkItem.getId());
  104 + map.put("project", checkItem.getProject());
  105 + map.put("projectInfo", checkItem.getProjectInfo());
  106 + map.put("checkAttention", checkItem.getCheckAttention());
  107 + list2.add(map);
  108 + }
  109 + }
106 110 }
107 111 }
  112 +
108 113 }
109 114 return list2;
110 115  
... ... @@ -115,14 +120,16 @@
115 120 String[] str = antExChuModel.getConfigItemId().split(",");
116 121 if (null != str && str.length > 0) {
117 122 for (String s2 : str) {
118   - List<CheckItem> list1 = checkItemMapper.xcxGetCheckItemList(Integer.valueOf(s2).intValue());
119   - for (CheckItem checkItem : list1) {
120   - Map map = new HashMap();
121   - map.put("id", checkItem.getId());
122   - map.put("project", checkItem.getProject());
123   - map.put("projectInfo", checkItem.getProjectInfo());
124   - map.put("checkAttention", checkItem.getCheckAttention());
125   - list2.add(map);
  123 + if (StringUtils.isNotEmpty(s2)) {
  124 + List<CheckItem> list1 = checkItemMapper.xcxGetCheckItemList(Integer.valueOf(s2).intValue());
  125 + for (CheckItem checkItem : list1) {
  126 + Map map = new HashMap();
  127 + map.put("id", checkItem.getId());
  128 + map.put("project", checkItem.getProject());
  129 + map.put("projectInfo", checkItem.getProjectInfo());
  130 + map.put("checkAttention", checkItem.getCheckAttention());
  131 + list2.add(map);
  132 + }
126 133 }
127 134 }
128 135 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ a2e0fa0
... ... @@ -782,13 +782,17 @@
782 782 Map<String, String> checkRecord = new HashMap<>();
783 783 Date checkDate = cmodel.getCheckDate();
784 784 String monthAge = "";
  785 + int month = 0;
785 786 if (babyBirth != null && checkDate != null) {
786 787 monthAge = DateUtil.getBabyMonthAge(babyBirth, checkDate);
  788 + month = DateUtil.getMonth(babyBirth, new Date());
787 789 }
  790 +
788 791 checkRecord.put("parentId", cmodel.getBuildId());
789 792 checkRecord.put("id", cmodel.getId());
790 793 checkRecord.put("checkDate", DateUtil.getyyyy_MM_dd(checkDate));
791 794 checkRecord.put("monthAge", monthAge);
  795 + checkRecord.put("month", String.valueOf(month));
792 796 checkRecord.put("buildId", cmodel.getBuildId());
793 797 checkRecord.put("type", "2");
794 798 //根据规则完善儿保套餐(处理老数据,没有儿保月龄套餐)
... ... @@ -2350,7 +2354,7 @@
2350 2354  
2351 2355 //2019 6月计划 婴幼儿指导报告 去掉每日所需营养素、个月龄饮食指南和喂养指南进行整合为一项
2352 2356 //每日所需营养素
2353   - data.put("yys", getYys(month));
  2357 + data.put("yys", getYys(month));
2354 2358 }
2355 2359 }
2356 2360