Browse Source

1.合并日报表/月报表接口
2.查采购销售合同接口增加交易员名称等字段

zou.yingbin 4 năm trước cách đây
mục cha
commit
6f5c7104c6
6 tập tin đã thay đổi với 359 bổ sung1608 xóa
  1. 44 70
      controllers/ermcp3/qryErmcp3Report.go
  2. 122 578
      docs/docs.go
  3. 122 578
      docs/swagger.json
  4. 43 374
      docs/swagger.yaml
  5. 26 4
      models/ermcp3.go
  6. 2 4
      routers/router.go

+ 44 - 70
controllers/ermcp3/qryErmcp3Report.go

@@ -221,51 +221,39 @@ func QryReportMonthSpotDetail(c *gin.Context) {
 	a.DoGetDataI(&m)
 }
 
-// QryReckonAreaExpourse
-// @Summary 查询敞口报表(报表/敞口报表/日报表)
+// QryAreaExpourseReport
+// @Summary 查询敞口报表
 // @Produce json
 // @Security ApiKeyAuth
 // @Param userid query int true "用户ID"
-// @Param tradedate query string true "交易日(YYYYMMDD)"
+// @Param tradedate query string false "交易日(YYYYMMDD)"
+// @Param cycletype query int false "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】"
+// @Param cycletime query string false "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】"
 // @Success 200 {array} models.Ermcp3ReckonExpourse
 // @Failure 500 {object} app.Response
-// @Router /Ermcp3/QryReckonAreaExpourse [get]
+// @Router /Ermcp3/QryAreaExpourseReport [get]
 // @Tags 企业风险管理v3(app)
-func QryReckonAreaExpourse(c *gin.Context) {
+func QryAreaExpourseReport(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
 	req := struct {
-		USERID    int64  `form:"userid"`                       // 用户id
-		TRADEDATE string `form:"tradedate" binding:"required"` // 交易日
+		USERID    int64  `form:"userid" binding:"required"` // 用户id
+		TRADEDATE string `form:"tradedate"`                 // 交易日
+		CYCLETIME string `form:"cycletime"`                 // 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
+		CYCLETYPE int32  `form:"cycletype"`                 // 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
 	}{}
 	a.DoBindReq(&req)
-	m := models.Ermcp3ReckonExpourse{AREAUSERID: req.USERID, RECKONDATE: req.TRADEDATE}
-	a.DoGetDataI(&m)
-}
-
-// QryReportAreaExpourse
-// @Summary 查询敞口周期报表(报表/敞口报表/周(月、季、年)报表)
-// @Produce json
-// @Security ApiKeyAuth
-// @Param userid query int true "用户ID"
-// @Param cycletype query int true "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】"
-// @Param cycletime query string true "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】"
-// @Success 200 {array} models.Ermcp3ReportExpourse
-// @Failure 500 {object} app.Response
-// @Router /Ermcp3/QryReportAreaExpourse [get]
-// @Tags 企业风险管理v3(app)
-func QryReportAreaExpourse(c *gin.Context) {
-	a := app.GinUtils{Gin: app.Gin{C: c}}
-	req := struct {
-		USERID    int64  `form:"userid" binding:"required"`    // 用户id
-		CYCLETIME string `form:"cycletime" binding:"required"` // 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
-		CYCLETYPE int32  `form:"cycletype" binding:"required"` // 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
-	}{}
-	a.DoBindReq(&req)
-	p := CycleTypeCheck{CYCLETYPE: req.CYCLETYPE, CYCLETIME: req.CYCLETIME}
-	a.CheckParam(&p)
-	m := models.Ermcp3ReportExpourse{AREAUSERID: req.USERID,
-		CYCLETYPE: req.CYCLETYPE, CYCLETIME: req.CYCLETIME}
-	a.DoGetDataI(&m)
+	if len(req.TRADEDATE) > 0 {
+		// 查日报表
+		m := models.Ermcp3ReckonExpourse{AREAUSERID: req.USERID, RECKONDATE: req.TRADEDATE}
+		a.DoGetDataI(&m)
+	} else {
+		// 查月报表
+		p := CycleTypeCheck{CYCLETYPE: req.CYCLETYPE, CYCLETIME: req.CYCLETIME}
+		a.CheckParam(&p)
+		m := models.Ermcp3ReportExpourse{AREAUSERID: req.USERID,
+			CYCLETYPE: req.CYCLETYPE, CYCLETIME: req.CYCLETIME}
+		a.DoGetDataI(&m)
+	}
 }
 
 // QryAreaExpourseContractDetail
@@ -316,49 +304,35 @@ func QryAreaExpourseHedgeplanDetail(c *gin.Context) {
 	a.DoGetDataI(&m)
 }
 
-// QryReckonAreaSpotPL
-// @Summary 查询现货报表(现货报表/日报表)
+// QryAreaSpotplReport
+// @Summary 查询现货报表
 // @Produce json
 // @Security ApiKeyAuth
 // @Param userid query int true "用户ID"
-// @Param tradedate query string true "交易日(格式yyyymmdd)"
+// @Param tradedate query string false "交易日(格式yyyymmdd)"
+// @Param cycletype query int false "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】"
+// @Param cycletime query string false "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】"
 // @Success 200 {array} models.Ermcp3ReckonAreaSpotPL
 // @Failure 500 {object} app.Response
-// @Router /Ermcp3/QryReckonAreaSpotPL [get]
+// @Router /Ermcp3/QryAreaSpotplReport [get]
 // @Tags 企业风险管理v3(app)
-func QryReckonAreaSpotPL(c *gin.Context) {
+func QryAreaSpotplReport(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
 	req := struct {
-		USERID    int64  `form:"userid" binding:"required"`    // 用户id
-		TRADEDATE string `form:"tradedate" binding:"required"` // 交易日
+		USERID    int64  `form:"userid" binding:"required"` // 用户id
+		TRADEDATE string `form:"tradedate"`                 // 交易日
+		CYCLETYPE int32  `form:"cycletype"`                 // 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
+		CYCLETIME string `form:"cycletime"`                 // 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
 	}{}
 	a.DoBindReq(&req)
-	m := models.Ermcp3ReckonAreaSpotPL{AREAUSERID: req.USERID, RECKONDATE: req.TRADEDATE}
-	a.DoGetDataI(&m)
-}
-
-// QryReportAreaSpotPL
-// @Summary 查询现货周期报表(现货报表/周(月)报表)
-// @Produce json
-// @Security ApiKeyAuth
-// @Param userid query int true "用户ID"
-// @Param cycletype query int true "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】"
-// @Param cycletime query string true "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】"
-// @Success 200 {array} models.Ermcp3ReportAreaSpotPL
-// @Failure 500 {object} app.Response
-// @Router /Ermcp3/QryReportAreaSpotPL [get]
-// @Tags 企业风险管理v3(app)
-func QryReportAreaSpotPL(c *gin.Context) {
-	a := app.GinUtils{Gin: app.Gin{C: c}}
-	req := struct {
-		USERID    int64  `form:"userid" binding:"required"`    // 用户id
-		CYCLETYPE int32  `form:"cycletype" binding:"required"` // 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
-		CYCLETIME string `form:"cycletime" binding:"required"` // 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
-	}{}
-	a.DoBindReq(&req)
-	p := CycleTypeCheck{CYCLETYPE: req.CYCLETYPE, CYCLETIME: req.CYCLETIME}
-	a.CheckParam(&p)
-	m := models.Ermcp3ReportAreaSpotPL{AREAUSERID: req.USERID,
-		CYCLETYPE: req.CYCLETYPE, CYCLETIME: req.CYCLETIME}
-	a.DoGetDataI(&m)
+	if len(req.TRADEDATE) > 0 {
+		m := models.Ermcp3ReckonAreaSpotPL{AREAUSERID: req.USERID, RECKONDATE: req.TRADEDATE}
+		a.DoGetDataI(&m)
+	} else {
+		p := CycleTypeCheck{CYCLETYPE: req.CYCLETYPE, CYCLETIME: req.CYCLETIME}
+		a.CheckParam(&p)
+		m := models.Ermcp3ReportAreaSpotPL{AREAUSERID: req.USERID,
+			CYCLETYPE: req.CYCLETYPE, CYCLETIME: req.CYCLETIME}
+		a.DoGetDataI(&m)
+	}
 }

+ 122 - 578
docs/docs.go

@@ -2693,7 +2693,7 @@ var doc = `{
                 }
             }
         },
-        "/Ermcp3/QryReckonAreaExpourse": {
+        "/Ermcp3/QryAreaExpourseReport": {
             "get": {
                 "security": [
                     {
@@ -2706,7 +2706,7 @@ var doc = `{
                 "tags": [
                     "企业风险管理v3(app)"
                 ],
-                "summary": "查询敞口报表(报表/敞口报表/日报表)",
+                "summary": "查询敞口报表",
                 "parameters": [
                     {
                         "type": "integer",
@@ -2719,113 +2719,19 @@ var doc = `{
                         "type": "string",
                         "description": "交易日(YYYYMMDD)",
                         "name": "tradedate",
-                        "in": "query",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "type": "array",
-                            "items": {
-                                "$ref": "#/definitions/models.Ermcp3ReckonExpourse"
-                            }
-                        }
-                    },
-                    "500": {
-                        "description": "Internal Server Error",
-                        "schema": {
-                            "$ref": "#/definitions/app.Response"
-                        }
-                    }
-                }
-            }
-        },
-        "/Ermcp3/QryReckonAreaSpotPL": {
-            "get": {
-                "security": [
-                    {
-                        "ApiKeyAuth": []
-                    }
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "企业风险管理v3(app)"
-                ],
-                "summary": "查询现货日报表(现货报表/日报表)",
-                "parameters": [
-                    {
-                        "type": "integer",
-                        "description": "用户ID",
-                        "name": "userid",
-                        "in": "query",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "交易日(格式yyyymmdd)",
-                        "name": "tradedate",
-                        "in": "query",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "type": "array",
-                            "items": {
-                                "$ref": "#/definitions/models.Ermcp3ReckonAreaSpotPL"
-                            }
-                        }
-                    },
-                    "500": {
-                        "description": "Internal Server Error",
-                        "schema": {
-                            "$ref": "#/definitions/app.Response"
-                        }
-                    }
-                }
-            }
-        },
-        "/Ermcp3/QryReportAreaExpourse": {
-            "get": {
-                "security": [
-                    {
-                        "ApiKeyAuth": []
-                    }
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "企业风险管理v3(app)"
-                ],
-                "summary": "查询敞口周期报表(报表/敞口报表/周(月、季、年)报表)",
-                "parameters": [
-                    {
-                        "type": "integer",
-                        "description": "用户ID",
-                        "name": "userid",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     },
                     {
                         "type": "integer",
                         "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】",
                         "name": "cycletype",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     },
                     {
                         "type": "string",
                         "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
                         "name": "cycletime",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     }
                 ],
                 "responses": {
@@ -2834,7 +2740,7 @@ var doc = `{
                         "schema": {
                             "type": "array",
                             "items": {
-                                "$ref": "#/definitions/models.Ermcp3ReportExpourse"
+                                "$ref": "#/definitions/models.Ermcp3ReckonExpourse"
                             }
                         }
                     },
@@ -2847,7 +2753,7 @@ var doc = `{
                 }
             }
         },
-        "/Ermcp3/QryReportAreaSpotPL": {
+        "/Ermcp3/QryAreaSpotplReport": {
             "get": {
                 "security": [
                     {
@@ -2860,7 +2766,7 @@ var doc = `{
                 "tags": [
                     "企业风险管理v3(app)"
                 ],
-                "summary": "查询现货周期报表(现货报表/周(月)报表)",
+                "summary": "查询现货报表",
                 "parameters": [
                     {
                         "type": "integer",
@@ -2870,18 +2776,22 @@ var doc = `{
                         "required": true
                     },
                     {
+                        "type": "string",
+                        "description": "交易日(格式yyyymmdd)",
+                        "name": "tradedate",
+                        "in": "query"
+                    },
+                    {
                         "type": "integer",
                         "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】",
                         "name": "cycletype",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     },
                     {
                         "type": "string",
                         "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
                         "name": "cycletime",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     }
                 ],
                 "responses": {
@@ -2890,7 +2800,7 @@ var doc = `{
                         "schema": {
                             "type": "array",
                             "items": {
-                                "$ref": "#/definitions/models.Ermcp3ReportAreaSpotPL"
+                                "$ref": "#/definitions/models.Ermcp3ReckonAreaSpotPL"
                             }
                         }
                     },
@@ -13646,77 +13556,56 @@ var doc = `{
                 }
             }
         },
-        "models.Ermcp3ReportAreaSpotPL": {
+        "models.Ermcp3ReportAreaSpotSub": {
             "type": "object",
+            "required": [
+                "areauserid"
+            ],
             "properties": {
                 "accountid": {
-                    "description": "期货账户ID (作废, 默认为0)",
+                    "description": "期货账户ID",
                     "type": "integer"
                 },
                 "accountname": {
-                    "description": "机构名称",
+                    "description": "所属机构名称",
                     "type": "string"
                 },
-                "actualpl": {
-                    "description": "现货损益",
-                    "type": "number"
-                },
                 "areauserid": {
-                    "description": "所属机构\\交易用户ID",
+                    "description": "账户所属机构",
                     "type": "integer"
                 },
                 "biztype": {
-                    "description": "业务类型 - 1:套保 2:套利",
+                    "description": "业务类型  1-套保 2-套利",
                     "type": "integer"
                 },
                 "brandname": {
                     "description": "品牌名称",
                     "type": "string"
                 },
-                "curamount": {
-                    "description": "期末额",
-                    "type": "number"
-                },
-                "curaverageprice": {
-                    "description": "期末均价",
-                    "type": "number"
-                },
-                "curbuyamount": {
-                    "description": "期末采购总额",
+                "buycontractinqty": {
+                    "description": "采购合同入库量【期末】",
                     "type": "number"
                 },
-                "curbuyqty": {
-                    "description": "期末采购总量",
+                "buypricedamount": {
+                    "description": "采购合同已定价金额【期末】",
                     "type": "number"
                 },
-                "curmarketvalue": {
-                    "description": "参考市值(期末市值)",
+                "buypricedqty": {
+                    "description": "采购合同已定价数量【期末】",
                     "type": "number"
                 },
-                "curqty": {
-                    "description": "期末量",
+                "buyreckonqty": {
+                    "description": "采购合同交收量【期末】",
                     "type": "number"
                 },
                 "currencyid": {
-                    "description": "结算币种ID【原值】",
+                    "description": "币种id",
                     "type": "integer"
                 },
                 "currencyname": {
                     "description": "币种名称",
                     "type": "string"
                 },
-                "cursellamount": {
-                    "description": "期末销售总额",
-                    "type": "number"
-                },
-                "cursellqty": {
-                    "description": "期末销售总量",
-                    "type": "number"
-                },
-                "curspotprice": {
-                    "description": "参考市价(最新价)",
-                    "type": "number"
-                },
                 "cycletime": {
                     "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
                     "type": "string"
@@ -13741,265 +13630,89 @@ var doc = `{
                     "description": "现货商品单位名称",
                     "type": "string"
                 },
-                "floatpl": {
-                    "description": "浮动损益",
-                    "type": "number"
-                },
                 "goodsunitid": {
                     "description": "现货商品单位id",
                     "type": "integer"
                 },
-                "oriamount": {
-                    "description": "期初",
+                "oribuycontractinqty": {
+                    "description": "期初采购合同入库量【期初】",
                     "type": "number"
                 },
-                "oriaverageprice": {
-                    "description": "期初均价",
+                "oribuypricedamount": {
+                    "description": "期初采购合同已定价金额【期初】",
                     "type": "number"
                 },
-                "oribuyamount": {
-                    "description": "期初采购总额",
+                "oribuypricedqty": {
+                    "description": "期初采购合同已定价数量【期初】",
                     "type": "number"
                 },
-                "oribuyqty": {
-                    "description": "期初采购总量",
+                "oribuyreckonqty": {
+                    "description": "期初采购合同交收量【期初】",
                     "type": "number"
                 },
-                "oriqty": {
-                    "description": "期初量",
+                "oriproduceinqty": {
+                    "description": "期初生产入库【期初】",
                     "type": "number"
                 },
-                "orisellamount": {
-                    "description": "期初销售总额",
+                "oriproduceoutqty": {
+                    "description": "期初生产出库量【期初】",
                     "type": "number"
                 },
-                "orisellqty": {
-                    "description": "期初销售总量",
+                "orisellcontractoutqty": {
+                    "description": "期初销售合同出库量【期初】",
                     "type": "number"
                 },
-                "spotgoodsbrandid": {
-                    "description": "现货品牌ID",
-                    "type": "integer"
+                "orisellpricedamount": {
+                    "description": "期初销售合同已定价金额【期初】",
+                    "type": "number"
                 },
-                "todaybuyamount": {
-                    "description": "今日采购额(今采购额)",
+                "orisellpricedqty": {
+                    "description": "期初销售合同已定价数量【期初】",
                     "type": "number"
                 },
-                "todaybuyaverageprice": {
-                    "description": "今日采购均价",
+                "orisellreckonqty": {
+                    "description": "期初销售合同交收量【期初】",
                     "type": "number"
                 },
-                "todaybuyqty": {
-                    "description": "今日采购量(今采购量)",
+                "produceinqty": {
+                    "description": "生产入库量【期末】",
                     "type": "number"
                 },
-                "todayinqty": {
-                    "description": "今日入库量(今入库量)",
+                "produceoutqty": {
+                    "description": "生产出库量【期末】",
                     "type": "number"
                 },
-                "todayoutqty": {
-                    "description": "今日出库量(今出库量)",
+                "sellcontractoutqty": {
+                    "description": "销售合同出库量【期末】",
                     "type": "number"
                 },
-                "todaysellamount": {
-                    "description": "今日销售额(今销售额)",
+                "sellpricedamount": {
+                    "description": "销售合同已定价金额【期末】",
                     "type": "number"
                 },
-                "todaysellaverageprice": {
-                    "description": "今日销售均价",
+                "sellpricedqty": {
+                    "description": "销售合同已定价数量【期末】",
                     "type": "number"
                 },
-                "todaysellqty": {
-                    "description": "今日销售量(今销售量)",
+                "sellreckonqty": {
+                    "description": "销售合同交收量【期末】",
                     "type": "number"
                 },
-                "unitid": {
-                    "description": "品类单位id",
+                "spotgoodsbrandid": {
+                    "description": "现货品牌ID",
                     "type": "integer"
                 },
-                "unitidname": {
-                    "description": "品类单位名称",
-                    "type": "string"
+                "todaybuyreckonqty": {
+                    "description": "今日采购合同已确定数量【汇总】",
+                    "type": "number"
                 },
-                "updatetime": {
-                    "description": "更新时间",
-                    "type": "string"
+                "todaysellreckonqty": {
+                    "description": "今日销售合同已确定数量【汇总】",
+                    "type": "number"
                 },
-                "wrfactortypeid": {
-                    "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
-                },
-                "wrstandardcode": {
-                    "description": "品类代码",
-                    "type": "string"
-                },
-                "wrstandardid": {
-                    "description": "现货品类ID",
-                    "type": "string"
-                },
-                "wrstandardname": {
-                    "description": "品类名称",
-                    "type": "string"
-                }
-            }
-        },
-        "models.Ermcp3ReportAreaSpotSub": {
-            "type": "object",
-            "required": [
-                "areauserid"
-            ],
-            "properties": {
-                "accountid": {
-                    "description": "期货账户ID",
-                    "type": "integer"
-                },
-                "accountname": {
-                    "description": "所属机构名称",
-                    "type": "string"
-                },
-                "areauserid": {
-                    "description": "账户所属机构",
-                    "type": "integer"
-                },
-                "biztype": {
-                    "description": "业务类型  1-套保 2-套利",
-                    "type": "integer"
-                },
-                "brandname": {
-                    "description": "品牌名称",
-                    "type": "string"
-                },
-                "buycontractinqty": {
-                    "description": "采购合同入库量【期末】",
-                    "type": "number"
-                },
-                "buypricedamount": {
-                    "description": "采购合同已定价金额【期末】",
-                    "type": "number"
-                },
-                "buypricedqty": {
-                    "description": "采购合同已定价数量【期末】",
-                    "type": "number"
-                },
-                "buyreckonqty": {
-                    "description": "采购合同交收量【期末】",
-                    "type": "number"
-                },
-                "currencyid": {
-                    "description": "币种id",
-                    "type": "integer"
-                },
-                "currencyname": {
-                    "description": "币种名称",
-                    "type": "string"
-                },
-                "cycletime": {
-                    "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
-                    "type": "string"
-                },
-                "cycletype": {
-                    "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】",
-                    "type": "integer"
-                },
-                "deliverygoodscode": {
-                    "description": "现货商品代码",
-                    "type": "string"
-                },
-                "deliverygoodsid": {
-                    "description": "现货品种ID",
-                    "type": "integer"
-                },
-                "deliverygoodsname": {
-                    "description": "现货商品名称",
-                    "type": "string"
-                },
-                "enumdicname": {
-                    "description": "现货商品单位名称",
-                    "type": "string"
-                },
-                "goodsunitid": {
-                    "description": "现货商品单位id",
-                    "type": "integer"
-                },
-                "oribuycontractinqty": {
-                    "description": "期初采购合同入库量【期初】",
-                    "type": "number"
-                },
-                "oribuypricedamount": {
-                    "description": "期初采购合同已定价金额【期初】",
-                    "type": "number"
-                },
-                "oribuypricedqty": {
-                    "description": "期初采购合同已定价数量【期初】",
-                    "type": "number"
-                },
-                "oribuyreckonqty": {
-                    "description": "期初采购合同交收量【期初】",
-                    "type": "number"
-                },
-                "oriproduceinqty": {
-                    "description": "期初生产入库量【期初】",
-                    "type": "number"
-                },
-                "oriproduceoutqty": {
-                    "description": "期初生产出库量【期初】",
-                    "type": "number"
-                },
-                "orisellcontractoutqty": {
-                    "description": "期初销售合同出库量【期初】",
-                    "type": "number"
-                },
-                "orisellpricedamount": {
-                    "description": "期初销售合同已定价金额【期初】",
-                    "type": "number"
-                },
-                "orisellpricedqty": {
-                    "description": "期初销售合同已定价数量【期初】",
-                    "type": "number"
-                },
-                "orisellreckonqty": {
-                    "description": "期初销售合同交收量【期初】",
-                    "type": "number"
-                },
-                "produceinqty": {
-                    "description": "生产入库量【期末】",
-                    "type": "number"
-                },
-                "produceoutqty": {
-                    "description": "生产出库量【期末】",
-                    "type": "number"
-                },
-                "sellcontractoutqty": {
-                    "description": "销售合同出库量【期末】",
-                    "type": "number"
-                },
-                "sellpricedamount": {
-                    "description": "销售合同已定价金额【期末】",
-                    "type": "number"
-                },
-                "sellpricedqty": {
-                    "description": "销售合同已定价数量【期末】",
-                    "type": "number"
-                },
-                "sellreckonqty": {
-                    "description": "销售合同交收量【期末】",
-                    "type": "number"
-                },
-                "spotgoodsbrandid": {
-                    "description": "现货品牌ID",
-                    "type": "integer"
-                },
-                "todaybuyreckonqty": {
-                    "description": "今日采购合同已确定数量【汇总】",
-                    "type": "number"
-                },
-                "todaysellreckonqty": {
-                    "description": "今日销售合同已确定数量【汇总】",
-                    "type": "number"
-                },
-                "totalbuypricedqty": {
-                    "description": "采购定价量 = 期末 - 期初",
-                    "type": "number"
+                "totalbuypricedqty": {
+                    "description": "采购定价量 = 期末 - 期初",
+                    "type": "number"
                 },
                 "totalsellpricedqty": {
                     "description": "销售定价量 = 期末 - 期初",
@@ -14031,219 +13744,6 @@ var doc = `{
                 }
             }
         },
-        "models.Ermcp3ReportExpourse": {
-            "type": "object",
-            "properties": {
-                "accountid": {
-                    "description": "期货账户ID (作废, 默认为0)",
-                    "type": "integer"
-                },
-                "accountname": {
-                    "description": "机构名称",
-                    "type": "string"
-                },
-                "arbitrageqty": {
-                    "description": "套利量",
-                    "type": "number"
-                },
-                "areauserid": {
-                    "description": "所属机构\\交易用户ID",
-                    "type": "integer"
-                },
-                "buyfutureqty": {
-                    "description": "买入期货数量",
-                    "type": "number"
-                },
-                "buyplanqty": {
-                    "description": "采购计划数量",
-                    "type": "number"
-                },
-                "buypricedqty": {
-                    "description": "采购合同已定价数量",
-                    "type": "number"
-                },
-                "cycletime": {
-                    "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
-                    "type": "string"
-                },
-                "cycletype": {
-                    "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】",
-                    "type": "integer"
-                },
-                "diffexposure": {
-                    "description": "变动量(套保敞口)",
-                    "type": "number"
-                },
-                "difffutuqty": {
-                    "description": "变动量(期货)",
-                    "type": "number"
-                },
-                "diffhedgeqty": {
-                    "description": "变动量(现货应套保总量)",
-                    "type": "number"
-                },
-                "diffmgqtya": {
-                    "description": "套保变动量",
-                    "type": "number"
-                },
-                "diffmgqtyb": {
-                    "description": "套利变动量",
-                    "type": "number"
-                },
-                "diffqty": {
-                    "description": "变动量(总敞口)",
-                    "type": "number"
-                },
-                "diffspotqty": {
-                    "description": "变动量(现货)",
-                    "type": "number"
-                },
-                "enumdicname": {
-                    "description": "单位名称",
-                    "type": "string"
-                },
-                "hedgeqty": {
-                    "description": "套保量",
-                    "type": "number"
-                },
-                "mgneedhedgeratio": {
-                    "description": "套保比例(套保品的)",
-                    "type": "number"
-                },
-                "middlegoodsid": {
-                    "description": "套保品种ID",
-                    "type": "integer"
-                },
-                "middlegoodsnam": {
-                    "description": "套保商品名称",
-                    "type": "string"
-                },
-                "middlgoodscode": {
-                    "description": "套保商品代码",
-                    "type": "string"
-                },
-                "needarbitrageqty": {
-                    "description": "应套利量",
-                    "type": "number"
-                },
-                "needarbitrageratio": {
-                    "description": "套利比例(套保品的)",
-                    "type": "number"
-                },
-                "needhedgeexposoure": {
-                    "description": "应套保敞口(套保敞口)",
-                    "type": "number"
-                },
-                "needhedgeqty": {
-                    "description": "应套保量",
-                    "type": "number"
-                },
-                "needhedgeratio": {
-                    "description": "应套保敞口比例",
-                    "type": "number"
-                },
-                "oriarbitrageqty": {
-                    "description": "期初套利量",
-                    "type": "number"
-                },
-                "oribuyfutureqty": {
-                    "description": "期初买入期货数量",
-                    "type": "number"
-                },
-                "oribuyplanqty": {
-                    "description": "期初采购计划数量",
-                    "type": "number"
-                },
-                "oribuypricedqty": {
-                    "description": "期初采购合同已定价数量",
-                    "type": "number"
-                },
-                "orihedgeqty": {
-                    "description": "期初套保量",
-                    "type": "number"
-                },
-                "orineedarbitrageqty": {
-                    "description": "期初应套利量",
-                    "type": "number"
-                },
-                "orineedhedgeexposoure": {
-                    "description": "期初应套保敞口",
-                    "type": "number"
-                },
-                "orineedhedgeqty": {
-                    "description": "期初应套保量",
-                    "type": "number"
-                },
-                "orisellfutureqty": {
-                    "description": "期初卖出期货数量",
-                    "type": "number"
-                },
-                "orisellplanqty": {
-                    "description": "期初销售计划数量",
-                    "type": "number"
-                },
-                "orisellpricedqty": {
-                    "description": "期初销售合同已定价数量",
-                    "type": "number"
-                },
-                "oritotalexposure": {
-                    "description": "期初实时总敞口",
-                    "type": "number"
-                },
-                "oritotalfutureqty": {
-                    "description": "期初期货头寸总量",
-                    "type": "number"
-                },
-                "oritotalneedhedgeqty": {
-                    "description": "期初应套保总量",
-                    "type": "number"
-                },
-                "oritotalspotqty": {
-                    "description": "期初现货头寸总量",
-                    "type": "number"
-                },
-                "sellfutureqty": {
-                    "description": "卖出期货数量",
-                    "type": "number"
-                },
-                "sellplanqty": {
-                    "description": "销售计划数量",
-                    "type": "number"
-                },
-                "sellpricedqty": {
-                    "description": "销售合同已定价数量",
-                    "type": "number"
-                },
-                "totalexposure": {
-                    "description": "实时总敞口(总敞口)",
-                    "type": "number"
-                },
-                "totalfutureqty": {
-                    "description": "期货头寸总量(期货总量)",
-                    "type": "number"
-                },
-                "totalhedgeratio": {
-                    "description": "敞口比例",
-                    "type": "number"
-                },
-                "totalneedhedgeqty": {
-                    "description": "应套保总量(现货应套保总量)",
-                    "type": "number"
-                },
-                "totalspotqty": {
-                    "description": "现货头寸总量",
-                    "type": "number"
-                },
-                "unitid": {
-                    "description": "单位id",
-                    "type": "integer"
-                },
-                "updatetime": {
-                    "description": "更新时间",
-                    "type": "string"
-                }
-            }
-        },
         "models.Ermcp3ReportOPLog": {
             "type": "object",
             "properties": {
@@ -14344,6 +13844,10 @@ var doc = `{
         "models.Ermcp3SellBuyContract": {
             "type": "object",
             "properties": {
+                "accountid": {
+                    "description": "期货账户id",
+                    "type": "string"
+                },
                 "accountname": {
                     "description": "账户名称",
                     "type": "string"
@@ -14356,6 +13860,10 @@ var doc = `{
                     "description": "审核时间",
                     "type": "string"
                 },
+                "biztype": {
+                    "description": "业务类型 1-套保 2-套利",
+                    "type": "integer"
+                },
                 "brandname": {
                     "description": "品牌名称",
                     "type": "string"
@@ -14384,6 +13892,14 @@ var doc = `{
                     "description": "创建时间",
                     "type": "string"
                 },
+                "currencyid": {
+                    "description": "币种id",
+                    "type": "integer"
+                },
+                "currencyname": {
+                    "description": "币种名称",
+                    "type": "string"
+                },
                 "daikaiamount": {
                     "description": "应收(开)票额",
                     "type": "number"
@@ -14440,6 +13956,14 @@ var doc = `{
                     "description": "保证金",
                     "type": "number"
                 },
+                "meruserid": {
+                    "description": "跟单员id",
+                    "type": "integer"
+                },
+                "meruserlogincode": {
+                    "description": "跟单员登录代码",
+                    "type": "string"
+                },
                 "nickname": {
                     "description": "账户昵称",
                     "type": "string"
@@ -14508,6 +14032,14 @@ var doc = `{
                     "description": "备注",
                     "type": "string"
                 },
+                "saleuserid": {
+                    "description": "业务员id",
+                    "type": "integer"
+                },
+                "saleuserlogincode": {
+                    "description": "业务员登录代码",
+                    "type": "string"
+                },
                 "spotcontractid": {
                     "description": "合同ID",
                     "type": "string"
@@ -14528,6 +14060,18 @@ var doc = `{
                     "description": "合计总额",
                     "type": "number"
                 },
+                "tradeuserid": {
+                    "description": "交易员id",
+                    "type": "integer"
+                },
+                "tradeuserlogincode": {
+                    "description": "交易员登录代码",
+                    "type": "string"
+                },
+                "tradeusername": {
+                    "description": "交易员名称",
+                    "type": "string"
+                },
                 "unpayamount": {
                     "description": "应收付款额(应支付或应收款)",
                     "type": "number"

+ 122 - 578
docs/swagger.json

@@ -2677,7 +2677,7 @@
                 }
             }
         },
-        "/Ermcp3/QryReckonAreaExpourse": {
+        "/Ermcp3/QryAreaExpourseReport": {
             "get": {
                 "security": [
                     {
@@ -2690,7 +2690,7 @@
                 "tags": [
                     "企业风险管理v3(app)"
                 ],
-                "summary": "查询敞口报表(报表/敞口报表/日报表)",
+                "summary": "查询敞口报表",
                 "parameters": [
                     {
                         "type": "integer",
@@ -2703,113 +2703,19 @@
                         "type": "string",
                         "description": "交易日(YYYYMMDD)",
                         "name": "tradedate",
-                        "in": "query",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "type": "array",
-                            "items": {
-                                "$ref": "#/definitions/models.Ermcp3ReckonExpourse"
-                            }
-                        }
-                    },
-                    "500": {
-                        "description": "Internal Server Error",
-                        "schema": {
-                            "$ref": "#/definitions/app.Response"
-                        }
-                    }
-                }
-            }
-        },
-        "/Ermcp3/QryReckonAreaSpotPL": {
-            "get": {
-                "security": [
-                    {
-                        "ApiKeyAuth": []
-                    }
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "企业风险管理v3(app)"
-                ],
-                "summary": "查询现货日报表(现货报表/日报表)",
-                "parameters": [
-                    {
-                        "type": "integer",
-                        "description": "用户ID",
-                        "name": "userid",
-                        "in": "query",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "交易日(格式yyyymmdd)",
-                        "name": "tradedate",
-                        "in": "query",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "type": "array",
-                            "items": {
-                                "$ref": "#/definitions/models.Ermcp3ReckonAreaSpotPL"
-                            }
-                        }
-                    },
-                    "500": {
-                        "description": "Internal Server Error",
-                        "schema": {
-                            "$ref": "#/definitions/app.Response"
-                        }
-                    }
-                }
-            }
-        },
-        "/Ermcp3/QryReportAreaExpourse": {
-            "get": {
-                "security": [
-                    {
-                        "ApiKeyAuth": []
-                    }
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "企业风险管理v3(app)"
-                ],
-                "summary": "查询敞口周期报表(报表/敞口报表/周(月、季、年)报表)",
-                "parameters": [
-                    {
-                        "type": "integer",
-                        "description": "用户ID",
-                        "name": "userid",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     },
                     {
                         "type": "integer",
                         "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】",
                         "name": "cycletype",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     },
                     {
                         "type": "string",
                         "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
                         "name": "cycletime",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     }
                 ],
                 "responses": {
@@ -2818,7 +2724,7 @@
                         "schema": {
                             "type": "array",
                             "items": {
-                                "$ref": "#/definitions/models.Ermcp3ReportExpourse"
+                                "$ref": "#/definitions/models.Ermcp3ReckonExpourse"
                             }
                         }
                     },
@@ -2831,7 +2737,7 @@
                 }
             }
         },
-        "/Ermcp3/QryReportAreaSpotPL": {
+        "/Ermcp3/QryAreaSpotplReport": {
             "get": {
                 "security": [
                     {
@@ -2844,7 +2750,7 @@
                 "tags": [
                     "企业风险管理v3(app)"
                 ],
-                "summary": "查询现货周期报表(现货报表/周(月)报表)",
+                "summary": "查询现货报表",
                 "parameters": [
                     {
                         "type": "integer",
@@ -2854,18 +2760,22 @@
                         "required": true
                     },
                     {
+                        "type": "string",
+                        "description": "交易日(格式yyyymmdd)",
+                        "name": "tradedate",
+                        "in": "query"
+                    },
+                    {
                         "type": "integer",
                         "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】",
                         "name": "cycletype",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     },
                     {
                         "type": "string",
                         "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
                         "name": "cycletime",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     }
                 ],
                 "responses": {
@@ -2874,7 +2784,7 @@
                         "schema": {
                             "type": "array",
                             "items": {
-                                "$ref": "#/definitions/models.Ermcp3ReportAreaSpotPL"
+                                "$ref": "#/definitions/models.Ermcp3ReckonAreaSpotPL"
                             }
                         }
                     },
@@ -13630,77 +13540,56 @@
                 }
             }
         },
-        "models.Ermcp3ReportAreaSpotPL": {
+        "models.Ermcp3ReportAreaSpotSub": {
             "type": "object",
+            "required": [
+                "areauserid"
+            ],
             "properties": {
                 "accountid": {
-                    "description": "期货账户ID (作废, 默认为0)",
+                    "description": "期货账户ID",
                     "type": "integer"
                 },
                 "accountname": {
-                    "description": "机构名称",
+                    "description": "所属机构名称",
                     "type": "string"
                 },
-                "actualpl": {
-                    "description": "现货损益",
-                    "type": "number"
-                },
                 "areauserid": {
-                    "description": "所属机构\\交易用户ID",
+                    "description": "账户所属机构",
                     "type": "integer"
                 },
                 "biztype": {
-                    "description": "业务类型 - 1:套保 2:套利",
+                    "description": "业务类型  1-套保 2-套利",
                     "type": "integer"
                 },
                 "brandname": {
                     "description": "品牌名称",
                     "type": "string"
                 },
-                "curamount": {
-                    "description": "期末额",
-                    "type": "number"
-                },
-                "curaverageprice": {
-                    "description": "期末均价",
-                    "type": "number"
-                },
-                "curbuyamount": {
-                    "description": "期末采购总额",
+                "buycontractinqty": {
+                    "description": "采购合同入库量【期末】",
                     "type": "number"
                 },
-                "curbuyqty": {
-                    "description": "期末采购总量",
+                "buypricedamount": {
+                    "description": "采购合同已定价金额【期末】",
                     "type": "number"
                 },
-                "curmarketvalue": {
-                    "description": "参考市值(期末市值)",
+                "buypricedqty": {
+                    "description": "采购合同已定价数量【期末】",
                     "type": "number"
                 },
-                "curqty": {
-                    "description": "期末量",
+                "buyreckonqty": {
+                    "description": "采购合同交收量【期末】",
                     "type": "number"
                 },
                 "currencyid": {
-                    "description": "结算币种ID【原值】",
+                    "description": "币种id",
                     "type": "integer"
                 },
                 "currencyname": {
                     "description": "币种名称",
                     "type": "string"
                 },
-                "cursellamount": {
-                    "description": "期末销售总额",
-                    "type": "number"
-                },
-                "cursellqty": {
-                    "description": "期末销售总量",
-                    "type": "number"
-                },
-                "curspotprice": {
-                    "description": "参考市价(最新价)",
-                    "type": "number"
-                },
                 "cycletime": {
                     "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
                     "type": "string"
@@ -13725,265 +13614,89 @@
                     "description": "现货商品单位名称",
                     "type": "string"
                 },
-                "floatpl": {
-                    "description": "浮动损益",
-                    "type": "number"
-                },
                 "goodsunitid": {
                     "description": "现货商品单位id",
                     "type": "integer"
                 },
-                "oriamount": {
-                    "description": "期初",
+                "oribuycontractinqty": {
+                    "description": "期初采购合同入库量【期初】",
                     "type": "number"
                 },
-                "oriaverageprice": {
-                    "description": "期初均价",
+                "oribuypricedamount": {
+                    "description": "期初采购合同已定价金额【期初】",
                     "type": "number"
                 },
-                "oribuyamount": {
-                    "description": "期初采购总额",
+                "oribuypricedqty": {
+                    "description": "期初采购合同已定价数量【期初】",
                     "type": "number"
                 },
-                "oribuyqty": {
-                    "description": "期初采购总量",
+                "oribuyreckonqty": {
+                    "description": "期初采购合同交收量【期初】",
                     "type": "number"
                 },
-                "oriqty": {
-                    "description": "期初量",
+                "oriproduceinqty": {
+                    "description": "期初生产入库【期初】",
                     "type": "number"
                 },
-                "orisellamount": {
-                    "description": "期初销售总额",
+                "oriproduceoutqty": {
+                    "description": "期初生产出库量【期初】",
                     "type": "number"
                 },
-                "orisellqty": {
-                    "description": "期初销售总量",
+                "orisellcontractoutqty": {
+                    "description": "期初销售合同出库量【期初】",
                     "type": "number"
                 },
-                "spotgoodsbrandid": {
-                    "description": "现货品牌ID",
-                    "type": "integer"
+                "orisellpricedamount": {
+                    "description": "期初销售合同已定价金额【期初】",
+                    "type": "number"
                 },
-                "todaybuyamount": {
-                    "description": "今日采购额(今采购额)",
+                "orisellpricedqty": {
+                    "description": "期初销售合同已定价数量【期初】",
                     "type": "number"
                 },
-                "todaybuyaverageprice": {
-                    "description": "今日采购均价",
+                "orisellreckonqty": {
+                    "description": "期初销售合同交收量【期初】",
                     "type": "number"
                 },
-                "todaybuyqty": {
-                    "description": "今日采购量(今采购量)",
+                "produceinqty": {
+                    "description": "生产入库量【期末】",
                     "type": "number"
                 },
-                "todayinqty": {
-                    "description": "今日入库量(今入库量)",
+                "produceoutqty": {
+                    "description": "生产出库量【期末】",
                     "type": "number"
                 },
-                "todayoutqty": {
-                    "description": "今日出库量(今出库量)",
+                "sellcontractoutqty": {
+                    "description": "销售合同出库量【期末】",
                     "type": "number"
                 },
-                "todaysellamount": {
-                    "description": "今日销售额(今销售额)",
+                "sellpricedamount": {
+                    "description": "销售合同已定价金额【期末】",
                     "type": "number"
                 },
-                "todaysellaverageprice": {
-                    "description": "今日销售均价",
+                "sellpricedqty": {
+                    "description": "销售合同已定价数量【期末】",
                     "type": "number"
                 },
-                "todaysellqty": {
-                    "description": "今日销售量(今销售量)",
+                "sellreckonqty": {
+                    "description": "销售合同交收量【期末】",
                     "type": "number"
                 },
-                "unitid": {
-                    "description": "品类单位id",
+                "spotgoodsbrandid": {
+                    "description": "现货品牌ID",
                     "type": "integer"
                 },
-                "unitidname": {
-                    "description": "品类单位名称",
-                    "type": "string"
+                "todaybuyreckonqty": {
+                    "description": "今日采购合同已确定数量【汇总】",
+                    "type": "number"
                 },
-                "updatetime": {
-                    "description": "更新时间",
-                    "type": "string"
+                "todaysellreckonqty": {
+                    "description": "今日销售合同已确定数量【汇总】",
+                    "type": "number"
                 },
-                "wrfactortypeid": {
-                    "description": "仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
-                },
-                "wrstandardcode": {
-                    "description": "品类代码",
-                    "type": "string"
-                },
-                "wrstandardid": {
-                    "description": "现货品类ID",
-                    "type": "string"
-                },
-                "wrstandardname": {
-                    "description": "品类名称",
-                    "type": "string"
-                }
-            }
-        },
-        "models.Ermcp3ReportAreaSpotSub": {
-            "type": "object",
-            "required": [
-                "areauserid"
-            ],
-            "properties": {
-                "accountid": {
-                    "description": "期货账户ID",
-                    "type": "integer"
-                },
-                "accountname": {
-                    "description": "所属机构名称",
-                    "type": "string"
-                },
-                "areauserid": {
-                    "description": "账户所属机构",
-                    "type": "integer"
-                },
-                "biztype": {
-                    "description": "业务类型  1-套保 2-套利",
-                    "type": "integer"
-                },
-                "brandname": {
-                    "description": "品牌名称",
-                    "type": "string"
-                },
-                "buycontractinqty": {
-                    "description": "采购合同入库量【期末】",
-                    "type": "number"
-                },
-                "buypricedamount": {
-                    "description": "采购合同已定价金额【期末】",
-                    "type": "number"
-                },
-                "buypricedqty": {
-                    "description": "采购合同已定价数量【期末】",
-                    "type": "number"
-                },
-                "buyreckonqty": {
-                    "description": "采购合同交收量【期末】",
-                    "type": "number"
-                },
-                "currencyid": {
-                    "description": "币种id",
-                    "type": "integer"
-                },
-                "currencyname": {
-                    "description": "币种名称",
-                    "type": "string"
-                },
-                "cycletime": {
-                    "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
-                    "type": "string"
-                },
-                "cycletype": {
-                    "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】",
-                    "type": "integer"
-                },
-                "deliverygoodscode": {
-                    "description": "现货商品代码",
-                    "type": "string"
-                },
-                "deliverygoodsid": {
-                    "description": "现货品种ID",
-                    "type": "integer"
-                },
-                "deliverygoodsname": {
-                    "description": "现货商品名称",
-                    "type": "string"
-                },
-                "enumdicname": {
-                    "description": "现货商品单位名称",
-                    "type": "string"
-                },
-                "goodsunitid": {
-                    "description": "现货商品单位id",
-                    "type": "integer"
-                },
-                "oribuycontractinqty": {
-                    "description": "期初采购合同入库量【期初】",
-                    "type": "number"
-                },
-                "oribuypricedamount": {
-                    "description": "期初采购合同已定价金额【期初】",
-                    "type": "number"
-                },
-                "oribuypricedqty": {
-                    "description": "期初采购合同已定价数量【期初】",
-                    "type": "number"
-                },
-                "oribuyreckonqty": {
-                    "description": "期初采购合同交收量【期初】",
-                    "type": "number"
-                },
-                "oriproduceinqty": {
-                    "description": "期初生产入库量【期初】",
-                    "type": "number"
-                },
-                "oriproduceoutqty": {
-                    "description": "期初生产出库量【期初】",
-                    "type": "number"
-                },
-                "orisellcontractoutqty": {
-                    "description": "期初销售合同出库量【期初】",
-                    "type": "number"
-                },
-                "orisellpricedamount": {
-                    "description": "期初销售合同已定价金额【期初】",
-                    "type": "number"
-                },
-                "orisellpricedqty": {
-                    "description": "期初销售合同已定价数量【期初】",
-                    "type": "number"
-                },
-                "orisellreckonqty": {
-                    "description": "期初销售合同交收量【期初】",
-                    "type": "number"
-                },
-                "produceinqty": {
-                    "description": "生产入库量【期末】",
-                    "type": "number"
-                },
-                "produceoutqty": {
-                    "description": "生产出库量【期末】",
-                    "type": "number"
-                },
-                "sellcontractoutqty": {
-                    "description": "销售合同出库量【期末】",
-                    "type": "number"
-                },
-                "sellpricedamount": {
-                    "description": "销售合同已定价金额【期末】",
-                    "type": "number"
-                },
-                "sellpricedqty": {
-                    "description": "销售合同已定价数量【期末】",
-                    "type": "number"
-                },
-                "sellreckonqty": {
-                    "description": "销售合同交收量【期末】",
-                    "type": "number"
-                },
-                "spotgoodsbrandid": {
-                    "description": "现货品牌ID",
-                    "type": "integer"
-                },
-                "todaybuyreckonqty": {
-                    "description": "今日采购合同已确定数量【汇总】",
-                    "type": "number"
-                },
-                "todaysellreckonqty": {
-                    "description": "今日销售合同已确定数量【汇总】",
-                    "type": "number"
-                },
-                "totalbuypricedqty": {
-                    "description": "采购定价量 = 期末 - 期初",
-                    "type": "number"
+                "totalbuypricedqty": {
+                    "description": "采购定价量 = 期末 - 期初",
+                    "type": "number"
                 },
                 "totalsellpricedqty": {
                     "description": "销售定价量 = 期末 - 期初",
@@ -14015,219 +13728,6 @@
                 }
             }
         },
-        "models.Ermcp3ReportExpourse": {
-            "type": "object",
-            "properties": {
-                "accountid": {
-                    "description": "期货账户ID (作废, 默认为0)",
-                    "type": "integer"
-                },
-                "accountname": {
-                    "description": "机构名称",
-                    "type": "string"
-                },
-                "arbitrageqty": {
-                    "description": "套利量",
-                    "type": "number"
-                },
-                "areauserid": {
-                    "description": "所属机构\\交易用户ID",
-                    "type": "integer"
-                },
-                "buyfutureqty": {
-                    "description": "买入期货数量",
-                    "type": "number"
-                },
-                "buyplanqty": {
-                    "description": "采购计划数量",
-                    "type": "number"
-                },
-                "buypricedqty": {
-                    "description": "采购合同已定价数量",
-                    "type": "number"
-                },
-                "cycletime": {
-                    "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
-                    "type": "string"
-                },
-                "cycletype": {
-                    "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】",
-                    "type": "integer"
-                },
-                "diffexposure": {
-                    "description": "变动量(套保敞口)",
-                    "type": "number"
-                },
-                "difffutuqty": {
-                    "description": "变动量(期货)",
-                    "type": "number"
-                },
-                "diffhedgeqty": {
-                    "description": "变动量(现货应套保总量)",
-                    "type": "number"
-                },
-                "diffmgqtya": {
-                    "description": "套保变动量",
-                    "type": "number"
-                },
-                "diffmgqtyb": {
-                    "description": "套利变动量",
-                    "type": "number"
-                },
-                "diffqty": {
-                    "description": "变动量(总敞口)",
-                    "type": "number"
-                },
-                "diffspotqty": {
-                    "description": "变动量(现货)",
-                    "type": "number"
-                },
-                "enumdicname": {
-                    "description": "单位名称",
-                    "type": "string"
-                },
-                "hedgeqty": {
-                    "description": "套保量",
-                    "type": "number"
-                },
-                "mgneedhedgeratio": {
-                    "description": "套保比例(套保品的)",
-                    "type": "number"
-                },
-                "middlegoodsid": {
-                    "description": "套保品种ID",
-                    "type": "integer"
-                },
-                "middlegoodsnam": {
-                    "description": "套保商品名称",
-                    "type": "string"
-                },
-                "middlgoodscode": {
-                    "description": "套保商品代码",
-                    "type": "string"
-                },
-                "needarbitrageqty": {
-                    "description": "应套利量",
-                    "type": "number"
-                },
-                "needarbitrageratio": {
-                    "description": "套利比例(套保品的)",
-                    "type": "number"
-                },
-                "needhedgeexposoure": {
-                    "description": "应套保敞口(套保敞口)",
-                    "type": "number"
-                },
-                "needhedgeqty": {
-                    "description": "应套保量",
-                    "type": "number"
-                },
-                "needhedgeratio": {
-                    "description": "应套保敞口比例",
-                    "type": "number"
-                },
-                "oriarbitrageqty": {
-                    "description": "期初套利量",
-                    "type": "number"
-                },
-                "oribuyfutureqty": {
-                    "description": "期初买入期货数量",
-                    "type": "number"
-                },
-                "oribuyplanqty": {
-                    "description": "期初采购计划数量",
-                    "type": "number"
-                },
-                "oribuypricedqty": {
-                    "description": "期初采购合同已定价数量",
-                    "type": "number"
-                },
-                "orihedgeqty": {
-                    "description": "期初套保量",
-                    "type": "number"
-                },
-                "orineedarbitrageqty": {
-                    "description": "期初应套利量",
-                    "type": "number"
-                },
-                "orineedhedgeexposoure": {
-                    "description": "期初应套保敞口",
-                    "type": "number"
-                },
-                "orineedhedgeqty": {
-                    "description": "期初应套保量",
-                    "type": "number"
-                },
-                "orisellfutureqty": {
-                    "description": "期初卖出期货数量",
-                    "type": "number"
-                },
-                "orisellplanqty": {
-                    "description": "期初销售计划数量",
-                    "type": "number"
-                },
-                "orisellpricedqty": {
-                    "description": "期初销售合同已定价数量",
-                    "type": "number"
-                },
-                "oritotalexposure": {
-                    "description": "期初实时总敞口",
-                    "type": "number"
-                },
-                "oritotalfutureqty": {
-                    "description": "期初期货头寸总量",
-                    "type": "number"
-                },
-                "oritotalneedhedgeqty": {
-                    "description": "期初应套保总量",
-                    "type": "number"
-                },
-                "oritotalspotqty": {
-                    "description": "期初现货头寸总量",
-                    "type": "number"
-                },
-                "sellfutureqty": {
-                    "description": "卖出期货数量",
-                    "type": "number"
-                },
-                "sellplanqty": {
-                    "description": "销售计划数量",
-                    "type": "number"
-                },
-                "sellpricedqty": {
-                    "description": "销售合同已定价数量",
-                    "type": "number"
-                },
-                "totalexposure": {
-                    "description": "实时总敞口(总敞口)",
-                    "type": "number"
-                },
-                "totalfutureqty": {
-                    "description": "期货头寸总量(期货总量)",
-                    "type": "number"
-                },
-                "totalhedgeratio": {
-                    "description": "敞口比例",
-                    "type": "number"
-                },
-                "totalneedhedgeqty": {
-                    "description": "应套保总量(现货应套保总量)",
-                    "type": "number"
-                },
-                "totalspotqty": {
-                    "description": "现货头寸总量",
-                    "type": "number"
-                },
-                "unitid": {
-                    "description": "单位id",
-                    "type": "integer"
-                },
-                "updatetime": {
-                    "description": "更新时间",
-                    "type": "string"
-                }
-            }
-        },
         "models.Ermcp3ReportOPLog": {
             "type": "object",
             "properties": {
@@ -14328,6 +13828,10 @@
         "models.Ermcp3SellBuyContract": {
             "type": "object",
             "properties": {
+                "accountid": {
+                    "description": "期货账户id",
+                    "type": "string"
+                },
                 "accountname": {
                     "description": "账户名称",
                     "type": "string"
@@ -14340,6 +13844,10 @@
                     "description": "审核时间",
                     "type": "string"
                 },
+                "biztype": {
+                    "description": "业务类型 1-套保 2-套利",
+                    "type": "integer"
+                },
                 "brandname": {
                     "description": "品牌名称",
                     "type": "string"
@@ -14368,6 +13876,14 @@
                     "description": "创建时间",
                     "type": "string"
                 },
+                "currencyid": {
+                    "description": "币种id",
+                    "type": "integer"
+                },
+                "currencyname": {
+                    "description": "币种名称",
+                    "type": "string"
+                },
                 "daikaiamount": {
                     "description": "应收(开)票额",
                     "type": "number"
@@ -14424,6 +13940,14 @@
                     "description": "保证金",
                     "type": "number"
                 },
+                "meruserid": {
+                    "description": "跟单员id",
+                    "type": "integer"
+                },
+                "meruserlogincode": {
+                    "description": "跟单员登录代码",
+                    "type": "string"
+                },
                 "nickname": {
                     "description": "账户昵称",
                     "type": "string"
@@ -14492,6 +14016,14 @@
                     "description": "备注",
                     "type": "string"
                 },
+                "saleuserid": {
+                    "description": "业务员id",
+                    "type": "integer"
+                },
+                "saleuserlogincode": {
+                    "description": "业务员登录代码",
+                    "type": "string"
+                },
                 "spotcontractid": {
                     "description": "合同ID",
                     "type": "string"
@@ -14512,6 +14044,18 @@
                     "description": "合计总额",
                     "type": "number"
                 },
+                "tradeuserid": {
+                    "description": "交易员id",
+                    "type": "integer"
+                },
+                "tradeuserlogincode": {
+                    "description": "交易员登录代码",
+                    "type": "string"
+                },
+                "tradeusername": {
+                    "description": "交易员名称",
+                    "type": "string"
+                },
                 "unpayamount": {
                     "description": "应收付款额(应支付或应收款)",
                     "type": "number"

+ 43 - 374
docs/swagger.yaml

@@ -4093,153 +4093,6 @@ definitions:
         description: 更新时间
         type: string
     type: object
-  models.Ermcp3ReportAreaSpotPL:
-    properties:
-      accountid:
-        description: 期货账户ID (作废, 默认为0)
-        type: integer
-      accountname:
-        description: 机构名称
-        type: string
-      actualpl:
-        description: 现货损益
-        type: number
-      areauserid:
-        description: 所属机构\交易用户ID
-        type: integer
-      biztype:
-        description: 业务类型 - 1:套保 2:套利
-        type: integer
-      brandname:
-        description: 品牌名称
-        type: string
-      curamount:
-        description: 期末额
-        type: number
-      curaverageprice:
-        description: 期末均价
-        type: number
-      curbuyamount:
-        description: 期末采购总额
-        type: number
-      curbuyqty:
-        description: 期末采购总量
-        type: number
-      curmarketvalue:
-        description: 参考市值(期末市值)
-        type: number
-      curqty:
-        description: 期末量
-        type: number
-      currencyid:
-        description: 结算币种ID【原值】
-        type: integer
-      currencyname:
-        description: 币种名称
-        type: string
-      cursellamount:
-        description: 期末销售总额
-        type: number
-      cursellqty:
-        description: 期末销售总量
-        type: number
-      curspotprice:
-        description: 参考市价(最新价)
-        type: number
-      cycletime:
-        description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
-        type: string
-      cycletype:
-        description: 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
-        type: integer
-      deliverygoodscode:
-        description: 现货商品代码
-        type: string
-      deliverygoodsid:
-        description: 现货品种ID
-        type: integer
-      deliverygoodsname:
-        description: 现货商品名称
-        type: string
-      enumdicname:
-        description: 现货商品单位名称
-        type: string
-      floatpl:
-        description: 浮动损益
-        type: number
-      goodsunitid:
-        description: 现货商品单位id
-        type: integer
-      oriamount:
-        description: 期初额
-        type: number
-      oriaverageprice:
-        description: 期初均价
-        type: number
-      oribuyamount:
-        description: 期初采购总额
-        type: number
-      oribuyqty:
-        description: 期初采购总量
-        type: number
-      oriqty:
-        description: 期初量
-        type: number
-      orisellamount:
-        description: 期初销售总额
-        type: number
-      orisellqty:
-        description: 期初销售总量
-        type: number
-      spotgoodsbrandid:
-        description: 现货品牌ID
-        type: integer
-      todaybuyamount:
-        description: 今日采购额(今采购额)
-        type: number
-      todaybuyaverageprice:
-        description: 今日采购均价
-        type: number
-      todaybuyqty:
-        description: 今日采购量(今采购量)
-        type: number
-      todayinqty:
-        description: 今日入库量(今入库量)
-        type: number
-      todayoutqty:
-        description: 今日出库量(今出库量)
-        type: number
-      todaysellamount:
-        description: 今日销售额(今销售额)
-        type: number
-      todaysellaverageprice:
-        description: 今日销售均价
-        type: number
-      todaysellqty:
-        description: 今日销售量(今销售量)
-        type: number
-      unitid:
-        description: 品类单位id
-        type: integer
-      unitidname:
-        description: 品类单位名称
-        type: string
-      updatetime:
-        description: 更新时间
-        type: string
-      wrfactortypeid:
-        description: 仓单要素类型ID(212+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
-      wrstandardcode:
-        description: 品类代码
-        type: string
-      wrstandardid:
-        description: 现货品类ID
-        type: string
-      wrstandardname:
-        description: 品类名称
-        type: string
-    type: object
   models.Ermcp3ReportAreaSpotSub:
     properties:
       accountid:
@@ -4380,165 +4233,6 @@ definitions:
     required:
     - areauserid
     type: object
-  models.Ermcp3ReportExpourse:
-    properties:
-      accountid:
-        description: 期货账户ID (作废, 默认为0)
-        type: integer
-      accountname:
-        description: 机构名称
-        type: string
-      arbitrageqty:
-        description: 套利量
-        type: number
-      areauserid:
-        description: 所属机构\交易用户ID
-        type: integer
-      buyfutureqty:
-        description: 买入期货数量
-        type: number
-      buyplanqty:
-        description: 采购计划数量
-        type: number
-      buypricedqty:
-        description: 采购合同已定价数量
-        type: number
-      cycletime:
-        description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
-        type: string
-      cycletype:
-        description: 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
-        type: integer
-      diffexposure:
-        description: 变动量(套保敞口)
-        type: number
-      difffutuqty:
-        description: 变动量(期货)
-        type: number
-      diffhedgeqty:
-        description: 变动量(现货应套保总量)
-        type: number
-      diffmgqtya:
-        description: 套保变动量
-        type: number
-      diffmgqtyb:
-        description: 套利变动量
-        type: number
-      diffqty:
-        description: 变动量(总敞口)
-        type: number
-      diffspotqty:
-        description: 变动量(现货)
-        type: number
-      enumdicname:
-        description: 单位名称
-        type: string
-      hedgeqty:
-        description: 套保量
-        type: number
-      mgneedhedgeratio:
-        description: 套保比例(套保品的)
-        type: number
-      middlegoodsid:
-        description: 套保品种ID
-        type: integer
-      middlegoodsnam:
-        description: 套保商品名称
-        type: string
-      middlgoodscode:
-        description: 套保商品代码
-        type: string
-      needarbitrageqty:
-        description: 应套利量
-        type: number
-      needarbitrageratio:
-        description: 套利比例(套保品的)
-        type: number
-      needhedgeexposoure:
-        description: 应套保敞口(套保敞口)
-        type: number
-      needhedgeqty:
-        description: 应套保量
-        type: number
-      needhedgeratio:
-        description: 应套保敞口比例
-        type: number
-      oriarbitrageqty:
-        description: 期初套利量
-        type: number
-      oribuyfutureqty:
-        description: 期初买入期货数量
-        type: number
-      oribuyplanqty:
-        description: 期初采购计划数量
-        type: number
-      oribuypricedqty:
-        description: 期初采购合同已定价数量
-        type: number
-      orihedgeqty:
-        description: 期初套保量
-        type: number
-      orineedarbitrageqty:
-        description: 期初应套利量
-        type: number
-      orineedhedgeexposoure:
-        description: 期初应套保敞口
-        type: number
-      orineedhedgeqty:
-        description: 期初应套保量
-        type: number
-      orisellfutureqty:
-        description: 期初卖出期货数量
-        type: number
-      orisellplanqty:
-        description: 期初销售计划数量
-        type: number
-      orisellpricedqty:
-        description: 期初销售合同已定价数量
-        type: number
-      oritotalexposure:
-        description: 期初实时总敞口
-        type: number
-      oritotalfutureqty:
-        description: 期初期货头寸总量
-        type: number
-      oritotalneedhedgeqty:
-        description: 期初应套保总量
-        type: number
-      oritotalspotqty:
-        description: 期初现货头寸总量
-        type: number
-      sellfutureqty:
-        description: 卖出期货数量
-        type: number
-      sellplanqty:
-        description: 销售计划数量
-        type: number
-      sellpricedqty:
-        description: 销售合同已定价数量
-        type: number
-      totalexposure:
-        description: 实时总敞口(总敞口)
-        type: number
-      totalfutureqty:
-        description: 期货头寸总量(期货总量)
-        type: number
-      totalhedgeratio:
-        description: 敞口比例
-        type: number
-      totalneedhedgeqty:
-        description: 应套保总量(现货应套保总量)
-        type: number
-      totalspotqty:
-        description: 现货头寸总量
-        type: number
-      unitid:
-        description: 单位id
-        type: integer
-      updatetime:
-        description: 更新时间
-        type: string
-    type: object
   models.Ermcp3ReportOPLog:
     properties:
       applyid:
@@ -4613,6 +4307,9 @@ definitions:
     type: object
   models.Ermcp3SellBuyContract:
     properties:
+      accountid:
+        description: 期货账户id
+        type: string
       accountname:
         description: 账户名称
         type: string
@@ -4622,6 +4319,9 @@ definitions:
       audittime:
         description: 审核时间
         type: string
+      biztype:
+        description: 业务类型 1-套保 2-套利
+        type: integer
       brandname:
         description: 品牌名称
         type: string
@@ -4643,6 +4343,12 @@ definitions:
       createtime:
         description: 创建时间
         type: string
+      currencyid:
+        description: 币种id
+        type: integer
+      currencyname:
+        description: 币种名称
+        type: string
       daikaiamount:
         description: 应收(开)票额
         type: number
@@ -4685,6 +4391,12 @@ definitions:
       margin:
         description: 保证金
         type: number
+      meruserid:
+        description: 跟单员id
+        type: integer
+      meruserlogincode:
+        description: 跟单员登录代码
+        type: string
       nickname:
         description: 账户昵称
         type: string
@@ -4736,6 +4448,12 @@ definitions:
       remark:
         description: 备注
         type: string
+      saleuserid:
+        description: 业务员id
+        type: integer
+      saleuserlogincode:
+        description: 业务员登录代码
+        type: string
       spotcontractid:
         description: 合同ID
         type: string
@@ -4751,6 +4469,15 @@ definitions:
       totalamount:
         description: 合计总额
         type: number
+      tradeuserid:
+        description: 交易员id
+        type: integer
+      tradeuserlogincode:
+        description: 交易员登录代码
+        type: string
+      tradeusername:
+        description: 交易员名称
+        type: string
       unpayamount:
         description: 应收付款额(应支付或应收款)
         type: number
@@ -13116,7 +12843,7 @@ paths:
       summary: 查询敞口套保计划明细(敞口报表/套保计划明细)
       tags:
       - 企业风险管理v3(app)
-  /Ermcp3/QryReckonAreaExpourse:
+  /Ermcp3/QryAreaExpourseReport:
     get:
       parameters:
       - description: 用户ID
@@ -13127,74 +12854,14 @@ paths:
       - description: 交易日(YYYYMMDD)
         in: query
         name: tradedate
-        required: true
-        type: string
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            items:
-              $ref: '#/definitions/models.Ermcp3ReckonExpourse'
-            type: array
-        "500":
-          description: Internal Server Error
-          schema:
-            $ref: '#/definitions/app.Response'
-      security:
-      - ApiKeyAuth: []
-      summary: 查询敞口日报表(报表/敞口报表/日报表)
-      tags:
-      - 企业风险管理v3(app)
-  /Ermcp3/QryReckonAreaSpotPL:
-    get:
-      parameters:
-      - description: 用户ID
-        in: query
-        name: userid
-        required: true
-        type: integer
-      - description: 交易日(格式yyyymmdd)
-        in: query
-        name: tradedate
-        required: true
         type: string
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            items:
-              $ref: '#/definitions/models.Ermcp3ReckonAreaSpotPL'
-            type: array
-        "500":
-          description: Internal Server Error
-          schema:
-            $ref: '#/definitions/app.Response'
-      security:
-      - ApiKeyAuth: []
-      summary: 查询现货日报表(现货报表/日报表)
-      tags:
-      - 企业风险管理v3(app)
-  /Ermcp3/QryReportAreaExpourse:
-    get:
-      parameters:
-      - description: 用户ID
-        in: query
-        name: userid
-        required: true
-        type: integer
       - description: 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
         in: query
         name: cycletype
-        required: true
         type: integer
       - description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
         in: query
         name: cycletime
-        required: true
         type: string
       produces:
       - application/json
@@ -13203,7 +12870,7 @@ paths:
           description: OK
           schema:
             items:
-              $ref: '#/definitions/models.Ermcp3ReportExpourse'
+              $ref: '#/definitions/models.Ermcp3ReckonExpourse'
             type: array
         "500":
           description: Internal Server Error
@@ -13211,10 +12878,10 @@ paths:
             $ref: '#/definitions/app.Response'
       security:
       - ApiKeyAuth: []
-      summary: 查询敞口周期报表(报表/敞口报表/周(月、季、年)报表)
+      summary: 查询敞口报表
       tags:
       - 企业风险管理v3(app)
-  /Ermcp3/QryReportAreaSpotPL:
+  /Ermcp3/QryAreaSpotplReport:
     get:
       parameters:
       - description: 用户ID
@@ -13222,15 +12889,17 @@ paths:
         name: userid
         required: true
         type: integer
+      - description: 交易日(格式yyyymmdd)
+        in: query
+        name: tradedate
+        type: string
       - description: 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
         in: query
         name: cycletype
-        required: true
         type: integer
       - description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
         in: query
         name: cycletime
-        required: true
         type: string
       produces:
       - application/json
@@ -13239,7 +12908,7 @@ paths:
           description: OK
           schema:
             items:
-              $ref: '#/definitions/models.Ermcp3ReportAreaSpotPL'
+              $ref: '#/definitions/models.Ermcp3ReckonAreaSpotPL'
             type: array
         "500":
           description: Internal Server Error
@@ -13247,7 +12916,7 @@ paths:
             $ref: '#/definitions/app.Response'
       security:
       - ApiKeyAuth: []
-      summary: 查询现货周期报表(现货报表/周(月)报表)
+      summary: 查询现货报表
       tags:
       - 企业风险管理v3(app)
   /Ermcp3/QryReportDayFinanceFp:

+ 26 - 4
models/ermcp3.go

@@ -823,8 +823,19 @@ type Ermcp3SellBuyContract struct {
 	WRSTANDARDID       int64   `json:"wrstandardid"  xorm:"'WRSTANDARDID'"`             // 品类ID
 	WRSTANDARDNAME     string  `json:"wrstandardname"  xorm:"'WRSTANDARDNAME'"`         // 品类名称
 	WRSTANDARDCODE     string  `json:"wrstandardcode"  xorm:"'WRSTANDARDCODE'"`         // 品类代码
-	NICKNAME           string  `json:"nickname"`                                        // 账户昵称
-
+	TRADEUSERID        int64   `json:"tradeuserid"  xorm:"'TRADEUSERID'"`               // 交易员id
+	SALEUSERID         int64   `json:"saleuserid"  xorm:"'SALEUSERID'"`                 // 业务员id
+	MERUSERID          int64   `json:"meruserid"  xorm:"'MERUSERID'"`                   // 跟单员id
+	ACCOUNTID          string  `json:"accountid"  xorm:"'ACCOUNTID'"`                   // 期货账户id
+	BIZTYPE            int32   `json:"biztype"  xorm:"'BIZTYPE'"`                       // 业务类型 1-套保 2-套利
+	CURRENCYID         int32   `json:"currencyid"  xorm:"'CURRENCYID'"`                 // 币种id
+
+	NICKNAME           string `json:"nickname"`           // 账户昵称
+	TRADEUSERLOGINCODE string `json:"tradeuserlogincode"` // 交易员登录代码
+	SALEUSERLOGINCODE  string `json:"saleuserlogincode"`  // 业务员登录代码
+	MERUSERLOGINCODE   string `json:"meruserlogincode"`   // 跟单员登录代码
+	CURRENCYNAME       string `json:"currencyname"`       // 币种名称
+	TRADEUSERNAME      string `json:"tradeusername"`      // 交易员名称
 	// 筛选条件
 	QryType   int32 `json:"-"` // 查询类型 1-未提交 2-待审核 3-履约中 4-已完成
 	UserType  int32 `json:"-"` // 用户类型  2-管理员 7-企业成员
@@ -843,6 +854,12 @@ func (r *Ermcp3SellBuyContract) calc() {
 		//销售合同, 取采购方名称
 		r.AccountName, r.NICKNAME = mtpcache.GetUserNameAndNickName(r.BUYUSERID)
 	}
+
+	r.TRADEUSERLOGINCODE = mtpcache.GetLoginCodeByUserId(r.TRADEUSERID)
+	r.SALEUSERLOGINCODE = mtpcache.GetLoginCodeByUserId(r.SALEUSERID)
+	r.MERUSERLOGINCODE = mtpcache.GetLoginCodeByUserId(r.MERUSERID)
+	r.TRADEUSERNAME = mtpcache.GetUserNameByUserId(r.TRADEUSERID)
+	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
 }
 
 func (r *Ermcp3SellBuyContract) buildSql() string {
@@ -882,6 +899,11 @@ func (r *Ermcp3SellBuyContract) buildSql() string {
 		"       t.margin," +
 		"       t.contractmargin," +
 		"       t.SPOTGOODSBRANDID," +
+		"       t.tradeuserid," +
+		"       t.saleuserid," +
+		"       t.meruserid," +
+		"       t.currencyid," +
+		"       t.biztype," +
 		"       g.deliverygoodscode," +
 		"       g.deliverygoodsname," +
 		"       wr.wrstandardid," +
@@ -1198,7 +1220,7 @@ func (r *Ermcp3AreaSpotDetail) buildSql() string {
 		"         1 as logType," +
 		"         t.contracttype" +
 		"    from ermcp_hedgeplan t" +
-		"   where t.areauserid = %v" +
+		"   where  %v in(t.areauserid, t.tradeuserid)" +
 		"     and t.deliverygoodsid = %v" +
 		"  union all" +
 		"  select to_char(t.spotcontractid)," +
@@ -1206,7 +1228,7 @@ func (r *Ermcp3AreaSpotDetail) buildSql() string {
 		"         2 as logType," +
 		"         t.contracttype" +
 		"    from ermcp_spotcontract t" +
-		"   where t.userid = %v" +
+		"   where %v in(t.userid, t.tradeuserid)" +
 		"     and t.deliverygoodsid = %v)" +
 		"select t.relatedid," +
 		"       tmp.relatedno," +

+ 2 - 4
routers/router.go

@@ -435,10 +435,8 @@ func InitRouter() *gin.Engine {
 		ermcp3R.GET("/QryReportDaySpot", ermcp3.QryReportDaySpot)
 		ermcp3R.GET("/QryReportMonthSpot", ermcp3.QryReportMonthSpot)
 		ermcp3R.GET("/QryReportMonthSpotDetail", ermcp3.QryReportMonthSpotDetail)
-		ermcp3R.GET("/QryReckonAreaSpotPL", ermcp3.QryReckonAreaSpotPL)
-		ermcp3R.GET("/QryReportAreaSpotPL", ermcp3.QryReportAreaSpotPL)
-		ermcp3R.GET("/QryReckonAreaExpourse", ermcp3.QryReckonAreaExpourse)
-		ermcp3R.GET("/QryReportAreaExpourse", ermcp3.QryReportAreaExpourse)
+		ermcp3R.GET("/QryAreaSpotplReport", ermcp3.QryAreaSpotplReport)
+		ermcp3R.GET("/QryAreaExpourseReport", ermcp3.QryAreaExpourseReport)
 		ermcp3R.GET("/QryAreaExpourseContractDetail", ermcp3.QryAreaExpourseContractDetail)
 		ermcp3R.GET("/QryAreaExpourseHedgeplanDetail", ermcp3.QryAreaExpourseHedgeplanDetail)
 	}