Commit 79a0622e4093e614c7d1abdf97266b7422aea8e6

Authored by liquanyu
1 parent 8c978d8d65

微量元素

Showing 1 changed file with 12 additions and 6 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MicroelementFacade.java View file @ 79a0622
... ... @@ -224,17 +224,20 @@
224 224 Date lastMenses = DateUtil.addDay(pat.getLastMenses(),1);
225 225 int week = DateUtil.getWeek(lastMenses,model.getCreated());
226 226 Map<String,List<String>> contents = new HashMap<>();
227   - boolean isNormal = false;
  227 + boolean isNormal = true;
228 228  
229 229 if (CollectionUtils.isNotEmpty(model.getMicroelements()))
230 230 {
231 231 for (MicroelementModel.Microelement ele : model.getMicroelements())
232 232 {
233   - if (2 == ele.getStatus() || "铅".equals(ele.getEleName()))
  233 + if ("铅".equals(ele.getEleName()))
234 234 {
235   - isNormal = true;
236 235 continue;
237 236 }
  237 + if (2 != ele.getStatus() )
  238 + {
  239 + isNormal = false;
  240 + }
238 241 MicroelementConfigModel configModel = mongoTemplate.findOne(
239 242 Query.query(Criteria.where("eleName").is(ele.getEleName()).and("status").is(ele.getStatus()).and("type").is(0)), MicroelementConfigModel.class);
240 243  
241 244  
242 245  
243 246  
... ... @@ -316,16 +319,19 @@
316 319 data.put("microelements", model.getMicroelements());
317 320 data.put("created", DateUtil.getyyyy_MM_dd(model.getCreated()));
318 321 Map<String,List<String>> contents = new HashMap<>();
319   - boolean isNormal = false;
  322 + boolean isNormal = true;
320 323 int month = DateUtil.getBabyAgeMonth(babyModel.getBirth(),model.getCreated());
321 324 if (CollectionUtils.isNotEmpty(model.getMicroelements()))
322 325 {
323 326 for (MicroelementModel.Microelement ele : model.getMicroelements())
324 327 {
325   - if (2 == ele.getStatus() || "铅".equals(ele.getEleName()))
  328 + if ("铅".equals(ele.getEleName()))
326 329 {
327   - isNormal = true;
328 330 continue;
  331 + }
  332 + if (2 != ele.getStatus() )
  333 + {
  334 + isNormal = false;
329 335 }
330 336 Query query1 = Query.query(Criteria.where("eleName").is(ele.getEleName()).and("status").is(ele.getStatus()).and("type").is(1));
331 337 List<MicroelementConfigModel> configModels = mongoTemplate.find(query1