package com.jeeplus.modules.sg.managementcenter.materialinfo.entity;

import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.core.persistence.DataEntity;

import java.util.Objects;

public class MaterialInfo extends DataEntity<MaterialInfo> {
    private String[] projectNames;//项目名称（多个）
    private String projectName;            //项目名称
    private String materialCode;           //物料编码
    private String materialName;         //物料名称
    private String extendDescription;    //扩展描述
    private String unit;              //单位
    private Double totalCount;      //总量
    private Double weightKg;        //单重/kg
    private Double weightTon;      //总重/吨
    private String supplyType;   //甲乙供
    //搜索条件
    private String reserveCode;//储备编码
    private String projectCode;//项目编码
    private String projectDefine;//项目定义
    private String note;      //备注
    private String state;     //状态，与标准比对，1：相同 0：不相同

    public String[] getProjectNames() {
        return projectNames;
    }

    public void setProjectNames(String[] projectNames) {
        this.projectNames = projectNames;
    }

    public String getReserveCode() {
        return reserveCode;
    }

    public void setReserveCode(String reserveCode) {
        this.reserveCode = reserveCode;
    }

    public String getProjectCode() {
        return projectCode;
    }

    public void setProjectCode(String projectCode) {
        this.projectCode = projectCode;
    }

    public String getProjectDefine() {
        return projectDefine;
    }

    public void setProjectDefine(String projectDefine) {
        this.projectDefine = projectDefine;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

//    @ExcelField(title="储备项目名称", align=2, sort=1)
    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    @ExcelField(title="物料编码", align=2, sort=1)
    public String getMaterialCode() {
        return materialCode;
    }

    public void setMaterialCode(String materialCode) {
        this.materialCode = materialCode;
    }

    @ExcelField(title="物料名称", align=2, sort=2)
    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    @ExcelField(title="扩展描述", align=2, sort=3)
    public String getExtendDescription() {
        return extendDescription;
    }

    public void setExtendDescription(String extendDescription) {
        this.extendDescription = extendDescription;
    }

    @ExcelField(title="单位", align=2, sort=4)
    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    @ExcelField(title="总量", align=2, sort=5)
    public Double getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Double totalCount) {
        this.totalCount = totalCount;
    }

    @ExcelField(title="单重/kg", align=2, sort=6)
    public Double getWeightKg() {
        return weightKg;
    }

    public void setWeightKg(Double weightKg) {
        this.weightKg = weightKg;
    }

    @ExcelField(title="总重/吨", align=2, sort=7)
    public Double getWeightTon() {
        return weightTon;
    }

    public void setWeightTon(Double weightTon) {
        this.weightTon = weightTon;
    }

    @ExcelField(title="甲乙供", align=2, sort=8)
    public String getSupplyType() {
        return supplyType;
    }

    public void setSupplyType(String supplyType) {
        this.supplyType = supplyType;
    }

    @ExcelField(title="备注", align=2, sort=9)
    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof MaterialInfo)) return false;
        if (!super.equals(o)) return false;
        MaterialInfo that = (MaterialInfo) o;
        return Objects.equals(materialCode, that.materialCode) &&
                Objects.equals(materialName, that.materialName) &&
                Objects.equals(extendDescription, that.extendDescription) &&
                Objects.equals(note, that.note);
    }

    @Override
    public int hashCode() {

        return Objects.hash(materialCode, materialName, extendDescription, note);
    }
}
