瀏覽代碼

增加查询现货报表相关接口

zou.yingbin 4 年之前
父節點
當前提交
09c1c06c2a
共有 7 個文件被更改,包括 1128 次插入6 次删除
  1. 109 1
      controllers/ermcp/qryReport.go
  2. 325 1
      docs/docs.go
  3. 325 1
      docs/swagger.json
  4. 218 1
      docs/swagger.yaml
  5. 4 0
      models/ermcp.go
  6. 143 2
      models/ermcpReport.go
  7. 4 0
      routers/router.go

+ 109 - 1
controllers/ermcp/qryReport.go

@@ -9,7 +9,9 @@ package ermcp
 import (
 	"github.com/gin-gonic/gin"
 	"mtp2_if/global/app"
+	"mtp2_if/global/e"
 	"mtp2_if/models"
+	"net/http"
 )
 
 // 财务日报表请求
@@ -83,13 +85,14 @@ type QryReportMonthReq struct {
 	CycleTime string `form:"cycletime" binding:"required"` // 周期时间:月(格式:yyyyMM)
 }
 
+// 财务月报表应答
 type QryReportFinanceMonRsp models.ErmcpReportMonthFR
 
 // @Summary 查询财务月报表(菜单:报表查询/财务报表/月报表)
 // @Produce json
 // @Security ApiKeyAuth
 // @Param userid query int true "用户ID"
-// @Param cycletime query string true "交易日(格式:yyyyMMdd)"
+// @Param cycletime query string true "周期时间:月(格式:yyyyMM)"
 // @Success 200 {array} QryReportFinanceMonRsp
 // @Failure 500 {object} app.Response
 // @Router /Ermcp/QryReportMonthFinance [get]
@@ -121,3 +124,108 @@ func QryReportDayExposure(c *gin.Context) {
 	m := models.ErmcpReportDayExposure{AREAUSERID: req.UserId, RECKONDATE: req.TradeDate}
 	a.DoGetDataEx(&m)
 }
+
+// 现货日报表
+type QryReportSpotDayRsp models.ErmcpReportDaySpot
+
+// @Summary 查询现货日报表(菜单:报表查询/现货报表/现货日报表)
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Param tradedate query string true "交易日(格式:yyyyMMdd)"
+// @Success 200 {array} QryReportSpotDayRsp
+// @Failure 500 {object} app.Response
+// @Router /Ermcp/QryReportDaySpot [get]
+// @Tags 企业风险管理(app)
+func QryReportDaySpot(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := QryReportDayReq{}
+	a.DoBindReq(&req)
+	m := models.ErmcpReportDaySpot{AREAUSERID: req.UserId, RECKONDATE: req.TradeDate}
+	a.DoGetDataEx(&m)
+}
+
+// 现货日报表明细请求
+type QryReportDaySpotDetailReq struct {
+	UserId       int64  `form:"userid" binding:"required"`       //用户ID
+	Wrstandardid int64  `form:"wrstandardid" binding:"required"` // 现货商品id
+	TradeDate    string `form:"tradedate" binding:"required"`    // 交易日
+}
+
+// 现货日报表明细应答
+type QryReportDaySpotDetailRsp models.ErmcpReportOPLog
+
+// @Summary 查询现货日报表详情(菜单:报表查询/现货报表/现货日报表详情)
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Param wrstandardid query int true "现货商品id"
+// @Param tradedate query string true "交易日(格式:yyyyMMdd)"
+// @Success 200 {array} QryReportDaySpotDetailRsp
+// @Failure 500 {object} app.Response
+// @Router /Ermcp/QryReportDaySpotDetail [get]
+// @Tags 企业风险管理(app)
+func QryReportDaySpotDetail(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := QryReportDaySpotDetailReq{}
+	a.DoBindReq(&req)
+	m := models.ErmcpReportOPLog{USERID: req.UserId, WRSTANDARDID: req.Wrstandardid,
+		TRADEDATE: req.TradeDate, LogTypeFilter: "2,3"}
+	a.DoGetDataEx(&m)
+}
+
+// 现货月报表应答
+type QryReportSpotMonRsp models.ErmcpReportMonSpot
+
+// @Summary 查询现货月报表(菜单:报表查询/现货报表/现货月报表)
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Param cycletime query string true "周期时间:月(格式:yyyyMM)"
+// @Success 200 {array} QryReportSpotMonRsp
+// @Failure 500 {object} app.Response
+// @Router /Ermcp/QryReportMonthSpot [get]
+// @Tags 企业风险管理(app)
+func QryReportMonthSpot(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := QryReportMonthReq{}
+	a.DoBindReq(&req)
+	m := models.ErmcpReportMonSpot{AREAUSERID: req.UserId, CYCLETIME: req.CycleTime}
+	a.DoGetDataEx(&m)
+}
+
+// 现货月报表详情请求
+type QryReportSpotMonthDetailReq struct {
+	UserId       int64  `form:"userid" binding:"required"`       //用户ID
+	Wrstandardid int64  `form:"wrstandardid" binding:"required"` // 现货商品id
+	CycleTime    string `form:"cycletime" binding:"required"`    // 周期时间:月(格式:yyyyMM)
+}
+
+// 现货月报表详情应答
+type QryReportSpotMonthDetailRsp models.ErmcpReportDaySpot
+
+// @Summary 查询现货月报表详情(菜单:报表查询/现货月报表/现货月报表详情)
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Param wrstandardid query int true "现货商品id"
+// @Param cycletime query string true "周期时间:月(格式:yyyyMM)"
+// @Success 200 {array} QryReportSpotMonthDetailRsp
+// @Failure 500 {object} app.Response
+// @Router /Ermcp/QryReportMonthSpotDetail [get]
+// @Tags 企业风险管理(app)
+func QryReportMonthSpotDetail(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := QryReportSpotMonthDetailReq{}
+	a.DoBindReq(&req)
+	if len(req.CycleTime) != 6 {
+		// 月报表的日期应是6位,如 202101
+		a.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
+		return
+	}
+	t1 := req.CycleTime + "01"
+	t2 := req.CycleTime + "31"
+	m := models.ErmcpReportDaySpot{AREAUSERID: req.UserId, WRSTANDARDID: req.Wrstandardid,
+		BeginDate: t1, EndDate: t2}
+	a.DoGetDataEx(&m)
+}

+ 325 - 1
docs/docs.go

@@ -947,6 +947,111 @@ var doc = `{
                 }
             }
         },
+        "/Ermcp/QryReportDaySpot": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "企业风险管理(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/ermcp.QryReportSpotDayRsp"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Ermcp/QryReportDaySpotDetail": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "企业风险管理(app)"
+                ],
+                "summary": "查询现货日报表详情(菜单:报表查询/现货报表/现货日报表详情)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "现货商品id",
+                        "name": "wrstandardid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "交易日(格式:yyyyMMdd)",
+                        "name": "tradedate",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/ermcp.QryReportDaySpotDetailRsp"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Ermcp/QryReportMonthFinance": {
             "get": {
                 "security": [
@@ -971,7 +1076,7 @@ var doc = `{
                     },
                     {
                         "type": "string",
-                        "description": "交易日(格式:yyyyMMdd)",
+                        "description": "周期时间:月(格式:yyyyMM)",
                         "name": "cycletime",
                         "in": "query",
                         "required": true
@@ -996,6 +1101,111 @@ var doc = `{
                 }
             }
         },
+        "/Ermcp/QryReportMonthSpot": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "企业风险管理(app)"
+                ],
+                "summary": "查询现货月报表(菜单:报表查询/现货报表/现货月报表)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "周期时间:月(格式:yyyyMM)",
+                        "name": "cycletime",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/ermcp.QryReportSpotMonRsp"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Ermcp/QryReportMonthSpotDetail": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "企业风险管理(app)"
+                ],
+                "summary": "查询现货月报表详情(菜单:报表查询/现货月报表/现货月报表详情)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "现货商品id",
+                        "name": "wrstandardid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "周期时间:月(格式:yyyyMM)",
+                        "name": "cycletime",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/ermcp.QryReportSpotMonthDetailRsp"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Ermcp/QueryAvaildGoodsGroup": {
             "get": {
                 "security": [
@@ -7280,6 +7490,9 @@ var doc = `{
         "ermcp.QryOPLogRsp": {
             "$ref": "#/definitions/models.ErmcpOPLogModel"
         },
+        "ermcp.QryReportDaySpotDetailRsp": {
+            "$ref": "#/definitions/models.ErmcpReportOPLog"
+        },
         "ermcp.QryReportExposureDayRsp": {
             "$ref": "#/definitions/models.ErmcpReportDayExposure"
         },
@@ -7292,6 +7505,15 @@ var doc = `{
         "ermcp.QryReportFinanceMonRsp": {
             "$ref": "#/definitions/models.ErmcpReportMonthFR"
         },
+        "ermcp.QryReportSpotDayRsp": {
+            "$ref": "#/definitions/models.ErmcpReportDaySpot"
+        },
+        "ermcp.QryReportSpotMonRsp": {
+            "$ref": "#/definitions/models.ErmcpReportMonSpot"
+        },
+        "ermcp.QryReportSpotMonthDetailRsp": {
+            "$ref": "#/definitions/models.ErmcpReportDaySpot"
+        },
         "ermcp.QrySpotContractRsp": {
             "$ref": "#/definitions/models.ErmcpSpotContractModel"
         },
@@ -10088,6 +10310,10 @@ var doc = `{
                     "description": "点价商品ID",
                     "type": "integer"
                 },
+                "goodsname": {
+                    "description": "点价商品名称",
+                    "type": "string"
+                },
                 "invoiceamount": {
                     "description": "已开票额",
                     "type": "number"
@@ -10534,6 +10760,100 @@ var doc = `{
                 }
             }
         },
+        "models.ErmcpReportDaySpot": {
+            "type": "object",
+            "properties": {
+                "areauserid": {
+                    "description": "所属机构T",
+                    "type": "integer"
+                },
+                "enumdicname": {
+                    "description": "现货商品单位名称",
+                    "type": "string"
+                },
+                "reckondate": {
+                    "description": "日照时期(yyyyMMdd)",
+                    "type": "string"
+                },
+                "todaybuyreckonqty": {
+                    "description": "采购确定量",
+                    "type": "number"
+                },
+                "todaysellreckonqty": {
+                    "description": "销售确定量",
+                    "type": "number"
+                },
+                "totalbuypricedqty": {
+                    "description": "采购定价量 = 期末 - 期初",
+                    "type": "number"
+                },
+                "totalsellpricedqty": {
+                    "description": "销售定价量 = 期末 - 期初",
+                    "type": "number"
+                },
+                "wrstandardcode": {
+                    "description": "现货商品代码",
+                    "type": "string"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID",
+                    "type": "integer"
+                },
+                "wrstandardname": {
+                    "description": "现货商品名称",
+                    "type": "string"
+                }
+            }
+        },
+        "models.ErmcpReportMonSpot": {
+            "type": "object",
+            "properties": {
+                "areauserid": {
+                    "description": "所属机构T",
+                    "type": "integer"
+                },
+                "cycletime": {
+                    "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
+                    "type": "string"
+                },
+                "cycletype": {
+                    "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】",
+                    "type": "integer"
+                },
+                "enumdicname": {
+                    "description": "现货商品单位名称",
+                    "type": "string"
+                },
+                "todaybuyreckonqty": {
+                    "description": "采购确定量",
+                    "type": "number"
+                },
+                "todaysellreckonqty": {
+                    "description": "销售确定量",
+                    "type": "number"
+                },
+                "totalbuypricedqty": {
+                    "description": "采购定价量 = 期末 - 期初",
+                    "type": "number"
+                },
+                "totalsellpricedqty": {
+                    "description": "销售定价量 = 期末 - 期初",
+                    "type": "number"
+                },
+                "wrstandardcode": {
+                    "description": "现货商品代码",
+                    "type": "string"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID",
+                    "type": "integer"
+                },
+                "wrstandardname": {
+                    "description": "现货商品名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.ErmcpReportMonthFR": {
             "type": "object",
             "properties": {
@@ -10762,6 +11082,10 @@ var doc = `{
                     "description": "点价合约ID - 0:为现货,其它为期货商品合约ID [2:点价 3:暂定价]",
                     "type": "integer"
                 },
+                "goodsname": {
+                    "description": "点价商品名称",
+                    "type": "string"
+                },
                 "margin": {
                     "description": "当前保证金",
                     "type": "number"

+ 325 - 1
docs/swagger.json

@@ -931,6 +931,111 @@
                 }
             }
         },
+        "/Ermcp/QryReportDaySpot": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "企业风险管理(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/ermcp.QryReportSpotDayRsp"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Ermcp/QryReportDaySpotDetail": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "企业风险管理(app)"
+                ],
+                "summary": "查询现货日报表详情(菜单:报表查询/现货报表/现货日报表详情)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "现货商品id",
+                        "name": "wrstandardid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "交易日(格式:yyyyMMdd)",
+                        "name": "tradedate",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/ermcp.QryReportDaySpotDetailRsp"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Ermcp/QryReportMonthFinance": {
             "get": {
                 "security": [
@@ -955,7 +1060,7 @@
                     },
                     {
                         "type": "string",
-                        "description": "交易日(格式:yyyyMMdd)",
+                        "description": "周期时间:月(格式:yyyyMM)",
                         "name": "cycletime",
                         "in": "query",
                         "required": true
@@ -980,6 +1085,111 @@
                 }
             }
         },
+        "/Ermcp/QryReportMonthSpot": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "企业风险管理(app)"
+                ],
+                "summary": "查询现货月报表(菜单:报表查询/现货报表/现货月报表)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "周期时间:月(格式:yyyyMM)",
+                        "name": "cycletime",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/ermcp.QryReportSpotMonRsp"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Ermcp/QryReportMonthSpotDetail": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "企业风险管理(app)"
+                ],
+                "summary": "查询现货月报表详情(菜单:报表查询/现货月报表/现货月报表详情)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "现货商品id",
+                        "name": "wrstandardid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "周期时间:月(格式:yyyyMM)",
+                        "name": "cycletime",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/ermcp.QryReportSpotMonthDetailRsp"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Ermcp/QueryAvaildGoodsGroup": {
             "get": {
                 "security": [
@@ -7264,6 +7474,9 @@
         "ermcp.QryOPLogRsp": {
             "$ref": "#/definitions/models.ErmcpOPLogModel"
         },
+        "ermcp.QryReportDaySpotDetailRsp": {
+            "$ref": "#/definitions/models.ErmcpReportOPLog"
+        },
         "ermcp.QryReportExposureDayRsp": {
             "$ref": "#/definitions/models.ErmcpReportDayExposure"
         },
@@ -7276,6 +7489,15 @@
         "ermcp.QryReportFinanceMonRsp": {
             "$ref": "#/definitions/models.ErmcpReportMonthFR"
         },
+        "ermcp.QryReportSpotDayRsp": {
+            "$ref": "#/definitions/models.ErmcpReportDaySpot"
+        },
+        "ermcp.QryReportSpotMonRsp": {
+            "$ref": "#/definitions/models.ErmcpReportMonSpot"
+        },
+        "ermcp.QryReportSpotMonthDetailRsp": {
+            "$ref": "#/definitions/models.ErmcpReportDaySpot"
+        },
         "ermcp.QrySpotContractRsp": {
             "$ref": "#/definitions/models.ErmcpSpotContractModel"
         },
@@ -10072,6 +10294,10 @@
                     "description": "点价商品ID",
                     "type": "integer"
                 },
+                "goodsname": {
+                    "description": "点价商品名称",
+                    "type": "string"
+                },
                 "invoiceamount": {
                     "description": "已开票额",
                     "type": "number"
@@ -10518,6 +10744,100 @@
                 }
             }
         },
+        "models.ErmcpReportDaySpot": {
+            "type": "object",
+            "properties": {
+                "areauserid": {
+                    "description": "所属机构T",
+                    "type": "integer"
+                },
+                "enumdicname": {
+                    "description": "现货商品单位名称",
+                    "type": "string"
+                },
+                "reckondate": {
+                    "description": "日照时期(yyyyMMdd)",
+                    "type": "string"
+                },
+                "todaybuyreckonqty": {
+                    "description": "采购确定量",
+                    "type": "number"
+                },
+                "todaysellreckonqty": {
+                    "description": "销售确定量",
+                    "type": "number"
+                },
+                "totalbuypricedqty": {
+                    "description": "采购定价量 = 期末 - 期初",
+                    "type": "number"
+                },
+                "totalsellpricedqty": {
+                    "description": "销售定价量 = 期末 - 期初",
+                    "type": "number"
+                },
+                "wrstandardcode": {
+                    "description": "现货商品代码",
+                    "type": "string"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID",
+                    "type": "integer"
+                },
+                "wrstandardname": {
+                    "description": "现货商品名称",
+                    "type": "string"
+                }
+            }
+        },
+        "models.ErmcpReportMonSpot": {
+            "type": "object",
+            "properties": {
+                "areauserid": {
+                    "description": "所属机构T",
+                    "type": "integer"
+                },
+                "cycletime": {
+                    "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】",
+                    "type": "string"
+                },
+                "cycletype": {
+                    "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】",
+                    "type": "integer"
+                },
+                "enumdicname": {
+                    "description": "现货商品单位名称",
+                    "type": "string"
+                },
+                "todaybuyreckonqty": {
+                    "description": "采购确定量",
+                    "type": "number"
+                },
+                "todaysellreckonqty": {
+                    "description": "销售确定量",
+                    "type": "number"
+                },
+                "totalbuypricedqty": {
+                    "description": "采购定价量 = 期末 - 期初",
+                    "type": "number"
+                },
+                "totalsellpricedqty": {
+                    "description": "销售定价量 = 期末 - 期初",
+                    "type": "number"
+                },
+                "wrstandardcode": {
+                    "description": "现货商品代码",
+                    "type": "string"
+                },
+                "wrstandardid": {
+                    "description": "现货商品ID",
+                    "type": "integer"
+                },
+                "wrstandardname": {
+                    "description": "现货商品名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.ErmcpReportMonthFR": {
             "type": "object",
             "properties": {
@@ -10746,6 +11066,10 @@
                     "description": "点价合约ID - 0:为现货,其它为期货商品合约ID [2:点价 3:暂定价]",
                     "type": "integer"
                 },
+                "goodsname": {
+                    "description": "点价商品名称",
+                    "type": "string"
+                },
                 "margin": {
                     "description": "当前保证金",
                     "type": "number"

+ 218 - 1
docs/swagger.yaml

@@ -1229,6 +1229,8 @@ definitions:
     $ref: '#/definitions/models.ErmcpMiddleGoodsModel'
   ermcp.QryOPLogRsp:
     $ref: '#/definitions/models.ErmcpOPLogModel'
+  ermcp.QryReportDaySpotDetailRsp:
+    $ref: '#/definitions/models.ErmcpReportOPLog'
   ermcp.QryReportExposureDayRsp:
     $ref: '#/definitions/models.ErmcpReportDayExposure'
   ermcp.QryReportFinanceDayRsp:
@@ -1237,6 +1239,12 @@ definitions:
     $ref: '#/definitions/models.ErmcpReportOPLog'
   ermcp.QryReportFinanceMonRsp:
     $ref: '#/definitions/models.ErmcpReportMonthFR'
+  ermcp.QryReportSpotDayRsp:
+    $ref: '#/definitions/models.ErmcpReportDaySpot'
+  ermcp.QryReportSpotMonRsp:
+    $ref: '#/definitions/models.ErmcpReportMonSpot'
+  ermcp.QryReportSpotMonthDetailRsp:
+    $ref: '#/definitions/models.ErmcpReportDaySpot'
   ermcp.QrySpotContractRsp:
     $ref: '#/definitions/models.ErmcpSpotContractModel'
   ermcp.QryUserInfoRsp:
@@ -3306,6 +3314,9 @@ definitions:
       goodsid:
         description: 点价商品ID
         type: integer
+      goodsname:
+        description: 点价商品名称
+        type: string
       invoiceamount:
         description: 已开票额
         type: number
@@ -3637,6 +3648,75 @@ definitions:
         description: 更新时间
         type: string
     type: object
+  models.ErmcpReportDaySpot:
+    properties:
+      areauserid:
+        description: 所属机构T
+        type: integer
+      enumdicname:
+        description: 现货商品单位名称
+        type: string
+      reckondate:
+        description: 日照时期(yyyyMMdd)
+        type: string
+      todaybuyreckonqty:
+        description: 采购确定量
+        type: number
+      todaysellreckonqty:
+        description: 销售确定量
+        type: number
+      totalbuypricedqty:
+        description: 采购定价量 = 期末 - 期初
+        type: number
+      totalsellpricedqty:
+        description: 销售定价量 = 期末 - 期初
+        type: number
+      wrstandardcode:
+        description: 现货商品代码
+        type: string
+      wrstandardid:
+        description: 现货商品ID
+        type: integer
+      wrstandardname:
+        description: 现货商品名称
+        type: string
+    type: object
+  models.ErmcpReportMonSpot:
+    properties:
+      areauserid:
+        description: 所属机构T
+        type: integer
+      cycletime:
+        description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
+        type: string
+      cycletype:
+        description: 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
+        type: integer
+      enumdicname:
+        description: 现货商品单位名称
+        type: string
+      todaybuyreckonqty:
+        description: 采购确定量
+        type: number
+      todaysellreckonqty:
+        description: 销售确定量
+        type: number
+      totalbuypricedqty:
+        description: 采购定价量 = 期末 - 期初
+        type: number
+      totalsellpricedqty:
+        description: 销售定价量 = 期末 - 期初
+        type: number
+      wrstandardcode:
+        description: 现货商品代码
+        type: string
+      wrstandardid:
+        description: 现货商品ID
+        type: integer
+      wrstandardname:
+        description: 现货商品名称
+        type: string
+    type: object
   models.ErmcpReportMonthFR:
     properties:
       areauserid:
@@ -3806,6 +3886,9 @@ definitions:
       goodsid:
         description: 点价合约ID - 0:为现货,其它为期货商品合约ID [2:点价 3:暂定价]
         type: integer
+      goodsname:
+        description: 点价商品名称
+        type: string
       margin:
         description: 当前保证金
         type: number
@@ -8414,7 +8497,7 @@ paths:
       summary: 查询财务日报表款项(菜单:报表查询/财务报表/日报表/款项)
       tags:
       - 企业风险管理(app)
-  /Ermcp/QryReportMonthFinance:
+  /Ermcp/QryReportDaySpot:
     get:
       parameters:
       - description: 用户ID
@@ -8424,6 +8507,73 @@ paths:
         type: integer
       - description: 交易日(格式:yyyyMMdd)
         in: query
+        name: tradedate
+        required: true
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/ermcp.QryReportSpotDayRsp'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询现货日报表(菜单:报表查询/现货报表/现货日报表)
+      tags:
+      - 企业风险管理(app)
+  /Ermcp/QryReportDaySpotDetail:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 现货商品id
+        in: query
+        name: wrstandardid
+        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/ermcp.QryReportDaySpotDetailRsp'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询现货日报表详情(菜单:报表查询/现货报表/现货日报表详情)
+      tags:
+      - 企业风险管理(app)
+  /Ermcp/QryReportMonthFinance:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 周期时间:月(格式:yyyyMM)
+        in: query
         name: cycletime
         required: true
         type: string
@@ -8445,6 +8595,73 @@ paths:
       summary: 查询财务月报表(菜单:报表查询/财务报表/月报表)
       tags:
       - 企业风险管理(app)
+  /Ermcp/QryReportMonthSpot:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 周期时间:月(格式:yyyyMM)
+        in: query
+        name: cycletime
+        required: true
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/ermcp.QryReportSpotMonRsp'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询现货月报表(菜单:报表查询/现货报表/现货月报表)
+      tags:
+      - 企业风险管理(app)
+  /Ermcp/QryReportMonthSpotDetail:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 现货商品id
+        in: query
+        name: wrstandardid
+        required: true
+        type: integer
+      - description: 周期时间:月(格式:yyyyMM)
+        in: query
+        name: cycletime
+        required: true
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/ermcp.QryReportSpotMonthDetailRsp'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询现货月报表详情(菜单:报表查询/现货月报表/现货月报表详情)
+      tags:
+      - 企业风险管理(app)
   /Ermcp/QueryAvaildGoodsGroup:
     get:
       parameters:

+ 4 - 0
models/ermcp.go

@@ -39,6 +39,7 @@ type ErmcpSpotContractModel struct {
 	DELIVERYENDDATE   string  `json:"deliveryenddate"  xorm:"'DELIVERYENDDATE'"`     // 交收期(结束)
 	GOODSID           int32   `json:"goodsid"  xorm:"'GOODSID'"`                     // 点价合约ID - 0:为现货,其它为期货商品合约ID [2:点价 3:暂定价]
 	GOODSCODE         string  `json:"goodscode"  xorm:"'GOODSCODE'"`                 // 点价合约代码
+	GOODSNAME         string  `json:"goodsname"  xorm:"'GOODSNAME'"`                 // 点价商品名称
 	PRICEMOVE         float64 `json:"pricemove"  xorm:"'PRICEMOVE'"`                 // 升贴水 [2:点价 3:暂定价]
 	STARTDATE         string  `json:"startdate"  xorm:"'STARTDATE'"`                 // 点价开始日期 [2:点价 3:暂定价]
 	ENDDATE           string  `json:"enddate"  xorm:"'ENDDATE'"`                     // 点价结束日期 [2:点价 3:暂定价]
@@ -94,6 +95,7 @@ func (r *ErmcpSpotContractModel) buildSql(nQueryType int32) string {
 		"       g.deliverygoodscode," +
 		"       g.deliverygoodsname," +
 		"       g2.goodscode," +
+		"       g2.goodsname," +
 		"       gb.brandname," +
 		"       gm.modelname," +
 		"       e.Enumdicname" +
@@ -153,6 +155,7 @@ type ErmcpModel struct {
 	DeliveryGoodsName  string  `json:"deliverygoodsname"  xorm:"'DELIVERYGOODSNAME'"`   // 现货商品名称
 	SpotGoodsdesc      string  `json:"spotgoodsdesc"  xorm:"'SPOTGOODSDESC'"`           // 商品型号(商品规格)
 	GoodsId            int     `json:"goodsid"  xorm:"'GOODSID'"`                       // 点价商品ID
+	GOODSNAME          string  `json:"goodsname"  xorm:"'GOODSNAME'"`                   // 点价商品名称
 	Goodscode          string  `json:"goodscode"  xorm:"'GOODSCODE'"`                   // 点价商品代码
 	Pricemove          float64 `json:"pricemove"  xorm:"'PRICEMOVE'"`                   // 升贴水
 	Qty                float64 `json:"qty"  xorm:"'QTY'"`                               // 合同量
@@ -246,6 +249,7 @@ func (r *ErmcpModel) buildSql(nContractType, nQueryType int32) string {
 		"       g.deliverygoodscode," +
 		"       g.deliverygoodsname," +
 		"       g2.goodscode," +
+		"       g2.goodsname," +
 		"       e.enumdicname," +
 		"       t.contracttype," +
 		"       t.pricedamount," +

+ 143 - 2
models/ermcpReport.go

@@ -114,8 +114,9 @@ type ErmcpReportOPLog struct {
 func (r *ErmcpReportOPLog) Calc() {
 	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.UNITID)
 	r.APPLYNAME = mtpcache.GetUserNameByUserId(r.APPLYID)
-	sDes := []string{"点价价格", "点价数量", "结算量", "其它费用", "追加保证金", "溢短金额", "调整金额", "付款金额", "收款金额", "退款金额",
-		"收票金额", "开票金额", "提交审核(合同)", "审核通过(合同)", "审核拒绝(合同)", "合同撤回", "提交审核(计划)",
+	// 数据库注释与返回值映身关系: 结算量->确定量, 收款->收款金额, 退款->退款金额, 付款->付款金额, 收票->收票金额, 开票->开票金额
+	sDes := []string{"点价价格", "点价数量", "确定量", "其它费用", "追加保证金", "溢短金额", "调整金额", "付款", "收款", "退款",
+		"收票", "开票", "提交审核(合同)", "审核通过(合同)", "审核拒绝(合同)", "合同撤回", "提交审核(计划)",
 		"审核通过(计划)", "审核拒绝(计划)", "计划撤回", "正常完结(合同)", "异常终止(合同)", "退还保证金"}
 	if r.OPERATELOGTYPE >= 1 && r.OPERATELOGTYPE <= 23 {
 		r.OPTYPENAME = sDes[r.OPERATELOGTYPE-1]
@@ -173,6 +174,9 @@ func (r *ErmcpReportOPLog) buildSql() string {
 	sqlId = utils.SQLVal(fmt.Sprintf(sqlId.String(), r.USERID, r.USERID, r.USERID))
 	// 筛选条件
 	sqlId.And("t.TRADEDATE", r.TRADEDATE)
+	if r.WRSTANDARDID > 0 {
+		sqlId.And("t.WRSTANDARDID", r.WRSTANDARDID)
+	}
 	if r.LogTypeFilter != "" {
 		sqlId.Join(fmt.Sprintf(" and t.OPERATELOGTYPE in(%v)", r.LogTypeFilter))
 	}
@@ -348,3 +352,140 @@ func (r *ErmcpReportDayExposure) GetDataEx() (interface{}, error) {
 	}
 	return sData, err
 }
+
+// 现货日报表
+type ErmcpReportDaySpot struct {
+	BUYPRICEDQTY       float64 `json:"-"  xorm:"'BUYPRICEDQTY'"`                        // 期末采购定价量
+	SELLPRICEDQTY      float64 `json:"-"  xorm:"'SELLPRICEDQTY'"`                       // 期末销售定价量
+	ORIBUYPRICEDQTY    float64 `json:"-"  xorm:"'ORIBUYPRICEDQTY'"`                     // 期初采购定价量
+	ORISELLPRICEDQTY   float64 `json:"-"  xorm:"'ORISELLPRICEDQTY'"`                    // 期初销售定价量
+	TODAYBUYRECKONQTY  float64 `json:"todaybuyreckonqty"  xorm:"'TODAYBUYRECKONQTY'"`   // 采购确定量
+	TODAYSELLRECKONQTY float64 `json:"todaysellreckonqty"  xorm:"'TODAYSELLRECKONQTY'"` // 销售确定量
+	RECKONDATE         string  `json:"reckondate"  xorm:"'RECKONDATE'"`                 // 日照时期(yyyyMMdd)
+	WRSTANDARDID       int64   `json:"wrstandardid"  xorm:"'WRSTANDARDID'"`             // 现货商品ID
+	AREAUSERID         int64   `json:"areauserid"  xorm:"'AREAUSERID'"`                 // 所属机构T
+	WRSTANDARDNAME     string  `json:"wrstandardname"  xorm:"'WRSTANDARDNAME'"`         // 现货商品名称
+	WRSTANDARDCODE     string  `json:"wrstandardcode"  xorm:"'WRSTANDARDCODE'"`         // 现货商品代码
+	UNITID             int32   `json:"-"  xorm:"'UNITID'"`                              // 现货商品单位id
+
+	ENUMDICNAME        string  `json:"enumdicname"`        // 现货商品单位名称
+	TOTALBUYPRICEDQTY  float64 `json:"totalbuypricedqty"`  // 采购定价量 = 期末 - 期初
+	TOTALSELLPRICEDQTY float64 `json:"totalsellpricedqty"` // 销售定价量 = 期末 - 期初
+	BeginDate          string  `json:"-"`                  // 开始日期
+	EndDate            string  `json:"-"`                  // 结束日期
+}
+
+// 数据处理
+func (r *ErmcpReportDaySpot) Calc() {
+	r.TOTALBUYPRICEDQTY = r.BUYPRICEDQTY - r.ORIBUYPRICEDQTY
+	r.TOTALSELLPRICEDQTY = r.SELLPRICEDQTY - r.ORISELLPRICEDQTY
+	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.UNITID)
+}
+
+func (r *ErmcpReportDaySpot) buildSql() string {
+	var sqlId utils.SQLVal = "select t.BUYPRICEDQTY," +
+		"       t.SELLPRICEDQTY," +
+		"       t.Oribuypricedqty," +
+		"       t.Orisellpricedqty," +
+		"       t.TODAYBUYRECKONQTY," +
+		"       t.TODAYSELLRECKONQTY," +
+		"       t.RECKONDATE," +
+		"       t.WRSTANDARDID," +
+		"       t.AREAUSERID," +
+		"       w.wrstandardname," +
+		"       w.wrstandardcode," +
+		"       w.unitid" +
+		"  from RECKON_ERMCP_AREASPOT t" +
+		"  left join wrstandard w" +
+		"    on t.wrstandardid = w.wrstandardid" +
+		" where 1 = 1"
+	sqlId.And("t.AREAUSERID", r.AREAUSERID)
+	if r.WRSTANDARDID > 0 {
+		sqlId.And("t.WRSTANDARDID", r.WRSTANDARDID)
+	}
+	if r.RECKONDATE != "" {
+		sqlId.And("t.RECKONDATE", r.RECKONDATE)
+	} else if r.BeginDate != "" && r.BeginDate == r.EndDate {
+		sqlId.And("t.RECKONDATE", r.BeginDate)
+	} else {
+		if r.BeginDate != "" {
+			sqlId.BiggerOrEq("t.RECKONDATE", r.BeginDate)
+		}
+		if r.EndDate != "" {
+			sqlId.LessOrEq("t.RECKONDATE", r.EndDate)
+		}
+	}
+	sqlId.Join(" order by t.RECKONDATE")
+	return sqlId.String()
+}
+
+// 获取现货日报表
+func (r *ErmcpReportDaySpot) GetDataEx() (interface{}, error) {
+	sData := make([]ErmcpReportDaySpot, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].Calc()
+	}
+	return sData, err
+}
+
+// 现货月报表
+type ErmcpReportMonSpot struct {
+	CYCLETYPE          int32   `json:"cycletype"  xorm:"'cycletype'"`                   // 周期类型 - 1:月 2:季 3:年 4:周 5:全报表【原值】
+	CYCLETIME          string  `json:"cycletime"  xorm:"'cycletime'"`                   // 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
+	BUYPRICEDQTY       float64 `json:"-"  xorm:"'BUYPRICEDQTY'"`                        // 期末采购定价量
+	SELLPRICEDQTY      float64 `json:"-"  xorm:"'SELLPRICEDQTY'"`                       // 期末销售定价量
+	ORIBUYPRICEDQTY    float64 `json:"-"  xorm:"'ORIBUYPRICEDQTY'"`                     // 期初采购定价量
+	ORISELLPRICEDQTY   float64 `json:"-"  xorm:"'ORISELLPRICEDQTY'"`                    // 期初销售定价量
+	TODAYBUYRECKONQTY  float64 `json:"todaybuyreckonqty"  xorm:"'TODAYBUYRECKONQTY'"`   // 采购确定量
+	TODAYSELLRECKONQTY float64 `json:"todaysellreckonqty"  xorm:"'TODAYSELLRECKONQTY'"` // 销售确定量
+	WRSTANDARDID       int64   `json:"wrstandardid"  xorm:"'WRSTANDARDID'"`             // 现货商品ID
+	AREAUSERID         int64   `json:"areauserid"  xorm:"'AREAUSERID'"`                 // 所属机构T
+	WRSTANDARDNAME     string  `json:"wrstandardname"  xorm:"'WRSTANDARDNAME'"`         // 现货商品名称
+	WRSTANDARDCODE     string  `json:"wrstandardcode"  xorm:"'WRSTANDARDCODE'"`         // 现货商品代码
+	UNITID             int32   `json:"-"  xorm:"'UNITID'"`                              // 现货商品单位id
+
+	ENUMDICNAME        string  `json:"enumdicname"`        // 现货商品单位名称
+	TOTALBUYPRICEDQTY  float64 `json:"totalbuypricedqty"`  // 采购定价量 = 期末 - 期初
+	TOTALSELLPRICEDQTY float64 `json:"totalsellpricedqty"` // 销售定价量 = 期末 - 期初
+}
+
+// 数据处理
+func (r *ErmcpReportMonSpot) Calc() {
+	r.TOTALBUYPRICEDQTY = r.BUYPRICEDQTY - r.ORIBUYPRICEDQTY
+	r.TOTALSELLPRICEDQTY = r.SELLPRICEDQTY - r.ORISELLPRICEDQTY
+	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.UNITID)
+}
+
+func (r *ErmcpReportMonSpot) buildSql() string {
+	var sqlId utils.SQLVal = "select t.BUYPRICEDQTY," +
+		"       t.SELLPRICEDQTY," +
+		"       t.Oribuypricedqty," +
+		"       t.Orisellpricedqty," +
+		"       t.TODAYBUYRECKONQTY," +
+		"       t.TODAYSELLRECKONQTY," +
+		"       t.cycletype," +
+		"       t.cycletime," +
+		"       t.WRSTANDARDID," +
+		"       t.AREAUSERID," +
+		"       w.wrstandardname," +
+		"       w.wrstandardcode," +
+		"       w.unitid" +
+		"  from Report_ERMCP_AreaSpot t" +
+		"  left join wrstandard w" +
+		"    on t.wrstandardid = w.wrstandardid" +
+		" where t.cycletype = 1"
+	sqlId.And("t.AREAUSERID", r.AREAUSERID)
+	sqlId.And("t.cycletime", r.CYCLETIME)
+	return sqlId.String()
+}
+
+// 获取现货月报表
+func (r *ErmcpReportMonSpot) GetDataEx() (interface{}, error) {
+	sData := make([]ErmcpReportMonSpot, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].Calc()
+	}
+	return sData, err
+}

+ 4 - 0
routers/router.go

@@ -343,6 +343,10 @@ func InitRouter() *gin.Engine {
 		ermcpR.GET("/QryReportDayFinanceFp", ermcp.QryReportDayFinanceFp)
 		ermcpR.GET("/QryReportMonthFinance", ermcp.QryReportMonthFinance)
 		ermcpR.GET("/QryReportDayExposure", ermcp.QryReportDayExposure)
+		ermcpR.GET("/QryReportDaySpot", ermcp.QryReportDaySpot)
+		ermcpR.GET("/QryReportDaySpotDetail", ermcp.QryReportDaySpotDetail)
+		ermcpR.GET("/QryReportMonthSpot", ermcp.QryReportMonthSpot)
+		ermcpR.GET("/QryReportMonthSpotDetail", ermcp.QryReportMonthSpotDetail)
 	}
 
 	return r