package org.jeecg.modules.projectManagement.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecg.modules.basedata.entity.FdCustomer;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @Description: 合同档案基本信息表
 * @author： jeecg-boot
 * @date：   2019-05-22
 * @version： V1.0
 */
@Data
@TableName("fd_contract")
public class FdContract implements Serializable {
    private static final long serialVersionUID = 1L;
    
	/**主键*/
	@TableId(type = IdType.UUID)
	private java.lang.String id;
	/**合同编码*/
	@Excel(name = "合同编码", width = 15)
	@NotEmpty(message = "合同编码不能为空")
	private java.lang.String code;
	/**合同方*/
	@Excel(name = "合同方", width = 15)
	@NotEmpty(message = "合同方不能为空")
	private java.lang.String contractParty;

	//合同方名称
	@TableField(exist = false)
	private java.lang.String contractPartyName;
	/**合同签订日期*/
	@Excel(name = "合同签订日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    // @Excel(name = "合同签订日期", width = 15)
	@NotNull(message = "合同签订日期不能为空")
	private Date signDate;
	/**合同类型*/
	@Excel(name = "合同类型", width = 15)
	@NotEmpty(message = "合同类型不能为空")
	private java.lang.String contractType;
	/**合同类型名称*/
	private String contractTypeName;
	/**来源报价单号*/
	@Excel(name = "来源报价单号", width = 15)
	private java.lang.String sourceQuotationCode;
	/**来源报价单id*/
	@Excel(name = "来源报价单id", width = 15)
	private java.lang.String quotationId;
	/**报价单日期*/
	@Excel(name = "报价单日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
	private java.util.Date quotationDate;
	/**报价单失效日期*/
	@Excel(name = "报价单失效日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
	private java.util.Date quotationValidDate;
	/**客户地址*/
	@Excel(name = "客户地址", width = 15)
	private java.lang.String customerAddress;
	/**项目名称*/
	@Excel(name = "项目名称", width = 15)
	@NotEmpty(message = "项目名称不能为空")
	private java.lang.String projectName;
	/**项目描述*/
	@Excel(name = "项目描述", width = 15)
	// @NotEmpty(message = "项目描述不能为空")
	private java.lang.String projectDescription;
	/**基质类型，多个用英文逗号隔开*/
	@Excel(name = "基质类型，多个用英文逗号隔开", width = 15)
	private java.lang.String natrixType;

	//基质类型名称
	@TableField(exist = false)
	private String matrixTypeName;
	/**申报*/
	@Excel(name = "申报", width = 15)
	private java.lang.String submission;
	/**备注*/
	@Excel(name = "备注", width = 15)
	private java.lang.String memo;
	/**版本号*/
	@Excel(name = "版本号", width = 15)
	private java.lang.String version;
	/**状态0未审核1审核2关闭3已转合同*/
	@Excel(name = "状态0未审核1审核2关闭3已转合同", width = 15)
	@NotEmpty(message = "状态不能为空")
	private java.lang.String status;
	/**是否启用0正常1停用*/
	@Excel(name = "是否启用0正常1停用", width = 15)
	private java.lang.String enable;
	/**删除标记0正常1删除*/
	@Excel(name = "删除标记0正常1删除", width = 15)
	private java.lang.String delFlag;
	/**创建人*/
	@Excel(name = "创建人", width = 15)
	private java.lang.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 java.util.Date createTime;
	/**最后修改人*/
	@Excel(name = "最后修改人", width = 15)
	private java.lang.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 java.util.Date updateTime;
	/**自定义字段1*/
	@Excel(name = "自定义字段1", width = 15)
	private java.lang.String def1;
	/**自定义字段2*/
	@Excel(name = "自定义字段2", width = 15)
	private java.lang.String def2;
	/**自定义字段3*/
	@Excel(name = "自定义字段3", width = 15)
	private java.lang.String def3;
	/**自定义字段4*/
	@Excel(name = "自定义字段4", width = 15)
	private java.lang.String def4;
	/**自定义字段5*/
	@Excel(name = "自定义字段5", width = 15)
	private java.lang.String def5;

	//检测指标
	private String detectionIndicators;
	/**商务经理id*/
	@Excel(name = "商务经理id(暂未用)", width = 15)
	private java.lang.String businessManager;

	//类型:1项目报价2大分子报价
	private String type;

	/**项目总金额*/
	@Excel(name = "项目总金额", width = 15)
	private String  totalProjectAmount;

	/**甲方*/
	@Excel(name = "甲方", width = 15)
	private String  firstParty;

	//甲方id
	private String firstPartyId;

	/**乙方*/
	@Excel(name = "乙方", width = 15)
	private String  secondParty;

	/**丙方*/
	@Excel(name = "丙方", width = 15)
	private String  bingParty;

	/**丁方*/
	@Excel(name = "丁方", width = 15)
	private String  dingParty;

	//空腹总计（费用单）
	private String fastingSubtotal;

	//餐后总计（费用单）
	private String postMealSubtotals;

	//总计（费用单）
	private String costTotal;

	//总计（大分子费用单）
	private String maCostTotal;

	//空腹总计（费用单）
	private String fastingSubtotalC;

	//餐后总计（费用单）
	private String postMealSubtotalsC;

	//总计（费用单）
	private String costTotalC;

	//总计（大分子费用单）
	private String maCostTotalC;

	//币别类型id（数据字典）
	private String currencyType;

	//币别类型名称
	private String currencyTypeName;

	//币别类型英文名称
	private String currencyTypeEgName;

	//币别类型中文名称
	private String currencyTypeChName;

	//明细小计合并列
	private Integer itemColspanSub;

	//最终总金额
	private String finalTotalAmount;

	//费用1标题名
	private String feeCategory1Title;

	//费用2标题名
	private String feeCategory2Title;

	//是否保存
	private String isSave;

	//是否导入合同0系统合同1导入合同
	private String isImport;

	//是否上传附件
	private String isUploadEnclosure;


	//主报价最终总金额
	private String finalTotalAmountMain;

	//付款方
	private String payerName;

	//最终申办方名称
	private String sponsorName;

	@Excel(name = "化合物")
	@TableField(exist = false)
		private java.lang.String compound;

	@Excel(name = "联系人")
	@TableField(exist = false)
	private java.lang.String contactPsn;

	@Excel(name = "联系人电话")
	@TableField(exist = false)
	private java.lang.String contactTel;

	@Excel(name = "联系人邮件")
	@TableField(exist = false)
	private java.lang.String contactEmail;

	@Excel(name = "联系人地址")
	@TableField(exist = false)
	private java.lang.String contactAddress;

	@Excel(name = "是否默认 ")
	@TableField(exist = false)
	private java.lang.String isDefault;

	@Excel(name = "联系人备注 ")
	@TableField(exist = false)
	private java.lang.String Notes;

	/**税率*/
	@Excel(name = "税率", width = 15)
	private java.lang.String taxRate;

	//客户档案id
	private String pkCustomerId;

	/**项目经理id*/
	@Excel(name = "项目经理id（BD）", width = 15)
	private String projectManagerId;

	//申办方
	@TableField(exist = false)
	private String bidParty;

	//申办方名称(客户名称)
	@TableField(exist = false)
	private String customercName;

	//客户缩写
	@TableField(exist = false)
	private String abbreviation;

	//临床方案号
	@TableField(exist = false)
	private String clinicalCode;

	//受试例数
	@TableField(exist = false)
	private String subjectsNumber;

	//周期
	@TableField(exist = false)
	private String cycle;

	//清洗期
	@TableField(exist = false)
	private String cleanPeriod;

	@Excel(name = "联系人")
	@TableField(exist = false)
	private List<FdContractContacts> contractContactsList;

	//申办方名称（客户档案名称）
	@TableField(exist = false)
	private String customerName;


	@Excel(name = "申办方 ")
	@TableField(exist = false)
	private List<FdContractBidparty> contractBidpartyList;

	@Excel(name = "项目报价选择的模板对照表 ")
	@TableField(exist = false)
	private List<FdProjectQuotationTemplate> projectQuotationTemplateList;

	//比例设定
	@TableField(exist = false)
	private List<FdContractProportion> contractProportionList;

	//采样
	@TableField(exist = false)
	private List<FdContractDetail> contractDetailList;

	//化合物
	@TableField(exist = false)
	private List<FdContractCompound> contractCompoundList;

	//收款条款表
	@TableField(exist = false)
	private List<FdContractClause> contractClauseList;

	//模板数据
	@TableField(exist = false)
	private List<FdProjectQuotationTemplateItem> contractTemplateItemList;

	//附件集合
	@TableField(exist = false)
	private List<FdContractUpload> fdContractUploadList;

	//费用单集合
	@TableField(exist = false)
	private List<fdProjectQuotationFee> fdProjectQuotationFeeList;


	//总金额
	private String totalAmount;

	//关联的主报价号
	@TableField(exist = false)
	private String relationCode;

	//关联状态
	@TableField(exist = false)
	private Integer relationStart;

	//化合物名称
	@TableField(exist = false)
	private String compoundName;

	//生物分析比例
	@TableField(exist = false)
	private String  bioanalysisProportion;

	//临床比例
	@TableField(exist = false)
	private String clinicalProportion;

	/**生物分析实验室地点*/
	@Excel(name = "生物分析实验室地点", width = 15)
	private java.lang.String biologicalAnalysisLaboratory;
	/**医院名单*/
	@Excel(name = "医院ids", width = 15)
	private java.lang.String hospitalList;
	/**生物分析实验室地点名称*/
	@Excel(name = "生物分析实验室地点名称", width = 15)
	private java.lang.String biologicalAnalysisLaboratoryName;
	/**医院名单名称*/
	@Excel(name = "医院名单名称", width = 15)
	private java.lang.String hospitalListName;
	//项目档案中分配人员权限ids
	@TableField(exist = false)
	private String personnelWithAuthorityIds;

	//BD名称
	@TableField(exist = false)
	private String bdName;

	//总受试人数
	@TableField(exist = false)
	private String subjectNumberTotal;

	//样本总数
	@TableField(exist = false)
	private String totalNumTotal;

	//清洗天数
	@TableField(exist = false)
	private String cleaningPeriodTotal;

	//采样数阶段
	@TableField(exist = false)
	private String samplesPeriodTotal;

	//是否详情
	private String isDetail;

	//客户信息(合同导出)
	@TableField(exist = false)
	private FdCustomer fdCustomer;

	//全部化合物名称
	@TableField(exist = false)
	private String compoundNameAll;

	//合同签数日期年
	@TableField(exist = false)
	private String year;

	//合同签数日期月
	@TableField(exist = false)
	private String month;

	//合同签数日期日
	@TableField(exist = false)
	private String day;

	///////////////////////////项目档案中的数据
	//项目档案号
	@TableField(exist = false)
	private String projectFileNo;

	//项目档案id
	@TableField(exist = false)
	private String projectFileId;

	//邮件对象
	@TableField(exist = false)
	private EmailEntity emailEntity;

	////报表
	/**报价总数*/
	@TableField(exist = false)
	private String translate;
	/**占比*/
	@TableField(exist = false)
	private String proportion;
	/**签约数*/
	@TableField(exist = false)
	private String signing;

	/**开始*/
	@TableField(exist = false)
	private String begin;
	/**结束*/
	@TableField(exist = false)
		private String over;
	/**报价类型*/
	@TableField(exist = false)
	private String quotationTypeId;
	/**报价类型*/
	@TableField(exist = false)
	private String quotationTypeName;
	/**创建人员名称*/
	@TableField(exist = false)
	private String createByName;

	//实验室地点ids
	@TableField(exist = false)
	private List<String> biologicalAnalysisLaboratoryIds;

	//临床中心
	@TableField(exist = false)
	private List<String> hospitalListIds;

	//BDids
	@TableField(exist = false)
	private List<String> projectManagerIds;

	//报价类型
	@TableField(exist = false)
	private List<String> quotationTypeIds;

	//报价人员
	@TableField(exist = false)
	private List<String> createByIds;

	//合同类型
	@TableField(exist = false)
	private List<String> contractTypeIds;
	//项目经理名称
	@TableField(exist = false)
	private String projectManagerName;

	@TableField(exist = false)
	private String name;

	/**创建日期开始*/
	@TableField(exist = false)
	private String createTimeStart;

	/**创建日期结束*/
	@TableField(exist = false)
	private String createTimeEnd;

	/**合同ids*/
	@TableField(exist = false)
	private List<String> contractIdList;

	/**CRO服务项目总金额-导出*/
	@TableField(exist = false)
	private String croTotal;

	/**CRO相关服务项目总金额-导出*/
	@TableField(exist = false)
	private String croCelevantTotal;

	/**临床操作总金额-导出*/
	@TableField(exist = false)
	private String clinicalOperationTotal;

	/**生物分析服务总金额-导出*/
	@TableField(exist = false)
	private String bioanalysisTotal;

	/**生物分析耗材费总金额-导出*/
	@TableField(exist = false)
	private String bioanalysisConsumablesTotal;

	/**大分子总金额-导出*/
	@TableField(exist = false)
	private String macromoleculeTotal;

	/**大分子总金额-导出*/
	@TableField(exist = false)
	private List<fdProjectQuotationFee> macromoleculeTotalList;
}
