qryWrTrade.go 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  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. // @Description 仓单交易 wrfactortypeid 唯一确定1条记录, 仓单预售 wrfactortypeid + deliverymonth 唯一确定1条记录
  15. // @Produce json
  16. // @Security ApiKeyAuth
  17. // @Param page query int false "页码"
  18. // @Param pagesize query int false "每页条数"
  19. // @Param marketid query int false "仓单贸易市场id"
  20. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  21. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  22. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  23. // @Param warehouseid query int false "仓库id(筛选条件)"
  24. // @Param deliverygoodsid query int false "品种id"
  25. // @Param wrstandardid query int false "品类id"
  26. // @Param wrfactortypeid query int false "仓单要素id"
  27. // @Param deliverymonth query string false "交收月(yyyy-mm) 仓单预售填写"
  28. // @Success 200 {array} models.WrOrderQuote
  29. // @Failure 500 {object} app.Response
  30. // @Router /WrTrade2/QueryOrderQuote [get]
  31. // @Tags 仓单贸易v2
  32. func QueryOrderQuote(c *gin.Context) {
  33. a := app.GinUtils{Gin: app.Gin{C: c}}
  34. m := models.WrOrderQuote{}
  35. a.DoBindReq(&m)
  36. a.DoGetDataByPage(&m)
  37. }
  38. // QueryOrderQuoteDetail
  39. // @Summary 查询买卖大厅
  40. // @Produce json
  41. // @Security ApiKeyAuth
  42. // @Param page query int false "页码"
  43. // @Param pagesize query int false "每页条数"
  44. // @Param marketid query int false "仓单贸易市场id"
  45. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  46. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  47. // @Param wrfactortypeid query int true "仓单要素id"
  48. // @Param goodsid query int false "期货商品id(浮动价方式时填)"
  49. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  50. // @Param deliverymonth query string false "交收月(yyyy-mm) 查仓单预售的买卖大厅时填写"
  51. // @Success 200 {array} models.WrOrderQuoteDetail
  52. // @Failure 500 {object} app.Response
  53. // @Router /WrTrade2/QueryOrderQuoteDetail [get]
  54. // @Tags 仓单贸易v2
  55. func QueryOrderQuoteDetail(c *gin.Context) {
  56. a := app.GinUtils{Gin: app.Gin{C: c}}
  57. m := models.WrOrderQuoteDetail{}
  58. a.DoBindReq(&m)
  59. a.DoGetDataByPage(&m)
  60. }
  61. // QueryOrderQuoteMyq
  62. // @Summary 查询贸易圈挂牌大厅
  63. // @Description
  64. // @Produce json
  65. // @Security ApiKeyAuth
  66. // @Param page query int false "页码"
  67. // @Param pagesize query int false "每页条数"
  68. // @Param marketid query int false "仓单贸易市场id"
  69. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  70. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  71. // @Param deliverygoodsid query int false "品种id"
  72. // @Param wrstandardid query int false "品类id"
  73. // @Param deliverymonth query string false "交收月(yyyy-mm) 仓单预售填写"
  74. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  75. // @Success 200 {array} models.WrQuoteOrderMyq
  76. // @Failure 500 {object} app.Response
  77. // @Router /WrTrade2/QueryOrderQuoteMyq [get]
  78. // @Tags 仓单贸易v2
  79. func QueryOrderQuoteMyq(c *gin.Context) {
  80. a := app.GinUtils{Gin: app.Gin{C: c}}
  81. m := models.WrQuoteOrderMyq{}
  82. a.DoBindReq(&m)
  83. a.DoGetDataByPage(&m)
  84. }
  85. // QueryWrPosition
  86. // @Summary 查询现货(预售)仓单持仓
  87. // @Description 页面 现货仓单->现货汇总/库存汇总; 预售仓单->订单汇总
  88. // @Produce json
  89. // @Security ApiKeyAuth
  90. // @Param userid query int true "用户id"
  91. // @Param querytype query int true "查询类型 1-现货汇总 2-库存汇总(订单汇总)"
  92. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  93. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  94. // @Param warehouseid query int false "仓库id(筛选条件)"
  95. // @Param deliverygoodsid query int false "品种id"
  96. // @Param wrstandardid query int false "品类id"
  97. // @Success 200 {array} models.WrPosition
  98. // @Failure 500 {object} app.Response
  99. // @Router /WrTrade2/QueryWrPosition [get]
  100. // @Tags 仓单贸易v2
  101. func QueryWrPosition(c *gin.Context) {
  102. a := app.GinUtils{Gin: app.Gin{C: c}}
  103. m := models.WrPosition{}
  104. a.DoBindReq(&m)
  105. a.DoGetDataI(&m)
  106. }
  107. // QueryWrOrderDetail
  108. // @Summary 查询仓单委托单(挂单)
  109. // @Description 页面 现货仓单 | 预售仓单 -> 挂单
  110. // @Produce json
  111. // @Security ApiKeyAuth
  112. // @Param page query int false "页码"
  113. // @Param pagesize query int false "每页条数"
  114. // @Param userid query int true "用户id"
  115. // @Param marketid query int false "仓单贸易市场id"
  116. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  117. // @Success 200 {array} models.WrOrderDetail
  118. // @Failure 500 {object} app.Response
  119. // @Router /WrTrade2/QueryWrOrderDetail [get]
  120. // @Tags 仓单贸易v2
  121. func QueryWrOrderDetail(c *gin.Context) {
  122. a := app.GinUtils{Gin: app.Gin{C: c}}
  123. m := models.WrOrderDetail{}
  124. a.DoBindReq(&m)
  125. a.DoGetDataByPage(&m)
  126. }
  127. // QueryWrSpecialMatchOrder
  128. // @Summary 查询指定成交
  129. // @Description 页面 现货仓单 | 预售仓单 -> 指定成交
  130. // @Produce json
  131. // @Security ApiKeyAuth
  132. // @Param page query int false "页码"
  133. // @Param pagesize query int false "每页条数"
  134. // @Param userid query int true "用户id"
  135. // @Param marketid query int false "仓单贸易市场id"
  136. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  137. // @Success 200 {array} models.WrSpecialMatchOrder
  138. // @Failure 500 {object} app.Response
  139. // @Router /WrTrade2/QueryWrSpecialMatchOrder [get]
  140. // @Tags 仓单贸易v2
  141. func QueryWrSpecialMatchOrder(c *gin.Context) {
  142. a := app.GinUtils{Gin: app.Gin{C: c}}
  143. m := models.WrSpecialMatchOrder{}
  144. a.DoBindReq(&m)
  145. a.DoGetDataByPage(&m)
  146. }
  147. // QueryWrTradeDetail
  148. // @Summary 查询仓单成交明细
  149. // @Produce json
  150. // @Security ApiKeyAuth
  151. // @Param page query int false "页码"
  152. // @Param pagesize query int false "每页条数"
  153. // @Param userid query int true "用户id"
  154. // @Param marketid query int false "仓单贸易市场id"
  155. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  156. // @Success 200 {array} models.WrTradeDetail
  157. // @Failure 500 {object} app.Response
  158. // @Router /WrTrade2/QueryWrTradeDetail [get]
  159. // @Tags 仓单贸易v2
  160. func QueryWrTradeDetail(c *gin.Context) {
  161. a := app.GinUtils{Gin: app.Gin{C: c}}
  162. m := models.WrTradeDetail{}
  163. a.DoBindReq(&m)
  164. a.DoGetDataByPage(&m)
  165. }
  166. // QueryWrGoodsInfo
  167. // @Summary 查询仓单商品信息
  168. // @Produce json
  169. // @Security ApiKeyAuth
  170. // @Param marketid query int false "仓单贸易市场id"
  171. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  172. // @Param wrfactortypeid query int true "仓单要素id"
  173. // @Param tmplateid query int false "履约模板id(如果指定了履约模板id,履约信息将按模板id查, 否则去市场配置表中找模板)"
  174. // @Success 200 {array} models.WrGoodsInfo
  175. // @Failure 500 {object} app.Response
  176. // @Router /WrTrade2/QueryWrGoodsInfo [get]
  177. // @Tags 仓单贸易v2
  178. func QueryWrGoodsInfo(c *gin.Context) {
  179. a := app.GinUtils{Gin: app.Gin{C: c}}
  180. m := models.WrGoodsInfo{}
  181. a.DoBindReq(&m)
  182. a.DoGetDataI(&m)
  183. }
  184. // QueryPerformancePlan
  185. // @Summary 查询履约信息
  186. // @Produce json
  187. // @Security ApiKeyAuth
  188. // @Param userid query int true "用户id"
  189. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  190. // @Success 200 {array} models.WrPerformancePlan
  191. // @Failure 500 {object} app.Response
  192. // @Router /WrTrade2/QueryPerformancePlan [get]
  193. // @Tags 仓单贸易v2
  194. func QueryPerformancePlan(c *gin.Context) {
  195. a := app.GinUtils{Gin: app.Gin{C: c}}
  196. m := models.WrPerformancePlan{}
  197. a.DoBindReq(&m)
  198. a.DoGetDataI(&m)
  199. }
  200. // QueryHoldLB
  201. // @Summary 查询仓单持有记录
  202. // @Description 页面 现货仓单->现货明细? , 表名叫仓单持有记录, 有挂单特有维度,为防误解汇总也有相关维度, 新写接口,不跟汇总合在一起了。
  203. // @Produce json
  204. // @Security ApiKeyAuth
  205. // @Param accountid query int true "资金账号"
  206. // @Param warehouseid query int false "仓库id"
  207. // @Param deliverygoodsid query int false "品种id"
  208. // @Param wrstandardid query int false "品类id"
  209. // @Param wrfactortypeid query int false "仓单要素id"
  210. // @Success 200 {array} models.WrHoldLB
  211. // @Failure 500 {object} app.Response
  212. // @Router /WrTrade2/QueryHoldLB [get]
  213. // @Tags 仓单贸易v2
  214. func QueryHoldLB(c *gin.Context) {
  215. a := app.GinUtils{Gin: app.Gin{C: c}}
  216. m := models.WrHoldLB{}
  217. a.DoBindReq(&m)
  218. a.DoGetDataI(&m)
  219. }
  220. // QueryFilterItem
  221. // @Summary 查询筛选框列表 - 作废(以前给pcweb简单筛选框用的,后来改版了)
  222. // @Produce json
  223. // @Security ApiKeyAuth
  224. // @Param itype query string true "类型(可多选,逗号隔开) 1-品种 2-品类(商品) 3-仓库"
  225. // @Success 200 {array} models.WrFilterItem
  226. // @Failure 500 {object} app.Response
  227. // @Router /WrTrade2/QueryFilterItem [get]
  228. // @Tags 仓单贸易v2
  229. func QueryFilterItem(c *gin.Context) {
  230. a := app.GinUtils{Gin: app.Gin{C: c}}
  231. m := models.WrFilterItem{}
  232. a.DoBindReq(&m)
  233. a.DoGetDataI(&m)
  234. }
  235. // QueryFaProductDetail
  236. // @Summary 查询融资产品列表
  237. // @Description 页面 买卖大厅 -> 选择融资方案
  238. // @Produce json
  239. // @Security ApiKeyAuth
  240. // @Param wrfactortypeid query int true "仓单要素id"
  241. // @Success 200 {array} models.WrFAProductDetail
  242. // @Failure 500 {object} app.Response
  243. // @Router /WrTrade2/QueryFaProductDetail [get]
  244. // @Tags 仓单贸易v2
  245. func QueryFaProductDetail(c *gin.Context) {
  246. a := app.GinUtils{Gin: app.Gin{C: c}}
  247. m := models.WrFAProductDetail{}
  248. a.DoBindReq(&m)
  249. a.DoGetDataI(&m)
  250. }
  251. // QueryWrFactorTypeInfo
  252. // @Summary 查询仓单要素详细信息
  253. // @Produce json
  254. // @Security ApiKeyAuth
  255. // @Param wrfactortypeid query int true "仓单要素id"
  256. // @Success 200 {array} models.WrFactorTypeInfo
  257. // @Failure 500 {object} app.Response
  258. // @Router /WrTrade2/QueryWrFactorTypeInfo [get]
  259. // @Tags 仓单贸易v2
  260. func QueryWrFactorTypeInfo(c *gin.Context) {
  261. a := app.GinUtils{Gin: app.Gin{C: c}}
  262. m := models.WrFactorTypeInfo{}
  263. a.DoBindReq(&m)
  264. a.DoGetDataI(&m)
  265. }
  266. // QueryWrFactorTypeInfoEx
  267. // @Summary 查询仓单要素详细信息列表项
  268. // @Produce json
  269. // @Security ApiKeyAuth
  270. // @Param wrfactortypeid query int true "仓单要素id"
  271. // @Success 200 {array} models.WrTypeItem
  272. // @Failure 500 {object} app.Response
  273. // @Router /WrTrade2/QueryWrFactorTypeInfoEx [get]
  274. // @Tags 仓单贸易v2
  275. func QueryWrFactorTypeInfoEx(c *gin.Context) {
  276. a := app.GinUtils{Gin: app.Gin{C: c}}
  277. m := models.WrFactorTypeInfoEx{}
  278. a.DoBindReq(&m)
  279. a.DoGetDataI(&m)
  280. }
  281. // QueryWrMarketTradeConfig
  282. // @Summary 查询市场交易参数配置
  283. // @Produce json
  284. // @Security ApiKeyAuth
  285. // @Param marketid query int false "市场id"
  286. // @Success 200 {array} models.WrMarketTradeConfig
  287. // @Failure 500 {object} app.Response
  288. // @Router /WrTrade2/QueryWrMarketTradeConfig [get]
  289. // @Tags 仓单贸易v2
  290. func QueryWrMarketTradeConfig(c *gin.Context) {
  291. a := app.GinUtils{Gin: app.Gin{C: c}}
  292. m := models.WrMarketTradeConfig{}
  293. a.DoBindReq(&m)
  294. a.DoGetDataI(&m)
  295. }
  296. // QueryFtDeliveryGoods
  297. // @Summary 查询品种品类筛选框列表
  298. // @Produce json
  299. // @Security ApiKeyAuth
  300. // @Success 200 {array} models.WrFtDeliveryGoods
  301. // @Failure 500 {object} app.Response
  302. // @Router /WrTrade2/QueryFtDeliveryGoods [get]
  303. // @Tags 仓单贸易v2
  304. func QueryFtDeliveryGoods(c *gin.Context) {
  305. a := app.GinUtils{Gin: app.Gin{C: c}}
  306. m := models.WrFtDeliveryGoods{}
  307. a.DoBindReq(&m)
  308. a.DoGetDataI(&m)
  309. }
  310. // QueryWrStandardFactoryItem
  311. // @Summary 查询品类要素定义项
  312. // @Produce json
  313. // @Security ApiKeyAuth
  314. // @Param wrstandardid query int true "品类id"
  315. // @Success 200 {array} models.WrStandardFactoryItemEx
  316. // @Failure 500 {object} app.Response
  317. // @Router /WrTrade2/QueryWrStandardFactoryItem [get]
  318. // @Tags 仓单贸易v2
  319. func QueryWrStandardFactoryItem(c *gin.Context) {
  320. a := app.GinUtils{Gin: app.Gin{C: c}}
  321. m := models.WrStandardFactoryItemEx{}
  322. a.DoBindReq(&m)
  323. a.DoGetDataI(&m)
  324. }
  325. // QueryWrPerformancePlanStep
  326. // @Summary 查询履约信息详情
  327. // @Produce json
  328. // @Security ApiKeyAuth
  329. // @Param planid query int true "履约计划id(performanceplanid)"
  330. // @Param curstepid query int false "当前步骤id"
  331. // @Success 200 {array} models.WrPerformancePlanStep
  332. // @Failure 500 {object} app.Response
  333. // @Router /WrTrade2/QueryWrPerformancePlanStep [get]
  334. // @Tags 仓单贸易v2
  335. func QueryWrPerformancePlanStep(c *gin.Context) {
  336. a := app.GinUtils{Gin: app.Gin{C: c}}
  337. m := models.WrPerformancePlanStep{}
  338. a.DoBindReq(&m)
  339. a.DoGetDataI(&m)
  340. }
  341. // QueryWrFinanceBuyApply
  342. // @Summary 查询融资购买申请
  343. // @Description 页面 融资信息+ / 申请单
  344. // @Produce json
  345. // @Security ApiKeyAuth
  346. // @Param userid query int true "用户id"
  347. // @Success 200 {array} models.WrFinanceBuyApply
  348. // @Failure 500 {object} app.Response
  349. // @Router /WrTrade2/QueryWrFinanceBuyApply [get]
  350. // @Tags 仓单贸易v2
  351. func QueryWrFinanceBuyApply(c *gin.Context) {
  352. a := app.GinUtils{Gin: app.Gin{C: c}}
  353. m := models.WrFinanceBuyApply{}
  354. a.DoBindReq(&m)
  355. a.DoGetDataI(&m)
  356. }
  357. // QueryWrScfContract
  358. // @Summary 查询仓单贸易融资合同
  359. // @Produce json
  360. // @Security ApiKeyAuth
  361. // @Param userid query int true "用户id"
  362. // @Param scfcontractid query int false "融资合同id"
  363. // @Success 200 {array} models.WrScfContract
  364. // @Failure 500 {object} app.Response
  365. // @Router /WrTrade2/QueryWrScfContract [get]
  366. // @Tags 仓单贸易v2
  367. func QueryWrScfContract(c *gin.Context) {
  368. a := app.GinUtils{Gin: app.Gin{C: c}}
  369. m := models.WrScfContract{}
  370. a.DoBindReq(&m)
  371. a.DoGetDataI(&m)
  372. }
  373. // QueryWrBuybackDetail
  374. // @Summary 查询仓单回购明细
  375. // @Produce json
  376. // @Security ApiKeyAuth
  377. // @Param scfcontractid query int false "融资合同id"
  378. // @Success 200 {array} models.WrBuybackDetail
  379. // @Failure 500 {object} app.Response
  380. // @Router /WrTrade2/QueryWrBuybackDetail [get]
  381. // @Tags 仓单贸易v2
  382. func QueryWrBuybackDetail(c *gin.Context) {
  383. a := app.GinUtils{Gin: app.Gin{C: c}}
  384. m := models.WrBuybackDetail{}
  385. a.DoBindReq(&m)
  386. a.DoGetDataI(&m)
  387. }
  388. // QueryWrScfContractInterest
  389. // @Summary 查询融资合同费用明细
  390. // @Produce json
  391. // @Security ApiKeyAuth
  392. // @Param scfcontractid query int false "融资合同id"
  393. // @Success 200 {array} models.WrScfContractInterest
  394. // @Failure 500 {object} app.Response
  395. // @Router /WrTrade2/QueryWrScfContractInterest [get]
  396. // @Tags 仓单贸易v2
  397. func QueryWrScfContractInterest(c *gin.Context) {
  398. a := app.GinUtils{Gin: app.Gin{C: c}}
  399. m := models.WrScfContractInterest{}
  400. a.DoBindReq(&m)
  401. a.DoGetDataI(&m)
  402. }
  403. // QueryWrOutInApply
  404. // @Summary 查询提货申请
  405. // @Produce json
  406. // @Security ApiKeyAuth
  407. // @Param userid query int true "用户id"
  408. // @Success 200 {array} models.WrOutInApply
  409. // @Failure 500 {object} app.Response
  410. // @Router /WrTrade2/QueryWrOutInApply [get]
  411. // @Tags 仓单贸易v2
  412. func QueryWrOutInApply(c *gin.Context) {
  413. a := app.GinUtils{Gin: app.Gin{C: c}}
  414. m := models.WrOutInApply{}
  415. a.DoBindReq(&m)
  416. a.DoGetDataI(&m)
  417. }
  418. // QueryWrDeliveryDetail
  419. // @Summary 查询交收
  420. // @Produce json
  421. // @Security ApiKeyAuth
  422. // @Param userid query int true "用户id"
  423. // @Param accountid query int false "资金账号id"
  424. // @Success 200 {array} models.WrDeliveryDetail
  425. // @Failure 500 {object} app.Response
  426. // @Router /WrTrade2/QueryWrDeliveryDetail [get]
  427. // @Tags 仓单贸易v2
  428. func QueryWrDeliveryDetail(c *gin.Context) {
  429. a := app.GinUtils{Gin: app.Gin{C: c}}
  430. m := models.WrDeliveryDetail{}
  431. a.DoBindReq(&m)
  432. a.DoGetDataI(&m)
  433. }
  434. // QueryWrBsGoodsInfo
  435. // @Summary 查询合约交易买卖大厅详情
  436. // @Description 合约交易/买卖大厅/详情
  437. // @Produce json
  438. // @Security ApiKeyAuth
  439. // @Param goodsid query int true "商品id"
  440. // @Success 200 {array} models.WrBsGoodsInfo
  441. // @Failure 500 {object} app.Response
  442. // @Router /WrTrade2/QueryWrBsGoodsInfo [get]
  443. // @Tags 仓单贸易v2
  444. func QueryWrBsGoodsInfo(c *gin.Context) {
  445. a := app.GinUtils{Gin: app.Gin{C: c}}
  446. m := models.WrBsGoodsInfo{}
  447. a.DoBindReq(&m)
  448. a.DoGetDataI(&m)
  449. }
  450. // QueryWrTradeOrderDetail
  451. // @Summary 查询合约交易买卖大厅
  452. // @Produce json
  453. // @Security ApiKeyAuth
  454. // @Param page query int false "页码"
  455. // @Param pagesize query int false "每页条数"
  456. // @Param goodsid query int true "商品id"
  457. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  458. // @Success 200 {array} models.WrTradeOrderDetail
  459. // @Failure 500 {object} app.Response
  460. // @Router /WrTrade2/QueryWrTradeOrderDetail [get]
  461. // @Tags 仓单贸易v2
  462. func QueryWrTradeOrderDetail(c *gin.Context) {
  463. a := app.GinUtils{Gin: app.Gin{C: c}}
  464. m := models.WrTradeOrderDetail{}
  465. a.DoBindReq(&m)
  466. a.DoGetDataI(&m)
  467. }
  468. // QueryWrAverageTradePrice
  469. // @Summary 查询成交价(历史走势)
  470. // @Produce json
  471. // @Security ApiKeyAuth
  472. // @Param page query int false "页码"
  473. // @Param pagesize query int false "每页条数"
  474. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  475. // @Param wrfactortypeid query int true "仓单要素id"
  476. // @Success 200 {array} models.WrAverageTradePrice
  477. // @Failure 500 {object} app.Response
  478. // @Router /WrTrade2/QueryWrAverageTradePrice [get]
  479. // @Tags 仓单贸易v2
  480. func QueryWrAverageTradePrice(c *gin.Context) {
  481. a := app.GinUtils{Gin: app.Gin{C: c}}
  482. m := models.WrAverageTradePrice{}
  483. a.DoBindReq(&m)
  484. a.DoGetDataByPage(&m)
  485. }
  486. // QueryWrDeliveryAvalidHoldLB
  487. // @Summary 查询合约交收可点选仓单
  488. // @Produce json
  489. // @Security ApiKeyAuth
  490. // @Param accountid query int true "资金账号"
  491. // @Param goodsid query int true "商品id"
  492. // @Success 200 {array} models.WrDeliveryAvalidHoldLB
  493. // @Failure 500 {object} app.Response
  494. // @Router /WrTrade2/QueryWrDeliveryAvalidHoldLB [get]
  495. // @Tags 仓单贸易v2
  496. func QueryWrDeliveryAvalidHoldLB(c *gin.Context) {
  497. a := app.GinUtils{Gin: app.Gin{C: c}}
  498. m := models.WrDeliveryAvalidHoldLB{}
  499. a.DoBindReq(&m)
  500. a.DoGetDataI(&m)
  501. }
  502. // QueryWrUserFriend
  503. // @Summary 查询我的朋友
  504. // @Produce json
  505. // @Security ApiKeyAuth
  506. // @Param userid query int true "用户id"
  507. // @Param newuserid query int false "新朋友userid, 如果填写了此项则查找新朋友"
  508. // @Success 200 {array} models.WrUserFriend
  509. // @Failure 500 {object} app.Response
  510. // @Router /WrTrade2/QueryWrUserFriend [get]
  511. // @Tags 仓单贸易v2
  512. func QueryWrUserFriend(c *gin.Context) {
  513. a := app.GinUtils{Gin: app.Gin{C: c}}
  514. m := models.WrUserFriend{}
  515. a.DoBindReq(&m)
  516. a.DoGetDataI(&m)
  517. }
  518. // QueryWrFriendApply
  519. // @Summary 查询好友申请记录
  520. // @Produce json
  521. // @Security ApiKeyAuth
  522. // @Param userid query int true "用户id"
  523. // @Success 200 {array} models.WrFriendApply
  524. // @Failure 500 {object} app.Response
  525. // @Router /WrTrade2/QueryWrFriendApply [get]
  526. // @Tags 仓单贸易v2
  527. func QueryWrFriendApply(c *gin.Context) {
  528. a := app.GinUtils{Gin: app.Gin{C: c}}
  529. m := models.WrFriendApply{}
  530. a.DoBindReq(&m)
  531. a.DoGetDataI(&m)
  532. }
  533. // QueryPermancePlanTmp
  534. // @Summary 查询履约模板
  535. // @Description 返回指定用户的模板和公共模板(用户id为空)
  536. // @Produce json
  537. // @Security ApiKeyAuth
  538. // @Param userid query int false "用户id"
  539. // @Param tmptype query string false "模板类型(逗号隔开), 0:通用 1:交割 2:仓单贸易 3:预售集采 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式--失效枚举:4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式"
  540. // @Param includepub query int false "是否包含公共模板(用户id为空的) 1-包含"
  541. // @Success 200 {array} models.WrPerformanceTemplateEx
  542. // @Failure 500 {object} app.Response
  543. // @Router /WrTrade2/QueryPermancePlanTmp [get]
  544. // @Tags 仓单贸易v2
  545. func QueryPermancePlanTmp(c *gin.Context) {
  546. a := app.GinUtils{Gin: app.Gin{C: c}}
  547. m := models.WrPerformanceTemplateEx{}
  548. a.DoBindReq(&m)
  549. a.DoGetDataI(&m)
  550. }
  551. // QueryWrTradeBargainApply
  552. // @Summary 查询议价单
  553. // @Description 1.页面 挂单/议价单, 只需传单号就行 2.页面 议价, 查的是作为摘牌方发起的议价单, 参数 userid=登录userid 3. 页面 议价/议价单, 和2类似, 但要指定单号 参数 userid, wrtradeorderid
  554. // @Produce json
  555. // @Security ApiKeyAuth
  556. // @Param userid query int false "议价人id(摘牌方)"
  557. // @Param wrtradeorderid query int false "关联委托单id"
  558. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  559. // @Success 200 {array} models.WRTradeBargainApply
  560. // @Failure 500 {object} app.Response
  561. // @Router /WrTrade2/QueryWrTradeBargainApply [get]
  562. // @Tags 仓单贸易v2
  563. func QueryWrTradeBargainApply(c *gin.Context) {
  564. a := app.GinUtils{Gin: app.Gin{C: c}}
  565. m := models.WRTradeBargainApply{}
  566. a.DoBindReq(&m)
  567. a.DoGetDataI(&m)
  568. }
  569. // QueryWrPerformanceStepType
  570. // @Summary 查询履约步骤枚举
  571. // @Produce json
  572. // @Security ApiKeyAuth
  573. // @Success 200 {array} models.WrPerformanceStepType
  574. // @Failure 500 {object} app.Response
  575. // @Router /WrTrade2/QueryWrPerformanceStepType [get]
  576. // @Tags 仓单贸易v2
  577. func QueryWrPerformanceStepType(c *gin.Context) {
  578. a := app.GinUtils{Gin: app.Gin{C: c}}
  579. m := models.WrPerformanceStepType{}
  580. a.DoBindReq(&m)
  581. a.DoGetDataI(&m)
  582. }