客户体征相关
This commit is contained in:
		| @@ -0,0 +1,253 @@ | ||||
| package com.stdiet.custom.domain; | ||||
|  | ||||
| import java.math.BigDecimal; | ||||
| import java.util.Date; | ||||
| import com.fasterxml.jackson.annotation.JsonFormat; | ||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.stdiet.common.annotation.Excel; | ||||
| import com.stdiet.common.core.domain.BaseEntity; | ||||
|  | ||||
| /** | ||||
|  * 客户信息对象 sys_customer | ||||
|  * | ||||
|  * @author xzj | ||||
|  * @date 2020-12-31 | ||||
|  */ | ||||
| public class SysCustomer extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** $column.columnComment */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 名字 */ | ||||
|     @Excel(name = "名字") | ||||
|     private String name; | ||||
|  | ||||
|     /** 手机号 */ | ||||
|     @Excel(name = "手机号") | ||||
|     private String phone; | ||||
|  | ||||
|     /** 邮箱 */ | ||||
|     @Excel(name = "邮箱") | ||||
|     private String email; | ||||
|  | ||||
|     /** 地址 */ | ||||
|     @Excel(name = "地址") | ||||
|     private String address; | ||||
|  | ||||
|     /** 付款日期 */ | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd") | ||||
|     @Excel(name = "付款日期", width = 30, dateFormat = "yyyy-MM-dd") | ||||
|     private Date payDate; | ||||
|  | ||||
|     /** 开始日期 */ | ||||
|     @JsonFormat(pattern = "yyyy-MM-dd") | ||||
|     @Excel(name = "开始日期", width = 30, dateFormat = "yyyy-MM-dd") | ||||
|     private Date startDate; | ||||
|  | ||||
|     /** 购买月数 */ | ||||
|     @Excel(name = "购买月数") | ||||
|     private Long purchaseNum; | ||||
|  | ||||
|     /** 累计总金额 */ | ||||
|     @Excel(name = "累计总金额") | ||||
|     private BigDecimal payTotal; | ||||
|  | ||||
|     /** 主营养师 */ | ||||
|     @Excel(name = "主营养师") | ||||
|     private Long mainDietitian; | ||||
|  | ||||
|     /** 营养师助理 */ | ||||
|     @Excel(name = "营养师助理") | ||||
|     private Long assistantDietitian; | ||||
|  | ||||
|     /** 售后营养师 */ | ||||
|     @Excel(name = "售后营养师") | ||||
|     private Long afterDietitian; | ||||
|  | ||||
|     /** 销售人员 */ | ||||
|     @Excel(name = "销售人员") | ||||
|     private Long salesman; | ||||
|  | ||||
|     /** 负责人 */ | ||||
|     @Excel(name = "负责人") | ||||
|     private Long chargePerson; | ||||
|  | ||||
|     /** 跟进状态 */ | ||||
|     @Excel(name = "跟进状态") | ||||
|     private Long followStatus; | ||||
|  | ||||
|     /** 体征数据,非持久化字段 */ | ||||
|     private SysCustomerPhysicalSigns sign; | ||||
|  | ||||
|     public void setId(Long id) | ||||
|     { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public Long getId() | ||||
|     { | ||||
|         return id; | ||||
|     } | ||||
|     public void setName(String name) | ||||
|     { | ||||
|         this.name = name; | ||||
|     } | ||||
|  | ||||
|     public String getName() | ||||
|     { | ||||
|         return name; | ||||
|     } | ||||
|     public void setPhone(String phone) | ||||
|     { | ||||
|         this.phone = phone; | ||||
|     } | ||||
|  | ||||
|     public String getPhone() | ||||
|     { | ||||
|         return phone; | ||||
|     } | ||||
|     public void setEmail(String email) | ||||
|     { | ||||
|         this.email = email; | ||||
|     } | ||||
|  | ||||
|     public String getEmail() | ||||
|     { | ||||
|         return email; | ||||
|     } | ||||
|     public void setAddress(String address) | ||||
|     { | ||||
|         this.address = address; | ||||
|     } | ||||
|  | ||||
|     public String getAddress() | ||||
|     { | ||||
|         return address; | ||||
|     } | ||||
|     public void setPayDate(Date payDate) | ||||
|     { | ||||
|         this.payDate = payDate; | ||||
|     } | ||||
|  | ||||
|     public Date getPayDate() | ||||
|     { | ||||
|         return payDate; | ||||
|     } | ||||
|     public void setStartDate(Date startDate) | ||||
|     { | ||||
|         this.startDate = startDate; | ||||
|     } | ||||
|  | ||||
|     public Date getStartDate() | ||||
|     { | ||||
|         return startDate; | ||||
|     } | ||||
|     public void setPurchaseNum(Long purchaseNum) | ||||
|     { | ||||
|         this.purchaseNum = purchaseNum; | ||||
|     } | ||||
|  | ||||
|     public Long getPurchaseNum() | ||||
|     { | ||||
|         return purchaseNum; | ||||
|     } | ||||
|     public void setPayTotal(BigDecimal payTotal) | ||||
|     { | ||||
|         this.payTotal = payTotal; | ||||
|     } | ||||
|  | ||||
|     public BigDecimal getPayTotal() | ||||
|     { | ||||
|         return payTotal; | ||||
|     } | ||||
|     public void setMainDietitian(Long mainDietitian) | ||||
|     { | ||||
|         this.mainDietitian = mainDietitian; | ||||
|     } | ||||
|  | ||||
|     public Long getMainDietitian() | ||||
|     { | ||||
|         return mainDietitian; | ||||
|     } | ||||
|     public void setAssistantDietitian(Long assistantDietitian) | ||||
|     { | ||||
|         this.assistantDietitian = assistantDietitian; | ||||
|     } | ||||
|  | ||||
|     public Long getAssistantDietitian() | ||||
|     { | ||||
|         return assistantDietitian; | ||||
|     } | ||||
|     public void setAfterDietitian(Long afterDietitian) | ||||
|     { | ||||
|         this.afterDietitian = afterDietitian; | ||||
|     } | ||||
|  | ||||
|     public Long getAfterDietitian() | ||||
|     { | ||||
|         return afterDietitian; | ||||
|     } | ||||
|     public void setSalesman(Long salesman) | ||||
|     { | ||||
|         this.salesman = salesman; | ||||
|     } | ||||
|  | ||||
|     public Long getSalesman() | ||||
|     { | ||||
|         return salesman; | ||||
|     } | ||||
|     public void setChargePerson(Long chargePerson) | ||||
|     { | ||||
|         this.chargePerson = chargePerson; | ||||
|     } | ||||
|  | ||||
|     public Long getChargePerson() | ||||
|     { | ||||
|         return chargePerson; | ||||
|     } | ||||
|     public void setFollowStatus(Long followStatus) | ||||
|     { | ||||
|         this.followStatus = followStatus; | ||||
|     } | ||||
|  | ||||
|     public Long getFollowStatus() | ||||
|     { | ||||
|         return followStatus; | ||||
|     } | ||||
|  | ||||
|     public SysCustomerPhysicalSigns getSign() { | ||||
|         return sign; | ||||
|     } | ||||
|  | ||||
|     public void setSign(SysCustomerPhysicalSigns sign) { | ||||
|         this.sign = sign; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|                 .append("id", getId()) | ||||
|                 .append("name", getName()) | ||||
|                 .append("phone", getPhone()) | ||||
|                 .append("email", getEmail()) | ||||
|                 .append("address", getAddress()) | ||||
|                 .append("payDate", getPayDate()) | ||||
|                 .append("startDate", getStartDate()) | ||||
|                 .append("purchaseNum", getPurchaseNum()) | ||||
|                 .append("payTotal", getPayTotal()) | ||||
|                 .append("mainDietitian", getMainDietitian()) | ||||
|                 .append("assistantDietitian", getAssistantDietitian()) | ||||
|                 .append("afterDietitian", getAfterDietitian()) | ||||
|                 .append("salesman", getSalesman()) | ||||
|                 .append("chargePerson", getChargePerson()) | ||||
|                 .append("followStatus", getFollowStatus()) | ||||
|                 .append("createTime", getCreateTime()) | ||||
|                 .append("createBy", getCreateBy()) | ||||
|                 .append("updateTime", getUpdateTime()) | ||||
|                 .append("updateBy", getUpdateBy()) | ||||
|                 .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,444 @@ | ||||
| package com.stdiet.custom.domain; | ||||
|  | ||||
| import org.apache.commons.lang3.builder.ToStringBuilder; | ||||
| import org.apache.commons.lang3.builder.ToStringStyle; | ||||
| import com.stdiet.common.annotation.Excel; | ||||
| import com.stdiet.common.core.domain.BaseEntity; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| /** | ||||
|  * 客户数据对象 sys_customer_physical_signs | ||||
|  * | ||||
|  * @author xzj | ||||
|  * @date 2020-12-31 | ||||
|  */ | ||||
| public class SysCustomerPhysicalSigns extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** $column.columnComment */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 客户id */ | ||||
|     @Excel(name = "客户id") | ||||
|     private Long customerId; | ||||
|  | ||||
|     /** 客户性别  0男 1女 */ | ||||
|     @Excel(name = "客户性别  0男 1女") | ||||
|     private Integer sex; | ||||
|  | ||||
|     /** 客户年龄(岁) */ | ||||
|     @Excel(name = "客户年龄", readConverterExp = "岁=") | ||||
|     private Integer age; | ||||
|  | ||||
|     /** 客户身高(厘米) */ | ||||
|     @Excel(name = "客户身高", readConverterExp = "厘=米") | ||||
|     private Integer tall; | ||||
|  | ||||
|     /** 客户体重(斤) */ | ||||
|     @Excel(name = "客户体重", readConverterExp = "斤=") | ||||
|     private Integer weight; | ||||
|  | ||||
|     /** 客户病史体征id */ | ||||
|     @Excel(name = "客户病史体征id") | ||||
|     private String physicalSignsId; | ||||
|  | ||||
|     /** 客户忌口不爱吃食材id */ | ||||
|     @Excel(name = "客户忌口不爱吃食材id") | ||||
|     private String dishesIngredientId; | ||||
|  | ||||
|     /** 客户照片 */ | ||||
|     @Excel(name = "客户照片") | ||||
|     private String photo; | ||||
|  | ||||
|     /** 是否便秘  0是 1否 */ | ||||
|     @Excel(name = "是否便秘  0是 1否") | ||||
|     private Integer constipation; | ||||
|  | ||||
|     /** 是否熬夜、失眠 0是 1否 */ | ||||
|     @Excel(name = "是否熬夜、失眠 0是 1否") | ||||
|     private Integer staylate; | ||||
|  | ||||
|     /** 是否经常运动 0是 1否 */ | ||||
|     @Excel(name = "是否经常运动 0是 1否") | ||||
|     private Integer motion; | ||||
|  | ||||
|     /** 饮食方式  0自己做 1外面吃 */ | ||||
|     @Excel(name = "饮食方式  0自己做 1外面吃") | ||||
|     private Integer makeFoodType; | ||||
|  | ||||
|     /** 饮食特点 0清淡 1重口味 */ | ||||
|     @Excel(name = "饮食特点 0清淡 1重口味") | ||||
|     private Integer makeFoodTaste; | ||||
|  | ||||
|     /** 平时是否久坐  0久坐多 1走动多 */ | ||||
|     @Excel(name = "平时是否久坐  0久坐多 1走动多") | ||||
|     private Integer walk; | ||||
|  | ||||
|     /** 减脂过程遇到的困难 */ | ||||
|     @Excel(name = "减脂过程遇到的困难") | ||||
|     private String difficulty; | ||||
|  | ||||
|     /** 是否浑身乏力 0是 1否 */ | ||||
|     @Excel(name = "是否浑身乏力 0是 1否") | ||||
|     private Integer weakness; | ||||
|  | ||||
|     /** 是否减脂反弹 0是 1否 */ | ||||
|     @Excel(name = "是否减脂反弹 0是 1否") | ||||
|     private Integer rebound; | ||||
|  | ||||
|     /** 能否认识到生活习惯的改善才是减脂的关键 0是 1否 */ | ||||
|     @Excel(name = "能否认识到生活习惯的改善才是减脂的关键 0是 1否") | ||||
|     private Integer crux; | ||||
|  | ||||
|     /** 南方人还是北方人 0南方 1北方 */ | ||||
|     @Excel(name = "南方人还是北方人 0南方 1北方") | ||||
|     private Integer position; | ||||
|  | ||||
|     /** 睡觉时间(24小时制) */ | ||||
|     @Excel(name = "睡觉时间", readConverterExp = "2=4小时制") | ||||
|     private Integer sleepTime; | ||||
|  | ||||
|     /** 起床时间(24小时制) */ | ||||
|     @Excel(name = "起床时间", readConverterExp = "2=4小时制") | ||||
|     private Integer getupTime; | ||||
|  | ||||
|     /** 联系沟通时间(24小时制) */ | ||||
|     @Excel(name = "联系沟通时间", readConverterExp = "2=4小时制") | ||||
|     private Integer connectTime; | ||||
|  | ||||
|     /** 备注 */ | ||||
|     @Excel(name = "备注") | ||||
|     private String remarks; | ||||
|  | ||||
|     /** 湿气数据 */ | ||||
|     @Excel(name = "湿气数据") | ||||
|     private String bloodData; | ||||
|  | ||||
|     /** 气血数据 */ | ||||
|     @Excel(name = "气血数据") | ||||
|     private String moistureDate; | ||||
|  | ||||
|     /** 工作职业 */ | ||||
|     @Excel(name = "工作职业") | ||||
|     private String vocation; | ||||
|  | ||||
|     /** 是否上夜班 */ | ||||
|     @Excel(name = "是否上夜班") | ||||
|     private Integer night; | ||||
|  | ||||
|     /** 减脂经历 */ | ||||
|     @Excel(name = "减脂经历") | ||||
|     private String experience; | ||||
|  | ||||
|     /** 体征对象集合 **/ | ||||
|     private List<SysPhysicalSigns> signList; | ||||
|  | ||||
|     public void setId(Long id) | ||||
|     { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public Long getId() | ||||
|     { | ||||
|         return id; | ||||
|     } | ||||
|     public void setCustomerId(Long customerId) | ||||
|     { | ||||
|         this.customerId = customerId; | ||||
|     } | ||||
|  | ||||
|     public Long getCustomerId() | ||||
|     { | ||||
|         return customerId; | ||||
|     } | ||||
|     public void setSex(Integer sex) | ||||
|     { | ||||
|         this.sex = sex; | ||||
|     } | ||||
|  | ||||
|     public Integer getSex() | ||||
|     { | ||||
|         return sex; | ||||
|     } | ||||
|     public void setAge(Integer age) | ||||
|     { | ||||
|         this.age = age; | ||||
|     } | ||||
|  | ||||
|     public Integer getAge() | ||||
|     { | ||||
|         return age; | ||||
|     } | ||||
|     public void setTall(Integer tall) | ||||
|     { | ||||
|         this.tall = tall; | ||||
|     } | ||||
|  | ||||
|     public Integer getTall() | ||||
|     { | ||||
|         return tall; | ||||
|     } | ||||
|     public void setWeight(Integer weight) | ||||
|     { | ||||
|         this.weight = weight; | ||||
|     } | ||||
|  | ||||
|     public Integer getWeight() | ||||
|     { | ||||
|         return weight; | ||||
|     } | ||||
|     public void setPhysicalSignsId(String physicalSignsId) | ||||
|     { | ||||
|         this.physicalSignsId = physicalSignsId; | ||||
|     } | ||||
|  | ||||
|     public String getPhysicalSignsId() | ||||
|     { | ||||
|         return physicalSignsId; | ||||
|     } | ||||
|     public void setDishesIngredientId(String dishesIngredientId) | ||||
|     { | ||||
|         this.dishesIngredientId = dishesIngredientId; | ||||
|     } | ||||
|  | ||||
|     public String getDishesIngredientId() | ||||
|     { | ||||
|         return dishesIngredientId; | ||||
|     } | ||||
|     public void setPhoto(String photo) | ||||
|     { | ||||
|         this.photo = photo; | ||||
|     } | ||||
|  | ||||
|     public String getPhoto() | ||||
|     { | ||||
|         return photo; | ||||
|     } | ||||
|     public void setConstipation(Integer constipation) | ||||
|     { | ||||
|         this.constipation = constipation; | ||||
|     } | ||||
|  | ||||
|     public Integer getConstipation() | ||||
|     { | ||||
|         return constipation; | ||||
|     } | ||||
|     public void setStaylate(Integer staylate) | ||||
|     { | ||||
|         this.staylate = staylate; | ||||
|     } | ||||
|  | ||||
|     public Integer getStaylate() | ||||
|     { | ||||
|         return staylate; | ||||
|     } | ||||
|     public void setMotion(Integer motion) | ||||
|     { | ||||
|         this.motion = motion; | ||||
|     } | ||||
|  | ||||
|     public Integer getMotion() | ||||
|     { | ||||
|         return motion; | ||||
|     } | ||||
|     public void setMakeFoodType(Integer makeFoodType) | ||||
|     { | ||||
|         this.makeFoodType = makeFoodType; | ||||
|     } | ||||
|  | ||||
|     public Integer getMakeFoodType() | ||||
|     { | ||||
|         return makeFoodType; | ||||
|     } | ||||
|     public void setMakeFoodTaste(Integer makeFoodTaste) | ||||
|     { | ||||
|         this.makeFoodTaste = makeFoodTaste; | ||||
|     } | ||||
|  | ||||
|     public Integer getMakeFoodTaste() | ||||
|     { | ||||
|         return makeFoodTaste; | ||||
|     } | ||||
|     public void setWalk(Integer walk) | ||||
|     { | ||||
|         this.walk = walk; | ||||
|     } | ||||
|  | ||||
|     public Integer getWalk() | ||||
|     { | ||||
|         return walk; | ||||
|     } | ||||
|     public void setDifficulty(String difficulty) | ||||
|     { | ||||
|         this.difficulty = difficulty; | ||||
|     } | ||||
|  | ||||
|     public String getDifficulty() | ||||
|     { | ||||
|         return difficulty; | ||||
|     } | ||||
|     public void setWeakness(Integer weakness) | ||||
|     { | ||||
|         this.weakness = weakness; | ||||
|     } | ||||
|  | ||||
|     public Integer getWeakness() | ||||
|     { | ||||
|         return weakness; | ||||
|     } | ||||
|     public void setRebound(Integer rebound) | ||||
|     { | ||||
|         this.rebound = rebound; | ||||
|     } | ||||
|  | ||||
|     public Integer getRebound() | ||||
|     { | ||||
|         return rebound; | ||||
|     } | ||||
|     public void setCrux(Integer crux) | ||||
|     { | ||||
|         this.crux = crux; | ||||
|     } | ||||
|  | ||||
|     public Integer getCrux() | ||||
|     { | ||||
|         return crux; | ||||
|     } | ||||
|     public void setPosition(Integer position) | ||||
|     { | ||||
|         this.position = position; | ||||
|     } | ||||
|  | ||||
|     public Integer getPosition() | ||||
|     { | ||||
|         return position; | ||||
|     } | ||||
|     public void setSleepTime(Integer sleepTime) | ||||
|     { | ||||
|         this.sleepTime = sleepTime; | ||||
|     } | ||||
|  | ||||
|     public Integer getSleepTime() | ||||
|     { | ||||
|         return sleepTime; | ||||
|     } | ||||
|     public void setGetupTime(Integer getupTime) | ||||
|     { | ||||
|         this.getupTime = getupTime; | ||||
|     } | ||||
|  | ||||
|     public Integer getGetupTime() | ||||
|     { | ||||
|         return getupTime; | ||||
|     } | ||||
|     public void setConnectTime(Integer connectTime) | ||||
|     { | ||||
|         this.connectTime = connectTime; | ||||
|     } | ||||
|  | ||||
|     public Integer getConnectTime() | ||||
|     { | ||||
|         return connectTime; | ||||
|     } | ||||
|     public void setRemarks(String remarks) | ||||
|     { | ||||
|         this.remarks = remarks; | ||||
|     } | ||||
|  | ||||
|     public String getRemarks() | ||||
|     { | ||||
|         return remarks; | ||||
|     } | ||||
|     public void setBloodData(String bloodData) | ||||
|     { | ||||
|         this.bloodData = bloodData; | ||||
|     } | ||||
|  | ||||
|     public String getBloodData() | ||||
|     { | ||||
|         return bloodData; | ||||
|     } | ||||
|     public void setMoistureDate(String moistureDate) | ||||
|     { | ||||
|         this.moistureDate = moistureDate; | ||||
|     } | ||||
|  | ||||
|     public String getMoistureDate() | ||||
|     { | ||||
|         return moistureDate; | ||||
|     } | ||||
|  | ||||
|     public String getVocation() { | ||||
|         return vocation; | ||||
|     } | ||||
|  | ||||
|     public void setVocation(String vocation) { | ||||
|         this.vocation = vocation; | ||||
|     } | ||||
|  | ||||
|     public Integer getNight() { | ||||
|         return night; | ||||
|     } | ||||
|  | ||||
|     public void setNight(Integer night) { | ||||
|         this.night = night; | ||||
|     } | ||||
|  | ||||
|     public String getExperience() { | ||||
|         return experience; | ||||
|     } | ||||
|  | ||||
|     public void setExperience(String experience) { | ||||
|         this.experience = experience; | ||||
|     } | ||||
|  | ||||
|     public List<SysPhysicalSigns> getSignList() { | ||||
|         return signList; | ||||
|     } | ||||
|  | ||||
|     public void setSignList(List<SysPhysicalSigns> signList) { | ||||
|         this.signList = signList; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|                 .append("id", getId()) | ||||
|                 .append("customerId", getCustomerId()) | ||||
|                 .append("sex", getSex()) | ||||
|                 .append("age", getAge()) | ||||
|                 .append("tall", getTall()) | ||||
|                 .append("weight", getWeight()) | ||||
|                 .append("physicalSignsId", getPhysicalSignsId()) | ||||
|                 .append("dishesIngredientId", getDishesIngredientId()) | ||||
|                 .append("photo", getPhoto()) | ||||
|                 .append("constipation", getConstipation()) | ||||
|                 .append("staylate", getStaylate()) | ||||
|                 .append("motion", getMotion()) | ||||
|                 .append("makeFoodType", getMakeFoodType()) | ||||
|                 .append("makeFoodTaste", getMakeFoodTaste()) | ||||
|                 .append("walk", getWalk()) | ||||
|                 .append("difficulty", getDifficulty()) | ||||
|                 .append("weakness", getWeakness()) | ||||
|                 .append("rebound", getRebound()) | ||||
|                 .append("crux", getCrux()) | ||||
|                 .append("position", getPosition()) | ||||
|                 .append("sleepTime", getSleepTime()) | ||||
|                 .append("getupTime", getGetupTime()) | ||||
|                 .append("connectTime", getConnectTime()) | ||||
|                 .append("remarks", getRemarks()) | ||||
|                 .append("bloodData", getBloodData()) | ||||
|                 .append("moistureDate", getMoistureDate()) | ||||
|                 .append("vocation", getVocation()) | ||||
|                 .append(" night", getNight()) | ||||
|                 .append("experience", getExperience()) | ||||
|                 .append("createTime", getCreateTime()) | ||||
|                 .append("createBy", getCreateBy()) | ||||
|                 .append("updateTime", getUpdateTime()) | ||||
|                 .append("updateBy", getUpdateBy()) | ||||
|                 .toString(); | ||||
|     } | ||||
|  | ||||
| } | ||||
| @@ -0,0 +1,402 @@ | ||||
| package com.stdiet.custom.dto.request; | ||||
|  | ||||
| import com.stdiet.common.annotation.Excel; | ||||
| import com.stdiet.common.core.domain.BaseEntity; | ||||
|  | ||||
| /** | ||||
|  * 客户信息建档调查DTO | ||||
|  * | ||||
|  * @author xzj | ||||
|  * @date 2020-12-31 | ||||
|  */ | ||||
| public class CustomerInvestigateRequest extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     //基础信息 | ||||
|  | ||||
|     /** $column.columnComment */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 名字 */ | ||||
|     @Excel(name = "名字") | ||||
|     private String name; | ||||
|  | ||||
|     /** 手机号 */ | ||||
|     @Excel(name = "手机号") | ||||
|     private String phone; | ||||
|  | ||||
|     /** 邮箱 */ | ||||
|     @Excel(name = "邮箱") | ||||
|     private String email; | ||||
|  | ||||
|     /** 地址 */ | ||||
|     @Excel(name = "地址") | ||||
|     private String address; | ||||
|  | ||||
|     //体征信息 | ||||
|  | ||||
|     /** 客户性别  0男 1女 */ | ||||
|     @Excel(name = "客户性别  0男 1女") | ||||
|     private Integer sex; | ||||
|  | ||||
|     /** 客户年龄(岁) */ | ||||
|     @Excel(name = "客户年龄", readConverterExp = "岁=") | ||||
|     private Integer age; | ||||
|  | ||||
|     /** 客户身高(厘米) */ | ||||
|     @Excel(name = "客户身高", readConverterExp = "厘=米") | ||||
|     private Integer tall; | ||||
|  | ||||
|     /** 客户体重(斤) */ | ||||
|     @Excel(name = "客户体重", readConverterExp = "斤=") | ||||
|     private Integer weight; | ||||
|  | ||||
|     /** 客户病史体征id */ | ||||
|     @Excel(name = "客户病史体征id") | ||||
|     private String physicalSignsId; | ||||
|  | ||||
|     /** 客户忌口不爱吃食材id */ | ||||
|     @Excel(name = "客户忌口不爱吃食材id") | ||||
|     private String dishesIngredientId; | ||||
|  | ||||
|     /** 客户照片 */ | ||||
|     @Excel(name = "客户照片") | ||||
|     private String photo; | ||||
|  | ||||
|     /** 是否便秘  0是 1否 */ | ||||
|     @Excel(name = "是否便秘  0是 1否") | ||||
|     private Integer constipation; | ||||
|  | ||||
|     /** 是否熬夜、失眠 0是 1否 */ | ||||
|     @Excel(name = "是否熬夜、失眠 0是 1否") | ||||
|     private Integer staylate; | ||||
|  | ||||
|     /** 是否经常运动 0是 1否 */ | ||||
|     @Excel(name = "是否经常运动 0是 1否") | ||||
|     private Integer motion; | ||||
|  | ||||
|     /** 饮食方式  0自己做 1外面吃 */ | ||||
|     @Excel(name = "饮食方式  0自己做 1外面吃") | ||||
|     private Integer makeFoodType; | ||||
|  | ||||
|     /** 饮食特点 0清淡 1重口味 */ | ||||
|     @Excel(name = "饮食特点 0清淡 1重口味") | ||||
|     private Integer makeFoodTaste; | ||||
|  | ||||
|     /** 平时是否久坐  0久坐多 1走动多 */ | ||||
|     @Excel(name = "平时是否久坐  0久坐多 1走动多") | ||||
|     private Integer walk; | ||||
|  | ||||
|     /** 减脂过程遇到的困难 */ | ||||
|     @Excel(name = "减脂过程遇到的困难") | ||||
|     private String difficulty; | ||||
|  | ||||
|     /** 是否浑身乏力 0是 1否 */ | ||||
|     @Excel(name = "是否浑身乏力 0是 1否") | ||||
|     private Integer weakness; | ||||
|  | ||||
|     /** 是否减脂反弹 0是 1否 */ | ||||
|     @Excel(name = "是否减脂反弹 0是 1否") | ||||
|     private Integer rebound; | ||||
|  | ||||
|     /** 能否认识到生活习惯的改善才是减脂的关键 0是 1否 */ | ||||
|     @Excel(name = "能否认识到生活习惯的改善才是减脂的关键 0是 1否") | ||||
|     private Integer crux; | ||||
|  | ||||
|     /** 南方人还是北方人 0南方 1北方 */ | ||||
|     @Excel(name = "南方人还是北方人 0南方 1北方") | ||||
|     private Integer position; | ||||
|  | ||||
|     /** 睡觉时间(24小时制) */ | ||||
|     @Excel(name = "睡觉时间", readConverterExp = "2=4小时制") | ||||
|     private Integer sleepTime; | ||||
|  | ||||
|     /** 起床时间(24小时制) */ | ||||
|     @Excel(name = "起床时间", readConverterExp = "2=4小时制") | ||||
|     private Integer getupTime; | ||||
|  | ||||
|     /** 联系沟通时间(24小时制) */ | ||||
|     @Excel(name = "联系沟通时间", readConverterExp = "2=4小时制") | ||||
|     private Integer connectTime; | ||||
|  | ||||
|     /** 备注 */ | ||||
|     @Excel(name = "备注") | ||||
|     private String remarks; | ||||
|  | ||||
|     /** 湿气数据 */ | ||||
|     @Excel(name = "湿气数据") | ||||
|     private String bloodData; | ||||
|  | ||||
|     /** 气血数据 */ | ||||
|     @Excel(name = "气血数据") | ||||
|     private String moistureDate; | ||||
|  | ||||
|     /** 工作职业 */ | ||||
|     @Excel(name = "工作职业") | ||||
|     private String vocation; | ||||
|  | ||||
|     /** 是否上夜班 */ | ||||
|     @Excel(name = "是否上夜班") | ||||
|     private Integer night; | ||||
|  | ||||
|     /** 减脂经历 */ | ||||
|     @Excel(name = "减脂经历") | ||||
|     private String experience; | ||||
|  | ||||
|     public Long getId() { | ||||
|         return id; | ||||
|     } | ||||
|  | ||||
|     public String getName() { | ||||
|         return name; | ||||
|     } | ||||
|  | ||||
|     public String getPhone() { | ||||
|         return phone; | ||||
|     } | ||||
|  | ||||
|     public String getEmail() { | ||||
|         return email; | ||||
|     } | ||||
|  | ||||
|     public String getAddress() { | ||||
|         return address; | ||||
|     } | ||||
|  | ||||
|     public void setId(Long id) { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public void setName(String name) { | ||||
|         this.name = name; | ||||
|     } | ||||
|  | ||||
|     public void setPhone(String phone) { | ||||
|         this.phone = phone; | ||||
|     } | ||||
|  | ||||
|     public void setEmail(String email) { | ||||
|         this.email = email; | ||||
|     } | ||||
|  | ||||
|     public void setAddress(String address) { | ||||
|         this.address = address; | ||||
|     } | ||||
|  | ||||
|     public Integer getSex() { | ||||
|         return sex; | ||||
|     } | ||||
|  | ||||
|     public void setSex(Integer sex) { | ||||
|         this.sex = sex; | ||||
|     } | ||||
|  | ||||
|     public Integer getAge() { | ||||
|         return age; | ||||
|     } | ||||
|  | ||||
|     public void setAge(Integer age) { | ||||
|         this.age = age; | ||||
|     } | ||||
|  | ||||
|     public Integer getTall() { | ||||
|         return tall; | ||||
|     } | ||||
|  | ||||
|     public void setTall(Integer tall) { | ||||
|         this.tall = tall; | ||||
|     } | ||||
|  | ||||
|     public Integer getWeight() { | ||||
|         return weight; | ||||
|     } | ||||
|  | ||||
|     public void setWeight(Integer weight) { | ||||
|         this.weight = weight; | ||||
|     } | ||||
|  | ||||
|     public String getPhysicalSignsId() { | ||||
|         return physicalSignsId; | ||||
|     } | ||||
|  | ||||
|     public void setPhysicalSignsId(String physicalSignsId) { | ||||
|         this.physicalSignsId = physicalSignsId; | ||||
|     } | ||||
|  | ||||
|     public String getDishesIngredientId() { | ||||
|         return dishesIngredientId; | ||||
|     } | ||||
|  | ||||
|     public void setDishesIngredientId(String dishesIngredientId) { | ||||
|         this.dishesIngredientId = dishesIngredientId; | ||||
|     } | ||||
|  | ||||
|     public String getPhoto() { | ||||
|         return photo; | ||||
|     } | ||||
|  | ||||
|     public void setPhoto(String photo) { | ||||
|         this.photo = photo; | ||||
|     } | ||||
|  | ||||
|     public Integer getConstipation() { | ||||
|         return constipation; | ||||
|     } | ||||
|  | ||||
|     public void setConstipation(Integer constipation) { | ||||
|         this.constipation = constipation; | ||||
|     } | ||||
|  | ||||
|     public Integer getStaylate() { | ||||
|         return staylate; | ||||
|     } | ||||
|  | ||||
|     public void setStaylate(Integer staylate) { | ||||
|         this.staylate = staylate; | ||||
|     } | ||||
|  | ||||
|     public Integer getMotion() { | ||||
|         return motion; | ||||
|     } | ||||
|  | ||||
|     public void setMotion(Integer motion) { | ||||
|         this.motion = motion; | ||||
|     } | ||||
|  | ||||
|     public Integer getMakeFoodType() { | ||||
|         return makeFoodType; | ||||
|     } | ||||
|  | ||||
|     public void setMakeFoodType(Integer makeFoodType) { | ||||
|         this.makeFoodType = makeFoodType; | ||||
|     } | ||||
|  | ||||
|     public Integer getMakeFoodTaste() { | ||||
|         return makeFoodTaste; | ||||
|     } | ||||
|  | ||||
|     public void setMakeFoodTaste(Integer makeFoodTaste) { | ||||
|         this.makeFoodTaste = makeFoodTaste; | ||||
|     } | ||||
|  | ||||
|     public Integer getWalk() { | ||||
|         return walk; | ||||
|     } | ||||
|  | ||||
|     public void setWalk(Integer walk) { | ||||
|         this.walk = walk; | ||||
|     } | ||||
|  | ||||
|     public String getDifficulty() { | ||||
|         return difficulty; | ||||
|     } | ||||
|  | ||||
|     public void setDifficulty(String difficulty) { | ||||
|         this.difficulty = difficulty; | ||||
|     } | ||||
|  | ||||
|     public Integer getWeakness() { | ||||
|         return weakness; | ||||
|     } | ||||
|  | ||||
|     public void setWeakness(Integer weakness) { | ||||
|         this.weakness = weakness; | ||||
|     } | ||||
|  | ||||
|     public Integer getRebound() { | ||||
|         return rebound; | ||||
|     } | ||||
|  | ||||
|     public void setRebound(Integer rebound) { | ||||
|         this.rebound = rebound; | ||||
|     } | ||||
|  | ||||
|     public Integer getCrux() { | ||||
|         return crux; | ||||
|     } | ||||
|  | ||||
|     public void setCrux(Integer crux) { | ||||
|         this.crux = crux; | ||||
|     } | ||||
|  | ||||
|     public Integer getPosition() { | ||||
|         return position; | ||||
|     } | ||||
|  | ||||
|     public void setPosition(Integer position) { | ||||
|         this.position = position; | ||||
|     } | ||||
|  | ||||
|     public Integer getSleepTime() { | ||||
|         return sleepTime; | ||||
|     } | ||||
|  | ||||
|     public void setSleepTime(Integer sleepTime) { | ||||
|         this.sleepTime = sleepTime; | ||||
|     } | ||||
|  | ||||
|     public Integer getGetupTime() { | ||||
|         return getupTime; | ||||
|     } | ||||
|  | ||||
|     public void setGetupTime(Integer getupTime) { | ||||
|         this.getupTime = getupTime; | ||||
|     } | ||||
|  | ||||
|     public Integer getConnectTime() { | ||||
|         return connectTime; | ||||
|     } | ||||
|  | ||||
|     public void setConnectTime(Integer connectTime) { | ||||
|         this.connectTime = connectTime; | ||||
|     } | ||||
|  | ||||
|     public String getRemarks() { | ||||
|         return remarks; | ||||
|     } | ||||
|  | ||||
|     public void setRemarks(String remarks) { | ||||
|         this.remarks = remarks; | ||||
|     } | ||||
|  | ||||
|     public String getBloodData() { | ||||
|         return bloodData; | ||||
|     } | ||||
|  | ||||
|     public void setBloodData(String bloodData) { | ||||
|         this.bloodData = bloodData; | ||||
|     } | ||||
|  | ||||
|     public String getMoistureDate() { | ||||
|         return moistureDate; | ||||
|     } | ||||
|  | ||||
|     public void setMoistureDate(String moistureDate) { | ||||
|         this.moistureDate = moistureDate; | ||||
|     } | ||||
|  | ||||
|     public String getVocation() { | ||||
|         return vocation; | ||||
|     } | ||||
|  | ||||
|     public void setVocation(String vocation) { | ||||
|         this.vocation = vocation; | ||||
|     } | ||||
|  | ||||
|     public Integer getNight() { | ||||
|         return night; | ||||
|     } | ||||
|  | ||||
|     public void setNight(Integer night) { | ||||
|         this.night = night; | ||||
|     } | ||||
|  | ||||
|     public String getExperience() { | ||||
|         return experience; | ||||
|     } | ||||
|  | ||||
|     public void setExperience(String experience) { | ||||
|         this.experience = experience; | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,73 @@ | ||||
| package com.stdiet.custom.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysCustomer; | ||||
| import org.apache.ibatis.annotations.Param; | ||||
|  | ||||
| /** | ||||
|  * 客户信息Mapper接口 | ||||
|  * | ||||
|  * @author xzj | ||||
|  * @date 2020-12-31 | ||||
|  */ | ||||
| public interface SysCustomerMapper | ||||
| { | ||||
|     /** | ||||
|      * 查询客户信息 | ||||
|      * | ||||
|      * @param id 客户信息ID | ||||
|      * @return 客户信息 | ||||
|      */ | ||||
|     public SysCustomer selectSysCustomerById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询客户信息列表 | ||||
|      * | ||||
|      * @param sysCustomer 客户信息 | ||||
|      * @return 客户信息集合 | ||||
|      */ | ||||
|     public List<SysCustomer> selectSysCustomerList(SysCustomer sysCustomer); | ||||
|  | ||||
|     /** | ||||
|      * 新增客户信息 | ||||
|      * | ||||
|      * @param sysCustomer 客户信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysCustomer(SysCustomer sysCustomer); | ||||
|  | ||||
|     /** | ||||
|      * 修改客户信息 | ||||
|      * | ||||
|      * @param sysCustomer 客户信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysCustomer(SysCustomer sysCustomer); | ||||
|  | ||||
|     /** | ||||
|      * 删除客户信息 | ||||
|      * | ||||
|      * @param id 客户信息ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除客户信息 | ||||
|      * | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 根据手机号查询客户信息 | ||||
|      * | ||||
|      * @param phone 手机号 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     SysCustomer getCustomerByPhone(@Param("phone")String phone); | ||||
|  | ||||
|     //查询客户基础信息以及体征信息 | ||||
|     List<SysCustomer> selectSysCustomerAndSignList(SysCustomer sysCustomer); | ||||
| } | ||||
| @@ -0,0 +1,72 @@ | ||||
| package com.stdiet.custom.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysCustomerPhysicalSigns; | ||||
| import org.apache.ibatis.annotations.Param; | ||||
|  | ||||
| /** | ||||
|  * 客户体征信息Mapper接口 | ||||
|  * | ||||
|  * @author xzj | ||||
|  * @date 2020-12-31 | ||||
|  */ | ||||
| public interface SysCustomerPhysicalSignsMapper | ||||
| { | ||||
|     /** | ||||
|      * 查询客户体征信息 | ||||
|      * | ||||
|      * @param id 客户体征信息ID | ||||
|      * @return 客户体征信息 | ||||
|      */ | ||||
|     public SysCustomerPhysicalSigns selectSysCustomerPhysicalSignsById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询客户体征信息列表 | ||||
|      * | ||||
|      * @param sysCustomerPhysicalSigns 客户体征信息 | ||||
|      * @return 客户体征信息集合 | ||||
|      */ | ||||
|     public List<SysCustomerPhysicalSigns> selectSysCustomerPhysicalSignsList(SysCustomerPhysicalSigns sysCustomerPhysicalSigns); | ||||
|  | ||||
|     /** | ||||
|      * 新增客户体征信息 | ||||
|      * | ||||
|      * @param sysCustomerPhysicalSigns 客户体征信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysCustomerPhysicalSigns(SysCustomerPhysicalSigns sysCustomerPhysicalSigns); | ||||
|  | ||||
|     /** | ||||
|      * 修改客户体征信息 | ||||
|      * | ||||
|      * @param sysCustomerPhysicalSigns 客户体征信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysCustomerPhysicalSigns(SysCustomerPhysicalSigns sysCustomerPhysicalSigns); | ||||
|  | ||||
|     /** | ||||
|      * 删除客户体征信息 | ||||
|      * | ||||
|      * @param id 客户体征信息ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerPhysicalSignsById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除客户体征信息 | ||||
|      * | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerPhysicalSignsByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 根据客户id修改客户体征信息 | ||||
|      * | ||||
|      * @param sysCustomerPhysicalSigns 客户体征信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     int updateSysCustomerPhysicalSignsByCustomerId(SysCustomerPhysicalSigns sysCustomerPhysicalSigns); | ||||
|  | ||||
|     int deleteSysCustomerPhysicalSignsByCustomerIds(Long[] ids); | ||||
| } | ||||
| @@ -0,0 +1,60 @@ | ||||
| package com.stdiet.custom.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysCustomerPhysicalSigns; | ||||
|  | ||||
| /** | ||||
|  * 客户体征信息Service接口 | ||||
|  * | ||||
|  * @author xzj | ||||
|  * @date 2020-12-31 | ||||
|  */ | ||||
| public interface ISysCustomerPhysicalSignsService { | ||||
|     /** | ||||
|      * 查询客户体征信息 | ||||
|      * | ||||
|      * @param id 客户体征信息ID | ||||
|      * @return 客户体征信息 | ||||
|      */ | ||||
|     public SysCustomerPhysicalSigns selectSysCustomerPhysicalSignsById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询客户体征信息列表 | ||||
|      * | ||||
|      * @param sysCustomerPhysicalSigns 客户体征信息 | ||||
|      * @return 客户体征信息集合 | ||||
|      */ | ||||
|     public List<SysCustomerPhysicalSigns> selectSysCustomerPhysicalSignsList(SysCustomerPhysicalSigns sysCustomerPhysicalSigns); | ||||
|  | ||||
|     /** | ||||
|      * 新增客户体征信息 | ||||
|      * | ||||
|      * @param sysCustomerPhysicalSigns 客户体征信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysCustomerPhysicalSigns(SysCustomerPhysicalSigns sysCustomerPhysicalSigns); | ||||
|  | ||||
|     /** | ||||
|      * 修改客户体征信息 | ||||
|      * | ||||
|      * @param sysCustomerPhysicalSigns 客户体征信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysCustomerPhysicalSigns(SysCustomerPhysicalSigns sysCustomerPhysicalSigns); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除客户体征信息 | ||||
|      * | ||||
|      * @param ids 需要删除的客户体征信息ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerPhysicalSignsByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除客户体征信息信息 | ||||
|      * | ||||
|      * @param id 客户体征信息ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerPhysicalSignsById(Long id); | ||||
| } | ||||
| @@ -0,0 +1,96 @@ | ||||
| package com.stdiet.custom.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysCustomer; | ||||
| import com.stdiet.custom.dto.request.CustomerInvestigateRequest; | ||||
|  | ||||
| /** | ||||
|  * 客户信息Service接口 | ||||
|  * | ||||
|  * @author xzj | ||||
|  * @date 2020-12-31 | ||||
|  */ | ||||
| public interface ISysCustomerService | ||||
| { | ||||
|     /** | ||||
|      * 查询客户信息 | ||||
|      * | ||||
|      * @param id 客户信息ID | ||||
|      * @return 客户信息 | ||||
|      */ | ||||
|     public SysCustomer selectSysCustomerById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询客户信息列表 | ||||
|      * | ||||
|      * @param sysCustomer 客户信息 | ||||
|      * @return 客户信息集合 | ||||
|      */ | ||||
|     public List<SysCustomer> selectSysCustomerList(SysCustomer sysCustomer); | ||||
|  | ||||
|     /** | ||||
|      * 新增客户信息 | ||||
|      * | ||||
|      * @param sysCustomer 客户信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysCustomer(SysCustomer sysCustomer); | ||||
|  | ||||
|     /** | ||||
|      * 修改客户信息 | ||||
|      * | ||||
|      * @param sysCustomer 客户信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysCustomer(SysCustomer sysCustomer); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除客户信息 | ||||
|      * | ||||
|      * @param ids 需要删除的客户信息ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除客户信息信息 | ||||
|      * | ||||
|      * @param id 客户信息ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 根据手机号查询 | ||||
|      * | ||||
|      * @param phone 手机号 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     SysCustomer getCustomerByPhone(String phone); | ||||
|  | ||||
|     /** | ||||
|      * 客户建档资料填写 | ||||
|      * | ||||
|      * @param customerInvestigateRequest 客户建档相关资料 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     int addOrupdateCustomerAndSign( CustomerInvestigateRequest customerInvestigateRequest) throws Exception; | ||||
|  | ||||
|     /** | ||||
|      *  查询客户基础信息以及体征信息列表 | ||||
|      * | ||||
|      * @param sysCustomer 查询条件 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     List<SysCustomer> selectSysCustomerAndSignList(SysCustomer sysCustomer); | ||||
|  | ||||
|     /** | ||||
|      *  根据id查询客户信息(基础信息以及体征信息) | ||||
|      * | ||||
|      * @param id 客户id | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     SysCustomer getCustomerAndSignById(Long id); | ||||
|  | ||||
|     int delCustomerAndSignById(Long[] ids); | ||||
| } | ||||
| @@ -0,0 +1,96 @@ | ||||
| package com.stdiet.custom.service.impl; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.common.utils.DateUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.stdiet.custom.mapper.SysCustomerPhysicalSignsMapper; | ||||
| import com.stdiet.custom.domain.SysCustomerPhysicalSigns; | ||||
| import com.stdiet.custom.service.ISysCustomerPhysicalSignsService; | ||||
|  | ||||
| /** | ||||
|  * 客户体征信息Service业务层处理 | ||||
|  * | ||||
|  * @author xzj | ||||
|  * @date 2020-12-31 | ||||
|  */ | ||||
| @Service | ||||
| public class SysCustomerPhysicalSignsServiceImpl implements ISysCustomerPhysicalSignsService | ||||
| { | ||||
|     @Autowired | ||||
|     private SysCustomerPhysicalSignsMapper sysCustomerPhysicalSignsMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询客户体征信息 | ||||
|      * | ||||
|      * @param id 客户体征信息ID | ||||
|      * @return 客户体征信息 | ||||
|      */ | ||||
|     @Override | ||||
|     public SysCustomerPhysicalSigns selectSysCustomerPhysicalSignsById(Long id) | ||||
|     { | ||||
|         return sysCustomerPhysicalSignsMapper.selectSysCustomerPhysicalSignsById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询客户体征信息列表 | ||||
|      * | ||||
|      * @param sysCustomerPhysicalSigns 客户体征信息 | ||||
|      * @return 客户体征信息 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SysCustomerPhysicalSigns> selectSysCustomerPhysicalSignsList(SysCustomerPhysicalSigns sysCustomerPhysicalSigns) | ||||
|     { | ||||
|         return sysCustomerPhysicalSignsMapper.selectSysCustomerPhysicalSignsList(sysCustomerPhysicalSigns); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增客户体征信息 | ||||
|      * | ||||
|      * @param sysCustomerPhysicalSigns 客户体征信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSysCustomerPhysicalSigns(SysCustomerPhysicalSigns sysCustomerPhysicalSigns) | ||||
|     { | ||||
|         sysCustomerPhysicalSigns.setCreateTime(DateUtils.getNowDate()); | ||||
|         return sysCustomerPhysicalSignsMapper.insertSysCustomerPhysicalSigns(sysCustomerPhysicalSigns); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改客户体征信息 | ||||
|      * | ||||
|      * @param sysCustomerPhysicalSigns 客户体征信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSysCustomerPhysicalSigns(SysCustomerPhysicalSigns sysCustomerPhysicalSigns) | ||||
|     { | ||||
|         sysCustomerPhysicalSigns.setUpdateTime(DateUtils.getNowDate()); | ||||
|         return sysCustomerPhysicalSignsMapper.updateSysCustomerPhysicalSigns(sysCustomerPhysicalSigns); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除客户体征信息 | ||||
|      * | ||||
|      * @param ids 需要删除的客户体征信息ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysCustomerPhysicalSignsByIds(Long[] ids) | ||||
|     { | ||||
|         return sysCustomerPhysicalSignsMapper.deleteSysCustomerPhysicalSignsByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除客户体征信息信息 | ||||
|      * | ||||
|      * @param id 客户体征信息ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysCustomerPhysicalSignsById(Long id) | ||||
|     { | ||||
|         return sysCustomerPhysicalSignsMapper.deleteSysCustomerPhysicalSignsById(id); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,181 @@ | ||||
| package com.stdiet.custom.service.impl; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import com.stdiet.common.core.domain.model.LoginUser; | ||||
| import com.stdiet.common.utils.DateUtils; | ||||
| import com.stdiet.common.utils.SecurityUtils; | ||||
| import com.stdiet.common.utils.bean.ObjectUtils; | ||||
| import com.stdiet.custom.domain.SysCustomerPhysicalSigns; | ||||
| import com.stdiet.custom.dto.request.CustomerInvestigateRequest; | ||||
| import com.stdiet.custom.mapper.SysCustomerPhysicalSignsMapper; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.stdiet.custom.mapper.SysCustomerMapper; | ||||
| import com.stdiet.custom.domain.SysCustomer; | ||||
| import com.stdiet.custom.service.ISysCustomerService; | ||||
| import org.springframework.transaction.annotation.Transactional; | ||||
|  | ||||
| /** | ||||
|  * 客户信息Service业务层处理 | ||||
|  * | ||||
|  * @author xzj | ||||
|  * @date 2020-12-31 | ||||
|  */ | ||||
| @Service | ||||
| @Transactional | ||||
| public class SysCustomerServiceImpl implements ISysCustomerService | ||||
| { | ||||
|     @Autowired | ||||
|     private SysCustomerMapper sysCustomerMapper; | ||||
|  | ||||
|     @Autowired | ||||
|     private SysCustomerPhysicalSignsMapper sysCustomerPhysicalSignsMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询客户信息 | ||||
|      * | ||||
|      * @param id 客户信息ID | ||||
|      * @return 客户信息 | ||||
|      */ | ||||
|     @Override | ||||
|     public SysCustomer selectSysCustomerById(Long id) | ||||
|     { | ||||
|         return sysCustomerMapper.selectSysCustomerById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询客户信息列表 | ||||
|      * | ||||
|      * @param sysCustomer 客户信息 | ||||
|      * @return 客户信息 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SysCustomer> selectSysCustomerList(SysCustomer sysCustomer) | ||||
|     { | ||||
|         return sysCustomerMapper.selectSysCustomerList(sysCustomer); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增客户信息 | ||||
|      * | ||||
|      * @param sysCustomer 客户信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSysCustomer(SysCustomer sysCustomer) | ||||
|     { | ||||
|         sysCustomer.setCreateTime(DateUtils.getNowDate()); | ||||
|         return sysCustomerMapper.insertSysCustomer(sysCustomer); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改客户信息 | ||||
|      * | ||||
|      * @param sysCustomer 客户信息 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSysCustomer(SysCustomer sysCustomer) | ||||
|     { | ||||
|         sysCustomer.setUpdateTime(DateUtils.getNowDate()); | ||||
|         return sysCustomerMapper.updateSysCustomer(sysCustomer); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除客户信息 | ||||
|      * | ||||
|      * @param ids 需要删除的客户信息ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysCustomerByIds(Long[] ids) | ||||
|     { | ||||
|         return sysCustomerMapper.deleteSysCustomerByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除客户信息信息 | ||||
|      * | ||||
|      * @param id 客户信息ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysCustomerById(Long id) | ||||
|     { | ||||
|         return sysCustomerMapper.deleteSysCustomerById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 根据手机号查询 | ||||
|      * | ||||
|      * @param phone 手机号 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public SysCustomer getCustomerByPhone(String phone){ | ||||
|         return sysCustomerMapper.getCustomerByPhone(phone); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 客户建档资料填写 | ||||
|      * | ||||
|      * @param customerInvestigateRequest 客户建档相关资料 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int addOrupdateCustomerAndSign(CustomerInvestigateRequest customerInvestigateRequest) throws Exception{ | ||||
|         //当前登录用户 | ||||
|         //LoginUser loginUser = SecurityUtils.getLoginUser(); | ||||
|         SysCustomer sysCustomer  = new SysCustomer(); | ||||
|         sysCustomer.setId(customerInvestigateRequest.getId()); | ||||
|         sysCustomer.setName(customerInvestigateRequest.getName()); | ||||
|         sysCustomer.setPhone(customerInvestigateRequest.getPhone()); | ||||
|         //添加人、更新人 | ||||
|         /*if(loginUser != null){ | ||||
|             if(customerInvestigateRequest.getId() == null){ | ||||
|                 sysCustomer.setCreateBy(loginUser.getUser().getUserId()+""); | ||||
|             }else{ | ||||
|                 sysCustomer.setUpdateBy(loginUser.getUser().getUserId()+""); | ||||
|             } | ||||
|         }*/ | ||||
|         //sysCustomer.setEmail(customerInvestigateRequest.getEmail()); | ||||
|         //sysCustomer.setAddress(customerInvestigateRequest.getAddress()); | ||||
|         int addOrUpdateRow = customerInvestigateRequest.getId() == null ? insertSysCustomer(sysCustomer) : updateSysCustomer(sysCustomer); | ||||
|         if(addOrUpdateRow > 0){ | ||||
|             SysCustomerPhysicalSigns customerSigns = ObjectUtils.getObjectByObject(customerInvestigateRequest, SysCustomerPhysicalSigns.class); | ||||
|             customerSigns.setCustomerId(sysCustomer.getId()); | ||||
|             customerSigns.setId(null); | ||||
|             addOrUpdateRow = customerInvestigateRequest.getId() == null ? sysCustomerPhysicalSignsMapper.insertSysCustomerPhysicalSigns(customerSigns) : sysCustomerPhysicalSignsMapper.updateSysCustomerPhysicalSignsByCustomerId(customerSigns); | ||||
|         } | ||||
|         return addOrUpdateRow; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      *  查询客户基础信息以及体征信息列表 | ||||
|      * | ||||
|      * @param sysCustomer 查询条件 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public List<SysCustomer> selectSysCustomerAndSignList(SysCustomer sysCustomer){ | ||||
|         return sysCustomerMapper.selectSysCustomerAndSignList(sysCustomer); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      *  根据id查询客户信息(基础信息以及体征信息) | ||||
|      * | ||||
|      * @param id 客户id | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public SysCustomer getCustomerAndSignById(Long id){ | ||||
|         SysCustomer sysCustomer = new SysCustomer(); | ||||
|         sysCustomer.setId(id); | ||||
|         List<SysCustomer> list = sysCustomerMapper.selectSysCustomerAndSignList(sysCustomer); | ||||
|         return list.size() > 0 ? list.get(0) : null; | ||||
|     } | ||||
|  | ||||
|     public int delCustomerAndSignById(Long[] ids){ | ||||
|         if(deleteSysCustomerByIds(ids) > 0){ | ||||
|             return sysCustomerPhysicalSignsMapper.deleteSysCustomerPhysicalSignsByCustomerIds(ids); | ||||
|         } | ||||
|         return 0; | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user