using System;
using System.Collections.Generic;
using System.Text;
using Edu.Common.Enum.Finance;
using Edu.Model.Entity.Finance;
using VT.FW.DB;

namespace Edu.Model.ViewModel.Finance
{

    /// <summary>
    /// 财务单据扩展实体
    /// </summary>
    [Serializable]
    [DB(ConnectionName = "FinanceConnection")]
    public class RB_Finance_Extend : RB_Finance
    {

        /// <summary>
        /// 审批人信息
        /// </summary>
        public List<AuditInfo> AuditList { get; set; }
        #region 扩展属性
        /// <summary>
        /// 是否来自于日报表   1是  其他否
        /// </summary>
        public int? IsFromDayReport { get; set; }
        /// <summary>
        /// 合并单据ID
        /// </summary>
        public int? NewFinanceId { get; set; }
        /// <summary>
        /// 是否是平台款 合并 银行
        /// </summary>
        public int? IsPlatformMergeBank { get; set; }
        /// <summary>
        /// 签证产品  成本查询
        /// </summary>
        public int? IsVisaProductCost { get; set; }
        /// <summary>
        /// 是否是预付款单据   1是  其他否
        /// </summary>
        public int? IsAdvanceFinance { get; set; }
        /// <summary>
        /// 关联团队
        /// </summary>
        public int? ReTCID { get; set; }
        /// <summary>
        /// 查询会计设置的费用类型单据  1查询  其他不限
        /// </summary>
        public int? IsSelectKJSetCostType { get; set; }
        /// <summary>
        /// 会计设置费用类型id
        /// </summary>
        public int? KJCostTypeId { get; set; }
        /// <summary>
        /// 日本印象的 营业外收入  1是
        /// </summary>
        public int? IsJapanNonbusinessIncome { get; set; }

        /// <summary>
        /// 订单的交易方式
        /// </summary>
        public int? OrderTradeWay { get; set; }

        /// <summary>
        /// 平台名称
        /// </summary>
        public string PlatFormName { get; set; }

        /// <summary>
        /// 是否来自于收支款查询  1是  2否
        /// </summary>
        public int? IsFormRecPayQuery { get; set; }
        /// <summary>
        /// op提成期数的id
        /// </summary>
        public int? OPPeriodsId { get; set; }
        /// <summary>
        /// 账户员工id
        /// </summary>
        public int? AccountEmployeeId { get; set; }
        /// <summary>
        /// 资金池申请单流水号
        /// </summary>
        public string FApplyForNumber { get; set; }
        /// <summary>
        /// 公司名称
        /// </summary>
        public string BName { get; set; }
        /// <summary>
        /// 是否只查询外币单据   1是  其他否
        /// </summary>
        public int? IsSelectWBFinance { get; set; }

        /// <summary>
        /// 导入类型  1房  2餐
        /// </summary>
        public int? ImportType { get; set; }

      
        /// <summary>
        /// 团队用款补充
        /// </summary>
        public string TravelReplenish { get; set; }
        /// <summary>
        /// 机票损失航空公司类型
        /// </summary>
        public int? LossType { get; set; }
        /// <summary>
        /// 机票损失配置id
        /// </summary>
        public int? AirLossId { get; set; }
        /// <summary>
        /// 流程id
        /// </summary>
        public string TemplateIdStr { get; set; }
        /// <summary>
        /// 1是
        /// </summary>
        public int? IsRelevanceTravel { get; set; }
        /// <summary>
        /// 账户类型
        /// </summary>
        public BranchAccountEnum? BType { get; set; }
        /// <summary>
        /// 挂账冲抵金额
        /// </summary>
        public decimal? fmrMoney { get; set; }
        /// <summary>
        /// 团ids   2019-05-27 Add By:W
        /// </summary>
        public string TCIDs { get; set; }
        /// <summary>
        /// 团号
        /// </summary>
        public string TCNUM { get; set; }

        /// <summary>
        /// 地接团号
        /// </summary>
        public string DMCNum { get; set; }
        /// <summary>
        /// 酒店id
        /// </summary>
        public int? HotelId { get; set; }
        /// <summary>
        /// 订单状态
        /// </summary>
        public string StatusStr { get; set; }

        /// <summary>
        /// 详情表id
        /// </summary>
        public int? FdID { get; set; }

        /// <summary>
        /// 财务单据绑定的团id
        /// </summary>
        public int? FTCID { get; set; }
        /// <summary>
        /// 详情表id
        /// </summary>
        public string FdIDStr { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 是否来自于简易报表   1简易报表   2 年度排名统计  付款单需要根据创建日期查
        /// </summary>
        public int? IsFormEasyReport { get; set; }

        /// <summary>
        /// 来源   1票务阿米巴
        /// </summary>
        public int? SourceForm { get; set; }

        /// <summary>
        /// 支出原币金额
        /// </summary>
        public decimal? PayWBMoney { get; set; }
        /// <summary>
        /// 赔偿单id
        /// </summary>
        public int? ComplainID { get; set; }

        /// <summary>
        /// 国内票务期数的id
        /// </summary>
        public string BillIdStr { get; set; }
        /// <summary>
        /// 机票总金额
        /// </summary>
        public decimal? AirTotalMoney { get; set; }
        /// <summary>
        /// 机票总手续费
        /// </summary>
        public decimal? AirTotalPayMoney { get; set; }
        /// <summary>
        /// 账户id
        /// </summary>
        public int? AccountId { get; set; }
        /// <summary>
        /// 账户列表
        /// </summary>
        public string AccountIdStr { get; set; }

        /// <summary>
        /// 来源产品id str
        /// </summary>
        public string SourceIDStr { get; set; }

        /// <summary>
        /// 单据类型
        /// </summary>
        public string Types { get; set; }
        /// <summary>
        /// 1-常规单据，2-佣金单据
        /// </summary>
        public int? IsSpecial { get; set; }
        /// <summary>
        /// 是否查询非取消财务单据   1是  其他否
        /// </summary>
        public int? IsNotCancelFinance { get; set; }

        /// <summary>
        /// 是否查询非取消非驳回财务单据   1是  其他否
        /// </summary>
        public int? IsNotCancelAndRejectFinance { get; set; }

        /// <summary>
        /// 查询正常提交的订单
        /// </summary>
        public int? IsSelectNormal { get; set; }
        /// <summary>
        /// 是否是销售端的查询
        /// </summary>
        public int? IsSellOrderForm { get; set; }

        /// <summary>
        /// 是否是地接部专户查询
        /// </summary>
        public int? IsDiJieSelect { get; set; }

        /// <summary>
        /// 是否是票务部专户查询
        /// </summary>
        public int? IsAirTicketSelect { get; set; }
        /// <summary>
        /// 是否是机票责让查询 1是  其他否
        /// </summary>
        public int? IsAirResponsibilitySelect { get; set; }

        /// <summary>
        /// 
        /// </summary>
        //public List<RB_WorkflowAccount> walist { get; set; }
        /// <summary>
        /// 收款账号是否是平台账号
        /// </summary>
        public int? Is_Platform { get; set; }
        /// <summary>
        /// 财务单据颜色1-蓝色-已打单 2-平台出纳审核绿色- 3-银行出纳审核红色 4-通过
        /// </summary>
        public int? ColorType { get; set; }
        ///// <summary>
        ///// 排序0-团期1-汇款日期2-单号
        ///// </summary>
        //public SortEnum? Sort { get; set; }
        /// <summary>
        /// 是否跟团相关
        /// </summary>
        public int? Is_TCID { get; set; }

        /// <summary>
        /// 是否查询利润专户  1不查询  其他查询
        /// </summary>
        public int? Is_ProfitFoHF { get; set; }
        /// <summary>
        /// 机票款没绑团显示线路名称
        /// </summary>
        public string LineName { get; set; }
        /// <summary>
        /// 外币期初金额
        /// </summary>
        public decimal? RStartMoney { get; set; }
        /// <summary>g
        /// 本位币期初金额
        /// </summary>
        public decimal? StartMoney { get; set; }
        /// <summary>
        /// 签证订单集合
        /// </summary>
        public string VisaIds { get; set; }
        /// <summary>
        /// 是否是合并单据1-是0-否
        /// </summary>
        public int Is_Merge { get; set; }
        /// <summary>
        /// 合并关系列表
        /// </summary>
        //public List<RB_FinanceRelation> financeRelations { get; set; }
        /// <summary>
        /// 单据ID集合
        /// </summary>
        public List<int> FrIDList { get; set; }
        /// <summary>
        /// 国内票务期数
        /// </summary>
        public string Term { get; set; }
        /// <summary>
        /// 开户人
        /// </summary>
        public string AccountHolder { get; set; }
        /// <summary>
        /// 是否临时领队0-临时1-正式
        /// </summary>
        public int? IsLeader { get; set; }
        /// <summary>
        ///财务单据ID集合
        /// </summary>
        public string FrIDs { get; set; }

        /// <summary>
        /// 订单id
        /// </summary>
        public string OrderIdStr { get; set; }
        /// <summary>
        /// 回调参数
        /// </summary>
        public object Obj { get; set; }
        /// <summary>
        /// 审批人信息
        /// </summary>
        //public List<AuditInfo> AuditList { get; set; }
        /// <summary>
        /// 指定审核人列表
        /// </summary>
        public List<int> emList { get; set; }
        /// <summary>
        /// 指定审核人姓名列表
        /// </summary>
        public List<string> emStrList { get; set; }
        /// <summary>
        /// 产品ID集合
        /// </summary>
        public List<int> TCIDList { get; set; }

        /// <summary>
        /// 团号和团队编号
        /// </summary>
        //public List<TCIDInfo> TCIDAndTCNUMList { get; set; }
        /// <summary>
        /// 下一步审核ID
        /// </summary>
        public int? AuditId { get; set; }
        /// <summary>
        /// 下一步是否有审核人1-有2-最后一步
        /// </summary>
        public int? IsHave { get; set; }
        /// <summary>
        /// 节点描述
        /// </summary>
        public string AuditDescription { get; set; }

        /// <summary>
        /// 是否可以批量审批
        /// </summary>
        public int? IsBatchAudit { get; set; }
        /// <summary>        /// 方法
        /// </summary>
        public string Cmd { get; set; }
        /// <summary>
        /// 付款批次
        /// </summary>
        public string TicketNum { get; set; }
        /// <summary>
        /// 是否上传
        /// </summary>
        public int? IsUploadPic { get; set; }
        /// <summary>
        /// 订单下单据数量
        /// </summary>
        public int? FinanceNum { get; set; }

        /// <summary>
        /// 账户ID
        /// </summary>
        public int? BankID
        {
            get;
            set;
        }
        /// <summary>
        /// 账户类型
        /// </summary>
        public int? AccountType
        {
            get; set;
        }
        /// <summary>
        /// 交易方式
        /// </summary>
        public BranchAccountEnum? TradeWay
        {
            get; set;
        }
        /// <summary>
        /// 制单人ID
        /// </summary>
        public int? UpdateBy
        {
            get;
            set;
        }
        /// <summary>
        /// 单据名称
        /// </summary>
        public string FinanceName { get; set; }
        /// <summary>
        /// 制单开始时间
        /// </summary>
        public string sDate { get; set; }
        /// <summary>
        /// 制单结束时间
        /// </summary>
        public string eDate { get; set; }
        /// <summary>
        /// 审核开始时间
        /// </summary>
        public DateTime? sAduitDate { get; set; }
        /// <summary>
        /// 审核结束时间
        /// </summary>
        public DateTime? eAduitDate { get; set; }
        /// <summary>
        /// 费用类型ID
        /// </summary>
        public int? CostTypeID { get; set; }
        /// <summary>
        /// 费用类型名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 费用类型集合
        /// </summary>
        public string CostTypeIDs { get; set; }
        /// <summary>
        /// 不包含的费用
        /// </summary>
        public string NotCostTypeIDs { get; set; }
        /// <summary>
        /// 费用类型Id
        /// </summary>
        public string CostTypeIdStr { get; set; }
        /// <summary>
        /// 客户idstr
        /// </summary>
        public string ClientIdStr { get; set; }
        /// <summary>
        /// 交易开始日期
        /// </summary>
        public string sTradeDate { get; set; }
        /// <summary>
        /// 交易结束日期
        /// </summary>
        public string eTradeDate { get; set; }
        /// <summary>
        /// 发团开始时间
        /// </summary>
        public string QStartDate { get; set; }
        /// <summary>
        /// 发团结束时间
        /// </summary>
        public string QEndDate { get; set; }
        /// <summary>
        /// 开始金额
        /// </summary>
        public decimal? sMoney { get; set; }
        /// <summary>
        /// 结束金额
        /// </summary>
        public decimal? eMoney { get; set; }
        /// <summary>
        /// 币种ID
        /// </summary>
        public int? CurrencyId { get; set; }
        /// <summary>
        /// 币种名称
        /// </summary>
        public string CurrencyName { get; set; }
        /// <summary>
        /// 客户账户类型名称
        /// </summary>
        public string ClientTypeName { get; set; }
        /// <summary>
        /// 收入或者支出
        /// </summary>
        public string TypeName { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateByStr { get; set; }
        /// <summary>
        /// 模板类型
        /// </summary>
        public WFTTemplateTypeEnum? TemplateType
        {
            get; set;
        }
        /// <summary>
        /// 是否进入审核流程0-否1-是(审核驳回也为0)
        /// </summary>
        public int? InOrNotProcess
        {
            get; set;
        }
        /// <summary>
        /// 是否催审   1是 0否
        /// </summary>
        public int? IsFinancePushOn { get; set; }
        /// <summary>
        /// 制单人和当前审核人是否是同一个人1-同一个人
        /// </summary>
        public int? Is_Self { get; set; }
        /// <summary>
        /// 窗口负责人
        /// </summary>
        //public List<RB_Window_Employee_Relation> WindowEmIdList { get; set; }
        /// <summary>
        /// 窗口ID
        /// </summary>
        public int? WindowId { get; set; }
        ///// <summary>
        ///// 出纳会计窗口
        ///// </summary>
        //public WindowTypeEnum? WindowType { get; set; }
        ///// <summary>
        ///// 我发起的，我审批的，待我审批，抄送给我的，我作废的
        ///// </summary>
        //public FinanceConditionEnum? Conditon { get; set; }
        /// <summary>
        /// 费用类型列表
        /// </summary>
        public List<string> CostTypeList { get; set; }
        /// <summary>
        /// 原币金额列表
        /// </summary>
        public List<decimal> OriginalMoney { get; set; }
        ///// <summary>
        ///// 合并单据信息
        ///// </summary>
        //public MergeInfo Merge { get; set; }
        /// <summary>
        /// 合并单据明细
        /// </summary>
        public List<RB_FinanceDetail_Extend> MergeDetailList { get; set; }
        /// <summary>
        /// 会计合并单据明细
        /// </summary>
        public List<RB_FinanceDetail_Extend> AccountantMergeDetailList { get; set; }

        /// <summary>
        /// 领队返款单据明细
        /// </summary>
        public List<RB_FinanceDetail_Extend> LeaderRefundDetailList { get; set; }

      

        /// <summary>
        /// 财务收据
        /// </summary>
        //public RB_Finance_Receipt_Extend ReceiptModel { get; set; }

        /// <summary>
        /// 单据明细
        /// </summary>
        public List<RB_FinanceDetail_Extend> detailList { get; set; }
        /// <summary>
        /// 审核步骤
        /// </summary>
        public List<User.Rb_Workflow_AuditRelevance_Extend> AuditSteps { get; set; }
        /// <summary>
        /// 原路退款订单号
        /// </summary>
        //public List<RB_Online_Trade_Detail_Extend> TradeDetailList { get; set; }
        /// <summary>
        /// 地接一键审批单据
        /// </summary>
        public List<RB_FinanceDetail_Extend> DijieBathFinanceList { get; set; }
        /// <summary>
        /// 账户列表
        /// </summary>
        public List<RB_TradeWay_Extend> BankList { get; set; }
        /// <summary>
        /// 合并后交易方式
        /// </summary>
        public List<RB_TradeWay_Extend> MergeBankList { get; set; }
        /// <summary>
        /// 凭证实体
        /// </summary>
        public List<RB_Voucher_Extend> vorcherInos { get; set; }

        /// <summary>
        /// tcid  逗号分割
        /// </summary>
        public string TCIDStr { get; set; }

        /// <summary>
        /// 是否有效的状态  1是  其他否
        /// </summary>
        public int? EfficaciousStatus { get; set; }

        /// <summary>
        /// 是否自动产生财务单据
        /// </summary>
        public int? IsAutoPayFinance { get; set; }
        #endregion
        #region 统计数据 
        /// <summary>
        /// 本位币上日余额
        /// </summary>
        public decimal? AgoMoney { get; set; }
        /// <summary>
        /// 外币上日余额
        /// </summary>
        public decimal? WBAgoMoney { get; set; }
        /// <summary>
        /// 外币借方金额
        /// </summary>
        public decimal? AgoIncome { get; set; }
        /// <summary>
        /// 本位币借方金额
        /// </summary>
        public decimal? Income { get; set; }
        /// <summary>
        /// 收据金额/未认款金额
        /// </summary>
        public decimal? ReceiptMoney { get; set; }
        /// <summary>
        /// 收据外币金额/未认款外币金额
        /// </summary>
        public decimal? ReceiptWBMoney { get; set; }
        /// <summary>
        /// 未付帐金额
        /// </summary>
        public decimal? NONPaymentMoney { get; set; }
        /// <summary>
        /// 未付帐外币
        /// </summary>
        public decimal? NONPaymentWBMoney { get; set; }
        /// <summary>
        /// 外币贷方金额
        /// </summary>
        public decimal? AgoOutCome { get; set; }

        /// <summary>
        /// 本位币贷方金额
        /// </summary>
        public decimal? OutCome { get; set; }
        /// <summary>
        /// 借方笔数
        /// </summary>
        public int? IncomeCount { get; set; }
        /// <summary>
        /// 贷方笔数
        /// </summary>
        public int? OutComeCount { get; set; }
        /// <summary>
        /// 别名
        /// </summary>
        public string Alias { get; set; }
        /// <summary>
        /// 账户类型ID
        /// </summary>
        public int? TypeId { get; set; }
        /// <summary>
        /// 账户类型名称
        /// </summary>
        public string AName { get; set; }

        /// <summary>
        /// 是否是银行
        /// </summary>
        public int? IsBank { get; set; }
        #endregion
       
        /// <summary>
        /// 地接费领取总数
        /// </summary>
        public int DMCUsePriceCount { get; set; }

        #region 收支款统计查询
        /// <summary>
        /// 应收金额
        /// </summary>
        public decimal? SumYingShou { get; set; }
        /// <summary>
        /// 实收金额
        /// </summary>
        public decimal? SumShiShou { get; set; }
        /// <summary>
        /// 应付金额
        /// </summary>
        public decimal? SumYingFu { get; set; }
        /// <summary>
        /// 实付金额
        /// </summary>
        public decimal? SumShiFu { get; set; }
        #endregion
    }

    /// <summary>
    /// 审批人信息
    /// </summary>
    public class AuditInfo
    {
        /// <summary>
        /// 审批人ID
        /// </summary>
        public int? AuditEmId { get; set; }
        /// <summary>
        /// 审批日期
        /// </summary>
        public DateTime? AuditDate { get; set; }
        /// <summary>
        /// 审批人ID
        /// </summary>
        public string AuditEmName { get; set; }
    }
}
