package abacus.springboot.example.dao;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.Version;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import io.swagger.v3.oas.annotations.media.Schema;

@Entity
@Table(name = "jc_billhg")
@JsonIgnoreProperties(ignoreUnknown = true) 
@Schema(description = "回购单主单")
public class JcBillHg implements Serializable {

	private static final long serialVersionUID = -4735685141695682399L;

	/**唯一标识：订单号*/
	@Id
	@Schema(description="回购单单号", required=true, example="HG202411180001")
	private String id;
	
	@Version
	@Schema(description = "版本号", required = true, example = "1")
	private Integer version = 1;

	@Schema(description = "稽查单号", required = true, example = "")
	private String billid;
	
	@Schema(description = "状态", required = true, pattern="-1：作废，1：待提交，2：待付款，3：已付款，4：(确认收款转待分仓)待分仓，5：已分仓-待出库，6：已出库", example = "")
	private int status = 1;
	/** 作废*/
	public final static int STATUS_MINUS_ONE = -1;
	/** 待提交 */
	public final static int STATUS_ONE = 1;
	/** 待付款 */
	public final static int STATUS_TWO = 2; 
	/** 已付款 */
	public final static int STATUS_THREE = 3; 
	/** (确认收款转待分仓)待分仓 */
	public final static int STATUS_FOUR = 4; 
	/** 已分仓-待出库 */
	public final static int STATUS_FIVE = 5; 
	/** 已出库 */
	public final static int STATUS_SIX = 6; 
//	/** 回购完成*/
//	public final static int STATUS_SEVEN = 7; 
	
//	@Schema(description = "分仓状态", required = false, example = "")
//	private int fcstatus = 1;
//	public final static int FCSTATUS_ONE = 1;// 待分仓
//	public final static int FCSTATUS_TWO = 2;// 已分仓-待出库
//	public final static int FCSTATUS_THREE = 3;// 已出库
	
	@Schema(description = "订单来源：掌上华致", required = true, example = "")
	private String source;
	
	@Schema(description = "客户编码", required = true, example = "")
	private String account;
	
	@Schema(description = "客户名称", required = true, example = "")
	private String accountname;
	
	@Schema(description = "商品总数量", required = true, example = "")
	private double quantity;
	
	@Schema(description = "商品总金额", required = true, example = "")
	private double subtotal;
	
	@Schema(description = "运费", required = true, example = "")
	private double freight;
	
	@Schema(description = "运营经理编码", required = true, example = "")
	private String manager;
	
	@Schema(description = "运营经理名称", required = true, example = "")
	private String managername;
	
	@Schema(description = "收货人姓名", required = true, example = "")
	private String consignee;
	
	@Schema(description = "收货人电话", required = true, example = "")
	private String consigneephone;
	
	@Schema(description = "省", required = true, example = "")
	private String province;
	
	@Schema(description = "省", required = true, example = "")
	private String provincename;
	
	@Schema(description = "市", required = true, example = "")
	private String city;
	
	@Schema(description = "市", required = true, example = "")
	private String cityname;
	
	@Schema(description = "区", required = true, example = "")
	private String area;
	
	@Schema(description = "区", required = true, example = "")
	private String areaname;
	
	@Schema(description = "详细地址", required = true, example = "")
	private String address;
	
	@Schema(description = "收货方式", pattern = "0:送货上门1:仓库自提2:货站自提3:空运自提", required = true, example = "")
	private String receiveway;
	/** 送货上门 */
	public final static String RECEIVEWAY_ZERO = "0"; 
	/** 仓库自提 */
	public final static String RECEIVEWAY_ONE = "1";
	/** 货站自提 */
	public final static String RECEIVEWAY_TWO = "2"; 
	/** 空运自提 */
	public final static String RECEIVEWAY_THREE = "3"; 
	
	
	@Schema(description = "订单备注", required = true, example = "")
	private String remark;
	
	@Schema(description = "运营备注", required = true, example = "")
	private String remark1;
	
	@Schema(description = "分销区域编码", required = true, example = "")
	private String salearea;
	
	@Schema(description = "分销区域名称", required = true, example = "")
	private String saleareaname;
	
	@Schema(description = "业务组编码", required = true, example = "")
	private String groupid;
	
	@Schema(description = "业务组名称", required = true, example = "")
	private String groupname;
	
	@Schema(description = "创建人", required = true, example = "")
	private String found;
	
	@Schema(description = "创建人编码", required = true, example = "")
	private String foundname;
	
	@Schema(description = "创建时间", required = true, example = "")
	private Date founddt;
	
	@Schema(description = "提交人编码", required = true, example = "")
	private String submit;
	
	@Schema(description = "提交人名称", required = true, example = "")
	private String submitname;
	
	@Schema(description = "提交人时间", required = true, example = "")
	private Date submitdt;
	
	@Schema(description = "审核人编码", required = true, example = "")
	private String audit;
	
	@Schema(description = "审核人名称", required = true, example = "")
	private String auditname;
	
	@Schema(description = "审核人时间", required = true, example = "")
	private Date auditdt;
	
	@Schema(description = "分货仓库编码", required = true, example = "")
	private String fhwarehouse;
	
	@Schema(description = "分货仓库名称", required = true, example = "")
	private String fhwarehousename;
	
	@Schema(description = "物流公司名称", required = true, example = "")
	private String logisticsname;
	
	@Schema(description = "物流公司代码", required = true, example = "")
	private String logisticscode;
	
	@Schema(description = "物流方式", required = true, example = "")
	private String logisticstype;
	
	@Schema(description = "物流单号", required = true, example = "")
	private String logisticsno;
	
	@Schema(description = "旺店通单号", required = true, example = "")
	private String wdtorder;
	
	@Schema(description = "旺店通出库单号", required = true, example = "")
	private String wdtbillout;
	
	@Schema(description = "旺店通出库状态", required = true, example = "")
	private String wdtbillouttyp;
	
	@Schema(description = "旺店通出库时间", required = true, example = "")
	private Date wdtoutdt;
	
	@Schema(description = "旺店通入库时间", required = true, example = "")
	private Date wdtindt;
	
	@Schema(description = "传输旺店通时间", required = true, example = "")
	private Date wdtdt;
	
	@Schema(description = "回款客户名称", required = true, example = "")
	private String proofaccountname;
	
	@Schema(description = "凭证上传时间", required = true, example = "")
	private Date proofdt;
	
	@Schema(description = "时间戳", required = true, example = "")
	private Date dt = new Date();

	// 合计金额=商品总金额+运费
	@Transient
	private double amount;
	
	// 稽查单状态
	@Transient
	private int jcstatus;
	
//	public int getFcstatus() {
//		return fcstatus;
//	}
//
//	public void setFcstatus(int fcstatus) {
//		this.fcstatus = fcstatus;
//	}

	public double getAmount() {
		return amount;
	}

	public int getJcstatus() {
		return jcstatus;
	}

	public void setJcstatus(int jcstatus) {
		this.jcstatus = jcstatus;
	}

	public Date getWdtoutdt() {
		return wdtoutdt;
	}

	public void setWdtoutdt(Date wdtoutdt) {
		this.wdtoutdt = wdtoutdt;
	}

	public Date getWdtindt() {
		return wdtindt;
	}

	public void setWdtindt(Date wdtindt) {
		this.wdtindt = wdtindt;
	}

	public String getProofaccountname() {
		return proofaccountname;
	}

	public void setProofaccountname(String proofaccountname) {
		this.proofaccountname = proofaccountname;
	}

	public Date getProofdt() {
		return proofdt;
	}

	public void setProofdt(Date proofdt) {
		this.proofdt = proofdt;
	}

	public String getWdtorder() {
		return wdtorder;
	}

	public void setWdtorder(String wdtorder) {
		this.wdtorder = wdtorder;
	}

	public String getWdtbillout() {
		return wdtbillout;
	}

	public void setWdtbillout(String wdtbillout) {
		this.wdtbillout = wdtbillout;
	}

	public String getWdtbillouttyp() {
		return wdtbillouttyp;
	}

	public void setWdtbillouttyp(String wdtbillouttyp) {
		this.wdtbillouttyp = wdtbillouttyp;
	}

	public Date getWdtdt() {
		return wdtdt;
	}

	public void setWdtdt(Date wdtdt) {
		this.wdtdt = wdtdt;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	public String getFhwarehouse() {
		return fhwarehouse;
	}

	public void setFhwarehouse(String fhwarehouse) {
		this.fhwarehouse = fhwarehouse;
	}

	public String getFhwarehousename() {
		return fhwarehousename;
	}

	public void setFhwarehousename(String fhwarehousename) {
		this.fhwarehousename = fhwarehousename;
	}

	public String getLogisticsname() {
		return logisticsname;
	}

	public void setLogisticsname(String logisticsname) {
		this.logisticsname = logisticsname;
	}

	public String getLogisticscode() {
		return logisticscode;
	}

	public void setLogisticscode(String logisticscode) {
		this.logisticscode = logisticscode;
	}

	public String getLogisticstype() {
		return logisticstype;
	}

	public void setLogisticstype(String logisticstype) {
		this.logisticstype = logisticstype;
	}

	public String getLogisticsno() {
		return logisticsno;
	}

	public void setLogisticsno(String logisticsno) {
		this.logisticsno = logisticsno;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public String getBillid() {
		return billid;
	}

	public void setBillid(String billid) {
		this.billid = billid;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getAccountname() {
		return accountname;
	}

	public void setAccountname(String accountname) {
		this.accountname = accountname;
	}

	public double getQuantity() {
		return quantity;
	}

	public void setQuantity(double quantity) {
		this.quantity = quantity;
	}

	public double getSubtotal() {
		return subtotal;
	}

	public void setSubtotal(double subtotal) {
		this.subtotal = subtotal;
	}

	public double getFreight() {
		return freight;
	}

	public void setFreight(double freight) {
		this.freight = freight;
	}

	public String getManager() {
		return manager;
	}

	public void setManager(String manager) {
		this.manager = manager;
	}

	public String getManagername() {
		return managername;
	}

	public void setManagername(String managername) {
		this.managername = managername;
	}

	public String getConsignee() {
		return consignee;
	}

	public void setConsignee(String consignee) {
		this.consignee = consignee;
	}

	public String getConsigneephone() {
		return consigneephone;
	}

	public void setConsigneephone(String consigneephone) {
		this.consigneephone = consigneephone;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getProvincename() {
		return provincename;
	}

	public void setProvincename(String provincename) {
		this.provincename = provincename;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCityname() {
		return cityname;
	}

	public void setCityname(String cityname) {
		this.cityname = cityname;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getAreaname() {
		return areaname;
	}

	public void setAreaname(String areaname) {
		this.areaname = areaname;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getReceiveway() {
		return receiveway;
	}

	public void setReceiveway(String receiveway) {
		this.receiveway = receiveway;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getRemark1() {
		return remark1;
	}

	public void setRemark1(String remark1) {
		this.remark1 = remark1;
	}

	public String getSalearea() {
		return salearea;
	}

	public void setSalearea(String salearea) {
		this.salearea = salearea;
	}

	public String getSaleareaname() {
		return saleareaname;
	}

	public void setSaleareaname(String saleareaname) {
		this.saleareaname = saleareaname;
	}

	public String getGroupid() {
		return groupid;
	}

	public void setGroupid(String groupid) {
		this.groupid = groupid;
	}

	public String getGroupname() {
		return groupname;
	}

	public void setGroupname(String groupname) {
		this.groupname = groupname;
	}

	public String getFound() {
		return found;
	}

	public void setFound(String found) {
		this.found = found;
	}

	public String getFoundname() {
		return foundname;
	}

	public void setFoundname(String foundname) {
		this.foundname = foundname;
	}

	public Date getFounddt() {
		return founddt;
	}

	public void setFounddt(Date founddt) {
		this.founddt = founddt;
	}

	public String getSubmit() {
		return submit;
	}

	public void setSubmit(String submit) {
		this.submit = submit;
	}

	public String getSubmitname() {
		return submitname;
	}

	public void setSubmitname(String submitname) {
		this.submitname = submitname;
	}

	public Date getSubmitdt() {
		return submitdt;
	}

	public void setSubmitdt(Date submitdt) {
		this.submitdt = submitdt;
	}

	public String getAudit() {
		return audit;
	}

	public void setAudit(String audit) {
		this.audit = audit;
	}

	public String getAuditname() {
		return auditname;
	}

	public void setAuditname(String auditname) {
		this.auditname = auditname;
	}

	public Date getAuditdt() {
		return auditdt;
	}

	public void setAuditdt(Date auditdt) {
		this.auditdt = auditdt;
	}

	public Date getDt() {
		return dt;
	}

	public void setDt(Date dt) {
		this.dt = dt;
	}
}










