Przeglądaj źródła

查询套保计划 增加品类单位字段

zou.yingbin 4 lat temu
rodzic
commit
f4f929594e
4 zmienionych plików z 36 dodań i 8 usunięć
  1. 10 2
      docs/docs.go
  2. 10 2
      docs/swagger.json
  3. 8 2
      docs/swagger.yaml
  4. 8 2
      models/ermcp3.go

+ 10 - 2
docs/docs.go

@@ -14529,7 +14529,7 @@ var doc = `{
                     "type": "string"
                 },
                 "enumdicname": {
-                    "description": "单位名称",
+                    "description": "单位名称(现货商品)",
                     "type": "string"
                 },
                 "hedgeplanid": {
@@ -14577,7 +14577,7 @@ var doc = `{
                     "type": "string"
                 },
                 "unitid": {
-                    "description": "单位id",
+                    "description": "单位id(现货商品)",
                     "type": "integer"
                 },
                 "updatetime": {
@@ -14595,6 +14595,14 @@ var doc = `{
                 "wrstandardname": {
                     "description": "品类名称",
                     "type": "string"
+                },
+                "wrunitid": {
+                    "description": "品类单位id",
+                    "type": "integer"
+                },
+                "wrunitidame": {
+                    "description": "品类单位名称",
+                    "type": "string"
                 }
             }
         },

+ 10 - 2
docs/swagger.json

@@ -14513,7 +14513,7 @@
                     "type": "string"
                 },
                 "enumdicname": {
-                    "description": "单位名称",
+                    "description": "单位名称(现货商品)",
                     "type": "string"
                 },
                 "hedgeplanid": {
@@ -14561,7 +14561,7 @@
                     "type": "string"
                 },
                 "unitid": {
-                    "description": "单位id",
+                    "description": "单位id(现货商品)",
                     "type": "integer"
                 },
                 "updatetime": {
@@ -14579,6 +14579,14 @@
                 "wrstandardname": {
                     "description": "品类名称",
                     "type": "string"
+                },
+                "wrunitid": {
+                    "description": "品类单位id",
+                    "type": "integer"
+                },
+                "wrunitidame": {
+                    "description": "品类单位名称",
+                    "type": "string"
                 }
             }
         },

+ 8 - 2
docs/swagger.yaml

@@ -3864,7 +3864,7 @@ definitions:
         description: 现货品种名称
         type: string
       enumdicname:
-        description: 单位名称
+        description: 单位名称(现货商品)
         type: string
       hedgeplanid:
         description: 套保计划ID(601+Unix秒时间戳(10位)+xxxxxx)
@@ -3900,7 +3900,7 @@ definitions:
         description: 交易用户名称
         type: string
       unitid:
-        description: 单位id
+        description: 单位id(现货商品)
         type: integer
       updatetime:
         description: 更新时间
@@ -3914,6 +3914,12 @@ definitions:
       wrstandardname:
         description: 品类名称
         type: string
+      wrunitid:
+        description: 品类单位id
+        type: integer
+      wrunitidame:
+        description: 品类单位名称
+        type: string
     type: object
   models.Ermcp3MiddleGoodsDetail2:
     properties:

+ 8 - 2
models/ermcp3.go

@@ -1929,8 +1929,8 @@ type Ermcp3HedgePlan struct {
 	CREATETIME        string  `json:"createtime"  xorm:"'CREATETIME'"`               // 创建时间
 	UPDATETIME        string  `json:"updatetime"  xorm:"'UPDATETIME'"`               // 更新时间
 	AUDITTIME         string  `json:"audittime"  xorm:"'AUDITTIME'"`                 // 审核时间
-	UNITID            int32   `json:"unitid"  xorm:"'UNITID'"`                       // 单位id
-	ENUMDICNAME       string  `json:"enumdicname"`                                   // 单位名称
+	UNITID            int32   `json:"unitid"  xorm:"'UNITID'"`                       // 单位id(现货商品)
+	ENUMDICNAME       string  `json:"enumdicname"`                                   // 单位名称(现货商品)
 	WRSTANDARDID      int32   `json:"wrstandardid"  xorm:"'WRSTANDARDID'"`           // 品类id
 	WRSTANDARDCODE    string  `json:"wrstandardcode"  xorm:"'WRSTANDARDCODE'"`       // 品类代码
 	WRSTANDARDNAME    string  `json:"wrstandardname"  xorm:"'WRSTANDARDNAME'"`       // 品类名称
@@ -1938,7 +1938,9 @@ type Ermcp3HedgePlan struct {
 	TAACCOUNTNAME     string  `json:"taaccountname"  xorm:"'TAACCOUNTNAME'"`         // 资金账号名称
 	TRADEUSERID       int64   `json:"tradeuserid"  xorm:"'TRADEUSERID'"`             // 交易用户id
 	CURRENCYID        int32   `json:"currencyid"  xorm:"'CURRENCYID'"`               // 币种id
+	WRUNITID          int32   `json:"wrunitid"  xorm:"'WRUNITID'"`                   // 品类单位id
 
+	WRUNITIDNAME  string `json:"wrunitidame"`   // 品类单位名称
 	TRADEUSERNAME string `json:"tradeusername"` // 交易用户名称
 	CURRENCYNAME  string `json:"currencyname"`  // 币种名称
 }
@@ -1947,6 +1949,9 @@ func (r *Ermcp3HedgePlan) calc() {
 	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.UNITID)
 	r.TRADEUSERNAME = mtpcache.GetUserNameByUserId(r.TRADEUSERID)
 	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
+	if r.WRUNITID > 0 {
+		r.WRUNITIDNAME = mtpcache.GetEnumDicitemName(r.WRUNITID)
+	}
 }
 
 func (r *Ermcp3HedgePlan) buildSql(status string) string {
@@ -1970,6 +1975,7 @@ func (r *Ermcp3HedgePlan) buildSql(status string) string {
 		"       t.wrstandardid," +
 		"       w.wrstandardcode," +
 		"       w.wrstandardname," +
+		"       w.unitid wrunitid," +
 		"       t.accountid," +
 		"       t.tradeuserid," +
 		"       t.currencyid," +