qryWrTrade.go 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907
  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. "mtp2_if/global/app"
  9. "mtp2_if/global/e"
  10. "mtp2_if/logger"
  11. "mtp2_if/models"
  12. "net/http"
  13. "github.com/gin-gonic/gin"
  14. )
  15. // QueryOrderQuote
  16. // @Summary 查询大厅行情列表
  17. // @Description 仓单交易 wrfactortypeid 唯一确定1条记录, 仓单预售 wrfactortypeid + deliverymonth 唯一确定1条记录
  18. // @Produce json
  19. // @Security ApiKeyAuth
  20. // @Param page query int false "页码"
  21. // @Param pagesize query int false "每页条数"
  22. // @Param marketid query int false "仓单贸易市场id"
  23. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  24. // @Param haswr query int false "0:仓单预售 1:仓单贸易"
  25. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  26. // @Param warehouseid query int false "仓库id(筛选条件)"
  27. // @Param deliverygoodsid query int false "品种id"
  28. // @Param wrstandardid query int false "品类id"
  29. // @Param brandid query int false "品牌id(dgfactoryitemid)"
  30. // @Param yearsid query int false "年份id(dgfactoryitemid)"
  31. // @Param wrfactortypeid query string false "仓单要素id"
  32. // @Param deliverymonth query string false "交收月(yyyy-mm) 仓单预售填写"
  33. // @Success 200 {array} models.WrOrderQuote
  34. // @Failure 500 {object} app.Response
  35. // @Router /WrTrade2/QueryOrderQuote [get]
  36. // @Tags 仓单贸易v2
  37. func QueryOrderQuote(c *gin.Context) {
  38. a := app.GinUtils{Gin: app.Gin{C: c}}
  39. m := models.WrOrderQuote{HasWr: -1}
  40. a.DoBindReq(&m)
  41. a.DoGetDataByPage(&m)
  42. }
  43. // QueryOrderQuoteDetail
  44. // @Summary 查询买卖大厅
  45. // @Produce json
  46. // @Security ApiKeyAuth
  47. // @Param page query int false "页码"
  48. // @Param pagesize query int false "每页条数"
  49. // @Param marketid query int false "仓单贸易市场id"
  50. // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价"
  51. // @Param haswr query int false "0:仓单预售 1:仓单贸易"
  52. // @Param wrfactortypeid query int true "仓单要素id"
  53. // @Param goodsid query int false "期货商品id(浮动价方式时填)"
  54. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  55. // @Param deliverymonth query string false "交收月(yyyy-mm) 查仓单预售的买卖大厅时填写"
  56. // @Success 200 {array} models.WrOrderQuoteDetail
  57. // @Failure 500 {object} app.Response
  58. // @Router /WrTrade2/QueryOrderQuoteDetail [get]
  59. // @Tags 仓单贸易v2
  60. func QueryOrderQuoteDetail(c *gin.Context) {
  61. a := app.GinUtils{Gin: app.Gin{C: c}}
  62. m := models.WrOrderQuoteDetail{HasWr: -1}
  63. a.DoBindReq(&m)
  64. a.DoGetDataByPage(&m)
  65. }
  66. // QueryOrderQuoteMyq
  67. // @Summary 查询贸易圈挂牌大厅
  68. // @Description
  69. // @Produce json
  70. // @Security ApiKeyAuth
  71. // @Param page query int false "页码"
  72. // @Param pagesize query int false "每页条数"
  73. // @Param userid query int true "用户id"
  74. // @Param marketid query int false "仓单贸易市场id"
  75. // @Param haswr query int false "0:仓单预售 1:仓单贸易"
  76. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  77. // @Param deliverygoodsid query int false "品种id"
  78. // @Param wrstandardid query int false "品类id"
  79. // @Param deliverymonth query string false "交收月(yyyy-mm) 仓单预售填写"
  80. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  81. // @Success 200 {array} models.WrQuoteOrderMyq
  82. // @Failure 500 {object} app.Response
  83. // @Router /WrTrade2/QueryOrderQuoteMyq [get]
  84. // @Tags 仓单贸易v2
  85. func QueryOrderQuoteMyq(c *gin.Context) {
  86. a := app.GinUtils{Gin: app.Gin{C: c}}
  87. m := models.WrQuoteOrderMyq{HasWr: -1}
  88. a.DoBindReq(&m)
  89. a.DoGetDataByPage(&m)
  90. }
  91. // QueryWrPosition
  92. // @Summary 查询现货(预售)仓单持仓
  93. // @Description 页面 现货仓单->现货汇总/库存汇总; 预售仓单->订单汇总
  94. // @Produce json
  95. // @Security ApiKeyAuth
  96. // @Param userid query int true "用户id"
  97. // @Param querytype query int true "查询类型 1-现货汇总 2-库存汇总(订单汇总)"
  98. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  99. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  100. // @Param warehouseid query int false "仓库id(筛选条件)"
  101. // @Param deliverygoodsid query int false "品种id"
  102. // @Param wrstandardid query int false "品类id"
  103. // @Success 200 {array} models.WrPosition
  104. // @Failure 500 {object} app.Response
  105. // @Router /WrTrade2/QueryWrPosition [get]
  106. // @Tags 仓单贸易v2
  107. func QueryWrPosition(c *gin.Context) {
  108. a := app.GinUtils{Gin: app.Gin{C: c}}
  109. m := models.WrPosition{}
  110. a.DoBindReq(&m)
  111. a.DoGetDataI(&m)
  112. }
  113. // QueryWrOrderDetail
  114. // @Summary 查询仓单委托单
  115. // @Description 页面 现货仓单 | 预售仓单 -> 委托单
  116. // @Produce json
  117. // @Security ApiKeyAuth
  118. // @Param page query int false "页码"
  119. // @Param pagesize query int false "每页条数"
  120. // @Param userid query int true "用户id"
  121. // @Param marketid query int false "仓单贸易市场id"
  122. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  123. // @Param bcancel query int false "是否仅查可撤单据 1:可撤 注:此参数仅对当前记录有效, 且不含47模式市场"
  124. // @Param wrtradetype query int false "仓单贸易类型 - 1:挂牌 2:摘牌 3:提货卖(文化中国) 4:提货买(文化中国)"
  125. // @Param begindate query string false "开始交易日(yyyymmdd)"
  126. // @Param enddate query string false "结束交易日(yyyymmdd)"
  127. // @Success 200 {array} models.WrOrderDetail
  128. // @Failure 500 {object} app.Response
  129. // @Router /WrTrade2/QueryWrOrderDetail [get]
  130. // @Tags 仓单贸易v2
  131. func QueryWrOrderDetail(c *gin.Context) {
  132. a := app.GinUtils{Gin: app.Gin{C: c}}
  133. m := models.WrOrderDetail{}
  134. a.DoBindReq(&m)
  135. a.DoGetDataByPage(&m)
  136. }
  137. // QueryWrSpecialMatchOrder
  138. // @Summary 查询指定成交
  139. // @Description 页面 现货仓单 | 预售仓单 -> 指定成交
  140. // @Produce json
  141. // @Security ApiKeyAuth
  142. // @Param page query int false "页码"
  143. // @Param pagesize query int false "每页条数"
  144. // @Param userid query int true "用户id"
  145. // @Param marketid query int false "仓单贸易市场id"
  146. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  147. // @Param isspecified query int false "1:指定好友(贸易圈) 2:指定对手 - [挂牌]"
  148. // @Success 200 {array} models.WrSpecialMatchOrder
  149. // @Failure 500 {object} app.Response
  150. // @Router /WrTrade2/QueryWrSpecialMatchOrder [get]
  151. // @Tags 仓单贸易v2
  152. func QueryWrSpecialMatchOrder(c *gin.Context) {
  153. a := app.GinUtils{Gin: app.Gin{C: c}}
  154. m := models.WrSpecialMatchOrder{}
  155. a.DoBindReq(&m)
  156. a.DoGetDataByPage(&m)
  157. }
  158. // QueryWrTradeDetail
  159. // @Summary 查询仓单成交明细
  160. // @Produce json
  161. // @Security ApiKeyAuth
  162. // @Param page query int false "页码"
  163. // @Param pagesize query int false "每页条数"
  164. // @Param userid query int true "用户id"
  165. // @Param marketid query int false "仓单贸易市场id"
  166. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  167. // @Param begindate query string false "开始交易日(yyyymmdd)"
  168. // @Param enddate query string false "结束交易日(yyyymmdd)"
  169. // @Success 200 {array} models.WrTradeDetail
  170. // @Failure 500 {object} app.Response
  171. // @Router /WrTrade2/QueryWrTradeDetail [get]
  172. // @Tags 仓单贸易v2
  173. func QueryWrTradeDetail(c *gin.Context) {
  174. a := app.GinUtils{Gin: app.Gin{C: c}}
  175. m := models.WrTradeDetail{}
  176. a.DoBindReq(&m)
  177. a.DoGetDataByPage(&m)
  178. }
  179. // QueryWrGoodsInfo
  180. // @Summary 查询仓单商品信息
  181. // @Produce json
  182. // @Security ApiKeyAuth
  183. // @Param marketid query int false "仓单贸易市场id"
  184. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  185. // @Param wrfactortypeid query int true "仓单要素id"
  186. // @Param tmplateid query int false "履约模板id(如果指定了履约模板id,履约信息将按模板id查, 否则去市场配置表中找模板)"
  187. // @Success 200 {array} models.WrGoodsInfo
  188. // @Failure 500 {object} app.Response
  189. // @Router /WrTrade2/QueryWrGoodsInfo [get]
  190. // @Tags 仓单贸易v2
  191. func QueryWrGoodsInfo(c *gin.Context) {
  192. a := app.GinUtils{Gin: app.Gin{C: c}}
  193. m := models.WrGoodsInfo{}
  194. a.DoBindReq(&m)
  195. a.DoGetDataI(&m)
  196. }
  197. // QueryPerformancePlan
  198. // @Summary 查询履约信息
  199. // @Produce json
  200. // @Security ApiKeyAuth
  201. // @Param userid query int true "用户id"
  202. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  203. // @Param status query string false "履约状态(可多个,逗号隔开) 1:待激活 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 10:超时关闭"
  204. // @Param begindate query string false "开始交易日(yyyymmdd)"
  205. // @Param enddate query string false "结束交易日(yyyymmdd)"
  206. // @Success 200 {array} models.WrPerformancePlan
  207. // @Failure 500 {object} app.Response
  208. // @Router /WrTrade2/QueryPerformancePlan [get]
  209. // @Tags 仓单贸易v2
  210. func QueryPerformancePlan(c *gin.Context) {
  211. a := app.GinUtils{Gin: app.Gin{C: c}}
  212. m := models.WrPerformancePlan{}
  213. a.DoBindReq(&m)
  214. a.DoGetDataI(&m)
  215. }
  216. // QueryHoldLB
  217. // @Summary 查询仓单持有记录
  218. // @Description 页面 现货仓单->现货明细? , 表名叫仓单持有记录, 有挂单特有维度,为防误解汇总也有相关维度, 新写接口,不跟汇总合在一起了。
  219. // @Produce json
  220. // @Security ApiKeyAuth
  221. // @Param accountid query int true "资金账号"
  222. // @Param warehouseid query int false "仓库id"
  223. // @Param deliverygoodsid query int false "品种id"
  224. // @Param wrstandardid query int false "品类id"
  225. // @Param wrfactortypeid query int false "仓单要素id"
  226. // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm"
  227. // @Success 200 {array} models.WrHoldLB
  228. // @Failure 500 {object} app.Response
  229. // @Router /WrTrade2/QueryHoldLB [get]
  230. // @Tags 仓单贸易v2
  231. func QueryHoldLB(c *gin.Context) {
  232. a := app.GinUtils{Gin: app.Gin{C: c}}
  233. m := models.WrHoldLB{}
  234. a.DoBindReq(&m)
  235. a.DoGetDataI(&m)
  236. }
  237. // QueryFilterItem
  238. // @Summary 查询筛选框列表 - 作废(以前给pcweb简单筛选框用的,后来改版了)
  239. // @Produce json
  240. // @Security ApiKeyAuth
  241. // @Param itype query string true "类型(可多选,逗号隔开) 1-品种 2-品类(商品) 3-仓库"
  242. // @Success 200 {array} models.WrFilterItem
  243. // @Failure 500 {object} app.Response
  244. // @Router /WrTrade2/QueryFilterItem [get]
  245. // @Tags 仓单贸易v2
  246. func QueryFilterItem(c *gin.Context) {
  247. a := app.GinUtils{Gin: app.Gin{C: c}}
  248. m := models.WrFilterItem{}
  249. a.DoBindReq(&m)
  250. a.DoGetDataI(&m)
  251. }
  252. // QueryFaProductDetail
  253. // @Summary 查询融资产品列表
  254. // @Description 页面 买卖大厅 -> 选择融资方案
  255. // @Produce json
  256. // @Security ApiKeyAuth
  257. // @Param wrfactortypeid query int true "仓单要素id"
  258. // @Success 200 {array} models.WrFAProductDetail
  259. // @Failure 500 {object} app.Response
  260. // @Router /WrTrade2/QueryFaProductDetail [get]
  261. // @Tags 仓单贸易v2
  262. func QueryFaProductDetail(c *gin.Context) {
  263. a := app.GinUtils{Gin: app.Gin{C: c}}
  264. m := models.WrFAProductDetail{}
  265. a.DoBindReq(&m)
  266. a.DoGetDataI(&m)
  267. }
  268. // QueryWrFactorTypeInfo
  269. // @Summary 查询仓单要素详细信息
  270. // @Produce json
  271. // @Security ApiKeyAuth
  272. // @Param wrfactortypeid query int true "仓单要素id"
  273. // @Success 200 {array} models.WrFactorTypeInfo
  274. // @Failure 500 {object} app.Response
  275. // @Router /WrTrade2/QueryWrFactorTypeInfo [get]
  276. // @Tags 仓单贸易v2
  277. func QueryWrFactorTypeInfo(c *gin.Context) {
  278. a := app.GinUtils{Gin: app.Gin{C: c}}
  279. m := models.WrFactorTypeInfo{}
  280. a.DoBindReq(&m)
  281. a.DoGetDataI(&m)
  282. }
  283. // QueryWrFactorTypeInfoEx
  284. // @Summary 查询仓单要素详细信息列表项
  285. // @Produce json
  286. // @Security ApiKeyAuth
  287. // @Param wrfactortypeid query int true "仓单要素id"
  288. // @Success 200 {array} models.WrTypeItem
  289. // @Failure 500 {object} app.Response
  290. // @Router /WrTrade2/QueryWrFactorTypeInfoEx [get]
  291. // @Tags 仓单贸易v2
  292. func QueryWrFactorTypeInfoEx(c *gin.Context) {
  293. a := app.GinUtils{Gin: app.Gin{C: c}}
  294. m := models.WrFactorTypeInfoEx{}
  295. a.DoBindReq(&m)
  296. a.DoGetDataI(&m)
  297. }
  298. // QueryWrMarketTradeConfig
  299. // @Summary 查询市场交易参数配置
  300. // @Produce json
  301. // @Security ApiKeyAuth
  302. // @Param marketid query int false "市场id"
  303. // @Success 200 {array} models.WrMarketTradeConfig
  304. // @Failure 500 {object} app.Response
  305. // @Router /WrTrade2/QueryWrMarketTradeConfig [get]
  306. // @Tags 仓单贸易v2
  307. func QueryWrMarketTradeConfig(c *gin.Context) {
  308. a := app.GinUtils{Gin: app.Gin{C: c}}
  309. m := models.WrMarketTradeConfig{}
  310. a.DoBindReq(&m)
  311. a.DoGetDataI(&m)
  312. }
  313. // QueryFtDeliveryGoods
  314. // @Summary 查询品种品类筛选框列表
  315. // @Produce json
  316. // @Security ApiKeyAuth
  317. // @Success 200 {array} models.WrFtDeliveryGoods
  318. // @Failure 500 {object} app.Response
  319. // @Router /WrTrade2/QueryFtDeliveryGoods [get]
  320. // @Tags 仓单贸易v2
  321. func QueryFtDeliveryGoods(c *gin.Context) {
  322. a := app.GinUtils{Gin: app.Gin{C: c}}
  323. m := models.WrFtDeliveryGoods{}
  324. a.DoBindReq(&m)
  325. a.DoGetDataI(&m)
  326. }
  327. // QueryWrStandardFactoryItem
  328. // @Summary 查询品类要素定义项
  329. // @Produce json
  330. // @Security ApiKeyAuth
  331. // @Param wrstandardid query int true "品类id"
  332. // @Success 200 {array} models.WrStandardFactoryItemEx
  333. // @Failure 500 {object} app.Response
  334. // @Router /WrTrade2/QueryWrStandardFactoryItem [get]
  335. // @Tags 仓单贸易v2
  336. func QueryWrStandardFactoryItem(c *gin.Context) {
  337. a := app.GinUtils{Gin: app.Gin{C: c}}
  338. m := models.WrStandardFactoryItemEx{}
  339. a.DoBindReq(&m)
  340. a.DoGetDataI(&m)
  341. }
  342. // QueryWrPerformancePlanStep
  343. // @Summary 查询履约信息详情
  344. // @Produce json
  345. // @Security ApiKeyAuth
  346. // @Param planid query int true "履约计划id(performanceplanid)"
  347. // @Param curstepid query int false "当前步骤id"
  348. // @Success 200 {array} models.WrPerformancePlanStep
  349. // @Failure 500 {object} app.Response
  350. // @Router /WrTrade2/QueryWrPerformancePlanStep [get]
  351. // @Tags 仓单贸易v2
  352. func QueryWrPerformancePlanStep(c *gin.Context) {
  353. a := app.GinUtils{Gin: app.Gin{C: c}}
  354. m := models.WrPerformancePlanStep{}
  355. a.DoBindReq(&m)
  356. a.DoGetDataI(&m)
  357. }
  358. // QueryWrFinanceBuyApply
  359. // @Summary 查询融资购买申请
  360. // @Description 页面 融资信息+ / 申请单
  361. // @Produce json
  362. // @Security ApiKeyAuth
  363. // @Param userid query int true "用户id"
  364. // @Success 200 {array} models.WrFinanceBuyApply
  365. // @Failure 500 {object} app.Response
  366. // @Router /WrTrade2/QueryWrFinanceBuyApply [get]
  367. // @Tags 仓单贸易v2
  368. func QueryWrFinanceBuyApply(c *gin.Context) {
  369. a := app.GinUtils{Gin: app.Gin{C: c}}
  370. m := models.WrFinanceBuyApply{}
  371. a.DoBindReq(&m)
  372. a.DoGetDataI(&m)
  373. }
  374. // QueryWrScfContract
  375. // @Summary 查询仓单贸易融资合同
  376. // @Produce json
  377. // @Security ApiKeyAuth
  378. // @Param userid query int true "用户id"
  379. // @Param scfcontractid query int false "融资合同id"
  380. // @Success 200 {array} models.WrScfContract
  381. // @Failure 500 {object} app.Response
  382. // @Router /WrTrade2/QueryWrScfContract [get]
  383. // @Tags 仓单贸易v2
  384. func QueryWrScfContract(c *gin.Context) {
  385. a := app.GinUtils{Gin: app.Gin{C: c}}
  386. m := models.WrScfContract{}
  387. a.DoBindReq(&m)
  388. a.DoGetDataI(&m)
  389. }
  390. // QueryWrBuybackDetail
  391. // @Summary 查询仓单回购明细
  392. // @Produce json
  393. // @Security ApiKeyAuth
  394. // @Param scfcontractid query int false "融资合同id"
  395. // @Success 200 {array} models.WrBuybackDetail
  396. // @Failure 500 {object} app.Response
  397. // @Router /WrTrade2/QueryWrBuybackDetail [get]
  398. // @Tags 仓单贸易v2
  399. func QueryWrBuybackDetail(c *gin.Context) {
  400. a := app.GinUtils{Gin: app.Gin{C: c}}
  401. m := models.WrBuybackDetail{}
  402. a.DoBindReq(&m)
  403. a.DoGetDataI(&m)
  404. }
  405. // QueryWrScfContractInterest
  406. // @Summary 查询融资合同费用明细
  407. // @Produce json
  408. // @Security ApiKeyAuth
  409. // @Param scfcontractid query int false "融资合同id"
  410. // @Success 200 {array} models.WrScfContractInterest
  411. // @Failure 500 {object} app.Response
  412. // @Router /WrTrade2/QueryWrScfContractInterest [get]
  413. // @Tags 仓单贸易v2
  414. func QueryWrScfContractInterest(c *gin.Context) {
  415. a := app.GinUtils{Gin: app.Gin{C: c}}
  416. m := models.WrScfContractInterest{}
  417. a.DoBindReq(&m)
  418. a.DoGetDataI(&m)
  419. }
  420. // QueryWrOutInApply
  421. // @Summary 查询提货申请
  422. // @Produce json
  423. // @Security ApiKeyAuth
  424. // @Param page query int false "页码"
  425. // @Param pagesize query int false "每页条数"
  426. // @Param userid query int true "用户id"
  427. // @Param begindate query string false "开始交易日(yyyymmdd)"
  428. // @Param enddate query string false "结束交易日(yyyymmdd)"
  429. // @Success 200 {array} models.WrOutInApply
  430. // @Failure 500 {object} app.Response
  431. // @Router /WrTrade2/QueryWrOutInApply [get]
  432. // @Tags 仓单贸易v2
  433. func QueryWrOutInApply(c *gin.Context) {
  434. a := app.GinUtils{Gin: app.Gin{C: c}}
  435. m := models.WrOutInApply{}
  436. a.DoBindReq(&m)
  437. // a.DoGetDataI(&m)
  438. a.DoGetDataByPage(&m)
  439. }
  440. // QueryWrDeliveryDetail
  441. // @Summary 查询交收
  442. // @Produce json
  443. // @Security ApiKeyAuth
  444. // @Param userid query int true "用户id"
  445. // @Param accountid query int false "资金账号id"
  446. // @Param begindate query string false "开始交易日(yyyymmdd)"
  447. // @Param enddate query string false "结束交易日(yyyymmdd)"
  448. // @Success 200 {array} models.WrDeliveryDetail
  449. // @Failure 500 {object} app.Response
  450. // @Router /WrTrade2/QueryWrDeliveryDetail [get]
  451. // @Tags 仓单贸易v2
  452. func QueryWrDeliveryDetail(c *gin.Context) {
  453. a := app.GinUtils{Gin: app.Gin{C: c}}
  454. m := models.WrDeliveryDetail{}
  455. a.DoBindReq(&m)
  456. a.DoGetDataI(&m)
  457. }
  458. // QueryWrBsGoodsInfo
  459. // @Summary 查询合约交易买卖大厅详情
  460. // @Description 合约交易/买卖大厅/详情
  461. // @Produce json
  462. // @Security ApiKeyAuth
  463. // @Param goodsid query int true "商品id"
  464. // @Success 200 {array} models.WrBsGoodsInfo
  465. // @Failure 500 {object} app.Response
  466. // @Router /WrTrade2/QueryWrBsGoodsInfo [get]
  467. // @Tags 仓单贸易v2
  468. func QueryWrBsGoodsInfo(c *gin.Context) {
  469. a := app.GinUtils{Gin: app.Gin{C: c}}
  470. m := models.WrBsGoodsInfo{}
  471. a.DoBindReq(&m)
  472. a.DoGetDataI(&m)
  473. }
  474. // QueryWrTradeOrderDetail
  475. // @Summary 查询合约交易买卖大厅
  476. // @Produce json
  477. // @Security ApiKeyAuth
  478. // @Param page query int false "页码"
  479. // @Param pagesize query int false "每页条数"
  480. // @Param goodsid query int true "商品id"
  481. // @Param buyorsell query int true "买卖方向 0-买 1-卖"
  482. // @Success 200 {array} models.WrTradeOrderDetail
  483. // @Failure 500 {object} app.Response
  484. // @Router /WrTrade2/QueryWrTradeOrderDetail [get]
  485. // @Tags 仓单贸易v2
  486. func QueryWrTradeOrderDetail(c *gin.Context) {
  487. a := app.GinUtils{Gin: app.Gin{C: c}}
  488. m := models.WrTradeOrderDetail{}
  489. a.DoBindReq(&m)
  490. a.DoGetDataByPage(&m)
  491. }
  492. // QueryWrAverageTradePrice
  493. // @Summary 查询成交价(历史走势)
  494. // @Produce json
  495. // @Security ApiKeyAuth
  496. // @Param page query int false "页码"
  497. // @Param pagesize query int false "每页条数"
  498. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  499. // @Param wrfactortypeid query int true "仓单要素id"
  500. // @Success 200 {array} models.WrAverageTradePrice
  501. // @Failure 500 {object} app.Response
  502. // @Router /WrTrade2/QueryWrAverageTradePrice [get]
  503. // @Tags 仓单贸易v2
  504. func QueryWrAverageTradePrice(c *gin.Context) {
  505. a := app.GinUtils{Gin: app.Gin{C: c}}
  506. m := models.WrAverageTradePrice{}
  507. a.DoBindReq(&m)
  508. a.DoGetDataByPage(&m)
  509. }
  510. // QueryWrDeliveryAvalidHoldLB
  511. // @Summary 查询合约交收可点选仓单
  512. // @Produce json
  513. // @Security ApiKeyAuth
  514. // @Param accountid query int true "资金账号"
  515. // @Param goodsid query int true "商品id"
  516. // @Success 200 {array} models.WrDeliveryAvalidHoldLB
  517. // @Failure 500 {object} app.Response
  518. // @Router /WrTrade2/QueryWrDeliveryAvalidHoldLB [get]
  519. // @Tags 仓单贸易v2
  520. func QueryWrDeliveryAvalidHoldLB(c *gin.Context) {
  521. a := app.GinUtils{Gin: app.Gin{C: c}}
  522. m := models.WrDeliveryAvalidHoldLB{}
  523. a.DoBindReq(&m)
  524. a.DoGetDataI(&m)
  525. }
  526. // QueryWrUserFriend
  527. // @Summary 查询我的朋友
  528. // @Produce json
  529. // @Security ApiKeyAuth
  530. // @Param userid query int true "用户id"
  531. // @Param newuserid query int false "新朋友userid, 如果填写了此项则查找新朋友"
  532. // @Success 200 {array} models.WrUserFriend
  533. // @Failure 500 {object} app.Response
  534. // @Router /WrTrade2/QueryWrUserFriend [get]
  535. // @Tags 仓单贸易v2
  536. func QueryWrUserFriend(c *gin.Context) {
  537. a := app.GinUtils{Gin: app.Gin{C: c}}
  538. m := models.WrUserFriend{}
  539. a.DoBindReq(&m)
  540. a.DoGetDataI(&m)
  541. }
  542. // QueryWrFriendApply
  543. // @Summary 查询好友申请记录
  544. // @Produce json
  545. // @Security ApiKeyAuth
  546. // @Param userid query int true "用户id"
  547. // @Success 200 {array} models.WrFriendApply
  548. // @Failure 500 {object} app.Response
  549. // @Router /WrTrade2/QueryWrFriendApply [get]
  550. // @Tags 仓单贸易v2
  551. func QueryWrFriendApply(c *gin.Context) {
  552. a := app.GinUtils{Gin: app.Gin{C: c}}
  553. m := models.WrFriendApply{}
  554. a.DoBindReq(&m)
  555. a.DoGetDataI(&m)
  556. }
  557. // QueryPermancePlanTmp
  558. // @Summary 查询履约模板
  559. // @Description 返回指定用户的模板和公共模板(用户id为空)
  560. // @Description 注意:天津麦顿客户 填写marketid参数,其它参数不用填;其它客户不用填marketid字段
  561. // @Produce json
  562. // @Security ApiKeyAuth
  563. // @Param userid query int false "用户id"
  564. // @Param tmptype query string false "模板类型(逗号隔开), 0:通用 1:交割 2:仓单贸易 3:预售集采 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式--失效枚举:4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式"
  565. // @Param includepub query int false "是否包含公共模板(用户id为空的) 1-包含"
  566. // @Param marketid query int false "市场id(天津麦顿指定此参数,其它不用)"
  567. // @Success 200 {array} models.WrPerformanceTemplateEx
  568. // @Failure 500 {object} app.Response
  569. // @Router /WrTrade2/QueryPermancePlanTmp [get]
  570. // @Tags 仓单贸易v2
  571. func QueryPermancePlanTmp(c *gin.Context) {
  572. a := app.GinUtils{Gin: app.Gin{C: c}}
  573. m := models.WrPerformanceTemplateEx{}
  574. m.MARKETID = -1
  575. a.DoBindReq(&m)
  576. a.DoGetDataI(&m)
  577. }
  578. // QueryWrTradeBargainApply
  579. // @Summary 查询议价单
  580. // @Description 1.页面 挂单/议价单, 只需传单号就行 <br>2.页面 议价->我的议价 参数 userid=登录userid <br>3.页面 议价->对方议价 填写matchuserid=登录用户id
  581. // @Produce json
  582. // @Security ApiKeyAuth
  583. // @Param userid query int false "议价人id(摘牌方)"
  584. // @Param matchuserid query int false "挂牌方id(查对方议价时,填写此项)"
  585. // @Param wrtradeorderid query int false "关联委托单id"
  586. // @Param haswr query int true "0:仓单预售 1:仓单贸易"
  587. // @Param begindate query string false "开始交易日(yyyymmdd)"
  588. // @Param enddate query string false "结束交易日(yyyymmdd)"
  589. // @Success 200 {array} models.WRTradeBargainApply
  590. // @Failure 500 {object} app.Response
  591. // @Router /WrTrade2/QueryWrTradeBargainApply [get]
  592. // @Tags 仓单贸易v2
  593. func QueryWrTradeBargainApply(c *gin.Context) {
  594. a := app.GinUtils{Gin: app.Gin{C: c}}
  595. m := models.WRTradeBargainApply{}
  596. a.DoBindReq(&m)
  597. a.DoGetDataI(&m)
  598. }
  599. // QueryWrPerformanceStepType
  600. // @Summary 查询履约步骤枚举
  601. // @Produce json
  602. // @Security ApiKeyAuth
  603. // @Success 200 {array} models.WrPerformanceStepType
  604. // @Failure 500 {object} app.Response
  605. // @Router /WrTrade2/QueryWrPerformanceStepType [get]
  606. // @Tags 仓单贸易v2
  607. func QueryWrPerformanceStepType(c *gin.Context) {
  608. a := app.GinUtils{Gin: app.Gin{C: c}}
  609. m := models.WrPerformanceStepType{}
  610. a.DoBindReq(&m)
  611. a.DoGetDataI(&m)
  612. }
  613. // QueryWrUserReceiptInfo
  614. // @Summary 查询发票信息
  615. // @Produce json
  616. // @Security ApiKeyAuth
  617. // @Param userid query int false "用户id"
  618. // @Param receipttype query int false "发票类型 - 1:个人 2:企业"
  619. // @Success 200 {array} models.WrUserReceiptInfo
  620. // @Failure 500 {object} app.Response
  621. // @Router /WrTrade2/QueryWrUserReceiptInfo [get]
  622. // @Tags 仓单贸易v2
  623. func QueryWrUserReceiptInfo(c *gin.Context) {
  624. a := app.GinUtils{Gin: app.Gin{C: c}}
  625. m := models.WrUserReceiptInfo{}
  626. a.DoBindReq(&m)
  627. a.DoGetDataI(&m)
  628. }
  629. // QuerySiteColumnDetail
  630. // @Summary 查询资讯
  631. // @Produce json
  632. // @Param page query int false "页码"
  633. // @Param pagesize query int false "每页条数"
  634. // @Param columnid query int false "所属栏目id"
  635. // @Success 200 {array} models.WrSiteColumnDetail
  636. // @Failure 500 {object} app.Response
  637. // @Router /WrTrade2/QuerySiteColumnDetail [get]
  638. // @Tags 仓单贸易v2
  639. func QuerySiteColumnDetail(c *gin.Context) {
  640. a := app.GinUtils{Gin: app.Gin{C: c}}
  641. m := models.WrSiteColumnDetail{COLUMNID: -9999999999}
  642. a.DoBindReq(&m)
  643. a.DoGetDataByPage(&m)
  644. }
  645. // QuerySiteColumnConfig
  646. // @Summary 查询资讯栏目配置
  647. // @Produce json
  648. // @Param page query int false "页码"
  649. // @Param pagesize query int false "每页条数"
  650. // @Param columntype query int false "栏目类型 - 1:行情资讯 10:会员服务 30:关于我们 100:核心企业栏目-百色"
  651. // @Success 200 {array} models.Sitecolumnconfig
  652. // @Failure 500 {object} app.Response
  653. // @Router /WrTrade2/QuerySiteColumnConfig [get]
  654. // @Tags 仓单贸易v2
  655. func QuerySiteColumnConfig(c *gin.Context) {
  656. a := app.GinUtils{Gin: app.Gin{C: c}}
  657. m := models.Sitecolumnconfig{}
  658. a.DoBindReq(&m)
  659. a.DoGetDataByPage(&m)
  660. }
  661. // QueryDeliveryGoodsSection
  662. // @Summary 查询板块(分类)
  663. // @Produce json
  664. // @Security ApiKeyAuth
  665. // @Success 200 {array} models.WrDeliveryGoodsSection
  666. // @Failure 500 {object} app.Response
  667. // @Router /WrTrade2/QueryDeliveryGoodsSection [get]
  668. // @Tags 仓单贸易v2
  669. func QueryDeliveryGoodsSection(c *gin.Context) {
  670. a := app.GinUtils{Gin: app.Gin{C: c}}
  671. m := models.WrDeliveryGoodsSection{}
  672. a.DoBindReq(&m)
  673. a.DoGetDataI(&m)
  674. }
  675. // QuerySpotGroupTradeSum
  676. // @Summary 查询指数
  677. // @Produce json
  678. // @Security ApiKeyAuth
  679. // @Success 200 {array} models.WrSpotGroupTradeSumEx
  680. // @Failure 500 {object} app.Response
  681. // @Router /WrTrade2/QuerySpotGroupTradeSum [get]
  682. // @Tags 仓单贸易v2
  683. func QuerySpotGroupTradeSum(c *gin.Context) {
  684. a := app.GinUtils{Gin: app.Gin{C: c}}
  685. m := models.WrSpotGroupTradeSumEx{}
  686. a.DoBindReq(&m)
  687. a.DoGetDataI(&m)
  688. }
  689. // QuerySpotGroupTradeSumDetail
  690. // @Summary 查询指数详细(价格走势图)
  691. // @Description 查询的结果将会按日期 从小到大 排序
  692. // @Produce json
  693. // @Security ApiKeyAuth
  694. // @param deliverygoodsid query int true "现货商品id"
  695. // @param lastnum query int false "查询最新多少条记录(如不填写此项, 默认查30条)"
  696. // @Success 200 {array} models.WrSpotGroupTradeSumDetail
  697. // @Failure 500 {object} app.Response
  698. // @Router /WrTrade2/QuerySpotGroupTradeSumDetail [get]
  699. // @Tags 仓单贸易v2
  700. func QuerySpotGroupTradeSumDetail(c *gin.Context) {
  701. a := app.GinUtils{Gin: app.Gin{C: c}}
  702. m := models.WrSpotGroupTradeSumDetail{}
  703. a.DoBindReq(&m)
  704. a.DoGetDataI(&m)
  705. }
  706. // QueryWrPreSaleInfo
  707. // @Summary 查询新品发布
  708. // @Produce json
  709. // @Security ApiKeyAuth
  710. // @param marketid query int false "市场id"
  711. // @param presalestatus query string false "预售状态(逗号隔开,如1,2,3) 1:未开始 2:进行中 3:已结束 4:已关闭"
  712. // @param lotteryflag query int false "摇号标识 - 0:未摇号 1:已摇号"
  713. // @param lastnum query int false "最近多少条记录(按创建时间倒序)"
  714. // @Success 200 {array} models.WrPreSaleInfo
  715. // @Failure 500 {object} app.Response
  716. // @Router /WrTrade2/QueryWrPreSaleInfo [get]
  717. // @Tags 仓单贸易v2
  718. func QueryWrPreSaleInfo(c *gin.Context) {
  719. a := app.GinUtils{Gin: app.Gin{C: c}}
  720. m := models.WrPreSaleInfo{LOTTERYFLAG: -1}
  721. a.DoBindReq(&m)
  722. a.DoGetDataI(&m)
  723. }
  724. // QueryWrReckonSpotGoodsTradeSum
  725. // @Summary 查询价格走势
  726. // @Produce json
  727. // @Security ApiKeyAuth
  728. // @param marketid query int true "市场id"
  729. // @param wrstandardid query int true "现货商品id"
  730. // @Param begindate query string false "开始交易日(yyyymmdd)"
  731. // @Param enddate query string false "结束交易日(yyyymmdd)"
  732. // @param lastnum query int false "最近多少条记录(按交易日倒序)"
  733. // @param istoday query bool false "是否今日"
  734. // @Success 200 {array} models.WrReckonSpotGoodsTradeSum
  735. // @Failure 500 {object} app.Response
  736. // @Router /WrTrade2/QueryWrReckonSpotGoodsTradeSum [get]
  737. // @Tags 仓单贸易v2
  738. func QueryWrReckonSpotGoodsTradeSum(c *gin.Context) {
  739. a := app.GinUtils{Gin: app.Gin{C: c}}
  740. m := models.WrReckonSpotGoodsTradeSum{}
  741. a.DoBindReq(&m)
  742. a.DoGetDataI(&m)
  743. }
  744. // QueryWrSearchUser
  745. // @Summary 查询用户
  746. // @Produce json
  747. // @Security ApiKeyAuth
  748. // @param username query string true "用户名称(模糊匹配)"
  749. // @Success 200 {array} models.WrSearchUser
  750. // @Failure 500 {object} app.Response
  751. // @Router /WrTrade2/QueryWrSearchUser [get]
  752. // @Tags 仓单贸易v2
  753. func QueryWrSearchUser(c *gin.Context) {
  754. a := app.GinUtils{Gin: app.Gin{C: c}}
  755. m := models.WrSearchUser{}
  756. a.DoBindReq(&m)
  757. a.DoGetDataI(&m)
  758. }
  759. // QueryWrDraftUserInfo
  760. // @Summary 查询实名认证信息
  761. // @Produce json
  762. // @Security ApiKeyAuth
  763. // @Param userid query int true "用户ID"
  764. // @Param userstatus query int false "用户状态 1:正常 2:注销"
  765. // @Success 200 {array} models.WrDraftUserInfo
  766. // @Failure 500 {object} app.Response
  767. // @Router /WrTrade2/QueryWrDraftUserInfo [get]
  768. // @Tags 仓单贸易v2
  769. func QueryWrDraftUserInfo(c *gin.Context) {
  770. a := app.GinUtils{Gin: app.Gin{C: c}}
  771. m := models.WrDraftUserInfo{}
  772. a.DoBindReq(&m)
  773. a.DoGetDataI(&m)
  774. }
  775. // QueryWrBrandAndYears
  776. // @Summary 查询品牌和年份
  777. // @Produce json
  778. // @Security ApiKeyAuth
  779. // @Success 200 {array} models.WrBrandAndYears
  780. // @Failure 500 {object} app.Response
  781. // @Router /WrTrade2/QueryWrBrandAndYears [get]
  782. // @Tags 仓单贸易v2
  783. func QueryWrBrandAndYears(c *gin.Context) {
  784. a := app.GinUtils{Gin: app.Gin{C: c}}
  785. m := models.WrBrandAndYears{}
  786. a.DoBindReq(&m)
  787. a.DoGetDataI(&m)
  788. }
  789. // QueryWrClientAdSpaceConfig
  790. // @Summary 查询固定广告配置
  791. // @Produce json
  792. // @Security ApiKeyAuth
  793. // @Success 200 {array} models.WrClientAdSpaceConfig
  794. // @Failure 500 {object} app.Response
  795. // @Router /WrTrade2/QueryWrClientAdSpaceConfig [get]
  796. // @Tags 仓单贸易v2
  797. func QueryWrClientAdSpaceConfig(c *gin.Context) {
  798. a := app.GinUtils{Gin: app.Gin{C: c}}
  799. m := models.WrClientAdSpaceConfig{}
  800. a.DoBindReq(&m)
  801. a.DoGetDataI(&m)
  802. }
  803. // QueryXhcpSellBackApply
  804. // @Summary 查询我的回收申请(新会陈皮)
  805. // @Produce json
  806. // @Security ApiKeyAuth
  807. // @Param userid query int true "用户ID"
  808. // @Success 200 {array} models.Xhcpsellbackapply
  809. // @Failure 500 {object} app.Response
  810. // @Router /WrTrade2/QueryXhcpSellBackApply [get]
  811. // @Tags 仓单贸易v2
  812. func QueryXhcpSellBackApply(c *gin.Context) {
  813. a := app.GinUtils{Gin: app.Gin{C: c}}
  814. m := models.Xhcpsellbackapply{}
  815. a.DoBindReq(&m)
  816. a.DoGetDataI(&m)
  817. }
  818. // InsertXhcpSellBackApply
  819. // @Summary 新增回收申请(新会陈皮)
  820. // @Produce json
  821. // @Security ApiKeyAuth
  822. // @Param jsonBody body models.XhcpSellBackApplyEx true "回收申请"
  823. // @Success 200 {object} app.Response
  824. // @Failure 500 {object} app.Response
  825. // @Router /WrTrade2/InsertXhcpSellBackApply [post]
  826. // @Tags 仓单贸易v2
  827. func InsertXhcpSellBackApply(c *gin.Context) {
  828. a := app.GinUtils{Gin: app.Gin{C: c}}
  829. m := models.XhcpSellBackApplyEx{}
  830. a.DoBindReq(&m)
  831. if err := m.Insert(); err == nil {
  832. a.Response(http.StatusOK, e.SUCCESS, "OK")
  833. } else {
  834. logger.GetLogger().Errorf("insert fail, %v", err)
  835. a.Response(http.StatusBadRequest, e.ERROR_OPERATION_FAILED, nil)
  836. }
  837. }
  838. // QueryWrTradeQuote
  839. // @Summary 查询仓单贸易成交行情
  840. // @Produce json
  841. // @Security ApiKeyAuth
  842. // @param wrstandardid query int true "现货商品id"
  843. // @Param begindate query string true "开始日期(yyyymmdd)"
  844. // @Param enddate query string true "结束日期(yyyymmdd)"
  845. // @param marketid query int false "市场id"
  846. // @Success 200 {array} models.Wrtradetradequote
  847. // @Failure 500 {object} app.Response
  848. // @Router /WrTrade2/QueryWrTradeQuote [get]
  849. // @Tags 仓单贸易v2
  850. func QueryWrTradeQuote(c *gin.Context) {
  851. a := app.GinUtils{Gin: app.Gin{C: c}}
  852. m := models.Wrtradetradequote1{}
  853. a.DoBindReq(&m)
  854. a.DoGetDataI(&m)
  855. }