改了myuser physique
This commit is contained in:
26
README.md
26
README.md
@@ -107,9 +107,9 @@
|
||||
* https://www.google.com/search?q=%E8%90%A5%E5%85%BB%E5%85%83%E7%B4%A0%E9%9C%80%E6%B1%82&oq=%E8%90%A5%E5%85%BB%E5%85%83%E7%B4%A0&aqs=chrome.1.69i57j69i59j0l4.5781j0j1&sourceid=chrome&ie=UTF-8
|
||||
* 职业\病\九体\体质(BMI) 结合起来的**物质需求标准** (要求有 **卡路里** 六芒星),以周为单位计算需求量
|
||||
* 特殊职业(比如运动员)对身体素质(BMI)标准
|
||||
* 每种职业
|
||||
* 早 中晚餐分类:
|
||||
* 早: 饼 粥 羹 面 奶
|
||||
* **加入季节方案(比如夏天就推荐防暑的,冬天推荐暖身的)**
|
||||
* 蒋:
|
||||
* 补充菜谱: url补充缺失值,卡路里,热量,脂肪,蛋白质等
|
||||
* 爬卡路里时,原来的菜名是一列,新爬到的是一列,后面几列就是卡路里,脂肪等,注意数据规整
|
||||
@@ -121,21 +121,27 @@
|
||||
|
||||
王:定制( 需要赵给我比如:蛋白质在100-200范围内的菜谱)
|
||||
|
||||
**技术难点**
|
||||
赵:
|
||||
|
||||
1、服务器
|
||||
|
||||
2、app UI
|
||||
|
||||
3、可视化(计步器、可视化)
|
||||
|
||||
4、推荐
|
||||
* 体质表: 添加几列对某种物质的需求
|
||||
* 职业表: 添加几列对某种物质的需求,添加一列BMI的需求
|
||||
* user表: 添加综合对物质的需求
|
||||
* 菜单表:
|
||||
* 添加一列早/午晚餐,早为1,else为0. 根据 饼 粥 羹 面 奶 判断
|
||||
* 补充一下缺失的url,卡路里
|
||||
* 添加几列各种物质的需求
|
||||
* 有一部分数据是爬下的csv里面直接读取,一部分缺失的用food_material的组合来计算
|
||||
|
||||
|
||||
|
||||
#### 又想到的补充内容
|
||||
|
||||
- 根据口味推荐,或者口味混合搭配推荐
|
||||
- 注意冬天不推荐夏天的菜谱
|
||||
|
||||
### 数据库设计
|
||||
|
||||

|
||||

|
||||
|
||||
**加下划线为主码,加粗为外码,默认not null**
|
||||
|
||||
|
||||
@@ -1,48 +1,392 @@
|
||||
package com.example.ninefourone.nutritionmaster.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class FoodMaterial {
|
||||
|
||||
/**
|
||||
* menu : 西红柿鸡蛋汤
|
||||
* quantity : 适量
|
||||
* material : 西红柿
|
||||
* material_name : 西红柿
|
||||
* cook_quantity : [{"menu":"西红柿鸡蛋汤","quantity":"适量","material":"西红柿"},{"menu":"瘦身版红菜汤","quantity":"4-5片","material":"西红柿"},{"menu":"西红柿炖豆腐","quantity":"三个","material":"西红柿"},{"menu":"傣味凉拌黄瓜","quantity":"一个","material":"西红柿"},{"menu":"健康早餐竹炭三明治","quantity":"适量","material":"西红柿"},{"menu":"豆腐卤","quantity":"一粒","material":"西红柿"},{"menu":"减肥美食蕃薯芦笋鱼柳","quantity":"适量","material":"西红柿"},{"menu":"瘦身美食凤尾香梨番茄盅","quantity":"适量","material":"西红柿"},{"menu":"低脂美味快手的番茄烤大比目鱼","quantity":"900g","material":"西红柿"},{"menu":"田园蔬菜养生汤","quantity":"适量","material":"西红柿"},{"menu":"抗衰老的番茄鲜藕橙杯","quantity":"适量","material":"西红柿"},{"menu":"抗衰老美食菠菜三文鱼芥末堆","quantity":"适量","material":"西红柿"},{"menu":"凉拌莜面","quantity":"3g","material":"西红柿"},{"menu":"夏季护发防晒美食-苏子烤鸡腿配玉米奶酪西红柿","quantity":"适量","material":"西红柿"},{"menu":"美白防晒的番茄双笋银杏果","quantity":"适量","material":"西红柿"},{"menu":"家庭自制大西北风味羊肉粉汤","quantity":"两勺","material":"西红柿"}]
|
||||
* elements : {"id":1162,"calorie":20,"carbohydrate":3.5,"fat":0.2,"protein":0.9,"cellulose":0.5,"vitaminA":92,"vitaminB1":0,"vitaminB2":0.03,"vitaminB6":0,"vitaminC":19,"vitaminE":0.57,"carotene":550,"cholesterol":0,"Mg":9,"Ca":10,"Fe":0.4,"Zn":0.13,"Cu":0.06,"Mn":0.08,"K":163,"P":23,"Na":5,"Se":0.15,"niacin":0.6,"thiamine":0.03}
|
||||
*/
|
||||
|
||||
private String menu;
|
||||
private String quantity;
|
||||
private String material;
|
||||
private String material_name;
|
||||
private ElementsBean elements;
|
||||
private List<CookQuantityBean> cook_quantity;
|
||||
|
||||
public String getMenu() {
|
||||
return menu;
|
||||
public String getMaterial_name() {
|
||||
return material_name;
|
||||
}
|
||||
|
||||
public void setMenu(String menu) {
|
||||
this.menu = menu;
|
||||
public void setMaterial_name(String material_name) {
|
||||
this.material_name = material_name;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
public ElementsBean getElements() {
|
||||
return elements;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
public void setElements(ElementsBean elements) {
|
||||
this.elements = elements;
|
||||
}
|
||||
|
||||
public String getMaterial() {
|
||||
return material;
|
||||
public List<CookQuantityBean> getCook_quantity() {
|
||||
return cook_quantity;
|
||||
}
|
||||
|
||||
public void setCook_quantity(List<CookQuantityBean> cook_quantity) {
|
||||
this.cook_quantity = cook_quantity;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FoodMaterial{" +
|
||||
"menu='" + menu + '\'' +
|
||||
", quantity='" + quantity + '\'' +
|
||||
", material='" + material + '\'' +
|
||||
"material_name='" + material_name + '\'' +
|
||||
", elements=" + elements +
|
||||
", cook_quantity=" + cook_quantity +
|
||||
'}';
|
||||
}
|
||||
|
||||
public void setMaterial(String material) {
|
||||
public static class ElementsBean {
|
||||
/**
|
||||
* id : 1162
|
||||
* calorie : 20
|
||||
* carbohydrate : 3.5
|
||||
* fat : 0.2
|
||||
* protein : 0.9
|
||||
* cellulose : 0.5
|
||||
* vitaminA : 92
|
||||
* vitaminB1 : 0
|
||||
* vitaminB2 : 0.03
|
||||
* vitaminB6 : 0
|
||||
* vitaminC : 19
|
||||
* vitaminE : 0.57
|
||||
* carotene : 550
|
||||
* cholesterol : 0
|
||||
* Mg : 9
|
||||
* Ca : 10
|
||||
* Fe : 0.4
|
||||
* Zn : 0.13
|
||||
* Cu : 0.06
|
||||
* Mn : 0.08
|
||||
* K : 163
|
||||
* P : 23
|
||||
* Na : 5
|
||||
* Se : 0.15
|
||||
* niacin : 0.6
|
||||
* thiamine : 0.03
|
||||
*/
|
||||
|
||||
private float id;
|
||||
private float calorie;
|
||||
private double carbohydrate;
|
||||
private double fat;
|
||||
private double protein;
|
||||
private double cellulose;
|
||||
private float vitaminA;
|
||||
private float vitaminB1;
|
||||
private double vitaminB2;
|
||||
private float vitaminB6;
|
||||
private float vitaminC;
|
||||
private double vitaminE;
|
||||
private float carotene;
|
||||
private float cholesterol;
|
||||
private float Mg;
|
||||
private float Ca;
|
||||
private double Fe;
|
||||
private double Zn;
|
||||
private double Cu;
|
||||
private double Mn;
|
||||
private float K;
|
||||
private float P;
|
||||
private float Na;
|
||||
private double Se;
|
||||
private double niacin;
|
||||
private double thiamine;
|
||||
|
||||
this.material = material;
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ElementsBean{" +
|
||||
"id=" + id +
|
||||
", calorie=" + calorie +
|
||||
", carbohydrate=" + carbohydrate +
|
||||
", fat=" + fat +
|
||||
", protein=" + protein +
|
||||
", cellulose=" + cellulose +
|
||||
", vitaminA=" + vitaminA +
|
||||
", vitaminB1=" + vitaminB1 +
|
||||
", vitaminB2=" + vitaminB2 +
|
||||
", vitaminB6=" + vitaminB6 +
|
||||
", vitaminC=" + vitaminC +
|
||||
", vitaminE=" + vitaminE +
|
||||
", carotene=" + carotene +
|
||||
", cholesterol=" + cholesterol +
|
||||
", Mg=" + Mg +
|
||||
", Ca=" + Ca +
|
||||
", Fe=" + Fe +
|
||||
", Zn=" + Zn +
|
||||
", Cu=" + Cu +
|
||||
", Mn=" + Mn +
|
||||
", K=" + K +
|
||||
", P=" + P +
|
||||
", Na=" + Na +
|
||||
", Se=" + Se +
|
||||
", niacin=" + niacin +
|
||||
", thiamine=" + thiamine +
|
||||
'}';
|
||||
}
|
||||
|
||||
public float getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(float id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public float getCalorie() {
|
||||
return calorie;
|
||||
}
|
||||
|
||||
public void setCalorie(float calorie) {
|
||||
this.calorie = calorie;
|
||||
}
|
||||
|
||||
public double getCarbohydrate() {
|
||||
return carbohydrate;
|
||||
}
|
||||
|
||||
public void setCarbohydrate(double carbohydrate) {
|
||||
this.carbohydrate = carbohydrate;
|
||||
}
|
||||
|
||||
public double getFat() {
|
||||
return fat;
|
||||
}
|
||||
|
||||
public void setFat(double fat) {
|
||||
this.fat = fat;
|
||||
}
|
||||
|
||||
public double getProtein() {
|
||||
return protein;
|
||||
}
|
||||
|
||||
public void setProtein(double protein) {
|
||||
this.protein = protein;
|
||||
}
|
||||
|
||||
public double getCellulose() {
|
||||
return cellulose;
|
||||
}
|
||||
|
||||
public void setCellulose(double cellulose) {
|
||||
this.cellulose = cellulose;
|
||||
}
|
||||
|
||||
public float getVitaminA() {
|
||||
return vitaminA;
|
||||
}
|
||||
|
||||
public void setVitaminA(float vitaminA) {
|
||||
this.vitaminA = vitaminA;
|
||||
}
|
||||
|
||||
public float getVitaminB1() {
|
||||
return vitaminB1;
|
||||
}
|
||||
|
||||
public void setVitaminB1(float vitaminB1) {
|
||||
this.vitaminB1 = vitaminB1;
|
||||
}
|
||||
|
||||
public double getVitaminB2() {
|
||||
return vitaminB2;
|
||||
}
|
||||
|
||||
public void setVitaminB2(double vitaminB2) {
|
||||
this.vitaminB2 = vitaminB2;
|
||||
}
|
||||
|
||||
public float getVitaminB6() {
|
||||
return vitaminB6;
|
||||
}
|
||||
|
||||
public void setVitaminB6(float vitaminB6) {
|
||||
this.vitaminB6 = vitaminB6;
|
||||
}
|
||||
|
||||
public float getVitaminC() {
|
||||
return vitaminC;
|
||||
}
|
||||
|
||||
public void setVitaminC(float vitaminC) {
|
||||
this.vitaminC = vitaminC;
|
||||
}
|
||||
|
||||
public double getVitaminE() {
|
||||
return vitaminE;
|
||||
}
|
||||
|
||||
public void setVitaminE(double vitaminE) {
|
||||
this.vitaminE = vitaminE;
|
||||
}
|
||||
|
||||
public float getCarotene() {
|
||||
return carotene;
|
||||
}
|
||||
|
||||
public void setCarotene(float carotene) {
|
||||
this.carotene = carotene;
|
||||
}
|
||||
|
||||
public float getCholesterol() {
|
||||
return cholesterol;
|
||||
}
|
||||
|
||||
public void setCholesterol(float cholesterol) {
|
||||
this.cholesterol = cholesterol;
|
||||
}
|
||||
|
||||
public float getMg() {
|
||||
return Mg;
|
||||
}
|
||||
|
||||
public void setMg(float Mg) {
|
||||
this.Mg = Mg;
|
||||
}
|
||||
|
||||
public float getCa() {
|
||||
return Ca;
|
||||
}
|
||||
|
||||
public void setCa(float Ca) {
|
||||
this.Ca = Ca;
|
||||
}
|
||||
|
||||
public double getFe() {
|
||||
return Fe;
|
||||
}
|
||||
|
||||
public void setFe(double Fe) {
|
||||
this.Fe = Fe;
|
||||
}
|
||||
|
||||
public double getZn() {
|
||||
return Zn;
|
||||
}
|
||||
|
||||
public void setZn(double Zn) {
|
||||
this.Zn = Zn;
|
||||
}
|
||||
|
||||
public double getCu() {
|
||||
return Cu;
|
||||
}
|
||||
|
||||
public void setCu(double Cu) {
|
||||
this.Cu = Cu;
|
||||
}
|
||||
|
||||
public double getMn() {
|
||||
return Mn;
|
||||
}
|
||||
|
||||
public void setMn(double Mn) {
|
||||
this.Mn = Mn;
|
||||
}
|
||||
|
||||
public float getK() {
|
||||
return K;
|
||||
}
|
||||
|
||||
public void setK(float K) {
|
||||
this.K = K;
|
||||
}
|
||||
|
||||
public float getP() {
|
||||
return P;
|
||||
}
|
||||
|
||||
public void setP(float P) {
|
||||
this.P = P;
|
||||
}
|
||||
|
||||
public float getNa() {
|
||||
return Na;
|
||||
}
|
||||
|
||||
public void setNa(float Na) {
|
||||
this.Na = Na;
|
||||
}
|
||||
|
||||
public double getSe() {
|
||||
return Se;
|
||||
}
|
||||
|
||||
public void setSe(double Se) {
|
||||
this.Se = Se;
|
||||
}
|
||||
|
||||
public double getNiacin() {
|
||||
return niacin;
|
||||
}
|
||||
|
||||
public void setNiacin(double niacin) {
|
||||
this.niacin = niacin;
|
||||
}
|
||||
|
||||
public double getThiamine() {
|
||||
return thiamine;
|
||||
}
|
||||
|
||||
public void setThiamine(double thiamine) {
|
||||
this.thiamine = thiamine;
|
||||
}
|
||||
}
|
||||
|
||||
public static class CookQuantityBean {
|
||||
/**
|
||||
* menu : 西红柿鸡蛋汤
|
||||
* quantity : 适量
|
||||
* material : 西红柿
|
||||
*/
|
||||
|
||||
private String menu;
|
||||
private String quantity;
|
||||
private String material;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CookQuantityBean{" +
|
||||
"menu='" + menu + '\'' +
|
||||
", quantity='" + quantity + '\'' +
|
||||
", material='" + material + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
public String getMenu() {
|
||||
return menu;
|
||||
}
|
||||
|
||||
public void setMenu(String menu) {
|
||||
this.menu = menu;
|
||||
}
|
||||
|
||||
public String getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(String quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getMaterial() {
|
||||
return material;
|
||||
}
|
||||
|
||||
public void setMaterial(String material) {
|
||||
this.material = material;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,26 +4,44 @@ import java.util.List;
|
||||
|
||||
public class FoodMenu {
|
||||
|
||||
|
||||
/**
|
||||
* flavor : 咸鲜味
|
||||
* calorie : 234
|
||||
* name : 雪丽对虾
|
||||
* technology : 炸
|
||||
* image_url : http://s1.ig.meishij.net/p/20091012/fed63858e633540c8df73e62692520fb_150x150.jpg
|
||||
* cook_quantity : [{"menu":"雪丽对虾","quantity":"500","material":"对虾"},{"menu":"雪丽对虾","quantity":"60","material":"鸡蛋清"},{"menu":"雪丽对虾","quantity":"100","material":"生菜(团叶)"},{"menu":"雪丽对虾","quantity":"80","material":"猪油(炼制)"},{"menu":"雪丽对虾","quantity":"30","material":"淀粉(玉米)"},{"menu":"雪丽对虾","quantity":"50","material":"小麦面粉"},{"menu":"雪丽对虾","quantity":"4","material":"盐"},{"menu":"雪丽对虾","quantity":"2","material":"胡椒粉"},{"menu":"雪丽对虾","quantity":"20","material":"料酒"},{"menu":"雪丽对虾","quantity":"35","material":"椒盐"},{"menu":"雪丽对虾","quantity":"35","material":"番茄酱"}]
|
||||
* practice : ['1. 将对虾洗净,剪去须、腿,去头、去壳(留尾段壳),挑出沙肠后洗净;', '2. 从虾体内侧剞2~3刀,放在碗内,充分搅打,打至起雪白泡沫;', '3. 再加少许盐、淀粉、面粉拌匀,即成蛋清稠糊(又叫雪丽,高丽糊);', '4. 将锅架在火上,放油烧至五六成热,将腌好的虾沥去水,轻轻扑上淀粉,放在雪丽蛋清糊碗中拖过,裹满糊料后放入温油锅用中;', '5. 小火炸,炸至膨松成熟(不可炸上色)捞出;', '6. 将虾尾朝着盘的中央,排在盘中,再在盘的周围放些焯烫断生的绿色蔬菜;', '7. 食用时蘸花椒盐、番茄酱。']
|
||||
* menuclassification_set : ["家常菜谱","补阳食谱","阳痿早泄食谱","不孕不育食谱","青少年食谱"]
|
||||
* flavor : 五香味
|
||||
* calorie : 157
|
||||
* name : 五香酥鱼
|
||||
* technology : 卤
|
||||
* image_url : http://s1.st.meishij.net/r/26/70/2392526/a2392526_144672974229833.jpg
|
||||
* cook_quantity : [{"menu":"五香酥鱼","quantity":"500","material":"鲫鱼"},{"menu":"五香酥鱼","quantity":"250","material":"大葱"},{"menu":"五香酥鱼","quantity":"50","material":"姜"},{"menu":"五香酥鱼","quantity":"50","material":"大蒜(白皮)"},{"menu":"五香酥鱼","quantity":"2","material":"桂皮"},{"menu":"五香酥鱼","quantity":"2","material":"茴香粉"},{"menu":"五香酥鱼","quantity":"3","material":"料酒"},{"menu":"五香酥鱼","quantity":"75","material":"酱油"},{"menu":"五香酥鱼","quantity":"75","material":"醋"},{"menu":"五香酥鱼","quantity":"75","material":"香油"},{"menu":"五香酥鱼","quantity":"100","material":"白砂糖"}]
|
||||
* practice : ['1. 将鲫鱼刮洗干净;', '2. 大葱洗净切段;姜、蒜洗净切片备用;', '3. 将锅底里垫上一层竹垫,先将鲫鱼放在竹垫上整齐排列(头朝外、肚朝上,侧放),把各种香料均匀地铺放一层在鱼身上,再放一层鱼,再放一层调料 ,就这样直至把鱼和调料放完;', '4. 加黄酒、酱油、米醋、白糖、鲜汤、然后盖上锅盖,使其尽量密封;', '5. 用大火烧沸后,转用小火焖烧五小时;', '6. 待鱼骨酥烂时,淋上麻油,用大火收稠卤汁,然后离火冷却,待结冻后再小心取出装盘。']
|
||||
* menuclassification_set : ["京菜","健脾开胃食谱","补虚养身食谱","产后调理食谱","肾炎食谱"]
|
||||
* elements : {"id":3940,"calorie":183,"carbohydrate":17.5,"fat":9.727272727272727,"protein":4.254545454545454,"cellulose":4.2272727272727275,"vitaminA":42,"vitaminB1":0,"vitaminB2":0.05454545454545456,"vitaminB6":0,"vitaminC":4.909090909090909,"vitaminE":0.9899999999999999,"carotene":242.72727272727272,"cholesterol":11.818181818181818,"Mg":31.181818181818183,"Ca":47.18181818181818,"Fe":1.9454545454545455,"Zn":0.6363636363636362,"Cu":0.12090909090909091,"Mn":1.7381818181818183,"K":185.45454545454547,"P":64.0909090909091,"Na":571.5363636363636,"Se":2.183636363636364,"niacin":0.7545454545454544,"thiamine":0.025454545454545455}
|
||||
*/
|
||||
|
||||
private String flavor;
|
||||
private int calorie;
|
||||
private float calorie;
|
||||
private String name;
|
||||
private String technology;
|
||||
private String image_url;
|
||||
private String practice;
|
||||
private ElementsBean elements;
|
||||
private List<CookQuantityBean> cook_quantity;
|
||||
private List<String> menuclassification_set;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FoodMenu{" +
|
||||
"flavor='" + flavor + '\'' +
|
||||
", calorie=" + calorie +
|
||||
", name='" + name + '\'' +
|
||||
", technology='" + technology + '\'' +
|
||||
", image_url='" + image_url + '\'' +
|
||||
", practice='" + practice + '\'' +
|
||||
", elements=" + elements +
|
||||
", cook_quantity=" + cook_quantity +
|
||||
", menuclassification_set=" + menuclassification_set +
|
||||
'}';
|
||||
}
|
||||
|
||||
public String getFlavor() {
|
||||
return flavor;
|
||||
}
|
||||
@@ -32,11 +50,11 @@ public class FoodMenu {
|
||||
this.flavor = flavor;
|
||||
}
|
||||
|
||||
public int getCalorie() {
|
||||
public float getCalorie() {
|
||||
return calorie;
|
||||
}
|
||||
|
||||
public void setCalorie(int calorie) {
|
||||
public void setCalorie(float calorie) {
|
||||
this.calorie = calorie;
|
||||
}
|
||||
|
||||
@@ -72,6 +90,14 @@ public class FoodMenu {
|
||||
this.practice = practice;
|
||||
}
|
||||
|
||||
public ElementsBean getElements() {
|
||||
return elements;
|
||||
}
|
||||
|
||||
public void setElements(ElementsBean elements) {
|
||||
this.elements = elements;
|
||||
}
|
||||
|
||||
public List<CookQuantityBean> getCook_quantity() {
|
||||
return cook_quantity;
|
||||
}
|
||||
@@ -88,17 +114,324 @@ public class FoodMenu {
|
||||
this.menuclassification_set = menuclassification_set;
|
||||
}
|
||||
|
||||
public static class ElementsBean {
|
||||
/**
|
||||
* id : 3940
|
||||
* calorie : 183
|
||||
* carbohydrate : 17.5
|
||||
* fat : 9.727272727272727
|
||||
* protein : 4.254545454545454
|
||||
* cellulose : 4.2272727272727275
|
||||
* vitaminA : 42
|
||||
* vitaminB1 : 0
|
||||
* vitaminB2 : 0.05454545454545456
|
||||
* vitaminB6 : 0
|
||||
* vitaminC : 4.909090909090909
|
||||
* vitaminE : 0.9899999999999999
|
||||
* carotene : 242.72727272727272
|
||||
* cholesterol : 11.818181818181818
|
||||
* Mg : 31.181818181818183
|
||||
* Ca : 47.18181818181818
|
||||
* Fe : 1.9454545454545455
|
||||
* Zn : 0.6363636363636362
|
||||
* Cu : 0.12090909090909091
|
||||
* Mn : 1.7381818181818183
|
||||
* K : 185.45454545454547
|
||||
* P : 64.0909090909091
|
||||
* Na : 571.5363636363636
|
||||
* Se : 2.183636363636364
|
||||
* niacin : 0.7545454545454544
|
||||
* thiamine : 0.025454545454545455
|
||||
*/
|
||||
|
||||
private float id;
|
||||
private float calorie;
|
||||
private double carbohydrate;
|
||||
private double fat;
|
||||
private double protein;
|
||||
private double cellulose;
|
||||
private float vitaminA;
|
||||
private float vitaminB1;
|
||||
private double vitaminB2;
|
||||
private float vitaminB6;
|
||||
private double vitaminC;
|
||||
private double vitaminE;
|
||||
private double carotene;
|
||||
private double cholesterol;
|
||||
private double Mg;
|
||||
private double Ca;
|
||||
private double Fe;
|
||||
private double Zn;
|
||||
private double Cu;
|
||||
private double Mn;
|
||||
private double K;
|
||||
private double P;
|
||||
private double Na;
|
||||
private double Se;
|
||||
private double niacin;
|
||||
private double thiamine;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ElementsBean{" +
|
||||
"id=" + id +
|
||||
", calorie=" + calorie +
|
||||
", carbohydrate=" + carbohydrate +
|
||||
", fat=" + fat +
|
||||
", protein=" + protein +
|
||||
", cellulose=" + cellulose +
|
||||
", vitaminA=" + vitaminA +
|
||||
", vitaminB1=" + vitaminB1 +
|
||||
", vitaminB2=" + vitaminB2 +
|
||||
", vitaminB6=" + vitaminB6 +
|
||||
", vitaminC=" + vitaminC +
|
||||
", vitaminE=" + vitaminE +
|
||||
", carotene=" + carotene +
|
||||
", cholesterol=" + cholesterol +
|
||||
", Mg=" + Mg +
|
||||
", Ca=" + Ca +
|
||||
", Fe=" + Fe +
|
||||
", Zn=" + Zn +
|
||||
", Cu=" + Cu +
|
||||
", Mn=" + Mn +
|
||||
", K=" + K +
|
||||
", P=" + P +
|
||||
", Na=" + Na +
|
||||
", Se=" + Se +
|
||||
", niacin=" + niacin +
|
||||
", thiamine=" + thiamine +
|
||||
'}';
|
||||
}
|
||||
|
||||
public float getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(float id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public float getCalorie() {
|
||||
return calorie;
|
||||
}
|
||||
|
||||
public void setCalorie(float calorie) {
|
||||
this.calorie = calorie;
|
||||
}
|
||||
|
||||
public double getCarbohydrate() {
|
||||
return carbohydrate;
|
||||
}
|
||||
|
||||
public void setCarbohydrate(double carbohydrate) {
|
||||
this.carbohydrate = carbohydrate;
|
||||
}
|
||||
|
||||
public double getFat() {
|
||||
return fat;
|
||||
}
|
||||
|
||||
public void setFat(double fat) {
|
||||
this.fat = fat;
|
||||
}
|
||||
|
||||
public double getProtein() {
|
||||
return protein;
|
||||
}
|
||||
|
||||
public void setProtein(double protein) {
|
||||
this.protein = protein;
|
||||
}
|
||||
|
||||
public double getCellulose() {
|
||||
return cellulose;
|
||||
}
|
||||
|
||||
public void setCellulose(double cellulose) {
|
||||
this.cellulose = cellulose;
|
||||
}
|
||||
|
||||
public float getVitaminA() {
|
||||
return vitaminA;
|
||||
}
|
||||
|
||||
public void setVitaminA(float vitaminA) {
|
||||
this.vitaminA = vitaminA;
|
||||
}
|
||||
|
||||
public float getVitaminB1() {
|
||||
return vitaminB1;
|
||||
}
|
||||
|
||||
public void setVitaminB1(float vitaminB1) {
|
||||
this.vitaminB1 = vitaminB1;
|
||||
}
|
||||
|
||||
public double getVitaminB2() {
|
||||
return vitaminB2;
|
||||
}
|
||||
|
||||
public void setVitaminB2(double vitaminB2) {
|
||||
this.vitaminB2 = vitaminB2;
|
||||
}
|
||||
|
||||
public float getVitaminB6() {
|
||||
return vitaminB6;
|
||||
}
|
||||
|
||||
public void setVitaminB6(float vitaminB6) {
|
||||
this.vitaminB6 = vitaminB6;
|
||||
}
|
||||
|
||||
public double getVitaminC() {
|
||||
return vitaminC;
|
||||
}
|
||||
|
||||
public void setVitaminC(double vitaminC) {
|
||||
this.vitaminC = vitaminC;
|
||||
}
|
||||
|
||||
public double getVitaminE() {
|
||||
return vitaminE;
|
||||
}
|
||||
|
||||
public void setVitaminE(double vitaminE) {
|
||||
this.vitaminE = vitaminE;
|
||||
}
|
||||
|
||||
public double getCarotene() {
|
||||
return carotene;
|
||||
}
|
||||
|
||||
public void setCarotene(double carotene) {
|
||||
this.carotene = carotene;
|
||||
}
|
||||
|
||||
public double getCholesterol() {
|
||||
return cholesterol;
|
||||
}
|
||||
|
||||
public void setCholesterol(double cholesterol) {
|
||||
this.cholesterol = cholesterol;
|
||||
}
|
||||
|
||||
public double getMg() {
|
||||
return Mg;
|
||||
}
|
||||
|
||||
public void setMg(double Mg) {
|
||||
this.Mg = Mg;
|
||||
}
|
||||
|
||||
public double getCa() {
|
||||
return Ca;
|
||||
}
|
||||
|
||||
public void setCa(double Ca) {
|
||||
this.Ca = Ca;
|
||||
}
|
||||
|
||||
public double getFe() {
|
||||
return Fe;
|
||||
}
|
||||
|
||||
public void setFe(double Fe) {
|
||||
this.Fe = Fe;
|
||||
}
|
||||
|
||||
public double getZn() {
|
||||
return Zn;
|
||||
}
|
||||
|
||||
public void setZn(double Zn) {
|
||||
this.Zn = Zn;
|
||||
}
|
||||
|
||||
public double getCu() {
|
||||
return Cu;
|
||||
}
|
||||
|
||||
public void setCu(double Cu) {
|
||||
this.Cu = Cu;
|
||||
}
|
||||
|
||||
public double getMn() {
|
||||
return Mn;
|
||||
}
|
||||
|
||||
public void setMn(double Mn) {
|
||||
this.Mn = Mn;
|
||||
}
|
||||
|
||||
public double getK() {
|
||||
return K;
|
||||
}
|
||||
|
||||
public void setK(double K) {
|
||||
this.K = K;
|
||||
}
|
||||
|
||||
public double getP() {
|
||||
return P;
|
||||
}
|
||||
|
||||
public void setP(double P) {
|
||||
this.P = P;
|
||||
}
|
||||
|
||||
public double getNa() {
|
||||
return Na;
|
||||
}
|
||||
|
||||
public void setNa(double Na) {
|
||||
this.Na = Na;
|
||||
}
|
||||
|
||||
public double getSe() {
|
||||
return Se;
|
||||
}
|
||||
|
||||
public void setSe(double Se) {
|
||||
this.Se = Se;
|
||||
}
|
||||
|
||||
public double getNiacin() {
|
||||
return niacin;
|
||||
}
|
||||
|
||||
public void setNiacin(double niacin) {
|
||||
this.niacin = niacin;
|
||||
}
|
||||
|
||||
public double getThiamine() {
|
||||
return thiamine;
|
||||
}
|
||||
|
||||
public void setThiamine(double thiamine) {
|
||||
this.thiamine = thiamine;
|
||||
}
|
||||
}
|
||||
|
||||
public static class CookQuantityBean {
|
||||
/**
|
||||
* menu : 雪丽对虾
|
||||
* menu : 五香酥鱼
|
||||
* quantity : 500
|
||||
* material : 对虾
|
||||
* material : 鲫鱼
|
||||
*/
|
||||
|
||||
private String menu;
|
||||
private String quantity;
|
||||
private String material;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CookQuantityBean{" +
|
||||
"menu='" + menu + '\'' +
|
||||
", quantity='" + quantity + '\'' +
|
||||
", material='" + material + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
public String getMenu() {
|
||||
return menu;
|
||||
}
|
||||
@@ -122,28 +455,8 @@ public class FoodMenu {
|
||||
public void setMaterial(String material) {
|
||||
this.material = material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CookQuantityBean{" +
|
||||
"menu='" + menu + '\'' +
|
||||
", quantity='" + quantity + '\'' +
|
||||
", material='" + material + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FoodMenu{" +
|
||||
"flavor='" + flavor + '\'' +
|
||||
", calorie=" + calorie +
|
||||
", name='" + name + '\'' +
|
||||
", technology='" + technology + '\'' +
|
||||
", image_url='" + image_url + '\'' +
|
||||
", practice='" + practice + '\'' +
|
||||
", cook_quantity=" + cook_quantity +
|
||||
", menuclassification_set=" + menuclassification_set +
|
||||
'}';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,13 +3,16 @@ package com.example.ninefourone.nutritionmaster.bean;
|
||||
import java.util.List;
|
||||
|
||||
public class Occupation {
|
||||
|
||||
/**
|
||||
* occupation_name : 电力工程师
|
||||
* menuclassification_set : ["接触电离辐射人员食谱","防癌抗癌食谱","明目食谱","关节炎食谱","壮腰健肾食谱"]
|
||||
* elements : {"id":35,"calorie":1.11,"carbohydrate":0,"fat":0,"protein":0,"cellulose":7,"vitaminA":0,"vitaminB1":0,"vitaminB2":0,"vitaminB6":200,"vitaminC":0,"vitaminE":2,"carotene":500,"cholesterol":0,"Mg":0,"Ca":0,"Fe":0,"Zn":0,"Cu":0,"Mn":0,"K":0,"P":0,"Na":0,"Se":0,"niacin":0,"thiamine":0}
|
||||
* bmi_classification : 2
|
||||
*/
|
||||
|
||||
private String occupation_name;
|
||||
private ElementsBean elements;
|
||||
private float bmi_classification;
|
||||
private List<String> menuclassification_set;
|
||||
|
||||
public String getOccupation_name() {
|
||||
@@ -20,6 +23,22 @@ public class Occupation {
|
||||
this.occupation_name = occupation_name;
|
||||
}
|
||||
|
||||
public ElementsBean getElements() {
|
||||
return elements;
|
||||
}
|
||||
|
||||
public void setElements(ElementsBean elements) {
|
||||
this.elements = elements;
|
||||
}
|
||||
|
||||
public float getBmi_classification() {
|
||||
return bmi_classification;
|
||||
}
|
||||
|
||||
public void setBmi_classification(float bmi_classification) {
|
||||
this.bmi_classification = bmi_classification;
|
||||
}
|
||||
|
||||
public List<String> getMenuclassification_set() {
|
||||
return menuclassification_set;
|
||||
}
|
||||
@@ -28,11 +47,311 @@ public class Occupation {
|
||||
this.menuclassification_set = menuclassification_set;
|
||||
}
|
||||
|
||||
public static class ElementsBean {
|
||||
/**
|
||||
* id : 35
|
||||
* calorie : 1.11
|
||||
* carbohydrate : 0
|
||||
* fat : 0
|
||||
* protein : 0
|
||||
* cellulose : 7
|
||||
* vitaminA : 0
|
||||
* vitaminB1 : 0
|
||||
* vitaminB2 : 0
|
||||
* vitaminB6 : 200
|
||||
* vitaminC : 0
|
||||
* vitaminE : 2
|
||||
* carotene : 500
|
||||
* cholesterol : 0
|
||||
* Mg : 0
|
||||
* Ca : 0
|
||||
* Fe : 0
|
||||
* Zn : 0
|
||||
* Cu : 0
|
||||
* Mn : 0
|
||||
* K : 0
|
||||
* P : 0
|
||||
* Na : 0
|
||||
* Se : 0
|
||||
* niacin : 0
|
||||
* thiamine : 0
|
||||
*/
|
||||
|
||||
private float id;
|
||||
private double calorie;
|
||||
private float carbohydrate;
|
||||
private float fat;
|
||||
private float protein;
|
||||
private float cellulose;
|
||||
private float vitaminA;
|
||||
private float vitaminB1;
|
||||
private float vitaminB2;
|
||||
private float vitaminB6;
|
||||
private float vitaminC;
|
||||
private float vitaminE;
|
||||
private float carotene;
|
||||
private float cholesterol;
|
||||
private float Mg;
|
||||
private float Ca;
|
||||
private float Fe;
|
||||
private float Zn;
|
||||
private float Cu;
|
||||
private float Mn;
|
||||
private float K;
|
||||
private float P;
|
||||
private float Na;
|
||||
private float Se;
|
||||
private float niacin;
|
||||
private float thiamine;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ElementsBean{" +
|
||||
"id=" + id +
|
||||
", calorie=" + calorie +
|
||||
", carbohydrate=" + carbohydrate +
|
||||
", fat=" + fat +
|
||||
", protein=" + protein +
|
||||
", cellulose=" + cellulose +
|
||||
", vitaminA=" + vitaminA +
|
||||
", vitaminB1=" + vitaminB1 +
|
||||
", vitaminB2=" + vitaminB2 +
|
||||
", vitaminB6=" + vitaminB6 +
|
||||
", vitaminC=" + vitaminC +
|
||||
", vitaminE=" + vitaminE +
|
||||
", carotene=" + carotene +
|
||||
", cholesterol=" + cholesterol +
|
||||
", Mg=" + Mg +
|
||||
", Ca=" + Ca +
|
||||
", Fe=" + Fe +
|
||||
", Zn=" + Zn +
|
||||
", Cu=" + Cu +
|
||||
", Mn=" + Mn +
|
||||
", K=" + K +
|
||||
", P=" + P +
|
||||
", Na=" + Na +
|
||||
", Se=" + Se +
|
||||
", niacin=" + niacin +
|
||||
", thiamine=" + thiamine +
|
||||
'}';
|
||||
}
|
||||
|
||||
public float getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(float id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public double getCalorie() {
|
||||
return calorie;
|
||||
}
|
||||
|
||||
public void setCalorie(double calorie) {
|
||||
this.calorie = calorie;
|
||||
}
|
||||
|
||||
public float getCarbohydrate() {
|
||||
return carbohydrate;
|
||||
}
|
||||
|
||||
public void setCarbohydrate(float carbohydrate) {
|
||||
this.carbohydrate = carbohydrate;
|
||||
}
|
||||
|
||||
public float getFat() {
|
||||
return fat;
|
||||
}
|
||||
|
||||
public void setFat(float fat) {
|
||||
this.fat = fat;
|
||||
}
|
||||
|
||||
public float getProtein() {
|
||||
return protein;
|
||||
}
|
||||
|
||||
public void setProtein(float protein) {
|
||||
this.protein = protein;
|
||||
}
|
||||
|
||||
public float getCellulose() {
|
||||
return cellulose;
|
||||
}
|
||||
|
||||
public void setCellulose(float cellulose) {
|
||||
this.cellulose = cellulose;
|
||||
}
|
||||
|
||||
public float getVitaminA() {
|
||||
return vitaminA;
|
||||
}
|
||||
|
||||
public void setVitaminA(float vitaminA) {
|
||||
this.vitaminA = vitaminA;
|
||||
}
|
||||
|
||||
public float getVitaminB1() {
|
||||
return vitaminB1;
|
||||
}
|
||||
|
||||
public void setVitaminB1(float vitaminB1) {
|
||||
this.vitaminB1 = vitaminB1;
|
||||
}
|
||||
|
||||
public float getVitaminB2() {
|
||||
return vitaminB2;
|
||||
}
|
||||
|
||||
public void setVitaminB2(float vitaminB2) {
|
||||
this.vitaminB2 = vitaminB2;
|
||||
}
|
||||
|
||||
public float getVitaminB6() {
|
||||
return vitaminB6;
|
||||
}
|
||||
|
||||
public void setVitaminB6(float vitaminB6) {
|
||||
this.vitaminB6 = vitaminB6;
|
||||
}
|
||||
|
||||
public float getVitaminC() {
|
||||
return vitaminC;
|
||||
}
|
||||
|
||||
public void setVitaminC(float vitaminC) {
|
||||
this.vitaminC = vitaminC;
|
||||
}
|
||||
|
||||
public float getVitaminE() {
|
||||
return vitaminE;
|
||||
}
|
||||
|
||||
public void setVitaminE(float vitaminE) {
|
||||
this.vitaminE = vitaminE;
|
||||
}
|
||||
|
||||
public float getCarotene() {
|
||||
return carotene;
|
||||
}
|
||||
|
||||
public void setCarotene(float carotene) {
|
||||
this.carotene = carotene;
|
||||
}
|
||||
|
||||
public float getCholesterol() {
|
||||
return cholesterol;
|
||||
}
|
||||
|
||||
public void setCholesterol(float cholesterol) {
|
||||
this.cholesterol = cholesterol;
|
||||
}
|
||||
|
||||
public float getMg() {
|
||||
return Mg;
|
||||
}
|
||||
|
||||
public void setMg(float Mg) {
|
||||
this.Mg = Mg;
|
||||
}
|
||||
|
||||
public float getCa() {
|
||||
return Ca;
|
||||
}
|
||||
|
||||
public void setCa(float Ca) {
|
||||
this.Ca = Ca;
|
||||
}
|
||||
|
||||
public float getFe() {
|
||||
return Fe;
|
||||
}
|
||||
|
||||
public void setFe(float Fe) {
|
||||
this.Fe = Fe;
|
||||
}
|
||||
|
||||
public float getZn() {
|
||||
return Zn;
|
||||
}
|
||||
|
||||
public void setZn(float Zn) {
|
||||
this.Zn = Zn;
|
||||
}
|
||||
|
||||
public float getCu() {
|
||||
return Cu;
|
||||
}
|
||||
|
||||
public void setCu(float Cu) {
|
||||
this.Cu = Cu;
|
||||
}
|
||||
|
||||
public float getMn() {
|
||||
return Mn;
|
||||
}
|
||||
|
||||
public void setMn(float Mn) {
|
||||
this.Mn = Mn;
|
||||
}
|
||||
|
||||
public float getK() {
|
||||
return K;
|
||||
}
|
||||
|
||||
public void setK(float K) {
|
||||
this.K = K;
|
||||
}
|
||||
|
||||
public float getP() {
|
||||
return P;
|
||||
}
|
||||
|
||||
public void setP(float P) {
|
||||
this.P = P;
|
||||
}
|
||||
|
||||
public float getNa() {
|
||||
return Na;
|
||||
}
|
||||
|
||||
public void setNa(float Na) {
|
||||
this.Na = Na;
|
||||
}
|
||||
|
||||
public float getSe() {
|
||||
return Se;
|
||||
}
|
||||
|
||||
public void setSe(float Se) {
|
||||
this.Se = Se;
|
||||
}
|
||||
|
||||
public float getNiacin() {
|
||||
return niacin;
|
||||
}
|
||||
|
||||
public void setNiacin(float niacin) {
|
||||
this.niacin = niacin;
|
||||
}
|
||||
|
||||
public float getThiamine() {
|
||||
return thiamine;
|
||||
}
|
||||
|
||||
public void setThiamine(float thiamine) {
|
||||
this.thiamine = thiamine;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Occupation{" +
|
||||
"occupation_name='" + occupation_name + '\'' +
|
||||
", elements=" + elements +
|
||||
", bmi_classification=" + bmi_classification +
|
||||
", menuclassification_set=" + menuclassification_set +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,18 @@ package com.example.ninefourone.nutritionmaster.bean;
|
||||
import java.util.List;
|
||||
|
||||
public class Physique {
|
||||
|
||||
/**
|
||||
* physical_name : 气虚质
|
||||
* cure_material : ["人参","人参须","去芯莲子","去芯莲子(3~4人份)","土茯苓","土茯苓(4~5个人量)","山药","山药(干)","山药(或淮山)","山药,薏米,芡实1:1:1","已经去芯的莲子","干莲子","怀山药","扁豆","新鲜人参","新鲜莲子","无心莲子","毛山药","淮山药片","清补凉(淮山、枸杞、莲子、百合、玉竹、薏米、红枣)","炒扁豆","炒白术","焦白术","白扁豆","白术","白茯苓","白莲子","福建建宁莲子(想安神效果莲子可多放)","芡实","芡实米","芡实米(鲜)","花旗参","花旗参(西洋参)","茯苓","茯苓(2人份)","莲子","莲子心","铁杆山药","铁棍山药","鲜莲子 \u2026\u2026","黄芪"]
|
||||
* elements : {"id":81,"calorie":1.2,"carbohydrate":0,"fat":0,"protein":0,"cellulose":0,"vitaminA":500,"vitaminB1":0,"vitaminB2":0,"vitaminB6":1500,"vitaminC":100,"vitaminE":0,"carotene":1500,"cholesterol":0,"Mg":0,"Ca":0,"Fe":0,"Zn":0,"Cu":0,"Mn":0,"K":0,"P":500,"Na":1000,"Se":0,"niacin":0,"thiamine":0}
|
||||
*/
|
||||
|
||||
private String physical_name;
|
||||
private ElementsBean elements;
|
||||
private List<String> cure_material;
|
||||
|
||||
|
||||
public String getPhysical_name() {
|
||||
return physical_name;
|
||||
}
|
||||
@@ -19,6 +23,14 @@ public class Physique {
|
||||
this.physical_name = physical_name;
|
||||
}
|
||||
|
||||
public ElementsBean getElements() {
|
||||
return elements;
|
||||
}
|
||||
|
||||
public void setElements(ElementsBean elements) {
|
||||
this.elements = elements;
|
||||
}
|
||||
|
||||
public List<String> getCure_material() {
|
||||
return cure_material;
|
||||
}
|
||||
@@ -27,6 +39,7 @@ public class Physique {
|
||||
this.cure_material = cure_material;
|
||||
}
|
||||
|
||||
|
||||
private String imageUrl;
|
||||
private String expression;
|
||||
private String characteristic;
|
||||
@@ -81,4 +94,303 @@ public class Physique {
|
||||
", cure_material=" + cure_material +
|
||||
'}';
|
||||
}
|
||||
|
||||
public static class ElementsBean {
|
||||
/**
|
||||
* id : 81
|
||||
* calorie : 1.2
|
||||
* carbohydrate : 0
|
||||
* fat : 0
|
||||
* protein : 0
|
||||
* cellulose : 0
|
||||
* vitaminA : 500
|
||||
* vitaminB1 : 0
|
||||
* vitaminB2 : 0
|
||||
* vitaminB6 : 1500
|
||||
* vitaminC : 100
|
||||
* vitaminE : 0
|
||||
* carotene : 1500
|
||||
* cholesterol : 0
|
||||
* Mg : 0
|
||||
* Ca : 0
|
||||
* Fe : 0
|
||||
* Zn : 0
|
||||
* Cu : 0
|
||||
* Mn : 0
|
||||
* K : 0
|
||||
* P : 500
|
||||
* Na : 1000
|
||||
* Se : 0
|
||||
* niacin : 0
|
||||
* thiamine : 0
|
||||
*/
|
||||
|
||||
private float id;
|
||||
private double calorie;
|
||||
private float carbohydrate;
|
||||
private float fat;
|
||||
private float protein;
|
||||
private float cellulose;
|
||||
private float vitaminA;
|
||||
private float vitaminB1;
|
||||
private float vitaminB2;
|
||||
private float vitaminB6;
|
||||
private float vitaminC;
|
||||
private float vitaminE;
|
||||
private float carotene;
|
||||
private float cholesterol;
|
||||
private float Mg;
|
||||
private float Ca;
|
||||
private float Fe;
|
||||
private float Zn;
|
||||
private float Cu;
|
||||
private float Mn;
|
||||
private float K;
|
||||
private float P;
|
||||
private float Na;
|
||||
private float Se;
|
||||
private float niacin;
|
||||
private float thiamine;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ElementsBean{" +
|
||||
"id=" + id +
|
||||
", calorie=" + calorie +
|
||||
", carbohydrate=" + carbohydrate +
|
||||
", fat=" + fat +
|
||||
", protein=" + protein +
|
||||
", cellulose=" + cellulose +
|
||||
", vitaminA=" + vitaminA +
|
||||
", vitaminB1=" + vitaminB1 +
|
||||
", vitaminB2=" + vitaminB2 +
|
||||
", vitaminB6=" + vitaminB6 +
|
||||
", vitaminC=" + vitaminC +
|
||||
", vitaminE=" + vitaminE +
|
||||
", carotene=" + carotene +
|
||||
", cholesterol=" + cholesterol +
|
||||
", Mg=" + Mg +
|
||||
", Ca=" + Ca +
|
||||
", Fe=" + Fe +
|
||||
", Zn=" + Zn +
|
||||
", Cu=" + Cu +
|
||||
", Mn=" + Mn +
|
||||
", K=" + K +
|
||||
", P=" + P +
|
||||
", Na=" + Na +
|
||||
", Se=" + Se +
|
||||
", niacin=" + niacin +
|
||||
", thiamine=" + thiamine +
|
||||
'}';
|
||||
}
|
||||
|
||||
public float getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(float id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public double getCalorie() {
|
||||
return calorie;
|
||||
}
|
||||
|
||||
public void setCalorie(double calorie) {
|
||||
this.calorie = calorie;
|
||||
}
|
||||
|
||||
public float getCarbohydrate() {
|
||||
return carbohydrate;
|
||||
}
|
||||
|
||||
public void setCarbohydrate(float carbohydrate) {
|
||||
this.carbohydrate = carbohydrate;
|
||||
}
|
||||
|
||||
public float getFat() {
|
||||
return fat;
|
||||
}
|
||||
|
||||
public void setFat(float fat) {
|
||||
this.fat = fat;
|
||||
}
|
||||
|
||||
public float getProtein() {
|
||||
return protein;
|
||||
}
|
||||
|
||||
public void setProtein(float protein) {
|
||||
this.protein = protein;
|
||||
}
|
||||
|
||||
public float getCellulose() {
|
||||
return cellulose;
|
||||
}
|
||||
|
||||
public void setCellulose(float cellulose) {
|
||||
this.cellulose = cellulose;
|
||||
}
|
||||
|
||||
public float getVitaminA() {
|
||||
return vitaminA;
|
||||
}
|
||||
|
||||
public void setVitaminA(float vitaminA) {
|
||||
this.vitaminA = vitaminA;
|
||||
}
|
||||
|
||||
public float getVitaminB1() {
|
||||
return vitaminB1;
|
||||
}
|
||||
|
||||
public void setVitaminB1(float vitaminB1) {
|
||||
this.vitaminB1 = vitaminB1;
|
||||
}
|
||||
|
||||
public float getVitaminB2() {
|
||||
return vitaminB2;
|
||||
}
|
||||
|
||||
public void setVitaminB2(float vitaminB2) {
|
||||
this.vitaminB2 = vitaminB2;
|
||||
}
|
||||
|
||||
public float getVitaminB6() {
|
||||
return vitaminB6;
|
||||
}
|
||||
|
||||
public void setVitaminB6(float vitaminB6) {
|
||||
this.vitaminB6 = vitaminB6;
|
||||
}
|
||||
|
||||
public float getVitaminC() {
|
||||
return vitaminC;
|
||||
}
|
||||
|
||||
public void setVitaminC(float vitaminC) {
|
||||
this.vitaminC = vitaminC;
|
||||
}
|
||||
|
||||
public float getVitaminE() {
|
||||
return vitaminE;
|
||||
}
|
||||
|
||||
public void setVitaminE(float vitaminE) {
|
||||
this.vitaminE = vitaminE;
|
||||
}
|
||||
|
||||
public float getCarotene() {
|
||||
return carotene;
|
||||
}
|
||||
|
||||
public void setCarotene(float carotene) {
|
||||
this.carotene = carotene;
|
||||
}
|
||||
|
||||
public float getCholesterol() {
|
||||
return cholesterol;
|
||||
}
|
||||
|
||||
public void setCholesterol(float cholesterol) {
|
||||
this.cholesterol = cholesterol;
|
||||
}
|
||||
|
||||
public float getMg() {
|
||||
return Mg;
|
||||
}
|
||||
|
||||
public void setMg(float Mg) {
|
||||
this.Mg = Mg;
|
||||
}
|
||||
|
||||
public float getCa() {
|
||||
return Ca;
|
||||
}
|
||||
|
||||
public void setCa(float Ca) {
|
||||
this.Ca = Ca;
|
||||
}
|
||||
|
||||
public float getFe() {
|
||||
return Fe;
|
||||
}
|
||||
|
||||
public void setFe(float Fe) {
|
||||
this.Fe = Fe;
|
||||
}
|
||||
|
||||
public float getZn() {
|
||||
return Zn;
|
||||
}
|
||||
|
||||
public void setZn(float Zn) {
|
||||
this.Zn = Zn;
|
||||
}
|
||||
|
||||
public float getCu() {
|
||||
return Cu;
|
||||
}
|
||||
|
||||
public void setCu(float Cu) {
|
||||
this.Cu = Cu;
|
||||
}
|
||||
|
||||
public float getMn() {
|
||||
return Mn;
|
||||
}
|
||||
|
||||
public void setMn(float Mn) {
|
||||
this.Mn = Mn;
|
||||
}
|
||||
|
||||
public float getK() {
|
||||
return K;
|
||||
}
|
||||
|
||||
public void setK(float K) {
|
||||
this.K = K;
|
||||
}
|
||||
|
||||
public float getP() {
|
||||
return P;
|
||||
}
|
||||
|
||||
public void setP(float P) {
|
||||
this.P = P;
|
||||
}
|
||||
|
||||
public float getNa() {
|
||||
return Na;
|
||||
}
|
||||
|
||||
public void setNa(float Na) {
|
||||
this.Na = Na;
|
||||
}
|
||||
|
||||
public float getSe() {
|
||||
return Se;
|
||||
}
|
||||
|
||||
public void setSe(float Se) {
|
||||
this.Se = Se;
|
||||
}
|
||||
|
||||
public float getNiacin() {
|
||||
return niacin;
|
||||
}
|
||||
|
||||
public void setNiacin(float niacin) {
|
||||
this.niacin = niacin;
|
||||
}
|
||||
|
||||
public float getThiamine() {
|
||||
return thiamine;
|
||||
}
|
||||
|
||||
public void setThiamine(float thiamine) {
|
||||
this.thiamine = thiamine;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,35 @@ public class WebUtils {
|
||||
mClient.newCall(request).enqueue(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取病相关的菜谱和元素信息
|
||||
* 传入含有病的意义的菜谱分类名称,比如青少年食谱
|
||||
*
|
||||
* {
|
||||
* "menu_classification": {
|
||||
* "classification": "青少年食谱",
|
||||
* "cure_occupation": [
|
||||
* "学生"
|
||||
* ],
|
||||
* "menu_effect": [
|
||||
* "三鲜鳝汤",
|
||||
* "上海糖醋小排骨",
|
||||
* ...
|
||||
* ]
|
||||
* },
|
||||
* "elements": {
|
||||
* "id": 84,
|
||||
* "calorie": 1.1,
|
||||
* ...
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
public static void getIllness(String illnessClassification, Callback callback) {
|
||||
OkHttpClient mClient = new OkHttpClient();
|
||||
Request request = new Request.Builder().url("http://120.77.182.38/illness/" + illnessClassification + "/").build();
|
||||
mClient.newCall(request).enqueue(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取count个随机菜谱,在回调中解析为一个Menu数组
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user