package com.tzy.framework.express.dto;

import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.List;

@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class SfTemplateDto {

    public  SfTemplateDto(String masterWaybillNo,String orderNo,String printDateTime,String remark){
        this.masterWaybillNo = masterWaybillNo;
        this.orderNo = orderNo;
        this.printDateTime = printDateTime;
        this.remark = remark;
    }
    //主运单号
    private String masterWaybillNo;
    //子运单号：否
    private String branchWaybillNo;
    //签回单号
    private String backWaybillNo;
    //该运单号打印时对应的顺序号 子母件必填
    private String seq;
    //子母件运单总数，子母件必填
    private String sum;
    //自定义模板传值
    private JSONObject customData;
    //打印logo
    private String isPrintLogo;
    //
    private String systemSource = "scp";
    //打印次数
    private String printNum;
    //打印时间<格式: YYYY-MM-DD hh:mm:ss>*（包牌模板时间格式：MM/DD hh:mm）*
    private String printDateTime;
    //时效文本类型，特快等等，对应RLS的proCode（入参customerType=1），不传值时则打印agingType对应的时效图标
    private String agingText;
    //目的地（路由信息）
    private String destRouteLabel;
    //单元区域编码。国际面单可不填
    private String destTeamCode;
    //单元区域编码。国际面单可不填
    private String destTeamCodeMapping;
    //寄件人姓名:  否
    private String fromName;
    //寄件人电话
    private String fromPhone;
    //寄件人公司名称
    private String fromOrgName;
    //寄件人地址
    private String fromAddress;
    //收件人姓名
    private String toName;
    //收件人电话
    private String toPhone;
    //收件人公司名
    private String toOrgName;
    //收件人地址
    private String toAddress;
    //付款方式（支持选项：寄付月结、寄付转第三方、寄付现结、到付）
    private String payment;
    //进港映射码
    private String codingMapping;
    //二维码信息
    private String twoDimensionCode;
    //电子产品类型图标（选项：A、B、E），注意RLS接口有A1值，调云打印需传A
    private String abFlag;
    //出港信息
    private String codingMappingOut;
    //产品名称，限时KC24等
    private String productName;
    //出港中转场代码
    private String sourceTransferCode;
    //传值需和图标定义中对应，否则为空不显示
    //图标名称数组（支持选项：逆、轻放/glass、鲜/fresh、蟹/grab、药/medicine、重/hf、Z、包裹/parcel、标快/se、文件/doc 、X1、X2、X3、X4、X6、X7、X8等，明细参考： 图标定义如[“蟹”,“鲜”])
    private List<String> printIcons;

    private String orderNo;

    private String remark;

    public SfTemplateDto setFrom(String fromName,String fromPhone,String fromOrgName,String fromAddress){
        this.fromName = fromName;
        this.fromPhone = fromPhone;
        this.fromOrgName = fromOrgName;
        this.fromAddress = fromAddress;
        return this;
    }

    public SfTemplateDto setTo(String toName,String toPhone,String toOrgName,String toAddress){
        this.toName = toName;
        this.toPhone = toPhone;
        this.toOrgName = toOrgName;
        this.toAddress = toAddress;
        return this;
    }

    public SfTemplateDto setConfig(){
        return this;
    }

}
