package com.xisc.pm.app.service.autoboard.dto;

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

import javax.validation.constraints.NotNull;

import com.xisc.pm.domain.entity.PmPolicyGrKpi;
import com.xisc.pm.domain.entity.PmSdivStLimitBt;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 自动组板请求
 * @author jun.zeng
 *
 */
@Data
public class PmAutoBoardPolicyGroupDTO implements Serializable {

    private static final long serialVersionUID = 3139320309463761440L;
    
    private Long policyGroupId ;
    // 策略组编码
    private String policyGroupCode ;
    
    // 组板策略
    private List<PmAutoBoardPolicyDTO> policyList ;
    
    // 策略组所有产线集合，初始化合同数据时使用
    private Set<String> mscLineNoList = new HashSet<String>();
    
    // 策略组所有钢种集合，初始化合同数据时使用
    private Set<String> stNoList = new HashSet<>();
    // 钢种组
    private Map<Long, String> stGroupMap = new HashMap<>();
    
    private Map<Long, Set<String>> stMap = new HashMap<>();
    
    // 合同指定产线断面
    private Map<String , Set<String>> assignMoldMap ;
    
    // 合同指定产线断面
    private Map<String , Set<String>> assignMscLineMap = new HashMap<>();
    
    private Date delivyDateFrom ;
    
    private Date delivyDateTo ;
    
    @ApiModelProperty(value = "允许超投件数")
    private BigDecimal overcastQty;

    @ApiModelProperty(value = "允许超投交货期止")
    private Date overcastDelivyDateTo;

    @ApiModelProperty(value = "指定长上限")
    private BigDecimal designLengthMax;

    @ApiModelProperty(value = "是否以优充次")
    private Long betterToWorseFlag;

    @ApiModelProperty(value = "收得率下限", required = true)
    @NotNull
    private BigDecimal yieldLower;

    @ApiModelProperty(value = "是否倒置")
    private Long invertedFlag;
    
    // 尾量标记需要使用的截止日期
    private Date remainingDelivyDateTo ;
    
    // 合同分组
    private List<PmOrderGroupDTO> orderGroup ;
    
    // 尾量优先标识
    private Long remainingPriorityFlag ;
    
    // 合约尾量
    private BigDecimal contractAllowance ;
    
    // 合约尾量-计算值
    private Map<String , BigDecimal> summaryContractNum ;
    
    private BigDecimal allContractAllowance = BigDecimal.ZERO;
    
    // 组合板最大长度
    private BigDecimal maxCombinePlateLen ;
    
    // 部分钢种组板检查
    Map<String , List<PmSdivStLimitBt>> pmSdivStLimitBtMap;
    
    // 执行批次
    private String batch ;
    
    private List<String> contractNumList ;
    
    private List<PmPolicyGrKpi> kpis ;
    
}
