EnterExitCostDraftView.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. using OASystem.Domain.Dtos;
  2. using OASystem.Domain.Dtos.Groups;
  3. using OASystem.Domain.Entities.Groups;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace OASystem.Domain.ViewModels.Groups
  10. {
  11. public class EnterExitCostDraftView:Grp_EnterExitCostDraft
  12. {
  13. }
  14. public class PermissionViewUserview
  15. {
  16. public int Id { get; set; }
  17. public string Name { get; set; }
  18. }
  19. /// <summary>
  20. /// 出入境费用info
  21. /// </summary>
  22. public class EnterExitCostDraftInfoView
  23. {
  24. public bool IsSave { get; set; }
  25. public bool IsView { get; set; } = false;
  26. public int[] ViewUsers { get; set; } = Array.Empty<int>();
  27. /// <summary>
  28. /// Id
  29. /// </summary>
  30. public int Id { get; set; }
  31. /// <summary>
  32. /// 团组Id
  33. /// </summary>
  34. public string DraftName { get; set; }
  35. /// <summary>
  36. /// 境内费用(其他费用)
  37. /// </summary>
  38. public decimal InsidePay { get; set; }
  39. #region 境内费用(其他费用)子项
  40. /// <summary>
  41. /// 签证费
  42. /// </summary>
  43. public decimal Visa { get; set; }
  44. /// <summary>
  45. /// 签证费描述
  46. /// </summary>
  47. public string? VisaRemark { get; set; }
  48. /// <summary>
  49. /// 疫苗费
  50. /// </summary>
  51. public decimal YiMiao { get; set; }
  52. /// <summary>
  53. /// 核酸检测费用
  54. /// </summary>
  55. public decimal HeSuan { get; set; }
  56. /// <summary>
  57. /// 服务费用
  58. /// </summary>
  59. public decimal Service { get; set; }
  60. /// <summary>
  61. /// 参展门票
  62. /// </summary>
  63. public decimal Ticket { get; set; }
  64. /// <summary>
  65. /// 保险费
  66. /// </summary>
  67. public decimal Safe { get; set; }
  68. public string FirstItemRemark { get; set; }
  69. #endregion
  70. /// <summary>
  71. /// 国际旅费合计(经济舱)
  72. /// </summary>
  73. public decimal OutsideJJPay { get; set; }
  74. /// <summary>
  75. /// 国际旅费合计(公务舱)
  76. /// </summary>
  77. public decimal OutsideGWPay { get; set; }
  78. /// <summary>
  79. /// 国际旅费合计(头等舱)
  80. /// </summary>
  81. public decimal OutsideTDPay { get; set; }
  82. #region 国际旅费合计(经济舱\公务舱\头等舱)
  83. /// <summary>
  84. /// 国际机票(经济舱)
  85. /// </summary>
  86. public decimal AirJJ { get; set; }
  87. /// <summary>
  88. /// 国际机票(公务舱)
  89. /// </summary>
  90. public decimal AirGW { get; set; }
  91. /// <summary>
  92. /// 国际机票(头等舱)
  93. /// </summary>
  94. public decimal AirTD { get; set; }
  95. /// <summary>
  96. /// 国外城市间交通费
  97. /// </summary>
  98. public decimal CityTranffic { get; set; }
  99. public string TwoItemRemark { get; set; }
  100. #region 汇率币种
  101. /// <summary>
  102. /// 多个币种存储
  103. /// 存储方式: 美元(USD):6.2350|.......|墨西哥比索(MXN):1.0000
  104. /// </summary>
  105. public List<CurrencyInfo>? Currencys { get; set; }
  106. #endregion
  107. #endregion
  108. #region 选择框状态
  109. /// <summary>
  110. /// 境内费用(其他费用)选择框
  111. /// </summary>
  112. public int ChoiceOne { get; set; }
  113. /// <summary>
  114. /// 国际旅费合计选择框
  115. /// </summary>
  116. public int ChoiceTwo { get; set; }
  117. /// <summary>
  118. /// 经济舱小计选择框
  119. /// </summary>
  120. public int SumJJC { get; set; }
  121. /// <summary>
  122. /// 公务舱小计选择框
  123. /// </summary>
  124. public int SumGWC { get; set; }
  125. /// <summary>
  126. /// 头等舱小计选择框
  127. /// </summary>
  128. public int SumTDC { get; set; }
  129. /// <summary>
  130. /// 住宿费合计选择框
  131. /// </summary>
  132. public int ChoiceThree { get; set; }
  133. /// <summary>
  134. /// 住宿费子项Data
  135. /// </summary>
  136. public List<DayAndCostDraftInfoView>? QuarterageData { get; set; }
  137. /// <summary>
  138. /// 伙食费合计选择框
  139. /// </summary>
  140. public int ChoiceFour { get; set; }
  141. /// <summary>
  142. /// 伙食费子项Data
  143. /// </summary>
  144. public List<DayAndCostDraftInfoView>? BoardWagesData { get; set; }
  145. /// <summary>
  146. /// 公杂费合计选择框
  147. /// </summary>
  148. public int ChoiceFive { get; set; }
  149. /// <summary>
  150. /// 公杂费子项Data
  151. /// </summary>
  152. public List<DayAndCostDraftInfoView>? MiscellaneousFeeData { get; set; }
  153. /// <summary>
  154. /// 培训费用选择框
  155. /// </summary>
  156. public int ChoiceSix { get; set; }
  157. /// <summary>
  158. /// 培训费子项Data
  159. /// </summary>
  160. public List<DayAndCostDraftInfoView>? TrainingExpenseData { get; set; }
  161. /// <summary>
  162. /// 经济舱选择框
  163. /// </summary>
  164. public int AirJJC_Checked { get; set; }
  165. /// <summary>
  166. /// 公务舱选择框
  167. /// </summary>
  168. public int AirGWC_Checked { get; set; }
  169. /// <summary>
  170. /// 头等舱选择框
  171. /// </summary>
  172. public int AirTDC_Checked { get; set; }
  173. /// <summary>
  174. /// 其他款项选择框
  175. /// </summary>
  176. public int OtherExpenses_Checked { get; set; }
  177. /// <summary>
  178. /// 其他款项子项Data
  179. /// </summary>
  180. public List<DayOtherPriceDraftView> DayOtherPriceData { get; set; }
  181. #endregion
  182. }
  183. /// <summary>
  184. /// 出入境国家(城市)费用标准子项Info View
  185. /// </summary>
  186. public class DayAndCostDraftInfoView
  187. {
  188. /// <summary>
  189. /// Id
  190. /// </summary>
  191. public int Id { get; set; }
  192. /// <summary>
  193. /// 团组Id
  194. /// </summary>
  195. public int ParentId { get; set; }
  196. /// <summary>
  197. /// 类型:1为住宿费;2为伙食费;3为公杂费;4培训费用
  198. /// </summary>
  199. public int Type { get; set; }
  200. /// <summary>
  201. /// 类型名称
  202. /// </summary>
  203. public string? TypeName
  204. {
  205. get
  206. {
  207. string str = "";
  208. if (Type == 1) str = string.Format("住宿费");
  209. else if (Type == 2) str = string.Format("伙食费");
  210. else if (Type == 3) str = string.Format("公杂费");
  211. else if (Type == 4) str = string.Format("培训费");
  212. return str;
  213. }
  214. }
  215. /// <summary>
  216. /// 天数
  217. /// </summary>
  218. public int Days { get; set; }
  219. /// <summary>
  220. /// 出入境国家费用标准 - Id
  221. /// </summary>
  222. public int NationalTravelFeeId { get; set; }
  223. /// <summary>
  224. /// 出入境国家费用标准 - 国家
  225. /// </summary>
  226. public string? Country { get; set; }
  227. /// <summary>
  228. /// 出入境国家费用标准 - 城市
  229. /// </summary>
  230. public string City { get; set; }
  231. ///// <summary>
  232. ///// 地名
  233. ///// </summary>
  234. //public string? Place { get; set; }
  235. /// <summary>
  236. /// 地名
  237. /// </summary>
  238. public string? PlaceName
  239. {
  240. get
  241. {
  242. string str = "";
  243. if (!string.IsNullOrEmpty(Country))
  244. {
  245. if (City.Contains("城市")) str = Country;
  246. else str = City;
  247. }
  248. return str;
  249. }
  250. }
  251. /// <summary>
  252. /// 费用标准
  253. /// </summary>
  254. public decimal Cost { get; set; }
  255. /// <summary>
  256. /// 币种 Id
  257. /// Sys_SetData STid = 66
  258. /// </summary>
  259. public int Currency { get; set; }
  260. /// <summary>
  261. /// 币种Code
  262. /// </summary>
  263. public string? CurremcyCode { get; set; }
  264. /// <summary>
  265. /// 币种名称
  266. /// </summary>
  267. public string? CurrencyName { get; set; }
  268. /// <summary>
  269. /// 小计
  270. /// </summary>
  271. public decimal SubTotal { get; set; }
  272. /// <summary>
  273. /// 备注
  274. /// </summary>
  275. public string? Remark { get; set; } = "";
  276. }
  277. public class DayOtherPriceDraftView
  278. {
  279. public int Id { get; set; }
  280. public int ParentId { get; set; }
  281. public int SetDataId { get; set; }
  282. public int Index { get; set; }
  283. public decimal Cost { get; set; }
  284. public int Currency { get; set; }
  285. public decimal SubTotal { get; set; }
  286. public string Remark { get; set; }
  287. }
  288. /// <summary>
  289. /// 出入境国家(城市)费用标准子项Add View
  290. /// </summary>
  291. public class DayAndCostDraftAddView
  292. {
  293. /// <summary>
  294. /// 主键编号
  295. /// </summary>
  296. public int Id { get; set; }
  297. /// <summary>
  298. /// 主表Id
  299. /// </summary>
  300. public int ParentId { get; set; }
  301. /// <summary>
  302. /// 类型:1为住宿费;2为伙食费;3为公杂费;4培训费用
  303. /// </summary>
  304. public int Type { get; set; }
  305. /// <summary>
  306. /// 天数
  307. /// </summary>
  308. public int Days { get; set; }
  309. /// <summary>
  310. /// 出入境国家费用标准 - Id
  311. /// </summary>
  312. public int NationalTravelFeeId { get; set; }
  313. /// <summary>
  314. /// 费用标准
  315. /// </summary>
  316. public decimal Cost { get; set; }
  317. /// <summary>
  318. /// 币种 Id
  319. /// Sys_SetData STid = 66
  320. /// </summary>
  321. public int Currency { get; set; }
  322. /// <summary>
  323. /// 小计
  324. /// </summary>
  325. public decimal SubTotal { get; set; }
  326. /// <summary>
  327. /// 备注
  328. /// </summary>
  329. public string? Remark { get; set; } = "";
  330. }
  331. public class DayOtherPriceDraftAddView
  332. {
  333. public int Id { get; set; }
  334. public int ParentId { get; set; }
  335. public int SetDataId { get; set; }
  336. public int Index { get; set; }
  337. public decimal Cost { get; set; }
  338. public int Currency { get; set; }
  339. public decimal SubTotal { get; set; }
  340. public string Remark { get; set; }
  341. }
  342. /// <summary>
  343. /// 出入境费用子项删除
  344. /// </summary>
  345. public class EnterExitCostDraftSubItemDelDto : DelBaseDto
  346. { }
  347. #region 移动端 草稿
  348. #region Info Parent View
  349. public class DayAndCostDraftMobileInfoView
  350. {
  351. public int SubId { get; set; }
  352. public int ParentId { get; set; }
  353. public int Type { get; set; }
  354. public int Days { get; set; }
  355. public int NationalTravelFeeId { get; set; }
  356. public string Arae { get; set; }
  357. public decimal Cost { get; set; }
  358. public int Currency { get; set; }
  359. public string CurrencyName { get; set; }
  360. public decimal SubTotal { get; set; }
  361. }
  362. public class DayOtherPriceDraftMobileInfoView
  363. {
  364. public int SubId { get; set; }
  365. public int ParentId { get; set; }
  366. public int Index { get; set; }
  367. public int SetDataId { get; set; }
  368. public string SetDataName { get; set; }
  369. public decimal Cost { get; set; }
  370. public int Currency { get; set; }
  371. public string CurrencyName { get; set; }
  372. public decimal SubTotal { get; set; }
  373. public string Remark { get; set; }
  374. }
  375. public class EnterExitCostDraftMobileParentInfoView
  376. {
  377. public int Id { get; set; }
  378. #region 汇率币种
  379. /// <summary>
  380. /// 多个币种存储
  381. /// 存储方式: 美元(USD):6.2350|.......|墨西哥比索(MXN):1.0000
  382. /// </summary>
  383. public List<CurrencyInfo> Currencys { get; set; } = new List<CurrencyInfo> { };
  384. #endregion
  385. #region 1:境内费用(其他费用)
  386. /// <summary>
  387. /// 境内费用(其他费用)选择框
  388. /// </summary>
  389. public int ChoiceOne { get; set; }
  390. /// <summary>
  391. /// 境内费用(其他费用) 合计
  392. /// </summary>
  393. public decimal ChoiceOneTotalCost { get; set; }
  394. #endregion
  395. #region 2:国际旅费
  396. /// <summary>
  397. /// 国际旅费合计选择框 (经济舱)
  398. /// </summary>
  399. public int ChoiceTwoJJ { get; set; }
  400. /// <summary>
  401. /// 国际旅费合计(经济舱)
  402. /// </summary>
  403. public decimal OutsideJJPay { get; set; }
  404. /// <summary>
  405. /// 国际旅费合计选择框(公务舱)
  406. /// </summary>
  407. public int ChoiceTwoGW { get; set; }
  408. /// <summary>
  409. /// 国际旅费合计(公务舱)
  410. /// </summary>
  411. public decimal OutsideGWPay { get; set; }
  412. /// <summary>
  413. /// 国际旅费合计选择框(头等舱)
  414. /// </summary>
  415. public int ChoiceTwoTD { get; set; }
  416. /// <summary>
  417. /// 国际旅费合计(头等舱)
  418. /// </summary>
  419. public decimal OutsideTDPay { get; set; }
  420. #endregion
  421. #region 3:住宿费
  422. /// <summary>
  423. /// 住宿费合计 选择框
  424. /// </summary>
  425. public int ChoiceThree { get; set; }
  426. /// <summary>
  427. /// 住宿费合计
  428. /// </summary>
  429. public decimal ChoiceThreeTotalCost { get; set; }
  430. #endregion
  431. #region 4:伙食费
  432. /// <summary>
  433. /// 伙食费合计 选择框
  434. /// </summary>
  435. public int ChoiceFour { get; set; }
  436. /// <summary>
  437. /// 伙食费合计
  438. /// </summary>
  439. public decimal ChoiceFourTotalCost { get; set; }
  440. #endregion
  441. #region 5:公杂费
  442. /// <summary>
  443. /// 公杂费合计 选择框
  444. /// </summary>
  445. public int ChoiceFive { get; set; }
  446. /// <summary>
  447. /// 公杂费合计
  448. /// </summary>
  449. public decimal ChoiceFiveTotalCost { get; set; }
  450. #endregion
  451. #region 6:培训费
  452. /// <summary>
  453. /// 培训费用选择框
  454. /// </summary>
  455. public int ChoiceSix { get; set; }
  456. /// <summary>
  457. /// 公杂费合计
  458. /// </summary>
  459. public decimal ChoiceSixTotalCost { get; set; }
  460. #endregion
  461. #region 7:其他
  462. /// <summary>
  463. /// 其他款项 选择框
  464. /// </summary>
  465. public int OtherExpenses_Checked { get; set; }
  466. /// <summary>
  467. /// 其他款项 选择框
  468. /// </summary>
  469. public decimal OtherExpensesTotalCost { get; set; }
  470. #endregion
  471. /// <summary>
  472. /// 经济舱费用总计
  473. /// </summary>
  474. public decimal TouristClassTotalCost
  475. {
  476. get
  477. {
  478. return OutsideJJPay <= 0 ? 0.00M : OutsideJJPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost;
  479. }
  480. }
  481. /// <summary>
  482. /// 公务舱费用总计
  483. /// </summary>
  484. public decimal BusinessClassTotalCost
  485. {
  486. get
  487. {
  488. return OutsideGWPay <= 0 ? 0.00M : OutsideGWPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost;
  489. }
  490. }
  491. /// <summary>
  492. /// 头等舱费用总计
  493. /// </summary>
  494. public decimal FirstClassTotalCost
  495. {
  496. get
  497. {
  498. return OutsideTDPay <= 0 ? 0.00M : OutsideTDPay + ChoiceOneTotalCost + ChoiceThreeTotalCost + ChoiceFourTotalCost + ChoiceFiveTotalCost + ChoiceSixTotalCost + OtherExpensesTotalCost;
  499. }
  500. }
  501. }
  502. /// <summary>
  503. /// 出入境费用详情 Dto
  504. /// </summary>
  505. public class EnterExitCostDraftInfobyDiIdDto : PortDtoBase
  506. {
  507. /// <summary>
  508. /// 团组Id
  509. /// </summary>
  510. public int DraftId { get; set; }
  511. public int CurrUserId { get; set; }
  512. }
  513. public class PostEnterExitCostDraftMobileSubInfoDto : EnterExitCostDraftInfobyDiIdDto
  514. {
  515. /// <summary>
  516. /// 费用项Type
  517. /// 1:境内费用 2:国际旅费 3:住宿费 4:伙食费 5:公杂费 6:培训费 7:其他
  518. /// </summary>
  519. public int SubType { get; set; }
  520. }
  521. public class ChoiceDraftMobileSubInfo3To6View
  522. {
  523. /// <summary>
  524. /// 主表Id
  525. /// </summary>
  526. public int ParentId { get; set; }
  527. /// <summary>
  528. /// 住宿费合计 选择框
  529. /// </summary>
  530. public int Choice { get; set; }
  531. /// <summary>
  532. /// 住宿费合计
  533. /// </summary>
  534. public decimal TotalCost { get; set; }
  535. public DayAndCostDraftMobileInfoView[] Details { get; set; }
  536. }
  537. public class ChoiceSevenDraftMobileSubInfoView
  538. {
  539. /// <summary>
  540. /// 主表Id
  541. /// </summary>
  542. public int ParentId { get; set; }
  543. /// <summary>
  544. /// 其他款项 选择框
  545. /// </summary>
  546. public int OtherExpenses_Checked { get; set; }
  547. /// <summary>
  548. /// 其他款项 选择框
  549. /// </summary>
  550. public decimal OtherExpensesTotalCost { get; set; }
  551. public DayOtherPriceDraftMobileInfoView[] Details { get; set; }
  552. }
  553. #endregion
  554. #endregion
  555. }