package com.jwipc.order.dto;

import cn.hutool.core.util.StrUtil;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Data
public class DeliveryOrderPrintDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = -6283040624939772733L;
    private String orderCode;
    private String supplierName;
    private String companyName;
    private String deliveryDate;
    private String planDeliveryDate;
    private String consigner;
    private String contacts;
    private String receivingPhone;
    private String address;
    private String approvaler;
    private String qualityer;
    private String entrustNo;
    /**
     * 收货方html
     */
    private String recipientHtml;
    /**
     * 出货方html
     */
    private String shipperHtml;
    /**
     * 送货方式
     */
    private String directShipment;

    private List<DeliveryOrderDetailPrintDTO> detail;

    public String getShipperHtml() {
        String html="<p style='font-size:15pt;text-align: center;font-weight: bold;padding:0;'>出货方</p> \n" +
                "\n" +
                "&nbsp;送货人:{}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;送货时间:{}\n" +
                "\n" +
                "\n" +
                "&nbsp;出货章:\n" +
                "\n" +
                "\n";

        return StrUtil.format(html,this.consigner,this.deliveryDate);
    }

    public String getRecipientHtml() {
        String html="<p style='font-size:15pt;text-align: center;font-weight: bold;padding:0;'>收货方</p> \n" +
                "\n" +
                "&nbsp;&nbsp;&nbsp;&nbsp;仓库员:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
                "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;品质:{}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
                "&nbsp;&nbsp;&nbsp;核准:{}\n" +
                "\n" +
                "&nbsp;&nbsp;&nbsp;&nbsp;收货人:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;收货时间:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;时&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;分\n" +
                "\n" +
                "&nbsp;&nbsp;&nbsp;&nbsp;收货章:\n" +
                "\n" +
                "\n";
        return StrUtil.format(html,this.qualityer,this.approvaler);
    }
}
