package org.jeecg.modules.fbsWorkshopDispatchList.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.fbsBasedate.entity.FbsTechnologicalProcessItem;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;

/**
 * @Description: 车间派工单
 * @author： jeecg-boot
 * @date：   2020-10-13
 * @version： V1.0
 */
@Data
@TableName("fbs_workshop_dispatch_list")
public class FbsWorkshopDispatchList implements Serializable {
    private static final long serialVersionUID = 1L;
    
	/**车间派工单主键*/
	@TableId(type = IdType.UUID)
	private String id;
	/**姓名*/
	@Excel(name = "姓名", width = 15)
	private String name;
	/**U8获取*/
	@Excel(name = "U8获取", width = 15)
	private String personnelIdU8;
	/**U8获取*/
	@Excel(name = "U8获取", width = 15)
	private String personnelNameU8;
	/**日期*/
	@Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date date;
	/**生产订单号id*/
	@Excel(name = "生产订单号id", width = 15)
	private String productionOrderNumberId;
	/**生产订单号名称*/
	@Excel(name = "生产订单号名称", width = 15)
	private String productionOrderNumberName;
	/**产品*/
	@Excel(name = "产品", width = 15)
	private String product;/**产品id*/
	@Excel(name = "产品id", width = 15)
	private String productId;
	/**任务数量*/
	@Excel(name = "任务数量", width = 15)
	private BigDecimal numberOfTasks;
	/**标准工时*/
	@Excel(name = "标准工时", width = 15)
	private String standardWorkingHours;
	/**计划开工时间*/
	@Excel(name = "计划开工时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date plannedStartTime;
	/**计划完工时间*/
	@Excel(name = "计划完工时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date plannedEndTime;
	/**备注*/
	@Excel(name = "备注", width = 15)
	private String memo;
	/**删除标记0正常1删除*/
	@Excel(name = "删除标记0正常1删除", width = 15)
	private String delFlag;
	/**创建人*/
	@Excel(name = "创建人", width = 15)
	private String createBy;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	/**最后修改人*/
	@Excel(name = "最后修改人", width = 15)
	private String updateBy;
	/**最后修改时间*/
	@Excel(name = "最后修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date updateTime;
	/**自定义字段1*/
	@Excel(name = "自定义字段1", width = 15)
	private String def1;
	/**自定义字段2*/
	@Excel(name = "自定义字段2", width = 15)
	private String def2;
	/**自定义字段3*/
	@Excel(name = "自定义字段3", width = 15)
	private String def3;
	/**自定义字段4*/
	@Excel(name = "自定义字段4", width = 15)
	private String def4;
	/**自定义字段5*/
	@Excel(name = "自定义字段5", width = 15)
	private String def5;
	/**排序*/
	@Excel(name = "排序", width = 15)
	private Integer sort;

	/**生产线名称*/
	@Excel(name = "生产线名称", width = 15)
	private String productionLineName;

	/**生产线id*/
	@Excel(name = "生产线id", width = 15)
	private String productionLineId;

    /**状态（0初始，1接单,2暂停，3完成）*/
    @Excel(name = "状态", width = 15)
    private String state;

    //项目名称
    private String projectName;

    //行号
	@TableField(exist = false)
	private String rowNumber;

	//最新完成数量
	private String latestCompletedQuantity;

	//U8计划数量
	private BigDecimal plannedQuantity;
	//U8计划数量合计
	@TableField(exist = false)
	private BigDecimal plannedQuantityTotal;
	//U8标准工时
	private String standardWorkingHoursZ;

	//剩余数量
	private BigDecimal remainingQuantity;

	//是否可上岗
	private String isScanCode;

	//工艺主表id
	private String fbsTechnologicalProcessId;
	//工艺主表名称
	private String fbsTechnologicalProcessName;
	//工艺子表名称
	private String fbsTechnologicalProcessItemName;
	//每次报工累加的工时
//	private String manHoursCompletedReport;
	//SAP订单状态
	private String sapState;

	//项目编码
	private String costItemCode;

    //合并行
	@TableField(exist = false)
    private Integer mergeLines;

    //任务数量合计
    @TableField(exist = false)
    private String numberOfTasksTotal;

	//标准工时合计
	@TableField(exist = false)
    private String standardWorkingHoursTotal;

	//剩余计划数量合计
	@TableField(exist = false)
	private BigDecimal surplusNumberOfTasksTotal;

	//剩余标准工时合计
	@TableField(exist = false)
	private BigDecimal surplusStandardWorkingHoursTotal;

	//完成数量合计
	@TableField(exist = false)
	private BigDecimal latestCompletedQuantityTotal;

	//实际标准工时合计
	@TableField(exist = false)
	private String standardWorkingHoursActualTotal;

	@TableField(exist = false)
	private List<FbsWorkshopDispatchList> fbsWorkshopDispatchListList;

	//当月产品总工时
	@TableField(exist = false)
	private String productTotal;

	//当日完成数量
	@TableField(exist = false)
	private String quantityCompletedDay;
    //累计完成数量
    @TableField(exist = false)
    private Integer quantityCompletedTotal;
	//剩余总工时
	@TableField(exist = false)
	private String remainingWorkTotal;

	//合格数
	@TableField(exist = false)
	private Integer qualifiedNumber;

	//状态
	@TableField(exist = false)
	private Integer status;

	//完工时间
	@TableField(exist = false)
	@Excel(name = "日期", width = 20, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date endDate;

	//实际完工时间
	@TableField(exist = false)
	@Excel(name = "日期", width = 20, format = "yyyy-MM-dd HH:mm")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	private Date finalTime;

	//单日完成工时
	private String  manHoursCompleted;

	//更新完成数量与U8完成数量对比备注
	private String latestCompletedQuantityU8Memo;

	//累计完成工时
    @TableField(exist = false)
    private String manHoursCompletedTotal;

    //生产效率
    @TableField(exist = false)
    private String productionEfficiency;

    //达成率
    @TableField(exist = false)
    private String achievementRate;

	/**真实开工时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
	@TableField(exist = false)
	private Date firstTime;

	/**库存规格*/
	@TableField(exist = false)
	private String cinvstd;

	//开始时间
	@TableField(exist = false)
	private String start;
	//结束时间
	@TableField(exist = false)
	private String end;

	//多选状态
	@TableField(exist = false)
	private List<String> stateList;
	//年份
	@TableField(exist = false)
	private String year;
	//月份
	@TableField(exist = false)
	private String month;

	//未完成累计工时
	@TableField(exist = false)
	private BigDecimal outstandingCumulativeWorkDoneTotal;
	//是否显示颜色（用于计划报表）
	@TableField(exist = false)
	private List<String> isColor;
	//显示每天
	@TableField(exist =false)
	private List<Map<String,Object>> dayList;

	//工艺明细
	@TableField(exist = false)
	private List<FbsTechnologicalProcessItem> fbsTechnologicalProcessItemList;

	//erp开工时间
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@TableField(exist = false)
	private Date startDate;

	//rep完工时间
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@TableField(exist = false)
	private Date dueDate;

	//缺料状态(正常、待料)
	@TableField(exist = false)
	private String lackOfMaterialState;

	//工作中心
//	@TableField(exist = false)
	private String workCenter;

	//工艺顺序
	private String processSequence;
}
