Commit 926b18d9b34525f600fd83b3b4d0fcc2661386bf

Authored by liquanyu
1 parent ad8487fa18

体重管理

Showing 4 changed files with 4 additions and 223 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/BasicConfigServiceTest.java View file @ 926b18d
... ... @@ -1012,9 +1012,9 @@
1012 1012  
1013 1013  
1014 1014 public static void main(String[] args) {
1015   - weightWeek("F:\\体重与营养管理\\体重与营养管理第三版(北方).xls");
1016   - weightMange("F:\\体重与营养管理\\体重与营养管理第三版(北方).xls");
1017   - weightFood("F:\\体重与营养管理\\体重与营养管理第三版(北方).xls");
  1015 + weightWeek("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls");
  1016 + weightMange("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls");
  1017 + weightFood("F:\\体重与营养管理\\体重与营养管理第三版(北方)改标红“、冰淇淋”-晓萌.xls");
1018 1018 }
1019 1019  
1020 1020 public static void addBaby(ApplicationContext applicationContext) {
platform-dal/src/main/java/com/lyms/platform/pojo/WeightConfigModel.java View file @ 926b18d
... ... @@ -8,7 +8,7 @@
8 8 /**
9 9 * Created by Administrator on 2018-06-04.
10 10 */
11   -@Document(collection = "lyms_weight_config_test")
  11 +@Document(collection = "lyms_weight_config")
12 12 public class WeightConfigModel {
13 13 private String id;
14 14 private String week;//孕周
platform-dal/src/main/java/com/lyms/platform/pojo/WeightManageConfigModel.java View file @ 926b18d
1   -package com.lyms.platform.pojo;
2   -
3   -import com.lyms.platform.beans.SerialIdEnum;
4   -import com.lyms.platform.common.result.BaseModel;
5   -import org.springframework.data.mongodb.core.mapping.Document;
6   -
7   -import java.io.Serializable;
8   -import java.util.Date;
9   -import java.util.LinkedHashMap;
10   -import java.util.List;
11   -import java.util.Map;
12   -
13   -/**
14   - * 体重营养管理基础配置数据模型
15   - *
16   - */
17   -@Document(collection = "lyms_weight_config")
18   -public class WeightManageConfigModel extends BaseModel {
19   -
20   - private static final long serialVersionUID = SerialIdEnum.WeightManageConfigModel.getCid();
21   - private String id;
22   - private String week;//孕周
23   - private String example;//营养食谱举例
24   - private String breakfast;//早餐
25   - private String breakfastAdd;//上午加餐
26   - private String lunch;//午餐
27   - private String lunchAdd;//下午加餐
28   - private String dinner;//晚餐
29   - private String dinnerAdd;//晚加餐
30   -
31   - //食谱
32   - private List<Cookbook> cookbooks;
33   -
34   - private String weightType;//体重类型
35   - private List<String> suggests;//建议
36   -
37   - public String getId() {
38   - return id;
39   - }
40   -
41   - public void setId(String id) {
42   - this.id = id;
43   - }
44   -
45   - public String getWeek() {
46   - return week;
47   - }
48   -
49   - public void setWeek(String week) {
50   - this.week = week;
51   - }
52   -
53   - public String getExample() {
54   - return example;
55   - }
56   -
57   - public void setExample(String example) {
58   - this.example = example;
59   - }
60   -
61   - public String getBreakfast() {
62   - return breakfast;
63   - }
64   -
65   - public void setBreakfast(String breakfast) {
66   - this.breakfast = breakfast;
67   - }
68   -
69   - public String getBreakfastAdd() {
70   - return breakfastAdd;
71   - }
72   -
73   - public void setBreakfastAdd(String breakfastAdd) {
74   - this.breakfastAdd = breakfastAdd;
75   - }
76   -
77   - public String getLunch() {
78   - return lunch;
79   - }
80   -
81   - public void setLunch(String lunch) {
82   - this.lunch = lunch;
83   - }
84   -
85   - public List<Cookbook> getCookbooks() {
86   - return cookbooks;
87   - }
88   -
89   - public void setCookbooks(List<Cookbook> cookbooks) {
90   - this.cookbooks = cookbooks;
91   - }
92   -
93   - public String getLunchAdd() {
94   - return lunchAdd;
95   - }
96   -
97   - public void setLunchAdd(String lunchAdd) {
98   - this.lunchAdd = lunchAdd;
99   - }
100   -
101   - public String getDinner() {
102   - return dinner;
103   - }
104   -
105   - public void setDinner(String dinner) {
106   - this.dinner = dinner;
107   - }
108   -
109   - public String getDinnerAdd() {
110   - return dinnerAdd;
111   - }
112   -
113   - public void setDinnerAdd(String dinnerAdd) {
114   - this.dinnerAdd = dinnerAdd;
115   - }
116   -
117   -
118   - public String getWeightType() {
119   - return weightType;
120   - }
121   -
122   - public void setWeightType(String weightType) {
123   - this.weightType = weightType;
124   - }
125   -
126   - public List<String> getSuggests() {
127   - return suggests;
128   - }
129   -
130   - public void setSuggests(List<String> suggests) {
131   - this.suggests = suggests;
132   - }
133   -
134   -
135   -
136   - @Override
137   - public String toString() {
138   - return "WeightManageConfigModel{" +
139   - "id='" + id + '\'' +
140   - ", week='" + week + '\'' +
141   - ", example='" + example + '\'' +
142   - ", breakfast='" + breakfast + '\'' +
143   - ", breakfastAdd='" + breakfastAdd + '\'' +
144   - ", lunch='" + lunch + '\'' +
145   - ", lunchAdd='" + lunchAdd + '\'' +
146   - ", dinner='" + dinner + '\'' +
147   - ", dinnerAdd='" + dinnerAdd + '\'' +
148   - ", weightType='" + weightType + '\'' +
149   - ", suggests='" + suggests + '\'' +
150   - '}';
151   - }
152   -
153   - public static class Cookbook implements Serializable {
154   - private static final long serialVersionUID = SerialIdEnum.Cookbook.getCid();
155   - private String vegetable;//菜名称
156   - private String foodMaterial; //食材
157   - private List<String> makeMethod;//制作方法
158   - private String weightType;//体重类型
159   - private String week;
160   -
161   - public String getWeightType() {
162   - return weightType;
163   - }
164   -
165   - public void setWeightType(String weightType) {
166   - this.weightType = weightType;
167   - }
168   -
169   - public String getWeek() {
170   - return week;
171   - }
172   -
173   - public void setWeek(String week) {
174   - this.week = week;
175   - }
176   -
177   - public String getVegetable() {
178   - return vegetable;
179   - }
180   -
181   - public void setVegetable(String vegetable) {
182   - this.vegetable = vegetable;
183   - }
184   -
185   - public String getFoodMaterial() {
186   - return foodMaterial;
187   - }
188   -
189   - public void setFoodMaterial(String foodMaterial) {
190   - this.foodMaterial = foodMaterial;
191   - }
192   -
193   - public List<String> getMakeMethod() {
194   - return makeMethod;
195   - }
196   -
197   - public void setMakeMethod(List<String> makeMethod) {
198   - this.makeMethod = makeMethod;
199   - }
200   - }
201   -}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/PatientWeightServiceImpl.java View file @ 926b18d
... ... @@ -13,7 +13,6 @@
13 13 import com.lyms.platform.common.result.ResponseCode;
14 14 import com.lyms.platform.common.utils.*;
15 15 import com.lyms.platform.operate.web.facade.AutoMatchFacade;
16   -import com.lyms.platform.operate.web.facade.BasicConfigFacade;
17 16 import com.lyms.platform.operate.web.facade.OperateLogFacade;
18 17 import com.lyms.platform.operate.web.facade.OrganizationGroupsFacade;
19 18 import com.lyms.platform.operate.web.service.PatientWeightService;
... ... @@ -23,7 +22,6 @@
23 22 import com.lyms.platform.permission.dao.master.CouponMapper;
24 23 import com.lyms.platform.permission.model.Organization;
25 24 import com.lyms.platform.permission.service.OrganizationService;
26   -import com.lyms.platform.permission.service.impl.OrganizationServiceImpl;
27 25 import com.lyms.platform.pojo.*;
28 26 import net.sf.json.JSONArray;
29 27 import net.sf.json.JSONObject;
... ... @@ -1276,20 +1274,6 @@
1276 1274 Double b = Double.parseDouble(before);
1277 1275 Double n = Double.parseDouble(now);
1278 1276 return MathUtil.doubleFormat2(n - b);
1279   - }
1280   -
1281   -
1282   - /**
1283   - * 获取体重配置
1284   - * @param week 孕周
1285   - * @param weightType
1286   - * @return
1287   - */
1288   - private WeightManageConfigModel getWeightConfig(String week,String weightType)
1289   - {
1290   - WeightManageConfigModel weightManageConfigModel = mongoTemplate.findOne(Query.query(Criteria.where("week").is(week).and("weightType").is(weightType)),
1291   - WeightManageConfigModel.class);
1292   - return weightManageConfigModel;
1293 1277 }
1294 1278  
1295 1279