package com.jwipc.order.dto;

import com.jwipc.aggregation.annotation.RelationAggregationField;
import com.jwipc.order.model.po.PurchaseOrderDetailPO;
import com.jwipc.sys.client.UserClient;
import lombok.Getter;
import lombok.Setter;

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

/**
 * <p>
 * 采购订单
 * </p>
 *
 * @author zhangjie
 * @since 2024-03-05
 */
@Getter
@Setter
public class PurchaseOrderListDTO extends PurchaseOrderBaseDTO {


    @Serial
    private static final long serialVersionUID = 4756984201461547548L;
    private String subjectTypeCode;
    private String rowTypeCode;
    /**
     * 上传的附件数量
     */
    private Integer fileSize;

    /**
     * 订单含税总额，保存时自动计算
     */
    private String orderTaxAmountCaptial;

    /**
     * 合同名称
     */
    private String contractName;

    List<PurchaseOrderDetailPO> itemList;

    /**
     * 审批单code
     */
    private String  billCode;
    /**
     * 订单的送货时间  取订单明细中最晚的送货时间
     */
    private Date deliverTime;
    /**
     * 文件个数
     */
    private Integer fileCount;

    private String actualContract;
    private Integer signStatus;
    @RelationAggregationField(
            masterIdField = "finUserId",
            relationIdField = "id",
            relationNameField = "username",
            relationClientClass = UserClient.class,
            relationMethod = "getByUserIds"
    )
    private String finUserName;


    private String supplierCode1;
    private String supplierName1;


    /**
     * 报关公司编码
     */
    private String supplierCode2;

    /**
     * 报关公司名称
     */
    private String supplierName2;

    private String column1;
    private String column2;
    private String column3;
    private String attachmentFiles;
}
