qryWrTrade.go 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. /**
  2. * @Author: zou.yingbin
  3. * @Create : 2021/7/20 18:30
  4. * @Modify : 2021/7/20 18:30
  5. */
  6. package wrTrade2
  7. import (
  8. "github.com/gin-gonic/gin"
  9. "mtp2_if/global/app"
  10. "mtp2_if/models"
  11. )
  12. // QueryOrderQuote
  13. // @Summary 查询大厅行情列表
  14. // @Produce json
  15. // @Security ApiKeyAuth
  16. // @Param page query int false "页码"
  17. // @Param pagesize query int false "每页条数"
  18. // @Param marketid query int false "仓单贸易市场id"
  19. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  20. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  21. // @Param wrstandardname query string false "商品名称(筛选条件)"
  22. // @Param brandname query string false "品牌名称(筛选条件)"
  23. // @Param warehouseid query int false "仓库id(筛选条件)"
  24. // @Param deliverygoodsid query int false "品种id"
  25. // @Success 200 {array} models.WrOrderQuote
  26. // @Failure 500 {object} app.Response
  27. // @Router /WrTrade2/QueryOrderQuote [get]
  28. // @Tags 仓单贸易v2
  29. func QueryOrderQuote(c *gin.Context) {
  30. a := app.GinUtils{Gin: app.Gin{C: c}}
  31. m := models.WrOrderQuote{}
  32. a.DoBindReq(&m)
  33. a.DoGetDataByPage(&m)
  34. }
  35. // QueryOrderQuoteDetail
  36. // @Summary 查询买卖大厅
  37. // @Produce json
  38. // @Security ApiKeyAuth
  39. // @Param page query int false "页码"
  40. // @Param pagesize query int false "每页条数"
  41. // @Param marketid query int false "仓单贸易市场id"
  42. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  43. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  44. // @Param wrfactortypeid query int true "仓单要素id"
  45. // @Param goodsid query int false "期货商品id(浮动价方式时填)"
  46. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  47. // @Param deliverymonth query string false "交收月(yyyy-mm) 查仓单预售的买卖大厅时填写"
  48. // @Success 200 {array} models.WrOrderQuoteDetail
  49. // @Failure 500 {object} app.Response
  50. // @Router /WrTrade2/QueryOrderQuoteDetail [get]
  51. // @Tags 仓单贸易v2
  52. func QueryOrderQuoteDetail(c *gin.Context) {
  53. a := app.GinUtils{Gin: app.Gin{C: c}}
  54. m := models.WrOrderQuoteDetail{}
  55. a.DoBindReq(&m)
  56. a.DoGetDataByPage(&m)
  57. }
  58. // QueryWrPosition
  59. // @Summary 查询现货(预售)仓单持仓
  60. // @Description 页面 现货仓单->现货汇总/库存汇总; 预售仓单->订单汇总
  61. // @Produce json
  62. // @Security ApiKeyAuth
  63. // @Param userid query int true "用户id"
  64. // @Param querytype query int true "查询类型 1-现货汇总 2-库存汇总(订单汇总)"
  65. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  66. // @Success 200 {array} models.WrPosition
  67. // @Failure 500 {object} app.Response
  68. // @Router /WrTrade2/QueryWrPosition [get]
  69. // @Tags 仓单贸易v2
  70. func QueryWrPosition(c *gin.Context) {
  71. a := app.GinUtils{Gin: app.Gin{C: c}}
  72. m := models.WrPosition{}
  73. a.DoBindReq(&m)
  74. a.DoGetDataI(&m)
  75. }
  76. // QueryWrOrderDetail
  77. // @Summary 查询仓单委托单(挂单)
  78. // @Description 页面 现货仓单 | 预售仓单 -> 挂单
  79. // @Produce json
  80. // @Security ApiKeyAuth
  81. // @Param page query int false "页码"
  82. // @Param pagesize query int false "每页条数"
  83. // @Param userid query int true "用户id"
  84. // @Param marketid query int false "仓单贸易市场id"
  85. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  86. // @Success 200 {array} models.WrOrderDetail
  87. // @Failure 500 {object} app.Response
  88. // @Router /WrTrade2/QueryWrOrderDetail [get]
  89. // @Tags 仓单贸易v2
  90. func QueryWrOrderDetail(c *gin.Context) {
  91. a := app.GinUtils{Gin: app.Gin{C: c}}
  92. m := models.WrOrderDetail{}
  93. a.DoBindReq(&m)
  94. a.DoGetDataByPage(&m)
  95. }
  96. // QueryWrSpecialMatchOrder
  97. // @Summary 查询指定成交
  98. // @Description 页面 现货仓单 | 预售仓单 -> 指定成交
  99. // @Produce json
  100. // @Security ApiKeyAuth
  101. // @Param page query int false "页码"
  102. // @Param pagesize query int false "每页条数"
  103. // @Param userid query int true "用户id"
  104. // @Param marketid query int false "仓单贸易市场id"
  105. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  106. // @Success 200 {array} models.WrSpecialMatchOrder
  107. // @Failure 500 {object} app.Response
  108. // @Router /WrTrade2/QueryWrSpecialMatchOrder [get]
  109. // @Tags 仓单贸易v2
  110. func QueryWrSpecialMatchOrder(c *gin.Context) {
  111. a := app.GinUtils{Gin: app.Gin{C: c}}
  112. m := models.WrSpecialMatchOrder{}
  113. a.DoBindReq(&m)
  114. a.DoGetDataByPage(&m)
  115. }
  116. // QueryWrTradeDetail
  117. // @Summary 查询仓单成交明细
  118. // @Produce json
  119. // @Security ApiKeyAuth
  120. // @Param page query int false "页码"
  121. // @Param pagesize query int false "每页条数"
  122. // @Param userid query int true "用户id"
  123. // @Param marketid query int false "仓单贸易市场id"
  124. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  125. // @Success 200 {array} models.WrTradeDetail
  126. // @Failure 500 {object} app.Response
  127. // @Router /WrTrade2/QueryWrTradeDetail [get]
  128. // @Tags 仓单贸易v2
  129. func QueryWrTradeDetail(c *gin.Context) {
  130. a := app.GinUtils{Gin: app.Gin{C: c}}
  131. m := models.WrTradeDetail{}
  132. a.DoBindReq(&m)
  133. a.DoGetDataByPage(&m)
  134. }
  135. // QueryWrGoodsInfo
  136. // @Summary 查询仓单商品信息
  137. // @Produce json
  138. // @Security ApiKeyAuth
  139. // @Param marketid query int false "仓单贸易市场id"
  140. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  141. // @Param wrfactortypeid query int true "仓单要素id"
  142. // @Success 200 {array} models.WrGoodsInfo
  143. // @Failure 500 {object} app.Response
  144. // @Router /WrTrade2/QueryWrGoodsInfo [get]
  145. // @Tags 仓单贸易v2
  146. func QueryWrGoodsInfo(c *gin.Context) {
  147. a := app.GinUtils{Gin: app.Gin{C: c}}
  148. m := models.WrGoodsInfo{}
  149. a.DoBindReq(&m)
  150. a.DoGetDataI(&m)
  151. }
  152. // QueryPerformancePlan
  153. // @Summary 查询履约信息
  154. // @Produce json
  155. // @Security ApiKeyAuth
  156. // @Param userid query int true "用户id"
  157. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  158. // @Success 200 {array} models.WrPerformancePlan
  159. // @Failure 500 {object} app.Response
  160. // @Router /WrTrade2/QueryPerformancePlan [get]
  161. // @Tags 仓单贸易v2
  162. func QueryPerformancePlan(c *gin.Context) {
  163. a := app.GinUtils{Gin: app.Gin{C: c}}
  164. m := models.WrPerformancePlan{}
  165. a.DoBindReq(&m)
  166. a.DoGetDataI(&m)
  167. }
  168. // QueryHoldLB
  169. // @Summary 查询仓单持有记录
  170. // @Description 页面 现货仓单->现货明细? , 表名叫仓单持有记录, 有挂单特有维度,为防误解汇总也有相关维度, 新写接口,不跟汇总合在一起了。
  171. // @Produce json
  172. // @Security ApiKeyAuth
  173. // @Param accountid query int true "资金账号"
  174. // @Param warehouseid query int false "仓库id"
  175. // @Param deliverygoodsid query int false "品种id"
  176. // @Param wrstandardid query int false "品类id"
  177. // @Success 200 {array} models.WrHoldLB
  178. // @Failure 500 {object} app.Response
  179. // @Router /WrTrade2/QueryHoldLB [get]
  180. // @Tags 仓单贸易v2
  181. func QueryHoldLB(c *gin.Context) {
  182. a := app.GinUtils{Gin: app.Gin{C: c}}
  183. m := models.WrHoldLB{}
  184. a.DoBindReq(&m)
  185. a.DoGetDataI(&m)
  186. }
  187. // QueryFilterItem
  188. // @Summary 查询筛选框列表
  189. // @Produce json
  190. // @Security ApiKeyAuth
  191. // @Param itype query string true "类型(可多选,逗号隔开) 1-品种 2-品类(商品) 3-仓库"
  192. // @Success 200 {array} models.WrFilterItem
  193. // @Failure 500 {object} app.Response
  194. // @Router /WrTrade2/QueryFilterItem [get]
  195. // @Tags 仓单贸易v2
  196. func QueryFilterItem(c *gin.Context) {
  197. a := app.GinUtils{Gin: app.Gin{C: c}}
  198. m := models.WrFilterItem{}
  199. a.DoBindReq(&m)
  200. a.DoGetDataI(&m)
  201. }
  202. // QueryFaProductDetail
  203. // @Summary 查询融资产品列表
  204. // @Description 页面 买卖大厅 -> 选择融资方案
  205. // @Produce json
  206. // @Security ApiKeyAuth
  207. // @Param wrfactortypeid query int true "仓单要素id"
  208. // @Success 200 {array} models.WrFAProductDetail
  209. // @Failure 500 {object} app.Response
  210. // @Router /WrTrade2/QueryFaProductDetail [get]
  211. // @Tags 仓单贸易v2
  212. func QueryFaProductDetail(c *gin.Context) {
  213. a := app.GinUtils{Gin: app.Gin{C: c}}
  214. m := models.WrFAProductDetail{}
  215. a.DoBindReq(&m)
  216. a.DoGetDataI(&m)
  217. }
  218. // QueryWrFactorTypeInfo
  219. // @Summary 查询仓单要素详细信息
  220. // @Produce json
  221. // @Security ApiKeyAuth
  222. // @Param wrfactortypeid query int true "仓单要素id"
  223. // @Success 200 {array} models.WrFactorTypeInfo
  224. // @Failure 500 {object} app.Response
  225. // @Router /WrTrade2/QueryWrFactorTypeInfo [get]
  226. // @Tags 仓单贸易v2
  227. func QueryWrFactorTypeInfo(c *gin.Context) {
  228. a := app.GinUtils{Gin: app.Gin{C: c}}
  229. m := models.WrFactorTypeInfo{}
  230. a.DoBindReq(&m)
  231. a.DoGetDataI(&m)
  232. }
  233. // QueryWrMarketTradeConfig
  234. // @Summary 查询市场交易参数配置
  235. // @Produce json
  236. // @Security ApiKeyAuth
  237. // @Param marketid query int false "市场id"
  238. // @Success 200 {array} models.WrMarketTradeConfig
  239. // @Failure 500 {object} app.Response
  240. // @Router /WrTrade2/QueryWrMarketTradeConfig [get]
  241. // @Tags 仓单贸易v2
  242. func QueryWrMarketTradeConfig(c *gin.Context) {
  243. a := app.GinUtils{Gin: app.Gin{C: c}}
  244. m := models.WrMarketTradeConfig{}
  245. a.DoBindReq(&m)
  246. a.DoGetDataI(&m)
  247. }
  248. // QueryFtDeliveryGoods
  249. // @Summary 查询品种品类筛选框列表
  250. // @Produce json
  251. // @Security ApiKeyAuth
  252. // @Success 200 {array} models.WrFtDeliveryGoods
  253. // @Failure 500 {object} app.Response
  254. // @Router /WrTrade2/QueryFtDeliveryGoods [get]
  255. // @Tags 仓单贸易v2
  256. func QueryFtDeliveryGoods(c *gin.Context) {
  257. a := app.GinUtils{Gin: app.Gin{C: c}}
  258. m := models.WrFtDeliveryGoods{}
  259. a.DoBindReq(&m)
  260. a.DoGetDataI(&m)
  261. }