package cn.estsh.i3plus.ext.mes.pcn.pojo.model;

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.mes.bean.*;
import cn.estsh.i3plus.pojo.mes.util.MesExtEnumUtil;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Column;
import javax.persistence.Transient;
import java.util.List;
import java.util.Map;

/**
 * @Description : 裁片工单标签打印Model
 * @Reference :
 * @Author : xinwang.yi
 * @CreateDate 2024/6/13 15:48
 * @Modify:
 **/
@Data
public class MesWorkOrderCutPrintModel {

    @ApiParam("工厂代码")
    private String organizeCode;

    @ApiParam("裁片工单号")
    private String cutWorkOrderNo;

    @ApiParam("产线代码")
    private String workCenterCode;

    @ApiParam("裁片方案代码")
    private String cutCode;

    @ApiParam("裁片方案名称")
    private String cutName;

    @ApiParam("工单状态")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.CUT_ORDER_STATUS.class, refForeignKey = "value", value = "description")
    private Integer workOrderStatus;

    @ApiParam("打印状态")
    @ColumnDefault("10")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.PRINT_STATUS.class, refForeignKey = "value", value = "description")
    private Integer printStatus;

    @Column(name = "PRINT_TIME")
    @ApiParam("打印时间")
    private String printTime;

    @ApiParam("打印内容")
    private List<Map<String, Object>> printContent;

    @ApiParam("裁片方案")
    private MesCutScheme cutScheme;

    @ApiParam("裁片方案成品")
    private List<MesCutSchemeFg> cutSchemeFgList;

    @ApiParam("裁片方案原材料")
    private List<MesCutSchemeMaterial> cutSchemeMaterialList;

    @ApiParam("裁片方案设备")
    private List<MesCutSchemeEquipment> cutSchemeEquipmentList;

    @ApiParam("裁片方案设备参数")
    private Map<Long, List<MesCutSchemeEquipmentDetail>> cutSchemeEquipmentDetailMapByPid;

    @Transient
    @ApiParam("查询模式：1-仅仅查询；2-查询并带打印模板修改打印状态")
    private Integer mode;
}
