Преглед на файлове

WrHoldLB: 添加 SpotGoodsPrice

deng.yinping преди 3 години
родител
ревизия
2a4cc5fc0b
променени са 4 файла, в които са добавени 18 реда и са изтрити 3 реда
  1. 4 0
      docs/docs.go
  2. 4 0
      docs/swagger.json
  3. 3 0
      docs/swagger.yaml
  4. 7 3
      models/wrTrade2.go

+ 4 - 0
docs/docs.go

@@ -48090,6 +48090,10 @@ const docTemplate = `{
                     "description": "数量",
                     "type": "number"
                 },
+                "spotgoodsprice": {
+                    "description": "参考价(THJ)",
+                    "type": "number"
+                },
                 "subnum": {
                     "description": "提单子单号",
                     "type": "integer"

+ 4 - 0
docs/swagger.json

@@ -48081,6 +48081,10 @@
                     "description": "数量",
                     "type": "number"
                 },
+                "spotgoodsprice": {
+                    "description": "参考价(THJ)",
+                    "type": "number"
+                },
                 "subnum": {
                     "description": "提单子单号",
                     "type": "integer"

+ 3 - 0
docs/swagger.yaml

@@ -21543,6 +21543,9 @@ definitions:
       qty:
         description: 数量
         type: number
+      spotgoodsprice:
+        description: 参考价(THJ)
+        type: number
       subnum:
         description: 提单子单号
         type: integer

+ 7 - 3
models/wrTrade2.go

@@ -1805,8 +1805,9 @@ type WrHoldLB struct {
 	THUMURLS        string  `json:"thumurls"  xorm:"thumurls"`                                      // 缩略图
 	Wr2FactorType   `xorm:"extends"`
 
-	WRHOLDENO string  `json:"wrholdeno"` // 仓单编号
-	ENABLEQTY float64 `json:"enableqty"` // 可用数量
+	WRHOLDENO      string  `json:"wrholdeno"`                               // 仓单编号
+	ENABLEQTY      float64 `json:"enableqty"`                               // 可用数量
+	SPOTGOODSPRICE float64 `json:"spotgoodsprice"  xorm:"'SPOTGOODSPRICE'"` // 参考价(THJ)
 
 	DGITEMNAME string `json:"-" form:"dgitemname"`
 }
@@ -1856,11 +1857,14 @@ func (r *WrHoldLB) buildSql() string {
 		"       t.ACCOUNTID," +
 		"       to_char(t.CREATETIME, 'yyyy-mm-dd hh24:mi:ss') CREATETIME," +
 		"       t.TRADEDATE," +
-		"       t.WRID," +
+		"       to_char(t.WRID) WRID," +
 		"       t.PARENTSUBNUM," +
+		"       sgp.SPOTGOODSPRICE," +
 		"       tmp.*" +
 		"  FROM WRHOLDLB t" +
 		" LEFT JOIN tmp on t.wrfactortypeid= tmp.wrfactortypeid" +
+		" LEFT JOIN ERMCP_SpotGoodsPrice sgp ON sgp.deliverygoodsid = tmp.deliverygoodsid" +
+		" AND sgp.wrstandardid = tmp.wrstandardid AND sgp.spotgoodsbrandid =0 and sgp.currencyid = 1" +
 		" WHERE 1 = 1"
 	sqlId.And("t.ACCOUNTID", r.ACCOUNTID)
 	sqlId.AndEx("tmp.DELIVERYGOODSID", r.DELIVERYGOODSID, r.DELIVERYGOODSID > 0)