package com.jeeplus.finance.projectReport.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeeplus.core.query.Query;
import com.jeeplus.core.service.dto.BaseDTO;
import com.jeeplus.finance.common.flowable.dto.CommitParamDTO;
import com.jeeplus.finance.projectReport.service.dto.ProjectContactInfo;
import com.jeeplus.finance.projectReport.service.dto.ProjectReportInfo;
import com.jeeplus.finance.projectReport.service.dto.ProjectReportWorkAttachmentDTO;
import com.jeeplus.sys.domain.WorkAttachmentInfo;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @author: 徐滕
 * @version: 2022-11-11 15:42
 */
@Data
public class CwProjectReportData extends BaseDTO {

    private String[] archivingStatus;

    /**
     * 总的咨询营业收入
     */
    private String ziXunShouRuAll;
    /**
     * 项目类型(用来区分造价审核项目与工程咨询项目，1：造价审核。2：工程咨询)
     */
    private String projectType;
    /**
     * 项目类别
     */
    private String projectCategory;

    private int onlineOverdueDates; //在线归档超期天数

    private int paperOverdueDates; //纸质归档超期天数

    private Date issueCompleteTime; //报告签发流程结束修改时间
    private Date checkCompleteTime; //报告复核流程结束修改时间

    private String mark;  //标记

    //案卷号
    private String filedNo;
    //确认案卷号
    private String confirmFiledNo;
    //合同金额
    private String contractAmount;
    //合同类型
    private String contractType;
    //纸质归档流程id
    private String paperArchivingTaskId;
    //纸质归档流程状态
    private String paperArchivingStatus;
    //纸质归档流程procinsid
    private String paperArchivingProcInsId;
    //纸质归档id
    private String paperArchivingId;

    private String remarks;

    private List<ProjectContactInfo> contactInfos;

    private List<ProjectContactInfo> constructionParty;

    private List<ProjectReportInfo> projectReportInfos;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date planStartDate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createDate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date planEndDate;

    // 项目开始时间
    private String projectStartTime;
    // 项目结束时间
    private String projectEndTime;

    //委托方
    private String clientName;
    //项目金额
    private String projectMoney;
    //合同编号
    private String contractNo;

    //归档申请人名称
    private String applyUserName;
    //归档申请人id
    private String applyUserId;

    //线上归档流程id
    private String onlineArchivingTaskId;
    //线上归档流程状态
    private String onlineArchivingStatus;
    //线上归档流程procinsid
    private String onlineArchivingProcInsId;
    //线上归档id
    private String onlineArchivingId;
    private String onlineRemarks;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date applyDates;

    //报告签发流程id
    private String signAndIssueTaskId;
    //报告签发流程状态
    private String signAndIssueStatus;
    //报告签发
    private String procInsId4;
    //报告签发id
    private String signAndIssueId;

    private List<CwProjectReviewNewTeam> detailInfos;

    //下一节点审核人名称
    private String reviewByName;

    private String reviewNewId;

    //项目等级
    private String projectLevel;
    /**
     * 注册/资格证号
     */
    private String enrollCertNo;

    /**
     * 专业
     */
    private String profession;
    /**
     * 证书类型
     */
    private String professionType;

    /**
     * 成员名称
     */
    private String memberName;

    /**
     * 项目负责人
     */
    private String projectManager;
    /**
     * 项目负责人id
     */
    private String projectManagerId;

    /**
     * 项目创建人
     */
    private String projectCreateByName;

    /**
     * 项目创建时间
     */
    private Date projectCreateTime;

    private String reviewFee;  //送审价
    private String approvalFee;  //审定价
    private String contractCategory;  //合同类别
    private String contractFee;  //合同价
    private String contractRate;  //费率
    private String verifyFee;  //核增核减额
    private String verifyRate;  //核增核减率
    private String consultFee;  //咨询标的额
    private String buildingFee;  //土建造价
    private String installFee;  //安装造价
    private String buildingRate;  //土建比例
    private String installRate;  //安装比例
    private String workStartDate;  //工作开始时间
    private String workEndDate;  //工作结束时间
    private String ziXunShouRu;  //造价咨询营业收入

    //报告号申请流程的  流程id，及流程状态  及 取号类型  及  非正常取号原因
    @TableField(exist = false)
    private String applyProcId;
    @TableField(exist = false)
    private String applyProcDefId;
    @TableField(exist = false)
    private String applyStatus;
    @TableField(exist = false)
    private String takeNumberType;
    @TableField(exist = false)
    private String improperTakeCause;


    //报告号申请流程的  流程id，及流程状态  及 取号类型  及  非正常取号原因
    @TableField(exist = false)
    private String applyReviewProcId;
    @TableField(exist = false)
    private String applyReviewProcDefId;
    @TableField(exist = false)
    private String applyReviewStatus;

    /**
     * 报告号复核流程taskId
     */
    private String reviewTaskNumberId;



    /**
     * 区分新旧数据
     */
    private String newType;
    @TableField(exist = false)
    private String procInsReview;

    /**
     * 报告主办人
     */
    private String reportSponsor;

//    private String createBy;

    @TableField(exist = false)
    private String createById;

    @TableField(exist = false)
    private String projectInfoId;



    //单据编号（字典值）
    public static final String BIZ_CODE = "13";
    /**
     * 单据编号
     */
    @Excel(name = "单据编号",width = 20,orderNum = "1")
    private String documentNo;
    /**
     * 项目名称
     */
    @Query(tableColumn = "b.project_name")
    @Excel(name = "项目名称",width = 40,orderNum = "3")
    private String projectName;
    /**
     * 项目编号
     */
    @Query(tableColumn = "b.project_number")
    @Excel(name = "项目编号",width = 20,orderNum = "2")
    private String projectNumber;

    private String newLineId; //项目编号id
    /**
     * 项目id
     */
    private String projectId;
    /**
     * 报告所属部门
     */
    private String officeId;


    @TableField(exist = false)
    @Excel(name = "报告所属部门",width = 20,orderNum = "6")
    private String departmentName; //部门名称
    /**
     * 项目经理
     */
    @Excel(name = "项目经理",width = 12,orderNum = "7")
    private String projectMasterName;

    /**
     * 项目经理2
     */
    private String realHeaderName;

    /**
     * 项目经理2id
     */
    private String projectMasterId2;

    private String projectMasterId1;

    /**
     * 项目经理id
     */
    @TableField(exist = false)
    private String projectMasterId;
    /**
     * 签字注师1
     */
    private String signatureAnnotator1;
    /**
     * 签字注师2
     */
    private String signatureAnnotator2;
    /**
     * 盖章类型
     */
    private String signatureType;

    /**
     * 流程id
     */
    private String procInsId;

    private String processDefinitionId;

    /**
     * 创建人
     */
    @TableField(exist = false)
    @Excel(name = "创建人",width = 12,orderNum = "8")
    private String userName; //用户名

    /**
     * 创建时间
     */
    @Excel(name = "创建时间", exportFormat="yyyy-MM-dd",width = 16,orderNum = "9")
    private Date createTime;

    /**
     * 状态
     */
    private String status;

    //新建行数据
    @TableField(exist = false)
    List<CwProjectInfoData> cwProjectInfoList;

    //新建行历史数据
    @TableField(exist = false)
    List<CwProjectInfoData> cwWorkClientContactDTOList;

    @TableField(exist = false)
    private String[] contractDates;

    @TableField(exist = false)
    private String[] createDates;

    /**
     * 签章documentId
     */
    private String signatureDocumentId;

    /**
     * 签章contractId
     */
    private String signatureContractId;

    /**
     * 流程通过所需参数DTO
     */
    private CommitParamDTO<CwProjectReportData> CommitParamDTO;

    /**
     * 公章流程procInsId
     */
    private String procInsId1;

    /**
     * 公章流程processDefinitionId
     */
    private String processDefinitionId1;

    /**
     * 公章流程status
     */
    @Excel(name = "签章状态",width = 12,orderNum = "11")
    private String status1;

    /**
     * 公章流程表id
     */
    private String sid1;

    /**
     * 公章+执业章流程procInsId
     */
    private String procInsId2;

    /**
     * 公章+执业章流程processDefinitionId
     */
    private String processDefinitionId2;

    /**
     * 公章+执业章流程status
     */
    private String status2;

    /**
     * 公章+执业章流程表id
     */
    private String sid2;

    /**
     * 实体章流程procInsId
     */
    private String procInsIds3;

    /**
     * 实体章流程processDefinitionId
     */
    private String processDefinitionId3;

    /**
     * 实体章流程status
     */
    private String status3;

    /**
     * 实体章流程表id
     */
    private String sid3;

    /**
     * 电子签章文件地址
     */
    private String signatureUrl;

    /**
     * 报告实际制作人
     */
    private String realCreate;

    /**
     * 审计收费（元）
     */
    @Excel(name = "审计收费（元）",width = 12,orderNum = "5")
    private String auditFees;

    /**
     * 为签章附件信息
     */
    List<ProjectReportWorkAttachmentDTO> cwFileInfoList;

    /**
     * 附件信息
     */
    List<WorkAttachmentInfo> cwFileInfoList2;

    /**
     * 附件信息 - 报告号申请流程
     */
    List<WorkAttachmentInfo> cwFileInfoList3;

    /**
     * 已签章附件信息
     */
    List<ProjectReportWorkAttachmentDTO> signatureFileList;

    /**
     * 报告名称
     */
    private String reportName;
    /**
     * 被服务单位名称
     */
    @TableField(exist = false)
    private String servedUnitName;

    /**
     * 报告日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private Date reportDate;

    /**
     * 报告类型
     */
    @TableField(exist = false)
    private String reportType;

    /**
     * 意见类型
     */
    @TableField(exist = false)
    private String opinionType;

    /**
     * 盖章状态
     */
    @TableField(exist = false)
    private String sealType;

    /**
     * 被服务单位id
     */
    private String servedUnitId;

    /**
     * 报告流水号
     */
    private String reportNumber;
    /**
     * 报告文号
     */
    @Excel(name = "报告文号",width = 12,orderNum = "4")
    private String reportNo;

    private String[] contractAmounts;

    /**
     * 报告复核流程id
     */
    private String procInsId3;

    /**
     * 报告复核流程状态
     */
    @Excel(name = "复核状态",width = 12,orderNum = "10")
    private String reviewStatus;

    /**
     *业务类型
     */
    private String businessType;

    /**
     *审计业务类型
     */
    private String auditBusinessType;

    /**
     *公司注册地址
     */
    private String registerAddress;

    /**
     *业务所在地
     */
    private String businessLocation;

    /**
     *是否数据证券业务
     */
    private String securityBusiness;

    /**
     * 复核信息表
     */
    private List<CwProofreadDetail> details;

    /*
    计算机文号
     */
    private String computerNo;

    /**
     * 本报告共印份数
     */
    private String allPrintNum;

    /**
     * 发出份数
     */
    private String issueNum;

    /**
     * 存档份数
     */
    private String placeOnFileNum;

    /**
     * 打印人签名
     */
    private String printedBy;

    /**
     * 校对人签名
     */
    private String checkAutograph;

    /**
     * 财务-报告表id
     */
    private String reportId;

    /**
     * 报告类型及标题
     */
    private String reportTitleType;

    /**
     * 一级复核需提请关注或修改的事项
     */
    private String needUpdate1;

    /**
     * 二级复核需提请关注或修改的事项
     */
    private String needUpdate2;

    /**
     * 三级复核需提请关注或修改的事项
     */
    private String needUpdate3;

    /**
     * 一级复核备注
     */
    private String remark1;

    /**
     * 二级复核备注
     */
    private String remark2;

    /**
     * 三级复核备注
     */
    private String remark3;

    /**
     * 财务-报告编号
     */
    private String reportReviewNo;

    /**
     * 下一个节点审核人信息
     */
    List<ReviewUser> reviewBys;

    private String reviewBy;

    /**
     * 项目经理2id
     */
    private String projectMaster2Id;

    /**
     * 项目经理2name
     */
    private String projectMaster2Name;

    /**
     * 复核流程taskId
     */
    private String revTaskId;

    /**
     * 报告号申请流程taskId
     */
    private String revTaskId2;

    /**
     * 签章-电子章  流程taskId
     */
    private String signTaskId1;

    /**
     * 签章-公章+执业章  流程taskId
     */
    private String signTaskId2;

    /**
     * 签章-实体章  流程taskId
     */
    private String signTaskId3;

    /**
     * 数据审核人  报告复核
     */
    private List<String> auditUserIdsRev;

    /**
     * 数据审核人  签章-电子章
     */
    private List<String> auditUserIdsSign1;

    /**
     * 数据审核人  签章-公章+执业章
     */
    private List<String> auditUserIdsSign2;

    /**
     * 数据审核人  签章-实体章
     */
    private List<String> auditUserIdsSign3;

    /**
     * 所属行业
     */
    private String industry;

    /**
     * 业务对象
     */
    private String businessObjects;

    /**
     * 报备类型
     */
    private String filingType;

    /**
     * 合同名称
     */
    private String contractName;

    /**
     * 合同id
     */
    private String contractId;

    /**
     * 签字注师审核状态
     */

    private String signatureAnnotatorStatus;

    /**
     * 修改原因
     */
    private String reason;

    /**
     * 修改签字注师流程id
     */
    private String procInsSigId;

    /**
     * 修改原因
     */
    private String sigReason;

    /**
     * 修改签字注师  流程taskId
     */
    private String taskSigId;
}
