diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysCustomerHealthyController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysCustomerHealthyController.java index 5ad21ebe8..d39b93abf 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysCustomerHealthyController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysCustomerHealthyController.java @@ -1,6 +1,8 @@ package com.stdiet.custom.controller; import java.util.List; + +import com.stdiet.common.utils.StringUtils; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -42,6 +44,11 @@ public class SysCustomerHealthyController extends BaseController { startPage(); List list = sysCustomerHealthyService.selectSysCustomerHealthyList(sysCustomerHealthy); + for(SysCustomerHealthy customerHealthy : list){ + if(StringUtils.isNotEmpty(customerHealthy.getPhone())){ + customerHealthy.setPhone(StringUtils.hiddenPhoneNumber(customerHealthy.getPhone())); + } + } return getDataTable(list); } @@ -54,6 +61,11 @@ public class SysCustomerHealthyController extends BaseController public AjaxResult export(SysCustomerHealthy sysCustomerHealthy) { List list = sysCustomerHealthyService.selectSysCustomerHealthyList(sysCustomerHealthy); + for(SysCustomerHealthy customerHealthy : list){ + if(StringUtils.isNotEmpty(customerHealthy.getPhone())){ + customerHealthy.setPhone(StringUtils.hiddenPhoneNumber(customerHealthy.getPhone())); + } + } ExcelUtil util = new ExcelUtil(SysCustomerHealthy.class); return util.exportExcel(list, "healthy"); } diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java index 6a7a7e9cd..d99a1c138 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysCustomerHealthy.java @@ -46,6 +46,14 @@ public class SysCustomerHealthy extends BaseEntity @Excel(name = "年龄") private Long age; + /** 身高 */ + @Excel(name = "身高") + private Integer tall; + + /** 体重 */ + @Excel(name = "体重") + private Long weight; + /** 调味品种类,使用 , 隔开 */ @Excel(name = "调味品种类,使用 , 隔开") private String condiment; @@ -367,9 +375,41 @@ public class SysCustomerHealthy extends BaseEntity private String otherAllergen; /** 体检报告 */ - @Excel(name = "体检报告") + //@Excel(name = "体检报告") private String medicalReport; + /** 体检报告名称 */ + //@Excel(name = "体检报告名称") + private String medicalReportName; + + /** 南方人北方人,0南方 1北方 */ + @Excel(name = "南方人北方人,0南方 1北方") + private Integer position; + + /** 减脂经历方法 */ + @Excel(name = "减脂经历方法") + private String experience; + + /** 是否减脂反弹,0否 1是 */ + @Excel(name = "是否减脂反弹,0否 1是") + private Integer rebound; + + /** 减脂遇到的困难 */ + @Excel(name = "减脂遇到的困难") + private String difficulty; + + /** 是否意识到生活习惯是减脂关键 0否 1是 */ + @Excel(name = "是否意识到生活习惯是减脂关键 0否 1是") + private Integer crux; + + /** 忌口或饮食食物 */ + @Excel(name = "忌口或饮食食物") + private String dishesIngredient; + + /** 饮食习惯 */ + @Excel(name = "饮食习惯") + private Long makeFoodType; + /** 删除标识 0未删除 1已删除。默认0 */ private Long delFlag; @@ -1181,6 +1221,86 @@ public class SysCustomerHealthy extends BaseEntity this.conditioningProject = conditioningProject; } + public Long getWeight() { + return weight; + } + + public void setWeight(Long weight) { + this.weight = weight; + } + + public String getMedicalReportName() { + return medicalReportName; + } + + public void setMedicalReportName(String medicalReportName) { + this.medicalReportName = medicalReportName; + } + + public Integer getPosition() { + return position; + } + + public void setPosition(Integer position) { + this.position = position; + } + + public String getExperience() { + return experience; + } + + public void setExperience(String experience) { + this.experience = experience; + } + + public Integer getRebound() { + return rebound; + } + + public void setRebound(Integer rebound) { + this.rebound = rebound; + } + + public String getDifficulty() { + return difficulty; + } + + public void setDifficulty(String difficulty) { + this.difficulty = difficulty; + } + + public Integer getCrux() { + return crux; + } + + public void setCrux(Integer crux) { + this.crux = crux; + } + + public String getDishesIngredient() { + return dishesIngredient; + } + + public void setDishesIngredient(String dishesIngredient) { + this.dishesIngredient = dishesIngredient; + } + + public Long getMakeFoodType() { + return makeFoodType; + } + + public void setMakeFoodType(Long makeFoodType) { + this.makeFoodType = makeFoodType; + } + + public Integer getTall() { + return tall; + } + + public void setTall(Integer tall) { + this.tall = tall; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysCommissionDayServiceImpl.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysCommissionDayServiceImpl.java index a939ac244..ef26782ec 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysCommissionDayServiceImpl.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysCommissionDayServiceImpl.java @@ -449,7 +449,7 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService { * double转为BigDecimal,保留一位小数,向下舍去 * */ public BigDecimal getMoney(Double money, int n){ - return new BigDecimal(money.toString()).setScale(3, BigDecimal.ROUND_HALF_UP); + return new BigDecimal(money.toString()).setScale(2, BigDecimal.ROUND_HALF_UP); } /** diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml index ebe0212e6..6b2fd2382 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysCustomerHealthyMapper.xml @@ -16,6 +16,8 @@ + + @@ -97,6 +99,14 @@ + + + + + + + + @@ -105,7 +115,8 @@ - select sch.id, customer_id, conditioning_project_id, sex, age, condiment, other_condiment, cooking_style, cooking_style_rate, wash_vegetables_style, other_wash_vegetables_style, breakfast_type, breakfast_food, lunch_type, dinner, vegetable_rate, common_meat, dinner_time, supper_num, supper_food, diet_hot_and_cold, diet_flavor, vegetables_num, vegetables_rate_type, fruits_num, fruits_time, fruits_rate, rice_num, rice_full, eating_speed, snacks, other_snacks, health_products_flag, health_products_brand, health_products_name, health_products_week_rate, health_products_day_rate, water_num, water_type, water_habit, drinks_num, drink_wine_flag, drink_wine_classify, other_wine_classify, drink_wine_amount, smoke_flag, smoke_rate, second_smoke, work_industry, work_type, defecation_num, other_defecation_num, defecation_time, defecation_shape, defecation_smell, defecation_speed, defecation_color, motion_num, motion_duration, motion_time, aerobic_motion_classify, anaerobic_motion_classify, anaerobic_aerobic_motion_classify, other_motion_classify, motion_field, other_motion_field, sleep_time, sleep_quality, sleep_drug_flag, sleep_drug, stayup_late_flag, stayup_late_week_num, family_illness_history, other_family_illness_history, operation_history, other_operation_history, near_operation_flag, recoverye_situation, long_eat_drug_flag, long_eat_drug_classify, other_long_eat_drug_classify, allergy_flag, allergy_situation, allergen, other_allergen, medical_report, sch.create_time, sch.create_by,sch. update_time, sch.update_by, sch.del_flag + select sch.id, customer_id, conditioning_project_id, sex, age, weight, tall, condiment, other_condiment, cooking_style, cooking_style_rate, wash_vegetables_style, other_wash_vegetables_style, breakfast_type, breakfast_food, lunch_type, dinner, vegetable_rate, common_meat, dinner_time, supper_num, supper_food, diet_hot_and_cold, diet_flavor, vegetables_num, vegetables_rate_type, fruits_num, fruits_time, fruits_rate, rice_num, rice_full, eating_speed, snacks, other_snacks, health_products_flag, health_products_brand, health_products_name, health_products_week_rate, health_products_day_rate, water_num, water_type, water_habit, drinks_num, drink_wine_flag, drink_wine_classify, other_wine_classify, drink_wine_amount, smoke_flag, smoke_rate, second_smoke, work_industry, work_type, defecation_num, other_defecation_num, defecation_time, defecation_shape, defecation_smell, defecation_speed, defecation_color, motion_num, motion_duration, motion_time, aerobic_motion_classify, anaerobic_motion_classify, anaerobic_aerobic_motion_classify, other_motion_classify, motion_field, other_motion_field, sleep_time, sleep_quality, sleep_drug_flag, sleep_drug, stayup_late_flag, stayup_late_week_num, family_illness_history, other_family_illness_history, operation_history, other_operation_history, near_operation_flag, recoverye_situation, long_eat_drug_flag, long_eat_drug_classify, other_long_eat_drug_classify, allergy_flag, allergy_situation, allergen, other_allergen, medical_report, medical_report_name, + position,experience,rebound,difficulty,crux,dishes_ingredient,make_food_type,sch.create_time, sch.create_by,sch. update_time, sch.update_by, sch.del_flag