using OASystem.Domain.Entities.Groups; using OASystem.Domain.ViewModels.Financial; using System; using System.Collections.Generic; using System.Data.SqlTypes; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OASystem.Domain.ViewModels.Groups { /// /// 出入境费用 View /// public class EnterExitCostView:Grp_EnterExitCost { } public class EnterExitCostGroupNameView { public int Id { get; set; } public string GroupName { get; set; } public string IsNull { get; set; } } /// /// 出入境国家(城市)费用标准 View /// public class NationalTravelFeeView : Grp_NationalTravelFee { } /// /// 出入境国家(城市)费用标准Info View /// public class NationalTravelFeeInfoView { /// /// Id /// public int Id { get; set; } /// /// 洲别 /// public string? Continent { get; set; } /// /// 国家 /// public string? Country { get; set; } /// /// 城市 /// public string? City { get; set; } /// /// 币种 /// Sys_SetData STid=66 /// public int Currency { get; set; } /// /// 币种code /// public string? CurrencyCode { get; set; } /// /// 币种Name /// public string? CurrencyName { get; set; } /// /// 住宿费 /// public decimal RoomCost { get; set; } = 0; /// /// 伙食费 /// public decimal FoodCost { get; set; } = 0; /// /// 公杂费 /// public decimal PublicCost { get; set; } = 0; /// /// 最后更新人 Id /// public int LastUpdateUserId { get; set; } /// /// 最后更新人 name /// public string? LastUpdateUserName { get; set; } /// /// 最后更新时间 /// public DateTime? LastUpdateTime { get; set; } } /// /// 出入境国家(城市)费用标准 Page Info View /// public class NationalTravelFeePageInfoView { /// /// 行号 /// public int RowNumber { get; set; } public int Id { get; set; } /// /// 洲别 /// public string? Continent { get; set; } /// /// 国家 /// public string? Country { get; set; } /// /// 城市 /// public string? City { get; set; } /// /// 币种 /// Sys_SetData STid=66 /// public int Currency { get; set; } /// /// 币种code /// public string CurrencyCode { get; set; } /// /// 币种名称 /// public string CurrencyName { get; set; } /// /// 住宿费 /// public decimal RoomCost { get; set; } /// /// 伙食费 /// public decimal FoodCost { get; set; } /// /// 公杂费 /// public decimal PublicCost { get; set; } /// /// 备注 /// public string Remark { get; set; } /// /// 最后更新人 /// public int LastUpdateUserId { get; set; } /// /// 最后更新人 /// public string LastUpdateUserName { get; set; } /// /// 最后更新时间 /// public DateTime? LastUpdateTime { get; set; } = DateTime.Now; } /// /// 出入境国家(城市)费用标准 Info View /// public class NationalTravelFeeInfoByCountryAndCityView { /// /// 洲别 /// public string? Continent { get; set; } /// /// 国家 /// public string? Country { get; set; } /// /// 城市 /// public string? City { get; set; } /// /// 币种 /// Sys_SetData STid=66 /// public int Currency { get; set; } /// /// 币种code /// public string CurrencyCode { get; set; } /// /// 币种名称 /// public string CurrencyName { get; set; } /// /// 住宿费 /// public decimal RoomCost { get; set; } /// /// 伙食费 /// public decimal FoodCost { get; set; } /// /// 公杂费 /// public decimal PublicCost { get; set; } /// /// 备注 /// public string Remark { get; set; } /// /// 最后更新人 /// public int LastUpdateUserId { get; set; } /// /// 最后更新人 /// public string LastUpdateUserName { get; set; } /// /// 最后更新时间 /// public DateTime? LastUpdateTime { get; set; } = DateTime.Now; } /// /// 出入境费用info /// public class EnterExitCostInfoView { public bool IsSave { get; set; } public bool IsView { get; set; } = false; public int[] ViewUsers { get; set; } = Array.Empty(); /// /// Id /// public int Id { get; set; } /// /// 团组Id /// public int DiId { get; set; } /// /// 境内费用(其他费用) /// public decimal InsidePay { get; set; } #region 境内费用(其他费用)子项 /// /// 签证费 /// public decimal Visa { get; set; } /// /// 签证费描述 /// public string? VisaRemark { get; set; } /// /// 疫苗费 /// public decimal YiMiao { get; set; } /// /// 核酸检测费用 /// public decimal HeSuan { get; set; } /// /// 服务费用 /// public decimal Service { get; set; } /// /// 参展门票 /// public decimal Ticket { get; set; } /// /// 保险费 /// public decimal Safe { get; set; } public string FirstItemRemark { get; set; } #endregion /// /// 国际旅费合计(经济舱) /// public decimal OutsideJJPay { get; set; } /// /// 国际旅费合计(公务舱) /// public decimal OutsideGWPay { get; set; } /// /// 国际旅费合计(头等舱) /// public decimal OutsideTDPay { get; set; } #region 国际旅费合计(经济舱\公务舱\头等舱) /// /// 国际机票(经济舱) /// public decimal AirJJ { get; set; } /// /// 国际机票(公务舱) /// public decimal AirGW { get; set; } /// /// 国际机票(头等舱) /// public decimal AirTD { get; set; } /// /// 国外城市间交通费 /// public decimal CityTranffic { get; set; } /// /// 第二项备注 /// public string TwoItemRemark { get; set; } #region 汇率币种 /// /// 多个币种存储 /// 存储方式: 美元(USD):6.2350|.......|墨西哥比索(MXN):1.0000 /// public List? Currencys{ get; set; } #endregion #endregion #region 选择框状态 /// /// 境内费用(其他费用)选择框 /// public int ChoiceOne { get; set; } /// /// 国际旅费合计选择框 /// public int ChoiceTwo { get; set; } /// /// 经济舱小计选择框 /// public int SumJJC { get; set; } /// /// 公务舱小计选择框 /// public int SumGWC { get; set; } /// /// 头等舱小计选择框 /// public int SumTDC { get; set; } /// /// 住宿费合计选择框 /// public int ChoiceThree { get; set; } /// /// 住宿费子项Data /// public List? QuarterageData { get; set; } /// /// 伙食费合计选择框 /// public int ChoiceFour { get; set; } /// /// 伙食费子项Data /// public List? BoardWagesData { get; set; } /// /// 公杂费合计选择框 /// public int ChoiceFive { get; set; } /// /// 公杂费子项Data /// public List? MiscellaneousFeeData { get; set; } /// /// 培训费用选择框 /// public int ChoiceSix { get; set; } /// /// 培训费子项Data /// public List? TrainingExpenseData { get; set; } /// /// 经济舱选择框 /// public int AirJJC_Checked { get; set; } /// /// 公务舱选择框 /// public int AirGWC_Checked { get; set; } /// /// 头等舱选择框 /// public int AirTDC_Checked { get; set; } /// /// 其他款项选择框 /// public int OtherExpenses_Checked { get; set; } /// /// 其他款项子项Data /// public List DayOtherPriceData { get; set; } #endregion } #region 移动端 public class EnterExitCostMobileGroupView { public int Id { get; set; } public string GroupName { get; set; } public bool IsNull { get; set; } public bool IsEdit { get; set; } public bool IsView { get; set; } } #region info View public class EnterExitCostMobileInfoView { public int Id { get; set; } public int DiId { get; set; } #region 汇率币种 /// /// 多个币种存储 /// 存储方式: 美元(USD):6.2350|.......|墨西哥比索(MXN):1.0000 /// public List? Currencys { get; set; } #endregion #region 1:境内费用(其他费用) /// /// 境内费用(其他费用)选择框 /// public int ChoiceOne { get; set; } /// /// 境内费用(其他费用) 合计 /// public decimal ChoiceOneTotalCost { get; set; } /// /// 境内费用(其他费用) 详情 /// public ChoiceOneMobileInfoView ChoiceOneDetails { get; set; } #endregion #region 2:国际旅费 /// /// 国际旅费合计选择框 /// public int ChoiceTwo { get; set; } /// /// 国际旅费合计(经济舱) /// public decimal OutsideJJPay { get; set; } /// /// 国际旅费合计(公务舱) /// public decimal OutsideGWPay { get; set; } /// /// 国际旅费合计(头等舱) /// public decimal OutsideTDPay { get; set; } /// /// 国际旅费 详情 /// public ChoiceTwoMobileInfoView ChoiceTwoDetails { get; set; } #endregion #region 3:住宿费 /// /// 住宿费合计 选择框 /// public int ChoiceThree { get; set; } /// /// 住宿费合计 /// public decimal ChoiceThreeTotalCost { get { return ChoiceThreeDetails.Sum(x => x.SubTotal); } } /// /// 住宿费子项 Data /// public DayAndCostMobileInfoView[] ChoiceThreeDetails { get; set; } #endregion #region 4:伙食费 /// /// 伙食费合计 选择框 /// public int ChoiceFour { get; set; } /// /// 伙食费合计 /// public decimal ChoiceFourTotalCost { get { return ChoiceFourDetails.Sum(x => x.SubTotal); } } /// /// 伙食费子项Data /// public DayAndCostMobileInfoView[] ChoiceFourDetails { get; set; } #endregion #region 5:公杂费 /// /// 公杂费合计 选择框 /// public int ChoiceFive { get; set; } /// /// 公杂费合计 /// public decimal ChoiceFiveTotalCost { get { return ChoiceFiveDetails.Sum(x => x.SubTotal); } } /// /// 公杂费子项Data /// public DayAndCostMobileInfoView[] ChoiceFiveDetails { get; set; } #endregion #region 6:培训费 /// /// 培训费用选择框 /// public int ChoiceSix { get; set; } /// /// 公杂费合计 /// public decimal ChoiceSixTotalCost { get { return ChoiceSixDetails.Sum(x => x.SubTotal); } } /// /// 培训费子项Data /// public DayAndCostMobileInfoView[] ChoiceSixDetails { get; set; } #endregion #region 7:其他 /// /// 其他款项 选择框 /// public int OtherExpenses_Checked { get; set; } /// /// 其他款项 选择框 /// public decimal OtherExpensesTotalCost { get { return OtherExpensesDetails.Sum(x => x.SubTotal); } } /// /// 其他款项子项Data /// public DayOtherPriceMobileInfoView[] OtherExpensesDetails { get; set; } #endregion /// /// 经济舱费用总计 /// public decimal TouristClassTotalCost { get { return OutsideJJPay <= 0 ? 0.00M : OutsideJJPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost; } } /// /// 公务舱费用总计 /// public decimal BusinessClassTotalCost { get { return OutsideGWPay <= 0 ? 0.00M : OutsideGWPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost; } } /// /// 头等舱费用总计 /// public decimal FirstClassTotalCost { get { return OutsideTDPay <= 0 ? 0.00M : OutsideTDPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost; } } } public class ChoiceOneMobileInfoView { /// /// 签证费 /// public decimal Visa { get; set; } /// /// 签证费描述 /// public string? VisaRemark { get; set; } /// /// 疫苗费 /// public decimal YiMiao { get; set; } /// /// 核酸检测费用 /// public decimal HeSuan { get; set; } /// /// 服务费用 /// public decimal Service { get; set; } /// /// 参展门票 /// public decimal Ticket { get; set; } /// /// 保险费 /// public decimal Safe { get; set; } public string FirstItemRemark { get; set; } } public class ChoiceOneMobileSubInfoView : ChoiceOneMobileInfoView { public int Id { get; set; } /// /// 境内费用(其他费用)选择框 /// public int ChoiceOne { get; set; } /// /// 境内费用(其他费用) 合计 /// public decimal ChoiceOneTotalCost { get; set; } } public class ChoiceTwoMobileInfoView { /// /// 国际机票(经济舱) /// public decimal AirJJ { get; set; } /// /// 国际机票(公务舱) /// public decimal AirGW { get; set; } /// /// 国际机票(头等舱) /// public decimal AirTD { get; set; } /// /// 国外城市间交通费 /// public decimal CityTranffic { get; set; } public string TwoItemRemark { get; set; } } public class ChoiceTwoMobileSubInfoView : ChoiceTwoMobileInfoView { public int Id { get; set; } /// /// 国际旅费合计选择框 (经济舱) /// public int ChoiceTwoJJ { get; set; } /// /// 国际旅费合计(经济舱) /// public decimal OutsideJJPay { get; set; } /// /// 国际旅费合计选择框(公务舱) /// public int ChoiceTwoGW { get; set; } /// /// 国际旅费合计(公务舱) /// public decimal OutsideGWPay { get; set; } /// /// 国际旅费合计选择框(头等舱) /// public int ChoiceTwoTD { get; set; } /// /// 国际旅费合计(头等舱) /// public decimal OutsideTDPay { get; set; } } public class DayAndCostMobileInfoView { public int SubId { get; set; } public int DiId { get; set; } public int Type { get; set; } public int Days { get; set; } public int NationalTravelFeeId { get; set; } public string Arae { get; set; } public decimal Cost { get; set; } public int Currency { get; set; } public string CurrencyName { get; set; } public decimal SubTotal { get; set; } } public class ChoiceMobileSubInfo3To6View { /// /// 主表Id /// public int ParentId { get; set; } /// /// 住宿费合计 选择框 /// public int Choice { get; set; } /// /// 住宿费合计 /// public decimal TotalCost { get; set; } public DayAndCostMobileInfoView[] Details { get; set; } } public class DayOtherPriceMobileInfoView { public int SubId { get; set; } public int DiId { get; set; } public int Index { get; set; } public int SetDataId { get; set; } public string SetDataName { get; set; } public decimal Cost { get; set; } public int Currency { get; set; } public string CurrencyName { get; set; } public decimal SubTotal { get; set; } public string Remark { get; set; } } public class ChoiceSevenMobileSubInfoView { /// /// 主表Id /// public int ParentId { get; set; } /// /// 其他款项 选择框 /// public int OtherExpenses_Checked { get; set; } /// /// 其他款项 选择框 /// public decimal OtherExpensesTotalCost { get; set; } public DayOtherPriceMobileInfoView[] Details { get; set; } } #endregion #region Info Parent View public class EnterExitCostMobileParentInfoView { public int Id { get; set; } public int DiId { get; set; } #region 汇率币种 /// /// 多个币种存储 /// 存储方式: 美元(USD):6.2350|.......|墨西哥比索(MXN):1.0000 /// public List Currencys { get; set; } = new List { }; #endregion #region 1:境内费用(其他费用) /// /// 境内费用(其他费用)选择框 /// public int ChoiceOne { get; set; } /// /// 境内费用(其他费用) 合计 /// public decimal ChoiceOneTotalCost { get; set; } #endregion #region 2:国际旅费 /// /// 国际旅费合计选择框 (经济舱) /// public int ChoiceTwoJJ { get; set; } /// /// 国际旅费合计(经济舱) /// public decimal OutsideJJPay { get; set; } /// /// 国际旅费合计选择框(公务舱) /// public int ChoiceTwoGW { get; set; } /// /// 国际旅费合计(公务舱) /// public decimal OutsideGWPay { get; set; } /// /// 国际旅费合计选择框(头等舱) /// public int ChoiceTwoTD { get; set; } /// /// 国际旅费合计(头等舱) /// public decimal OutsideTDPay { get; set; } #endregion #region 3:住宿费 /// /// 住宿费合计 选择框 /// public int ChoiceThree { get; set; } /// /// 住宿费合计 /// public decimal ChoiceThreeTotalCost { get; set; } #endregion #region 4:伙食费 /// /// 伙食费合计 选择框 /// public int ChoiceFour { get; set; } /// /// 伙食费合计 /// public decimal ChoiceFourTotalCost { get; set; } #endregion #region 5:公杂费 /// /// 公杂费合计 选择框 /// public int ChoiceFive { get; set; } /// /// 公杂费合计 /// public decimal ChoiceFiveTotalCost { get; set; } #endregion #region 6:培训费 /// /// 培训费用选择框 /// public int ChoiceSix { get; set; } /// /// 公杂费合计 /// public decimal ChoiceSixTotalCost { get; set; } #endregion #region 7:其他 /// /// 其他款项 选择框 /// public int OtherExpenses_Checked { get; set; } /// /// 其他款项 选择框 /// public decimal OtherExpensesTotalCost { get; set; } #endregion /// /// 经济舱费用总计 /// public decimal TouristClassTotalCost { get { return OutsideJJPay <= 0 ? 0.00M : OutsideJJPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost; } } /// /// 公务舱费用总计 /// public decimal BusinessClassTotalCost { get { return OutsideGWPay <= 0 ? 0.00M : OutsideGWPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost; } } /// /// 头等舱费用总计 /// public decimal FirstClassTotalCost { get { return OutsideTDPay <= 0 ? 0.00M : OutsideTDPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost; } } } #endregion #endregion /// /// 出入境国家(城市)费用标准子项Info View /// public class DayAndCostInfoView { /// /// Id /// public int Id { get; set; } /// /// 团组Id /// public int DiId { get; set; } /// /// 类型:1为住宿费;2为伙食费;3为公杂费;4培训费用 /// public int Type { get; set; } /// /// 类型名称 /// public string? TypeName { get { string str = ""; if (Type == 1) str = string.Format("住宿费"); else if (Type == 2) str = string.Format("伙食费"); else if (Type == 3) str = string.Format("公杂费"); else if (Type == 4) str = string.Format("培训费"); return str; } } /// /// 天数 /// public int Days { get; set; } /// /// 出入境国家费用标准 - Id /// public int NationalTravelFeeId { get; set; } /// /// 出入境国家费用标准 - 国家 /// public string? Country { get; set; } /// /// 出入境国家费用标准 - 城市 /// public string City { get; set; } ///// ///// 地名 ///// //public string? Place { get; set; } /// /// 地名 /// public string? PlaceName { get { string str = ""; if (!string.IsNullOrEmpty(Country)) { if (City.Contains("城市")) str = Country; else str = City; } return str; } } /// /// 费用标准 /// public decimal Cost { get; set; } /// /// 币种 Id /// Sys_SetData STid = 66 /// public int Currency { get; set; } /// /// 币种Code /// public string? CurremcyCode { get; set; } /// /// 币种名称 /// public string? CurrencyName { get; set; } /// /// 小计 /// public decimal SubTotal { get; set; } /// /// 备注 /// public string? Remark { get; set; } = ""; } /// /// 出入境国家(城市)费用标准子项Add View /// public class DayAndCostAddView { /// /// 主键编号 /// public int Id { get; set; } /// /// 团组Id /// public int DiId { get; set; } /// /// 类型:1为住宿费;2为伙食费;3为公杂费;4培训费用 /// public int Type { get; set; } /// /// 天数 /// public int Days { get; set; } /// /// 出入境国家费用标准 - Id /// public int NationalTravelFeeId { get; set; } /// /// 费用标准 /// public decimal Cost { get; set; } /// /// 币种 Id /// Sys_SetData STid = 66 /// public int Currency { get; set; } /// /// 小计 /// public decimal SubTotal { get; set; } /// /// 备注 /// public string? Remark { get; set; } = ""; } public class DayOtherPriceView { public int Id { get; set; } public int DiId { get; set; } public int SetDataId { get; set; } public int Index { get; set; } public decimal Cost { get; set; } public int Currency { get; set; } public decimal SubTotal { get; set; } public string Remark { get; set; } } /// /// 币种详情 /// public class CurrencyInfo { /// /// 币种Code /// public string? CurrencyCode { get; set; } /// /// 币种名称 /// public string? CurrencyName { get; set; } /// /// 币种当时汇率 /// public decimal Rate { get; set; } } }