Fin_DailyFeePaymentView.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933
  1. using Dm;
  2. using Npgsql.Replication.PgOutput;
  3. using OASystem.Domain.Entities.Financial;
  4. using OASystem.Domain.ViewModels.System;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace OASystem.Domain.ViewModels.Financial
  11. {
  12. /// <summary>
  13. /// 日付申请 View
  14. /// </summary>
  15. public class Fin_DailyFeePaymentView : Fin_DailyFeePayment
  16. { }
  17. public class Fin_DailyFeePaymentPageCount
  18. {
  19. /// <summary>
  20. /// 总条数
  21. /// </summary>
  22. public int Count { get; set; }
  23. }
  24. /// <summary>
  25. /// 日付申请 分页查询View
  26. /// </summary>
  27. public class Fin_DailyFeePaymentPageListView
  28. {
  29. /// <summary>
  30. /// 是否选中
  31. /// </summary>
  32. public bool IsChecked { get; set; }
  33. /// <summary>
  34. /// 行号
  35. /// </summary>
  36. public int RowNumber { get; set; }
  37. /// <summary>
  38. /// Id
  39. /// </summary>
  40. public int Id { get; set; }
  41. /// <summary>
  42. /// 公司Id
  43. /// </summary>
  44. public int CompanyId { get; set; }
  45. /// <summary>
  46. /// 公司名称
  47. /// </summary>
  48. public string? CompanyName { get; set; }
  49. /// <summary>
  50. /// 费用描述
  51. /// </summary>
  52. public string? Instructions { get; set; }
  53. /// <summary>
  54. /// 费用总计
  55. /// </summary>
  56. public decimal? SumPrice { get; set; }
  57. /// <summary>
  58. /// 申请人Id
  59. /// </summary>
  60. public int CreateUserId { get; set; }
  61. /// <summary>
  62. /// 申请人姓名
  63. /// </summary>
  64. public string? CreateUser { get; set; }
  65. /// <summary>
  66. /// 申请时间
  67. /// </summary>
  68. public DateTime CreateTime { get; set; }
  69. /// <summary>
  70. /// 财务审核
  71. /// </summary>
  72. public int FAudit { get; set; }
  73. /// <summary>
  74. /// 财务 审核状态
  75. /// </summary>
  76. public string? FAuditDesc
  77. {
  78. get
  79. {
  80. string str = "未审核";
  81. if (FAudit == 0) str = "未审核";
  82. else if (FAudit == 1)
  83. {
  84. str = "已通过";
  85. FAuditName = "朱成梅";
  86. }
  87. else if (FAudit == 2)
  88. {
  89. str = "未通过";
  90. FAuditName = "朱成梅";
  91. }
  92. return str;
  93. }
  94. }
  95. /// <summary>
  96. /// 财务审核人姓名
  97. /// </summary>
  98. public string? FAuditName { get; set; } = "无";
  99. /// <summary>
  100. /// 总经理审核
  101. /// </summary>
  102. public int MAudit { get; set; }
  103. /// <summary>
  104. /// 总经理 审核状态
  105. /// </summary>
  106. public string? MAuditDesc
  107. {
  108. get
  109. {
  110. string str = "未审核";
  111. if (MAudit == 0) str = "未审核";
  112. else if (MAudit == 1) { str = "已通过"; MAuditName = "张海麟"; }
  113. else if (MAudit == 2) { str = "未通过"; MAuditName = "张海麟"; }
  114. return str;
  115. }
  116. }
  117. /// <summary>
  118. /// 总经理审核姓名
  119. /// </summary>
  120. public string? MAuditName { get; set; } = "无";
  121. /// <summary>
  122. /// 费用类型
  123. /// </summary>
  124. public int PriceTypeId { get; set; }
  125. /// <summary>
  126. /// 支付标识 0,1
  127. /// </summary>
  128. public int IsPay { get; set; }
  129. }
  130. /// <summary>
  131. /// 日服申请 分页
  132. /// </summary>
  133. public class Fin_DailyFeePaymentPage
  134. {
  135. /// <summary>
  136. /// 总条数
  137. /// </summary>
  138. public int? Rows { get; set; }
  139. public List<Fin_DailyFeePaymentPageListView> Data { get; set; }
  140. }
  141. /// <summary>
  142. /// 日付申请费用明细
  143. /// </summary>
  144. public class Fin_DailyFeePaymentContentInfolView
  145. {
  146. public int Id { get; set; }
  147. /// <summary>
  148. /// 费用名称
  149. /// </summary>
  150. public string PriceName { get; set; }
  151. /// <summary>
  152. /// 数量单价
  153. /// </summary>
  154. public decimal Quantity { get; set; }
  155. /// <summary>
  156. /// 费用单价
  157. /// </summary>
  158. public decimal Price { get; set; }
  159. /// <summary>
  160. /// 当前总计
  161. /// </summary>
  162. public decimal ItemTotal { get; set; }
  163. /// <summary>
  164. /// 备注
  165. /// </summary>
  166. public string Remark { get; set; }
  167. /// <summary>
  168. /// 备注描述
  169. /// </summary>
  170. public string RemaksDescription { get; set; }
  171. /// <summary>
  172. /// Excel备注描述
  173. /// </summary>
  174. public string ExcelRemaksDescription { get; set; }
  175. }
  176. public class Fin_DailyFeePaymentInfolView
  177. {
  178. public int Id { get; set; }
  179. public int CompanyId { get; set; }
  180. public int TransferTypeId { get; set; }
  181. public int PriceTypeId { get; set; }
  182. public string Instructions { get; set; }
  183. public decimal SumPrice { get; set; }
  184. public int CreateUserId { get; set; }
  185. /// <summary>
  186. /// 财务审核
  187. /// </summary>
  188. public int FAudit { get; set; }
  189. public string FAuditDesc
  190. {
  191. get
  192. {
  193. string str = "未审核";
  194. if (FAudit == 0) str = "未审核";
  195. else if (FAudit == 1) str = "已通过";
  196. else if (FAudit == 2) str = "未通过";
  197. return str;
  198. }
  199. }
  200. /// <summary>
  201. /// 总经理审核
  202. /// </summary>
  203. public int MAudit { get; set; }
  204. public string MAuditDesc
  205. {
  206. get
  207. {
  208. string str = "未审核";
  209. if (MAudit == 0) str = "未审核";
  210. else if (MAudit == 1) str = "已通过";
  211. else if (MAudit == 2) str = "未通过";
  212. return str;
  213. }
  214. }
  215. public DateTime CreateTime { get; set; }
  216. public List<Fin_DailyFeePaymentContentInfolView> FeeContents { get; set; }
  217. }
  218. /// <summary>
  219. /// android 详情
  220. /// </summary>
  221. public class Fin_DailyFeePaymentInfoAndroidlView
  222. {
  223. public int Id { get; set; }
  224. public int CompanyId { get; set; }
  225. public int TransferTypeId { get; set; }
  226. public int PriceTypeId { get; set; }
  227. public string Instructions { get; set; }
  228. public decimal SumPrice { get; set; }
  229. public int CreateUserId { get; set; }
  230. public List<Fin_DailyFeePaymentContentInfolView> FeeContents { get; set; }
  231. }
  232. /// <summary>
  233. /// 费用类型
  234. /// </summary>
  235. public class Fin_DailyFeePaymentPagePriceTypeView
  236. {
  237. /// <summary>
  238. /// 类型Id
  239. /// </summary>
  240. public int Id { get; set; }
  241. /// <summary>
  242. /// 名称
  243. /// </summary>
  244. public string Name { get; set; }
  245. }
  246. /// <summary>
  247. /// 费用子类型
  248. /// </summary>
  249. public class Fin_DailyFeePaymentPagePriceSubTypeView
  250. {
  251. /// <summary>
  252. /// 费用类型Id
  253. /// </summary>
  254. public int STid { get; set; }
  255. /// <summary>
  256. /// 子类型Id
  257. /// </summary>
  258. public int Id { get; set; }
  259. /// <summary>
  260. /// 子类型名称
  261. /// </summary>
  262. public string Name { get; set; }
  263. }
  264. /// <summary>
  265. /// 费用类型数据源
  266. /// </summary>
  267. public class Fin_DailyFeePaymentPagePriceTypeDataView
  268. {
  269. /// <summary>
  270. /// 费用类型
  271. /// </summary>
  272. public List<Fin_DailyFeePaymentPagePriceTypeView>? FeeTypeData { get; set; }
  273. /// <summary>
  274. /// 费用子类型
  275. /// </summary>
  276. public List<Fin_DailyFeePaymentPagePriceSubTypeView>? FeeSubTypeData { get; set; }
  277. /// <summary>
  278. /// 用户名称
  279. /// </summary>
  280. public List<UserNameView>? UserNameData { get; set; }
  281. /// <summary>
  282. /// 费用标识类型
  283. /// </summary>
  284. public List<Fin_DailyFeePaymentPagePriceTypeView>? FeeMarkTypeData { get; set; }
  285. /// <summary>
  286. /// 费用子类型
  287. /// </summary>
  288. public List<Fin_DailyFeePaymentPagePriceSubTypeView>? FeeMarkSubTypeData { get; set; }
  289. /// <summary>
  290. /// 公司名称
  291. /// </summary>
  292. public List<CompanyNameView>? CompanyNameData { get; set; }
  293. }
  294. /// <summary>
  295. /// 类型数据源
  296. /// </summary>
  297. public class DailyFeePaymentDataSourceView : Fin_DailyFeePaymentPagePriceTypeView
  298. {
  299. public List<Fin_DailyFeePaymentPagePriceSubTypeView> SubDatas { get; set; }
  300. }
  301. public class tree_Fin_DailyFeePaymentPageListView : Fin_DailyFeePaymentPageListView
  302. {
  303. public List<Fin_DailyFeePaymentContentInfolView> childList { get; set; }
  304. public string priceTypeStr { get; set; }
  305. public int transferTypeId { get; set; }
  306. public string transferTypeIdStr { get; set; }
  307. /// <summary>
  308. /// 公转:62,私转:63 --2024年4月9日 16:49:46 0,1
  309. /// </summary>
  310. public int transferParentId { get; set; }
  311. public string transferParentIdStr { get; set; }
  312. }
  313. public class tree_Fin_DailyFeePaymentResult : tree_Fin_DailyFeePaymentPageListView
  314. {
  315. public decimal gz { get; set; } = 0M;
  316. public decimal sz { get; set; } = 0M;
  317. public List<tree_Fin_DailyFeePaymentPageListView> dataList { get; set; }
  318. }
  319. /// <summary>
  320. /// 团组相关费用
  321. /// </summary>
  322. public class tree_Group_DailyFeePaymentResult
  323. {
  324. public decimal gz { get; set; } = 0M;
  325. public decimal sz { get; set; } = 0M;
  326. public List<tree_Group_DailyFeePaymentPageListView> dataList { get; set; }
  327. }
  328. /// <summary>
  329. /// 团组相关费用 List
  330. /// </summary>
  331. public class tree_Group_DailyFeePaymentPageListView
  332. {
  333. public string Id { get; set; }
  334. public string GroupName { get; set; }
  335. /// <summary>
  336. /// 费用所属公司Id
  337. /// </summary>
  338. public int CompanyId { get; set; }
  339. /// <summary>
  340. /// 费用所属公司
  341. /// </summary>
  342. public string ConpanyName { get; set; }
  343. /// <summary>
  344. /// 团组总计金额
  345. /// </summary>
  346. public decimal CNYTotalAmount { get; set; }
  347. public List<Group_DailyFeePaymentContentInfolView> ChildList { get; set; }
  348. }
  349. public class CompanyInfo
  350. {
  351. public int Id { get; set; }
  352. public string ConpanyName { get; set; }
  353. }
  354. public class Group_DailyFeePaymentContentInfolView
  355. {
  356. /// <summary>
  357. /// 是否选中
  358. /// </summary>
  359. public bool IsChecked { get; set; }
  360. public int Id { get; set; }
  361. /// <summary>
  362. /// 酒店费用子类 Id
  363. /// </summary>
  364. public int HotelSubId { get; set; } = -1;
  365. /// <summary>
  366. /// 支付方式
  367. /// </summary>
  368. public string PayType { get; set; }
  369. /// <summary>
  370. /// 转账标识
  371. /// </summary>
  372. public string TransferMark { get; set; }
  373. /// <summary>
  374. /// 序号
  375. /// </summary>
  376. public int RowNumber { get; set; }
  377. /// <summary>
  378. /// 申请人
  379. /// </summary>
  380. public string Applicant { get; set; }
  381. /// <summary>
  382. /// 申请时间
  383. /// </summary>
  384. public string ApplicantDt { get; set; }
  385. /// <summary>
  386. /// 收款方
  387. /// </summary>
  388. public string Payee { get; set; }
  389. /// <summary>
  390. /// 费用名称
  391. /// </summary>
  392. public string PriceName { get; set; }
  393. /// <summary>
  394. /// 费用所属模块
  395. /// </summary>
  396. public string ModuleName { get; set; }
  397. /// <summary>
  398. /// 付款币种
  399. /// </summary>
  400. public string PayCurrCode { get; set; }
  401. /// <summary>
  402. /// 付款金额
  403. /// </summary>
  404. public decimal PaymentAmount { get; set; }
  405. /// <summary>
  406. /// 付款汇率
  407. /// </summary>
  408. public decimal PayRate { get; set; }
  409. /// <summary>
  410. /// 小计人民币金额
  411. /// </summary>
  412. public decimal CNYSubTotalAmount { get; set; }
  413. /// <summary>
  414. /// 费用描述
  415. /// </summary>
  416. public string RemaksDescription { get; set; }
  417. /// <summary>
  418. /// 审核状态
  419. /// 0 未审核 1已通过 2未通过 3 自动审核
  420. /// </summary>
  421. public int AuditStatus { get; set; }
  422. }
  423. public class PaymentRequestCheckedView
  424. {
  425. public List<int> GroupIds { get; set; }
  426. public List<int> DailyPaymentIds { get; set; }
  427. public List<int> HotelSubIds { get; set; }
  428. }
  429. #region 日付报表
  430. [SqlSugar.SugarTable("Fin_DailyFeePayment")]
  431. public class DailyFeePaymentRangeView
  432. {
  433. //public string ViewStr
  434. //{
  435. // get
  436. // {
  437. // return $"{RowIndex}、【{CompanyName}】【{TransferType}】【{FeeType}】【{Instructions}】【{SumPrice.ToString("#0.00")}】【申请人:{Applicant} 申请时间:{ApplicantDt.ToString("yyyy-MM-dd HH:mm:ss")}】";
  438. // }
  439. //}
  440. public string ViewStr
  441. {
  442. get
  443. {
  444. return $"【{CompanyName}】【{TransferType}】【{FeeType}】【{Instructions}】【{SumPrice.ToString("#0.00")}】【申请人:{Applicant} 申请时间:{ApplicantDt.ToString("yyyy-MM-dd HH:mm:ss")}】";
  445. }
  446. }
  447. [SugarColumn(IsIgnore = true)]//需要加上
  448. public int RowIndex { get; set; } //行号 序号
  449. [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
  450. public int Id { get; set; }
  451. public string Instructions { get; set; }
  452. public int PriceTypeId { get; set; }
  453. public string FeeType { get; set; }
  454. public int TransferTypeId { get; set; }
  455. public string TransferType { get; set; }
  456. public decimal SumPrice { get; set; }
  457. public DateTime FAuditDate { get; set; }
  458. public DateTime MAuditDate { get; set; }
  459. public int CompanyId { get; set; }
  460. public string CompanyName { get; set; }
  461. public int ApplicantId { get; set; }
  462. public string Applicant { get; set; }
  463. public DateTime ApplicantDt { get; set; }
  464. [Navigate(NavigateType.OneToMany, nameof(DailyFeePaymentContentView.DFPId))]//BookA表中的studenId
  465. public List<DailyFeePaymentContentView> Contents { get; set; }
  466. //public string ContentStr { get; set; }
  467. }
  468. [SqlSugar.SugarTable("Fin_DailyFeePaymentContent")]
  469. public class DailyFeePaymentContentView
  470. {
  471. //[SugarColumn(IsIgnore = true)]//需要加上
  472. //public int RowIndex { get; set; } //行号 序号
  473. [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
  474. public int Id { get; set; }
  475. public int DFPId { get; set; }
  476. public string PriceName { get; set; }
  477. public int Quantity { get; set; }
  478. public decimal Price { get; set; }
  479. public decimal ItemTotal { get; set; }
  480. public string Remark { get; set; }
  481. //public int IsDel { get; set; }
  482. /// <summary>
  483. /// 示例:费用名称:[2024.07.11招商信用卡还款] 单价:[20000.00] 数量:[1.00] 小计:[20000.00] 备注:[]
  484. /// </summary>
  485. //public string ViewStr
  486. //{
  487. // get
  488. // {
  489. // return $"费用名称:[{PriceName}] 单价:[{Price.ToString("#0.00")}] 数量:[{Quantity.ToString("#0.00")}] 小计:[{ItemTotal.ToString("#0.00")}] 备注:[{Remark}]";
  490. // }
  491. //}
  492. //public string ViewSubStr { get; set; }
  493. }
  494. public class ExcelView : DailyFeePaymentRangeView
  495. {
  496. public string ContentStr { get; set; }
  497. }
  498. #endregion
  499. #region 统计模块
  500. #region YOY
  501. public class StatisticsYOYView
  502. {
  503. public int Id { get; set; }
  504. public DateTime VisitDate { get; set; }
  505. public int Year { get; set; }
  506. public int Month { get; set; }
  507. /// <summary>
  508. /// 销售额金额
  509. /// </summary>
  510. public decimal SaleAmount { get; set; }
  511. /// <summary>
  512. /// 机票金额
  513. /// </summary>
  514. public decimal AirTicketAmount { get; set; }
  515. /// <summary>
  516. /// op金额
  517. /// </summary>
  518. public decimal OPAmount { get; set; }
  519. /// <summary>
  520. /// 其他费用金额
  521. /// </summary>
  522. public decimal OtherCostAmount { get; set; }
  523. /// <summary>
  524. /// 签证金额
  525. /// </summary>
  526. public decimal VisaAmount { get; set; }
  527. /// <summary>
  528. /// 邀请公务金额
  529. /// </summary>
  530. public decimal OAAmount { get; set; }
  531. /// <summary>
  532. /// 保险金额
  533. /// </summary>
  534. public decimal InsureAmount { get; set; }
  535. /// <summary>
  536. /// 酒店金额
  537. /// </summary>
  538. public decimal HotelAmount { get; set; }
  539. /// <summary>
  540. /// 超支金额
  541. /// </summary>
  542. public decimal ExcessAmount { get; set; }
  543. /// <summary>
  544. /// 收款退还金额
  545. /// </summary>
  546. public decimal SKTHAmount { get; set; }
  547. /// <summary>
  548. /// 成本金额
  549. /// </summary>
  550. public decimal CostAmount
  551. {
  552. get
  553. {
  554. return AirTicketAmount + HotelAmount + InsureAmount + OAAmount + VisaAmount + OtherCostAmount + OPAmount + ExcessAmount;
  555. }
  556. }
  557. /// <summary>
  558. /// 毛利润
  559. /// </summary>
  560. public decimal GrossProfitAmount
  561. {
  562. get
  563. {
  564. return SaleAmount - SKTHAmount - CostAmount;
  565. }
  566. }
  567. }
  568. public class YOYReturnView
  569. {
  570. public int Year { get; set; }
  571. public int Month { get; set; }
  572. public decimal ThisAmount { get; set; }
  573. public decimal LastAmount { get; set; }
  574. public string Yoy { get; set; }
  575. public List<int> ThisIds { get; set; }
  576. public List<int> LastIds { get; set; }
  577. /// <summary>
  578. /// 构造函数
  579. /// </summary>
  580. /// <param name="year"></param>
  581. /// <param name="month"></param>
  582. /// <param name="thisAmount"></param>
  583. /// <param name="lastAmount"></param>
  584. /// <param name="thisIds"></param>
  585. /// <param name="lastIds"></param>
  586. public YOYReturnView(int year, int month, decimal thisAmount, decimal lastAmount, List<int> thisIds, List<int> lastIds)
  587. {
  588. this.Year = year;
  589. this.Month = month;
  590. this.ThisAmount = thisAmount;
  591. this.LastAmount = lastAmount;
  592. string _yoy = "0.00%";
  593. if (lastAmount != 0)
  594. {
  595. _yoy = ((thisAmount - lastAmount) / lastAmount).ToString("#0.00") + "%";
  596. }
  597. this.Yoy = _yoy;
  598. this.ThisIds = thisIds;
  599. this.LastIds = lastIds;
  600. }
  601. }
  602. #endregion
  603. #region 国交数据统计 - 机票
  604. public class StatisticsAirTicketView
  605. {
  606. public int DIId { get; set; }
  607. public DmDateTime FlightsDate { get; set; }
  608. public int Year { get; set; }
  609. public int Month { get; set; }
  610. public int CType { get; set; }
  611. public string CTypeName { get; set; }
  612. public string FlightsCity { get; set; }
  613. public string FlightsCityName { get; set; }
  614. public int ClientNum { get; set; }
  615. }
  616. public class AirTicketReturnView
  617. {
  618. public int Year { get; set; }
  619. public int Month { get; set; }
  620. /// <summary>
  621. /// 票数
  622. /// </summary>
  623. public int Quantity { get; set; }
  624. public List<AitTicketInfo> AitTicketInfos { get; set; }
  625. public List<int> LinkGroupIds { get; set; }
  626. /// <summary>
  627. /// 构造函数
  628. /// </summary>
  629. /// <param name="year"></param>
  630. /// <param name="month"></param>
  631. /// <param name="quantity"></param>
  632. /// <param name="linkGroupIds"></param>
  633. public AirTicketReturnView(int year, int month, int quantity, List<AitTicketInfo> aitTicketInfos, List<int> linkGroupIds)
  634. {
  635. this.Year = year;
  636. this.Month = month;
  637. this.Quantity = quantity;
  638. this.AitTicketInfos = aitTicketInfos;
  639. this.LinkGroupIds = linkGroupIds;
  640. }
  641. /// <summary>
  642. /// 构造函数
  643. /// </summary>
  644. /// <param name="year"></param>
  645. /// <param name="month"></param>
  646. /// <param name="quantity"></param>
  647. /// <param name="linkGroupIds"></param>
  648. public AirTicketReturnView(int year, int month, int quantity, List<int> linkGroupIds)
  649. {
  650. this.Year = year;
  651. this.Month = month;
  652. this.Quantity = quantity;
  653. this.LinkGroupIds = linkGroupIds;
  654. }
  655. }
  656. public class AirTicketCityReturnView : AirTicketReturnView
  657. {
  658. public List<AirTicketCityInfo> CityData { get; set; }
  659. /// <summary>
  660. /// 构造函数
  661. /// </summary>
  662. /// <param name="year"></param>
  663. /// <param name="month"></param>
  664. /// <param name="quantity"></param>
  665. /// <param name="linkGroupIds"></param>
  666. public AirTicketCityReturnView(int year, int month, int quantity, List<AirTicketCityInfo> cityData, List<int> linkGroupIds)
  667. : base(year, month, quantity, linkGroupIds)
  668. {
  669. this.Year = year;
  670. this.Month = month;
  671. this.Quantity = quantity;
  672. this.CityData = cityData;
  673. this.LinkGroupIds = linkGroupIds;
  674. }
  675. }
  676. public class AitTicketInfo
  677. {
  678. public int Id { get; set; }
  679. public string GroupName { get; set; }
  680. public int Quantity { get; set; }
  681. public AitTicketInfo(int id, string groupName, int quantity)
  682. {
  683. this.Id = id;
  684. this.GroupName = groupName;
  685. this.Quantity = quantity;
  686. }
  687. }
  688. public class AirTicketCityInfo
  689. {
  690. public string City { get; set; }
  691. public int Quantity { get; set; }
  692. public AirTicketCityInfo(string city, int quantity = 0)
  693. {
  694. City = city;
  695. Quantity = quantity;
  696. }
  697. }
  698. #endregion
  699. #region 酒店
  700. public class StatisticsHotelView
  701. {
  702. public int DIId { get; set; }
  703. public string City { get; set; }
  704. public string CityStr
  705. {
  706. get
  707. {
  708. return City.Replace(" ", "").ToUpper();
  709. }
  710. }
  711. public string HotelName { get; set; }
  712. public string BookinSite { get; set; }
  713. public string CheckInDate { get; set; }
  714. //public int Year { get; set; }
  715. //public int Month { get; set; }
  716. public string CheckOutDate { get; set; }
  717. public int SingleRoomCount { get; set; }
  718. public int DoubleRoomCount { get; set; }
  719. public int SuiteRoomCount { get; set; }
  720. public int OtherRoomCount { get; set; }
  721. public int RoomNights
  722. {
  723. get
  724. {
  725. int nights = 0;
  726. if (!string.IsNullOrEmpty(CheckInDate) && !string.IsNullOrEmpty(CheckOutDate))
  727. {
  728. DateTime checkin, checkout;
  729. bool checkInBool = DateTime.TryParse(CheckInDate, out checkin);
  730. bool checkOutBool = DateTime.TryParse(CheckOutDate, out checkout);
  731. if (checkInBool && checkOutBool)
  732. {
  733. nights = (checkout - checkin).Days * RoomTotal;
  734. }
  735. }
  736. return nights;
  737. }
  738. }
  739. public int RoomTotal
  740. {
  741. get
  742. {
  743. return SingleRoomCount + DoubleRoomCount + SuiteRoomCount + OtherRoomCount;
  744. }
  745. }
  746. public StatisticsHotelView() { }
  747. public StatisticsHotelView(int diid, string city, string hotelName, string bookingSite, string checkIn, string checkOut, int singleRoom, int doubleRoomCount, int suiteRoomCount, int otherRoomCount)
  748. {
  749. DIId = diid;
  750. City = city;
  751. BookinSite = bookingSite;
  752. CheckInDate = checkIn;
  753. CheckOutDate = checkOut;
  754. SingleRoomCount = singleRoom;
  755. DoubleRoomCount = doubleRoomCount;
  756. SuiteRoomCount = suiteRoomCount;
  757. OtherRoomCount = otherRoomCount;
  758. }
  759. }
  760. public class HotelReturnView
  761. {
  762. }
  763. #endregion
  764. #region 商邀邀请
  765. public class StatisticsInvitation
  766. {
  767. public int DIId { get; set; }
  768. public string Country { get; set; } }
  769. #endregion
  770. #endregion
  771. }