package cn.superdesk.uniorder.dto.receive.consumer.superdeskmall.score.refund;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
public class ScoreOrderRefundGoodsReceiveParam implements Serializable {


//	{
//		"order": {
//			"ordersn": "ME20210930142423232604",
//			"project_id": "0",
//			"parentid": "431380",
//			"dispatchprice": "0.00",
//			"departmentName": "文滇置业",
//			"refundno": "SR20211015103507679285",
//			"amount": "",
//			"orderState": "-1",
//			"orderStateName": "商家已拒绝",
//			"createTime": "2021-10-15 10:35:07",
//			"payTime": "2021-10-15 10:35:07",
//			"sendTime": "1970-01-01 08:00:00",
//			"finishTime": "1970-01-01 08:00:00",
//			"complet_state": 3
//		},"goods": {
//			"order_goods_id": "492014",
//			"refundno": "SR20211015103507679285",
//			"refund_status": "-1",
//			"goods_name": "宣农优品 压榨巴山一级黄菜油5L",
//			"goods_id": "96023",
//			"total": "3",
//			"refund_total": "3",
//			"price": "124.00",
//			"cost_price": "109.48",
//			"realprice": "372.00",
//			"orderid": "431381",
//			"gtax_rate": null,
//			"tax_code": "1030105010400000000",
//			"tax_rate": "9.00",
//			"merch_tax_rate": "9.00",
//			"merch_tax_code": "1030105010000000000",
//			"operation_tax_rate": "9.00",
//			"operation_tax_code": "1030105010000000000"
//		}
//	}


//	-- 退单商品快照Id 问题
//	SELECT * FROM `unified_order_goods` WHERE `direction` = -1 AND (`out_snapshot_order_goods_id` = 0 or `out_snapshot_order_goods_id` IS NULL )

    @ApiModelProperty("退单商品快照Id 必须 mark by linjinyu at 20220328 发现的问题")
    @JsonProperty("order_goods_id")
    private Long outSnapshotOrderGoodsId;

    // "refundno": "SR20200722153451040481",
    @ApiModelProperty("退单编号 必须")
    @JsonProperty("refundno")
    private String refundNo;

    // "goods_name": "我是准备测试复制的商品3333333",
    @ApiModelProperty("商品标题 必须")
    @JsonProperty("goods_name")
    private String goodsName;

    // "goods_id": "2479969",
    @ApiModelProperty("商品id 必须")
    @JsonProperty("goods_id")
    private Long goodsId;


    // "total": "2",
    @ApiModelProperty("购买总数量 必须")
    @JsonProperty("total")
    private String total;

    // "refund_total": "1",
    @ApiModelProperty("退款数量 必须")
    @JsonProperty("refund_total")
    private Integer refundTotal;

    // "price": 20.19
    @ApiModelProperty("退品 销售单价 必须")
    @JsonProperty("price")
    private BigDecimal price;

    // "cost_price": "8.00",
    @ApiModelProperty("退品 成本单格 必须")
    @JsonProperty("cost_price")
    private BigDecimal costPrice;

    // "realprice": "40.40",
    @ApiModelProperty("购买总金额 必须 说明 其实相当于 goodsAmount")
    @JsonProperty("realprice")
    private BigDecimal realPrice;


    // "orderid": "47809",
    @ApiModelProperty("订单id 必须")
    @JsonProperty("orderid")
    private Long orderId;

    @JsonProperty("unit")
    private String unit;
    @JsonProperty("self_option")
    private String selfOption;


    /****************************************** 关于税率 start ******************************************/


//	实际上只有两个字段
//"tax_code": "1010115019900000000",
//"tax_rate": "3.00",
    @ApiModelProperty("\"fiscal_code\": \"1070223020000000000\", 非必须")
    @JsonProperty("fiscal_code")
    private String fiscalCode;

    // ************************************ update by linjinjy 20200727 20200723_林志鹏_税率,退款格式.docx ************************************

    @ApiModelProperty("税务编码 (商城填好传过去的)商城设置 分类税率 非必须 \"taxCode\": \"1070223010000000000\"")
    @JsonProperty("tax_code")
    private String taxCode;


    @ApiModelProperty("商户税率\t浮点数(新增) 非必须")
    @JsonProperty("merch_tax_rate")
    private BigDecimal merchTaxRate;
    @ApiModelProperty("商户税率编码\t字符串\t(新增) 非必须")
    @JsonProperty("merch_tax_code")
    private String     merchTaxCode;
    @ApiModelProperty("商户税率ID\t整型\t(新增) 非必须")
    @JsonProperty("merch_tax_id")
    private Long       merchTaxId;

    @ApiModelProperty("平台税率\t    浮点数\t(新增) 非必须")
    @JsonProperty("operation_tax_rate")
    private BigDecimal operationTaxRate;
    @ApiModelProperty("平台税率编码\t字符串\t(新增) 非必须")
    @JsonProperty("operation_tax_code")
    private String     operationTaxCode;
    @ApiModelProperty("平台税率ID\t整型\t(新增)")
    @JsonProperty("operation_tax_id")
    private Long       operationTaxId;

    @JsonProperty("cate_id_lv1")
    private Long   cateIdLv1;
    @JsonProperty("cate_name_lv1")
    private String cateNameLv1;
    @JsonProperty("cate_id_lv2")
    private Long   cateIdLv2;
    @JsonProperty("cate_name_lv2")
    private String cateNameLv2;
    @JsonProperty("cate_id_lv3")
    private Long   cateIdLv3;
    @JsonProperty("cate_name_lv3")
    private String cateNameLv3;


    @ApiModelProperty("\"taxCode\": \"\" 京东税率 弃用")
    @JsonProperty("taxCode")
    private String     jdTaxCode;
    @ApiModelProperty("税率 %   (商城填好传过去的)")
    @JsonProperty("tax_rate")
    private BigDecimal taxRate;


    @ApiModelProperty("商品税率 家豪 说 假定 -1 读 分类的税率 这个逻辑 家豪处理了 反正只读 tax_rate 就好 20200916 \"gtax_rate\": \"-1.00\",")
    @JsonProperty("gtax_rate")
    private BigDecimal goodsTaxRate;

    /****************************************** 关于税率   end ******************************************/
}
