package com.bonus.core.nutrition.common.vo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.bonus.core.common.encrypt.HandleType;
import com.bonus.core.common.encrypt.LeNiuDecryptDataProcess;
import com.bonus.core.common.encrypt.LeNiuDecryptField;
import com.bonus.core.common.utils.SysUtil;
import com.bonus.core.customer.constants.CustAgeEnum;
import com.bonus.core.nutrition.common.enums.ActivityLevelEnum;
import com.bonus.core.nutrition.common.enums.DoctorAdviceEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.time.LocalDate;

@LeNiuDecryptDataProcess
@ApiModel("健康信息分页返回数据")
public class HealthInfoSimpleVo {
   @ApiModelProperty("人员id")
   @ExcelIgnore
   private Long custId;
   @ApiModelProperty("人员编号")
   @ExcelIgnore
   private String custNum;
   @ApiModelProperty("人员名称")
   @ExcelProperty(
      value = {"用户姓名"},
      order = 0
   )
   @LeNiuDecryptField
   private String custName;
   @ApiModelProperty("所属组织")
   @ExcelIgnore
   private String orgFullName;
   @ApiModelProperty("位置信息")
   @ExcelProperty(
      value = {"位置信息"},
      order = 2
   )
   private String placeFullName;
   @ApiModelProperty("手机号")
   @LeNiuDecryptField(HandleType.DESENSITIZE_MOBILE_PHONE)
   @ExcelProperty(
      value = {"用户手机号"},
      order = 1
   )
   private String mobile;
   @ApiModelProperty("人员头像")
   @ExcelIgnore
   private String custPhotoUrl;
   @ApiModelProperty("年龄")
   @ExcelIgnore
   private Integer age;
   @ApiModelProperty("性别")
   @ExcelIgnore
   private Integer sex;
   @ApiModelProperty("生日")
   @ExcelIgnore
   private LocalDate birthday;
   @ApiModelProperty("身高")
   @ExcelIgnore
   private BigDecimal height;
   @ApiModelProperty("体重")
   @ExcelIgnore
   private BigDecimal weight;
   @ApiModelProperty("BMI指数")
   @ExcelIgnore
   private BigDecimal bmi;
   @ApiModelProperty("慢性病id多个用逗号分割")
   @ExcelIgnore
   private String chronicIds;
   @ApiModelProperty("就诊号")
   @ExcelProperty(
      value = {"就诊号"},
      order = 4
   )
   private String doctorNum;
   @ApiModelProperty("住院号")
   @ExcelProperty(
      value = {"住院号"},
      order = 5
   )
   private String hospitalNum;
   @ApiModelProperty("住院日期")
   @ExcelProperty(
      value = {"住院日期"},
      order = 6
   )
   private LocalDate inpatientDate;
   @ApiModelProperty("慢性病名称多个用逗号分割")
   @ExcelProperty(
      value = {"慢性病"},
      order = 7
   )
   private String chronicNames;
   @ApiModelProperty("饮食医嘱: 1-禁食,2-流食,3-半流食,4-治疗饮食")
   @ExcelProperty(
      value = {"饮食医嘱"},
      order = 3,
      converter = DoctorAdviceEnum.ExcelConvertor.class
   )
   private Integer doctorAdvice;
   @ApiModelProperty("过敏源")
   @ExcelIgnore
   private String allergen;
   @ApiModelProperty("劳动强度:劳动强度: 1-轻劳动,2-中等强度劳动,3-重强度劳动")
   @ExcelProperty(
      value = {"劳动强度"},
      order = 8,
      converter = ActivityLevelEnum.ExcelConvertor.class
   )
   private Integer labourIntensity;
   @ApiModelProperty("怀孕状态 0-保密, 1-未怀孕, 2-孕妇(早期),3-孕妇(中期),4-孕妇(晚期) 5-乳母")
   @ExcelIgnore
   private Integer pregnantStatus;

   public String getCustPhotoUrl() {
      return SysUtil.getCutFileUrl(this.custPhotoUrl);
   }

   public void setCustPhotoUrl(String custPhotoUrl) {
      this.custPhotoUrl = SysUtil.getCutFileUrl(custPhotoUrl);
   }

   public LocalDate getBirthday() {
      return this.birthday;
   }

   public void setBirthday(LocalDate birthday) {
      this.birthday = birthday;
      this.age = CustAgeEnum.getAge(birthday);
   }

   public Long getCustId() {
      return this.custId;
   }

   public String getCustNum() {
      return this.custNum;
   }

   public String getCustName() {
      return this.custName;
   }

   public String getOrgFullName() {
      return this.orgFullName;
   }

   public String getPlaceFullName() {
      return this.placeFullName;
   }

   public String getMobile() {
      return this.mobile;
   }

   public Integer getAge() {
      return this.age;
   }

   public Integer getSex() {
      return this.sex;
   }

   public BigDecimal getHeight() {
      return this.height;
   }

   public BigDecimal getWeight() {
      return this.weight;
   }

   public BigDecimal getBmi() {
      return this.bmi;
   }

   public String getChronicIds() {
      return this.chronicIds;
   }

   public String getDoctorNum() {
      return this.doctorNum;
   }

   public String getHospitalNum() {
      return this.hospitalNum;
   }

   public LocalDate getInpatientDate() {
      return this.inpatientDate;
   }

   public String getChronicNames() {
      return this.chronicNames;
   }

   public Integer getDoctorAdvice() {
      return this.doctorAdvice;
   }

   public String getAllergen() {
      return this.allergen;
   }

   public Integer getLabourIntensity() {
      return this.labourIntensity;
   }

   public Integer getPregnantStatus() {
      return this.pregnantStatus;
   }

   public void setCustId(final Long custId) {
      this.custId = custId;
   }

   public void setCustNum(final String custNum) {
      this.custNum = custNum;
   }

   public void setCustName(final String custName) {
      this.custName = custName;
   }

   public void setOrgFullName(final String orgFullName) {
      this.orgFullName = orgFullName;
   }

   public void setPlaceFullName(final String placeFullName) {
      this.placeFullName = placeFullName;
   }

   public void setMobile(final String mobile) {
      this.mobile = mobile;
   }

   public void setAge(final Integer age) {
      this.age = age;
   }

   public void setSex(final Integer sex) {
      this.sex = sex;
   }

   public void setHeight(final BigDecimal height) {
      this.height = height;
   }

   public void setWeight(final BigDecimal weight) {
      this.weight = weight;
   }

   public void setBmi(final BigDecimal bmi) {
      this.bmi = bmi;
   }

   public void setChronicIds(final String chronicIds) {
      this.chronicIds = chronicIds;
   }

   public void setDoctorNum(final String doctorNum) {
      this.doctorNum = doctorNum;
   }

   public void setHospitalNum(final String hospitalNum) {
      this.hospitalNum = hospitalNum;
   }

   public void setInpatientDate(final LocalDate inpatientDate) {
      this.inpatientDate = inpatientDate;
   }

   public void setChronicNames(final String chronicNames) {
      this.chronicNames = chronicNames;
   }

   public void setDoctorAdvice(final Integer doctorAdvice) {
      this.doctorAdvice = doctorAdvice;
   }

   public void setAllergen(final String allergen) {
      this.allergen = allergen;
   }

   public void setLabourIntensity(final Integer labourIntensity) {
      this.labourIntensity = labourIntensity;
   }

   public void setPregnantStatus(final Integer pregnantStatus) {
      this.pregnantStatus = pregnantStatus;
   }

   @Override
   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof HealthInfoSimpleVo)) {
         return false;
      } else {
         HealthInfoSimpleVo other = (HealthInfoSimpleVo)o;
         if (!other.canEqual(this)) {
            return false;
         } else {
            Object this$custId = this.getCustId();
            Object other$custId = other.getCustId();
            if (this$custId == null) {
               if (other$custId != null) {
                  return false;
               }
            } else if (!this$custId.equals(other$custId)) {
               return false;
            }

            Object this$age = this.getAge();
            Object other$age = other.getAge();
            if (this$age == null) {
               if (other$age != null) {
                  return false;
               }
            } else if (!this$age.equals(other$age)) {
               return false;
            }

            Object this$sex = this.getSex();
            Object other$sex = other.getSex();
            if (this$sex == null) {
               if (other$sex != null) {
                  return false;
               }
            } else if (!this$sex.equals(other$sex)) {
               return false;
            }

            label254: {
               Object this$doctorAdvice = this.getDoctorAdvice();
               Object other$doctorAdvice = other.getDoctorAdvice();
               if (this$doctorAdvice == null) {
                  if (other$doctorAdvice == null) {
                     break label254;
                  }
               } else if (this$doctorAdvice.equals(other$doctorAdvice)) {
                  break label254;
               }

               return false;
            }

            label247: {
               Object this$labourIntensity = this.getLabourIntensity();
               Object other$labourIntensity = other.getLabourIntensity();
               if (this$labourIntensity == null) {
                  if (other$labourIntensity == null) {
                     break label247;
                  }
               } else if (this$labourIntensity.equals(other$labourIntensity)) {
                  break label247;
               }

               return false;
            }

            Object this$pregnantStatus = this.getPregnantStatus();
            Object other$pregnantStatus = other.getPregnantStatus();
            if (this$pregnantStatus == null) {
               if (other$pregnantStatus != null) {
                  return false;
               }
            } else if (!this$pregnantStatus.equals(other$pregnantStatus)) {
               return false;
            }

            label233: {
               Object this$custNum = this.getCustNum();
               Object other$custNum = other.getCustNum();
               if (this$custNum == null) {
                  if (other$custNum == null) {
                     break label233;
                  }
               } else if (this$custNum.equals(other$custNum)) {
                  break label233;
               }

               return false;
            }

            label226: {
               Object this$custName = this.getCustName();
               Object other$custName = other.getCustName();
               if (this$custName == null) {
                  if (other$custName == null) {
                     break label226;
                  }
               } else if (this$custName.equals(other$custName)) {
                  break label226;
               }

               return false;
            }

            Object this$orgFullName = this.getOrgFullName();
            Object other$orgFullName = other.getOrgFullName();
            if (this$orgFullName == null) {
               if (other$orgFullName != null) {
                  return false;
               }
            } else if (!this$orgFullName.equals(other$orgFullName)) {
               return false;
            }

            Object this$placeFullName = this.getPlaceFullName();
            Object other$placeFullName = other.getPlaceFullName();
            if (this$placeFullName == null) {
               if (other$placeFullName != null) {
                  return false;
               }
            } else if (!this$placeFullName.equals(other$placeFullName)) {
               return false;
            }

            label205: {
               Object this$mobile = this.getMobile();
               Object other$mobile = other.getMobile();
               if (this$mobile == null) {
                  if (other$mobile == null) {
                     break label205;
                  }
               } else if (this$mobile.equals(other$mobile)) {
                  break label205;
               }

               return false;
            }

            label198: {
               Object this$custPhotoUrl = this.getCustPhotoUrl();
               Object other$custPhotoUrl = other.getCustPhotoUrl();
               if (this$custPhotoUrl == null) {
                  if (other$custPhotoUrl == null) {
                     break label198;
                  }
               } else if (this$custPhotoUrl.equals(other$custPhotoUrl)) {
                  break label198;
               }

               return false;
            }

            Object this$birthday = this.getBirthday();
            Object other$birthday = other.getBirthday();
            if (this$birthday == null) {
               if (other$birthday != null) {
                  return false;
               }
            } else if (!this$birthday.equals(other$birthday)) {
               return false;
            }

            label184: {
               Object this$height = this.getHeight();
               Object other$height = other.getHeight();
               if (this$height == null) {
                  if (other$height == null) {
                     break label184;
                  }
               } else if (this$height.equals(other$height)) {
                  break label184;
               }

               return false;
            }

            Object this$weight = this.getWeight();
            Object other$weight = other.getWeight();
            if (this$weight == null) {
               if (other$weight != null) {
                  return false;
               }
            } else if (!this$weight.equals(other$weight)) {
               return false;
            }

            label170: {
               Object this$bmi = this.getBmi();
               Object other$bmi = other.getBmi();
               if (this$bmi == null) {
                  if (other$bmi == null) {
                     break label170;
                  }
               } else if (this$bmi.equals(other$bmi)) {
                  break label170;
               }

               return false;
            }

            Object this$chronicIds = this.getChronicIds();
            Object other$chronicIds = other.getChronicIds();
            if (this$chronicIds == null) {
               if (other$chronicIds != null) {
                  return false;
               }
            } else if (!this$chronicIds.equals(other$chronicIds)) {
               return false;
            }

            Object this$doctorNum = this.getDoctorNum();
            Object other$doctorNum = other.getDoctorNum();
            if (this$doctorNum == null) {
               if (other$doctorNum != null) {
                  return false;
               }
            } else if (!this$doctorNum.equals(other$doctorNum)) {
               return false;
            }

            Object this$hospitalNum = this.getHospitalNum();
            Object other$hospitalNum = other.getHospitalNum();
            if (this$hospitalNum == null) {
               if (other$hospitalNum != null) {
                  return false;
               }
            } else if (!this$hospitalNum.equals(other$hospitalNum)) {
               return false;
            }

            label142: {
               Object this$inpatientDate = this.getInpatientDate();
               Object other$inpatientDate = other.getInpatientDate();
               if (this$inpatientDate == null) {
                  if (other$inpatientDate == null) {
                     break label142;
                  }
               } else if (this$inpatientDate.equals(other$inpatientDate)) {
                  break label142;
               }

               return false;
            }

            label135: {
               Object this$chronicNames = this.getChronicNames();
               Object other$chronicNames = other.getChronicNames();
               if (this$chronicNames == null) {
                  if (other$chronicNames == null) {
                     break label135;
                  }
               } else if (this$chronicNames.equals(other$chronicNames)) {
                  break label135;
               }

               return false;
            }

            Object this$allergen = this.getAllergen();
            Object other$allergen = other.getAllergen();
            if (this$allergen == null) {
               if (other$allergen != null) {
                  return false;
               }
            } else if (!this$allergen.equals(other$allergen)) {
               return false;
            }

            return true;
         }
      }
   }

   protected boolean canEqual(final Object other) {
      return other instanceof HealthInfoSimpleVo;
   }

   @Override
   public int hashCode() {
      int result = 1;
      Object $custId = this.getCustId();
      result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
      Object $age = this.getAge();
      result = result * 59 + ($age == null ? 43 : $age.hashCode());
      Object $sex = this.getSex();
      result = result * 59 + ($sex == null ? 43 : $sex.hashCode());
      Object $doctorAdvice = this.getDoctorAdvice();
      result = result * 59 + ($doctorAdvice == null ? 43 : $doctorAdvice.hashCode());
      Object $labourIntensity = this.getLabourIntensity();
      result = result * 59 + ($labourIntensity == null ? 43 : $labourIntensity.hashCode());
      Object $pregnantStatus = this.getPregnantStatus();
      result = result * 59 + ($pregnantStatus == null ? 43 : $pregnantStatus.hashCode());
      Object $custNum = this.getCustNum();
      result = result * 59 + ($custNum == null ? 43 : $custNum.hashCode());
      Object $custName = this.getCustName();
      result = result * 59 + ($custName == null ? 43 : $custName.hashCode());
      Object $orgFullName = this.getOrgFullName();
      result = result * 59 + ($orgFullName == null ? 43 : $orgFullName.hashCode());
      Object $placeFullName = this.getPlaceFullName();
      result = result * 59 + ($placeFullName == null ? 43 : $placeFullName.hashCode());
      Object $mobile = this.getMobile();
      result = result * 59 + ($mobile == null ? 43 : $mobile.hashCode());
      Object $custPhotoUrl = this.getCustPhotoUrl();
      result = result * 59 + ($custPhotoUrl == null ? 43 : $custPhotoUrl.hashCode());
      Object $birthday = this.getBirthday();
      result = result * 59 + ($birthday == null ? 43 : $birthday.hashCode());
      Object $height = this.getHeight();
      result = result * 59 + ($height == null ? 43 : $height.hashCode());
      Object $weight = this.getWeight();
      result = result * 59 + ($weight == null ? 43 : $weight.hashCode());
      Object $bmi = this.getBmi();
      result = result * 59 + ($bmi == null ? 43 : $bmi.hashCode());
      Object $chronicIds = this.getChronicIds();
      result = result * 59 + ($chronicIds == null ? 43 : $chronicIds.hashCode());
      Object $doctorNum = this.getDoctorNum();
      result = result * 59 + ($doctorNum == null ? 43 : $doctorNum.hashCode());
      Object $hospitalNum = this.getHospitalNum();
      result = result * 59 + ($hospitalNum == null ? 43 : $hospitalNum.hashCode());
      Object $inpatientDate = this.getInpatientDate();
      result = result * 59 + ($inpatientDate == null ? 43 : $inpatientDate.hashCode());
      Object $chronicNames = this.getChronicNames();
      result = result * 59 + ($chronicNames == null ? 43 : $chronicNames.hashCode());
      Object $allergen = this.getAllergen();
      result = result * 59 + ($allergen == null ? 43 : $allergen.hashCode());
      return result;
   }

   @Override
   public String toString() {
      Long var10000 = this.getCustId();
      return "HealthInfoSimpleVo(custId=" + var10000 + ", custNum=" + this.getCustNum() + ", custName=" + this.getCustName() + ", orgFullName=" + this.getOrgFullName() + ", placeFullName=" + this.getPlaceFullName() + ", mobile=" + this.getMobile() + ", custPhotoUrl=" + this.getCustPhotoUrl() + ", age=" + this.getAge() + ", sex=" + this.getSex() + ", birthday=" + String.valueOf(this.getBirthday()) + ", height=" + String.valueOf(this.getHeight()) + ", weight=" + String.valueOf(this.getWeight()) + ", bmi=" + String.valueOf(this.getBmi()) + ", chronicIds=" + this.getChronicIds() + ", doctorNum=" + this.getDoctorNum() + ", hospitalNum=" + this.getHospitalNum() + ", inpatientDate=" + String.valueOf(this.getInpatientDate()) + ", chronicNames=" + this.getChronicNames() + ", doctorAdvice=" + this.getDoctorAdvice() + ", allergen=" + this.getAllergen() + ", labourIntensity=" + this.getLabourIntensity() + ", pregnantStatus=" + this.getPregnantStatus() + ")";
   }
}
