package com.seer.teach.mall.shipping.jt.resp;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

/**
 * 物流轨迹信息
 */
@Getter
@Setter
@ToString
@NoArgsConstructor
public class TraceResp {

    /**
     * 扫描时间
     */
    private String scanTime;

    /**
     * 轨迹描述
     */
    private String desc;

    /**
     * 扫描类型
     */
    private ScanType scanType;

    /**
     * 问题类型
     */
    private ProblemType problemType;

    /**
     * 扫描网点名称
     */
    private String scanNetworkName;

    /**
     * 扫描网点 ID
     */
    private String scanNetworkId;

    /**
     * 业务员姓名
     */
    private String staffName;

    /**
     * 业务员联系方式
     */
    private String staffContact;

    /**
     * 扫描网点联系方式
     */
    private String scanNetworkContact;

    /**
     * 扫描网点省份
     */
    private String scanNetworkProvince;

    /**
     * 扫描网点城市
     */
    private String scanNetworkCity;

    /**
     * 扫描网点区/县
     */
    private String scanNetworkArea;

    /**
     * 下一站名称（发件扫描类型时提供）
     */
    private String nextStopName;

    /**
     * 下一站省份（发件扫描类型时提供）
     */
    private String nextNetworkProvince;

    /**
     * 下一站城市（发件扫描类型时提供）
     */
    private String nextNetworkCity;

    /**
     * 下一站区/县（发件扫描类型时提供）
     */
    private String nextNetworkArea;

    /**
     * 退回件状态
     */
    private RebackStatus rebackStatus;

    /**
     * 网点类型
     */
    private NetworkType networkType;

    /**
     * 代签收类型
     */
    private SignByOthersType signByOthersType;

    /**
     * 代收名称
     */
    private String signByOthersName;

    /**
     * 代收点电话
     */
    private String signByOthersTel;

    /**
     * 取件码
     */
    private String pickCode;

}

enum ScanType {
    PICK_UP("1", "快件揽收"),
    IN_WAREHOUSE("2", "入仓扫描（停用）"),
    SEND_SCAN("3", "发件扫描"),
    ARRIVAL_SCAN("4", "到件扫描"),
    OUT_WAREHOUSE("5", "出仓扫描"),
    STORAGE_SCAN("6", "入库扫描"),
    AGENT_INCOME_SCAN("7", "代理点收入扫描"),
    PACKAGE_TAKE_OUT("8", "快件取出扫描"),
    DELIVERY_OUT("9", "出库扫描"),
    SIGN_FOR("10", "快件签收"),
    PROBLEM_PACKAGE("11", "问题件扫描"),
    SECURITY_CHECK("12", "安检扫描"),
    OTHER_SCAN("13", "其他扫描"),
    RETURN_SCAN("14", "退件扫描");

    private final String code;
    private final String description;

    ScanType(String code, String description) {
        this.code  = code;
        this.description  = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}

enum ProblemType {
    CUSTOMER_CANCEL_SEND_AT_BRANCH("A1", "客户取消寄件-网点"),
    CUSTOMER_REJECT("A2", "客户拒收"),
    CHANGE_DELIVERY_ADDRESS("A3", "更改派送地址"),
    RETURN_TO_BRANCH("A4", "退回件-网点"),
    ABNORMAL_PACKAGE_REMIND("A7", "异常件提醒"),
    PACKAGE_ABNORMAL_AT_BRANCH("A8", "包裹异常-网点"),
    RECIPIENT_UNCONTACTABLE("A9", "收件人联系不上"),
    MULTIPLE_DELIVERY_FAILURES("A11", "多次派件失败"),
    RECIPIENT_INFO_ERROR("A12", "收件人信息错误"),
    CHANGE_DELIVERY_TIME("A13", "更改派送时间"),
    RECIPIENT_ADDRESS_UNCLEAR("A15", "收件地址不详"),
    RECIPIENT_ADDRESS_ERROR("A16", "收件地址错误"),
    PACKAGE_STORED_AT_BRANCH("A17", "包裹存放至网点"),
    PACKAGE_TEMP_STORAGE_AT_BRANCH("A21", "包裹暂存网点"),
    PACKAGE_DELAY_HOLIDAY("A23", "包裹延迟-节假日"),
    PACKAGE_ABNORMAL_AT_CENTER("A24", "包裹异常-中心"),
    RETURN_TO_CENTER("A25", "退回件-中心"),
    CUSTOMER_CANCEL_SEND_AT_CENTER("A26", "客户取消寄件-中心"),
    ABNORMAL_WEATHER("A27", "异常天气"),
    NATURAL_DISASTER("A28", "自然灾害"),
    COLLECTION_SETTLEMENT_DISPUTE("A29", "代收/到付结算异议拒付"),
    GOODS_NOT_ARRIVED_COMPLETELY("A30", "货未到齐"),
    VOID_PACKAGE("A31", "作废件"),
    MISSING_WAREHOUSE_CODE("A32", "未录进仓编码"),
    GOVERNMENT_CONTROL("A33", "政府管制"),
    RURAL_PACKAGE("A34", "乡镇件"),
    INVOICE_PROBLEM_CUSTOMER_REJECT("A35", "发票问题客户拒收");

    private final String code;
    private final String description;

    ProblemType(String code, String description) {
        this.code  = code;
        this.description  = description;
    }

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}

enum RebackStatus {
    NORMAL(0, "正常件"),
    RETURN(1, "退回件");

    private final int code;
    private final String description;

    RebackStatus(int code, String description) {
        this.code  = code;
        this.description  = description;
    }

    public int getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }
}

enum NetworkType {
    CENTER("中心"),
    BRANCH("网点"),
    DISTRIBUTION("集散"),
    OTHER("其他");

    private final String description;

    NetworkType(String description) {
        this.description  = description;
    }

    public String getDescription() {
        return description;
    }
}

enum SignByOthersType {
    EXPRESS_STATION("驿站"),
    EXPRESS_CABINET("快递柜");

    private final String description;

    SignByOthersType(String description) {
        this.description  = description;
    }

    public String getDescription() {
        return description;
    }
}