/** * @Author: zou.yingbin * @Create : 2021/7/20 18:30 * @Modify : 2021/7/20 18:30 */ package wrTrade2 import ( "github.com/gin-gonic/gin" "mtp2_if/global/app" "mtp2_if/models" ) // QueryOrderQuote // @Summary 查询大厅行情列表 // @Description 仓单交易 wrfactortypeid 唯一确定1条记录, 仓单预售 wrfactortypeid + deliverymonth 唯一确定1条记录 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param marketid query int false "仓单贸易市场id" // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Param dgitemname query string false "商品要素项名称模糊匹配, 逗号隔开, 如 产地1,品牌1,规格12mm" // @Param warehouseid query int false "仓库id(筛选条件)" // @Param deliverygoodsid query int false "品种id" // @Param wrstandardid query int false "品类id" // @Param wrfactortypeid query int false "仓单要素id" // @Param deliverymonth query string false "交收月(yyyy-mm) 仓单预售填写" // @Success 200 {array} models.WrOrderQuote // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryOrderQuote [get] // @Tags 仓单贸易v2 func QueryOrderQuote(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrOrderQuote{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryOrderQuoteDetail // @Summary 查询买卖大厅 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param marketid query int false "仓单贸易市场id" // @Param wrpricetype query int true "价格方式 - 1:固定价 2-浮动价" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Param wrfactortypeid query int true "仓单要素id" // @Param goodsid query int false "期货商品id(浮动价方式时填)" // @Param buyorsell query int true "买卖方向 0-买 1-卖" // @Param deliverymonth query string false "交收月(yyyy-mm) 查仓单预售的买卖大厅时填写" // @Success 200 {array} models.WrOrderQuoteDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryOrderQuoteDetail [get] // @Tags 仓单贸易v2 func QueryOrderQuoteDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrOrderQuoteDetail{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryWrPosition // @Summary 查询现货(预售)仓单持仓 // @Description 页面 现货仓单->现货汇总/库存汇总; 预售仓单->订单汇总 // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户id" // @Param querytype query int true "查询类型 1-现货汇总 2-库存汇总(订单汇总)" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Success 200 {array} models.WrPosition // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrPosition [get] // @Tags 仓单贸易v2 func QueryWrPosition(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrPosition{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrOrderDetail // @Summary 查询仓单委托单(挂单) // @Description 页面 现货仓单 | 预售仓单 -> 挂单 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param userid query int true "用户id" // @Param marketid query int false "仓单贸易市场id" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Success 200 {array} models.WrOrderDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrOrderDetail [get] // @Tags 仓单贸易v2 func QueryWrOrderDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrOrderDetail{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryWrSpecialMatchOrder // @Summary 查询指定成交 // @Description 页面 现货仓单 | 预售仓单 -> 指定成交 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param userid query int true "用户id" // @Param marketid query int false "仓单贸易市场id" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Success 200 {array} models.WrSpecialMatchOrder // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrSpecialMatchOrder [get] // @Tags 仓单贸易v2 func QueryWrSpecialMatchOrder(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrSpecialMatchOrder{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryWrTradeDetail // @Summary 查询仓单成交明细 // @Produce json // @Security ApiKeyAuth // @Param page query int false "页码" // @Param pagesize query int false "每页条数" // @Param userid query int true "用户id" // @Param marketid query int false "仓单贸易市场id" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Success 200 {array} models.WrTradeDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrTradeDetail [get] // @Tags 仓单贸易v2 func QueryWrTradeDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrTradeDetail{} a.DoBindReq(&m) a.DoGetDataByPage(&m) } // QueryWrGoodsInfo // @Summary 查询仓单商品信息 // @Produce json // @Security ApiKeyAuth // @Param marketid query int false "仓单贸易市场id" // @Param haswr query int true "0:仓单预售 1:仓单贸易" // @Param wrfactortypeid query int true "仓单要素id" // @Success 200 {array} models.WrGoodsInfo // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrGoodsInfo [get] // @Tags 仓单贸易v2 func QueryWrGoodsInfo(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrGoodsInfo{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryPerformancePlan // @Summary 查询履约信息 // @Produce json // @Security ApiKeyAuth // @Param userid query int true "用户id" // @Param buyorsell query int true "买卖方向 0-买 1-卖" // @Success 200 {array} models.WrPerformancePlan // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryPerformancePlan [get] // @Tags 仓单贸易v2 func QueryPerformancePlan(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrPerformancePlan{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryHoldLB // @Summary 查询仓单持有记录 // @Description 页面 现货仓单->现货明细? , 表名叫仓单持有记录, 有挂单特有维度,为防误解汇总也有相关维度, 新写接口,不跟汇总合在一起了。 // @Produce json // @Security ApiKeyAuth // @Param accountid query int true "资金账号" // @Param warehouseid query int false "仓库id" // @Param deliverygoodsid query int false "品种id" // @Param wrstandardid query int false "品类id" // @Success 200 {array} models.WrHoldLB // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryHoldLB [get] // @Tags 仓单贸易v2 func QueryHoldLB(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrHoldLB{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryFilterItem // @Summary 查询筛选框列表 // @Produce json // @Security ApiKeyAuth // @Param itype query string true "类型(可多选,逗号隔开) 1-品种 2-品类(商品) 3-仓库" // @Success 200 {array} models.WrFilterItem // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryFilterItem [get] // @Tags 仓单贸易v2 func QueryFilterItem(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFilterItem{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryFaProductDetail // @Summary 查询融资产品列表 // @Description 页面 买卖大厅 -> 选择融资方案 // @Produce json // @Security ApiKeyAuth // @Param wrfactortypeid query int true "仓单要素id" // @Success 200 {array} models.WrFAProductDetail // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryFaProductDetail [get] // @Tags 仓单贸易v2 func QueryFaProductDetail(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFAProductDetail{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrFactorTypeInfo // @Summary 查询仓单要素详细信息 // @Produce json // @Security ApiKeyAuth // @Param wrfactortypeid query int true "仓单要素id" // @Success 200 {array} models.WrFactorTypeInfo // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrFactorTypeInfo [get] // @Tags 仓单贸易v2 func QueryWrFactorTypeInfo(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFactorTypeInfo{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrMarketTradeConfig // @Summary 查询市场交易参数配置 // @Produce json // @Security ApiKeyAuth // @Param marketid query int false "市场id" // @Success 200 {array} models.WrMarketTradeConfig // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrMarketTradeConfig [get] // @Tags 仓单贸易v2 func QueryWrMarketTradeConfig(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrMarketTradeConfig{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryFtDeliveryGoods // @Summary 查询品种品类筛选框列表 // @Produce json // @Security ApiKeyAuth // @Success 200 {array} models.WrFtDeliveryGoods // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryFtDeliveryGoods [get] // @Tags 仓单贸易v2 func QueryFtDeliveryGoods(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrFtDeliveryGoods{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrStandardFactoryItem // @Summary 查询品类要素定义项 // @Produce json // @Security ApiKeyAuth // @Param wrstandardid query int true "品类id" // @Success 200 {array} models.WrStandardFactoryItemEx // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryWrStandardFactoryItem [get] // @Tags 仓单贸易v2 func QueryWrStandardFactoryItem(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrStandardFactoryItemEx{} a.DoBindReq(&m) a.DoGetDataI(&m) } // QueryWrPerformancePlanStep // @Summary 查询履约信息详情 // @Produce json // @Security ApiKeyAuth // @Param planid query int true "履约计划id(performanceplanid)" // @Success 200 {array} models.WrPerformancePlanStep // @Failure 500 {object} app.Response // @Router /WrTrade2/QueryPerformancePlanStep [get] // @Tags 仓单贸易v2 func QueryWrPerformancePlanStep(c *gin.Context) { a := app.GinUtils{Gin: app.Gin{C: c}} m := models.WrPerformancePlanStep{} a.DoBindReq(&m) a.DoGetDataI(&m) }