ソースを参照

增加交易商结算单报表相关接口

zhou.xiaoning 2 年 前
コミット
891613bfc1
6 ファイル変更3961 行追加232 行削除
  1. 102 0
      controllers/report/report.go
  2. 1201 116
      docs/docs.go
  3. 1201 116
      docs/swagger.json
  4. 780 0
      docs/swagger.yaml
  5. 665 0
      models/report.go
  6. 12 0
      routers/router.go

+ 102 - 0
controllers/report/report.go

@@ -0,0 +1,102 @@
+package report
+
+import (
+	"mtp2_if/global/app"
+	"mtp2_if/models"
+
+	"github.com/gin-gonic/gin"
+)
+
+// QueryReportReckonDayTaaccount
+// @Summary  报表 - 交易商结算单 - 资金信息(日)
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    accountid  query    int    true  "资金账户"
+// @Param    reckondate query    string true "日照日期(yyyyMMdd)"
+// @Success  200        {array}  models.ReportReckondaytaaccount
+// @Failure  500          {object} app.Response
+// @Router   /Report/QueryReportReckonDayTaaccount [get]
+// @Tags     报表
+func QueryReportReckonDayTaaccount(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.ReportReckondaytaaccount{}
+	a.DoBindReq(&m)
+	a.DoGetDataEx(&m)
+}
+
+// QueryReportBankAccountOutInLog
+// @Summary  报表 - 交易商结算单 - 出入金明细
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    accountid  query    int    true  "资金账户"
+// @Param    tradedate  query    string true  "查询日期 日报表-yyyyMMdd 月报表-yyyyMM"
+// @Param    reporttype query    int    true  "报表类型 日报表-1 月报表-2"
+// @Param    page       query    int    false "页码"
+// @Param    pagesize   query    int    false "每页条数"
+// @Success  200        {array}  models.ReportBankAccountOutInLog
+// @Failure  500        {object} app.Response
+// @Router   /Report/QueryReportBankAccountOutInLog [get]
+// @Tags     报表
+func QueryReportBankAccountOutInLog(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.ReportBankAccountOutInLog{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}
+
+// QueryReportReckonDayPosition
+// @Summary  报表 - 交易商结算单 - 持仓汇总
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    accountid    query    int    true  "资金账户"
+// @Param    tradedate  query    string true  "查询日期 日报表-yyyyMMdd 月报表-yyyyMM"
+// @Param    reporttype query    int    true  "报表类型 日报表-1 月报表-2"
+// @Param    page       query    int    false "页码"
+// @Param    pagesize   query    int    false "每页条数"
+// @Success  200        {array}  models.ReportReckonDayPosition
+// @Failure  500        {object} app.Response
+// @Router   /Report/QueryReportReckonDayPosition [get]
+// @Tags     报表
+func QueryReportReckonDayPosition(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.ReportReckonDayPosition{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}
+
+// QueryReportTradeDetail
+// @Summary  报表 - 交易商结算单 - 成交明细
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    accountid  query    int    true "资金账户"
+// @Param    histradedate query    string true  "查询日期 日报表-yyyyMMdd 月报表-yyyyMM"
+// @Param    reporttype   query    int    true  "报表类型 日报表-1 月报表-2"
+// @Param    page         query    int    false "页码"
+// @Param    pagesize     query    int    false "每页条数"
+// @Success  200          {array}  models.ReportTradeDetail
+// @Failure  500        {object} app.Response
+// @Router   /Report/QueryReportTradeDetail [get]
+// @Tags     报表
+func QueryReportTradeDetail(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.ReportTradeDetail{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}
+
+// QueryReportMonthTaaccount
+// @Summary  报表 - 交易商结算单 - 资金信息(月)
+// @Produce  json
+// @Security ApiKeyAuth
+// @Param    accountid  query    int    true "资金账户"
+// @Param    reckondate query    string true "月份(yyyyMM)"
+// @Success  200        {array}  models.Reporttaaccount
+// @Failure  500        {object} app.Response
+// @Router   /Report/QueryReportMonthTaaccount [get]
+// @Tags     报表
+func QueryReportMonthTaaccount(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.Reporttaaccount{}
+	a.DoBindReq(&m)
+	a.DoGetDataEx(&m)
+}

+ 1201 - 116
docs/docs.go

@@ -17082,7 +17082,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/SZDZ/QueryConvertConfig": {
+        "/Report/QueryReportBankAccountOutInLog": {
             "get": {
                 "security": [
                     {
@@ -17093,26 +17093,41 @@ const docTemplate = `{
                     "application/json"
                 ],
                 "tags": [
-                    "定制【尚志大宗】"
+                    "报表"
                 ],
-                "summary": "查询交易系统转换设置",
+                "summary": "报表 - 交易商结算单 - 出入金明细",
                 "parameters": [
                     {
                         "type": "integer",
-                        "description": "转换类型 - 1:金点赞转交易 2:金点拍转交易 3:交易转金点赞(不设置) 4:交易转金点拍(不设置) 5:花生米转交易 6:交易转花生米(不设置)",
-                        "name": "convertType",
-                        "in": "query"
+                        "description": "资金账户",
+                        "name": "accountid",
+                        "in": "query",
+                        "required": true
                     },
                     {
                         "type": "string",
-                        "description": "外部商品代码[JD\\PD]",
-                        "name": "outerGoodsCode",
+                        "description": "查询日期 日报表-yyyyMMdd 月报表-yyyyMM",
+                        "name": "tradedate",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "报表类型 日报表-1 月报表-2",
+                        "name": "reporttype",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
                         "in": "query"
                     },
                     {
-                        "type": "string",
-                        "description": "内部商品ID列表[交易],格式:1,2,3",
-                        "name": "innerGoodsIDs",
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
                         "in": "query"
                     }
                 ],
@@ -17120,7 +17135,10 @@ const docTemplate = `{
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.Szdz3convertconfig"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.ReportBankAccountOutInLog"
+                            }
                         }
                     },
                     "500": {
@@ -17132,7 +17150,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/SZDZ/QueryConvertLog": {
+        "/Report/QueryReportMonthTaaccount": {
             "get": {
                 "security": [
                     {
@@ -17143,35 +17161,33 @@ const docTemplate = `{
                     "application/json"
                 ],
                 "tags": [
-                    "定制【尚志大宗】"
+                    "报表"
                 ],
-                "summary": "交易系统转换流水查询",
+                "summary": "报表 - 交易商结算单 - 资金信息(月)",
                 "parameters": [
                     {
-                        "type": "string",
-                        "description": "资金账户 - 格式:1,2,3",
-                        "name": "accountID",
+                        "type": "integer",
+                        "description": "资金账户",
+                        "name": "accountid",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "string",
-                        "description": "开始时间 - 闭区间,格式:yyyy-MM-dd HH:mm:ss",
-                        "name": "startDate",
-                        "in": "query"
-                    },
-                    {
-                        "type": "string",
-                        "description": "结束时间 - 闭区间,格式:yyyy-MM-dd HH:mm:ss",
-                        "name": "endDate",
-                        "in": "query"
+                        "description": "月份(yyyyMM)",
+                        "name": "reckondate",
+                        "in": "query",
+                        "required": true
                     }
                 ],
                 "responses": {
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/szdz.QueryConvertLogRsp"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Reporttaaccount"
+                            }
                         }
                     },
                     "500": {
@@ -17183,7 +17199,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/SZDZ/QueryGoodsPickup": {
+        "/Report/QueryReportReckonDayPosition": {
             "get": {
                 "security": [
                     {
@@ -17194,21 +17210,41 @@ const docTemplate = `{
                     "application/json"
                 ],
                 "tags": [
-                    "定制【尚志大宗】"
+                    "报表"
                 ],
-                "summary": "商品提货单查询",
+                "summary": "报表 - 交易商结算单 - 持仓汇总",
                 "parameters": [
                     {
+                        "type": "integer",
+                        "description": "资金账户",
+                        "name": "accountid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
                         "type": "string",
-                        "description": "资金账户 - 格式:1,2,3",
-                        "name": "accountID",
+                        "description": "查询日期 日报表-yyyyMMdd 月报表-yyyyMM",
+                        "name": "tradedate",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "integer",
-                        "description": "提货状态 - 1:待发货 2:已发货 3:已收货",
-                        "name": "takeOrderStatus",
+                        "description": "报表类型 日报表-1 月报表-2",
+                        "name": "reporttype",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
                         "in": "query"
                     }
                 ],
@@ -17216,7 +17252,10 @@ const docTemplate = `{
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/szdz.QueryGoodsPickupRsp"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.ReportReckonDayPosition"
+                            }
                         }
                     },
                     "500": {
@@ -17228,57 +17267,32 @@ const docTemplate = `{
                 }
             }
         },
-        "/SZDZ/QueryRecieptOrder": {
+        "/Report/QueryReportReckonDayTaaccount": {
             "get": {
                 "security": [
                     {
                         "ApiKeyAuth": []
                     }
                 ],
-                "description": "说明:pagesize参数赋值不为0时表示需要分页;page参数从0开始计算",
                 "produces": [
                     "application/json"
                 ],
                 "tags": [
-                    "定制【尚志大宗】"
+                    "报表"
                 ],
-                "summary": "点选挂牌委托单据查询(摘牌大厅)",
+                "summary": "报表 - 交易商结算单 - 资金信息(日)",
                 "parameters": [
                     {
                         "type": "integer",
-                        "description": "页码",
-                        "name": "page",
-                        "in": "query"
-                    },
-                    {
-                        "type": "integer",
-                        "description": "每页条数",
-                        "name": "pagesize",
-                        "in": "query"
-                    },
-                    {
-                        "type": "integer",
-                        "description": "商品ID",
-                        "name": "goodsID",
+                        "description": "资金账户",
+                        "name": "accountid",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "string",
-                        "description": "所属账户名称",
-                        "name": "accountName",
-                        "in": "query"
-                    },
-                    {
-                        "type": "integer",
-                        "description": "市场ID",
-                        "name": "marketID",
-                        "in": "query"
-                    },
-                    {
-                        "type": "integer",
-                        "description": "方向 - 0:买 1:卖",
-                        "name": "buyorsell",
+                        "description": "日照日期(yyyyMMdd)",
+                        "name": "reckondate",
                         "in": "query",
                         "required": true
                     }
@@ -17287,7 +17301,10 @@ const docTemplate = `{
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/szdz.QueryRecieptOrderRsp"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.ReportReckondaytaaccount"
+                            }
                         }
                     },
                     "500": {
@@ -17299,7 +17316,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/SZDZ/QuerySZDZTradePosition": {
+        "/Report/QueryReportTradeDetail": {
             "get": {
                 "security": [
                     {
@@ -17310,23 +17327,52 @@ const docTemplate = `{
                     "application/json"
                 ],
                 "tags": [
-                    "定制【尚志大宗】"
+                    "报表"
                 ],
-                "summary": "持仓汇总查询(尚志大宗)",
+                "summary": "报表 - 交易商结算单 - 成交明细",
                 "parameters": [
                     {
                         "type": "integer",
                         "description": "资金账户",
-                        "name": "accountID",
+                        "name": "accountid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "查询日期 日报表-yyyyMMdd 月报表-yyyyMM",
+                        "name": "histradedate",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "报表类型 日报表-1 月报表-2",
+                        "name": "reporttype",
                         "in": "query",
                         "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
                     }
                 ],
                 "responses": {
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/szdz.QuerySZDZTradePositionRsp"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.ReportTradeDetail"
+                            }
                         }
                     },
                     "500": {
@@ -17338,7 +17384,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/SZDZ/SearchWhite": {
+        "/SZDZ/QueryConvertConfig": {
             "get": {
                 "security": [
                     {
@@ -17351,21 +17397,32 @@ const docTemplate = `{
                 "tags": [
                     "定制【尚志大宗】"
                 ],
-                "summary": "搜索白名单",
+                "summary": "查询交易系统转换设置",
                 "parameters": [
                     {
                         "type": "integer",
-                        "description": "用户ID",
-                        "name": "userID",
-                        "in": "query",
-                        "required": true
+                        "description": "转换类型 - 1:金点赞转交易 2:金点拍转交易 3:交易转金点赞(不设置) 4:交易转金点拍(不设置) 5:花生米转交易 6:交易转花生米(不设置)",
+                        "name": "convertType",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "外部商品代码[JD\\PD]",
+                        "name": "outerGoodsCode",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "内部商品ID列表[交易],格式:1,2,3",
+                        "name": "innerGoodsIDs",
+                        "in": "query"
                     }
                 ],
                 "responses": {
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.Szdz3searchwhitelist"
+                            "$ref": "#/definitions/models.Szdz3convertconfig"
                         }
                     },
                     "500": {
@@ -17377,28 +17434,38 @@ const docTemplate = `{
                 }
             }
         },
-        "/Search/SearchGoodses": {
+        "/SZDZ/QueryConvertLog": {
             "get": {
-                "description": "说明:使用检索内容模糊匹配商品代码和商品名称",
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
                 "produces": [
                     "application/json"
                 ],
                 "tags": [
-                    "检索服务"
+                    "定制【尚志大宗】"
                 ],
-                "summary": "检索商品信息",
+                "summary": "交易系统转换流水查询",
                 "parameters": [
                     {
                         "type": "string",
-                        "description": "检索内容",
-                        "name": "content",
+                        "description": "资金账户 - 格式:1,2,3",
+                        "name": "accountID",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "string",
-                        "description": "交易模式,格式:1,2,3",
-                        "name": "tradeModes",
+                        "description": "开始时间 - 闭区间,格式:yyyy-MM-dd HH:mm:ss",
+                        "name": "startDate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "结束时间 - 闭区间,格式:yyyy-MM-dd HH:mm:ss",
+                        "name": "endDate",
                         "in": "query"
                     }
                 ],
@@ -17406,7 +17473,7 @@ const docTemplate = `{
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.SearchGoods"
+                            "$ref": "#/definitions/szdz.QueryConvertLogRsp"
                         }
                     },
                     "500": {
@@ -17418,7 +17485,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/TaAccount/GetTaAccounts": {
+        "/SZDZ/QueryGoodsPickup": {
             "get": {
                 "security": [
                     {
@@ -17429,21 +17496,21 @@ const docTemplate = `{
                     "application/json"
                 ],
                 "tags": [
-                    "资金账户"
+                    "定制【尚志大宗】"
                 ],
-                "summary": "获取资金账户信息",
+                "summary": "商品提货单查询",
                 "parameters": [
                     {
-                        "type": "integer",
-                        "description": "登录账户",
-                        "name": "loginID",
+                        "type": "string",
+                        "description": "资金账户 - 格式:1,2,3",
+                        "name": "accountID",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "integer",
-                        "description": "账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号",
-                        "name": "taAccountType",
+                        "description": "提货状态 - 1:待发货 2:已发货 3:已收货",
+                        "name": "takeOrderStatus",
                         "in": "query"
                     }
                 ],
@@ -17451,7 +17518,7 @@ const docTemplate = `{
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.Taaccount"
+                            "$ref": "#/definitions/szdz.QueryGoodsPickupRsp"
                         }
                     },
                     "500": {
@@ -17463,20 +17530,21 @@ const docTemplate = `{
                 }
             }
         },
-        "/TaAccount/QueryAmountLog": {
+        "/SZDZ/QueryRecieptOrder": {
             "get": {
                 "security": [
                     {
                         "ApiKeyAuth": []
                     }
                 ],
+                "description": "说明:pagesize参数赋值不为0时表示需要分页;page参数从0开始计算",
                 "produces": [
                     "application/json"
                 ],
                 "tags": [
-                    "资金账户"
+                    "定制【尚志大宗】"
                 ],
-                "summary": "资金流水查询(当前)",
+                "summary": "点选挂牌委托单据查询(摘牌大厅)",
                 "parameters": [
                     {
                         "type": "integer",
@@ -17492,26 +17560,260 @@ const docTemplate = `{
                     },
                     {
                         "type": "integer",
-                        "description": "分页标志 0-page从0开始 1-page从1开始",
-                        "name": "pageflag",
-                        "in": "query"
-                    },
-                    {
-                        "type": "string",
-                        "description": "资金账户 - 格式:1,2,3",
-                        "name": "accountID",
+                        "description": "商品ID",
+                        "name": "goodsID",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "string",
-                        "description": "资金操作类型 - 格式:1,2,3",
-                        "name": "OperateType",
+                        "description": "所属账户名称",
+                        "name": "accountName",
                         "in": "query"
-                    }
-                ],
-                "responses": {
-                    "200": {
+                    },
+                    {
+                        "type": "integer",
+                        "description": "市场ID",
+                        "name": "marketID",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "方向 - 0:买 1:卖",
+                        "name": "buyorsell",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/szdz.QueryRecieptOrderRsp"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/SZDZ/QuerySZDZTradePosition": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "定制【尚志大宗】"
+                ],
+                "summary": "持仓汇总查询(尚志大宗)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "资金账户",
+                        "name": "accountID",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/szdz.QuerySZDZTradePositionRsp"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/SZDZ/SearchWhite": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "定制【尚志大宗】"
+                ],
+                "summary": "搜索白名单",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userID",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/models.Szdz3searchwhitelist"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Search/SearchGoodses": {
+            "get": {
+                "description": "说明:使用检索内容模糊匹配商品代码和商品名称",
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "检索服务"
+                ],
+                "summary": "检索商品信息",
+                "parameters": [
+                    {
+                        "type": "string",
+                        "description": "检索内容",
+                        "name": "content",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "交易模式,格式:1,2,3",
+                        "name": "tradeModes",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/models.SearchGoods"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/TaAccount/GetTaAccounts": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "资金账户"
+                ],
+                "summary": "获取资金账户信息",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "登录账户",
+                        "name": "loginID",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号",
+                        "name": "taAccountType",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/models.Taaccount"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/TaAccount/QueryAmountLog": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "资金账户"
+                ],
+                "summary": "资金流水查询(当前)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "分页标志 0-page从0开始 1-page从1开始",
+                        "name": "pageflag",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "资金账户 - 格式:1,2,3",
+                        "name": "accountID",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "资金操作类型 - 格式:1,2,3",
+                        "name": "OperateType",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
                         "description": "OK",
                         "schema": {
                             "$ref": "#/definitions/taaccount.QueryAmountLogRsp"
@@ -48893,6 +49195,789 @@ const docTemplate = `{
                 }
             }
         },
+        "models.ReportBankAccountOutInLog": {
+            "type": "object",
+            "required": [
+                "accountId",
+                "reportType",
+                "tradedate"
+            ],
+            "properties": {
+                "accountId": {
+                    "description": "资金账户",
+                    "type": "integer"
+                },
+                "amount": {
+                    "description": "金额",
+                    "type": "number"
+                },
+                "applystatusdisplay": {
+                    "description": "申请状态",
+                    "type": "string"
+                },
+                "executetypedisplay": {
+                    "description": "申请类型",
+                    "type": "string"
+                },
+                "reportType": {
+                    "description": "报表类型 日报表-1 月报表-2",
+                    "type": "integer"
+                },
+                "tradedate": {
+                    "description": "查询日期 日报表-yyyyMMdd 月报表-yyyyMM",
+                    "type": "string"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                }
+            }
+        },
+        "models.ReportReckonDayPosition": {
+            "type": "object",
+            "required": [
+                "accountid",
+                "reckondate",
+                "reportType"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "账号Id",
+                    "type": "integer"
+                },
+                "avagepricedisplay": {
+                    "description": "均价",
+                    "type": "string"
+                },
+                "buyorselldisplay": {
+                    "description": "方向",
+                    "type": "string"
+                },
+                "curholderamount": {
+                    "description": "当前持仓总金额",
+                    "type": "number"
+                },
+                "curpositionqty": {
+                    "description": "当前持仓总数量",
+                    "type": "integer"
+                },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
+                "frozenqty": {
+                    "description": "持仓冻结",
+                    "type": "integer"
+                },
+                "goodsdisplay": {
+                    "description": "商品名称",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "商品Id",
+                    "type": "integer"
+                },
+                "reckondate": {
+                    "description": "日照日期(yyyyMMdd)",
+                    "type": "string"
+                },
+                "reportType": {
+                    "description": "报表类型 日报表-1 月报表-2",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.ReportReckondaytaaccount": {
+            "type": "object",
+            "required": [
+                "accountid",
+                "reckondate"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账户ID",
+                    "type": "integer"
+                },
+                "accountname": {
+                    "description": "账户名称",
+                    "type": "string"
+                },
+                "accountpl": {
+                    "description": "今日账户盈亏 = 今日净值-昨日净值+今日出金-今日入金-今日划转+今日授信减少-今日授信增加+今日其它授信减少-今日其它授信增加+今日三方出金-今日三方入金;由统计服务更新",
+                    "type": "number"
+                },
+                "avaiablemoney": {
+                    "description": "可用资金",
+                    "type": "number"
+                },
+                "avaiableoutmoney": {
+                    "description": "可出资金",
+                    "type": "number"
+                },
+                "balance": {
+                    "description": "期初余额",
+                    "type": "number"
+                },
+                "capitalbalance": {
+                    "description": "本金余额[外部子账户实际出入金余额]",
+                    "type": "number"
+                },
+                "changeflag": {
+                    "description": "变动标志(当前账户资金有任何变动更新为1系统结算时更新0;供清算时使用) 0:无变动 1:有变动",
+                    "type": "integer"
+                },
+                "clearbalance": {
+                    "description": "清算余额 = 期末余额 - 授信金额 - 其它授信金额",
+                    "type": "number"
+                },
+                "clearpl": {
+                    "description": "真实资金变动值(除出入金、应付交易所手续费)清算盈亏 = 期末余额 - 期初余额 - (今日入金 + 今日出金) - 今日应付交易所手续费 - 【(今日授信增加 + 今日授信减少) - (今日其它授信增加 + 今日其它授信减少) ----母账户】                 = 今日手续费支出 + 今日平仓盈亏 + 今日结算盈亏 + 其他支出 + 其他收入 + 今日划转金额 + 今日已收手续费分成 - 今日应付交易所手续费",
+                    "type": "number"
+                },
+                "closepl": {
+                    "description": "今日平仓盈亏",
+                    "type": "number"
+                },
+                "closepl2": {
+                    "description": "平仓盈亏(逐笔)",
+                    "type": "number"
+                },
+                "creditdecrease": {
+                    "description": "今日授信减少",
+                    "type": "number"
+                },
+                "creditincrease": {
+                    "description": "今日授信增加",
+                    "type": "number"
+                },
+                "curdebt": {
+                    "description": "期末欠款",
+                    "type": "number"
+                },
+                "currencyid": {
+                    "description": "货币ID",
+                    "type": "integer"
+                },
+                "currentbalance": {
+                    "description": "期末余额",
+                    "type": "number"
+                },
+                "defercharge": {
+                    "description": "今日递延费2支出[111, 112]",
+                    "type": "number"
+                },
+                "deliveryamountin": {
+                    "description": "今日交收货款收入",
+                    "type": "number"
+                },
+                "deliveryamountout": {
+                    "description": "今日交收货款支出",
+                    "type": "number"
+                },
+                "deliverycharge": {
+                    "description": "今日交收手续费支出 [105,106]",
+                    "type": "number"
+                },
+                "deliverycompensationfeein": {
+                    "description": "今日交收补偿费收入",
+                    "type": "number"
+                },
+                "deliverycompensationfeeout": {
+                    "description": "今日交收补偿费支出",
+                    "type": "number"
+                },
+                "dividedcharge": {
+                    "description": "今日已收手续费分成",
+                    "type": "number"
+                },
+                "floatnetvalue": {
+                    "description": "浮动净值 = 净值 + 浮动盈亏",
+                    "type": "number"
+                },
+                "floatpl": {
+                    "description": "浮动盈亏 - 每日有负债类商品",
+                    "type": "number"
+                },
+                "freezecharge": {
+                    "description": "手续费冻结",
+                    "type": "number"
+                },
+                "freezemargin": {
+                    "description": "冻结保证金",
+                    "type": "number"
+                },
+                "fromaccountid": {
+                    "description": "所属上级账户",
+                    "type": "integer"
+                },
+                "holdcharge": {
+                    "description": "今日持仓过夜费支出[108,109,110]",
+                    "type": "number"
+                },
+                "inamount": {
+                    "description": "今日入金金额",
+                    "type": "number"
+                },
+                "interestcharge": {
+                    "description": "今日递延费支出[103, 104]",
+                    "type": "number"
+                },
+                "ismain": {
+                    "description": "是否账号 0:不是母账户 1:是母账户",
+                    "type": "integer"
+                },
+                "ismarketaccount": {
+                    "description": "是否机构接单账号 0:不是 1:是",
+                    "type": "integer"
+                },
+                "isreckonaccount": {
+                    "description": "是否机构分润账号 0:不是 1:是",
+                    "type": "integer"
+                },
+                "mortgagecredit": {
+                    "description": "授信金额",
+                    "type": "number"
+                },
+                "netvalue": {
+                    "description": "净值  = 期末余额 + 所有权市值 + 仓单市值仓单市值由统计服务更新",
+                    "type": "number"
+                },
+                "oridebt": {
+                    "description": "期初欠款",
+                    "type": "number"
+                },
+                "orifreezecharge": {
+                    "description": "期初手续费冻结",
+                    "type": "number"
+                },
+                "orifreezemargin": {
+                    "description": "期初冻结保证金",
+                    "type": "number"
+                },
+                "orimortgagecredit": {
+                    "description": "期初授信金额",
+                    "type": "number"
+                },
+                "oriothercredit": {
+                    "description": "期初其它授信金额",
+                    "type": "number"
+                },
+                "oriotherfreezemargin": {
+                    "description": "期初其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)",
+                    "type": "number"
+                },
+                "orioutamountfreeze": {
+                    "description": "期初出金冻结",
+                    "type": "number"
+                },
+                "oriusedmargin": {
+                    "description": "期初占用保证金",
+                    "type": "number"
+                },
+                "othercredit": {
+                    "description": "其它授信金额",
+                    "type": "number"
+                },
+                "othercreditdecrease": {
+                    "description": "今日其它授信减少",
+                    "type": "number"
+                },
+                "othercreditincrease": {
+                    "description": "今日其它授信增加",
+                    "type": "number"
+                },
+                "otherfreezemargin": {
+                    "description": "其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)",
+                    "type": "number"
+                },
+                "otherincome": {
+                    "description": "其他收入(交割收款 申购收款 全款卖出 商城卖出 买家退货 会员手续费收入)",
+                    "type": "number"
+                },
+                "otherpay": {
+                    "description": "其他支出(交割付款 申购付款 全款买入 商城买入 卖家退货)",
+                    "type": "number"
+                },
+                "outamount": {
+                    "description": "今日出金金额",
+                    "type": "number"
+                },
+                "outamountfreeze": {
+                    "description": "出金冻结",
+                    "type": "number"
+                },
+                "outthreshold": {
+                    "description": "出金阈值",
+                    "type": "number"
+                },
+                "ownershipvalue": {
+                    "description": "所有权市值",
+                    "type": "number"
+                },
+                "parentaccountid": {
+                    "description": "所属根账户",
+                    "type": "integer"
+                },
+                "password": {
+                    "description": "资金密码",
+                    "type": "string"
+                },
+                "paycharge": {
+                    "description": "今日手续费支出",
+                    "type": "number"
+                },
+                "paycharge2": {
+                    "description": "今日手续费支出(外部配置)",
+                    "type": "number"
+                },
+                "payexchcharge": {
+                    "description": "今日应付交易所手续费",
+                    "type": "number"
+                },
+                "reckondate": {
+                    "description": "日照日期(yyyyMMdd)",
+                    "type": "string"
+                },
+                "reckonpl": {
+                    "description": "今日结算盈亏",
+                    "type": "number"
+                },
+                "reckonpl2": {
+                    "description": "结算盈亏(逐笔)  - 汇总取期末",
+                    "type": "number"
+                },
+                "relatedaccountstatus": {
+                    "description": "关联用户交易状态 - 1:正常(可交易) 2:受限(可平仓,不可建仓) 3:冻结(不可交易)",
+                    "type": "integer"
+                },
+                "relateuserid": {
+                    "description": "关联用户",
+                    "type": "integer"
+                },
+                "riskrate": {
+                    "description": "风险率 = 占用/ 浮动净值 或  浮动净值/占用",
+                    "type": "number"
+                },
+                "signstatus": {
+                    "description": "签约状态 - 1:未签约  2:已签约  3:已解约",
+                    "type": "integer"
+                },
+                "spotvalue": {
+                    "description": "现货市值-统计服务更新",
+                    "type": "number"
+                },
+                "sublevelpath": {
+                    "description": "账号层级路径(逗号分隔,首尾加逗号)",
+                    "type": "string"
+                },
+                "taaccounttype": {
+                    "description": "外部/内部账号 - 1:外部账号 2:内部账号",
+                    "type": "integer"
+                },
+                "thirdinamount": {
+                    "description": "今日三方入金",
+                    "type": "number"
+                },
+                "thirdoutamount": {
+                    "description": "今日三方出金",
+                    "type": "number"
+                },
+                "tradeamount": {
+                    "description": "今日成交金额",
+                    "type": "number"
+                },
+                "tradecharge": {
+                    "description": "今日交易手续费支出 [101,102]",
+                    "type": "number"
+                },
+                "tradeqty": {
+                    "description": "今日成交量",
+                    "type": "integer"
+                },
+                "tradestatus": {
+                    "description": "交易状态 - 1:正常 2:受限 3:冻结 4:禁止建仓(人工受限) 5:禁止交易(人工冻结)",
+                    "type": "integer"
+                },
+                "transferamount": {
+                    "description": "今日划转金额(母子账号资金划转,从账号划入为正,从账号划出为负)",
+                    "type": "number"
+                },
+                "usedmargin": {
+                    "description": "占用保证金",
+                    "type": "number"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.ReportTradeDetail": {
+            "type": "object",
+            "required": [
+                "histradedate",
+                "reportType"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账户",
+                    "type": "integer"
+                },
+                "buyorselldisplay": {
+                    "description": "类型/方向",
+                    "type": "string"
+                },
+                "charge": {
+                    "description": "服务费",
+                    "type": "number"
+                },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
+                "goodsdisplay": {
+                    "description": "商品",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "期货合约ID(自增ID SEQ_GOODS)",
+                    "type": "integer"
+                },
+                "histradedate": {
+                    "description": "查询日期 日报表-yyyyMMdd 月报表-yyyyMM",
+                    "type": "string"
+                },
+                "reportType": {
+                    "description": "报表类型 日报表-1 月报表-2",
+                    "type": "integer"
+                },
+                "tradeamount": {
+                    "description": "成交金额",
+                    "type": "number"
+                },
+                "tradeid": {
+                    "description": "成交单号",
+                    "type": "string"
+                },
+                "tradeprice": {
+                    "description": "价格",
+                    "type": "number"
+                },
+                "tradeqty": {
+                    "description": "数量",
+                    "type": "integer"
+                },
+                "tradetime": {
+                    "description": "时间",
+                    "type": "string"
+                }
+            }
+        },
+        "models.Reporttaaccount": {
+            "type": "object",
+            "required": [
+                "accountid",
+                "cycletime"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账户ID",
+                    "type": "integer"
+                },
+                "accountname": {
+                    "description": "账户名称",
+                    "type": "string"
+                },
+                "accountpl": {
+                    "description": "今日账户盈亏 = 今日净值-昨日净值+今日出金-今日入金-今日划转+今日授信减少-今日授信增加+今日其它授信减少-今日其它授信增加+今日三方出金-今日三方入金;由统计服务更新",
+                    "type": "number"
+                },
+                "avaiablemoney": {
+                    "description": "可用资金【期末】",
+                    "type": "number"
+                },
+                "avaiableoutmoney": {
+                    "description": "可出资金【期末】",
+                    "type": "number"
+                },
+                "balance": {
+                    "description": "期初余额",
+                    "type": "number"
+                },
+                "capitalbalance": {
+                    "description": "本周期本金余额[外部子账户实际出入金余额]",
+                    "type": "number"
+                },
+                "clearbalance": {
+                    "description": "清算余额 = 期末余额 - 授信金额 - 其它授信金额",
+                    "type": "number"
+                },
+                "clearpl": {
+                    "description": "清算盈亏",
+                    "type": "number"
+                },
+                "closepl": {
+                    "description": "本周期平仓盈亏",
+                    "type": "number"
+                },
+                "closepl2": {
+                    "description": "平仓盈亏(逐笔)",
+                    "type": "number"
+                },
+                "creditdecrease": {
+                    "description": "本周期授信减少",
+                    "type": "number"
+                },
+                "creditincrease": {
+                    "description": "本周期授信增加",
+                    "type": "number"
+                },
+                "curdebt": {
+                    "description": "期末欠款【期末】",
+                    "type": "number"
+                },
+                "currencyid": {
+                    "description": "货币ID",
+                    "type": "integer"
+                },
+                "currentbalance": {
+                    "description": "期末余额",
+                    "type": "number"
+                },
+                "cycletime": {
+                    "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)",
+                    "type": "string"
+                },
+                "cycletype": {
+                    "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表",
+                    "type": "integer"
+                },
+                "defercharge": {
+                    "description": "本周期递延费2支出[111, 112]",
+                    "type": "number"
+                },
+                "deliveryamountin": {
+                    "description": "本周期交收货款收入",
+                    "type": "number"
+                },
+                "deliveryamountout": {
+                    "description": "本周期交收货款支出",
+                    "type": "number"
+                },
+                "deliverycharge": {
+                    "description": "本周期交收手续费支出 [105,106]",
+                    "type": "number"
+                },
+                "deliverycompensationfeein": {
+                    "description": "本周期交收补偿费收入",
+                    "type": "number"
+                },
+                "deliverycompensationfeeout": {
+                    "description": "本周期交收补偿费支出",
+                    "type": "number"
+                },
+                "dividedcharge": {
+                    "description": "本周期已收手续费分成",
+                    "type": "number"
+                },
+                "floatnetvalue": {
+                    "description": "浮动净值【期末】",
+                    "type": "number"
+                },
+                "floatpl": {
+                    "description": "浮动盈亏【期末】",
+                    "type": "number"
+                },
+                "freezecharge": {
+                    "description": "手续费冻结",
+                    "type": "number"
+                },
+                "freezemargin": {
+                    "description": "冻结保证金",
+                    "type": "number"
+                },
+                "fromaccountid": {
+                    "description": "所属上级账户",
+                    "type": "integer"
+                },
+                "holdcharge": {
+                    "description": "本周期持仓过夜费支出[108,109, 110]",
+                    "type": "number"
+                },
+                "inamount": {
+                    "description": "本周期入金金额",
+                    "type": "number"
+                },
+                "interestcharge": {
+                    "description": "本周期递延费支出[103, 104]",
+                    "type": "number"
+                },
+                "ismain": {
+                    "description": "是否母账号 0:不是母账户 1:是母账户",
+                    "type": "integer"
+                },
+                "mortgagecredit": {
+                    "description": "授信金额",
+                    "type": "number"
+                },
+                "netvalue": {
+                    "description": "净值  = 期末余额 + 所有权市值",
+                    "type": "number"
+                },
+                "oridebt": {
+                    "description": "期初欠款【期初】",
+                    "type": "number"
+                },
+                "orifreezecharge": {
+                    "description": "期初手续费冻结",
+                    "type": "number"
+                },
+                "orifreezemargin": {
+                    "description": "期初冻结保证金",
+                    "type": "number"
+                },
+                "orimortgagecredit": {
+                    "description": "期初授信金额",
+                    "type": "number"
+                },
+                "oriothercredit": {
+                    "description": "期初其它授信金额",
+                    "type": "number"
+                },
+                "oriotherfreezemargin": {
+                    "description": "期初其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)",
+                    "type": "number"
+                },
+                "orioutamountfreeze": {
+                    "description": "期初出金冻结",
+                    "type": "number"
+                },
+                "oriusedmargin": {
+                    "description": "期初占用保证金",
+                    "type": "number"
+                },
+                "othercredit": {
+                    "description": "其它授信金额",
+                    "type": "number"
+                },
+                "othercreditdecrease": {
+                    "description": "本周期其它授信减少",
+                    "type": "number"
+                },
+                "othercreditincrease": {
+                    "description": "本周期其它授信增加",
+                    "type": "number"
+                },
+                "otherfreezemargin": {
+                    "description": "其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)",
+                    "type": "number"
+                },
+                "otherincome": {
+                    "description": "其他收入(交割收款 申购收款 全款卖出 商城卖出 买家退货 会员手续费收入)",
+                    "type": "number"
+                },
+                "otherpay": {
+                    "description": "其他支出(交割付款 申购付款 全款买入 商城买入 卖家退货)",
+                    "type": "number"
+                },
+                "outamount": {
+                    "description": "本周期出金金额",
+                    "type": "number"
+                },
+                "outamountfreeze": {
+                    "description": "出金冻结",
+                    "type": "number"
+                },
+                "outthreshold": {
+                    "description": "出金阈值",
+                    "type": "number"
+                },
+                "ownershipvalue": {
+                    "description": "所有权市值",
+                    "type": "number"
+                },
+                "parentaccountid": {
+                    "description": "所属根账户",
+                    "type": "integer"
+                },
+                "paycharge": {
+                    "description": "本周期手续费支出",
+                    "type": "number"
+                },
+                "paycharge2": {
+                    "description": "今日手续费支出(外部配置)",
+                    "type": "number"
+                },
+                "payexchcharge": {
+                    "description": "本周期应付交易所手续费",
+                    "type": "number"
+                },
+                "reckonpl": {
+                    "description": "本周期结算盈亏",
+                    "type": "number"
+                },
+                "reckonpl2": {
+                    "description": "结算盈亏(逐笔) - 汇总取期末",
+                    "type": "number"
+                },
+                "relateuserid": {
+                    "description": "关联用户",
+                    "type": "integer"
+                },
+                "riskrate": {
+                    "description": "风险率【期末】",
+                    "type": "number"
+                },
+                "spotvalue": {
+                    "description": "现货市值-统计服务更新",
+                    "type": "number"
+                },
+                "sublevelpath": {
+                    "description": "账号层级路径(逗号分隔,首尾加逗号)",
+                    "type": "string"
+                },
+                "taaccounttype": {
+                    "description": "外部/内部账号 - 1:外部账号 2:内部账号",
+                    "type": "integer"
+                },
+                "thirdinamount": {
+                    "description": "本周期三方入金",
+                    "type": "number"
+                },
+                "thirdoutamount": {
+                    "description": "本周期三方出金",
+                    "type": "number"
+                },
+                "tradeamount": {
+                    "description": "本周期成交金额",
+                    "type": "number"
+                },
+                "tradecharge": {
+                    "description": "本周期交易手续费支出 [101,102]",
+                    "type": "number"
+                },
+                "tradeqty": {
+                    "description": "本周期成交量",
+                    "type": "integer"
+                },
+                "transferamount": {
+                    "description": "本周期划转金额(母子账号资金划转,从账号划入为正,从账号划出为负)",
+                    "type": "number"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                },
+                "usedmargin": {
+                    "description": "占用保证金",
+                    "type": "number"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
         "models.RoleMenu": {
             "type": "object",
             "properties": {

+ 1201 - 116
docs/swagger.json

@@ -17073,7 +17073,7 @@
                 }
             }
         },
-        "/SZDZ/QueryConvertConfig": {
+        "/Report/QueryReportBankAccountOutInLog": {
             "get": {
                 "security": [
                     {
@@ -17084,26 +17084,41 @@
                     "application/json"
                 ],
                 "tags": [
-                    "定制【尚志大宗】"
+                    "报表"
                 ],
-                "summary": "查询交易系统转换设置",
+                "summary": "报表 - 交易商结算单 - 出入金明细",
                 "parameters": [
                     {
                         "type": "integer",
-                        "description": "转换类型 - 1:金点赞转交易 2:金点拍转交易 3:交易转金点赞(不设置) 4:交易转金点拍(不设置) 5:花生米转交易 6:交易转花生米(不设置)",
-                        "name": "convertType",
-                        "in": "query"
+                        "description": "资金账户",
+                        "name": "accountid",
+                        "in": "query",
+                        "required": true
                     },
                     {
                         "type": "string",
-                        "description": "外部商品代码[JD\\PD]",
-                        "name": "outerGoodsCode",
+                        "description": "查询日期 日报表-yyyyMMdd 月报表-yyyyMM",
+                        "name": "tradedate",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "报表类型 日报表-1 月报表-2",
+                        "name": "reporttype",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
                         "in": "query"
                     },
                     {
-                        "type": "string",
-                        "description": "内部商品ID列表[交易],格式:1,2,3",
-                        "name": "innerGoodsIDs",
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
                         "in": "query"
                     }
                 ],
@@ -17111,7 +17126,10 @@
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.Szdz3convertconfig"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.ReportBankAccountOutInLog"
+                            }
                         }
                     },
                     "500": {
@@ -17123,7 +17141,7 @@
                 }
             }
         },
-        "/SZDZ/QueryConvertLog": {
+        "/Report/QueryReportMonthTaaccount": {
             "get": {
                 "security": [
                     {
@@ -17134,35 +17152,33 @@
                     "application/json"
                 ],
                 "tags": [
-                    "定制【尚志大宗】"
+                    "报表"
                 ],
-                "summary": "交易系统转换流水查询",
+                "summary": "报表 - 交易商结算单 - 资金信息(月)",
                 "parameters": [
                     {
-                        "type": "string",
-                        "description": "资金账户 - 格式:1,2,3",
-                        "name": "accountID",
+                        "type": "integer",
+                        "description": "资金账户",
+                        "name": "accountid",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "string",
-                        "description": "开始时间 - 闭区间,格式:yyyy-MM-dd HH:mm:ss",
-                        "name": "startDate",
-                        "in": "query"
-                    },
-                    {
-                        "type": "string",
-                        "description": "结束时间 - 闭区间,格式:yyyy-MM-dd HH:mm:ss",
-                        "name": "endDate",
-                        "in": "query"
+                        "description": "月份(yyyyMM)",
+                        "name": "reckondate",
+                        "in": "query",
+                        "required": true
                     }
                 ],
                 "responses": {
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/szdz.QueryConvertLogRsp"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.Reporttaaccount"
+                            }
                         }
                     },
                     "500": {
@@ -17174,7 +17190,7 @@
                 }
             }
         },
-        "/SZDZ/QueryGoodsPickup": {
+        "/Report/QueryReportReckonDayPosition": {
             "get": {
                 "security": [
                     {
@@ -17185,21 +17201,41 @@
                     "application/json"
                 ],
                 "tags": [
-                    "定制【尚志大宗】"
+                    "报表"
                 ],
-                "summary": "商品提货单查询",
+                "summary": "报表 - 交易商结算单 - 持仓汇总",
                 "parameters": [
                     {
+                        "type": "integer",
+                        "description": "资金账户",
+                        "name": "accountid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
                         "type": "string",
-                        "description": "资金账户 - 格式:1,2,3",
-                        "name": "accountID",
+                        "description": "查询日期 日报表-yyyyMMdd 月报表-yyyyMM",
+                        "name": "tradedate",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "integer",
-                        "description": "提货状态 - 1:待发货 2:已发货 3:已收货",
-                        "name": "takeOrderStatus",
+                        "description": "报表类型 日报表-1 月报表-2",
+                        "name": "reporttype",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
                         "in": "query"
                     }
                 ],
@@ -17207,7 +17243,10 @@
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/szdz.QueryGoodsPickupRsp"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.ReportReckonDayPosition"
+                            }
                         }
                     },
                     "500": {
@@ -17219,57 +17258,32 @@
                 }
             }
         },
-        "/SZDZ/QueryRecieptOrder": {
+        "/Report/QueryReportReckonDayTaaccount": {
             "get": {
                 "security": [
                     {
                         "ApiKeyAuth": []
                     }
                 ],
-                "description": "说明:pagesize参数赋值不为0时表示需要分页;page参数从0开始计算",
                 "produces": [
                     "application/json"
                 ],
                 "tags": [
-                    "定制【尚志大宗】"
+                    "报表"
                 ],
-                "summary": "点选挂牌委托单据查询(摘牌大厅)",
+                "summary": "报表 - 交易商结算单 - 资金信息(日)",
                 "parameters": [
                     {
                         "type": "integer",
-                        "description": "页码",
-                        "name": "page",
-                        "in": "query"
-                    },
-                    {
-                        "type": "integer",
-                        "description": "每页条数",
-                        "name": "pagesize",
-                        "in": "query"
-                    },
-                    {
-                        "type": "integer",
-                        "description": "商品ID",
-                        "name": "goodsID",
+                        "description": "资金账户",
+                        "name": "accountid",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "string",
-                        "description": "所属账户名称",
-                        "name": "accountName",
-                        "in": "query"
-                    },
-                    {
-                        "type": "integer",
-                        "description": "市场ID",
-                        "name": "marketID",
-                        "in": "query"
-                    },
-                    {
-                        "type": "integer",
-                        "description": "方向 - 0:买 1:卖",
-                        "name": "buyorsell",
+                        "description": "日照日期(yyyyMMdd)",
+                        "name": "reckondate",
                         "in": "query",
                         "required": true
                     }
@@ -17278,7 +17292,10 @@
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/szdz.QueryRecieptOrderRsp"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.ReportReckondaytaaccount"
+                            }
                         }
                     },
                     "500": {
@@ -17290,7 +17307,7 @@
                 }
             }
         },
-        "/SZDZ/QuerySZDZTradePosition": {
+        "/Report/QueryReportTradeDetail": {
             "get": {
                 "security": [
                     {
@@ -17301,23 +17318,52 @@
                     "application/json"
                 ],
                 "tags": [
-                    "定制【尚志大宗】"
+                    "报表"
                 ],
-                "summary": "持仓汇总查询(尚志大宗)",
+                "summary": "报表 - 交易商结算单 - 成交明细",
                 "parameters": [
                     {
                         "type": "integer",
                         "description": "资金账户",
-                        "name": "accountID",
+                        "name": "accountid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "查询日期 日报表-yyyyMMdd 月报表-yyyyMM",
+                        "name": "histradedate",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "报表类型 日报表-1 月报表-2",
+                        "name": "reporttype",
                         "in": "query",
                         "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
                     }
                 ],
                 "responses": {
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/szdz.QuerySZDZTradePositionRsp"
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.ReportTradeDetail"
+                            }
                         }
                     },
                     "500": {
@@ -17329,7 +17375,7 @@
                 }
             }
         },
-        "/SZDZ/SearchWhite": {
+        "/SZDZ/QueryConvertConfig": {
             "get": {
                 "security": [
                     {
@@ -17342,21 +17388,32 @@
                 "tags": [
                     "定制【尚志大宗】"
                 ],
-                "summary": "搜索白名单",
+                "summary": "查询交易系统转换设置",
                 "parameters": [
                     {
                         "type": "integer",
-                        "description": "用户ID",
-                        "name": "userID",
-                        "in": "query",
-                        "required": true
+                        "description": "转换类型 - 1:金点赞转交易 2:金点拍转交易 3:交易转金点赞(不设置) 4:交易转金点拍(不设置) 5:花生米转交易 6:交易转花生米(不设置)",
+                        "name": "convertType",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "外部商品代码[JD\\PD]",
+                        "name": "outerGoodsCode",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "内部商品ID列表[交易],格式:1,2,3",
+                        "name": "innerGoodsIDs",
+                        "in": "query"
                     }
                 ],
                 "responses": {
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.Szdz3searchwhitelist"
+                            "$ref": "#/definitions/models.Szdz3convertconfig"
                         }
                     },
                     "500": {
@@ -17368,28 +17425,38 @@
                 }
             }
         },
-        "/Search/SearchGoodses": {
+        "/SZDZ/QueryConvertLog": {
             "get": {
-                "description": "说明:使用检索内容模糊匹配商品代码和商品名称",
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
                 "produces": [
                     "application/json"
                 ],
                 "tags": [
-                    "检索服务"
+                    "定制【尚志大宗】"
                 ],
-                "summary": "检索商品信息",
+                "summary": "交易系统转换流水查询",
                 "parameters": [
                     {
                         "type": "string",
-                        "description": "检索内容",
-                        "name": "content",
+                        "description": "资金账户 - 格式:1,2,3",
+                        "name": "accountID",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "string",
-                        "description": "交易模式,格式:1,2,3",
-                        "name": "tradeModes",
+                        "description": "开始时间 - 闭区间,格式:yyyy-MM-dd HH:mm:ss",
+                        "name": "startDate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "结束时间 - 闭区间,格式:yyyy-MM-dd HH:mm:ss",
+                        "name": "endDate",
                         "in": "query"
                     }
                 ],
@@ -17397,7 +17464,7 @@
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.SearchGoods"
+                            "$ref": "#/definitions/szdz.QueryConvertLogRsp"
                         }
                     },
                     "500": {
@@ -17409,7 +17476,7 @@
                 }
             }
         },
-        "/TaAccount/GetTaAccounts": {
+        "/SZDZ/QueryGoodsPickup": {
             "get": {
                 "security": [
                     {
@@ -17420,21 +17487,21 @@
                     "application/json"
                 ],
                 "tags": [
-                    "资金账户"
+                    "定制【尚志大宗】"
                 ],
-                "summary": "获取资金账户信息",
+                "summary": "商品提货单查询",
                 "parameters": [
                     {
-                        "type": "integer",
-                        "description": "登录账户",
-                        "name": "loginID",
+                        "type": "string",
+                        "description": "资金账户 - 格式:1,2,3",
+                        "name": "accountID",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "integer",
-                        "description": "账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号",
-                        "name": "taAccountType",
+                        "description": "提货状态 - 1:待发货 2:已发货 3:已收货",
+                        "name": "takeOrderStatus",
                         "in": "query"
                     }
                 ],
@@ -17442,7 +17509,7 @@
                     "200": {
                         "description": "OK",
                         "schema": {
-                            "$ref": "#/definitions/models.Taaccount"
+                            "$ref": "#/definitions/szdz.QueryGoodsPickupRsp"
                         }
                     },
                     "500": {
@@ -17454,20 +17521,21 @@
                 }
             }
         },
-        "/TaAccount/QueryAmountLog": {
+        "/SZDZ/QueryRecieptOrder": {
             "get": {
                 "security": [
                     {
                         "ApiKeyAuth": []
                     }
                 ],
+                "description": "说明:pagesize参数赋值不为0时表示需要分页;page参数从0开始计算",
                 "produces": [
                     "application/json"
                 ],
                 "tags": [
-                    "资金账户"
+                    "定制【尚志大宗】"
                 ],
-                "summary": "资金流水查询(当前)",
+                "summary": "点选挂牌委托单据查询(摘牌大厅)",
                 "parameters": [
                     {
                         "type": "integer",
@@ -17483,26 +17551,260 @@
                     },
                     {
                         "type": "integer",
-                        "description": "分页标志 0-page从0开始 1-page从1开始",
-                        "name": "pageflag",
-                        "in": "query"
-                    },
-                    {
-                        "type": "string",
-                        "description": "资金账户 - 格式:1,2,3",
-                        "name": "accountID",
+                        "description": "商品ID",
+                        "name": "goodsID",
                         "in": "query",
                         "required": true
                     },
                     {
                         "type": "string",
-                        "description": "资金操作类型 - 格式:1,2,3",
-                        "name": "OperateType",
+                        "description": "所属账户名称",
+                        "name": "accountName",
                         "in": "query"
-                    }
-                ],
-                "responses": {
-                    "200": {
+                    },
+                    {
+                        "type": "integer",
+                        "description": "市场ID",
+                        "name": "marketID",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "方向 - 0:买 1:卖",
+                        "name": "buyorsell",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/szdz.QueryRecieptOrderRsp"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/SZDZ/QuerySZDZTradePosition": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "定制【尚志大宗】"
+                ],
+                "summary": "持仓汇总查询(尚志大宗)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "资金账户",
+                        "name": "accountID",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/szdz.QuerySZDZTradePositionRsp"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/SZDZ/SearchWhite": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "定制【尚志大宗】"
+                ],
+                "summary": "搜索白名单",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userID",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/models.Szdz3searchwhitelist"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Search/SearchGoodses": {
+            "get": {
+                "description": "说明:使用检索内容模糊匹配商品代码和商品名称",
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "检索服务"
+                ],
+                "summary": "检索商品信息",
+                "parameters": [
+                    {
+                        "type": "string",
+                        "description": "检索内容",
+                        "name": "content",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "交易模式,格式:1,2,3",
+                        "name": "tradeModes",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/models.SearchGoods"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/TaAccount/GetTaAccounts": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "资金账户"
+                ],
+                "summary": "获取资金账户信息",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "登录账户",
+                        "name": "loginID",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号",
+                        "name": "taAccountType",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/models.Taaccount"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/TaAccount/QueryAmountLog": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "资金账户"
+                ],
+                "summary": "资金流水查询(当前)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "页码",
+                        "name": "page",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "每页条数",
+                        "name": "pagesize",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "分页标志 0-page从0开始 1-page从1开始",
+                        "name": "pageflag",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "资金账户 - 格式:1,2,3",
+                        "name": "accountID",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "资金操作类型 - 格式:1,2,3",
+                        "name": "OperateType",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
                         "description": "OK",
                         "schema": {
                             "$ref": "#/definitions/taaccount.QueryAmountLogRsp"
@@ -48884,6 +49186,789 @@
                 }
             }
         },
+        "models.ReportBankAccountOutInLog": {
+            "type": "object",
+            "required": [
+                "accountId",
+                "reportType",
+                "tradedate"
+            ],
+            "properties": {
+                "accountId": {
+                    "description": "资金账户",
+                    "type": "integer"
+                },
+                "amount": {
+                    "description": "金额",
+                    "type": "number"
+                },
+                "applystatusdisplay": {
+                    "description": "申请状态",
+                    "type": "string"
+                },
+                "executetypedisplay": {
+                    "description": "申请类型",
+                    "type": "string"
+                },
+                "reportType": {
+                    "description": "报表类型 日报表-1 月报表-2",
+                    "type": "integer"
+                },
+                "tradedate": {
+                    "description": "查询日期 日报表-yyyyMMdd 月报表-yyyyMM",
+                    "type": "string"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                }
+            }
+        },
+        "models.ReportReckonDayPosition": {
+            "type": "object",
+            "required": [
+                "accountid",
+                "reckondate",
+                "reportType"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "账号Id",
+                    "type": "integer"
+                },
+                "avagepricedisplay": {
+                    "description": "均价",
+                    "type": "string"
+                },
+                "buyorselldisplay": {
+                    "description": "方向",
+                    "type": "string"
+                },
+                "curholderamount": {
+                    "description": "当前持仓总金额",
+                    "type": "number"
+                },
+                "curpositionqty": {
+                    "description": "当前持仓总数量",
+                    "type": "integer"
+                },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
+                "frozenqty": {
+                    "description": "持仓冻结",
+                    "type": "integer"
+                },
+                "goodsdisplay": {
+                    "description": "商品名称",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "商品Id",
+                    "type": "integer"
+                },
+                "reckondate": {
+                    "description": "日照日期(yyyyMMdd)",
+                    "type": "string"
+                },
+                "reportType": {
+                    "description": "报表类型 日报表-1 月报表-2",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.ReportReckondaytaaccount": {
+            "type": "object",
+            "required": [
+                "accountid",
+                "reckondate"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账户ID",
+                    "type": "integer"
+                },
+                "accountname": {
+                    "description": "账户名称",
+                    "type": "string"
+                },
+                "accountpl": {
+                    "description": "今日账户盈亏 = 今日净值-昨日净值+今日出金-今日入金-今日划转+今日授信减少-今日授信增加+今日其它授信减少-今日其它授信增加+今日三方出金-今日三方入金;由统计服务更新",
+                    "type": "number"
+                },
+                "avaiablemoney": {
+                    "description": "可用资金",
+                    "type": "number"
+                },
+                "avaiableoutmoney": {
+                    "description": "可出资金",
+                    "type": "number"
+                },
+                "balance": {
+                    "description": "期初余额",
+                    "type": "number"
+                },
+                "capitalbalance": {
+                    "description": "本金余额[外部子账户实际出入金余额]",
+                    "type": "number"
+                },
+                "changeflag": {
+                    "description": "变动标志(当前账户资金有任何变动更新为1系统结算时更新0;供清算时使用) 0:无变动 1:有变动",
+                    "type": "integer"
+                },
+                "clearbalance": {
+                    "description": "清算余额 = 期末余额 - 授信金额 - 其它授信金额",
+                    "type": "number"
+                },
+                "clearpl": {
+                    "description": "真实资金变动值(除出入金、应付交易所手续费)清算盈亏 = 期末余额 - 期初余额 - (今日入金 + 今日出金) - 今日应付交易所手续费 - 【(今日授信增加 + 今日授信减少) - (今日其它授信增加 + 今日其它授信减少) ----母账户】                 = 今日手续费支出 + 今日平仓盈亏 + 今日结算盈亏 + 其他支出 + 其他收入 + 今日划转金额 + 今日已收手续费分成 - 今日应付交易所手续费",
+                    "type": "number"
+                },
+                "closepl": {
+                    "description": "今日平仓盈亏",
+                    "type": "number"
+                },
+                "closepl2": {
+                    "description": "平仓盈亏(逐笔)",
+                    "type": "number"
+                },
+                "creditdecrease": {
+                    "description": "今日授信减少",
+                    "type": "number"
+                },
+                "creditincrease": {
+                    "description": "今日授信增加",
+                    "type": "number"
+                },
+                "curdebt": {
+                    "description": "期末欠款",
+                    "type": "number"
+                },
+                "currencyid": {
+                    "description": "货币ID",
+                    "type": "integer"
+                },
+                "currentbalance": {
+                    "description": "期末余额",
+                    "type": "number"
+                },
+                "defercharge": {
+                    "description": "今日递延费2支出[111, 112]",
+                    "type": "number"
+                },
+                "deliveryamountin": {
+                    "description": "今日交收货款收入",
+                    "type": "number"
+                },
+                "deliveryamountout": {
+                    "description": "今日交收货款支出",
+                    "type": "number"
+                },
+                "deliverycharge": {
+                    "description": "今日交收手续费支出 [105,106]",
+                    "type": "number"
+                },
+                "deliverycompensationfeein": {
+                    "description": "今日交收补偿费收入",
+                    "type": "number"
+                },
+                "deliverycompensationfeeout": {
+                    "description": "今日交收补偿费支出",
+                    "type": "number"
+                },
+                "dividedcharge": {
+                    "description": "今日已收手续费分成",
+                    "type": "number"
+                },
+                "floatnetvalue": {
+                    "description": "浮动净值 = 净值 + 浮动盈亏",
+                    "type": "number"
+                },
+                "floatpl": {
+                    "description": "浮动盈亏 - 每日有负债类商品",
+                    "type": "number"
+                },
+                "freezecharge": {
+                    "description": "手续费冻结",
+                    "type": "number"
+                },
+                "freezemargin": {
+                    "description": "冻结保证金",
+                    "type": "number"
+                },
+                "fromaccountid": {
+                    "description": "所属上级账户",
+                    "type": "integer"
+                },
+                "holdcharge": {
+                    "description": "今日持仓过夜费支出[108,109,110]",
+                    "type": "number"
+                },
+                "inamount": {
+                    "description": "今日入金金额",
+                    "type": "number"
+                },
+                "interestcharge": {
+                    "description": "今日递延费支出[103, 104]",
+                    "type": "number"
+                },
+                "ismain": {
+                    "description": "是否账号 0:不是母账户 1:是母账户",
+                    "type": "integer"
+                },
+                "ismarketaccount": {
+                    "description": "是否机构接单账号 0:不是 1:是",
+                    "type": "integer"
+                },
+                "isreckonaccount": {
+                    "description": "是否机构分润账号 0:不是 1:是",
+                    "type": "integer"
+                },
+                "mortgagecredit": {
+                    "description": "授信金额",
+                    "type": "number"
+                },
+                "netvalue": {
+                    "description": "净值  = 期末余额 + 所有权市值 + 仓单市值仓单市值由统计服务更新",
+                    "type": "number"
+                },
+                "oridebt": {
+                    "description": "期初欠款",
+                    "type": "number"
+                },
+                "orifreezecharge": {
+                    "description": "期初手续费冻结",
+                    "type": "number"
+                },
+                "orifreezemargin": {
+                    "description": "期初冻结保证金",
+                    "type": "number"
+                },
+                "orimortgagecredit": {
+                    "description": "期初授信金额",
+                    "type": "number"
+                },
+                "oriothercredit": {
+                    "description": "期初其它授信金额",
+                    "type": "number"
+                },
+                "oriotherfreezemargin": {
+                    "description": "期初其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)",
+                    "type": "number"
+                },
+                "orioutamountfreeze": {
+                    "description": "期初出金冻结",
+                    "type": "number"
+                },
+                "oriusedmargin": {
+                    "description": "期初占用保证金",
+                    "type": "number"
+                },
+                "othercredit": {
+                    "description": "其它授信金额",
+                    "type": "number"
+                },
+                "othercreditdecrease": {
+                    "description": "今日其它授信减少",
+                    "type": "number"
+                },
+                "othercreditincrease": {
+                    "description": "今日其它授信增加",
+                    "type": "number"
+                },
+                "otherfreezemargin": {
+                    "description": "其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)",
+                    "type": "number"
+                },
+                "otherincome": {
+                    "description": "其他收入(交割收款 申购收款 全款卖出 商城卖出 买家退货 会员手续费收入)",
+                    "type": "number"
+                },
+                "otherpay": {
+                    "description": "其他支出(交割付款 申购付款 全款买入 商城买入 卖家退货)",
+                    "type": "number"
+                },
+                "outamount": {
+                    "description": "今日出金金额",
+                    "type": "number"
+                },
+                "outamountfreeze": {
+                    "description": "出金冻结",
+                    "type": "number"
+                },
+                "outthreshold": {
+                    "description": "出金阈值",
+                    "type": "number"
+                },
+                "ownershipvalue": {
+                    "description": "所有权市值",
+                    "type": "number"
+                },
+                "parentaccountid": {
+                    "description": "所属根账户",
+                    "type": "integer"
+                },
+                "password": {
+                    "description": "资金密码",
+                    "type": "string"
+                },
+                "paycharge": {
+                    "description": "今日手续费支出",
+                    "type": "number"
+                },
+                "paycharge2": {
+                    "description": "今日手续费支出(外部配置)",
+                    "type": "number"
+                },
+                "payexchcharge": {
+                    "description": "今日应付交易所手续费",
+                    "type": "number"
+                },
+                "reckondate": {
+                    "description": "日照日期(yyyyMMdd)",
+                    "type": "string"
+                },
+                "reckonpl": {
+                    "description": "今日结算盈亏",
+                    "type": "number"
+                },
+                "reckonpl2": {
+                    "description": "结算盈亏(逐笔)  - 汇总取期末",
+                    "type": "number"
+                },
+                "relatedaccountstatus": {
+                    "description": "关联用户交易状态 - 1:正常(可交易) 2:受限(可平仓,不可建仓) 3:冻结(不可交易)",
+                    "type": "integer"
+                },
+                "relateuserid": {
+                    "description": "关联用户",
+                    "type": "integer"
+                },
+                "riskrate": {
+                    "description": "风险率 = 占用/ 浮动净值 或  浮动净值/占用",
+                    "type": "number"
+                },
+                "signstatus": {
+                    "description": "签约状态 - 1:未签约  2:已签约  3:已解约",
+                    "type": "integer"
+                },
+                "spotvalue": {
+                    "description": "现货市值-统计服务更新",
+                    "type": "number"
+                },
+                "sublevelpath": {
+                    "description": "账号层级路径(逗号分隔,首尾加逗号)",
+                    "type": "string"
+                },
+                "taaccounttype": {
+                    "description": "外部/内部账号 - 1:外部账号 2:内部账号",
+                    "type": "integer"
+                },
+                "thirdinamount": {
+                    "description": "今日三方入金",
+                    "type": "number"
+                },
+                "thirdoutamount": {
+                    "description": "今日三方出金",
+                    "type": "number"
+                },
+                "tradeamount": {
+                    "description": "今日成交金额",
+                    "type": "number"
+                },
+                "tradecharge": {
+                    "description": "今日交易手续费支出 [101,102]",
+                    "type": "number"
+                },
+                "tradeqty": {
+                    "description": "今日成交量",
+                    "type": "integer"
+                },
+                "tradestatus": {
+                    "description": "交易状态 - 1:正常 2:受限 3:冻结 4:禁止建仓(人工受限) 5:禁止交易(人工冻结)",
+                    "type": "integer"
+                },
+                "transferamount": {
+                    "description": "今日划转金额(母子账号资金划转,从账号划入为正,从账号划出为负)",
+                    "type": "number"
+                },
+                "usedmargin": {
+                    "description": "占用保证金",
+                    "type": "number"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "models.ReportTradeDetail": {
+            "type": "object",
+            "required": [
+                "histradedate",
+                "reportType"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账户",
+                    "type": "integer"
+                },
+                "buyorselldisplay": {
+                    "description": "类型/方向",
+                    "type": "string"
+                },
+                "charge": {
+                    "description": "服务费",
+                    "type": "number"
+                },
+                "decimalplace": {
+                    "description": "报价小数位",
+                    "type": "integer"
+                },
+                "goodsdisplay": {
+                    "description": "商品",
+                    "type": "string"
+                },
+                "goodsid": {
+                    "description": "期货合约ID(自增ID SEQ_GOODS)",
+                    "type": "integer"
+                },
+                "histradedate": {
+                    "description": "查询日期 日报表-yyyyMMdd 月报表-yyyyMM",
+                    "type": "string"
+                },
+                "reportType": {
+                    "description": "报表类型 日报表-1 月报表-2",
+                    "type": "integer"
+                },
+                "tradeamount": {
+                    "description": "成交金额",
+                    "type": "number"
+                },
+                "tradeid": {
+                    "description": "成交单号",
+                    "type": "string"
+                },
+                "tradeprice": {
+                    "description": "价格",
+                    "type": "number"
+                },
+                "tradeqty": {
+                    "description": "数量",
+                    "type": "integer"
+                },
+                "tradetime": {
+                    "description": "时间",
+                    "type": "string"
+                }
+            }
+        },
+        "models.Reporttaaccount": {
+            "type": "object",
+            "required": [
+                "accountid",
+                "cycletime"
+            ],
+            "properties": {
+                "accountid": {
+                    "description": "资金账户ID",
+                    "type": "integer"
+                },
+                "accountname": {
+                    "description": "账户名称",
+                    "type": "string"
+                },
+                "accountpl": {
+                    "description": "今日账户盈亏 = 今日净值-昨日净值+今日出金-今日入金-今日划转+今日授信减少-今日授信增加+今日其它授信减少-今日其它授信增加+今日三方出金-今日三方入金;由统计服务更新",
+                    "type": "number"
+                },
+                "avaiablemoney": {
+                    "description": "可用资金【期末】",
+                    "type": "number"
+                },
+                "avaiableoutmoney": {
+                    "description": "可出资金【期末】",
+                    "type": "number"
+                },
+                "balance": {
+                    "description": "期初余额",
+                    "type": "number"
+                },
+                "capitalbalance": {
+                    "description": "本周期本金余额[外部子账户实际出入金余额]",
+                    "type": "number"
+                },
+                "clearbalance": {
+                    "description": "清算余额 = 期末余额 - 授信金额 - 其它授信金额",
+                    "type": "number"
+                },
+                "clearpl": {
+                    "description": "清算盈亏",
+                    "type": "number"
+                },
+                "closepl": {
+                    "description": "本周期平仓盈亏",
+                    "type": "number"
+                },
+                "closepl2": {
+                    "description": "平仓盈亏(逐笔)",
+                    "type": "number"
+                },
+                "creditdecrease": {
+                    "description": "本周期授信减少",
+                    "type": "number"
+                },
+                "creditincrease": {
+                    "description": "本周期授信增加",
+                    "type": "number"
+                },
+                "curdebt": {
+                    "description": "期末欠款【期末】",
+                    "type": "number"
+                },
+                "currencyid": {
+                    "description": "货币ID",
+                    "type": "integer"
+                },
+                "currentbalance": {
+                    "description": "期末余额",
+                    "type": "number"
+                },
+                "cycletime": {
+                    "description": "周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)",
+                    "type": "string"
+                },
+                "cycletype": {
+                    "description": "周期类型 - 1:月 2:季 3:年 4:周 5:全报表",
+                    "type": "integer"
+                },
+                "defercharge": {
+                    "description": "本周期递延费2支出[111, 112]",
+                    "type": "number"
+                },
+                "deliveryamountin": {
+                    "description": "本周期交收货款收入",
+                    "type": "number"
+                },
+                "deliveryamountout": {
+                    "description": "本周期交收货款支出",
+                    "type": "number"
+                },
+                "deliverycharge": {
+                    "description": "本周期交收手续费支出 [105,106]",
+                    "type": "number"
+                },
+                "deliverycompensationfeein": {
+                    "description": "本周期交收补偿费收入",
+                    "type": "number"
+                },
+                "deliverycompensationfeeout": {
+                    "description": "本周期交收补偿费支出",
+                    "type": "number"
+                },
+                "dividedcharge": {
+                    "description": "本周期已收手续费分成",
+                    "type": "number"
+                },
+                "floatnetvalue": {
+                    "description": "浮动净值【期末】",
+                    "type": "number"
+                },
+                "floatpl": {
+                    "description": "浮动盈亏【期末】",
+                    "type": "number"
+                },
+                "freezecharge": {
+                    "description": "手续费冻结",
+                    "type": "number"
+                },
+                "freezemargin": {
+                    "description": "冻结保证金",
+                    "type": "number"
+                },
+                "fromaccountid": {
+                    "description": "所属上级账户",
+                    "type": "integer"
+                },
+                "holdcharge": {
+                    "description": "本周期持仓过夜费支出[108,109, 110]",
+                    "type": "number"
+                },
+                "inamount": {
+                    "description": "本周期入金金额",
+                    "type": "number"
+                },
+                "interestcharge": {
+                    "description": "本周期递延费支出[103, 104]",
+                    "type": "number"
+                },
+                "ismain": {
+                    "description": "是否母账号 0:不是母账户 1:是母账户",
+                    "type": "integer"
+                },
+                "mortgagecredit": {
+                    "description": "授信金额",
+                    "type": "number"
+                },
+                "netvalue": {
+                    "description": "净值  = 期末余额 + 所有权市值",
+                    "type": "number"
+                },
+                "oridebt": {
+                    "description": "期初欠款【期初】",
+                    "type": "number"
+                },
+                "orifreezecharge": {
+                    "description": "期初手续费冻结",
+                    "type": "number"
+                },
+                "orifreezemargin": {
+                    "description": "期初冻结保证金",
+                    "type": "number"
+                },
+                "orimortgagecredit": {
+                    "description": "期初授信金额",
+                    "type": "number"
+                },
+                "oriothercredit": {
+                    "description": "期初其它授信金额",
+                    "type": "number"
+                },
+                "oriotherfreezemargin": {
+                    "description": "期初其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)",
+                    "type": "number"
+                },
+                "orioutamountfreeze": {
+                    "description": "期初出金冻结",
+                    "type": "number"
+                },
+                "oriusedmargin": {
+                    "description": "期初占用保证金",
+                    "type": "number"
+                },
+                "othercredit": {
+                    "description": "其它授信金额",
+                    "type": "number"
+                },
+                "othercreditdecrease": {
+                    "description": "本周期其它授信减少",
+                    "type": "number"
+                },
+                "othercreditincrease": {
+                    "description": "本周期其它授信增加",
+                    "type": "number"
+                },
+                "otherfreezemargin": {
+                    "description": "其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)",
+                    "type": "number"
+                },
+                "otherincome": {
+                    "description": "其他收入(交割收款 申购收款 全款卖出 商城卖出 买家退货 会员手续费收入)",
+                    "type": "number"
+                },
+                "otherpay": {
+                    "description": "其他支出(交割付款 申购付款 全款买入 商城买入 卖家退货)",
+                    "type": "number"
+                },
+                "outamount": {
+                    "description": "本周期出金金额",
+                    "type": "number"
+                },
+                "outamountfreeze": {
+                    "description": "出金冻结",
+                    "type": "number"
+                },
+                "outthreshold": {
+                    "description": "出金阈值",
+                    "type": "number"
+                },
+                "ownershipvalue": {
+                    "description": "所有权市值",
+                    "type": "number"
+                },
+                "parentaccountid": {
+                    "description": "所属根账户",
+                    "type": "integer"
+                },
+                "paycharge": {
+                    "description": "本周期手续费支出",
+                    "type": "number"
+                },
+                "paycharge2": {
+                    "description": "今日手续费支出(外部配置)",
+                    "type": "number"
+                },
+                "payexchcharge": {
+                    "description": "本周期应付交易所手续费",
+                    "type": "number"
+                },
+                "reckonpl": {
+                    "description": "本周期结算盈亏",
+                    "type": "number"
+                },
+                "reckonpl2": {
+                    "description": "结算盈亏(逐笔) - 汇总取期末",
+                    "type": "number"
+                },
+                "relateuserid": {
+                    "description": "关联用户",
+                    "type": "integer"
+                },
+                "riskrate": {
+                    "description": "风险率【期末】",
+                    "type": "number"
+                },
+                "spotvalue": {
+                    "description": "现货市值-统计服务更新",
+                    "type": "number"
+                },
+                "sublevelpath": {
+                    "description": "账号层级路径(逗号分隔,首尾加逗号)",
+                    "type": "string"
+                },
+                "taaccounttype": {
+                    "description": "外部/内部账号 - 1:外部账号 2:内部账号",
+                    "type": "integer"
+                },
+                "thirdinamount": {
+                    "description": "本周期三方入金",
+                    "type": "number"
+                },
+                "thirdoutamount": {
+                    "description": "本周期三方出金",
+                    "type": "number"
+                },
+                "tradeamount": {
+                    "description": "本周期成交金额",
+                    "type": "number"
+                },
+                "tradecharge": {
+                    "description": "本周期交易手续费支出 [101,102]",
+                    "type": "number"
+                },
+                "tradeqty": {
+                    "description": "本周期成交量",
+                    "type": "integer"
+                },
+                "transferamount": {
+                    "description": "本周期划转金额(母子账号资金划转,从账号划入为正,从账号划出为负)",
+                    "type": "number"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                },
+                "usedmargin": {
+                    "description": "占用保证金",
+                    "type": "number"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
         "models.RoleMenu": {
             "type": "object",
             "properties": {

+ 780 - 0
docs/swagger.yaml

@@ -20309,6 +20309,592 @@ definitions:
         description: 资金账户ID
         type: integer
     type: object
+  models.ReportBankAccountOutInLog:
+    properties:
+      accountId:
+        description: 资金账户
+        type: integer
+      amount:
+        description: 金额
+        type: number
+      applystatusdisplay:
+        description: 申请状态
+        type: string
+      executetypedisplay:
+        description: 申请类型
+        type: string
+      reportType:
+        description: 报表类型 日报表-1 月报表-2
+        type: integer
+      tradedate:
+        description: 查询日期 日报表-yyyyMMdd 月报表-yyyyMM
+        type: string
+      updatetime:
+        description: 更新时间
+        type: string
+    required:
+    - accountId
+    - reportType
+    - tradedate
+    type: object
+  models.ReportReckonDayPosition:
+    properties:
+      accountid:
+        description: 账号Id
+        type: integer
+      avagepricedisplay:
+        description: 均价
+        type: string
+      buyorselldisplay:
+        description: 方向
+        type: string
+      curholderamount:
+        description: 当前持仓总金额
+        type: number
+      curpositionqty:
+        description: 当前持仓总数量
+        type: integer
+      decimalplace:
+        description: 报价小数位
+        type: integer
+      frozenqty:
+        description: 持仓冻结
+        type: integer
+      goodsdisplay:
+        description: 商品名称
+        type: string
+      goodsid:
+        description: 商品Id
+        type: integer
+      reckondate:
+        description: 日照日期(yyyyMMdd)
+        type: string
+      reportType:
+        description: 报表类型 日报表-1 月报表-2
+        type: integer
+    required:
+    - accountid
+    - reckondate
+    - reportType
+    type: object
+  models.ReportReckondaytaaccount:
+    properties:
+      accountid:
+        description: 资金账户ID
+        type: integer
+      accountname:
+        description: 账户名称
+        type: string
+      accountpl:
+        description: 今日账户盈亏 = 今日净值-昨日净值+今日出金-今日入金-今日划转+今日授信减少-今日授信增加+今日其它授信减少-今日其它授信增加+今日三方出金-今日三方入金;由统计服务更新
+        type: number
+      avaiablemoney:
+        description: 可用资金
+        type: number
+      avaiableoutmoney:
+        description: 可出资金
+        type: number
+      balance:
+        description: 期初余额
+        type: number
+      capitalbalance:
+        description: 本金余额[外部子账户实际出入金余额]
+        type: number
+      changeflag:
+        description: 变动标志(当前账户资金有任何变动更新为1系统结算时更新0;供清算时使用) 0:无变动 1:有变动
+        type: integer
+      clearbalance:
+        description: 清算余额 = 期末余额 - 授信金额 - 其它授信金额
+        type: number
+      clearpl:
+        description: 真实资金变动值(除出入金、应付交易所手续费)清算盈亏 = 期末余额 - 期初余额 - (今日入金 + 今日出金) - 今日应付交易所手续费
+          - 【(今日授信增加 + 今日授信减少) - (今日其它授信增加 + 今日其它授信减少) ----母账户】                 =
+          今日手续费支出 + 今日平仓盈亏 + 今日结算盈亏 + 其他支出 + 其他收入 + 今日划转金额 + 今日已收手续费分成 - 今日应付交易所手续费
+        type: number
+      closepl:
+        description: 今日平仓盈亏
+        type: number
+      closepl2:
+        description: 平仓盈亏(逐笔)
+        type: number
+      creditdecrease:
+        description: 今日授信减少
+        type: number
+      creditincrease:
+        description: 今日授信增加
+        type: number
+      curdebt:
+        description: 期末欠款
+        type: number
+      currencyid:
+        description: 货币ID
+        type: integer
+      currentbalance:
+        description: 期末余额
+        type: number
+      defercharge:
+        description: 今日递延费2支出[111, 112]
+        type: number
+      deliveryamountin:
+        description: 今日交收货款收入
+        type: number
+      deliveryamountout:
+        description: 今日交收货款支出
+        type: number
+      deliverycharge:
+        description: 今日交收手续费支出 [105,106]
+        type: number
+      deliverycompensationfeein:
+        description: 今日交收补偿费收入
+        type: number
+      deliverycompensationfeeout:
+        description: 今日交收补偿费支出
+        type: number
+      dividedcharge:
+        description: 今日已收手续费分成
+        type: number
+      floatnetvalue:
+        description: 浮动净值 = 净值 + 浮动盈亏
+        type: number
+      floatpl:
+        description: 浮动盈亏 - 每日有负债类商品
+        type: number
+      freezecharge:
+        description: 手续费冻结
+        type: number
+      freezemargin:
+        description: 冻结保证金
+        type: number
+      fromaccountid:
+        description: 所属上级账户
+        type: integer
+      holdcharge:
+        description: 今日持仓过夜费支出[108,109,110]
+        type: number
+      inamount:
+        description: 今日入金金额
+        type: number
+      interestcharge:
+        description: 今日递延费支出[103, 104]
+        type: number
+      ismain:
+        description: 是否账号 0:不是母账户 1:是母账户
+        type: integer
+      ismarketaccount:
+        description: 是否机构接单账号 0:不是 1:是
+        type: integer
+      isreckonaccount:
+        description: 是否机构分润账号 0:不是 1:是
+        type: integer
+      mortgagecredit:
+        description: 授信金额
+        type: number
+      netvalue:
+        description: 净值  = 期末余额 + 所有权市值 + 仓单市值仓单市值由统计服务更新
+        type: number
+      oridebt:
+        description: 期初欠款
+        type: number
+      orifreezecharge:
+        description: 期初手续费冻结
+        type: number
+      orifreezemargin:
+        description: 期初冻结保证金
+        type: number
+      orimortgagecredit:
+        description: 期初授信金额
+        type: number
+      oriothercredit:
+        description: 期初其它授信金额
+        type: number
+      oriotherfreezemargin:
+        description: 期初其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)
+        type: number
+      orioutamountfreeze:
+        description: 期初出金冻结
+        type: number
+      oriusedmargin:
+        description: 期初占用保证金
+        type: number
+      othercredit:
+        description: 其它授信金额
+        type: number
+      othercreditdecrease:
+        description: 今日其它授信减少
+        type: number
+      othercreditincrease:
+        description: 今日其它授信增加
+        type: number
+      otherfreezemargin:
+        description: 其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)
+        type: number
+      otherincome:
+        description: 其他收入(交割收款 申购收款 全款卖出 商城卖出 买家退货 会员手续费收入)
+        type: number
+      otherpay:
+        description: 其他支出(交割付款 申购付款 全款买入 商城买入 卖家退货)
+        type: number
+      outamount:
+        description: 今日出金金额
+        type: number
+      outamountfreeze:
+        description: 出金冻结
+        type: number
+      outthreshold:
+        description: 出金阈值
+        type: number
+      ownershipvalue:
+        description: 所有权市值
+        type: number
+      parentaccountid:
+        description: 所属根账户
+        type: integer
+      password:
+        description: 资金密码
+        type: string
+      paycharge:
+        description: 今日手续费支出
+        type: number
+      paycharge2:
+        description: 今日手续费支出(外部配置)
+        type: number
+      payexchcharge:
+        description: 今日应付交易所手续费
+        type: number
+      reckondate:
+        description: 日照日期(yyyyMMdd)
+        type: string
+      reckonpl:
+        description: 今日结算盈亏
+        type: number
+      reckonpl2:
+        description: 结算盈亏(逐笔)  - 汇总取期末
+        type: number
+      relatedaccountstatus:
+        description: 关联用户交易状态 - 1:正常(可交易) 2:受限(可平仓,不可建仓) 3:冻结(不可交易)
+        type: integer
+      relateuserid:
+        description: 关联用户
+        type: integer
+      riskrate:
+        description: 风险率 = 占用/ 浮动净值 或  浮动净值/占用
+        type: number
+      signstatus:
+        description: 签约状态 - 1:未签约  2:已签约  3:已解约
+        type: integer
+      spotvalue:
+        description: 现货市值-统计服务更新
+        type: number
+      sublevelpath:
+        description: 账号层级路径(逗号分隔,首尾加逗号)
+        type: string
+      taaccounttype:
+        description: 外部/内部账号 - 1:外部账号 2:内部账号
+        type: integer
+      thirdinamount:
+        description: 今日三方入金
+        type: number
+      thirdoutamount:
+        description: 今日三方出金
+        type: number
+      tradeamount:
+        description: 今日成交金额
+        type: number
+      tradecharge:
+        description: 今日交易手续费支出 [101,102]
+        type: number
+      tradeqty:
+        description: 今日成交量
+        type: integer
+      tradestatus:
+        description: 交易状态 - 1:正常 2:受限 3:冻结 4:禁止建仓(人工受限) 5:禁止交易(人工冻结)
+        type: integer
+      transferamount:
+        description: 今日划转金额(母子账号资金划转,从账号划入为正,从账号划出为负)
+        type: number
+      usedmargin:
+        description: 占用保证金
+        type: number
+      userid:
+        description: 用户ID
+        type: integer
+    required:
+    - accountid
+    - reckondate
+    type: object
+  models.ReportTradeDetail:
+    properties:
+      accountid:
+        description: 资金账户
+        type: integer
+      buyorselldisplay:
+        description: 类型/方向
+        type: string
+      charge:
+        description: 服务费
+        type: number
+      decimalplace:
+        description: 报价小数位
+        type: integer
+      goodsdisplay:
+        description: 商品
+        type: string
+      goodsid:
+        description: 期货合约ID(自增ID SEQ_GOODS)
+        type: integer
+      histradedate:
+        description: 查询日期 日报表-yyyyMMdd 月报表-yyyyMM
+        type: string
+      reportType:
+        description: 报表类型 日报表-1 月报表-2
+        type: integer
+      tradeamount:
+        description: 成交金额
+        type: number
+      tradeid:
+        description: 成交单号
+        type: string
+      tradeprice:
+        description: 价格
+        type: number
+      tradeqty:
+        description: 数量
+        type: integer
+      tradetime:
+        description: 时间
+        type: string
+    required:
+    - histradedate
+    - reportType
+    type: object
+  models.Reporttaaccount:
+    properties:
+      accountid:
+        description: 资金账户ID
+        type: integer
+      accountname:
+        description: 账户名称
+        type: string
+      accountpl:
+        description: 今日账户盈亏 = 今日净值-昨日净值+今日出金-今日入金-今日划转+今日授信减少-今日授信增加+今日其它授信减少-今日其它授信增加+今日三方出金-今日三方入金;由统计服务更新
+        type: number
+      avaiablemoney:
+        description: 可用资金【期末】
+        type: number
+      avaiableoutmoney:
+        description: 可出资金【期末】
+        type: number
+      balance:
+        description: 期初余额
+        type: number
+      capitalbalance:
+        description: 本周期本金余额[外部子账户实际出入金余额]
+        type: number
+      clearbalance:
+        description: 清算余额 = 期末余额 - 授信金额 - 其它授信金额
+        type: number
+      clearpl:
+        description: 清算盈亏
+        type: number
+      closepl:
+        description: 本周期平仓盈亏
+        type: number
+      closepl2:
+        description: 平仓盈亏(逐笔)
+        type: number
+      creditdecrease:
+        description: 本周期授信减少
+        type: number
+      creditincrease:
+        description: 本周期授信增加
+        type: number
+      curdebt:
+        description: 期末欠款【期末】
+        type: number
+      currencyid:
+        description: 货币ID
+        type: integer
+      currentbalance:
+        description: 期末余额
+        type: number
+      cycletime:
+        description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)
+        type: string
+      cycletype:
+        description: 周期类型 - 1:月 2:季 3:年 4:周 5:全报表
+        type: integer
+      defercharge:
+        description: 本周期递延费2支出[111, 112]
+        type: number
+      deliveryamountin:
+        description: 本周期交收货款收入
+        type: number
+      deliveryamountout:
+        description: 本周期交收货款支出
+        type: number
+      deliverycharge:
+        description: 本周期交收手续费支出 [105,106]
+        type: number
+      deliverycompensationfeein:
+        description: 本周期交收补偿费收入
+        type: number
+      deliverycompensationfeeout:
+        description: 本周期交收补偿费支出
+        type: number
+      dividedcharge:
+        description: 本周期已收手续费分成
+        type: number
+      floatnetvalue:
+        description: 浮动净值【期末】
+        type: number
+      floatpl:
+        description: 浮动盈亏【期末】
+        type: number
+      freezecharge:
+        description: 手续费冻结
+        type: number
+      freezemargin:
+        description: 冻结保证金
+        type: number
+      fromaccountid:
+        description: 所属上级账户
+        type: integer
+      holdcharge:
+        description: 本周期持仓过夜费支出[108,109, 110]
+        type: number
+      inamount:
+        description: 本周期入金金额
+        type: number
+      interestcharge:
+        description: 本周期递延费支出[103, 104]
+        type: number
+      ismain:
+        description: 是否母账号 0:不是母账户 1:是母账户
+        type: integer
+      mortgagecredit:
+        description: 授信金额
+        type: number
+      netvalue:
+        description: 净值  = 期末余额 + 所有权市值
+        type: number
+      oridebt:
+        description: 期初欠款【期初】
+        type: number
+      orifreezecharge:
+        description: 期初手续费冻结
+        type: number
+      orifreezemargin:
+        description: 期初冻结保证金
+        type: number
+      orimortgagecredit:
+        description: 期初授信金额
+        type: number
+      oriothercredit:
+        description: 期初其它授信金额
+        type: number
+      oriotherfreezemargin:
+        description: 期初其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)
+        type: number
+      orioutamountfreeze:
+        description: 期初出金冻结
+        type: number
+      oriusedmargin:
+        description: 期初占用保证金
+        type: number
+      othercredit:
+        description: 其它授信金额
+        type: number
+      othercreditdecrease:
+        description: 本周期其它授信减少
+        type: number
+      othercreditincrease:
+        description: 本周期其它授信增加
+        type: number
+      otherfreezemargin:
+        description: 其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)
+        type: number
+      otherincome:
+        description: 其他收入(交割收款 申购收款 全款卖出 商城卖出 买家退货 会员手续费收入)
+        type: number
+      otherpay:
+        description: 其他支出(交割付款 申购付款 全款买入 商城买入 卖家退货)
+        type: number
+      outamount:
+        description: 本周期出金金额
+        type: number
+      outamountfreeze:
+        description: 出金冻结
+        type: number
+      outthreshold:
+        description: 出金阈值
+        type: number
+      ownershipvalue:
+        description: 所有权市值
+        type: number
+      parentaccountid:
+        description: 所属根账户
+        type: integer
+      paycharge:
+        description: 本周期手续费支出
+        type: number
+      paycharge2:
+        description: 今日手续费支出(外部配置)
+        type: number
+      payexchcharge:
+        description: 本周期应付交易所手续费
+        type: number
+      reckonpl:
+        description: 本周期结算盈亏
+        type: number
+      reckonpl2:
+        description: 结算盈亏(逐笔) - 汇总取期末
+        type: number
+      relateuserid:
+        description: 关联用户
+        type: integer
+      riskrate:
+        description: 风险率【期末】
+        type: number
+      spotvalue:
+        description: 现货市值-统计服务更新
+        type: number
+      sublevelpath:
+        description: 账号层级路径(逗号分隔,首尾加逗号)
+        type: string
+      taaccounttype:
+        description: 外部/内部账号 - 1:外部账号 2:内部账号
+        type: integer
+      thirdinamount:
+        description: 本周期三方入金
+        type: number
+      thirdoutamount:
+        description: 本周期三方出金
+        type: number
+      tradeamount:
+        description: 本周期成交金额
+        type: number
+      tradecharge:
+        description: 本周期交易手续费支出 [101,102]
+        type: number
+      tradeqty:
+        description: 本周期成交量
+        type: integer
+      transferamount:
+        description: 本周期划转金额(母子账号资金划转,从账号划入为正,从账号划出为负)
+        type: number
+      updatetime:
+        description: 更新时间
+        type: string
+      usedmargin:
+        description: 占用保证金
+        type: number
+      userid:
+        description: 用户ID
+        type: integer
+    required:
+    - accountid
+    - cycletime
+    type: object
   models.RoleMenu:
     properties:
       hasright:
@@ -39947,6 +40533,200 @@ paths:
       summary: 分时图数据查询
       tags:
       - 行情服务
+  /Report/QueryReportBankAccountOutInLog:
+    get:
+      parameters:
+      - description: 资金账户
+        in: query
+        name: accountid
+        required: true
+        type: integer
+      - description: 查询日期 日报表-yyyyMMdd 月报表-yyyyMM
+        in: query
+        name: tradedate
+        required: true
+        type: string
+      - description: 报表类型 日报表-1 月报表-2
+        in: query
+        name: reporttype
+        required: true
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.ReportBankAccountOutInLog'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 报表 - 交易商结算单 - 出入金明细
+      tags:
+      - 报表
+  /Report/QueryReportMonthTaaccount:
+    get:
+      parameters:
+      - description: 资金账户
+        in: query
+        name: accountid
+        required: true
+        type: integer
+      - description: 月份(yyyyMM)
+        in: query
+        name: reckondate
+        required: true
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.Reporttaaccount'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 报表 - 交易商结算单 - 资金信息(月)
+      tags:
+      - 报表
+  /Report/QueryReportReckonDayPosition:
+    get:
+      parameters:
+      - description: 资金账户
+        in: query
+        name: accountid
+        required: true
+        type: integer
+      - description: 查询日期 日报表-yyyyMMdd 月报表-yyyyMM
+        in: query
+        name: tradedate
+        required: true
+        type: string
+      - description: 报表类型 日报表-1 月报表-2
+        in: query
+        name: reporttype
+        required: true
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.ReportReckonDayPosition'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 报表 - 交易商结算单 - 持仓汇总
+      tags:
+      - 报表
+  /Report/QueryReportReckonDayTaaccount:
+    get:
+      parameters:
+      - description: 资金账户
+        in: query
+        name: accountid
+        required: true
+        type: integer
+      - description: 日照日期(yyyyMMdd)
+        in: query
+        name: reckondate
+        required: true
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.ReportReckondaytaaccount'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 报表 - 交易商结算单 - 资金信息(日)
+      tags:
+      - 报表
+  /Report/QueryReportTradeDetail:
+    get:
+      parameters:
+      - description: 资金账户
+        in: query
+        name: accountid
+        required: true
+        type: integer
+      - description: 查询日期 日报表-yyyyMMdd 月报表-yyyyMM
+        in: query
+        name: histradedate
+        required: true
+        type: string
+      - description: 报表类型 日报表-1 月报表-2
+        in: query
+        name: reporttype
+        required: true
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.ReportTradeDetail'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 报表 - 交易商结算单 - 成交明细
+      tags:
+      - 报表
   /SZDZ/QueryConvertConfig:
     get:
       parameters:

+ 665 - 0
models/report.go

@@ -0,0 +1,665 @@
+package models
+
+import (
+	"mtp2_if/db"
+	"mtp2_if/utils"
+	"strconv"
+	"time"
+)
+
+// Reckondaytaaccount 资金账户日照表
+type ReportReckondaytaaccount struct {
+	ACCOUNTID                  int64   `json:"accountid" xorm:"ACCOUNTID" form:"accountid" binding:"required"`    // 资金账户ID
+	RECKONDATE                 string  `json:"reckondate" xorm:"RECKONDATE" form:"reckondate" binding:"required"` // 日照日期(yyyyMMdd)
+	USERID                     int64   `json:"userid" xorm:"USERID"`                                              // 用户ID
+	CURRENCYID                 int64   `json:"currencyid" xorm:"CURRENCYID"`                                      // 货币ID
+	CHANGEFLAG                 int32   `json:"changeflag" xorm:"CHANGEFLAG"`                                      // 变动标志(当前账户资金有任何变动更新为1系统结算时更新0;供清算时使用) 0:无变动 1:有变动
+	PASSWORD                   string  `json:"password" xorm:"PASSWORD"`                                          // 资金密码
+	TRADESTATUS                int32   `json:"tradestatus" xorm:"TRADESTATUS"`                                    // 交易状态 - 1:正常 2:受限 3:冻结 4:禁止建仓(人工受限) 5:禁止交易(人工冻结)
+	SIGNSTATUS                 int32   `json:"signstatus" xorm:"SIGNSTATUS"`                                      // 签约状态 - 1:未签约  2:已签约  3:已解约
+	ISMAIN                     int32   `json:"ismain" xorm:"ISMAIN"`                                              // 是否账号 0:不是母账户 1:是母账户
+	PARENTACCOUNTID            int64   `json:"parentaccountid" xorm:"PARENTACCOUNTID"`                            // 所属根账户
+	RELATEUSERID               int64   `json:"relateuserid" xorm:"RELATEUSERID"`                                  // 关联用户
+	RELATEDACCOUNTSTATUS       int32   `json:"relatedaccountstatus" xorm:"RELATEDACCOUNTSTATUS"`                  // 关联用户交易状态 - 1:正常(可交易) 2:受限(可平仓,不可建仓) 3:冻结(不可交易)
+	TAACCOUNTTYPE              int32   `json:"taaccounttype" xorm:"TAACCOUNTTYPE"`                                // 外部/内部账号 - 1:外部账号 2:内部账号
+	ISRECKONACCOUNT            int32   `json:"isreckonaccount" xorm:"ISRECKONACCOUNT"`                            // 是否机构分润账号 0:不是 1:是
+	ISMARKETACCOUNT            int32   `json:"ismarketaccount" xorm:"ISMARKETACCOUNT"`                            // 是否机构接单账号 0:不是 1:是
+	BALANCE                    float64 `json:"balance" xorm:"BALANCE"`                                            // 期初余额
+	ORIFREEZEMARGIN            float64 `json:"orifreezemargin" xorm:"ORIFREEZEMARGIN"`                            // 期初冻结保证金
+	ORIUSEDMARGIN              float64 `json:"oriusedmargin" xorm:"ORIUSEDMARGIN"`                                // 期初占用保证金
+	ORIOTHERFREEZEMARGIN       float64 `json:"oriotherfreezemargin" xorm:"ORIOTHERFREEZEMARGIN"`                  // 期初其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)
+	ORIFREEZECHARGE            float64 `json:"orifreezecharge" xorm:"ORIFREEZECHARGE"`                            // 期初手续费冻结
+	ORIMORTGAGECREDIT          float64 `json:"orimortgagecredit" xorm:"ORIMORTGAGECREDIT"`                        // 期初授信金额
+	ORIOTHERCREDIT             float64 `json:"oriothercredit" xorm:"ORIOTHERCREDIT"`                              // 期初其它授信金额
+	ORIOUTAMOUNTFREEZE         float64 `json:"orioutamountfreeze" xorm:"ORIOUTAMOUNTFREEZE"`                      // 期初出金冻结
+	CURRENTBALANCE             float64 `json:"currentbalance" xorm:"CURRENTBALANCE"`                              // 期末余额
+	FREEZEMARGIN               float64 `json:"freezemargin" xorm:"FREEZEMARGIN"`                                  // 冻结保证金
+	USEDMARGIN                 float64 `json:"usedmargin" xorm:"USEDMARGIN"`                                      // 占用保证金
+	OTHERFREEZEMARGIN          float64 `json:"otherfreezemargin" xorm:"OTHERFREEZEMARGIN"`                        // 其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)
+	FREEZECHARGE               float64 `json:"freezecharge" xorm:"FREEZECHARGE"`                                  // 手续费冻结
+	MORTGAGECREDIT             float64 `json:"mortgagecredit" xorm:"MORTGAGECREDIT"`                              // 授信金额
+	OTHERCREDIT                float64 `json:"othercredit" xorm:"OTHERCREDIT"`                                    // 其它授信金额
+	OUTAMOUNTFREEZE            float64 `json:"outamountfreeze" xorm:"OUTAMOUNTFREEZE"`                            // 出金冻结
+	INAMOUNT                   float64 `json:"inamount" xorm:"INAMOUNT"`                                          // 今日入金金额
+	OUTAMOUNT                  float64 `json:"outamount" xorm:"OUTAMOUNT"`                                        // 今日出金金额
+	PAYCHARGE                  float64 `json:"paycharge" xorm:"PAYCHARGE"`                                        // 今日手续费支出
+	CLOSEPL                    float64 `json:"closepl" xorm:"CLOSEPL"`                                            // 今日平仓盈亏
+	RECKONPL                   float64 `json:"reckonpl" xorm:"RECKONPL"`                                          // 今日结算盈亏
+	CREDITINCREASE             float64 `json:"creditincrease" xorm:"CREDITINCREASE"`                              // 今日授信增加
+	CREDITDECREASE             float64 `json:"creditdecrease" xorm:"CREDITDECREASE"`                              // 今日授信减少
+	OTHERCREDITINCREASE        float64 `json:"othercreditincrease" xorm:"OTHERCREDITINCREASE"`                    // 今日其它授信增加
+	OTHERCREDITDECREASE        float64 `json:"othercreditdecrease" xorm:"OTHERCREDITDECREASE"`                    // 今日其它授信减少
+	OTHERPAY                   float64 `json:"otherpay" xorm:"OTHERPAY"`                                          // 其他支出(交割付款 申购付款 全款买入 商城买入 卖家退货)
+	OTHERINCOME                float64 `json:"otherincome" xorm:"OTHERINCOME"`                                    // 其他收入(交割收款 申购收款 全款卖出 商城卖出 买家退货 会员手续费收入)
+	TRANSFERAMOUNT             float64 `json:"transferamount" xorm:"TRANSFERAMOUNT"`                              // 今日划转金额(母子账号资金划转,从账号划入为正,从账号划出为负)
+	OUTTHRESHOLD               float64 `json:"outthreshold" xorm:"OUTTHRESHOLD"`                                  // 出金阈值
+	CLEARBALANCE               float64 `json:"clearbalance" xorm:"CLEARBALANCE"`                                  // 清算余额 = 期末余额 - 授信金额 - 其它授信金额
+	DIVIDEDCHARGE              float64 `json:"dividedcharge" xorm:"DIVIDEDCHARGE"`                                // 今日已收手续费分成
+	PAYEXCHCHARGE              float64 `json:"payexchcharge" xorm:"PAYEXCHCHARGE"`                                // 今日应付交易所手续费
+	CLEARPL                    float64 `json:"clearpl" xorm:"CLEARPL"`                                            // 真实资金变动值(除出入金、应付交易所手续费)清算盈亏 = 期末余额 - 期初余额 - (今日入金 + 今日出金) - 今日应付交易所手续费 - 【(今日授信增加 + 今日授信减少) - (今日其它授信增加 + 今日其它授信减少) ----母账户】                 = 今日手续费支出 + 今日平仓盈亏 + 今日结算盈亏 + 其他支出 + 其他收入 + 今日划转金额 + 今日已收手续费分成 - 今日应付交易所手续费
+	THIRDINAMOUNT              float64 `json:"thirdinamount" xorm:"THIRDINAMOUNT"`                                // 今日三方入金
+	TRADECHARGE                float64 `json:"tradecharge" xorm:"TRADECHARGE"`                                    // 今日交易手续费支出 [101,102]
+	INTERESTCHARGE             float64 `json:"interestcharge" xorm:"INTERESTCHARGE"`                              // 今日递延费支出[103, 104]
+	DELIVERYCHARGE             float64 `json:"deliverycharge" xorm:"DELIVERYCHARGE"`                              // 今日交收手续费支出 [105,106]
+	HOLDCHARGE                 float64 `json:"holdcharge" xorm:"HOLDCHARGE"`                                      // 今日持仓过夜费支出[108,109,110]
+	THIRDOUTAMOUNT             float64 `json:"thirdoutamount" xorm:"THIRDOUTAMOUNT"`                              // 今日三方出金
+	TRADEQTY                   int64   `json:"tradeqty" xorm:"TRADEQTY"`                                          // 今日成交量
+	TRADEAMOUNT                float64 `json:"tradeamount" xorm:"TRADEAMOUNT"`                                    // 今日成交金额
+	DELIVERYAMOUNTOUT          float64 `json:"deliveryamountout" xorm:"DELIVERYAMOUNTOUT"`                        // 今日交收货款支出
+	DELIVERYAMOUNTIN           float64 `json:"deliveryamountin" xorm:"DELIVERYAMOUNTIN"`                          // 今日交收货款收入
+	DELIVERYCOMPENSATIONFEEOUT float64 `json:"deliverycompensationfeeout" xorm:"DELIVERYCOMPENSATIONFEEOUT"`      // 今日交收补偿费支出
+	DELIVERYCOMPENSATIONFEEIN  float64 `json:"deliverycompensationfeein" xorm:"DELIVERYCOMPENSATIONFEEIN"`        // 今日交收补偿费收入
+	CAPITALBALANCE             float64 `json:"capitalbalance" xorm:"CAPITALBALANCE"`                              // 本金余额[外部子账户实际出入金余额]
+	CLOSEPL2                   float64 `json:"closepl2" xorm:"CLOSEPL2"`                                          // 平仓盈亏(逐笔)
+	RECKONPL2                  float64 `json:"reckonpl2" xorm:"RECKONPL2"`                                        // 结算盈亏(逐笔)  - 汇总取期末
+	NETVALUE                   float64 `json:"netvalue" xorm:"NETVALUE"`                                          // 净值  = 期末余额 + 所有权市值 + 仓单市值仓单市值由统计服务更新
+	PAYCHARGE2                 float64 `json:"paycharge2" xorm:"PAYCHARGE2"`                                      // 今日手续费支出(外部配置)
+	DEFERCHARGE                float64 `json:"defercharge" xorm:"DEFERCHARGE"`                                    // 今日递延费2支出[111, 112]
+	FROMACCOUNTID              int64   `json:"fromaccountid" xorm:"FROMACCOUNTID"`                                // 所属上级账户
+	SUBLEVELPATH               string  `json:"sublevelpath" xorm:"SUBLEVELPATH"`                                  // 账号层级路径(逗号分隔,首尾加逗号)
+	OWNERSHIPVALUE             float64 `json:"ownershipvalue" xorm:"OWNERSHIPVALUE"`                              // 所有权市值
+	SPOTVALUE                  float64 `json:"spotvalue" xorm:"SPOTVALUE"`                                        // 现货市值-统计服务更新
+	ACCOUNTPL                  float64 `json:"accountpl" xorm:"ACCOUNTPL"`                                        // 今日账户盈亏 = 今日净值-昨日净值+今日出金-今日入金-今日划转+今日授信减少-今日授信增加+今日其它授信减少-今日其它授信增加+今日三方出金-今日三方入金;由统计服务更新
+	ACCOUNTNAME                string  `json:"accountname" xorm:"ACCOUNTNAME"`                                    // 账户名称
+	ORIDEBT                    float64 `json:"oridebt" xorm:"ORIDEBT"`                                            // 期初欠款
+	CURDEBT                    float64 `json:"curdebt" xorm:"CURDEBT"`                                            // 期末欠款
+	AVAIABLEMONEY              float64 `json:"avaiablemoney" xorm:"AVAIABLEMONEY"`                                // 可用资金
+	AVAIABLEOUTMONEY           float64 `json:"avaiableoutmoney" xorm:"AVAIABLEOUTMONEY"`                          // 可出资金
+	FLOATPL                    float64 `json:"floatpl" xorm:"FLOATPL"`                                            // 浮动盈亏 - 每日有负债类商品
+	FLOATNETVALUE              float64 `json:"floatnetvalue" xorm:"FLOATNETVALUE"`                                // 浮动净值 = 净值 + 浮动盈亏
+	RISKRATE                   float64 `json:"riskrate" xorm:"RISKRATE"`                                          // 风险率 = 占用/ 浮动净值 或  浮动净值/占用
+}
+
+func (r *ReportReckondaytaaccount) calc() {
+
+}
+
+func (r *ReportReckondaytaaccount) buildSql() string {
+	var sqlId utils.SQLVal = `
+	select
+		t.accountid,
+		t.reckondate,
+		t.userid,
+		t.currencyid,
+		t.changeflag,
+		t.password,
+		t.tradestatus,
+		t.signstatus,
+		t.ismain,
+		t.parentaccountid,
+		t.relateuserid,
+		t.relatedaccountstatus,
+		t.taaccounttype,
+		t.isreckonaccount,
+		t.ismarketaccount,
+		t.balance,
+		t.orifreezemargin,
+		t.oriusedmargin,
+		t.oriotherfreezemargin,
+		t.orifreezecharge,
+		t.orimortgagecredit,
+		t.oriothercredit,
+		t.orioutamountfreeze,
+		t.currentbalance,
+		t.freezemargin,
+		t.usedmargin,
+		t.otherfreezemargin,
+		t.freezecharge,
+		t.mortgagecredit,
+		t.othercredit,
+		t.outamountfreeze,
+		t.inamount,
+		t.outamount,
+		t.paycharge,
+		t.closepl,
+		t.reckonpl,
+		t.creditincrease,
+		t.creditdecrease,
+		t.othercreditincrease,
+		t.othercreditdecrease,
+		t.otherpay,
+		t.otherincome,
+		t.transferamount,
+		t.outthreshold,
+		t.clearbalance,
+		t.dividedcharge,
+		t.payexchcharge,
+		t.clearpl,
+		t.thirdinamount,
+		t.tradecharge,
+		t.interestcharge,
+		t.deliverycharge,
+		t.holdcharge,
+		t.thirdoutamount,
+		t.tradeqty,
+		t.tradeamount,
+		t.deliveryamountout,
+		t.deliveryamountin,
+		t.deliverycompensationfeeout,
+		t.deliverycompensationfeein,
+		t.capitalbalance,
+		t.closepl2,
+		t.reckonpl2,
+		t.netvalue,
+		t.paycharge2,
+		t.defercharge,
+		t.fromaccountid,
+		t.sublevelpath,
+		t.ownershipvalue,
+		t.spotvalue,
+		t.accountpl,
+		t.accountname,
+		t.oridebt,
+		t.curdebt,
+		t.avaiablemoney,
+		t.avaiableoutmoney,
+		t.floatpl,
+		t.floatnetvalue,
+		t.riskrate
+	from reckon_daytaaccount t
+	where t.reckondate = %v and t.accountid = %v
+	`
+	sqlId.FormatParam(r.RECKONDATE, r.ACCOUNTID)
+
+	return sqlId.String()
+}
+
+// GetDataEx 从数据库中查询数据
+func (r *ReportReckondaytaaccount) GetDataEx() (interface{}, error) {
+	e := db.GetEngine()
+	s := e.SQL(r.buildSql())
+	sData := make([]ReportReckondaytaaccount, 0)
+	if err := s.Find(&sData); err != nil {
+		return nil, err
+	}
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, nil
+}
+
+type ReportBankAccountOutInLog struct {
+	UPDATETIME         string  `json:"updatetime" xorm:"UPDATETIME"`                 // 更新时间
+	Executetypedisplay string  `json:"executetypedisplay" xorm:"EXECUTETYPEDISPLAY"` // 申请类型
+	AMOUNT             float64 `json:"amount" xorm:"AMOUNT"`                         // 金额
+	Applystatusdisplay string  `json:"applystatusdisplay" xorm:"APPLYSTATUSDISPLAY"` // 申请状态
+
+	AccountId  int64  `form:"accountid" binding:"required"`  // 资金账户
+	Tradedate  string `form:"tradedate" binding:"required"`  // 查询日期 日报表-yyyyMMdd 月报表-yyyyMM
+	ReportType int    `form:"reporttype" binding:"required"` // 报表类型 日报表-1 月报表-2
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *ReportBankAccountOutInLog) calc() {
+
+}
+
+func (r *ReportBankAccountOutInLog) buildSql() string {
+	var sqlId utils.SQLVal = `
+	select 
+		to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME,
+		en1.enumdicname EXECUTETYPEDISPLAY,
+		t.AMOUNT,
+		en2.enumdicname APPLYSTATUSDISPLAY
+	from Bank_AccountOutInApply t
+	left join enumdicitem en1
+		on en1.enumdiccode = 'executetype'
+		and en1.enumitemname = t.executetype
+	left join enumdicitem en2
+		on en2.enumdiccode = 'applystatus'
+		and en2.enumitemname = t.applystatus
+	where 1=1 
+	`
+	sqlId.And("t.accountcode", strconv.Itoa(int(r.AccountId)))
+	if r.ReportType == 1 {
+		// 日报表
+		sqlId.And("t.tradedate", r.Tradedate)
+	} else {
+		// 月报表
+		sqlId.And("substr(t.tradedate, 0,6)", r.Tradedate)
+	}
+	sqlId.OrderByDesc("t.updatetime")
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *ReportBankAccountOutInLog) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]ReportBankAccountOutInLog, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}
+
+type ReportReckonDayPosition struct {
+	CURPOSITIONQTY    int64   `json:"curpositionqty" xorm:"CURPOSITIONQTY"`                              // 当前持仓总数量
+	FROZENQTY         int64   `json:"frozenqty" xorm:"FROZENQTY"`                                        // 持仓冻结
+	CURHOLDERAMOUNT   float64 `json:"curholderamount" xorm:"CURHOLDERAMOUNT"`                            // 当前持仓总金额
+	GOODSID           int32   `json:"goodsid" xorm:"GOODSID"`                                            // 商品Id
+	ACCOUNTID         int64   `json:"accountid" xorm:"ACCOUNTID" form:"accountid" binding:"required"`    // 账号Id
+	RECKONDATE        string  `json:"reckondate" xorm:"RECKONDATE" form:"reckondate" binding:"required"` // 日照日期(yyyyMMdd)
+	GOODSDISPLAY      string  `json:"goodsdisplay" xorm:"GOODSDISPLAY"`                                  // 商品名称
+	DECIMALPLACE      int32   `json:"decimalplace" xorm:"DECIMALPLACE"`                                  // 报价小数位
+	BUYORSELLDISPLAY  string  `json:"buyorselldisplay" xorm:"BUYORSELLDISPLAY"`                          // 方向
+	AVAGEPRICEDISPLAY string  `json:"avagepricedisplay" xorm:"AVAGEPRICEDISPLAY"`                        // 均价
+
+	ReportType int `form:"reporttype" binding:"required"` // 报表类型 日报表-1 月报表-2
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *ReportReckonDayPosition) calc() {
+
+}
+
+func (r *ReportReckonDayPosition) buildSql() string {
+	var sqlId utils.SQLVal = `
+	select p.*,
+       en1.enumdicname buyorselldisplay,
+       round(p.curholderamount / p.curpositionqty, g.decimalplace) avagepricedisplay
+  from (select 0 buyorsell,
+               t.buycurpositionqty curpositionqty,               
+               t.buyfrozenqty frozenqty,
+               t.buycurholderamount curholderamount,               
+               t.goodsid,
+               t.accountid,
+               t.reckondate,
+               g.goodscode || '/' || g.goodsname goodsdisplay,
+               g.decimalplace
+          from reckon_dayposition t        
+          left join goods g
+            on g.goodsid = t.goodsid        
+          left join market m
+            on m.marketid = g.marketid        
+         where t.buycurpositionqty > 0
+           and m.trademode not in (40, 41, 48, 51)
+           and t.accountid = %v              
+           and t.reckondate = %v 
+union        
+        select 1 buyorsell,
+               t.sellcurpositionqty curpositionqty,               
+               t.sellfrozenqty frozenqty,
+               t.sellcurholderamount sellholderamount,               
+               t.goodsid,
+               t.accountid,
+               t.reckondate,
+               g.goodscode || '/' || g.goodsname goodsdisplay,
+               g.decimalplace        
+          from reckon_dayposition t        
+          left join goods g
+            on g.goodsid = t.goodsid        
+          left join market m
+            on m.marketid = g.marketid        
+         where t.sellcurpositionqty > 0
+           and m.trademode not in (40, 41, 48, 51)
+           and t.accountid = %v               
+           and t.reckondate = %v ) p
+  left join goods g
+    on g.goodsid = p.goodsid
+  left join market m
+    on m.marketid = g.marketid
+  left join enumdicitem en1
+    on en1.enumdiccode = 'buyOrSell'
+   and en1.enumitemname = p.buyorsell
+ order by g.goodscode, p.buyorsell
+	`
+	sqlId.FormatParam(r.ACCOUNTID, r.RECKONDATE, r.ACCOUNTID, r.RECKONDATE)
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *ReportReckonDayPosition) buildSql_m() string {
+	var sqlId utils.SQLVal = `
+	select p.*,
+       en1.enumdicname buyorselldisplay,       
+       round(p.curholderamount / p.curpositionqty, g.decimalplace) avagepricedisplay
+  from (select 0 buyorsell,
+               t.buycurpositionqty curpositionqty,               
+               t.buyfrozenqty frozenqty,
+               t.buycurholderamount curholderamount,               
+               t.goodsid,
+               t.accountid,
+               t.cycletype,
+               t.cycletime,
+               g.goodscode || '/' || g.goodsname goodsdisplay,
+               g.decimalplace        
+          from report_tradeposition t        
+          left join goods g
+            on g.goodsid = t.goodsid        
+          left join market m
+            on m.marketid = g.marketid        
+         where t.buycurpositionqty > 0
+           and m.trademode not in (40, 41, 48, 51)              
+           and t.cycletype = 1
+           and t.cycletime = %v 
+           and t.accountid = %v         
+union        
+        select 1 buyorsell,
+               t.sellcurpositionqty curpositionqty,               
+               t.sellfrozenqty frozenqty,
+               t.sellcurholderamount sellholderamount,               
+               t.goodsid,
+               t.accountid,
+               t.cycletype,
+               t.cycletime,
+               g.goodscode || '/' || g.goodsname goodsdisplay,
+               g.decimalplace        
+          from report_tradeposition t        
+          left join goods g
+            on g.goodsid = t.goodsid        
+          left join market m
+            on m.marketid = g.marketid        
+         where t.sellcurpositionqty > 0
+           and m.trademode not in (40, 41, 48, 51)              
+           and t.cycletype = 1
+           and t.cycletime = %v 
+           and t.accountid = %v) p
+  left join goods g
+    on g.goodsid = p.goodsid
+  left join market m
+    on m.marketid = g.marketid
+  left join enumdicitem en1
+    on en1.enumdiccode = 'buyOrSell'
+   and en1.enumitemname = p.buyorsell
+ order by g.goodscode, p.buyorsell
+	`
+	sqlId.FormatParam(r.RECKONDATE, r.ACCOUNTID, r.RECKONDATE, r.ACCOUNTID)
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *ReportReckonDayPosition) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]ReportReckonDayPosition, 0)
+	sql := r.buildSql()
+	if r.ReportType == 2 {
+		sql = r.buildSql_m()
+	}
+	err := db.GetEngine().SQL(sql).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}
+
+type ReportTradeDetail struct {
+	TRADETIME        string  `json:"tradetime" xorm:"TRADETIME"`                          // 时间
+	GOODSDISPLAY     string  `json:"goodsdisplay" xorm:"GOODSDISPLAY"`                    // 商品
+	BUYORSELLDISPLAY string  `json:"buyorselldisplay" xorm:"BUYORSELLDISPLAY"`            // 类型/方向
+	TRADEQTY         int64   `json:"tradeqty" xorm:"TRADEQTY"`                            // 数量
+	TRADEPRICE       float64 `json:"tradeprice" xorm:"TRADEPRICE"`                        // 价格
+	TRADEAMOUNT      float64 `json:"tradeamount" xorm:"TRADEAMOUNT"`                      // 成交金额
+	CHARGE           float64 `json:"charge" xorm:"CHARGE"`                                // 服务费
+	TRADEID          string  `json:"tradeid" xorm:"TRADEID"`                              // 成交单号
+	ACCOUNTID        int64   `json:"accountid" xorm:"ACCOUNTID"`                          // 资金账户
+	GOODSID          int32   `json:"goodsid" xorm:"GOODSID"`                              // 期货合约ID(自增ID SEQ_GOODS)
+	DECIMALPLACE     int32   `json:"decimalplace" xorm:"DECIMALPLACE"`                    // 报价小数位
+	HISTRADEDATE     string  `json:"histradedate" xorm:"HISTRADEDATE" binding:"required"` // 查询日期 日报表-yyyyMMdd 月报表-yyyyMM
+
+	ReportType int `form:"reporttype" binding:"required"` // 报表类型 日报表-1 月报表-2
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *ReportTradeDetail) calc() {
+
+}
+
+func (r *ReportTradeDetail) buildSql() string {
+	var sqlId utils.SQLVal = `
+	select 
+		to_char(t.tradetime, 'yyyy-mm-dd hh24:mi:ss') TRADETIME,
+		g.goodscode || '/' || g.goodsname goodsdisplay,
+		en2.enumdicname || '/' || en1.enumdicname buyorselldisplay,
+		t.tradeqty,
+		t.tradeprice,
+		t.tradeamount,
+		t.opencharge + t.closecharge charge,
+		t.tradeid,
+		g.decimalplace,
+		g.goodsid,
+		t.accountid
+	from his_trade_tradedetail t
+		left join goods g
+			on g.goodsid = t.goodsid
+		left join enumdicitem en1
+			on en1.enumdiccode = 'buyOrSell'
+			and en1.enumitemname = t.buyorsell
+		left join enumdicitem en2
+			on en2.enumdiccode = 'buildtype'
+			and en2.enumitemname = t.buildtype
+	where t.isvaliddata = 1   
+	`
+	sqlId.And("t.accountid", r.ACCOUNTID)
+	if r.ReportType == 1 {
+		// 日报表
+		sqlId.And("t.histradedate", r.HISTRADEDATE)
+	} else {
+		// 月报表
+		sqlId.And("substr(t.histradedate, 0,6)", r.HISTRADEDATE)
+	}
+	sqlId.OrderByDesc("t.tradetime")
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *ReportTradeDetail) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]ReportTradeDetail, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}
+
+// Reporttaaccount 资金账户报表表
+type Reporttaaccount struct {
+	ACCOUNTID                  int64     `json:"accountid" xorm:"ACCOUNTID" form:"accountid" binding:"required"` // 资金账户ID
+	CYCLETYPE                  int32     `json:"cycletype" xorm:"CYCLETYPE"`                                     // 周期类型 - 1:月 2:季 3:年 4:周 5:全报表
+	CYCLETIME                  string    `json:"cycletime" xorm:"CYCLETIME" form:"cycletime" binding:"required"` // 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)
+	UPDATETIME                 time.Time `json:"updatetime" xorm:"UPDATETIME"`                                   // 更新时间
+	USERID                     int64     `json:"userid" xorm:"USERID"`                                           // 用户ID
+	ISMAIN                     int32     `json:"ismain" xorm:"ISMAIN"`                                           // 是否母账号 0:不是母账户 1:是母账户
+	PARENTACCOUNTID            int64     `json:"parentaccountid" xorm:"PARENTACCOUNTID"`                         // 所属根账户
+	TAACCOUNTTYPE              int32     `json:"taaccounttype" xorm:"TAACCOUNTTYPE"`                             // 外部/内部账号 - 1:外部账号 2:内部账号
+	CURRENCYID                 int64     `json:"currencyid" xorm:"CURRENCYID"`                                   // 货币ID
+	BALANCE                    float64   `json:"balance" xorm:"BALANCE"`                                         // 期初余额
+	ORIFREEZEMARGIN            float64   `json:"orifreezemargin" xorm:"ORIFREEZEMARGIN"`                         // 期初冻结保证金
+	ORIUSEDMARGIN              float64   `json:"oriusedmargin" xorm:"ORIUSEDMARGIN"`                             // 期初占用保证金
+	ORIOTHERFREEZEMARGIN       float64   `json:"oriotherfreezemargin" xorm:"ORIOTHERFREEZEMARGIN"`               // 期初其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)
+	ORIFREEZECHARGE            float64   `json:"orifreezecharge" xorm:"ORIFREEZECHARGE"`                         // 期初手续费冻结
+	ORIMORTGAGECREDIT          float64   `json:"orimortgagecredit" xorm:"ORIMORTGAGECREDIT"`                     // 期初授信金额
+	ORIOTHERCREDIT             float64   `json:"oriothercredit" xorm:"ORIOTHERCREDIT"`                           // 期初其它授信金额
+	ORIOUTAMOUNTFREEZE         float64   `json:"orioutamountfreeze" xorm:"ORIOUTAMOUNTFREEZE"`                   // 期初出金冻结
+	CURRENTBALANCE             float64   `json:"currentbalance" xorm:"CURRENTBALANCE"`                           // 期末余额
+	FREEZEMARGIN               float64   `json:"freezemargin" xorm:"FREEZEMARGIN"`                               // 冻结保证金
+	USEDMARGIN                 float64   `json:"usedmargin" xorm:"USEDMARGIN"`                                   // 占用保证金
+	OTHERFREEZEMARGIN          float64   `json:"otherfreezemargin" xorm:"OTHERFREEZEMARGIN"`                     // 其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)
+	FREEZECHARGE               float64   `json:"freezecharge" xorm:"FREEZECHARGE"`                               // 手续费冻结
+	MORTGAGECREDIT             float64   `json:"mortgagecredit" xorm:"MORTGAGECREDIT"`                           // 授信金额
+	OTHERCREDIT                float64   `json:"othercredit" xorm:"OTHERCREDIT"`                                 // 其它授信金额
+	OUTAMOUNTFREEZE            float64   `json:"outamountfreeze" xorm:"OUTAMOUNTFREEZE"`                         // 出金冻结
+	INAMOUNT                   float64   `json:"inamount" xorm:"INAMOUNT"`                                       // 本周期入金金额
+	OUTAMOUNT                  float64   `json:"outamount" xorm:"OUTAMOUNT"`                                     // 本周期出金金额
+	PAYCHARGE                  float64   `json:"paycharge" xorm:"PAYCHARGE"`                                     // 本周期手续费支出
+	CLOSEPL                    float64   `json:"closepl" xorm:"CLOSEPL"`                                         // 本周期平仓盈亏
+	RECKONPL                   float64   `json:"reckonpl" xorm:"RECKONPL"`                                       // 本周期结算盈亏
+	CREDITINCREASE             float64   `json:"creditincrease" xorm:"CREDITINCREASE"`                           // 本周期授信增加
+	CREDITDECREASE             float64   `json:"creditdecrease" xorm:"CREDITDECREASE"`                           // 本周期授信减少
+	OTHERCREDITINCREASE        float64   `json:"othercreditincrease" xorm:"OTHERCREDITINCREASE"`                 // 本周期其它授信增加
+	OTHERCREDITDECREASE        float64   `json:"othercreditdecrease" xorm:"OTHERCREDITDECREASE"`                 // 本周期其它授信减少
+	OTHERPAY                   float64   `json:"otherpay" xorm:"OTHERPAY"`                                       // 其他支出(交割付款 申购付款 全款买入 商城买入 卖家退货)
+	OTHERINCOME                float64   `json:"otherincome" xorm:"OTHERINCOME"`                                 // 其他收入(交割收款 申购收款 全款卖出 商城卖出 买家退货 会员手续费收入)
+	TRANSFERAMOUNT             float64   `json:"transferamount" xorm:"TRANSFERAMOUNT"`                           // 本周期划转金额(母子账号资金划转,从账号划入为正,从账号划出为负)
+	OUTTHRESHOLD               float64   `json:"outthreshold" xorm:"OUTTHRESHOLD"`                               // 出金阈值
+	CLEARBALANCE               float64   `json:"clearbalance" xorm:"CLEARBALANCE"`                               // 清算余额 = 期末余额 - 授信金额 - 其它授信金额
+	DIVIDEDCHARGE              float64   `json:"dividedcharge" xorm:"DIVIDEDCHARGE"`                             // 本周期已收手续费分成
+	PAYEXCHCHARGE              float64   `json:"payexchcharge" xorm:"PAYEXCHCHARGE"`                             // 本周期应付交易所手续费
+	CLEARPL                    float64   `json:"clearpl" xorm:"CLEARPL"`                                         // 清算盈亏
+	THIRDINAMOUNT              float64   `json:"thirdinamount" xorm:"THIRDINAMOUNT"`                             // 本周期三方入金
+	TRADECHARGE                float64   `json:"tradecharge" xorm:"TRADECHARGE"`                                 // 本周期交易手续费支出 [101,102]
+	INTERESTCHARGE             float64   `json:"interestcharge" xorm:"INTERESTCHARGE"`                           // 本周期递延费支出[103, 104]
+	DELIVERYCHARGE             float64   `json:"deliverycharge" xorm:"DELIVERYCHARGE"`                           // 本周期交收手续费支出 [105,106]
+	HOLDCHARGE                 float64   `json:"holdcharge" xorm:"HOLDCHARGE"`                                   // 本周期持仓过夜费支出[108,109, 110]
+	THIRDOUTAMOUNT             float64   `json:"thirdoutamount" xorm:"THIRDOUTAMOUNT"`                           // 本周期三方出金
+	TRADEQTY                   int64     `json:"tradeqty" xorm:"TRADEQTY"`                                       // 本周期成交量
+	TRADEAMOUNT                float64   `json:"tradeamount" xorm:"TRADEAMOUNT"`                                 // 本周期成交金额
+	DELIVERYAMOUNTOUT          float64   `json:"deliveryamountout" xorm:"DELIVERYAMOUNTOUT"`                     // 本周期交收货款支出
+	DELIVERYAMOUNTIN           float64   `json:"deliveryamountin" xorm:"DELIVERYAMOUNTIN"`                       // 本周期交收货款收入
+	DELIVERYCOMPENSATIONFEEOUT float64   `json:"deliverycompensationfeeout" xorm:"DELIVERYCOMPENSATIONFEEOUT"`   // 本周期交收补偿费支出
+	DELIVERYCOMPENSATIONFEEIN  float64   `json:"deliverycompensationfeein" xorm:"DELIVERYCOMPENSATIONFEEIN"`     // 本周期交收补偿费收入
+	CAPITALBALANCE             float64   `json:"capitalbalance" xorm:"CAPITALBALANCE"`                           // 本周期本金余额[外部子账户实际出入金余额]
+	CLOSEPL2                   float64   `json:"closepl2" xorm:"CLOSEPL2"`                                       // 平仓盈亏(逐笔)
+	RECKONPL2                  float64   `json:"reckonpl2" xorm:"RECKONPL2"`                                     // 结算盈亏(逐笔) - 汇总取期末
+	NETVALUE                   float64   `json:"netvalue" xorm:"NETVALUE"`                                       // 净值  = 期末余额 + 所有权市值
+	PAYCHARGE2                 float64   `json:"paycharge2" xorm:"PAYCHARGE2"`                                   // 今日手续费支出(外部配置)
+	DEFERCHARGE                float64   `json:"defercharge" xorm:"DEFERCHARGE"`                                 // 本周期递延费2支出[111, 112]
+	FROMACCOUNTID              int64     `json:"fromaccountid" xorm:"FROMACCOUNTID"`                             // 所属上级账户
+	SUBLEVELPATH               string    `json:"sublevelpath" xorm:"SUBLEVELPATH"`                               // 账号层级路径(逗号分隔,首尾加逗号)
+	RELATEUSERID               int64     `json:"relateuserid" xorm:"RELATEUSERID"`                               // 关联用户
+	OWNERSHIPVALUE             float64   `json:"ownershipvalue" xorm:"OWNERSHIPVALUE"`                           // 所有权市值
+	SPOTVALUE                  float64   `json:"spotvalue" xorm:"SPOTVALUE"`                                     // 现货市值-统计服务更新
+	ACCOUNTPL                  float64   `json:"accountpl" xorm:"ACCOUNTPL"`                                     // 今日账户盈亏 = 今日净值-昨日净值+今日出金-今日入金-今日划转+今日授信减少-今日授信增加+今日其它授信减少-今日其它授信增加+今日三方出金-今日三方入金;由统计服务更新
+	ACCOUNTNAME                string    `json:"accountname" xorm:"ACCOUNTNAME"`                                 // 账户名称
+	ORIDEBT                    float64   `json:"oridebt" xorm:"ORIDEBT"`                                         // 期初欠款【期初】
+	CURDEBT                    float64   `json:"curdebt" xorm:"CURDEBT"`                                         // 期末欠款【期末】
+	AVAIABLEMONEY              float64   `json:"avaiablemoney" xorm:"AVAIABLEMONEY"`                             // 可用资金【期末】
+	AVAIABLEOUTMONEY           float64   `json:"avaiableoutmoney" xorm:"AVAIABLEOUTMONEY"`                       // 可出资金【期末】
+	FLOATPL                    float64   `json:"floatpl" xorm:"FLOATPL"`                                         // 浮动盈亏【期末】
+	FLOATNETVALUE              float64   `json:"floatnetvalue" xorm:"FLOATNETVALUE"`                             // 浮动净值【期末】
+	RISKRATE                   float64   `json:"riskrate" xorm:"RISKRATE"`                                       // 风险率【期末】
+}
+
+func (r *Reporttaaccount) calc() {
+
+}
+
+func (r *Reporttaaccount) buildSql() string {
+	var sqlId utils.SQLVal = `
+	select 
+		t.accountid,
+		t.cycletype,
+		t.cycletime,
+		t.updatetime,
+		t.userid,
+		t.ismain,
+		t.parentaccountid,
+		t.taaccounttype,
+		t.currencyid,
+		t.balance,
+		t.orifreezemargin,
+		t.oriusedmargin,
+		t.oriotherfreezemargin,
+		t.orifreezecharge,
+		t.orimortgagecredit,
+		t.oriothercredit,
+		t.orioutamountfreeze,
+		t.currentbalance,
+		t.freezemargin,
+		t.usedmargin,
+		t.otherfreezemargin,
+		t.freezecharge,
+		t.mortgagecredit,
+		t.othercredit,
+		t.outamountfreeze,
+		t.inamount,
+		t.outamount,
+		t.paycharge,
+		t.closepl,
+		t.reckonpl,
+		t.creditincrease,
+		t.creditdecrease,
+		t.othercreditincrease,
+		t.othercreditdecrease,
+		t.otherpay,
+		t.otherincome,
+		t.transferamount,
+		t.outthreshold,
+		t.clearbalance,
+		t.dividedcharge,
+		t.payexchcharge,
+		t.clearpl,
+		t.thirdinamount,
+		t.tradecharge,
+		t.interestcharge,
+		t.deliverycharge,
+		t.holdcharge,
+		t.thirdoutamount,
+		t.tradeqty,
+		t.tradeamount,
+		t.deliveryamountout,
+		t.deliveryamountin,
+		t.deliverycompensationfeeout,
+		t.deliverycompensationfeein,
+		t.capitalbalance,
+		t.closepl2,
+		t.reckonpl2,
+		t.netvalue,
+		t.paycharge2,
+		t.defercharge,
+		t.fromaccountid,
+		t.sublevelpath,
+		t.relateuserid,
+		t.ownershipvalue,
+		t.spotvalue,
+		t.accountpl,
+		t.accountname,
+		t.oridebt,
+		t.curdebt,
+		t.avaiablemoney,
+		t.avaiableoutmoney,
+		t.floatpl,
+		t.floatnetvalue,
+		t.riskrate
+	from report_taaccount t
+	where t.cycletype = 1 and t.cycletime = %v and t.accountid = %v 
+	`
+	sqlId.FormatParam(r.CYCLETIME, r.ACCOUNTID)
+
+	return sqlId.String()
+}
+
+// GetDataEx 从数据库中查询数据
+func (r *Reporttaaccount) GetDataEx() (interface{}, error) {
+	e := db.GetEngine()
+	s := e.SQL(r.buildSql())
+	sData := make([]Reporttaaccount, 0)
+	if err := s.Find(&sData); err != nil {
+		return nil, err
+	}
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, nil
+}

+ 12 - 0
routers/router.go

@@ -23,6 +23,7 @@ import (
 	"mtp2_if/controllers/qhj"
 	"mtp2_if/controllers/qhjPCWeb"
 	"mtp2_if/controllers/quote"
+	"mtp2_if/controllers/report"
 	"mtp2_if/controllers/sbyj"
 	"mtp2_if/controllers/search"
 	"mtp2_if/controllers/szdz"
@@ -797,6 +798,17 @@ func InitRouter() *gin.Engine {
 		bankR.Use(token.Auth()).GET("QueryBankCusBankExtendConfigs", bank.QueryBankCusBankExtendConfigs)
 	}
 
+	// ************************* 报表 *************************
+	reportR := apiR.Group("Report")
+	reportR.Use(token.Auth())
+	{
+		reportR.GET("QueryReportReckonDayTaaccount", report.QueryReportReckonDayTaaccount)
+		reportR.GET("QueryReportBankAccountOutInLog", report.QueryReportBankAccountOutInLog)
+		reportR.GET("QueryReportReckonDayPosition", report.QueryReportReckonDayPosition)
+		reportR.GET("QueryReportTradeDetail", report.QueryReportTradeDetail)
+		reportR.GET("QueryReportMonthTaaccount", report.QueryReportMonthTaaccount)
+	}
+
 	return r
 }