package com.maintain.business.domain.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.maintain.common.annotation.ExcelDictFormat;
import com.maintain.common.convert.ExcelDictConvert;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author haoxuyang
 * @Date 2026/4/2 9:24
 */
@Data
@HeadRowHeight(value = 35)
@ContentRowHeight(value = 22)
/** 金黄表头、黑字、细边框（与 IndexedColors 调色板接近 #FFC107/#FFB800 效果） */
@HeadStyle(
    fillPatternType = FillPatternTypeEnum.SOLID_FOREGROUND,
    fillForegroundColor = 51,
    horizontalAlignment = HorizontalAlignmentEnum.CENTER,
    verticalAlignment = VerticalAlignmentEnum.CENTER,
    borderLeft = BorderStyleEnum.THIN,
    borderRight = BorderStyleEnum.THIN,
    borderTop = BorderStyleEnum.THIN,
    borderBottom = BorderStyleEnum.THIN,
    leftBorderColor = 8,
    rightBorderColor = 8,
    topBorderColor = 8,
    bottomBorderColor = 8
)
@HeadFontStyle(color = 8)
public class ErpMaterialPickingExportVo {

    /**
     * 序号
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 0, value = {"title", "序号"})
    private String index;

    /**
     * 分公司
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 1, value = {"title", "分公司"})
    private String branchOffice;

    /**
     * 车间
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 2, value = {"title", "车间"})
    private String workshopName;

    /**
     * 仓库
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 3, value = {"title", "仓库"})
    private String warehouseName;

    /**
     * 领料人
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 4, value = {"title", "领料人"})
    private String receiveUserName;

    /**
     * 领料时间
     */
    @ColumnWidth(25)
    @ExcelProperty(index = 5, value = {"title", "领料时间"})
    private Date receiveTime;

    /**
     * 材料编码
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 6, value = {"title", "材料编码"})
    private String materialCode;

    /**
     * 物资名称
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 7, value = {"title", "物资名称"})
    private String materialName;

    /**
     * 规格
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 8, value = {"title", "规格"})
    private String materialSpecifications;

    /**
     * 单位
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 9, value = {"title", "单位"}, converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "material_unit")
    private String materialUnit;

    /**
     * 入库价格
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 10, value = {"title", "入库价格"})
    private BigDecimal putawayPrice;

    /**
     * 数量
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 11, value = {"title", "数量"})
    private BigDecimal collectNumber;

    /**
     * 合计(元)
     */
    @ColumnWidth(15)
    @ExcelProperty(index = 12, value = {"title", "合计(元)"})
    private BigDecimal money;

}
