Fin_DailyFeePaymentView.cs 26 KB

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