Selaa lähdekoodia

1.增加签约银行查询接口
2.增加开户行查询接口
3.增加定投价查询接口
4.#95495 现货报表查询出错
5.#95503 财务报表 预收款预开票负数应显示为0

zou.yingbin 4 vuotta sitten
vanhempi
commit
2caa4da727
8 muutettua tiedostoa jossa 1213 lisäystä ja 39 poistoa
  1. 1 2
      controllers/ermcp3/qryErmcp3Report.go
  2. 50 0
      controllers/qhj/qryQhj.go
  3. 359 8
      docs/docs.go
  4. 359 8
      docs/swagger.json
  5. 252 6
      docs/swagger.yaml
  6. 14 15
      models/ermcp3Report.go
  7. 175 0
      models/qhj.go
  8. 3 0
      routers/router.go

+ 1 - 2
controllers/ermcp3/qryErmcp3Report.go

@@ -312,7 +312,6 @@ func QryAreaExpourseHedgeplanDetail(c *gin.Context) {
 // @Param cycletype query int true "周期类型 - 0:日 1:月 2:季 3:年 4:周 5:全报表【原值】"
 // @Param cycletime query string true "周期时间 日(YYYYMMDD) 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYMMDD周内任意一天) 全(0)【原值】"
 // @Param deliverygoodsid query int false "现货品种id(明细必填)"
-// @Param wrstandardid query int false "品类id(明细必填)"
 // @Param currencyid query int false "币种id(明细必填)"
 // @Success 200 {array} models.Ermcp3AreaSpotPLReport
 // @Failure 500 {object} app.Response
@@ -331,7 +330,7 @@ func QryAreaSpotplReport(c *gin.Context) {
 	if req.QUERYTYPE == 2 {
 		a.DoBindReq(&req2)
 		a.CheckParamF(func() bool {
-			if req2.DELIVERYGOODSID <= 0 || req2.WRSTANDARDID <= 0 || req2.CURRENCYID <= 0 {
+			if req2.DELIVERYGOODSID <= 0 || req2.CURRENCYID <= 0 {
 				return false
 			}
 			return true

+ 50 - 0
controllers/qhj/qryQhj.go

@@ -190,3 +190,53 @@ func QueryPickArea(c *gin.Context) {
 	m := models.QhjPickArea{USERID: req.USERID}
 	a.DoGetDataI(&m)
 }
+
+// QueryBankAccountSign
+// @Summary 查询签约银行信息(提现账户管理)
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Success 200 {array} models.QhjBankAccountSign
+// @Failure 500 {object} app.Response
+// @Router /Qhj/QueryBankAccountSign [get]
+// @Tags 大连千海金
+func QueryBankAccountSign(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := struct {
+		USERID int64 `form:"userid" binding:"required"` // 用户id
+	}{}
+	a.DoBindReq(&req)
+	m := models.QhjBankAccountSign{RELATEDUSERID: req.USERID}
+	a.DoGetDataI(&m)
+}
+
+// QueryBankInfo
+// @Summary 查询开户行
+// @Produce json
+// @Security ApiKeyAuth
+// @Success 200 {array} models.QhjBankInfo
+// @Failure 500 {object} app.Response
+// @Router /Qhj/QueryBankInfo [get]
+// @Tags 大连千海金
+func QueryBankInfo(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.QhjBankInfo{}
+	a.DoGetDataI(&m)
+}
+
+// QueryReckonPriceLog
+// @Summary 查询定投价(结算价)
+// @Produce json
+// @Security ApiKeyAuth
+// @Param goodsid query int false "商品ID"
+// @Param tradedate query string false "交易日 格式(yyyymmdd)"
+// @Success 200 {array} models.QhjReckonPriceLog
+// @Failure 500 {object} app.Response
+// @Router /Qhj/QueryReckonPriceLog [get]
+// @Tags 大连千海金
+func QueryReckonPriceLog(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.QhjReckonPriceLog{}
+	a.DoBindReq(&m)
+	a.DoGetDataI(&m)
+}

+ 359 - 8
docs/docs.go

@@ -3127,12 +3127,6 @@ var doc = `{
                     },
                     {
                         "type": "integer",
-                        "description": "品类id(明细必填)",
-                        "name": "wrstandardid",
-                        "in": "query"
-                    },
-                    {
-                        "type": "integer",
                         "description": "币种id(明细必填)",
                         "name": "currencyid",
                         "in": "query"
@@ -6745,6 +6739,81 @@ var doc = `{
                 }
             }
         },
+        "/Qhj/QueryBankAccountSign": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询签约银行信息(提现账户管理)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjBankAccountSign"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Qhj/QueryBankInfo": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询开户行",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjBankInfo"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Qhj/QueryContract": {
             "get": {
                 "security": [
@@ -7019,6 +7088,53 @@ var doc = `{
                 }
             }
         },
+        "/Qhj/QueryReckonPriceLog": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询定投价(结算价)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "商品ID",
+                        "name": "goodsid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "交易日 格式(yyyymmdd)",
+                        "name": "tradedate",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjReckonPriceLog"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Qhj/QueryTradeGoodsPickup": {
             "get": {
                 "security": [
@@ -20153,6 +20269,152 @@ var doc = `{
                 }
             }
         },
+        "models.QhjBankAccountSign": {
+            "type": "object",
+            "properties": {
+                "accountcode": {
+                    "description": "资金账号",
+                    "type": "string"
+                },
+                "accountname": {
+                    "description": "资金账号对应的账号名(UserName)",
+                    "type": "string"
+                },
+                "accounttype": {
+                    "description": "账户类型(UserType)",
+                    "type": "integer"
+                },
+                "applicationtime": {
+                    "description": "最后一次更新的时间",
+                    "type": "string"
+                },
+                "applyexchticket": {
+                    "description": "申请流水",
+                    "type": "string"
+                },
+                "auditid": {
+                    "description": "审核人",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "bankaccountname": {
+                    "description": "签约银行卡账号名",
+                    "type": "string"
+                },
+                "bankaccountno": {
+                    "description": "银行卡号",
+                    "type": "string"
+                },
+                "bankaccounttype": {
+                    "description": "银行账户类型 - 1-对私; 2-对公",
+                    "type": "integer"
+                },
+                "bankcardtype": {
+                    "description": "银行卡类型",
+                    "type": "integer"
+                },
+                "bankchildaccount": {
+                    "description": "银行子账号(签约成功后,很多银行会返回对应的这个虚拟账号)",
+                    "type": "string"
+                },
+                "bankcity": {
+                    "description": "开户行城市",
+                    "type": "string"
+                },
+                "bankid": {
+                    "description": "签约银行ID",
+                    "type": "string"
+                },
+                "bankprovince": {
+                    "description": "开户行省份",
+                    "type": "string"
+                },
+                "branchbankid": {
+                    "description": "签约银行支行号",
+                    "type": "string"
+                },
+                "branchbankname": {
+                    "description": "签约银行支行名称",
+                    "type": "string"
+                },
+                "cardno": {
+                    "description": "证件号码",
+                    "type": "string"
+                },
+                "cardtype": {
+                    "description": "证件类型",
+                    "type": "string"
+                },
+                "currency": {
+                    "description": "币种",
+                    "type": "string"
+                },
+                "cusbankid": {
+                    "description": "托管银行编号",
+                    "type": "string"
+                },
+                "direct": {
+                    "description": "方向(可以判断那方先发起的签约)",
+                    "type": "integer"
+                },
+                "exchticket": {
+                    "description": "最后一次签约成功的流水号",
+                    "type": "string"
+                },
+                "extendinfo": {
+                    "description": "扩展信息(JSON字符串)",
+                    "type": "string"
+                },
+                "mobilephone": {
+                    "description": "手机号",
+                    "type": "string"
+                },
+                "netaddr": {
+                    "description": "调转网址",
+                    "type": "string"
+                },
+                "relateduserid": {
+                    "description": "关联使用者userid",
+                    "type": "integer"
+                },
+                "signstatus": {
+                    "description": "签约状态 - 1:未签约 2:签约待审核 3:签约中 4:已签约 5:解约待审核 6:解约中 7:已解约 8:已解绑 9:绑卡中 10:审核拒绝 11:换签待审核",
+                    "type": "integer"
+                },
+                "updatetime": {
+                    "description": "更新时间(签解约更新时间)",
+                    "type": "string"
+                }
+            }
+        },
+        "models.QhjBankInfo": {
+            "type": "object",
+            "properties": {
+                "bankid": {
+                    "description": "银行ID",
+                    "type": "string"
+                },
+                "bankname": {
+                    "description": "银行名称",
+                    "type": "string"
+                },
+                "clearbankno": {
+                    "description": "清算系统银行编号",
+                    "type": "string"
+                },
+                "orderindex": {
+                    "description": "排序顺序",
+                    "type": "integer"
+                },
+                "status": {
+                    "description": "状态 - 0:正常 1:注销",
+                    "type": "integer"
+                }
+            }
+        },
         "models.QhjContract": {
             "type": "object",
             "properties": {
@@ -20607,6 +20869,71 @@ var doc = `{
                 }
             }
         },
+        "models.QhjReckonPriceLog": {
+            "type": "object",
+            "properties": {
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "integer"
+                },
+                "lastreckonprice": {
+                    "description": "上日结算价",
+                    "type": "number"
+                },
+                "nextdnlimitprice": {
+                    "description": "下个交易日跌停价",
+                    "type": "number"
+                },
+                "nexttrade": {
+                    "description": "下个交易日",
+                    "type": "string"
+                },
+                "nextuplimitprice": {
+                    "description": "下个交易日涨停价",
+                    "type": "number"
+                },
+                "reckonprice": {
+                    "description": "今日结算价(定投价)",
+                    "type": "number"
+                },
+                "reckontime": {
+                    "description": "结算时间",
+                    "type": "string"
+                },
+                "totalholderqty": {
+                    "description": "总持仓数",
+                    "type": "integer"
+                },
+                "totalstock": {
+                    "description": "总库存",
+                    "type": "integer"
+                },
+                "tradedate": {
+                    "description": "交易日",
+                    "type": "string"
+                },
+                "updowncount": {
+                    "description": "连续涨(跌)停天数 (涨跌停标志变为0时值归0,变成涨停或是跌停时值为1,连续涨停天数+1,连续跌停天数+1)",
+                    "type": "integer"
+                },
+                "updownflag": {
+                    "description": "连续涨跌停标志 - 0:无涨跌停 -1:跌停 1:涨停",
+                    "type": "integer"
+                },
+                "updownrate": {
+                    "description": "今日涨跌幅",
+                    "type": "number"
+                },
+                "updownrate_2d": {
+                    "description": "连续两日涨跌幅",
+                    "type": "number"
+                },
+                "updownrate_3d": {
+                    "description": "连续三日涨跌幅",
+                    "type": "number"
+                }
+            }
+        },
         "models.QhjTradeGoodsPickup": {
             "type": "object",
             "properties": {
@@ -21718,13 +22045,21 @@ var doc = `{
                     "type": "string"
                 },
                 "accountstatus": {
-                    "description": "账户状态 -  1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:注销",
+                    "description": "账户状态 -  1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销) 7:注销(删除)",
+                    "type": "integer"
+                },
+                "applysrc": {
+                    "description": "申请来源 - 1:管理端 2:终端",
                     "type": "integer"
                 },
                 "auditremark": {
                     "description": "审核备注",
                     "type": "string"
                 },
+                "auditsrc": {
+                    "description": "审核来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
                 "audittime": {
                     "description": "审核时间",
                     "type": "string"
@@ -21745,6 +22080,10 @@ var doc = `{
                     "description": "销户人",
                     "type": "integer"
                 },
+                "canrecommend": {
+                    "description": "是否可推荐 - 0:不可 1;可",
+                    "type": "integer"
+                },
                 "createtime": {
                     "description": "创建时间",
                     "type": "string"
@@ -21785,6 +22124,10 @@ var doc = `{
                     "description": "修改时间",
                     "type": "string"
                 },
+                "parenttopuser": {
+                    "description": "上级顶级机构 [092=0,1时,默认为1, 092=2时若自已为顶级,则填入自己,自己不为顶级,填入ParentUserID的\"ParentTopUser\"]",
+                    "type": "string"
+                },
                 "parentuserid": {
                     "description": "所属机构ID",
                     "type": "integer"
@@ -21805,6 +22148,14 @@ var doc = `{
                     "description": "推荐码",
                     "type": "string"
                 },
+                "rootuserid": {
+                    "description": "根用户ID",
+                    "type": "integer"
+                },
+                "subaccountlevel": {
+                    "description": "子账户层数",
+                    "type": "integer"
+                },
                 "subarealevelpath": {
                     "description": "子机构层级路径(逗号分隔,首尾加逗号)",
                     "type": "string"
@@ -21814,7 +22165,7 @@ var doc = `{
                     "type": "integer"
                 },
                 "usertype": {
-                    "description": "账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户",
+                    "description": "账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)",
                     "type": "integer"
                 }
             }

+ 359 - 8
docs/swagger.json

@@ -3111,12 +3111,6 @@
                     },
                     {
                         "type": "integer",
-                        "description": "品类id(明细必填)",
-                        "name": "wrstandardid",
-                        "in": "query"
-                    },
-                    {
-                        "type": "integer",
                         "description": "币种id(明细必填)",
                         "name": "currencyid",
                         "in": "query"
@@ -6729,6 +6723,81 @@
                 }
             }
         },
+        "/Qhj/QueryBankAccountSign": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询签约银行信息(提现账户管理)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjBankAccountSign"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/Qhj/QueryBankInfo": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询开户行",
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjBankInfo"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Qhj/QueryContract": {
             "get": {
                 "security": [
@@ -7003,6 +7072,53 @@
                 }
             }
         },
+        "/Qhj/QueryReckonPriceLog": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金"
+                ],
+                "summary": "查询定投价(结算价)",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "商品ID",
+                        "name": "goodsid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "交易日 格式(yyyymmdd)",
+                        "name": "tradedate",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjReckonPriceLog"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Qhj/QueryTradeGoodsPickup": {
             "get": {
                 "security": [
@@ -20137,6 +20253,152 @@
                 }
             }
         },
+        "models.QhjBankAccountSign": {
+            "type": "object",
+            "properties": {
+                "accountcode": {
+                    "description": "资金账号",
+                    "type": "string"
+                },
+                "accountname": {
+                    "description": "资金账号对应的账号名(UserName)",
+                    "type": "string"
+                },
+                "accounttype": {
+                    "description": "账户类型(UserType)",
+                    "type": "integer"
+                },
+                "applicationtime": {
+                    "description": "最后一次更新的时间",
+                    "type": "string"
+                },
+                "applyexchticket": {
+                    "description": "申请流水",
+                    "type": "string"
+                },
+                "auditid": {
+                    "description": "审核人",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "bankaccountname": {
+                    "description": "签约银行卡账号名",
+                    "type": "string"
+                },
+                "bankaccountno": {
+                    "description": "银行卡号",
+                    "type": "string"
+                },
+                "bankaccounttype": {
+                    "description": "银行账户类型 - 1-对私; 2-对公",
+                    "type": "integer"
+                },
+                "bankcardtype": {
+                    "description": "银行卡类型",
+                    "type": "integer"
+                },
+                "bankchildaccount": {
+                    "description": "银行子账号(签约成功后,很多银行会返回对应的这个虚拟账号)",
+                    "type": "string"
+                },
+                "bankcity": {
+                    "description": "开户行城市",
+                    "type": "string"
+                },
+                "bankid": {
+                    "description": "签约银行ID",
+                    "type": "string"
+                },
+                "bankprovince": {
+                    "description": "开户行省份",
+                    "type": "string"
+                },
+                "branchbankid": {
+                    "description": "签约银行支行号",
+                    "type": "string"
+                },
+                "branchbankname": {
+                    "description": "签约银行支行名称",
+                    "type": "string"
+                },
+                "cardno": {
+                    "description": "证件号码",
+                    "type": "string"
+                },
+                "cardtype": {
+                    "description": "证件类型",
+                    "type": "string"
+                },
+                "currency": {
+                    "description": "币种",
+                    "type": "string"
+                },
+                "cusbankid": {
+                    "description": "托管银行编号",
+                    "type": "string"
+                },
+                "direct": {
+                    "description": "方向(可以判断那方先发起的签约)",
+                    "type": "integer"
+                },
+                "exchticket": {
+                    "description": "最后一次签约成功的流水号",
+                    "type": "string"
+                },
+                "extendinfo": {
+                    "description": "扩展信息(JSON字符串)",
+                    "type": "string"
+                },
+                "mobilephone": {
+                    "description": "手机号",
+                    "type": "string"
+                },
+                "netaddr": {
+                    "description": "调转网址",
+                    "type": "string"
+                },
+                "relateduserid": {
+                    "description": "关联使用者userid",
+                    "type": "integer"
+                },
+                "signstatus": {
+                    "description": "签约状态 - 1:未签约 2:签约待审核 3:签约中 4:已签约 5:解约待审核 6:解约中 7:已解约 8:已解绑 9:绑卡中 10:审核拒绝 11:换签待审核",
+                    "type": "integer"
+                },
+                "updatetime": {
+                    "description": "更新时间(签解约更新时间)",
+                    "type": "string"
+                }
+            }
+        },
+        "models.QhjBankInfo": {
+            "type": "object",
+            "properties": {
+                "bankid": {
+                    "description": "银行ID",
+                    "type": "string"
+                },
+                "bankname": {
+                    "description": "银行名称",
+                    "type": "string"
+                },
+                "clearbankno": {
+                    "description": "清算系统银行编号",
+                    "type": "string"
+                },
+                "orderindex": {
+                    "description": "排序顺序",
+                    "type": "integer"
+                },
+                "status": {
+                    "description": "状态 - 0:正常 1:注销",
+                    "type": "integer"
+                }
+            }
+        },
         "models.QhjContract": {
             "type": "object",
             "properties": {
@@ -20591,6 +20853,71 @@
                 }
             }
         },
+        "models.QhjReckonPriceLog": {
+            "type": "object",
+            "properties": {
+                "goodsid": {
+                    "description": "商品ID",
+                    "type": "integer"
+                },
+                "lastreckonprice": {
+                    "description": "上日结算价",
+                    "type": "number"
+                },
+                "nextdnlimitprice": {
+                    "description": "下个交易日跌停价",
+                    "type": "number"
+                },
+                "nexttrade": {
+                    "description": "下个交易日",
+                    "type": "string"
+                },
+                "nextuplimitprice": {
+                    "description": "下个交易日涨停价",
+                    "type": "number"
+                },
+                "reckonprice": {
+                    "description": "今日结算价(定投价)",
+                    "type": "number"
+                },
+                "reckontime": {
+                    "description": "结算时间",
+                    "type": "string"
+                },
+                "totalholderqty": {
+                    "description": "总持仓数",
+                    "type": "integer"
+                },
+                "totalstock": {
+                    "description": "总库存",
+                    "type": "integer"
+                },
+                "tradedate": {
+                    "description": "交易日",
+                    "type": "string"
+                },
+                "updowncount": {
+                    "description": "连续涨(跌)停天数 (涨跌停标志变为0时值归0,变成涨停或是跌停时值为1,连续涨停天数+1,连续跌停天数+1)",
+                    "type": "integer"
+                },
+                "updownflag": {
+                    "description": "连续涨跌停标志 - 0:无涨跌停 -1:跌停 1:涨停",
+                    "type": "integer"
+                },
+                "updownrate": {
+                    "description": "今日涨跌幅",
+                    "type": "number"
+                },
+                "updownrate_2d": {
+                    "description": "连续两日涨跌幅",
+                    "type": "number"
+                },
+                "updownrate_3d": {
+                    "description": "连续三日涨跌幅",
+                    "type": "number"
+                }
+            }
+        },
         "models.QhjTradeGoodsPickup": {
             "type": "object",
             "properties": {
@@ -21702,13 +22029,21 @@
                     "type": "string"
                 },
                 "accountstatus": {
-                    "description": "账户状态 -  1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:注销",
+                    "description": "账户状态 -  1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销) 7:注销(删除)",
+                    "type": "integer"
+                },
+                "applysrc": {
+                    "description": "申请来源 - 1:管理端 2:终端",
                     "type": "integer"
                 },
                 "auditremark": {
                     "description": "审核备注",
                     "type": "string"
                 },
+                "auditsrc": {
+                    "description": "审核来源 - 1:管理端 2:终端",
+                    "type": "integer"
+                },
                 "audittime": {
                     "description": "审核时间",
                     "type": "string"
@@ -21729,6 +22064,10 @@
                     "description": "销户人",
                     "type": "integer"
                 },
+                "canrecommend": {
+                    "description": "是否可推荐 - 0:不可 1;可",
+                    "type": "integer"
+                },
                 "createtime": {
                     "description": "创建时间",
                     "type": "string"
@@ -21769,6 +22108,10 @@
                     "description": "修改时间",
                     "type": "string"
                 },
+                "parenttopuser": {
+                    "description": "上级顶级机构 [092=0,1时,默认为1, 092=2时若自已为顶级,则填入自己,自己不为顶级,填入ParentUserID的\"ParentTopUser\"]",
+                    "type": "string"
+                },
                 "parentuserid": {
                     "description": "所属机构ID",
                     "type": "integer"
@@ -21789,6 +22132,14 @@
                     "description": "推荐码",
                     "type": "string"
                 },
+                "rootuserid": {
+                    "description": "根用户ID",
+                    "type": "integer"
+                },
+                "subaccountlevel": {
+                    "description": "子账户层数",
+                    "type": "integer"
+                },
                 "subarealevelpath": {
                     "description": "子机构层级路径(逗号分隔,首尾加逗号)",
                     "type": "string"
@@ -21798,7 +22149,7 @@
                     "type": "integer"
                 },
                 "usertype": {
-                    "description": "账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户",
+                    "description": "账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)",
                     "type": "integer"
                 }
             }

+ 252 - 6
docs/swagger.yaml

@@ -8708,6 +8708,115 @@ definitions:
         description: 业务类型,1-期现套利,2-仓单回购,3-现货贸易
         type: integer
     type: object
+  models.QhjBankAccountSign:
+    properties:
+      accountcode:
+        description: 资金账号
+        type: string
+      accountname:
+        description: 资金账号对应的账号名(UserName)
+        type: string
+      accounttype:
+        description: 账户类型(UserType)
+        type: integer
+      applicationtime:
+        description: 最后一次更新的时间
+        type: string
+      applyexchticket:
+        description: 申请流水
+        type: string
+      auditid:
+        description: 审核人
+        type: integer
+      audittime:
+        description: 审核时间
+        type: string
+      bankaccountname:
+        description: 签约银行卡账号名
+        type: string
+      bankaccountno:
+        description: 银行卡号
+        type: string
+      bankaccounttype:
+        description: 银行账户类型 - 1-对私; 2-对公
+        type: integer
+      bankcardtype:
+        description: 银行卡类型
+        type: integer
+      bankchildaccount:
+        description: 银行子账号(签约成功后,很多银行会返回对应的这个虚拟账号)
+        type: string
+      bankcity:
+        description: 开户行城市
+        type: string
+      bankid:
+        description: 签约银行ID
+        type: string
+      bankprovince:
+        description: 开户行省份
+        type: string
+      branchbankid:
+        description: 签约银行支行号
+        type: string
+      branchbankname:
+        description: 签约银行支行名称
+        type: string
+      cardno:
+        description: 证件号码
+        type: string
+      cardtype:
+        description: 证件类型
+        type: string
+      currency:
+        description: 币种
+        type: string
+      cusbankid:
+        description: 托管银行编号
+        type: string
+      direct:
+        description: 方向(可以判断那方先发起的签约)
+        type: integer
+      exchticket:
+        description: 最后一次签约成功的流水号
+        type: string
+      extendinfo:
+        description: 扩展信息(JSON字符串)
+        type: string
+      mobilephone:
+        description: 手机号
+        type: string
+      netaddr:
+        description: 调转网址
+        type: string
+      relateduserid:
+        description: 关联使用者userid
+        type: integer
+      signstatus:
+        description: 签约状态 - 1:未签约 2:签约待审核 3:签约中 4:已签约 5:解约待审核 6:解约中 7:已解约 8:已解绑 9:绑卡中
+          10:审核拒绝 11:换签待审核
+        type: integer
+      updatetime:
+        description: 更新时间(签解约更新时间)
+        type: string
+    type: object
+  models.QhjBankInfo:
+    properties:
+      bankid:
+        description: 银行ID
+        type: string
+      bankname:
+        description: 银行名称
+        type: string
+      clearbankno:
+        description: 清算系统银行编号
+        type: string
+      orderindex:
+        description: 排序顺序
+        type: integer
+      status:
+        description: 状态 - 0:正常 1:注销
+        type: integer
+    type: object
   models.QhjContract:
     properties:
       contractconfirmtime:
@@ -9044,6 +9153,54 @@ definitions:
         description: 用户名称(userid对应的名称)
         type: string
     type: object
+  models.QhjReckonPriceLog:
+    properties:
+      goodsid:
+        description: 商品ID
+        type: integer
+      lastreckonprice:
+        description: 上日结算价
+        type: number
+      nextdnlimitprice:
+        description: 下个交易日跌停价
+        type: number
+      nexttrade:
+        description: 下个交易日
+        type: string
+      nextuplimitprice:
+        description: 下个交易日涨停价
+        type: number
+      reckonprice:
+        description: 今日结算价(定投价)
+        type: number
+      reckontime:
+        description: 结算时间
+        type: string
+      totalholderqty:
+        description: 总持仓数
+        type: integer
+      totalstock:
+        description: 总库存
+        type: integer
+      tradedate:
+        description: 交易日
+        type: string
+      updowncount:
+        description: 连续涨(跌)停天数 (涨跌停标志变为0时值归0,变成涨停或是跌停时值为1,连续涨停天数+1,连续跌停天数+1)
+        type: integer
+      updownflag:
+        description: 连续涨跌停标志 - 0:无涨跌停 -1:跌停 1:涨停
+        type: integer
+      updownrate:
+        description: 今日涨跌幅
+        type: number
+      updownrate_2d:
+        description: 连续两日涨跌幅
+        type: number
+      updownrate_3d:
+        description: 连续三日涨跌幅
+        type: number
+    type: object
   models.QhjTradeGoodsPickup:
     properties:
       accountid:
@@ -9868,11 +10025,17 @@ definitions:
         description: 账户名称(机构名称)
         type: string
       accountstatus:
-        description: 账户状态 -  1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:注销
+        description: 账户状态 -  1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销) 7:注销(删除)
+        type: integer
+      applysrc:
+        description: 申请来源 - 1:管理端 2:终端
         type: integer
       auditremark:
         description: 审核备注
         type: string
+      auditsrc:
+        description: 审核来源 - 1:管理端 2:终端
+        type: integer
       audittime:
         description: 审核时间
         type: string
@@ -9888,6 +10051,9 @@ definitions:
       canceluserid:
         description: 销户人
         type: integer
+      canrecommend:
+        description: 是否可推荐 - 0:不可 1;可
+        type: integer
       createtime:
         description: 创建时间
         type: string
@@ -9918,6 +10084,9 @@ definitions:
       modifytime:
         description: 修改时间
         type: string
+      parenttopuser:
+        description: 上级顶级机构 [092=0,1时,默认为1, 092=2时若自已为顶级,则填入自己,自己不为顶级,填入ParentUserID的"ParentTopUser"]
+        type: string
       parentuserid:
         description: 所属机构ID
         type: integer
@@ -9933,6 +10102,12 @@ definitions:
       refernum:
         description: 推荐码
         type: string
+      rootuserid:
+        description: 根用户ID
+        type: integer
+      subaccountlevel:
+        description: 子账户层数
+        type: integer
       subarealevelpath:
         description: 子机构层级路径(逗号分隔,首尾加逗号)
         type: string
@@ -9940,7 +10115,7 @@ definitions:
         description: 用户ID
         type: integer
       usertype:
-        description: 账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户
+        description: 账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)
         type: integer
     required:
     - userid
@@ -14108,10 +14283,6 @@ paths:
         in: query
         name: deliverygoodsid
         type: integer
-      - description: 品类id(明细必填)
-        in: query
-        name: wrstandardid
-        type: integer
       - description: 币种id(明细必填)
         in: query
         name: currencyid
@@ -16401,6 +16572,52 @@ paths:
       summary: 持仓汇总查询(合约市场)
       tags:
       - 通用单据
+  /Qhj/QueryBankAccountSign:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.QhjBankAccountSign'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询签约银行信息(提现账户管理)
+      tags:
+      - 大连千海金
+  /Qhj/QueryBankInfo:
+    get:
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.QhjBankInfo'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询开户行
+      tags:
+      - 大连千海金
   /Qhj/QueryContract:
     get:
       parameters:
@@ -16571,6 +16788,35 @@ paths:
       summary: 查询定投设置(我的定投/历史定投[状态=已终止])
       tags:
       - 大连千海金
+  /Qhj/QueryReckonPriceLog:
+    get:
+      parameters:
+      - description: 商品ID
+        in: query
+        name: goodsid
+        type: integer
+      - description: 交易日 格式(yyyymmdd)
+        in: query
+        name: tradedate
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.QhjReckonPriceLog'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询定投价(结算价)
+      tags:
+      - 大连千海金
   /Qhj/QueryTradeGoodsPickup:
     get:
       parameters:

+ 14 - 15
models/ermcp3Report.go

@@ -930,10 +930,7 @@ func (r *Ermcp3AreaSpotPLReport) buildSqlDay() string {
 	var sqlId utils.SQLVal = "select a.*," +
 		"       g.deliverygoodscode," +
 		"       g.deliverygoodsname," +
-		"       g.goodsunitid," +
-		"       w.wrstandardcode," +
-		"       w.wrstandardname," +
-		"       w.unitid" +
+		"       g.goodsunitid" +
 		"  from (SELECT t.RECKONDATE," +
 		"               t.AREAUSERID," +
 		"               t.CURRENCYID," +
@@ -971,9 +968,7 @@ func (r *Ermcp3AreaSpotPLReport) buildSqlDay() string {
 		"                  t.CURRENCYID," +
 		"                  t.DELIVERYGOODSID) a" +
 		"  LEFT JOIN DELIVERYGOODS g" +
-		"    on a.deliverygoodsid = g.deliverygoodsid" +
-		"  LEFT JOIN WRSTANDARD w" +
-		"    on a.wrstandardid = w.wrstandardid"
+		"    on a.deliverygoodsid = g.deliverygoodsid"
 	var sqlParam utils.SQLVal
 	sqlParam.And("t.AREAUSERID", r.AREAUSERID)
 	if r.QueryType == 1 {
@@ -1048,7 +1043,6 @@ func (r *Ermcp3AreaSpotPLReport) buildSqlDayDetail() string {
 	}
 	sqlParam.And("t.CURRENCYID", r.CURRENCYID)
 	sqlParam.And("t.DELIVERYGOODSID", r.DELIVERYGOODSID)
-	sqlParam.And("t.WRSTANDARDID", r.WRSTANDARDID)
 	sqlId.FormatParam(sqlParam.String())
 	return sqlId.String()
 }
@@ -1058,10 +1052,7 @@ func (r *Ermcp3AreaSpotPLReport) buildSqlCycle() string {
 	var sqlId utils.SQLVal = "select a.*," +
 		"       g.deliverygoodscode," +
 		"       g.deliverygoodsname," +
-		"       g.goodsunitid," +
-		"       w.wrstandardcode," +
-		"       w.wrstandardname," +
-		"       w.unitid" +
+		"       g.goodsunitid" +
 		"  from (SELECT t.cycletype," +
 		"               t.cycletime," +
 		"               t.AREAUSERID," +
@@ -1101,9 +1092,7 @@ func (r *Ermcp3AreaSpotPLReport) buildSqlCycle() string {
 		"                  t.CURRENCYID," +
 		"                  t.DELIVERYGOODSID) a" +
 		"  LEFT JOIN DELIVERYGOODS g" +
-		"    on a.deliverygoodsid = g.deliverygoodsid" +
-		"  LEFT JOIN WRSTANDARD w" +
-		"    on a.wrstandardid = w.wrstandardid"
+		"    on a.deliverygoodsid = g.deliverygoodsid"
 	var sqlParam utils.SQLVal
 	sqlParam.And("t.AREAUSERID", r.AREAUSERID)
 	sqlParam.And("t.Cycletype", r.CYCLETYPE)
@@ -1171,6 +1160,16 @@ type Ermcp3FinanceReport struct {
 func (r *Ermcp3FinanceReport) calc() {
 	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
 	r.ACCOUNTNAME = mtpcache.GetUserNameByUserId(r.AREAUSERID)
+	f := func(v *float64) {
+		if *v < 0 {
+			*v = 0
+		}
+	}
+
+	f(&r.BUYPREPAIDAMOUNT)
+	f(&r.SELLPREINVOICEDAMOUNT)
+	f(&r.BUYUNINVOICEDAMOUNT)
+	f(&r.SELLPREPAIDAMOUNT)
 }
 
 // getSumField 获取汇总维度字段

+ 175 - 0
models/qhj.go

@@ -674,3 +674,178 @@ func (r *QhjPickArea) GetDataEx() (interface{}, error) {
 	}
 	return sData, err
 }
+
+// QhjBankAccountSign 签约银行
+type QhjBankAccountSign struct {
+	ACCOUNTTYPE      int32  `json:"accounttype"  xorm:"ACCOUNTTYPE"`           // 账户类型(UserType)
+	BANKACCOUNTTYPE  int32  `json:"bankaccounttype"  xorm:"BANKACCOUNTTYPE"`   // 银行账户类型 - 1-对私; 2-对公
+	BANKCARDTYPE     int32  `json:"bankcardtype"  xorm:"BANKCARDTYPE"`         // 银行卡类型
+	DIRECT           int32  `json:"direct"  xorm:"DIRECT"`                     // 方向(可以判断那方先发起的签约)
+	SIGNSTATUS       int32  `json:"signstatus"  xorm:"SIGNSTATUS"`             // 签约状态 - 1:未签约 2:签约待审核 3:签约中 4:已签约 5:解约待审核 6:解约中 7:已解约 8:已解绑 9:绑卡中 10:审核拒绝 11:换签待审核
+	AUDITID          int64  `json:"auditid"  xorm:"AUDITID"`                   // 审核人
+	ACCOUNTCODE      string `json:"accountcode"  xorm:"ACCOUNTCODE"`           // 资金账号
+	ACCOUNTNAME      string `json:"accountname"  xorm:"ACCOUNTNAME"`           // 资金账号对应的账号名(UserName)
+	APPLICATIONTIME  string `json:"applicationtime"  xorm:"APPLICATIONTIME"`   // 最后一次更新的时间
+	APPLYEXCHTICKET  string `json:"applyexchticket"  xorm:"APPLYEXCHTICKET"`   // 申请流水
+	AUDITTIME        string `json:"audittime"  xorm:"AUDITTIME"`               // 审核时间
+	BANKACCOUNTNAME  string `json:"bankaccountname"  xorm:"BANKACCOUNTNAME"`   // 签约银行卡账号名
+	BANKACCOUNTNO    string `json:"bankaccountno"  xorm:"BANKACCOUNTNO"`       // 银行卡号
+	BANKCHILDACCOUNT string `json:"bankchildaccount"  xorm:"BANKCHILDACCOUNT"` // 银行子账号(签约成功后,很多银行会返回对应的这个虚拟账号)
+	BANKCITY         string `json:"bankcity"  xorm:"BANKCITY"`                 // 开户行城市
+	BANKID           string `json:"bankid"  xorm:"BANKID"`                     // 签约银行ID
+	BANKPROVINCE     string `json:"bankprovince"  xorm:"BANKPROVINCE"`         // 开户行省份
+	BRANCHBANKID     string `json:"branchbankid"  xorm:"BRANCHBANKID"`         // 签约银行支行号
+	BRANCHBANKNAME   string `json:"branchbankname"  xorm:"BRANCHBANKNAME"`     // 签约银行支行名称
+	CARDNO           string `json:"cardno"  xorm:"CARDNO"`                     // 证件号码
+	CARDTYPE         string `json:"cardtype"  xorm:"CARDTYPE"`                 // 证件类型
+	CURRENCY         string `json:"currency"  xorm:"CURRENCY"`                 // 币种
+	CUSBANKID        string `json:"cusbankid"  xorm:"CUSBANKID"`               // 托管银行编号
+	EXCHTICKET       string `json:"exchticket"  xorm:"EXCHTICKET"`             // 最后一次签约成功的流水号
+	EXTENDINFO       string `json:"extendinfo"  xorm:"EXTENDINFO"`             // 扩展信息(JSON字符串)
+	MOBILEPHONE      string `json:"mobilephone"  xorm:"MOBILEPHONE"`           // 手机号
+	NETADDR          string `json:"netaddr"  xorm:"NETADDR"`                   // 调转网址
+	UPDATETIME       string `json:"updatetime"  xorm:"UPDATETIME"`             // 更新时间(签解约更新时间)
+	RELATEDUSERID    int64  `json:"relateduserid"  xorm:"'RELATEDUSERID'"`     // 关联使用者userid
+}
+
+func (r *QhjBankAccountSign) calc() {
+
+}
+
+func (r *QhjBankAccountSign) buildSql() string {
+	var sqlId utils.SQLVal = "SELECT t.ACCOUNTCODE," +
+		"       t.CUSBANKID," +
+		"       t.SIGNSTATUS," +
+		"       t.CURRENCY," +
+		"       t.ACCOUNTTYPE," +
+		"       t.ACCOUNTNAME," +
+		"       t.BANKCARDTYPE," +
+		"       t.BANKACCOUNTNO," +
+		"       t.BANKACCOUNTTYPE," +
+		"       t.BANKCHILDACCOUNT," +
+		"       t.BANKID," +
+		"       t.BRANCHBANKID," +
+		"       t.BRANCHBANKNAME," +
+		"       t.BANKACCOUNTNAME," +
+		"       t.CARDTYPE," +
+		"       t.CARDNO," +
+		"       t.BANKPROVINCE," +
+		"       t.BANKCITY," +
+		"       t.DIRECT," +
+		"       t.MOBILEPHONE," +
+		"       t.EXTENDINFO," +
+		"       t.EXCHTICKET," +
+		"       to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME," +
+		"       to_char(t.APPLICATIONTIME, 'yyyy-mm-dd hh24:mi:ss') APPLICATIONTIME," +
+		"       t.NETADDR," +
+		"       t.AUDITID," +
+		"       to_char(t.AUDITTIME, 'yyyy-mm-dd hh24:mi:ss') AUDITTIME," +
+		"       t.APPLYEXCHTICKET," +
+		"       ta.accountid," +
+		"       ta.relateduserid" +
+		"  FROM BANK_ACCOUNTSIGN t" +
+		" INNER JOIN TAACCOUNT ta" +
+		"    on t.accountcode = to_char(ta.accountid)" +
+		" WHERE 1 = 1 and ta.taaccounttype = 2"
+	sqlId.And("ta.RELATEDUSERID", r.RELATEDUSERID)
+	return sqlId.String()
+}
+
+// GetDataEx 获取签约银行
+func (r *QhjBankAccountSign) GetDataEx() (interface{}, error) {
+	sData := make([]QhjBankAccountSign, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}
+
+// QhjBankInfo 银行信息列表
+type QhjBankInfo struct {
+	STATUS      int32  `json:"status"  xorm:"STATUS"`           // 状态 - 0:正常 1:注销
+	ORDERINDEX  int64  `json:"orderindex"  xorm:"ORDERINDEX"`   // 排序顺序
+	BANKID      string `json:"bankid"  xorm:"BANKID"`           // 银行ID
+	BANKNAME    string `json:"bankname"  xorm:"BANKNAME"`       // 银行名称
+	CLEARBANKNO string `json:"clearbankno"  xorm:"CLEARBANKNO"` // 清算系统银行编号
+}
+
+func (r *QhjBankInfo) calc() {
+
+}
+
+func (r *QhjBankInfo) buildSql() string {
+	var sqlId utils.SQLVal = "SELECT t.BANKID,t.BANKNAME,t.CLEARBANKNO,t.STATUS,t.ORDERINDEX FROM BANK_BANKINFO t WHERE 1=1 and t.status=0"
+
+	return sqlId.String()
+}
+
+// GetDataEx 获取银行信息列表
+func (r *QhjBankInfo) GetDataEx() (interface{}, error) {
+	sData := make([]QhjBankInfo, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}
+
+// QhjReckonPriceLog 结算价(定投价)
+type QhjReckonPriceLog struct {
+	LASTRECKONPRICE  float64 `json:"lastreckonprice"  xorm:"LASTRECKONPRICE"`      // 上日结算价
+	NEXTDNLIMITPRICE float64 `json:"nextdnlimitprice"  xorm:"NEXTDNLIMITPRICE"`    // 下个交易日跌停价
+	NEXTUPLIMITPRICE float64 `json:"nextuplimitprice"  xorm:"NEXTUPLIMITPRICE"`    // 下个交易日涨停价
+	RECKONPRICE      float64 `json:"reckonprice"  xorm:"RECKONPRICE"`              // 今日结算价(定投价)
+	UPDOWNRATE       float64 `json:"updownrate"  xorm:"UPDOWNRATE"`                // 今日涨跌幅
+	UPDOWNRATE_2D    float64 `json:"updownrate_2d"  xorm:"UPDOWNRATE_2D"`          // 连续两日涨跌幅
+	UPDOWNRATE_3D    float64 `json:"updownrate_3d"  xorm:"UPDOWNRATE_3D"`          // 连续三日涨跌幅
+	TOTALHOLDERQTY   int32   `json:"totalholderqty"  xorm:"TOTALHOLDERQTY"`        // 总持仓数
+	TOTALSTOCK       int32   `json:"totalstock"  xorm:"TOTALSTOCK"`                // 总库存
+	UPDOWNCOUNT      int32   `json:"updowncount"  xorm:"UPDOWNCOUNT"`              // 连续涨(跌)停天数 (涨跌停标志变为0时值归0,变成涨停或是跌停时值为1,连续涨停天数+1,连续跌停天数+1)
+	UPDOWNFLAG       int32   `json:"updownflag"  xorm:"UPDOWNFLAG"`                // 连续涨跌停标志 - 0:无涨跌停 -1:跌停 1:涨停
+	GOODSID          int64   `json:"goodsid"  xorm:"GOODSID" form:"goodsid"`       // 商品ID
+	NEXTTRADE        string  `json:"nexttrade"  xorm:"NEXTTRADE"`                  // 下个交易日
+	RECKONTIME       string  `json:"reckontime"  xorm:"RECKONTIME"`                // 结算时间
+	TRADEDATE        string  `json:"tradedate"  xorm:"TRADEDATE" form:"tradedate"` // 交易日
+}
+
+func (r *QhjReckonPriceLog) calc() {
+
+}
+
+func (r *QhjReckonPriceLog) buildSql() string {
+	var sqlId utils.SQLVal = "SELECT t.TRADEDATE," +
+		"       t.GOODSID," +
+		"       to_char(t.RECKONTIME, 'yyyy-mm-dd hh24:mi:ss') RECKONTIME," +
+		"       t.LASTRECKONPRICE," +
+		"       t.RECKONPRICE," +
+		"       t.UPDOWNRATE," +
+		"       t.UPDOWNFLAG," +
+		"       t.UPDOWNCOUNT," +
+		"       t.UPDOWNRATE_2D," +
+		"       t.UPDOWNRATE_3D," +
+		"       t.NEXTTRADE," +
+		"       t.NEXTUPLIMITPRICE," +
+		"       t.NEXTDNLIMITPRICE," +
+		"       t.TOTALHOLDERQTY," +
+		"       t.TOTALSTOCK," +
+		"       g.goodsname," +
+		"       g.goodscode" +
+		"  FROM RECKON_PRICELOG t" +
+		"  LEFT JOIN GOODS g on t.goodsid=g.goodsid" +
+		"  INNER JOIN MARKET m on g.marketid=g.marketid" +
+		" WHERE 1 = 1 and m.marketid=69201"
+	sqlId.AndEx("t.TRADEDATE", r.TRADEDATE, len(r.TRADEDATE) > 0)
+	sqlId.AndEx("t.GOODSID", r.GOODSID, r.GOODSID > 0)
+	return sqlId.String()
+}
+
+// GetDataEx 获取结算价(定投价)
+func (r *QhjReckonPriceLog) GetDataEx() (interface{}, error) {
+	sData := make([]QhjReckonPriceLog, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}

+ 3 - 0
routers/router.go

@@ -455,8 +455,11 @@ func InitRouter() *gin.Engine {
 		qhjR.GET("QueryUserReceiveInfo", qhj.QueryUserReceiveInfo)
 		qhjR.GET("QueryUserCollectConfig", qhj.QueryUserCollectConfig)
 		qhjR.GET("QueryTradeGoodsPickup", qhj.QueryTradeGoodsPickup)
+		qhjR.GET("QueryBankAccountSign", qhj.QueryBankAccountSign)
 		qhjR.GET("QueryPickGoods", qhj.QueryPickGoods)
 		qhjR.GET("QueryPickArea", qhj.QueryPickArea)
+		qhjR.GET("QueryBankInfo", qhj.QueryBankInfo)
+		qhjR.GET("QueryReckonPriceLog", qhj.QueryReckonPriceLog)
 	}
 
 	return r