qryWrTrade.go 24 KB

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