Commit 7eeef55d3ed500592323a004dbb083975c96246e
Exists in
master
and in
1 other branch
Merge remote-tracking branch 'origin/master'
Showing 1 changed file
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
7eeef55
... | ... | @@ -102,12 +102,18 @@ |
102 | 102 | babyQuery.setPid(builds.get(0).getPid()); |
103 | 103 | } |
104 | 104 | |
105 | - | |
105 | + String[] buildIds = null; | |
106 | 106 | List<Map<String, String>> list = new ArrayList<>(); |
107 | 107 | //查询建档记录 |
108 | 108 | List<BabyModel> models = babyBookbuildingService.queryBabyBuildByCond(babyQuery); |
109 | 109 | if(CollectionUtils.isNotEmpty(models)){ |
110 | - for(BabyModel babyModel:models){ | |
110 | + int len = models.size(); | |
111 | + buildIds = new String[len]; | |
112 | + | |
113 | + for(int i = 0 ;i < len ;i++){ | |
114 | + | |
115 | + BabyModel babyModel =models.get(i); | |
116 | + buildIds[i] = babyModel.getId(); | |
111 | 117 | Map<String, String> checkRecord = new HashMap<>(); |
112 | 118 | checkRecord.put("id", babyModel.getId()); |
113 | 119 | checkRecord.put("pid",babyModel.getPid()); |
114 | 120 | |
115 | 121 | |
116 | 122 | |
117 | 123 | |
... | ... | @@ -128,20 +134,31 @@ |
128 | 134 | list.add(checkRecord); |
129 | 135 | } |
130 | 136 | |
137 | + PersonModelQuery personModelQuery = new PersonModelQuery(); | |
138 | + personModelQuery.setYn(YnEnums.YES.getId()); | |
139 | + personModelQuery.setId(builds.get(0).getPid()); | |
131 | 140 | Collections.reverse(list); |
132 | - } | |
133 | - //查询儿童的基本信息 | |
134 | - BabyModel model = babyCheckFacade.getBabyModel(babyId, base); | |
141 | + List<PersonModel> personModels = personService.queryPersons(personModelQuery); | |
135 | 142 | |
136 | - | |
137 | - List<Map<String, String>> tempList = new ArrayList<>(); | |
138 | - if(CollectionUtils.isNotEmpty(models)){ | |
139 | - for(BabyModel babyModel:models){ | |
140 | - babyCheckFacade.getBabyCheckList(babyModel.getId(), babyModel, tempList); | |
141 | - } | |
143 | + List<Map<String, String>> tempList = new ArrayList<>(); | |
144 | + babyCheckFacade.getBabyCheckList(buildIds, personModels.get(0), tempList); | |
145 | + Collections.reverse(tempList); | |
146 | + list.addAll(tempList); | |
142 | 147 | } |
148 | +// //查询儿童的基本信息 | |
149 | +// BabyModel model = babyCheckFacade.getBabyModel(babyId, base); | |
150 | +// | |
151 | +// | |
152 | +// List<Map<String, String>> tempList = new ArrayList<>(); | |
153 | +// if(CollectionUtils.isNotEmpty(models)){ | |
154 | +// for(BabyModel babyModel:models){ | |
155 | +// babyCheckFacade.getBabyCheckList(babyModel.getId(), babyModel, tempList); | |
156 | +// } | |
157 | +// } | |
158 | +// | |
159 | +// list.addAll(tempList); | |
143 | 160 | |
144 | - list.addAll(tempList); | |
161 | + | |
145 | 162 | |
146 | 163 | resMap.put("baseInfo", base); |
147 | 164 | resMap.put("checkList", list); |