Просмотр исходного кода

修改我的闲置中已成交单据数量BUG

zhou.xiaoning 4 лет назад
Родитель
Сommit
4a8067d822
4 измененных файлов с 13 добавлено и 40 удалено
  1. 4 13
      docs/docs.go
  2. 4 13
      docs/swagger.json
  3. 3 10
      docs/swagger.yaml
  4. 2 4
      models/hsby.go

+ 4 - 13
docs/docs.go

@@ -7573,7 +7573,6 @@ var doc = `{
                 "goodsname",
                 "marketid",
                 "orderid",
-                "orderqty",
                 "time",
                 "trademode"
             ],
@@ -7590,10 +7589,6 @@ var doc = `{
                     "description": "买卖 - 0:买 1:卖",
                     "type": "integer"
                 },
-                "cancelqty": {
-                    "description": "撤单数量",
-                    "type": "integer"
-                },
                 "currencysign": {
                     "description": "货币符号",
                     "type": "string"
@@ -7622,10 +7617,6 @@ var doc = `{
                     "description": "单号(发布中 - 委托单号;已完成 - 成交单号)",
                     "type": "string"
                 },
-                "orderqty": {
-                    "description": "委托数量",
-                    "type": "integer"
-                },
                 "ordertype": {
                     "description": "单据类型:0 - 发布中, 1 - 已完成",
                     "type": "integer"
@@ -7638,6 +7629,10 @@ var doc = `{
                     "description": "价格",
                     "type": "number"
                 },
+                "qty": {
+                    "description": "数量",
+                    "type": "integer"
+                },
                 "time": {
                     "description": "时间",
                     "type": "string"
@@ -7646,10 +7641,6 @@ var doc = `{
                     "description": "交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价",
                     "type": "integer"
                 },
-                "tradeqty": {
-                    "description": "成交数量",
-                    "type": "integer"
-                },
                 "vendorname": {
                     "description": "供应商名称",
                     "type": "string"

+ 4 - 13
docs/swagger.json

@@ -7557,7 +7557,6 @@
                 "goodsname",
                 "marketid",
                 "orderid",
-                "orderqty",
                 "time",
                 "trademode"
             ],
@@ -7574,10 +7573,6 @@
                     "description": "买卖 - 0:买 1:卖",
                     "type": "integer"
                 },
-                "cancelqty": {
-                    "description": "撤单数量",
-                    "type": "integer"
-                },
                 "currencysign": {
                     "description": "货币符号",
                     "type": "string"
@@ -7606,10 +7601,6 @@
                     "description": "单号(发布中 - 委托单号;已完成 - 成交单号)",
                     "type": "string"
                 },
-                "orderqty": {
-                    "description": "委托数量",
-                    "type": "integer"
-                },
                 "ordertype": {
                     "description": "单据类型:0 - 发布中, 1 - 已完成",
                     "type": "integer"
@@ -7622,6 +7613,10 @@
                     "description": "价格",
                     "type": "number"
                 },
+                "qty": {
+                    "description": "数量",
+                    "type": "integer"
+                },
                 "time": {
                     "description": "时间",
                     "type": "string"
@@ -7630,10 +7625,6 @@
                     "description": "交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价",
                     "type": "integer"
                 },
-                "tradeqty": {
-                    "description": "成交数量",
-                    "type": "integer"
-                },
                 "vendorname": {
                     "description": "供应商名称",
                     "type": "string"

+ 3 - 10
docs/swagger.yaml

@@ -2919,9 +2919,6 @@ definitions:
       buyorsell:
         description: 买卖 - 0:买 1:卖
         type: integer
-      cancelqty:
-        description: 撤单数量
-        type: integer
       currencysign:
         description: 货币符号
         type: string
@@ -2943,9 +2940,6 @@ definitions:
       orderid:
         description: 单号(发布中 - 委托单号;已完成 - 成交单号)
         type: string
-      orderqty:
-        description: 委托数量
-        type: integer
       ordertype:
         description: 单据类型:0 - 发布中, 1 - 已完成
         type: integer
@@ -2955,6 +2949,9 @@ definitions:
       price:
         description: 价格
         type: number
+      qty:
+        description: 数量
+        type: integer
       time:
         description: 时间
         type: string
@@ -2962,9 +2959,6 @@ definitions:
         description: 交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式
           21:竞拍-大宗式 22:受托竞价
         type: integer
-      tradeqty:
-        description: 成交数量
-        type: integer
       vendorname:
         description: 供应商名称
         type: string
@@ -2976,7 +2970,6 @@ definitions:
     - goodsname
     - marketid
     - orderid
-    - orderqty
     - time
     - trademode
     type: object

+ 2 - 4
models/hsby.go

@@ -783,9 +783,7 @@ type HsbySellMyDetail struct {
 	Buyorsell int32     `json:"buyorsell"  xorm:"'BUYORSELL'" binding:"required"` // 买卖 - 0:买 1:卖
 	Price     float64   `json:"price"  xorm:"'PRICE'"`                            // 价格
 	Time      time.Time `json:"time"  xorm:"'TIME'" binding:"required"`           // 时间
-	Orderqty  int64     `json:"orderqty"  xorm:"'ORDERQTY'" binding:"required"`   // 委托数量
-	Tradeqty  int64     `json:"tradeqty"  xorm:"'TRADEQTY'"`                      // 成交数量
-	Cancelqty int64     `json:"cancelqty"  xorm:"'CANCELQTY'"`                    // 撤单数量
+	Qty       int64     `json:"qty"  xorm:"'QTY'"`                                // 数量
 
 	Goodscode    string  `json:"goodscode"  xorm:"'GOODSCODE'" binding:"required"` // 商品代码(内部)
 	Goodsname    string  `json:"goodsname"  xorm:"'GOODSNAME'" binding:"required"` // 商品名称
@@ -833,7 +831,7 @@ func GetHsbySellMyOrderDetails(accountIDs string) ([]HsbySellMyDetail, error) {
 		Select(`to_char(TRADE_ORDERDETAIL.ORDERID) ORDERID, 
 				TRADE_ORDERDETAIL.MARKETID, TRADE_ORDERDETAIL.GOODSID, TRADE_ORDERDETAIL.ACCOUNTID, TRADE_ORDERDETAIL.BUYORSELL,
 				TRADE_ORDERDETAIL.ORDERPRICE PRICE, TRADE_ORDERDETAIL.ORDERTIME TIME, 
-				TRADE_ORDERDETAIL.ORDERQTY, TRADE_ORDERDETAIL.TRADEQTY, TRADE_ORDERDETAIL.CANCELQTY,
+				(TRADE_ORDERDETAIL.ORDERQTY - TRADE_ORDERDETAIL.TRADEQTY - TRADE_ORDERDETAIL.CANCELQTY) QTY,
 				GOODS.GOODSCODE, GOODS.GOODSNAME, GOODS.DECIMALPLACE, GOODS.AGREEUNIT, 
 				HSBY_GOODSEX.PICURLS, 
 				MARKET.TRADEMODE,