ソースを参照

#255 查挂单增加提单号

zou.yingbin 4 年 前
コミット
913fb62b49
4 ファイル変更30 行追加0 行削除
  1. 8 0
      docs/docs.go
  2. 8 0
      docs/swagger.json
  3. 6 0
      docs/swagger.yaml
  4. 8 0
      models/wrTrade2.go

+ 8 - 0
docs/docs.go

@@ -32815,6 +32815,10 @@ var doc = `{
                     "description": "是否指定对手 - 0:不指定 1:指定    -   [挂牌]",
                     "type": "integer"
                 },
+                "ladingbillid": {
+                    "description": "提单ID(208+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "string"
+                },
                 "marginvalue": {
                     "description": "保证金设置值(履约保证金)",
                     "type": "number"
@@ -32851,6 +32855,10 @@ var doc = `{
                     "description": "升贴水(浮动价时填写)    -   [挂牌]",
                     "type": "number"
                 },
+                "subnum": {
+                    "description": "提单子单号",
+                    "type": "integer"
+                },
                 "taname": {
                     "description": "交易用户名称(资金账号名称)",
                     "type": "string"

+ 8 - 0
docs/swagger.json

@@ -32799,6 +32799,10 @@
                     "description": "是否指定对手 - 0:不指定 1:指定    -   [挂牌]",
                     "type": "integer"
                 },
+                "ladingbillid": {
+                    "description": "提单ID(208+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "string"
+                },
                 "marginvalue": {
                     "description": "保证金设置值(履约保证金)",
                     "type": "number"
@@ -32835,6 +32839,10 @@
                     "description": "升贴水(浮动价时填写)    -   [挂牌]",
                     "type": "number"
                 },
+                "subnum": {
+                    "description": "提单子单号",
+                    "type": "integer"
+                },
                 "taname": {
                     "description": "交易用户名称(资金账号名称)",
                     "type": "string"

+ 6 - 0
docs/swagger.yaml

@@ -14679,6 +14679,9 @@ definitions:
       isspecified:
         description: 是否指定对手 - 0:不指定 1:指定    -   [挂牌]
         type: integer
+      ladingbillid:
+        description: 提单ID(208+Unix秒时间戳(10位)+xxxxxx)
+        type: string
       marginvalue:
         description: 保证金设置值(履约保证金)
         type: number
@@ -14706,6 +14709,9 @@ definitions:
       pricemove:
         description: 升贴水(浮动价时填写)    -   [挂牌]
         type: number
+      subnum:
+        description: 提单子单号
+        type: integer
       taname:
         description: 交易用户名称(资金账号名称)
         type: string

+ 8 - 0
models/wrTrade2.go

@@ -654,6 +654,8 @@ type WrOrderDetail struct {
 	VALIDTIME             string   `json:"validtime"  xorm:"'VALIDTIME'"`                         // 挂牌有效期
 	TANAME                string   `json:"taname"  xorm:"'TANAME'"`                               // 交易用户名称(资金账号名称)
 	PERFORMANCETEMPLATEID int64    `json:"performancetemplateid"  xorm:"'PERFORMANCETEMPLATEID'"` // 履约模板id
+	LADINGBILLID          string   `json:"ladingbillid"  xorm:"LADINGBILLID" form:"ladingbillid"` // 提单ID(208+Unix秒时间戳(10位)+xxxxxx)
+	SUBNUM                int32    `json:"-"  xorm:"SUBNUM" form:"subnum"`                        // 提单子单号
 
 	Wr2FactorType `xorm:"extends"`
 	PageEx        `xorm:"extends"`
@@ -691,6 +693,9 @@ func (r *WrOrderDetail) calc() {
 		}
 		r.MATCHUSERNAME = newStr
 	}
+	if r.SUBNUM > 0 {
+		r.LADINGBILLID += fmt.Sprintf("-%v", r.SUBNUM)
+	}
 }
 
 func (r *WrOrderDetail) buildSql() string {
@@ -756,10 +761,13 @@ select t.HASWR,
        g.goodsname,
        mr.matchusername,
        ta.accountname taname,
+       to_char(b.ladingbillid) ladingbillid,
+       b.subnum,
        k.*
   from wrtrade_orderdetail t
   left join wrtrade_goodsconfig c
     on t.wrtradeorderid = c.wrtradeorderid
+  left join wrtrade_orderdetaillb b on t.wrtradeorderid=b.wrtradeorderid
   left join goods g
     on c.goodsid = g.goodsid
   left join tmp k