DeliveryEntrustOrder.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Text.RegularExpressions;
  6. //----------------------------------------------------------------
  7. //Module Name: $safeprojectname$
  8. //Purpose:
  9. //CopyRight: Muchinfo
  10. //History:
  11. //----------------------------------------------------------------
  12. //DateTime 2016/8/5 9:31:32
  13. //Author
  14. //Description Create
  15. //----------------------------------------------------------------
  16. using Muchinfo.MTPClient.Data.Enums;
  17. using Muchinfo.MTPClient.Data.Helper;
  18. using GalaSoft.MvvmLight;
  19. using System.Windows;
  20. namespace Muchinfo.MTPClient.Data.Model.Delivery
  21. {
  22. /// <summary>
  23. /// 交割申报查询
  24. /// </summary>
  25. public class DeliveryEntrustOrder : ViewModelBase
  26. {
  27. /// <summary>
  28. /// 最小交割手数mtp.2.0 NEW
  29. /// </summary>
  30. [PropertyDisc("LimitSum")]
  31. public long LimitSum { get; set; }
  32. /// <summary>
  33. /// 主辅商品比的主手数 mtp.2.0 NEW
  34. /// </summary>
  35. [PropertyDisc("XLIMITCONVERSION")]
  36. public long XlimitConversion { get; set; }
  37. /// <summary>
  38. /// 主辅商品比的辅手数 mtp.2.0 NEW
  39. /// </summary>
  40. [PropertyDisc("PLIMITCONVERSION")]
  41. public long PlimitConversion { get; set; }
  42. /// <summary>
  43. /// 交易收申请ID
  44. /// </summary>
  45. [PropertyDisc("DeliveryOrderId")]
  46. public long DeliveryOrderId { get; set; }
  47. /// <summary>
  48. /// 交收商品ID
  49. /// </summary>
  50. [PropertyDisc("DeliveryGoodsId")]
  51. public uint DeliveryGoodsId { get; set; }
  52. /// <summary>
  53. /// 交收商品代码
  54. /// </summary>
  55. [PropertyDisc("DeliveryGoodsCode")]
  56. public string DeliveryGoodsCode { get; set; }
  57. /// <summary>
  58. /// 交收商品名称
  59. /// </summary>
  60. [PropertyDisc("DeliveryGoodsName")]
  61. public string DeliveryGoodsName { get; set; }
  62. /// <summary>
  63. /// 交收商品数量
  64. /// </summary>
  65. [PropertyDisc("DeliveryQty")]
  66. public decimal DeliveryQty { get; set; }
  67. /// <summary>
  68. /// 交割关系-兑换系数
  69. /// </summary>
  70. [PropertyDisc("Conversion")]
  71. public decimal Conversion { get; set; }
  72. /// <summary>
  73. /// 冻结保证金
  74. /// </summary>
  75. [PropertyDisc("FreezeMargin")]
  76. public decimal FreezeMargin { get; set; }
  77. /// <summary>
  78. /// 主商品交易货款/冻结货款
  79. /// </summary>
  80. [PropertyDisc("OrderAmount")]
  81. public decimal OrderAmount { get; set; }
  82. public string OrderAmountDisplay
  83. {
  84. get
  85. {
  86. if (OrderAmount != decimal.Zero)
  87. {
  88. return OrderAmount.ToString("f2");
  89. }
  90. else
  91. {
  92. return "-";
  93. }
  94. }
  95. }
  96. /// <summary>
  97. /// 申报状态
  98. /// </summary>
  99. [PropertyDisc("DeliveryOrderStatus")]
  100. public eDeliveryOrderStatus OrderStatus { get; set; }
  101. private eOrderFromType _orderFrom = eOrderFromType.Ative;
  102. /// <summary>
  103. /// 申报来源:0 客户端,1 管理端
  104. /// </summary>
  105. [PropertyDisc("OrderFrom")]
  106. public eOrderFromType OrderFrom
  107. {
  108. get { return _orderFrom; }
  109. set { _orderFrom = value; }
  110. }
  111. /// <summary>
  112. /// 申报时间
  113. /// </summary>
  114. [PropertyDisc("OrderTime")]
  115. public DateTime OrderTime { get; set; }
  116. /// <summary>
  117. /// 申报时间-转换FORMAT
  118. /// </summary>
  119. public string OrderTimeDisplay
  120. {
  121. get
  122. {
  123. return OrderTime == DateTime.MinValue ? "-" : OrderTime.ToString("yyyy-MM-dd HH:mm:ss");
  124. }
  125. }
  126. /// <summary>
  127. /// 账号
  128. /// </summary>
  129. [PropertyDisc("accountid")]
  130. public ulong accountid { get; set; }
  131. /// <summary>
  132. /// 申报人
  133. /// </summary>
  134. [PropertyDisc("OperatorId")]
  135. public ulong OperatorId { get; set; }
  136. /// <summary>
  137. /// 审核时间
  138. /// </summary>
  139. [PropertyDisc("AuditTime")]
  140. public DateTime AuditTime { get; set; }
  141. /// <summary>
  142. /// 账号
  143. /// </summary>
  144. [PropertyDisc("accountname")]
  145. public string Accountname { get; set; }
  146. /// <summary>
  147. /// 申报备注
  148. /// </summary>
  149. [PropertyDisc("AuditRemark")]
  150. public string AuditRemark { get; set; }
  151. /// <summary>
  152. /// 商品ID
  153. /// </summary>
  154. [PropertyDisc("XGoodsId")]
  155. public long XGoodsId { get; set; }
  156. /// <summary>
  157. /// 交易商代碼
  158. /// </summary>
  159. [PropertyDisc("XGoodsCode")]
  160. public string XGoodsCode { get; set; }
  161. /// <summary>
  162. /// 交易商品名称
  163. /// </summary>
  164. [PropertyDisc("XGoodsName")]
  165. public string XGoodsName { get; set; }
  166. /// <summary>
  167. /// 交易商品-结算价
  168. /// </summary>
  169. [PropertyDisc("XDeliveryPrice")]
  170. public decimal XDeliveryPrice { get; set; }
  171. public string XDeliveryPriceDisplay
  172. {
  173. get
  174. {
  175. if (XDeliveryPrice != decimal.Zero && XDeliveryPrice != 0)
  176. {
  177. return XDeliveryPrice.ToString("f2");
  178. }
  179. else
  180. {
  181. return "-";
  182. }
  183. }
  184. }
  185. /// <summary>
  186. /// 交易商品-数量
  187. /// </summary>
  188. [PropertyDisc("XDeliveryQty")]
  189. public decimal XDeliveryQty { get; set; }
  190. /// <summary>
  191. /// 关联交易商品ID
  192. /// </summary>
  193. [PropertyDisc("PGoodsID")]
  194. public long PGoodsID { get; set; }
  195. /// <summary>
  196. /// 关联交易商品1名称
  197. /// </summary>
  198. [PropertyDisc("PGoodsName")]
  199. public string PGoodsName { get; set; }
  200. /// <summary>
  201. ///关联交易2 商品代码
  202. /// </summary>
  203. [PropertyDisc("PGoodsCode")]
  204. public string PGoodsCode { get; set; }
  205. /// <summary>
  206. /// 关联交易商品数量
  207. /// </summary>
  208. [PropertyDisc("PDeliveryQty")]
  209. public decimal PDeliveryQty { get; set; }
  210. /// <summary>
  211. /// 关联交易商品价格
  212. /// </summary>
  213. [PropertyDisc("PDeliveryPrice")]
  214. public decimal PDeliveryPrice { get; set; }
  215. /// <summary>
  216. /// 关联交易商品价格- 字符显示=》结算价
  217. /// </summary>
  218. public string PDeliveryPriceDisplay
  219. {
  220. get
  221. {
  222. if (PDeliveryPrice != decimal.Zero && PDeliveryPrice != 0)
  223. {
  224. return PDeliveryPrice.ToString("f2");
  225. }
  226. else
  227. {
  228. return "-";
  229. }
  230. }
  231. }
  232. [PropertyDisc("PPriceMode")]
  233. public int PPriceMode { get; set; }
  234. /// <summary>
  235. /// 关联交易商品ID2
  236. /// </summary>
  237. [PropertyDisc("P2GoodsID")]
  238. public long P2GoodsID { get; set; }
  239. /// <summary>
  240. /// 关联交易商品名称2
  241. /// </summary>
  242. [PropertyDisc("P2GoodsName")]
  243. public string P2GoodsName { get; set; }
  244. /// <summary>
  245. ///关联交易 商品代码
  246. /// </summary>
  247. [PropertyDisc("P2GoodsCode")]
  248. public string P2GoodsCode { get; set; }
  249. /// <summary>
  250. /// 关联交易商品数量2
  251. /// </summary>
  252. [PropertyDisc("P2DeliveryQty")]
  253. public decimal P2DeliveryQty { get; set; }
  254. /// <summary>
  255. /// 关联交易商品价格
  256. /// </summary>
  257. [PropertyDisc("P2DeliveryPrice")]
  258. public decimal P2DeliveryPrice { get; set; }
  259. /// <summary>
  260. /// 关联交易商品价格- 字符显示=》结算价
  261. /// </summary>
  262. public string P2DeliveryPriceDisplay
  263. {
  264. get
  265. {
  266. if (P2DeliveryPrice != decimal.Zero && P2DeliveryPrice != 0)
  267. {
  268. return P2DeliveryPrice.ToString("f2");
  269. }
  270. else
  271. {
  272. return "-";
  273. }
  274. }
  275. }
  276. [PropertyDisc("P2PriceMode")]
  277. public int P2PriceMode { get; set; }
  278. #region 是否隐藏- P模式
  279. private Visibility _isVisibility_RelationMode = Visibility.Visible;
  280. /// <summary>
  281. /// 是否隐藏- P模式
  282. /// </summary>
  283. public Visibility IsVisibility_RelationModeP
  284. {
  285. get
  286. {
  287. return _isVisibility_RelationMode;
  288. }
  289. set
  290. {
  291. Set(() => IsVisibility_RelationModeP, ref _isVisibility_RelationMode, value);
  292. }
  293. }
  294. private Visibility _isVisibility_RelationMode2 = Visibility.Visible;
  295. /// <summary>
  296. /// 是否隐藏- P模式
  297. /// </summary>
  298. public Visibility IsVisibility_RelationModeP2
  299. {
  300. get
  301. {
  302. return _isVisibility_RelationMode2;
  303. }
  304. set
  305. {
  306. Set(() => IsVisibility_RelationModeP2, ref _isVisibility_RelationMode2, value);
  307. }
  308. }
  309. #endregion
  310. //新加字段20160919
  311. /// <summary>
  312. /// 资金模式
  313. /// </summary>
  314. [PropertyDisc("moneyMode")]
  315. public eMoneyMode moneyMode { get; set; }
  316. /// <summary>
  317. /// 交割单状态-显示文字
  318. /// </summary>
  319. public string OrderStatusDisplay
  320. {
  321. get
  322. {
  323. return OrderStatus.Discription();
  324. }
  325. }
  326. /// <summary>
  327. /// 申报来源:0 客户端,1 管理端
  328. /// </summary>
  329. public string OrderFromDisplay
  330. {
  331. get
  332. {
  333. return OrderFrom.Discription();
  334. }
  335. }
  336. /// <summary>
  337. /// 交割数量/配对成功数量
  338. /// </summary>
  339. public string DeliveryQtyDisplay
  340. {
  341. get
  342. {
  343. if (DeliveryQty != decimal.Zero && DeliveryQty != 0)
  344. {
  345. return DeliveryQty.ToString();
  346. }
  347. else
  348. {
  349. return "-";
  350. }
  351. }
  352. }
  353. /// <summary>
  354. /// 申报备注
  355. /// </summary>
  356. public string AuditRemarkDisplay
  357. {
  358. get
  359. {
  360. if (AuditRemark != null && AuditRemark != "")
  361. {
  362. return AuditRemark.Replace("\n", "").Replace("\r", "");
  363. }
  364. else
  365. {
  366. return "-";
  367. }
  368. }
  369. }
  370. /// <summary>
  371. /// 商品名称转换
  372. /// </summary>
  373. public string DeliveryGoodsNameDisplay
  374. {
  375. get
  376. {
  377. return string.Format("{0}/{1}", DeliveryGoodsCode, DeliveryGoodsName);
  378. }
  379. }
  380. public string PGoodsNameDisplay
  381. {
  382. get
  383. {
  384. return string.Format("{0}/{1}", PGoodsCode, PGoodsName);
  385. }
  386. }
  387. public string P2GoodsNameDisplay
  388. {
  389. get
  390. {
  391. return string.Format("{0}/{1}", P2GoodsCode, P2GoodsName);
  392. }
  393. }
  394. /// <summary>
  395. /// 交易商品-合约单位
  396. /// </summary>
  397. [PropertyDisc("currentAgreeunit")]
  398. public decimal currentAgreeunit { get; set; }
  399. /// <summary>
  400. /// 交易商品-商品单位
  401. /// </summary>
  402. [PropertyDisc("currentGoodsunit")]
  403. public decimal currentGoodsunit { get; set; }
  404. }
  405. }