Commit 9dd2fcf2e493259758f244b079d5ffff7bceeacc
1 parent
c8d7ac0aaa
Exists in
master
and in
1 other branch
code update
Showing 1 changed file with 28 additions and 12 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java
View file @
9dd2fcf
... | ... | @@ -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,30 @@ |
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 | + list.addAll(tempList); | |
142 | 146 | } |
147 | +// //查询儿童的基本信息 | |
148 | +// BabyModel model = babyCheckFacade.getBabyModel(babyId, base); | |
149 | +// | |
150 | +// | |
151 | +// List<Map<String, String>> tempList = new ArrayList<>(); | |
152 | +// if(CollectionUtils.isNotEmpty(models)){ | |
153 | +// for(BabyModel babyModel:models){ | |
154 | +// babyCheckFacade.getBabyCheckList(babyModel.getId(), babyModel, tempList); | |
155 | +// } | |
156 | +// } | |
157 | +// | |
158 | +// list.addAll(tempList); | |
143 | 159 | |
144 | - list.addAll(tempList); | |
160 | + | |
145 | 161 | |
146 | 162 | resMap.put("baseInfo", base); |
147 | 163 | resMap.put("checkList", list); |