package cn.iocoder.foodnexus.module.erp.controller.admin.purchase.vo.order;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import cn.iocoder.foodnexus.framework.excel.core.annotations.DictFormat;
import cn.iocoder.foodnexus.framework.excel.core.convert.DictConvert;
import cn.iocoder.foodnexus.module.order.enums.DeliveryMode;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author : yanghao
 * create at:  2025/10/11  13:53
 * @description: 月度账单明细
 */
@Data
@ExcelIgnoreUnannotated
public class SupplierMonthOrderDetailsExportVO {


    @Schema(description = "采购单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "XS001")
    @ExcelProperty("采购单编号")
    private String no;

    @Schema(description = "供应商名称", example = "芋道")
    @ExcelProperty("供应商名称")
    private String supplierName;

    @Schema(description = "产品信息", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("产品信息")
    private String productNames;

    @Schema(description = "采购时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("订单时间")
    private LocalDateTime orderTime;

    @Schema(description = "配送模式", requiredMode = Schema.RequiredMode.REQUIRED)
    // @DictFormat("order_delivery_mode") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private DeliveryMode deliveryMode;

    @ExcelProperty(value = "配送模式")
    private String deliveryModeStr;

    @Schema(description = "预计配送开始时间")
    @ExcelProperty("配送时间")
    private LocalDateTime planDeliveryStartTime;

    @Schema(description = "应对账总金额(分)")
    private Integer payablePrice;

    @Schema(description = "签收金额")
    private Integer signedTotal;

    @Schema(description = "退款金额")
    private Integer returnsTotal;

    @Schema(description = "最终合计价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "24906")
    @ExcelProperty("订单金额")
    private BigDecimal totalPrice;

    @ExcelProperty("应对账总金额(元)")
    private BigDecimal payablePriceYuan;

    @ExcelProperty("签收金额(元)")
    private BigDecimal signedTotalYuan;

    @ExcelProperty("退款金额(元)")
    private BigDecimal returnsTotalYuan;

    @Schema(description = "供应商结算金额(分)")
    private Integer settlementPrice;

    @ExcelProperty("供应商结算金额(元)")
    private BigDecimal settlementPriceYuan;
}
