Browse Source

增加接口:

zhou.xiaoning 2 năm trước cách đây
mục cha
commit
430806371e

+ 2 - 2
controllers/ferroalloy/quote.go

@@ -17,7 +17,7 @@ import (
 // @Param    page         query    int false "页码"
 // @Param    pagesize     query    int false "每页条数"
 // @Success  200      {array}  models.GErmcpspotgoodsprice
-// @Failure 500      {object} app.Response
+// @Failure 500 {object} app.Response
 // @Router   /Ferroalloy/GetSpotGoodsPrice [get]
 // @Tags    铁合金
 func GetSpotGoodsPrice(c *gin.Context) {
@@ -198,7 +198,7 @@ func QuerySpotgoodsPrice(c *gin.Context) {
 // @Produce  json
 // @Param   spotname query    string false "现货名称"
 // @Success 200      {array}  models.Thjspotquoteconfig
-// @Failure 500 {object} app.Response
+// @Failure 500      {object} app.Response
 // @Router  /Ferroalloy/QueryThjSpotQuoteConfig [get]
 // @Tags     铁合金
 func QueryThjSpotQuoteConfig(c *gin.Context) {

+ 24 - 5
controllers/guangzuan/trade.go

@@ -107,7 +107,7 @@ func QueryDiamond(c *gin.Context) {
 // @Param    page           query    int    false "页码"
 // @Param    pagesize       query    int    false "每页条数"
 // @Success  200       {array}  models.GGzbscinoutorder
-// @Failure  500        {object} app.Response
+// @Failure  500            {object} app.Response
 // @Router   /Guangzuan/QueryGzbscinOutOrder [get]
 // @Tags     广钻
 func QueryGzbscinOutOrder(c *gin.Context) {
@@ -201,7 +201,7 @@ func QueryGzbscusermonthpay(c *gin.Context) {
 // @Param    page       query    int    false "页码"
 // @Param    pagesize   query    int    false "每页条数"
 // @Success  200        {array}  models.GGzbscuserpowerfee
-// @Failure  500            {object} app.Response
+// @Failure  500        {object} app.Response
 // @Router   /Guangzuan/QueryGzbscuserpowerfee [get]
 // @Tags     广钻
 func QueryGzbscuserpowerfee(c *gin.Context) {
@@ -235,12 +235,12 @@ func QueryBscinoutorder(c *gin.Context) {
 // @Produce  json
 // @Security ApiKeyAuth
 // @Param    presalestatus  query    int    true  "预售状态 - 1:未开始 2:进行中 3:已结束 4:已关闭 5:处理中 6::处理失败 7:已完成"
-// @Param    marketid       query    int    true  "市场ID"
+// @Param    marketid query    int true  "市场ID"
 // @Param    wrstandardname query    string false "现货商品名称"
 // @Param    customername   query    string false "预售方"
 // @Param    selluserid     query    int    false "发行方用户ID"
-// @Param    page     query    int    false "页码"
-// @Param    pagesize query    int    false "每页条数"
+// @Param    page     query    int false "页码"
+// @Param    pagesize query    int false "每页条数"
 // @Success  200            {array}  models.GZPresell
 // @Failure  500      {object} app.Response
 // @Router   /Guangzuan/QueryGZPreSell [get]
@@ -291,3 +291,22 @@ func QueryGZMyTradingPreSell(c *gin.Context) {
 	a.DoBindReq(&m)
 	a.DoGetDataByPage(&m)
 }
+
+// QueryGZWrPreSaleApply
+// @Summary  我的预售申请列表查询
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    userid   query    int true  "用户ID"
+// @Param    marketid       query    int    true  "市场ID"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
+// @Success  200      {array}  models.Wrpresaleapply
+// @Failure  500      {object} app.Response
+// @Router   /Guangzuan/QueryGZWrPreSaleApply [get]
+// @Tags     广钻
+func QueryGZWrPreSaleApply(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.Wrpresaleapply{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}

+ 4 - 4
controllers/guangzuan/tradeService.go

@@ -18,8 +18,8 @@ import (
 // @Security Group
 // @Param    userid   query    int    true  "用户ID"
 // @Param    executestatus query    int false "执行状态 - 1:未生效 2:进行中 3:已结束"
-// @Param    page     query    int    false "页码"
-// @Param    pagesize query    int    false "每页条数"
+// @Param    page          query    int false "页码"
+// @Param    pagesize      query    int false "每页条数"
 // @Success  200           {array}  models.GzcjjcorderM
 // @Failure  500     {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrder [get]
@@ -39,8 +39,8 @@ func QueryGZCJJCOrder(c *gin.Context) {
 // @Security Group
 // @Param    userid        query    int true  "用户ID"
 // @Param    orderid  query    string false "单据ID"
-// @Param    page          query    int false "页码"
-// @Param    pagesize      query    int false "每页条数"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
 // @Success  200      {array}  models.GzcjjcorderdetailM
 // @Failure  500           {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrderDetail [get]

+ 278 - 0
docs/docs.go

@@ -10381,6 +10381,67 @@ const docTemplate = `{
                 }
             }
         },
+        "/Guangzuan/QueryGZWrPreSaleApply": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "我的预售申请列表查询",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "市场ID",
+                        "name": "marketid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Wrpresaleapply"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryGzbscPosition": {
             "get": {
                 "security": [
@@ -54143,6 +54204,223 @@ const docTemplate = `{
                 }
             }
         },
+        "models.Wrpresaleapply": {
+            "type": "object",
+            "required": [
+                "marketid",
+                "selluserid"
+            ],
+            "properties": {
+                "applyid": {
+                    "description": "申请人",
+                    "type": "integer"
+                },
+                "applyremark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "applysrc": {
+                    "description": "申请来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "applystatus": {
+                    "description": "申请状态(inoutapplystatus) - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回",
+                    "type": "integer"
+                },
+                "applytime": {
+                    "description": "申请时间",
+                    "type": "string"
+                },
+                "auditid": {
+                    "description": "审核人",
+                    "type": "integer"
+                },
+                "auditremark": {
+                    "description": "审核备注",
+                    "type": "string"
+                },
+                "auditsrc": {
+                    "description": "审核来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "audittradedate": {
+                    "description": "审核交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "bannerpicurl": {
+                    "description": "Banner图(逗号分隔)",
+                    "type": "string"
+                },
+                "baseqty": {
+                    "description": "中签基数",
+                    "type": "integer"
+                },
+                "buymarginalgorithm": {
+                    "description": "买方保证金方式 - 1:比率  2:固定",
+                    "type": "integer"
+                },
+                "buymarginvalue": {
+                    "description": "买方保证金设置值",
+                    "type": "number"
+                },
+                "clientticket": {
+                    "description": "客户端流水号",
+                    "type": "string"
+                },
+                "deliverygoodsid": {
+                    "description": "现货品种ID",
+                    "type": "integer"
+                },
+                "enddate": {
+                    "description": "预售结束日期",
+                    "type": "string"
+                },
+                "handlestatus": {
+                    "description": "处理状态",
+                    "type": "integer"
+                },
+                "marketid": {
+                    "description": "市场ID",
+                    "type": "integer"
+                },
+                "maxbuyqty": {
+                    "description": "单人最大申购量",
+                    "type": "integer"
+                },
+                "maxluckyqty": {
+                    "description": "单人最大中签量 - 作废",
+                    "type": "integer"
+                },
+                "minbuyqty": {
+                    "description": "单人最小申购量",
+                    "type": "integer"
+                },
+                "minsuccessqty": {
+                    "description": "最低成团量",
+                    "type": "integer"
+                },
+                "performancetemplateid": {
+                    "description": "履约计划模板ID(方式为1时填-1, 为2时选择模板)",
+                    "type": "integer"
+                },
+                "pictureurls": {
+                    "description": "详情图片(逗号分隔)",
+                    "type": "string"
+                },
+                "presaleapplyid": {
+                    "description": "预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "string"
+                },
+                "presaleqty": {
+                    "description": "预售总量",
+                    "type": "integer"
+                },
+                "qtydesc": {
+                    "description": "数量描述 [2:毛坯钻石]",
+                    "type": "string"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "sellaccountid": {
+                    "description": "发行方资金账户ID",
+                    "type": "integer"
+                },
+                "selluserid": {
+                    "description": "发行方用户ID",
+                    "type": "integer"
+                },
+                "sizestr": {
+                    "description": "尺寸 [1:成品裸钻 \\ 2:毛坯钻石]",
+                    "type": "string"
+                },
+                "startdate": {
+                    "description": "预售开始日期",
+                    "type": "string"
+                },
+                "takestartdate": {
+                    "description": "提货开始日期",
+                    "type": "string"
+                },
+                "thumurls": {
+                    "description": "缩略图片(1:1)(逗号分隔)",
+                    "type": "string"
+                },
+                "unitid": {
+                    "description": "单位ID",
+                    "type": "integer"
+                },
+                "unitprice": {
+                    "description": "商品单价",
+                    "type": "number"
+                },
+                "warehouseid": {
+                    "description": "仓库ID",
+                    "type": "integer"
+                },
+                "weightdesc": {
+                    "description": "重量描述 [2:毛坯钻石]",
+                    "type": "string"
+                },
+                "wrfactortypeid": {
+                    "description": "仓单要素类型ID - 根据现货商品\\仓库生成",
+                    "type": "integer"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID",
+                    "type": "integer"
+                },
+                "wrstandardname": {
+                    "description": "现货商品名称",
+                    "type": "string"
+                },
+                "yieldrate": {
+                    "description": "成品率 [2:毛坯钻石]",
+                    "type": "string"
+                },
+                "ysproductionmode": {
+                    "description": "生产方式  - 枚举”YSProductionMode“  [2:毛坯钻石] 1:HPHT 2:CVD",
+                    "type": "integer"
+                },
+                "yszscategory": {
+                    "description": "钻石分类 - 枚举”YSZSCategory“ 1:成品裸钻 2:毛坯钻石",
+                    "type": "integer"
+                },
+                "zsclaritytypestr": {
+                    "description": "净度 [1:成品裸钻 \\ 2:毛坯钻石]",
+                    "type": "string"
+                },
+                "zscolortypestr": {
+                    "description": "颜色 [1:成品裸钻 \\ 2:毛坯钻石]",
+                    "type": "string"
+                },
+                "zscuttypestr": {
+                    "description": "切工 [1:成品裸钻]",
+                    "type": "string"
+                },
+                "zsfluorescencetypestr": {
+                    "description": "荧光 [1:成品裸钻]",
+                    "type": "string"
+                },
+                "zspolishtypestr": {
+                    "description": "抛光 [1:成品裸钻]",
+                    "type": "string"
+                },
+                "zsshapetypestr": {
+                    "description": "形状 [1:成品裸钻]",
+                    "type": "string"
+                },
+                "zssymmetrytypestr": {
+                    "description": "对称 [1:成品裸钻]",
+                    "type": "string"
+                }
+            }
+        },
         "models.Wrtradetradequote": {
             "type": "object",
             "properties": {

+ 278 - 0
docs/swagger.json

@@ -10372,6 +10372,67 @@
                 }
             }
         },
+        "/Guangzuan/QueryGZWrPreSaleApply": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "广钻"
+                ],
+                "summary": "我的预售申请列表查询",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "市场ID",
+                        "name": "marketid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Wrpresaleapply"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Guangzuan/QueryGzbscPosition": {
             "get": {
                 "security": [
@@ -54134,6 +54195,223 @@
                 }
             }
         },
+        "models.Wrpresaleapply": {
+            "type": "object",
+            "required": [
+                "marketid",
+                "selluserid"
+            ],
+            "properties": {
+                "applyid": {
+                    "description": "申请人",
+                    "type": "integer"
+                },
+                "applyremark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "applysrc": {
+                    "description": "申请来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "applystatus": {
+                    "description": "申请状态(inoutapplystatus) - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回",
+                    "type": "integer"
+                },
+                "applytime": {
+                    "description": "申请时间",
+                    "type": "string"
+                },
+                "auditid": {
+                    "description": "审核人",
+                    "type": "integer"
+                },
+                "auditremark": {
+                    "description": "审核备注",
+                    "type": "string"
+                },
+                "auditsrc": {
+                    "description": "审核来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "audittradedate": {
+                    "description": "审核交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "bannerpicurl": {
+                    "description": "Banner图(逗号分隔)",
+                    "type": "string"
+                },
+                "baseqty": {
+                    "description": "中签基数",
+                    "type": "integer"
+                },
+                "buymarginalgorithm": {
+                    "description": "买方保证金方式 - 1:比率  2:固定",
+                    "type": "integer"
+                },
+                "buymarginvalue": {
+                    "description": "买方保证金设置值",
+                    "type": "number"
+                },
+                "clientticket": {
+                    "description": "客户端流水号",
+                    "type": "string"
+                },
+                "deliverygoodsid": {
+                    "description": "现货品种ID",
+                    "type": "integer"
+                },
+                "enddate": {
+                    "description": "预售结束日期",
+                    "type": "string"
+                },
+                "handlestatus": {
+                    "description": "处理状态",
+                    "type": "integer"
+                },
+                "marketid": {
+                    "description": "市场ID",
+                    "type": "integer"
+                },
+                "maxbuyqty": {
+                    "description": "单人最大申购量",
+                    "type": "integer"
+                },
+                "maxluckyqty": {
+                    "description": "单人最大中签量 - 作废",
+                    "type": "integer"
+                },
+                "minbuyqty": {
+                    "description": "单人最小申购量",
+                    "type": "integer"
+                },
+                "minsuccessqty": {
+                    "description": "最低成团量",
+                    "type": "integer"
+                },
+                "performancetemplateid": {
+                    "description": "履约计划模板ID(方式为1时填-1, 为2时选择模板)",
+                    "type": "integer"
+                },
+                "pictureurls": {
+                    "description": "详情图片(逗号分隔)",
+                    "type": "string"
+                },
+                "presaleapplyid": {
+                    "description": "预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "string"
+                },
+                "presaleqty": {
+                    "description": "预售总量",
+                    "type": "integer"
+                },
+                "qtydesc": {
+                    "description": "数量描述 [2:毛坯钻石]",
+                    "type": "string"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "sellaccountid": {
+                    "description": "发行方资金账户ID",
+                    "type": "integer"
+                },
+                "selluserid": {
+                    "description": "发行方用户ID",
+                    "type": "integer"
+                },
+                "sizestr": {
+                    "description": "尺寸 [1:成品裸钻 \\ 2:毛坯钻石]",
+                    "type": "string"
+                },
+                "startdate": {
+                    "description": "预售开始日期",
+                    "type": "string"
+                },
+                "takestartdate": {
+                    "description": "提货开始日期",
+                    "type": "string"
+                },
+                "thumurls": {
+                    "description": "缩略图片(1:1)(逗号分隔)",
+                    "type": "string"
+                },
+                "unitid": {
+                    "description": "单位ID",
+                    "type": "integer"
+                },
+                "unitprice": {
+                    "description": "商品单价",
+                    "type": "number"
+                },
+                "warehouseid": {
+                    "description": "仓库ID",
+                    "type": "integer"
+                },
+                "weightdesc": {
+                    "description": "重量描述 [2:毛坯钻石]",
+                    "type": "string"
+                },
+                "wrfactortypeid": {
+                    "description": "仓单要素类型ID - 根据现货商品\\仓库生成",
+                    "type": "integer"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID",
+                    "type": "integer"
+                },
+                "wrstandardname": {
+                    "description": "现货商品名称",
+                    "type": "string"
+                },
+                "yieldrate": {
+                    "description": "成品率 [2:毛坯钻石]",
+                    "type": "string"
+                },
+                "ysproductionmode": {
+                    "description": "生产方式  - 枚举”YSProductionMode“  [2:毛坯钻石] 1:HPHT 2:CVD",
+                    "type": "integer"
+                },
+                "yszscategory": {
+                    "description": "钻石分类 - 枚举”YSZSCategory“ 1:成品裸钻 2:毛坯钻石",
+                    "type": "integer"
+                },
+                "zsclaritytypestr": {
+                    "description": "净度 [1:成品裸钻 \\ 2:毛坯钻石]",
+                    "type": "string"
+                },
+                "zscolortypestr": {
+                    "description": "颜色 [1:成品裸钻 \\ 2:毛坯钻石]",
+                    "type": "string"
+                },
+                "zscuttypestr": {
+                    "description": "切工 [1:成品裸钻]",
+                    "type": "string"
+                },
+                "zsfluorescencetypestr": {
+                    "description": "荧光 [1:成品裸钻]",
+                    "type": "string"
+                },
+                "zspolishtypestr": {
+                    "description": "抛光 [1:成品裸钻]",
+                    "type": "string"
+                },
+                "zsshapetypestr": {
+                    "description": "形状 [1:成品裸钻]",
+                    "type": "string"
+                },
+                "zssymmetrytypestr": {
+                    "description": "对称 [1:成品裸钻]",
+                    "type": "string"
+                }
+            }
+        },
         "models.Wrtradetradequote": {
             "type": "object",
             "properties": {

+ 201 - 0
docs/swagger.yaml

@@ -25002,6 +25002,168 @@ definitions:
         description: 户名(个人姓名或企业名称)
         type: string
     type: object
+  models.Wrpresaleapply:
+    properties:
+      applyid:
+        description: 申请人
+        type: integer
+      applyremark:
+        description: 备注
+        type: string
+      applysrc:
+        description: 申请来源 - 1:管理端 2:终端
+        type: integer
+      applystatus:
+        description: 申请状态(inoutapplystatus) - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+        type: integer
+      applytime:
+        description: 申请时间
+        type: string
+      auditid:
+        description: 审核人
+        type: integer
+      auditremark:
+        description: 审核备注
+        type: string
+      auditsrc:
+        description: 审核来源 - 1:管理端 2:终端
+        type: integer
+      audittime:
+        description: 审核时间
+        type: string
+      audittradedate:
+        description: 审核交易日(yyyyMMdd)
+        type: string
+      bannerpicurl:
+        description: Banner图(逗号分隔)
+        type: string
+      baseqty:
+        description: 中签基数
+        type: integer
+      buymarginalgorithm:
+        description: 买方保证金方式 - 1:比率  2:固定
+        type: integer
+      buymarginvalue:
+        description: 买方保证金设置值
+        type: number
+      clientticket:
+        description: 客户端流水号
+        type: string
+      deliverygoodsid:
+        description: 现货品种ID
+        type: integer
+      enddate:
+        description: 预售结束日期
+        type: string
+      handlestatus:
+        description: 处理状态
+        type: integer
+      marketid:
+        description: 市场ID
+        type: integer
+      maxbuyqty:
+        description: 单人最大申购量
+        type: integer
+      maxluckyqty:
+        description: 单人最大中签量 - 作废
+        type: integer
+      minbuyqty:
+        description: 单人最小申购量
+        type: integer
+      minsuccessqty:
+        description: 最低成团量
+        type: integer
+      performancetemplateid:
+        description: 履约计划模板ID(方式为1时填-1, 为2时选择模板)
+        type: integer
+      pictureurls:
+        description: 详情图片(逗号分隔)
+        type: string
+      presaleapplyid:
+        description: 预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)
+        type: string
+      presaleqty:
+        description: 预售总量
+        type: integer
+      qtydesc:
+        description: 数量描述 [2:毛坯钻石]
+        type: string
+      remark:
+        description: 备注
+        type: string
+      sellaccountid:
+        description: 发行方资金账户ID
+        type: integer
+      selluserid:
+        description: 发行方用户ID
+        type: integer
+      sizestr:
+        description: 尺寸 [1:成品裸钻 \ 2:毛坯钻石]
+        type: string
+      startdate:
+        description: 预售开始日期
+        type: string
+      takestartdate:
+        description: 提货开始日期
+        type: string
+      thumurls:
+        description: 缩略图片(1:1)(逗号分隔)
+        type: string
+      unitid:
+        description: 单位ID
+        type: integer
+      unitprice:
+        description: 商品单价
+        type: number
+      warehouseid:
+        description: 仓库ID
+        type: integer
+      weightdesc:
+        description: 重量描述 [2:毛坯钻石]
+        type: string
+      wrfactortypeid:
+        description: 仓单要素类型ID - 根据现货商品\仓库生成
+        type: integer
+      wrstandardid:
+        description: 现货商品ID
+        type: integer
+      wrstandardname:
+        description: 现货商品名称
+        type: string
+      yieldrate:
+        description: 成品率 [2:毛坯钻石]
+        type: string
+      ysproductionmode:
+        description: 生产方式  - 枚举”YSProductionMode“  [2:毛坯钻石] 1:HPHT 2:CVD
+        type: integer
+      yszscategory:
+        description: 钻石分类 - 枚举”YSZSCategory“ 1:成品裸钻 2:毛坯钻石
+        type: integer
+      zsclaritytypestr:
+        description: 净度 [1:成品裸钻 \ 2:毛坯钻石]
+        type: string
+      zscolortypestr:
+        description: 颜色 [1:成品裸钻 \ 2:毛坯钻石]
+        type: string
+      zscuttypestr:
+        description: 切工 [1:成品裸钻]
+        type: string
+      zsfluorescencetypestr:
+        description: 荧光 [1:成品裸钻]
+        type: string
+      zspolishtypestr:
+        description: 抛光 [1:成品裸钻]
+        type: string
+      zsshapetypestr:
+        description: 形状 [1:成品裸钻]
+        type: string
+      zssymmetrytypestr:
+        description: 对称 [1:成品裸钻]
+        type: string
+    required:
+    - marketid
+    - selluserid
+    type: object
   models.Wrtradetradequote:
     properties:
       buyaccountid:
@@ -33829,6 +33991,45 @@ paths:
       summary: 预售大厅/我的预售/集采大厅/我的集采 列表查询
       tags:
       - 广钻
+  /Guangzuan/QueryGZWrPreSaleApply:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 市场ID
+        in: query
+        name: marketid
+        required: true
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.Wrpresaleapply'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 我的预售申请列表查询
+      tags:
+      - 广钻
   /Guangzuan/QueryGzbscPosition:
     get:
       parameters:

+ 143 - 0
models/guangzuan.go

@@ -4544,3 +4544,146 @@ func (r *GZMyTradingPresell) GetDataByPage() (interface{}, error, int, int, int)
 	}
 	return sData, err, r.Page, r.PageSize, total
 }
+
+// Wrpresaleapply 仓单预售申请表
+type Wrpresaleapply struct {
+	PRESALEAPPLYID        string    `json:"presaleapplyid" xorm:"PRESALEAPPLYID"`                          // 预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)
+	SELLUSERID            int64     `json:"selluserid" xorm:"SELLUSERID" form:"userid" binding:"required"` // 发行方用户ID
+	SELLACCOUNTID         int64     `json:"sellaccountid" xorm:"SELLACCOUNTID"`                            // 发行方资金账户ID
+	DELIVERYGOODSID       int32     `json:"deliverygoodsid" xorm:"DELIVERYGOODSID"`                        // 现货品种ID
+	WRSTANDARDNAME        string    `json:"wrstandardname" xorm:"WRSTANDARDNAME"`                          // 现货商品名称
+	UNITID                int32     `json:"unitid" xorm:"UNITID"`                                          // 单位ID
+	WAREHOUSEID           int64     `json:"warehouseid" xorm:"WAREHOUSEID"`                                // 仓库ID
+	UNITPRICE             float64   `json:"unitprice" xorm:"UNITPRICE"`                                    // 商品单价
+	PRESALEQTY            int64     `json:"presaleqty" xorm:"PRESALEQTY"`                                  // 预售总量
+	BASEQTY               int64     `json:"baseqty" xorm:"BASEQTY"`                                        // 中签基数
+	MAXBUYQTY             int64     `json:"maxbuyqty" xorm:"MAXBUYQTY"`                                    // 单人最大申购量
+	MAXLUCKYQTY           int64     `json:"maxluckyqty" xorm:"MAXLUCKYQTY"`                                // 单人最大中签量 - 作废
+	STARTDATE             string    `json:"startdate" xorm:"STARTDATE"`                                    // 预售开始日期
+	ENDDATE               string    `json:"enddate" xorm:"ENDDATE"`                                        // 预售结束日期
+	TAKESTARTDATE         time.Time `json:"takestartdate" xorm:"TAKESTARTDATE"`                            // 提货开始日期
+	THUMURLS              string    `json:"thumurls" xorm:"THUMURLS"`                                      // 缩略图片(1:1)(逗号分隔)
+	PICTUREURLS           string    `json:"pictureurls" xorm:"PICTUREURLS"`                                // 详情图片(逗号分隔)
+	BANNERPICURL          string    `json:"bannerpicurl" xorm:"BANNERPICURL"`                              // Banner图(逗号分隔)
+	MARKETID              int32     `json:"marketid" xorm:"MARKETID" form:"marketid" binding:"required"`   // 市场ID
+	APPLYREMARK           string    `json:"applyremark" xorm:"APPLYREMARK"`                                // 备注
+	CLIENTTICKET          string    `json:"clientticket" xorm:"CLIENTTICKET"`                              // 客户端流水号
+	APPLYSRC              int32     `json:"applysrc" xorm:"APPLYSRC"`                                      // 申请来源 - 1:管理端 2:终端
+	APPLYID               int64     `json:"applyid" xorm:"APPLYID"`                                        // 申请人
+	APPLYTIME             string    `json:"applytime" xorm:"APPLYTIME"`                                    // 申请时间
+	APPLYSTATUS           int32     `json:"applystatus" xorm:"APPLYSTATUS"`                                // 申请状态(inoutapplystatus) - 1:待审核 2:审核通过 3:审核拒绝 4:处理失败 5:已撤回
+	AUDITTRADEDATE        string    `json:"audittradedate" xorm:"AUDITTRADEDATE"`                          // 审核交易日(yyyyMMdd)
+	AUDITID               int64     `json:"auditid" xorm:"AUDITID"`                                        // 审核人
+	AUDITSRC              int32     `json:"auditsrc" xorm:"AUDITSRC"`                                      // 审核来源 - 1:管理端 2:终端
+	AUDITTIME             time.Time `json:"audittime" xorm:"AUDITTIME"`                                    // 审核时间
+	AUDITREMARK           string    `json:"auditremark" xorm:"AUDITREMARK"`                                // 审核备注
+	HANDLESTATUS          int32     `json:"handlestatus" xorm:"HANDLESTATUS"`                              // 处理状态
+	WRSTANDARDID          int64     `json:"wrstandardid" xorm:"WRSTANDARDID"`                              // 现货商品ID
+	WRFACTORTYPEID        int64     `json:"wrfactortypeid" xorm:"WRFACTORTYPEID"`                          // 仓单要素类型ID - 根据现货商品\仓库生成
+	BUYMARGINALGORITHM    int32     `json:"buymarginalgorithm" xorm:"BUYMARGINALGORITHM"`                  // 买方保证金方式 - 1:比率  2:固定
+	BUYMARGINVALUE        float64   `json:"buymarginvalue" xorm:"BUYMARGINVALUE"`                          // 买方保证金设置值
+	PERFORMANCETEMPLATEID int64     `json:"performancetemplateid" xorm:"PERFORMANCETEMPLATEID"`            // 履约计划模板ID(方式为1时填-1, 为2时选择模板)
+	MINBUYQTY             int64     `json:"minbuyqty" xorm:"MINBUYQTY"`                                    // 单人最小申购量
+	MINSUCCESSQTY         int64     `json:"minsuccessqty" xorm:"MINSUCCESSQTY"`                            // 最低成团量
+
+	YSZSCATEGORY          int32  `json:"yszscategory" xorm:"YSZSCATEGORY"`                   // 钻石分类 - 枚举”YSZSCategory“ 1:成品裸钻 2:毛坯钻石
+	ZSSHAPETYPESTR        string `json:"zsshapetypestr" xorm:"ZSSHAPETYPESTR"`               // 形状 [1:成品裸钻]
+	ZSCOLORTYPESTR        string `json:"zscolortypestr" xorm:"ZSCOLORTYPESTR"`               // 颜色 [1:成品裸钻 \ 2:毛坯钻石]
+	ZSCLARITYTYPESTR      string `json:"zsclaritytypestr" xorm:"ZSCLARITYTYPESTR"`           // 净度 [1:成品裸钻 \ 2:毛坯钻石]
+	ZSCUTTYPESTR          string `json:"zscuttypestr" xorm:"ZSCUTTYPESTR"`                   // 切工 [1:成品裸钻]
+	ZSSYMMETRYTYPESTR     string `json:"zssymmetrytypestr" xorm:"ZSSYMMETRYTYPESTR"`         // 对称 [1:成品裸钻]
+	ZSPOLISHTYPESTR       string `json:"zspolishtypestr" xorm:"ZSPOLISHTYPESTR"`             // 抛光 [1:成品裸钻]
+	ZSFLUORESCENCETYPESTR string `json:"zsfluorescencetypestr" xorm:"ZSFLUORESCENCETYPESTR"` // 荧光 [1:成品裸钻]
+	SIZESTR               string `json:"sizestr" xorm:"SIZESTR"`                             // 尺寸 [1:成品裸钻 \ 2:毛坯钻石]
+	YIELDRATE             string `json:"yieldrate" xorm:"YIELDRATE"`                         // 成品率 [2:毛坯钻石]
+	QTYDESC               string `json:"qtydesc" xorm:"QTYDESC"`                             // 数量描述 [2:毛坯钻石]
+	WEIGHTDESC            string `json:"weightdesc" xorm:"WEIGHTDESC"`                       // 重量描述 [2:毛坯钻石]
+	YSPRODUCTIONMODE      int32  `json:"ysproductionmode" xorm:"YSPRODUCTIONMODE"`           // 生产方式  - 枚举”YSProductionMode“  [2:毛坯钻石] 1:HPHT 2:CVD
+	REMARK                string `json:"remark" xorm:"REMARK"`                               // 备注
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *Wrpresaleapply) calc() {
+
+}
+
+func (r *Wrpresaleapply) buildSql() string {
+	var sqlId utils.SQLVal = `
+	select 
+		to_char(pi.presaleapplyid) PRESALEAPPLYID,
+		pi.selluserid,
+		pi.sellaccountid,
+		pi.deliverygoodsid,
+		pi.wrstandardname,
+		pi.unitid,
+		pi.warehouseid,
+		pi.unitprice,
+		pi.presaleqty,
+		pi.baseqty,
+		pi.maxbuyqty,
+		pi.maxluckyqty,
+		to_char(pi.startdate, 'yyyy-mm-dd') STARTDATE,
+		to_char(pi.enddate, 'yyyy-mm-dd') ENDDATE,
+		pi.takestartdate,
+		pi.thumurls,
+		pi.pictureurls,
+		pi.bannerpicurl,
+		pi.marketid,
+		pi.applyremark,
+		pi.clientticket,
+		pi.applysrc,
+		pi.applyid,
+		to_char(pi.applytime, 'yyyy-mm-dd hh24:mi:ss') APPLYTIME,
+		pi.applystatus,
+		pi.audittradedate,
+		pi.auditid,
+		pi.auditsrc,
+		pi.audittime,
+		pi.auditremark,
+		pi.handlestatus,
+		pi.wrstandardid,
+		pi.wrfactortypeid,
+		pi.buymarginalgorithm,
+		pi.buymarginvalue,
+		pi.performancetemplateid,
+		pi.minbuyqty,
+		pi.minsuccessqty, 
+		paex.yszscategory,
+		paex.zsshapetypestr,
+		paex.zscolortypestr,
+		paex.zsclaritytypestr,
+		paex.zscuttypestr,
+		paex.zssymmetrytypestr,
+		paex.zspolishtypestr,
+		paex.zsfluorescencetypestr,
+		paex.sizestr,
+		paex.yieldrate,
+		paex.qtydesc,
+		paex.weightdesc,
+		paex.ysproductionmode,
+		paex.remark
+	from WR_Presaleapply pi
+	left join GZ_WR_PresaleApplyEx paex
+		on pi.presaleapplyid = paex.presaleapplyid
+	where 1=1 
+	`
+
+	sqlId.And("pi.marketid", r.MARKETID)
+	sqlId.And("pi.selluserid", r.SELLUSERID)
+	sqlId.OrderBy("pi.presaleapplyid desc")
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *Wrpresaleapply) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]Wrpresaleapply, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}

+ 1 - 0
routers/router.go

@@ -707,6 +707,7 @@ func InitRouter() *gin.Engine {
 		guangzuanR.GET("QueryGZPreSell", guangzuan.QueryGZPreSell)
 		guangzuanR.GET("QueryGZMyPresell", guangzuan.QueryGZMyPresell)
 		guangzuanR.GET("QueryGZMyTradingPreSell", guangzuan.QueryGZMyTradingPreSell)
+		guangzuanR.GET("QueryGZWrPreSaleApply", guangzuan.QueryGZWrPreSaleApply)
 	}
 
 	// **************************上海铁合金*************************