Commit 6315af916611ce9cf32d818eb188897dcfbc3671

Authored by liquanyu
1 parent caefbac9f1

儿童营养报告

Showing 2 changed files with 33 additions and 20 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java View file @ 6315af9
... ... @@ -1828,9 +1828,9 @@
1828 1828 // zcet("D:\\doc\\高血压报告20180813模板.xls");
1829 1829 // zcet("D:\\doc\\1.xls",false);
1830 1830  
1831   -// addBabyBmiHealthConfig("F:\儿童营养报告\婴幼儿bmi.xls");
  1831 + addBabyBmiHealthConfig("F:\儿童营养报告\婴幼儿bmi.xls");
1832 1832  
1833   - babyConfig("F:\儿童营养报告\儿童营养报告模板.xls");
  1833 +// babyConfig("F:\儿童营养报告\儿童营养报告模板.xls");
1834 1834 }
1835 1835  
1836 1836 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ 6315af9
... ... @@ -2174,31 +2174,44 @@
2174 2174 if (StringUtils.isNotEmpty(kaupEvaluate))
2175 2175 {
2176 2176 BabyConfigModel babyConfigModel = mongoTemplate.findOne(Query.query(Criteria.where("monthAge").is(month).and("status").is(kaupEvaluate).and("type").is(0)), BabyConfigModel.class);
2177   - if (month < 6)
  2177 + if (month < 12)
2178 2178 {
2179   - //喂养方式
2180   - data.put("wyfs",babyConfigModel.getContentOne());
  2179 + if (month < 6)
  2180 + {
  2181 + //喂养方式
  2182 + data.put("wyfs",babyConfigModel.getContentOne());
  2183 + }
  2184 + else if (month < 12)
  2185 + {
  2186 + //指导意见
  2187 + data.put("zdyj",babyConfigModel.getContentOne());
  2188 + //辅食添加
  2189 + data.put("fstj",babyConfigModel.getContentTwo());
  2190 + //辅食制作
  2191 + data.put("fszz",babyConfigModel.getContentThree());
  2192 + }
2181 2193 //营养需求
2182 2194 data.put("yyxq",babyConfigModel.getContentFour());
2183   - }
2184   - else if (month < 12)
2185   - {
2186   - //指导意见
2187   - data.put("zdyj",babyConfigModel.getContentOne());
2188   - //辅食添加
2189   - data.put("fstj",babyConfigModel.getContentTwo());
2190   - //辅食制作
2191   - data.put("fszz",babyConfigModel.getContentThree());
2192   -
2193   - if (StringUtils.isNotEmpty(checkModel.getWeight()))
  2195 + if (StringUtils.isNotEmpty(checkModel.getWeight()) && month > 5 )
2194 2196 {
2195   - Double kaul = Double.parseDouble(checkModel.getWeight()) * 100;
  2197 + Double kaul = null;
  2198 + //规则:6月龄:体重*120kcal/kg 7-11月龄:体重*100kcal/kg
  2199 + kaul = month == 6 ? Double.parseDouble(checkModel.getWeight()) * 120 : Double.parseDouble(checkModel.getWeight()) * 100;
  2200 + kaul = getKaul(kaul);
  2201 +
  2202 + if (kaul < 800)
  2203 + {
  2204 + kaul = 800D;
  2205 + }
  2206 + else if (kaul > 2000)
  2207 + {
  2208 + kaul = 2000D;
  2209 + }
  2210 +
2196 2211 BabyConfigModel babyConfigModel1 = mongoTemplate.findOne(Query.query(Criteria.where("kcal").is(kaul).and("monthAge").is(month).and("type").is(1)), BabyConfigModel.class);
2197 2212 //6-11月热量
2198 2213 data.put("rl",babyConfigModel1.getContentOne());
2199 2214 }
2200   - //营养需求
2201   - data.put("yyxq",babyConfigModel.getContentFour());
2202 2215 }
2203 2216 else if (month < 37)
2204 2217 {
... ... @@ -2311,7 +2324,7 @@
2311 2324  
2312 2325 BabyConfigModel wyconfig = mongoTemplate.findOne(Query.query(Criteria.where("monthAge").is(month).and("status").is(kaupEvaluate).and("type").is(4)), BabyConfigModel.class);
2313 2326 //喂养指南
2314   - data.put("yszl",wyconfig.getContentOne());
  2327 + data.put("wyzl",wyconfig.getContentOne());
2315 2328  
2316 2329 //每日所需营养素
2317 2330 data.put("yys",getYys(month));