Commit 1233b5a046de979bdbd4c2f434a08a463d9d9bb1
1 parent
dde34e17fa
Exists in
master
and in
6 other branches
修复bug
Showing 2 changed files with 19 additions and 17 deletions
platform-dal/src/main/java/com/lyms/platform/pojo/BabyNeuroPsychologicalModel.java
View file @
1233b5a
... | ... | @@ -28,6 +28,8 @@ |
28 | 28 | |
29 | 29 | private Integer gender; |
30 | 30 | |
31 | + private String name; | |
32 | + | |
31 | 33 | private Date birth; |
32 | 34 | |
33 | 35 | /** |
... | ... | @@ -49,8 +51,6 @@ |
49 | 51 | |
50 | 52 | private String hospitalId; |
51 | 53 | |
52 | - private Integer month; | |
53 | - | |
54 | 54 | private Integer checkMonth; |
55 | 55 | |
56 | 56 | private Date createTime; |
... | ... | @@ -83,6 +83,14 @@ |
83 | 83 | return gender; |
84 | 84 | } |
85 | 85 | |
86 | + public String getName() { | |
87 | + return name; | |
88 | + } | |
89 | + | |
90 | + public void setName(String name) { | |
91 | + this.name = name; | |
92 | + } | |
93 | + | |
86 | 94 | public void setGender(Integer gender) { |
87 | 95 | this.gender = gender; |
88 | 96 | } |
... | ... | @@ -125,14 +133,6 @@ |
125 | 133 | |
126 | 134 | public void setCheckMonth(Integer checkMonth) { |
127 | 135 | this.checkMonth = checkMonth; |
128 | - } | |
129 | - | |
130 | - public Integer getMonth() { | |
131 | - return month; | |
132 | - } | |
133 | - | |
134 | - public void setMonth(Integer month) { | |
135 | - this.month = month; | |
136 | 136 | } |
137 | 137 | |
138 | 138 | public Integer getYn() { |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/BabyEvaluationCriterionServiceImpl.java
View file @
1233b5a
... | ... | @@ -14,6 +14,7 @@ |
14 | 14 | import com.lyms.platform.permission.dao.master.MasterUsersMapper; |
15 | 15 | import com.lyms.platform.permission.model.Users; |
16 | 16 | import com.lyms.platform.pojo.*; |
17 | +import org.apache.commons.collections.map.HashedMap; | |
17 | 18 | import org.springframework.beans.factory.annotation.Autowired; |
18 | 19 | import org.springframework.data.domain.Sort; |
19 | 20 | import org.springframework.data.mongodb.core.MongoTemplate; |
... | ... | @@ -330,6 +331,7 @@ |
330 | 331 | return new BaseResponse().setErrorcode(ErrorCodeConstants.SYSTEM_ERROR).setErrormsg("儿童建档数据缺失"); |
331 | 332 | } |
332 | 333 | Integer checkMonth = DateUtil.getBabyAgeMonth(babyModel.getBirth(), new Date()); |
334 | + paramModel.setName(babyModel.getName()); | |
333 | 335 | paramModel.setGender(babyModel.getSex()); |
334 | 336 | paramModel.setBirth(babyModel.getBirth()); |
335 | 337 | paramModel.setMcertNo(babyModel.getMcertNo()); |
336 | 338 | |
... | ... | @@ -372,10 +374,10 @@ |
372 | 374 | BabyEvaluationCriterionModel evaluationCriterionModel = mongoTemplate.findOne(Query.query(Criteria.where("_id").is(configId)), BabyEvaluationCriterionModel.class); |
373 | 375 | val += evaluationCriterionModel.getProjectVal(); |
374 | 376 | } |
375 | - if (checkMonth - 2 >1){ | |
377 | + if (checkMonth - 3 > 0){ | |
376 | 378 | // 默认之前的全部通过 |
377 | - Integer currentMonth = getCurrentMonth(checkMonth, 3, 3); | |
378 | - List<BabyEvaluationCriterionModel> modelList = mongoTemplate.find(Query.query(Criteria.where("month").gte(currentMonth).and("type").is(3)), BabyEvaluationCriterionModel.class); | |
379 | + Integer currentMonth = getCurrentMonth(checkMonth - 3, 3, 3); | |
380 | + List<BabyEvaluationCriterionModel> modelList = mongoTemplate.find(Query.query(Criteria.where("month").lte(currentMonth).and("type").is(3)), BabyEvaluationCriterionModel.class); | |
379 | 381 | for (BabyEvaluationCriterionModel model : modelList) { |
380 | 382 | val += model.getProjectVal(); |
381 | 383 | } |
... | ... | @@ -624,8 +626,6 @@ |
624 | 626 | String babyId = jsonObject.getString("babyId"); |
625 | 627 | List<Map<String, String>> mapList = null; |
626 | 628 | if (StringUtils.isNotEmpty(babyId)) { |
627 | - Date firstSecond = getFirstSecond(); | |
628 | - Date dayLastSecond = DateUtil.getDayLastSecond(new Date()); | |
629 | 629 | final List<BabyNerveMovementModel> models = mongoTemplate.find(Query.query(Criteria.where("babyId").is(babyId).and("hospitalId").is(hospitalId)), BabyNerveMovementModel.class); |
630 | 630 | mapList = new LinkedList<Map<String, String>>(){{ |
631 | 631 | for (BabyNerveMovementModel model : models) { |
632 | 632 | |
633 | 633 | |
... | ... | @@ -928,15 +928,17 @@ |
928 | 928 | List<BabyNeuroPsychologicalModel> models = mongoTemplate.find(query, BabyNeuroPsychologicalModel.class); |
929 | 929 | List<Map<String, String>> maps = new ArrayList<>(); |
930 | 930 | for (BabyNeuroPsychologicalModel model : models) { |
931 | - Map<String, String> map = BeanUtils.objectToStringMap(model); | |
931 | + Map<String, String> map = new HashedMap(); | |
932 | + map.put("name", model.getName()); | |
932 | 933 | map.put("age", model.getGender() == 0 ? "女" : model.getGender() == 1 ? "男" : "未知"); |
933 | 934 | map.put("birthStr", model.getBirth() != null ? DateUtil.getyyyy_MM_dd(model.getBirth()) : ""); |
934 | 935 | map.put("mcarNo", "1".equals(param.getIsEncrypt()) ? EncryptUtil.numberEncrypt(model.getMcertNo()) : model.getMcertNo()); |
935 | 936 | map.put("mphone", "1".equals(param.getIsEncrypt()) ? EncryptUtil.numberEncrypt(model.getMphone()) : model.getMphone()); |
936 | 937 | map.put("currentMonth", DateUtil.getBabyMonthAge(model.getBirth(), new Date())); |
938 | + map.put("checkMonth", model.getCheckMonth().toString()); | |
939 | + map.put("levelName", model.getLevelName()); | |
937 | 940 | Users users = usersMapper.getUsers(Integer.parseInt(model.getCreateUser())); |
938 | 941 | map.put("checkDoctorStr",users == null ? "" : users.getName()); |
939 | - map.remove("configId"); | |
940 | 942 | maps.add(map); |
941 | 943 | } |
942 | 944 | BaseListResponse baseListResponse = new BaseListResponse(); |