Prechádzať zdrojové kódy

1.联调问题修改
2.增加查融资回购明细/费用明细接口

zou.yingbin 4 rokov pred
rodič
commit
d334116e0f
6 zmenil súbory, kde vykonal 625 pridanie a 1 odobranie
  1. 32 0
      controllers/wrTrade2/qryWrTrade.go
  2. 184 0
      docs/docs.go
  3. 184 0
      docs/swagger.json
  4. 125 0
      docs/swagger.yaml
  5. 98 1
      models/wrTrade2.go
  6. 2 0
      routers/router.go

+ 32 - 0
controllers/wrTrade2/qryWrTrade.go

@@ -361,3 +361,35 @@ func QueryWrScfContract(c *gin.Context) {
 	a.DoBindReq(&m)
 	a.DoGetDataI(&m)
 }
+
+// QueryWrBuybackDetail
+// @Summary 查询仓单回购明细
+// @Produce json
+// @Security ApiKeyAuth
+// @Param scfcontractid query int false "融资合同id"
+// @Success 200 {array} models.WrBuybackDetail
+// @Failure 500 {object} app.Response
+// @Router /WrTrade2/QueryWrBuybackDetail [get]
+// @Tags 仓单贸易v2
+func QueryWrBuybackDetail(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.WrBuybackDetail{}
+	a.DoBindReq(&m)
+	a.DoGetDataI(&m)
+}
+
+// QueryWrScfContractInterest
+// @Summary 查询融资合同费用明细
+// @Produce json
+// @Security ApiKeyAuth
+// @Param scfcontractid query int false "融资合同id"
+// @Success 200 {array} models.WrScfContractInterest
+// @Failure 500 {object} app.Response
+// @Router /WrTrade2/QueryWrScfContractInterest [get]
+// @Tags 仓单贸易v2
+func QueryWrScfContractInterest(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.WrScfContractInterest{}
+	a.DoBindReq(&m)
+	a.DoGetDataI(&m)
+}

+ 184 - 0
docs/docs.go

@@ -11358,6 +11358,47 @@ var doc = `{
                 }
             }
         },
+        "/WrTrade2/QueryWrBuybackDetail": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "仓单贸易v2"
+                ],
+                "summary": "查询仓单回购明细",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "融资合同id",
+                        "name": "scfcontractid",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.WrBuybackDetail"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/WrTrade2/QueryWrFactorTypeInfo": {
             "get": {
                 "security": [
@@ -11802,6 +11843,47 @@ var doc = `{
                 }
             }
         },
+        "/WrTrade2/QueryWrScfContractInterest": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "仓单贸易v2"
+                ],
+                "summary": "查询融资合同费用明细",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "融资合同id",
+                        "name": "scfcontractid",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.WrScfContractInterest"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/WrTrade2/QueryWrSpecialMatchOrder": {
             "get": {
                 "security": [
@@ -29821,6 +29903,51 @@ var doc = `{
                 }
             }
         },
+        "models.WrBuybackDetail": {
+            "type": "object",
+            "properties": {
+                "buybackamount": {
+                    "description": "回购金额",
+                    "type": "number"
+                },
+                "buybackqty": {
+                    "description": "回购数量",
+                    "type": "number"
+                },
+                "buybackreleasemargin": {
+                    "description": "回购释放保证金",
+                    "type": "number"
+                },
+                "buybacktime": {
+                    "description": "回购时间",
+                    "type": "string"
+                },
+                "errordesc": {
+                    "description": "错误描述",
+                    "type": "string"
+                },
+                "handlestatus": {
+                    "description": "处理 -  1:待处理 2:处理成功 3:处理失败",
+                    "type": "integer"
+                },
+                "relatedwrid": {
+                    "description": "关联仓单ID",
+                    "type": "integer"
+                },
+                "scfcontractid": {
+                    "description": "SCF合同ID",
+                    "type": "string"
+                },
+                "scfwrbuybackid": {
+                    "description": "SCF仓单回购明细ID(312+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "integer"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                }
+            }
+        },
         "models.WrFAProductDetail": {
             "type": "object",
             "properties": {
@@ -31602,6 +31729,59 @@ var doc = `{
                 }
             }
         },
+        "models.WrScfContractInterest": {
+            "type": "object",
+            "properties": {
+                "closeinterest": {
+                    "description": "已结利息",
+                    "type": "number"
+                },
+                "closeintereststatus": {
+                    "description": "结息状态 - 1:未结 2:已结",
+                    "type": "integer"
+                },
+                "closetime": {
+                    "description": "结息时间",
+                    "type": "string"
+                },
+                "closetradedate": {
+                    "description": "结息交易日",
+                    "type": "string"
+                },
+                "creatorid": {
+                    "description": "操作人ID",
+                    "type": "integer"
+                },
+                "dayrate": {
+                    "description": "日利率(根据利率配置计算出的日利率值,年利率则除以360,保留5位小数)",
+                    "type": "number"
+                },
+                "interest": {
+                    "description": "利息",
+                    "type": "number"
+                },
+                "interestamount": {
+                    "description": "计息金额",
+                    "type": "number"
+                },
+                "interestday": {
+                    "description": "计息日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "scfcontractid": {
+                    "description": "SCF合同ID",
+                    "type": "string"
+                },
+                "scfcontractinterestid": {
+                    "description": "SCF合同计息ID(313+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "integer"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                }
+            }
+        },
         "models.WrSpecialMatchOrder": {
             "type": "object",
             "properties": {
@@ -31753,6 +31933,10 @@ var doc = `{
                 "dgfactoryitemvalue": {
                     "description": "要素项值",
                     "type": "string"
+                },
+                "warehouseid": {
+                    "description": "仓库id",
+                    "type": "integer"
                 }
             }
         },

+ 184 - 0
docs/swagger.json

@@ -11342,6 +11342,47 @@
                 }
             }
         },
+        "/WrTrade2/QueryWrBuybackDetail": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "仓单贸易v2"
+                ],
+                "summary": "查询仓单回购明细",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "融资合同id",
+                        "name": "scfcontractid",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.WrBuybackDetail"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/WrTrade2/QueryWrFactorTypeInfo": {
             "get": {
                 "security": [
@@ -11786,6 +11827,47 @@
                 }
             }
         },
+        "/WrTrade2/QueryWrScfContractInterest": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "仓单贸易v2"
+                ],
+                "summary": "查询融资合同费用明细",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "融资合同id",
+                        "name": "scfcontractid",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.WrScfContractInterest"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/WrTrade2/QueryWrSpecialMatchOrder": {
             "get": {
                 "security": [
@@ -29805,6 +29887,51 @@
                 }
             }
         },
+        "models.WrBuybackDetail": {
+            "type": "object",
+            "properties": {
+                "buybackamount": {
+                    "description": "回购金额",
+                    "type": "number"
+                },
+                "buybackqty": {
+                    "description": "回购数量",
+                    "type": "number"
+                },
+                "buybackreleasemargin": {
+                    "description": "回购释放保证金",
+                    "type": "number"
+                },
+                "buybacktime": {
+                    "description": "回购时间",
+                    "type": "string"
+                },
+                "errordesc": {
+                    "description": "错误描述",
+                    "type": "string"
+                },
+                "handlestatus": {
+                    "description": "处理 -  1:待处理 2:处理成功 3:处理失败",
+                    "type": "integer"
+                },
+                "relatedwrid": {
+                    "description": "关联仓单ID",
+                    "type": "integer"
+                },
+                "scfcontractid": {
+                    "description": "SCF合同ID",
+                    "type": "string"
+                },
+                "scfwrbuybackid": {
+                    "description": "SCF仓单回购明细ID(312+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "integer"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                }
+            }
+        },
         "models.WrFAProductDetail": {
             "type": "object",
             "properties": {
@@ -31586,6 +31713,59 @@
                 }
             }
         },
+        "models.WrScfContractInterest": {
+            "type": "object",
+            "properties": {
+                "closeinterest": {
+                    "description": "已结利息",
+                    "type": "number"
+                },
+                "closeintereststatus": {
+                    "description": "结息状态 - 1:未结 2:已结",
+                    "type": "integer"
+                },
+                "closetime": {
+                    "description": "结息时间",
+                    "type": "string"
+                },
+                "closetradedate": {
+                    "description": "结息交易日",
+                    "type": "string"
+                },
+                "creatorid": {
+                    "description": "操作人ID",
+                    "type": "integer"
+                },
+                "dayrate": {
+                    "description": "日利率(根据利率配置计算出的日利率值,年利率则除以360,保留5位小数)",
+                    "type": "number"
+                },
+                "interest": {
+                    "description": "利息",
+                    "type": "number"
+                },
+                "interestamount": {
+                    "description": "计息金额",
+                    "type": "number"
+                },
+                "interestday": {
+                    "description": "计息日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "scfcontractid": {
+                    "description": "SCF合同ID",
+                    "type": "string"
+                },
+                "scfcontractinterestid": {
+                    "description": "SCF合同计息ID(313+Unix秒时间戳(10位)+xxxxxx)",
+                    "type": "integer"
+                },
+                "updatetime": {
+                    "description": "更新时间",
+                    "type": "string"
+                }
+            }
+        },
         "models.WrSpecialMatchOrder": {
             "type": "object",
             "properties": {
@@ -31737,6 +31917,10 @@
                 "dgfactoryitemvalue": {
                     "description": "要素项值",
                     "type": "string"
+                },
+                "warehouseid": {
+                    "description": "仓库id",
+                    "type": "integer"
                 }
             }
         },

+ 125 - 0
docs/swagger.yaml

@@ -13298,6 +13298,39 @@ definitions:
     - autoid
     - warehousecode
     type: object
+  models.WrBuybackDetail:
+    properties:
+      buybackamount:
+        description: 回购金额
+        type: number
+      buybackqty:
+        description: 回购数量
+        type: number
+      buybackreleasemargin:
+        description: 回购释放保证金
+        type: number
+      buybacktime:
+        description: 回购时间
+        type: string
+      errordesc:
+        description: 错误描述
+        type: string
+      handlestatus:
+        description: 处理 -  1:待处理 2:处理成功 3:处理失败
+        type: integer
+      relatedwrid:
+        description: 关联仓单ID
+        type: integer
+      scfcontractid:
+        description: SCF合同ID
+        type: string
+      scfwrbuybackid:
+        description: SCF仓单回购明细ID(312+Unix秒时间戳(10位)+xxxxxx)
+        type: integer
+      tradedate:
+        description: 交易日(yyyyMMdd)
+        type: string
+    type: object
   models.WrFAProductDetail:
     properties:
       accountid:
@@ -14632,6 +14665,45 @@ definitions:
         description: 商品
         type: string
     type: object
+  models.WrScfContractInterest:
+    properties:
+      closeinterest:
+        description: 已结利息
+        type: number
+      closeintereststatus:
+        description: 结息状态 - 1:未结 2:已结
+        type: integer
+      closetime:
+        description: 结息时间
+        type: string
+      closetradedate:
+        description: 结息交易日
+        type: string
+      creatorid:
+        description: 操作人ID
+        type: integer
+      dayrate:
+        description: 日利率(根据利率配置计算出的日利率值,年利率则除以360,保留5位小数)
+        type: number
+      interest:
+        description: 利息
+        type: number
+      interestamount:
+        description: 计息金额
+        type: number
+      interestday:
+        description: 计息日(yyyyMMdd)
+        type: string
+      scfcontractid:
+        description: SCF合同ID
+        type: string
+      scfcontractinterestid:
+        description: SCF合同计息ID(313+Unix秒时间戳(10位)+xxxxxx)
+        type: integer
+      updatetime:
+        description: 更新时间
+        type: string
+    type: object
   models.WrSpecialMatchOrder:
     properties:
       amount:
@@ -14746,6 +14818,9 @@ definitions:
       dgfactoryitemvalue:
         description: 要素项值
         type: string
+      warehouseid:
+        description: 仓库id
+        type: integer
     type: object
   models.WrStandardFactoryItemEx:
     properties:
@@ -23994,6 +24069,31 @@ paths:
       summary: 查询履约信息
       tags:
       - 仓单贸易v2
+  /WrTrade2/QueryWrBuybackDetail:
+    get:
+      parameters:
+      - description: 融资合同id
+        in: query
+        name: scfcontractid
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.WrBuybackDetail'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询仓单回购明细
+      tags:
+      - 仓单贸易v2
   /WrTrade2/QueryWrFactorTypeInfo:
     get:
       parameters:
@@ -24274,6 +24374,31 @@ paths:
       summary: 查询仓单贸易融资合同
       tags:
       - 仓单贸易v2
+  /WrTrade2/QueryWrScfContractInterest:
+    get:
+      parameters:
+      - description: 融资合同id
+        in: query
+        name: scfcontractid
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.WrScfContractInterest'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询融资合同费用明细
+      tags:
+      - 仓单贸易v2
   /WrTrade2/QueryWrSpecialMatchOrder:
     get:
       description: 页面 现货仓单 | 预售仓单 -> 指定成交

+ 98 - 1
models/wrTrade2.go

@@ -1795,6 +1795,7 @@ type WrStandardFactoryItem struct {
 	ITEMTYPENAME        string `json:"-"  xorm:"'ITEMTYPENAME'"`                        // 要素项类型名称
 	DGFACTORYITEMID     int64  `json:"dgfactoryitemid"  xorm:"'DGFACTORYITEMID'"`       // 选择项id
 	DGFACTORYITEMVALUE  string `json:"dgfactoryitemvalue"  xorm:"'DGFACTORYITEMVALUE'"` // 要素项值
+	WAREHOUSEID         int64  `json:"warehouseid"  xorm:"'WAREHOUSEID'"`               // 仓库id
 }
 
 func (r *WrStandardFactoryItem) calc() {
@@ -1805,7 +1806,8 @@ func (r *WrStandardFactoryItem) buildSql() string {
 	var sqlId utils.SQLVal = "select t.wrstandardid," +
 		"       dp.dgfactoryitemtypeid," +
 		"       dp.itemtypename," +
-		"       decode(dp.dgfactoryitemtypeid,1,di.warehouseid,di.dgfactoryitemid) dgfactoryitemid," +
+		"       di.dgfactoryitemid," +
+		"       di.warehouseid," +
 		"       di.dgfactoryitemvalue" +
 		"  from wrstandardfactoryitem t" +
 		" inner join wrstandard w" +
@@ -2242,3 +2244,98 @@ func (r *WrScfContract) GetDataEx() (interface{}, error) {
 	}
 	return sData, err
 }
+
+// WrBuybackDetail 仓单回购明细
+type WrBuybackDetail struct {
+	SCFWRBUYBACKID       int64   `json:"scfwrbuybackid"  xorm:"SCFWRBUYBACKID" form:"scfwrbuybackid"` // SCF仓单回购明细ID(312+Unix秒时间戳(10位)+xxxxxx)
+	SCFCONTRACTID        string  `json:"scfcontractid"  xorm:"SCFCONTRACTID" form:"scfcontractid"`    // SCF合同ID
+	BUYBACKQTY           float64 `json:"buybackqty"  xorm:"BUYBACKQTY"`                               // 回购数量
+	BUYBACKAMOUNT        float64 `json:"buybackamount"  xorm:"BUYBACKAMOUNT"`                         // 回购金额
+	BUYBACKRELEASEMARGIN float64 `json:"buybackreleasemargin"  xorm:"BUYBACKRELEASEMARGIN"`           // 回购释放保证金
+	BUYBACKTIME          string  `json:"buybacktime"  xorm:"BUYBACKTIME"`                             // 回购时间
+	TRADEDATE            string  `json:"tradedate"  xorm:"TRADEDATE" form:"tradedate"`                // 交易日(yyyyMMdd)
+	RELATEDWRID          int64   `json:"relatedwrid"  xorm:"RELATEDWRID" form:"relatedwrid"`          // 关联仓单ID
+	HANDLESTATUS         int32   `json:"handlestatus"  xorm:"HANDLESTATUS"`                           // 处理 -  1:待处理 2:处理成功 3:处理失败
+	ERRORDESC            string  `json:"errordesc"  xorm:"ERRORDESC"`                                 // 错误描述
+}
+
+func (r *WrBuybackDetail) calc() {
+
+}
+
+func (r *WrBuybackDetail) buildSql() string {
+	var sqlId utils.SQLVal = "SELECT t.SCFWRBUYBACKID," +
+		"       t.SCFCONTRACTID," +
+		"       t.BUYBACKQTY," +
+		"       t.BUYBACKAMOUNT," +
+		"       t.BUYBACKRELEASEMARGIN," +
+		"       to_char(t.BUYBACKTIME, 'yyyy-mm-dd hh24:mi:ss') BUYBACKTIME," +
+		"       t.TRADEDATE," +
+		"       t.RELATEDWRID," +
+		"       t.HANDLESTATUS," +
+		"       t.ERRORDESC" +
+		"  FROM SCF_WRBUYBACKDETAIL t" +
+		" WHERE 1 = 1" +
+		"   AND t.handlestatus = 2"
+	sqlId.AndEx("scfcontractid", r.SCFCONTRACTID, r.SCFCONTRACTID != "")
+	return sqlId.String()
+}
+
+// GetDataEx 获取仓单回购明细
+func (r *WrBuybackDetail) GetDataEx() (interface{}, error) {
+	sData := make([]WrBuybackDetail, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}
+
+// WrScfContractInterest 合同计息表(费用明细)
+type WrScfContractInterest struct {
+	SCFCONTRACTINTERESTID int64   `json:"scfcontractinterestid"  xorm:"SCFCONTRACTINTERESTID"`         // SCF合同计息ID(313+Unix秒时间戳(10位)+xxxxxx)
+	SCFCONTRACTID         string  `json:"scfcontractid"  xorm:"SCFCONTRACTID" form:"scfcontractid"`    // SCF合同ID
+	INTERESTDAY           string  `json:"interestday"  xorm:"INTERESTDAY"`                             // 计息日(yyyyMMdd)
+	INTEREST              float64 `json:"interest"  xorm:"INTEREST"`                                   // 利息
+	CLOSEINTEREST         float64 `json:"closeinterest"  xorm:"CLOSEINTEREST"`                         // 已结利息
+	CLOSEINTERESTSTATUS   int32   `json:"closeintereststatus"  xorm:"CLOSEINTERESTSTATUS"`             // 结息状态 - 1:未结 2:已结
+	UPDATETIME            string  `json:"updatetime"  xorm:"UPDATETIME"`                               // 更新时间
+	CREATORID             int64   `json:"creatorid"  xorm:"CREATORID" form:"creatorid"`                // 操作人ID
+	CLOSETIME             string  `json:"closetime"  xorm:"CLOSETIME"`                                 // 结息时间
+	CLOSETRADEDATE        string  `json:"closetradedate"  xorm:"CLOSETRADEDATE" form:"closetradedate"` // 结息交易日
+	INTERESTAMOUNT        float64 `json:"interestamount"  xorm:"INTERESTAMOUNT"`                       // 计息金额
+	DAYRATE               float64 `json:"dayrate"  xorm:"DAYRATE"`                                     // 日利率(根据利率配置计算出的日利率值,年利率则除以360,保留5位小数)
+}
+
+func (r *WrScfContractInterest) calc() {
+
+}
+
+func (r *WrScfContractInterest) buildSql() string {
+	var sqlId utils.SQLVal = "SELECT t.SCFCONTRACTINTERESTID," +
+		"       t.SCFCONTRACTID," +
+		"       t.INTERESTDAY," +
+		"       t.INTEREST," +
+		"       t.CLOSEINTEREST," +
+		"       t.CLOSEINTERESTSTATUS," +
+		"       to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME," +
+		"       t.CREATORID," +
+		"       to_char(t.CLOSETIME, 'yyyy-mm-dd hh24:mi:ss') CLOSETIME," +
+		"       t.CLOSETRADEDATE," +
+		"       t.INTERESTAMOUNT," +
+		"       t.DAYRATE" +
+		"  FROM SCF_CONTRACTINTEREST t" +
+		" WHERE 1 = 1"
+	sqlId.AndEx("scfcontractid", r.SCFCONTRACTID, r.SCFCONTRACTID != "")
+	return sqlId.String()
+}
+
+// GetDataEx 获取描述
+func (r *WrScfContractInterest) GetDataEx() (interface{}, error) {
+	sData := make([]WrScfContractInterest, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}

+ 2 - 0
routers/router.go

@@ -537,6 +537,8 @@ func InitRouter() *gin.Engine {
 		wrTrade2R.GET("QueryWrPerformancePlanStep", wrTrade2.QueryWrPerformancePlanStep)
 		wrTrade2R.GET("QueryWrFinanceBuyApply", wrTrade2.QueryWrFinanceBuyApply)
 		wrTrade2R.GET("QueryWrScfContract", wrTrade2.QueryWrScfContract)
+		wrTrade2R.GET("QueryWrBuybackDetail", wrTrade2.QueryWrBuybackDetail)
+		wrTrade2R.GET("QueryWrScfContractInterest", wrTrade2.QueryWrScfContractInterest)
 	}
 
 	return r