Ver código fonte

“查询采购列表”和“查询供求列表”增加出参

zhou.xiaoning 3 anos atrás
pai
commit
d148e25ad7
5 arquivos alterados com 177 adições e 23 exclusões
  1. 1 1
      controllers/ferroalloy/trade.go
  2. 58 2
      docs/docs.go
  3. 58 2
      docs/swagger.json
  4. 44 2
      docs/swagger.yaml
  5. 16 16
      models/ferroalloy.go

+ 1 - 1
controllers/ferroalloy/trade.go

@@ -50,7 +50,7 @@ func QueryTHJTradeData(c *gin.Context) {
 // @Produce  json
 // @Security ApiKeyAuth
 // @Param    userid    query    int true  "用户ID"
-// @Param    ordertype query    int true  "类型 - 1:转让 2:受让"
+// @Param    ordertype query    int true  "类型 - 1:转让 2:受让 3:转让委托已完成"
 // @Param    page      query    int false "页码"
 // @Param    pagesize  query    int false "每页条数"
 // @Success  200       {array}  models.Thjpurchasetransfer

+ 58 - 2
docs/docs.go

@@ -8148,7 +8148,7 @@ const docTemplate = `{
                     },
                     {
                         "type": "integer",
-                        "description": "类型 - 1:转让 2:受让",
+                        "description": "类型 - 1:转让 2:受让 3:转让委托已完成",
                         "name": "ordertype",
                         "in": "query",
                         "required": true
@@ -30804,7 +30804,7 @@ const docTemplate = `{
             "properties": {
                 "chg": {
                     "description": "涨跌幅",
-                    "type": "string"
+                    "type": "number"
                 },
                 "currencyid": {
                     "description": "报价货币ID",
@@ -40864,6 +40864,62 @@ const docTemplate = `{
         "models.THJWrstandard": {
             "type": "object",
             "properties": {
+                "AREAUSERID": {
+                    "description": "所属机构",
+                    "type": "integer"
+                },
+                "BANNERPICURL": {
+                    "description": "Banner图(逗号分隔)",
+                    "type": "string"
+                },
+                "CONVERTFACTOR": {
+                    "description": "标仓系数",
+                    "type": "number"
+                },
+                "DELIVERYGOODSID": {
+                    "description": "现货品种ID",
+                    "type": "integer"
+                },
+                "ISVALID": {
+                    "description": "是否有效 - 0:无效 1:有效",
+                    "type": "integer"
+                },
+                "MINIVALUE": {
+                    "description": "最小变动值",
+                    "type": "integer"
+                },
+                "MINIVALUEDP": {
+                    "description": "最小变动值小数位",
+                    "type": "integer"
+                },
+                "PICTUREURLS": {
+                    "description": "详情图片(逗号分隔)",
+                    "type": "string"
+                },
+                "REALMINIVALUE": {
+                    "description": "实际最小变动值",
+                    "type": "integer"
+                },
+                "REALMINIVALUEDP": {
+                    "description": "实际最小变动值小数位",
+                    "type": "integer"
+                },
+                "STORAGEFEE": {
+                    "description": "仓储费(固定: 111)",
+                    "type": "number"
+                },
+                "UNITID": {
+                    "description": "现货商品单位ID",
+                    "type": "integer"
+                },
+                "VATRATE": {
+                    "description": "现货增值税率",
+                    "type": "number"
+                },
+                "WRSSTATUS": {
+                    "description": "状态 - 作废 - 0:未激活 1:正常",
+                    "type": "integer"
+                },
                 "thumurls": {
                     "description": "缩略图片(1:1)(逗号分隔)",
                     "type": "string"

+ 58 - 2
docs/swagger.json

@@ -8139,7 +8139,7 @@
                     },
                     {
                         "type": "integer",
-                        "description": "类型 - 1:转让 2:受让",
+                        "description": "类型 - 1:转让 2:受让 3:转让委托已完成",
                         "name": "ordertype",
                         "in": "query",
                         "required": true
@@ -30795,7 +30795,7 @@
             "properties": {
                 "chg": {
                     "description": "涨跌幅",
-                    "type": "string"
+                    "type": "number"
                 },
                 "currencyid": {
                     "description": "报价货币ID",
@@ -40855,6 +40855,62 @@
         "models.THJWrstandard": {
             "type": "object",
             "properties": {
+                "AREAUSERID": {
+                    "description": "所属机构",
+                    "type": "integer"
+                },
+                "BANNERPICURL": {
+                    "description": "Banner图(逗号分隔)",
+                    "type": "string"
+                },
+                "CONVERTFACTOR": {
+                    "description": "标仓系数",
+                    "type": "number"
+                },
+                "DELIVERYGOODSID": {
+                    "description": "现货品种ID",
+                    "type": "integer"
+                },
+                "ISVALID": {
+                    "description": "是否有效 - 0:无效 1:有效",
+                    "type": "integer"
+                },
+                "MINIVALUE": {
+                    "description": "最小变动值",
+                    "type": "integer"
+                },
+                "MINIVALUEDP": {
+                    "description": "最小变动值小数位",
+                    "type": "integer"
+                },
+                "PICTUREURLS": {
+                    "description": "详情图片(逗号分隔)",
+                    "type": "string"
+                },
+                "REALMINIVALUE": {
+                    "description": "实际最小变动值",
+                    "type": "integer"
+                },
+                "REALMINIVALUEDP": {
+                    "description": "实际最小变动值小数位",
+                    "type": "integer"
+                },
+                "STORAGEFEE": {
+                    "description": "仓储费(固定: 111)",
+                    "type": "number"
+                },
+                "UNITID": {
+                    "description": "现货商品单位ID",
+                    "type": "integer"
+                },
+                "VATRATE": {
+                    "description": "现货增值税率",
+                    "type": "number"
+                },
+                "WRSSTATUS": {
+                    "description": "状态 - 作废 - 0:未激活 1:正常",
+                    "type": "integer"
+                },
                 "thumurls": {
                     "description": "缩略图片(1:1)(逗号分隔)",
                     "type": "string"

+ 44 - 2
docs/swagger.yaml

@@ -9647,7 +9647,7 @@ definitions:
     properties:
       chg:
         description: 涨跌幅
-        type: string
+        type: number
       currencyid:
         description: 报价货币ID
         type: integer
@@ -17075,6 +17075,48 @@ definitions:
     type: object
   models.THJWrstandard:
     properties:
+      AREAUSERID:
+        description: 所属机构
+        type: integer
+      BANNERPICURL:
+        description: Banner图(逗号分隔)
+        type: string
+      CONVERTFACTOR:
+        description: 标仓系数
+        type: number
+      DELIVERYGOODSID:
+        description: 现货品种ID
+        type: integer
+      ISVALID:
+        description: 是否有效 - 0:无效 1:有效
+        type: integer
+      MINIVALUE:
+        description: 最小变动值
+        type: integer
+      MINIVALUEDP:
+        description: 最小变动值小数位
+        type: integer
+      PICTUREURLS:
+        description: 详情图片(逗号分隔)
+        type: string
+      REALMINIVALUE:
+        description: 实际最小变动值
+        type: integer
+      REALMINIVALUEDP:
+        description: 实际最小变动值小数位
+        type: integer
+      STORAGEFEE:
+        description: '仓储费(固定: 111)'
+        type: number
+      UNITID:
+        description: 现货商品单位ID
+        type: integer
+      VATRATE:
+        description: 现货增值税率
+        type: number
+      WRSSTATUS:
+        description: 状态 - 作废 - 0:未激活 1:正常
+        type: integer
       thumurls:
         description: 缩略图片(1:1)(逗号分隔)
         type: string
@@ -29346,7 +29388,7 @@ paths:
         name: userid
         required: true
         type: integer
-      - description: 类型 - 1:转让 2:受让
+      - description: 类型 - 1:转让 2:受让 3:转让委托已完成
         in: query
         name: ordertype
         required: true

+ 16 - 16
models/ferroalloy.go

@@ -37,7 +37,7 @@ type GErmcpspotgoodsprice struct {
 	WRSTANDARDCODE string `json:"wrstandardcode" xorm:"WRSTANDARDCODE"` // 现货商品代码
 	WRSTANDARDNAME string `json:"wrstandardname" xorm:"WRSTANDARDNAME"` // 【名称】现货商品名称
 
-	CHG string `json:"chg" xorm:"CHG"` // 涨跌幅
+	CHG float64 `json:"chg" xorm:"CHG"` // 涨跌幅
 
 	PageEx `xorm:"extends"` // 页码信息
 }
@@ -63,7 +63,7 @@ func (r *GErmcpspotgoodsprice) buildSql() string {
 		t.TODAYPRICEDTOTALAMOUNT,
 		t.SRCMARKETNAME,
 		t.PRESPOTGOODSPRICE,
-		to_char(ROUND(((t.SPOTGOODSPRICE - t.PRESPOTGOODSPRICE) / t.PRESPOTGOODSPRICE) * 100, 2)) || '%' CHG,
+		ROUND(((t.SPOTGOODSPRICE - t.PRESPOTGOODSPRICE) / t.PRESPOTGOODSPRICE), 4) CHG,
 		w.WRSTANDARDCODE,
 		w.WRSTANDARDNAME         
 	FROM ERMCP_SPOTGOODSPRICE t
@@ -342,27 +342,27 @@ type THJWrstandard struct {
 	WRSTANDARDID      int64     `json:"wrstandardid" xorm:"WRSTANDARDID"`                           // 现货商品ID(自增 SEQ_GOODS 确保不重复)
 	WRSTANDARDCODE    string    `json:"wrstandardcode" xorm:"WRSTANDARDCODE"`                       // 现货商品代码
 	WRSTANDARDNAME    string    `json:"wrstandardname" xorm:"WRSTANDARDNAME" form:"wrstandardname"` // 现货商品名称(模糊查询)
-	DELIVERYGOODSID   int32     `json:"-" xorm:"DELIVERYGOODSID"`                                   // 现货品种ID
-	UNITID            int32     `json:"-" xorm:"UNITID"`                                            // 现货商品单位ID
-	MINIVALUE         int64     `json:"-" xorm:"MINIVALUE"`                                         // 最小变动值
-	MINIVALUEDP       int64     `json:"-" xorm:"MINIVALUEDP"`                                       // 最小变动值小数位
-	REALMINIVALUE     int64     `json:"-" xorm:"REALMINIVALUE"`                                     // 实际最小变动值
-	REALMINIVALUEDP   int64     `json:"-" xorm:"REALMINIVALUEDP"`                                   // 实际最小变动值小数位
-	WRSSTATUS         int32     `json:"-" xorm:"WRSSTATUS"`                                         // 状态 - 作废 - 0:未激活 1:正常
+	DELIVERYGOODSID   int32     `json:"DELIVERYGOODSID" xorm:"DELIVERYGOODSID"`                     // 现货品种ID
+	UNITID            int32     `json:"UNITID" xorm:"UNITID"`                                       // 现货商品单位ID
+	MINIVALUE         int64     `json:"MINIVALUE" xorm:"MINIVALUE"`                                 // 最小变动值
+	MINIVALUEDP       int64     `json:"MINIVALUEDP" xorm:"MINIVALUEDP"`                             // 最小变动值小数位
+	REALMINIVALUE     int64     `json:"REALMINIVALUE" xorm:"REALMINIVALUE"`                         // 实际最小变动值
+	REALMINIVALUEDP   int64     `json:"REALMINIVALUEDP" xorm:"REALMINIVALUEDP"`                     // 实际最小变动值小数位
+	WRSSTATUS         int32     `json:"WRSSTATUS" xorm:"WRSSTATUS"`                                 // 状态 - 作废 - 0:未激活 1:正常
 	CREATORID         int64     `json:"-" xorm:"CREATORID"`                                         // 创建人
 	CREATETIME        time.Time `json:"-" xorm:"CREATETIME"`                                        // 创建时间
 	UPDATORID         int64     `json:"-" xorm:"UPDATORID"`                                         // 更新人
 	UPDATETIME        time.Time `json:"-" xorm:"UPDATETIME"`                                        // 更新时间
 	FACTORYITEMJSON   string    `json:"-" xorm:"FACTORYITEMJSON"`                                   // 要素项定义Json[{"DGFactoryItemTypeID": ,"ItemTypeMode": ,"FactoryItemIDs": },{.....},]DGFactoryItemTypeID - 要素项类型ID --DGFactoryItem->DGFactoryItemTypeIDItemTypeMode - 要素项类型模式 --DGFactoryItem->ItemTypeModeFactoryItemIDs - 选择项IDs--DGFactoryItem->DGFactoryItemID, 逗号分隔
-	ISVALID           int32     `json:"-" xorm:"ISVALID"`                                           // 是否有效 - 0:无效 1:有效
-	AREAUSERID        int64     `json:"-" xorm:"AREAUSERID"`                                        // 所属机构
+	ISVALID           int32     `json:"ISVALID" xorm:"ISVALID"`                                     // 是否有效 - 0:无效 1:有效
+	AREAUSERID        int64     `json:"AREAUSERID" xorm:"AREAUSERID"`                               // 所属机构
 	REMARK            string    `json:"-" xorm:"REMARK"`                                            // 备注
-	CONVERTFACTOR     float64   `json:"-" xorm:"CONVERTFACTOR"`                                     // 标仓系数
-	VATRATE           float64   `json:"-" xorm:"VATRATE"`                                           // 现货增值税率
-	STORAGEFEE        float64   `json:"-" xorm:"STORAGEFEE"`                                        // 仓储费(固定: 111)
+	CONVERTFACTOR     float64   `json:"CONVERTFACTOR" xorm:"CONVERTFACTOR"`                         // 标仓系数
+	VATRATE           float64   `json:"VATRATE" xorm:"VATRATE"`                                     // 现货增值税率
+	STORAGEFEE        float64   `json:"STORAGEFEE" xorm:"STORAGEFEE"`                               // 仓储费(固定: 111)
 	THUMURLS          string    `json:"thumurls" xorm:"THUMURLS"`                                   // 缩略图片(1:1)(逗号分隔)
-	PICTUREURLS       string    `json:"-" xorm:"PICTUREURLS"`                                       // 详情图片(逗号分隔)
-	BANNERPICURL      string    `json:"-" xorm:"BANNERPICURL"`                                      // Banner图(逗号分隔)
+	PICTUREURLS       string    `json:"PICTUREURLS" xorm:"PICTUREURLS"`                             // 详情图片(逗号分隔)
+	BANNERPICURL      string    `json:"BANNERPICURL" xorm:"BANNERPICURL"`                           // Banner图(逗号分隔)
 	PROVIDERUSERID    int64     `json:"-" xorm:"PROVIDERUSERID"`                                    // 供应链提供商
 	PROVIDERACCOUNTID int64     `json:"-" xorm:"PROVIDERACCOUNTID"`                                 // 供应链提供商资金账户 ID