Commit 2cea69175a84780810c53844425907c4bcb750e3
1 parent
9076902e41
Exists in
master
and in
1 other branch
儿童营养报告
Showing 2 changed files with 14 additions and 29 deletions
platform-common/src/main/java/com/lyms/platform/common/Test.java
View file @
2cea691
... | ... | @@ -7,34 +7,16 @@ |
7 | 7 | |
8 | 8 | public class Test { |
9 | 9 | public static void main(String[] args) { |
10 | - String s ="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tem=\"http://tempuri.org/\">\n" + | |
11 | - " <soapenv:Header/>\n" + | |
12 | - " <soapenv:Body>\n" + | |
13 | - " <tem:EditChildMesage>\n" + | |
14 | - " <!--Optional:-->\n" + | |
15 | - " <tem:H_ID>1</tem:H_ID>\n" + | |
16 | - " <!--Optional:-->\n" + | |
17 | - " <tem:Child_ID>1</tem:Child_ID>\n" + | |
18 | - " <!--Optional:-->\n" + | |
19 | - " <tem:Child_Name>测试</tem:Child_Name>\n" + | |
20 | - " <!--Optional:-->\n" + | |
21 | - " <tem:Oper_Name>测试1</tem:Oper_Name>\n" + | |
22 | - " </tem:EditChildMesage>\n" + | |
23 | - " </soapenv:Body>\n" + | |
24 | - "</soapenv:Envelope>"; | |
25 | - System.out.print(s); | |
26 | - HttpClient httpClient=new HttpClient(); | |
27 | - PostMethod post = new MessageUtil.UTF8PostMethod("http://119.90.43.70:8090/WCFAPPService.svc"); | |
28 | - post.setRequestEntity(new ByteArrayRequestEntity(s.getBytes())); | |
29 | - post.setRequestHeader("Content-Type", "text/xml;charset=utf-8"); | |
30 | - post.setRequestHeader("SOAPAction","http://tempuri.org/IAppWCFService/EditChildMesage"); | |
31 | - try { | |
32 | - httpClient.executeMethod(post); | |
33 | - String result = new String(post.getResponseBodyAsString()); | |
34 | - System.out.print("register result : " + result); | |
35 | - }catch (Exception e){ | |
36 | - | |
37 | - } | |
10 | + Double kcal = 1080D; | |
11 | + int k = (int) (kcal / 100) * 100; | |
12 | + System.out.print((double)k); | |
13 | +// Double d = Math.floor(k); | |
14 | +// Double md = d + 50; | |
15 | +// if (md > kcal) { | |
16 | +// System.out.print(d); | |
17 | +// } else { | |
18 | +// System.out.print(md); | |
19 | +// } | |
38 | 20 | } |
39 | 21 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java
View file @
2cea691
... | ... | @@ -2366,7 +2366,10 @@ |
2366 | 2366 | Double kaul = null; |
2367 | 2367 | //规则:6月龄:体重*120kcal/kg 7-11月龄:体重*100kcal/kg |
2368 | 2368 | kaul = month == 6 ? Double.parseDouble(checkModel.getWeight()) * 120 : Double.parseDouble(checkModel.getWeight()) * 100; |
2369 | - kaul = getKaul(kaul); | |
2369 | + //kaul = getKaul(kaul); | |
2370 | + | |
2371 | + int k = (int) (kaul / 100) * 100; | |
2372 | + kaul = (double)k; | |
2370 | 2373 | |
2371 | 2374 | if (kaul < 800) { |
2372 | 2375 | kaul = 800D; |