package cn.iocoder.yudao.module.pms.controller.admin.iotmainworkorderbommaterial.vo;

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

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

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - PMS 保养工单明细设备BOM挂载物料关联分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class IotMainWorkOrderBomMaterialPageReqVO extends PageParam {

    @Schema(description = "保养计划id", example = "21957")
    private Long mainPlanId;

    @Schema(description = "保养工单id", example = "11659")
    private Long workOrderId;

    @Schema(description = "保养工单明细id", example = "28110")
    private Long mainWorkOrderDetailId;

    @Schema(description = "物料所属设备分类", example = "25032")
    private Long deviceCategoryId;

    @Schema(description = "保养工单明细设备BOM节点id", example = "17705")
    private Long bomNodeId;

    @Schema(description = "设备分类公共BOM节点名称", example = "芋艿")
    private String name;

    @Schema(description = "设备分类公共BOM节点编码")
    private String code;

    @Schema(description = "物料id", example = "2521")
    private Long materialId;

    @Schema(description = "物料编码")
    private String materialCode;

    @Schema(description = "物料名称", example = "芋艿")
    private String materialName;

    @Schema(description = "消耗数量")
    private BigDecimal quantity;

    @Schema(description = "单位", example = "PC")
    private String unit;

    @Schema(description = "单价(元)", example = "25019")
    private BigDecimal unitPrice;

    @Schema(description = "总金额(元)", example = "12420")
    private BigDecimal totalPrice;

    @Schema(description = "公里数周期(千米)")
    private BigDecimal kilometerCycle;

    @Schema(description = "公里数周期-提前量(千米)")
    private BigDecimal kiloCycleLead;

    @Schema(description = "时间周期(小时)")
    private BigDecimal timePeriod;

    @Schema(description = "时间周期-提前量(小时)")
    private BigDecimal timePeriodLead;

    @Schema(description = "自然日周期(天)")
    private BigDecimal naturalDatePeriod;

    @Schema(description = "自然日周期-提前量(天)")
    private BigDecimal naturalDatePeriodLead;

    @Schema(description = "物料来源 (SAP库存 本地库存...)")
    private String materialSource;

    @Schema(description = "工厂id")
    private Long factoryId;
    @Schema(description = "成本中心id")
    private Long costCenterId;
    @Schema(description = "库存地点id")
    private Long storageLocationId;

    @Schema(description = "库存地点")
    private String inventoryAddress;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "状态 0启用  1停用", example = "1")
    private Integer status;

    @Schema(description = "备注", example = "随便")
    private String remark;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    /**
     * 扩展字段
     */
    @Schema(description = "部门id", example = "21957")
    private Long deptId;

    @Schema(description = "设备id", example = "21957")
    private Long deviceId;

    @Schema(description = "保养工单id集合", example = "21957")
    private List<Long> workOrderIds;

    @Schema(description = "保养工单明细bom节点id集合", example = "21957")
    private List<Long> bomNodeIds;
}