package cn.superdesk.uniorder.dto.openapi.order;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Description:
 * @Author: linjinyu
 * @CreateDate: 2021-12-02 14:22:17
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021-12-02 14:22:17
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@ToString
public class UnifiedOrderDto implements Serializable {

	@ApiModelProperty("成功持久化后产生-不必传")
	private Long unifiedOrderId;

	@ApiModelProperty(value = "第三方接口-快照订单Id")
	private Long outSnapshotOrderId;

	@ApiModelProperty(value = "订单类型:1-订单;2-退单")
	private Integer orderType;
	@ApiModelProperty(value = "订单号")
	private String  orderSn;
	@ApiModelProperty(value = "退单号")
	private String  refundOrderSn;
	@ApiModelProperty(value = "外部订单号")
	private String  orderSnOutTrade;

	@ApiModelProperty(value = "订单来源名称-引用值")
	private String serviceName;
	@ApiModelProperty(value = "订单来源编码-引用值")
	private String serviceNo;


	@ApiModelProperty(value = "项目ID-固定值")
	private Long   outOrgId;
	@ApiModelProperty(value = "项目名称-固定值")
	private String outOrgName;


	@ApiModelProperty(value = "采购方(下单人)-企业-引用值")
	private Long   purchaseVirtId;
	@ApiModelProperty(value = "采购方(下单人)-企业-引用值")
	private String purchaseVirtName;
	@ApiModelProperty(value = "采购方(下单人)-部门")
	private String purchaseDepartmentName;
	@ApiModelProperty(value = "采购方(下单人)-采购员Id")
	private Long   purchaseUserId;
	@ApiModelProperty(value = "采购方(下单人)-采购员名字")
	private String purchaseUserName;
	@ApiModelProperty(value = "采购方(下单人)-联系电话")
	private String purchasePhone;

	@ApiModelProperty(value = "销售方-引用值")
	private Long   saleId;
	@ApiModelProperty(value = "销售方-引用值")
	private String saleName;

	@ApiModelProperty(value = "订单销售金额=运费+商品销售金额")
	private BigDecimal orderAmount;
	@ApiModelProperty(value = "订单成本金额")
	private BigDecimal costAmount;
	@ApiModelProperty(value = "运费")
	private BigDecimal transportAmount;
	@ApiModelProperty(value = "商户承担运费")
	private BigDecimal transportMerchantAssumeAmount;
	@ApiModelProperty(value = "商品销售金额(后端统计)")
	private BigDecimal goodsAmount;
	@ApiModelProperty(value = "商品成本金额(后端统计)")
	private BigDecimal goodsCostAmount;
	@ApiModelProperty(value = "退品销售金额(后端统计)")
	private BigDecimal refundGoodsAmount;
	@ApiModelProperty(value = "退品成本金额(后端统计)")
	private BigDecimal refundGoodsCostAmount;
	@ApiModelProperty(value = "完成状态")
	private Integer    completState;

	@ApiModelProperty(value = "客户对账锁定:0-正常;1-销定")
	private Integer orderLockingCustomer;
	@ApiModelProperty(value = "供应商对账锁定:0-正常;1-销定")
	private Integer orderLockingSupplier;
	@ApiModelProperty(value = "供应商对账:1-已对账;2-未对账")
	private Integer accountingStateSupplier;
	@ApiModelProperty(value = "客户对账:1-已对账;2-未对账")
	private Integer accountingStateCustomer;


	@ApiModelProperty(value = "支付方式(第三方系统)")
	private Integer payType;
	@ApiModelProperty(value = "支付方式名称(第三方系统)")
	private String  payTypeName;
	@ApiModelProperty(value = "付款状态(第三方系统)")
	private Integer payState;
	@ApiModelProperty(value = "支付状态名称(第三方系统)")
	private String  payStateName;

	@ApiModelProperty(value = "订单状态(第三方系统)")
	private Integer orderState;
	@ApiModelProperty(value = "订单状态名称(第三方系统)")
	private String  orderStateName;

	@ApiModelProperty(value = "结算类型(第三方系统)")
	private Integer settlementType;
	@ApiModelProperty(value = "评价状态(第三方系统)")
	private Integer appraiseState;
	@ApiModelProperty(value = "来源渠道(第三方系统)")
	private Integer sourceChannel;

	@ApiModelProperty(value = "其他属性(第三方系统对映统一订单字段对映不上时,字段差集作为Json结构体填充)")
	private String otherParams;

	@ApiModelProperty(value = "操作类型")
	private String userType;
	@ApiModelProperty(value = "操作者")
	private String userName;

	@ApiModelProperty(value = "收货方-名称")
	private String recUserName;
	@ApiModelProperty(value = "收货方-Id")
	private Long   recUserId;
	@ApiModelProperty(value = "收货方-电话")
	private String recUserPhone;
	@ApiModelProperty(value = "收货方-详细地址")
	private String recAddress;

	@ApiModelProperty(value = "物流单号")
	private String expressSn;
	@ApiModelProperty(value = "快递拼音简写")
	private String express;
	@ApiModelProperty(value = "快递名称 eg:京东快递;韵达快运")
	private String expressCompany;

	@ApiModelProperty(value = "")
	private String remarks;


	@ApiModelProperty(value = "2-未开票,1-已开票,3-部分开票")
	private Integer invoiceStatus;
	@ApiModelProperty(value = "特指 开票申请Sn")
	private String  invoiceApplySn;
	@ApiModelProperty(value = "特指 发票号 税务")
	private String  invoiceNumber;


//	@ApiModelProperty(value = "代客下单 代理操作人账号")
//	private String operAccount;
//	@ApiModelProperty(value = "代客下单 代理操作人姓名")
//	private String operName;

	@ApiModelProperty(value = "订单 创建时间")
	private Date createTime;
	@ApiModelProperty(value = "")
	private Long createUserId;

	@ApiModelProperty(value = "")
	private Date updateTime;
	@ApiModelProperty(value = "")
	private Long updateUserId;

	@ApiModelProperty(value = "订单 支付时间")
	private Date payTime;
	@ApiModelProperty(value = "订单 发货时间")
	private Date sendTime;
	@ApiModelProperty(value = "订单 完成时间")
	private Date finishTime;
	@ApiModelProperty(value = "结算时间")
	private Date accountingTime;

	@ApiModelProperty(value = "0-未回款;1-部分回款;2-全部回款")
	private Integer backAccountStatus;

	List<UnifiedOrderCreditDto> creditList;
	List<UnifiedOrderGoodsDto>  goodsList;

	private static final long serialVersionUID = 1L;
}
