zhouxnsz 1 年間 前
コミット
a433d10209
4 ファイル変更39 行追加1 行削除
  1. 12 0
      docs/docs.go
  2. 12 0
      docs/swagger.json
  3. 9 0
      docs/swagger.yaml
  4. 6 1
      models/report.go

+ 12 - 0
docs/docs.go

@@ -52691,6 +52691,10 @@ const docTemplate = `{
                     "description": "均价",
                     "type": "string"
                 },
+                "buyorsell": {
+                    "description": "买卖方向 0-买 1-卖",
+                    "type": "integer"
+                },
                 "buyorselldisplay": {
                     "description": "方向",
                     "type": "string"
@@ -53066,6 +53070,14 @@ const docTemplate = `{
                     "description": "资金账户",
                     "type": "integer"
                 },
+                "buildtype": {
+                    "description": "委托单据类型 - 1:建仓 2:平仓 3:先平后建",
+                    "type": "integer"
+                },
+                "buyorsell": {
+                    "description": "买卖方向 - 0:买 1:卖",
+                    "type": "integer"
+                },
                 "buyorselldisplay": {
                     "description": "类型/方向",
                     "type": "string"

+ 12 - 0
docs/swagger.json

@@ -52682,6 +52682,10 @@
                     "description": "均价",
                     "type": "string"
                 },
+                "buyorsell": {
+                    "description": "买卖方向 0-买 1-卖",
+                    "type": "integer"
+                },
                 "buyorselldisplay": {
                     "description": "方向",
                     "type": "string"
@@ -53057,6 +53061,14 @@
                     "description": "资金账户",
                     "type": "integer"
                 },
+                "buildtype": {
+                    "description": "委托单据类型 - 1:建仓 2:平仓 3:先平后建",
+                    "type": "integer"
+                },
+                "buyorsell": {
+                    "description": "买卖方向 - 0:买 1:卖",
+                    "type": "integer"
+                },
                 "buyorselldisplay": {
                     "description": "类型/方向",
                     "type": "string"

+ 9 - 0
docs/swagger.yaml

@@ -21574,6 +21574,9 @@ definitions:
       avagepricedisplay:
         description: 均价
         type: string
+      buyorsell:
+        description: 买卖方向 0-买 1-卖
+        type: integer
       buyorselldisplay:
         description: 方向
         type: string
@@ -21856,6 +21859,12 @@ definitions:
       accountid:
         description: 资金账户
         type: integer
+      buildtype:
+        description: 委托单据类型 - 1:建仓 2:平仓 3:先平后建
+        type: integer
+      buyorsell:
+        description: 买卖方向 - 0:买 1:卖
+        type: integer
       buyorselldisplay:
         description: 类型/方向
         type: string

+ 6 - 1
models/report.go

@@ -267,6 +267,7 @@ type ReportReckonDayPosition struct {
 	DECIMALPLACE      int32   `json:"decimalplace" xorm:"DECIMALPLACE"`                                  // 报价小数位
 	BUYORSELLDISPLAY  string  `json:"buyorselldisplay" xorm:"BUYORSELLDISPLAY"`                          // 方向
 	AVAGEPRICEDISPLAY string  `json:"avagepricedisplay" xorm:"AVAGEPRICEDISPLAY"`                        // 均价
+	BUYORSELL         int32   `json:"buyorsell"  xorm:"'BUYORSELL'" form:"buyorsell"`                    // 买卖方向 0-买 1-卖
 
 	ReportType int `form:"reporttype" binding:"required"` // 报表类型 日报表-1 月报表-2
 
@@ -423,6 +424,8 @@ type ReportTradeDetail struct {
 	GOODSID          int32   `json:"goodsid" xorm:"GOODSID"`                                                  // 期货合约ID(自增ID SEQ_GOODS)
 	DECIMALPLACE     int32   `json:"decimalplace" xorm:"DECIMALPLACE"`                                        // 报价小数位
 	HISTRADEDATE     string  `json:"histradedate" xorm:"HISTRADEDATE" form:"histradedate" binding:"required"` // 查询日期 日报表-yyyyMMdd 月报表-yyyyMM
+	BUYORSELL        int32   `json:"buyorsell" xorm:"BUYORSELL"`                                              // 买卖方向 - 0:买 1:卖
+	BUILDTYPE        int32   `json:"buildtype" xorm:"BUILDTYPE"`                                              // 委托单据类型 - 1:建仓 2:平仓 3:先平后建
 
 	ReportType int `form:"reporttype" binding:"required"` // 报表类型 日报表-1 月报表-2
 
@@ -446,7 +449,9 @@ func (r *ReportTradeDetail) buildSql() string {
 		t.tradeid,
 		g.decimalplace,
 		g.goodsid,
-		t.accountid
+		t.accountid,
+		t.buyorsell,
+		t.buildtype
 	from his_trade_tradedetail t
 		left join goods g
 			on g.goodsid = t.goodsid