IGoodsService.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. //----------------------------------------------------------------
  2. //Module Name: IQueryService
  3. //Purpose:
  4. //CopyRight: Muchinfo
  5. //History:
  6. //----------------------------------------------------------------
  7. //DateTime Author Description
  8. //----------------------------------------------------------------
  9. //2014-03-22 deng.yinping Create
  10. //----------------------------------------------------------------
  11. using System;
  12. using Muchinfo.MTPClient.Data;
  13. using Muchinfo.MTPClient.Data.DTO;
  14. using Muchinfo.MTPClient.Data.Enums;
  15. using Muchinfo.MTPClient.Data.Model;
  16. using Muchinfo.MTPClient.Data.Model.Account;
  17. using System.Collections.Generic;
  18. using System.Collections.ObjectModel;
  19. using Muchinfo.MTPClient.Data.Model.GoodRules;
  20. namespace Muchinfo.MTPClient.IService
  21. {
  22. public interface IGoodsService
  23. {
  24. /// <summary>
  25. /// 获取交易所列表
  26. /// </summary>
  27. /// <returns>Dictionary{System.StringSystem.String}.</returns>
  28. Dictionary<int, string> GetExchanges();
  29. /// <summary>
  30. /// 生成交易所商品树
  31. /// </summary>
  32. /// <returns>ObservableCollection{TreeViewEntity}.</returns>
  33. ObservableCollection<TreeViewEntity> GetExchangeTree();
  34. /// <summary>
  35. /// 获取商品信息By商品代码
  36. /// </summary>
  37. /// <param name="goodsCodeList">The goods code list.</param>
  38. /// <returns>ObservableCollection{QuoteGoods}.</returns>
  39. ObservableCollection<QuoteGoods> GetQuoteGoodsByCodes(List<string> goodsCodeList);
  40. /// <summary>
  41. /// 获取命令行商品
  42. /// </summary>
  43. /// <param name="commandType">Type of the command.</param>
  44. /// <param name="additionalInfo">The additional info.</param>
  45. /// <returns>IEnumerable{QuoteGoods}.</returns>
  46. ObservableCollection<QuoteGoods> GetGoodsInfoList(MenuCommandType commandType, string additionalInfo);
  47. ///// <summary>
  48. ///// 更新商品盘面信息
  49. ///// </summary>
  50. ///// <param name="goodsList">The goods list.</param>
  51. //void UpdateFromDayQuote(List<QuoteGoods> goodsList);
  52. /// <summary>
  53. /// 获取所有商品
  54. /// </summary>
  55. /// <returns>返回所有商品信息</returns>
  56. ObservableCollection<QuoteGoods> GetAllGoods();
  57. /// <summary>
  58. /// 更新的昨日结算价
  59. /// </summary>
  60. /// <param name="goodses">商品</param>
  61. /// <param name="account">账号</param>
  62. void UpdateLastReckonPrice(List<QuoteGoods> goodses, TradeAccount account);
  63. /// <summary>
  64. /// 更新的交收价
  65. /// </summary>
  66. /// <param name="goodses">商品</param>
  67. /// <param name="account">账号</param>
  68. void UpdateDeliveryPrice(List<QuoteGoods> goodses, TradeAccount account);
  69. /// <summary>
  70. /// 查询商品交易参数增量
  71. /// </summary>
  72. /// <param name="ContRightCode">内容权限</param>
  73. /// <param name="goodsCode">商品代码</param>
  74. /// <param name="IsBidMarket">即期或竞价</param>
  75. List<ParameterRule> QueryParameterRule(int ContRightCode, string goodsCode, bool IsBidMarket, string loginCode);
  76. /// <summary>
  77. /// 商品开市
  78. /// </summary>
  79. /// <param name="goodsCodes">商品代码</param>
  80. void MarketOpenUpdateDayQuote(string[] goodsCodes);
  81. /// <summary>
  82. /// 根据symbol获取商品
  83. /// </summary>
  84. /// <param name="symbol">The symbol.</param>
  85. /// <returns>QuoteGoods.</returns>
  86. QuoteGoods GetQuoteGoodsBySymbol(string symbol);
  87. /// <summary>
  88. /// 获取商品DTO对象集合
  89. /// </summary>
  90. /// <param name="commandType">Type of the command.</param>
  91. /// <param name="additionalInfo">The additional info.</param>
  92. /// <returns>IEnumerable{QuoteGoods}.</returns>
  93. ObservableCollection<QuoteGoodsDTO> GetQuoteGoodsDTOList(MenuCommandType commandType, MarketsInfoModel goodsGroup);
  94. /// <summary>
  95. /// 获取商品交易规则按市场类型与规则类型查询
  96. /// </summary>
  97. /// <param name="goodsId">商品id</param>
  98. /// <param name="marketType">商品所属的市场类型</param>
  99. /// <param name="ruletype">按市场区分的规则类型</param>
  100. /// <returns></returns>
  101. GoodsFeeType GetGoodsParamerRule(int goodsId, eTradeMode tradeMode, GoodsTradeConts ruletype);
  102. /// <summary>
  103. /// 获取交易费用类型
  104. /// </summary>
  105. /// <param name="tradeMode"></param>
  106. /// <returns></returns>
  107. eTradeFee GetTradeFee(eTradeMode tradeMode,eTradeFeeType feeType);
  108. /// <summary>
  109. /// 转换行情显示商品与行情商品
  110. /// </summary>
  111. /// <param name="goodses"></param>
  112. /// <returns></returns>
  113. ObservableCollection<QuoteGoodsDTO> ConvertGoodsDtos(List<QuoteGoods> goodses);
  114. /// <summary>
  115. /// 查询市场结算信息
  116. /// </summary>
  117. /// <param name="MarkerTypeID">市场类型ID</param>
  118. /// <param name="successAction"></param>
  119. /// <param name="errorAction"></param>
  120. void QueryMarketReckonInfo(int MarkerTypeID, Action<List<MarketReckon>> successAction,
  121. Action<ErrorEntity> errorAction);
  122. /// <summary>
  123. /// 委托预埋单数量查询
  124. /// </summary>
  125. /// <param name="AccountId"></param>
  126. /// <param name="successAction"></param>
  127. /// <param name="errorAction"></param>
  128. void QueryPrePostDetailQty(ulong AccountId, Action<List<PreOrderParameter>> successAction, Action<ErrorEntity> errorAction);
  129. /// <summary>
  130. /// 根据外部交易所ID获取商品列表
  131. /// </summary>
  132. /// <param name="exExchangeId">The ex exchange identifier.</param>
  133. /// <returns>List{QuoteGoods}.</returns>
  134. List<QuoteGoods> GetGoodsListByExExchangeId(uint exExchangeId);
  135. }
  136. }