zhou.xiaoning пре 1 година
родитељ
комит
671034af5d
8 измењених фајлова са 1404 додато и 378 уклоњено
  1. 7 7
      config/config.xml
  2. 4 4
      controllers/guangzuan/tradeService.go
  3. 36 0
      controllers/taaccount/taaccount.go
  4. 420 131
      docs/docs.go
  5. 420 131
      docs/swagger.json
  6. 331 105
      docs/swagger.yaml
  7. 183 0
      models/account.go
  8. 3 0
      routers/router.go

+ 7 - 7
config/config.xml

@@ -13,11 +13,11 @@
     <DbAddress value="192.168.31.88"/>
     <DbName value="orcl"/>
     <DbPort value="1521"/>
-    <DbUser value="mtp2_test134"/>
+    <DbUser value="mtp2_test205"/>
     <DbPwd value="muchinfo"/>
   </DbSetting>
   <RedisSetting>
-    <Address value="192.168.31.134"/>
+    <Address value="192.168.31.205"/>
     <Port value="5007"/>
     <Timeout value="3"/>
     <ConnNum value="1"/>
@@ -25,11 +25,11 @@
     <Pwd value=""/>
   </RedisSetting>
   <MqSetting>
-    <Url value="amqp://guest:guest@192.168.31.134:5020/test"/>
+    <Url value="amqp://guest:guest@192.168.31.205:5020/test"/>
     <Exchange value="entry"/>
   </MqSetting>
   <MongoDBSetting>
-    <HostName value="192.168.31.134"/>
+    <HostName value="192.168.31.205"/>
     <Port value="5025"/>
     <DBName value="HistoryQuote"/>
     <Username value="quote_test01"/>
@@ -38,8 +38,8 @@
   <MySQLSetting>
     <Host value="192.168.30.72"/>
     <Port value="3306"/>
-    <DBName value="historyquote_test134"/>
-    <Username value="quote_test134"/>
+    <DBName value="historyquote_test205"/>
+    <Username value="quote_test205"/>
     <Password value="123456"/>
   </MySQLSetting>
   <Tencent>
@@ -59,6 +59,6 @@
     <AppId value="896210645"/>
     <PrivateKey value="MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCqmByEbXbqqq+FYxD1+mJzqrVxG/7xNF3iZJV9q0PqOVwWPEtND8nNuB2FeAwHc5+W7dZwXheVaQqWXvV6lnWp3KaQ9S4CbeOX7zKKF0j42JMj4Adknid9X6OlULZeVoXcQsdQ2h9xpfJhwLka4aOX5p1eP6WocXMrkAVRXEA8aNAlTUHBWhrbiJpKdL4KIDs6hwh0QqLbnt8i7t02wq6qubGW0hYvdY3MQL2GfbNoIZUbYezp5eCyHm/8cFT/WTt1sGSg4hD8JbUn0GTMcrh4rrQLmcJbjStNUOyjqouASTK1A2QQxSS5p2Y7AC4yut3MIqyr7ByAX9/85HtHrdX3AgMBAAECggEAFWRBnzGCyeZhYB6OD+o30j1Dx001aNWiODNYs4t4VrSeoYMqBh3Gtm8x9HybNYwAJRLp4ulJl8i2NSjvK1IWqxgqIt87x74z3ed2tO46jknKGaOMCcfzN7t4b9BxLd83pekRyUewzbV7cVqTW5WTyAZ5EUp14Wtof7vtjsg8ndZp1C0LzJrsQ63LWJAWsfkiRwNwbjkIKTl12xwe3ctZD/PmxYVgWGog+32OiiiTuSf4O1ddp3y2kth66dSIO06VPCqgu8gLwG5epgHmy0Y1ugunpZINN2D7FCH7aaE+H+aQ4nltNIxpQV20grtQG546oDilfPCQLxeW1HUipq2wkQKBgQDyqo180/lJ4wSNFU/hNqLfs2629vU9MH9aSjG5nQpchkTgBxUhAE5RkKgQHLJHJTfPx7vkx2xkI3qddwsWzvt8lNs5NQNxh+LyXQEgy9FCfpopijy2epLpzd2WT+0Y9WK5oB7O32s2YW/6fm0ahu3EJnvBlp1M23FzuRfrV7gu5QKBgQCz98MyV0UAnP3x+Gq5/0siVGPInzYlfTfYcEI3qhlMfqPVkRqqHdGGsiQL70YJlTlZkLeh3r2UvoR956nV9lZgh37aWnaHw7FAYcA5z4FYEFdmpLK/8znaKn/fxypr9xkJtw5V1QgCeaSUCFbt0xp41LaAvwSDBfFqdOTzQMFHqwKBgEyZN4YypxsClPovwwI1K95vFkCc3baN63VFvEJ55r5kB7OrqKi9HvuyLMrBNCku/1oQEyhZJsbJSDgSTqbJeSrPFhANwuOAYEveva9rhsd1jRYVs6pqMJuqxwpeeloJgztS5saoUYBd62nnpGreMolbGG94KnkLP9mmkH1SOCpdAoGAbheD3ljKilx/cLVxvIRy1vZe8EyNGBPoxMuvhlPVFBloae5RLH3/PfHd4TsnUhdqNOM1op0axlJhxI+iMpR2NKjOrg6m8diBpwvlRrgsvM2KWe0ouAm3e0GCZkd1KQTI2UuVRmaCdtkpF7GeU/BPAlnFpy6zON+61k/Z+wDC++8CgYEA54xmJqIr19BpKkcHAxE2pzDrj6ssu2qObKLfsS27o4RevBnrhoY9kPwn8kUKpngoCTd7tM42y9fcpAdUDv+lENAcIF/kz4u+zkyRGR+SpirgAsCYzxZN3GfRNDHBaFEiTkyL6NFdPGV2GTPcd0b6JGf82Thb0JJCxB/J3hVnDIs="/>
     <NotifyUrl value="http://218.17.158.45:15160/api/Asign/HandleASignCompleted"/>
-    <OpenApiUrl value="http://192.168.31.134:5015/mtp2-onlineopen"/>
+    <OpenApiUrl value="http://192.168.31.205:5015/mtp2-onlineopen"/>
   </Asign>
 </Configuration>

+ 4 - 4
controllers/guangzuan/tradeService.go

@@ -18,8 +18,8 @@ import (
 // @Security Group
 // @Param    userid   query    int    true  "用户ID"
 // @Param    executestatus query    int false "执行状态 - 1:未生效 2:进行中 3:已结束"
-// @Param    page          query    int false "页码"
-// @Param    pagesize      query    int false "每页条数"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
 // @Success  200           {array}  models.GzcjjcorderM
 // @Failure  500     {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrder [get]
@@ -39,8 +39,8 @@ func QueryGZCJJCOrder(c *gin.Context) {
 // @Security Group
 // @Param    userid        query    int true  "用户ID"
 // @Param    orderid  query    string false "单据ID"
-// @Param    page     query    int    false "页码"
-// @Param    pagesize query    int    false "每页条数"
+// @Param    page          query    int false "页码"
+// @Param    pagesize      query    int false "每页条数"
 // @Success  200      {array}  models.GzcjjcorderdetailM
 // @Failure  500           {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrderDetail [get]

+ 36 - 0
controllers/taaccount/taaccount.go

@@ -360,3 +360,39 @@ func QueryRelatedTaAccount(c *gin.Context) {
 	a.DoBindReq(&m)
 	a.DoGetDataI(&m)
 }
+
+// GetGtwithholdsigninfo
+// @Summary 获取代扣签约信息表
+// @Produce  json
+// @Param   userid query    int true "用户ID"
+// @Success 200    {array}  models.Gtwithholdsigninfo
+// @Failure 500    {object} app.Response
+// @Router  /TaAccount/GetGtwithholdsigninfo [get]
+// @Tags     资金账户
+func GetGtwithholdsigninfo(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.Gtwithholdsigninfo{}
+	a.DoBindReq(&m)
+	a.DoGetDataEx(&m)
+}
+
+// QueryTHJFriends
+// @Summary  查询代扣入金申请表
+// @Produce json
+// @Security ApiKeyAuth
+// @Param    userid     query    int    true  "用户ID"
+// @Param    begindate  query    string false "开始交易日(yyyymmdd)"
+// @Param    enddate    query    string false "结束交易日(yyyymmdd)"
+// @Param    billresult query    int    false "批扣结果 - 0-扣费成功、1-扣费失败"
+// @Param    page       query    int    false "页码"
+// @Param    pagesize   query    int    false "每页条数"
+// @Success  200        {array}  models.Gtwithholddepositapply
+// @Failure  500        {object} app.Response
+// @Router   /TaAccount/QueryGtwithholddepositapply [get]
+// @Tags    资金账户
+func QueryGtwithholddepositapply(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	m := models.Gtwithholddepositapply{}
+	a.DoBindReq(&m)
+	a.DoGetDataByPage(&m)
+}

Разлика између датотеке није приказан због своје велике величине
+ 420 - 131
docs/docs.go


Разлика између датотеке није приказан због своје велике величине
+ 420 - 131
docs/swagger.json


+ 331 - 105
docs/swagger.yaml

@@ -146,12 +146,10 @@ definitions:
   asign.BankCard4Req:
     properties:
       company:
-        allOf:
-        - $ref: '#/definitions/asign.CompanyBankCard4'
+        $ref: '#/definitions/asign.CompanyBankCard4'
         description: 企业法人银行卡四要素,实体类型为企业时必填
       person:
-        allOf:
-        - $ref: '#/definitions/asign.PersonBankCard4'
+        $ref: '#/definitions/asign.PersonBankCard4'
         description: 个人银行卡四要素,实体类型为个人时必填
       type:
         description: 实体类型 1:个人 2:企业
@@ -490,8 +488,7 @@ definitions:
           $ref: '#/definitions/models.Division'
         type: array
       province:
-        allOf:
-        - $ref: '#/definitions/models.Division'
+        $ref: '#/definitions/models.Division'
         description: 省
     type: object
   common.QueryTableDefineRsp:
@@ -1539,7 +1536,7 @@ definitions:
   ermcp.QryBusinessDjRsp:
     properties:
       amount:
-        description: 点价金额=(点价价格+升贴水)*点价数量
+        description: 期初均价
         type: number
       applyid:
         description: 申请人
@@ -1974,7 +1971,7 @@ definitions:
         description: 现货合同类型 - 1:采购 -1:销售
         type: integer
       deductamount:
-        description: 退款(非必填)
+        description: 期初均价
         type: number
       deliverygoodscode:
         description: 现货品种代码
@@ -2004,7 +2001,7 @@ definitions:
         description: 操作申请类型 - 1:点价 2:结算登记 3:款项登记 4:发票登记
         type: integer
       payamount:
-        description: 收付款(非必填)
+        description: 期初均价
         type: number
       pricemove:
         description: 升贴水
@@ -2126,8 +2123,7 @@ definitions:
           $ref: '#/definitions/models.ErmcpGGConvertCfg'
         type: array
       mg:
-        allOf:
-        - $ref: '#/definitions/models.ErmcpMiddleGoodsModel'
+        $ref: '#/definitions/models.ErmcpMiddleGoodsModel'
         description: 套保品种基本信息
       wrcList:
         description: 现货品种列表(现货商品折算配置)
@@ -2572,25 +2568,25 @@ definitions:
         description: 套利量
         type: number
       diffArbitrageQty:
-        description: 套利变动量
+        description: 期初均价
         type: number
       diffExposoureQty:
-        description: 变动量(套保敞口)
+        description: 期初均价
         type: number
       diffFutuQty:
-        description: 变动量(期货总量) 平安:保值净持仓量今日变动
+        description: 期初均价
         type: number
       diffHedgeQty:
-        description: 套保变动量
+        description: 期初均价
         type: number
       diffQty:
-        description: 变动量(总敞口) 平安:净敞口今日变动
+        description: 期初均价
         type: number
       diffSpotHedgeQty:
-        description: 变动量(现货应套保总量) 平安:应套保量今日变动
+        description: 期初均价
         type: number
       diffSpotQty:
-        description: 变动量(现货总量) = 现货数量 - 期初现货数量 平安:采销定价净值今日变动
+        description: 期初均价
         type: number
       enumdicname:
         description: 单位名称
@@ -3792,8 +3788,7 @@ definitions:
           $ref: '#/definitions/erms3.CustomerInfo'
         type: array
       ouruser:
-        allOf:
-        - $ref: '#/definitions/erms3.CustomerInfo'
+        $ref: '#/definitions/erms3.CustomerInfo'
         description: 我方账号
       warehouseinfos:
         description: 仓库信息列表
@@ -4038,8 +4033,7 @@ definitions:
           $ref: '#/definitions/models.Division'
         type: array
       province:
-        allOf:
-        - $ref: '#/definitions/models.Division'
+        $ref: '#/definitions/models.Division'
         description: 省
     type: object
   models.Arearole:
@@ -5451,7 +5445,7 @@ definitions:
         description: 期末额
         type: number
       curaverageprice:
-        description: 期均价
+        description: 期均价
         type: number
       curbuyamount:
         description: 期末采购总额
@@ -5460,7 +5454,7 @@ definitions:
         description: 期末采购总量
         type: number
       curmarketvalue:
-        description: 参考市值(期末市值)
+        description: 期初均价
         type: number
       curqty:
         description: 期末量
@@ -5478,7 +5472,7 @@ definitions:
         description: 期末销售总量
         type: number
       curspotprice:
-        description: 参考市价(最新价)
+        description: 期初均价
         type: number
       cycletime:
         description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
@@ -5502,7 +5496,7 @@ definitions:
         description: 现货品种单位名称(作废)
         type: string
       floatpl:
-        description: 浮动损益
+        description: 期初均价
         type: number
       goodsunitid:
         description: 现货品种单位id(作废)
@@ -5538,7 +5532,7 @@ definitions:
         description: 今日采购额(今采购额)
         type: number
       todaybuyaverageprice:
-        description: 今日采购均价
+        description: 期初均价
         type: number
       todaybuyqty:
         description: 今日采购量(今采购量)
@@ -5553,7 +5547,7 @@ definitions:
         description: 今日销售额(今销售额)
         type: number
       todaysellaverageprice:
-        description: 今日销售均价
+        description: 期初均价
         type: number
       todaysellqty:
         description: 今日销售量(今销售量)
@@ -7733,7 +7727,7 @@ definitions:
         description: 合同类型 1:采购 -1:销售
         type: integer
       convertratio:
-        description: 折算系数
+        description: 期初均价
         type: number
       cycletime:
         description: 周期时间 月(YYYYMM)  季(YYYYQ) 年(YYYY) 周(YYYYIW) 全(0)【原值】
@@ -7751,16 +7745,16 @@ definitions:
         description: 品种名称
         type: string
       diffprice:
-        description: 现期价格差 = 今日点价登记均价(基价) - 今日期货成交均价
+        description: 期初均价
         type: number
       diffqty:
-        description: 期现数量差 = 套保计划量 - 今日期货关联成交量
+        description: 期初均价
         type: number
       enddate:
         description: 结束交易日
         type: string
       hedgeplanqty:
-        description: 套保计划量 = TodayPricedQty * 折算系数 * (1/(1+增值税率)) * 套保比例
+        description: 期初均价
         type: number
       matchname:
         description: 交易对手方(个人:用户名称 企业:简称)
@@ -7778,64 +7772,64 @@ definitions:
         description: 套保品种名称
         type: string
       middlegoodspricedqty:
-        description: 已定价量(套保品种 - 税前) = PricedQty * 折算系数
+        description: 期初均价
         type: number
       middlegoodspricedqty2:
-        description: 已定价量(套保品种- 税后) = MiddleGoodsPricedQty * (1/(1+增值税率))
+        description: 期初均价
         type: number
       middlegoodspricedqty3:
-        description: 已定价量(套保品种应套保量) = MiddleGoodsPricedQty2 *  套保比率
+        description: 期初均价
         type: number
       needhedgeratio:
-        description: 套保系数
+        description: 期初均价
         type: number
       pricedamount:
-        description: 已定价额(现货)
+        description: 期初均价
         type: number
       pricedamount2:
-        description: 已定价额(现货-基价额)
+        description: 期初均价
         type: number
       pricedqty:
-        description: 已定价量(现货)
+        description: 期初均价
         type: number
       reckondate:
         description: 日照时期(yyyyMMdd)
         type: string
       relatedmiddlegoodsamount:
-        description: 已关联额(期货)
+        description: 期初均价
         type: number
       relatedmiddlegoodsqty:
-        description: 已关联量(套保品种)(期货)
+        description: 期初均价
         type: number
       spotcontractid:
         description: 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
         type: string
       todayavgfutuprice:
-        description: 今日期货成交均价 = TodayRelatedMiddleGoodsAmount /todayrelatedfutureqty
+        description: 期初均价
         type: number
       todayavgprice:
-        description: 今日定价均价 = TodayPricedAmount / TodayPricedQty
+        description: 期初均价
         type: number
       todayavgprice2:
-        description: 今日点价登记均价(基价) = TodayPricedAmount2 / TodayPricedQty
+        description: 期初均价
         type: number
       todaypricedamount:
-        description: 今日定价额(现货)
+        description: 期初均价
         type: number
       todaypricedamount2:
-        description: 今日定价额(现货-基价额)
+        description: 期初均价
         type: number
       todaypricedqty:
-        description: 今日定价量(现货)
+        description: 期初均价
         type: number
       todayrelatedfutureqty:
-        description: 今日关联量(期货)
+        description: 期初均价
         type: number
       todayrelatedmiddlegoodsamount:
-        description: 今日关联额(期货)
+        description: 期初均价
         type: number
       todayrelatedmiddlegoodsqty:
-        description: 今日关联量(套保品-期货)
+        description: 期初均价
         type: number
       updatetime:
         description: 更新时间
@@ -7844,7 +7838,7 @@ definitions:
         description: 合同所属用户id
         type: integer
       vatrate:
-        description: 增值税率
+        description: 期初均价
         type: number
       wrstandardcode:
         description: 商品(品类) 代码
@@ -8252,7 +8246,7 @@ definitions:
         description: 手续费
         type: number
       closeavgprice:
-        description: 平仓均价
+        description: 期初均价
         type: number
       closepl:
         description: 平仓损益
@@ -8303,7 +8297,7 @@ definitions:
         description: 期末持仓额
         type: number
       holdqty:
-        description: 期末持仓量
+        description: 期初均价
         type: number
       lastholdamount:
         description: 当前持仓额
@@ -8327,13 +8321,13 @@ definitions:
         description: 期末开仓额
         type: number
       openavgprice:
-        description: 开仓均价
+        description: 期初均价
         type: number
       oriholdamount:
         description: 期初持仓额
         type: number
       oriholdqty:
-        description: 期初持仓量
+        description: 期初均价
         type: number
       oriopenamount:
         description: 期初开仓额
@@ -8366,7 +8360,7 @@ definitions:
         description: 今平仓额
         type: number
       todaycloseqty:
-        description: 今平仓量
+        description: 期初均价
         type: number
       todaygoodsgroupspotqty:
         description: 交易品种变化量 (=(期末持仓量 - 期初持仓量)* 合约乘数)
@@ -8378,7 +8372,7 @@ definitions:
         description: 今开仓额
         type: number
       todayopenqty:
-        description: 今开仓量
+        description: 期初均价
         type: number
       userid:
         description: 账户所属用户ID
@@ -9632,8 +9626,7 @@ definitions:
   models.ErmcpRoleMenuEx:
     properties:
       menu:
-        allOf:
-        - $ref: '#/definitions/models.ErmcpRoleMenu'
+        $ref: '#/definitions/models.ErmcpRoleMenu'
         description: 父级菜单
       subMenu:
         description: 子级菜单
@@ -9860,8 +9853,7 @@ definitions:
   models.ErmcpTaAccountEx:
     properties:
       mainAcc:
-        allOf:
-        - $ref: '#/definitions/models.ErmcpTaAccountM'
+        $ref: '#/definitions/models.ErmcpTaAccountM'
         description: 主账号
       subacclist:
         description: 子账号列表
@@ -11441,8 +11433,7 @@ definitions:
   models.GetTodayAccountConfigInfoRsp:
     properties:
       riskRatioType:
-        allOf:
-        - $ref: '#/definitions/models.Riskratiotype'
+        $ref: '#/definitions/models.Riskratiotype'
         description: 风险率类型表
       todayAccountMargins:
         description: 今日账户保证金表
@@ -11751,6 +11742,181 @@ definitions:
     - goodscode
     - tradedate
     type: object
+  models.Gtwithholddepositapply:
+    properties:
+      accountid:
+        description: 资金账户ID
+        type: integer
+      autoid:
+        description: 自增ID(SEQ_GT_WITHHOLDDEPOSITAPPLY)
+        type: integer
+      billamount:
+        description: 账单金额
+        type: string
+      billingsnum:
+        description: 收费单位流水号(生成唯一的流水号)
+        type: string
+      billresult:
+        description: 批扣结果 - 0-扣费成功、1-扣费失败
+        type: string
+      clientserialno:
+        description: 客户端流水号
+        type: string
+      code:
+        description: 状态码 0-解析成功 1-解析失败
+        type: string
+      createtime:
+        description: 创建时间
+        type: string
+      czrmc:
+        description: 操作人名称
+        type: string
+      deductionbnum:
+        description: 扣费批次号(缴费项目编号_YYYYMMDD_01)
+        type: string
+      dgjfhm:
+        description: 缴费号码
+        type: string
+      jfxmbh:
+        description: 缴费项目编号
+        type: string
+      message:
+        description: 状态码描述
+        type: string
+      trandate:
+        description: 交易日期(yyyymmdd)
+        type: string
+      trantime:
+        description: 交易时间(hhmmss)
+        type: string
+      updatetime:
+        description: 更新时间
+        type: string
+      userid:
+        description: 用户ID
+        type: integer
+    required:
+    - userid
+    type: object
+  models.Gtwithholdsigninfo:
+    properties:
+      accountid:
+        description: 资金账户ID
+        type: integer
+      accountsignstatus:
+        description: 账户签约状态 - 1:未签约 3:签约中 4:已签约 6:解约中 7:已解约
+        type: integer
+      addr:
+        description: 地址
+        type: string
+      byzd2:
+        description: 备用字段2(变更\解约)
+        type: string
+      byzd3:
+        description: 备用字段3(变更\解约)
+        type: string
+      byzd4:
+        description: 备用字段4(变更\解约)
+        type: string
+      byzd5:
+        description: 备用字段5(变更\解约)
+        type: string
+      czrmc:
+        description: 操作人名称(变更\解约)
+        type: string
+      dgjfhm:
+        description: 缴费号码(变更\解约)
+        type: string
+      dgjfmc:
+        description: 缴费名称(变更\解约)
+        type: string
+      dxsqh:
+        description: 申请号 - 短信签约
+        type: string
+      dxyzm:
+        description: 短信验证码 - 短信签约
+        type: string
+      filedname:
+        description: 协议附件名称(变更\解约) - 协议签约
+        type: string
+      jfhm:
+        description: 用户编号(变更\解约)
+        type: string
+      jfrmc:
+        description: 缴费人名称
+        type: string
+      jfrzjhm:
+        description: 缴费人证件号码
+        type: string
+      jfrzjlx:
+        description: 缴费人证件类型
+        type: string
+      jfxmbh:
+        description: 缴费项目编号(变更\解约)
+        type: string
+      khhhh:
+        description: 开户行行号
+        type: string
+      khmc:
+        description: 客户名称
+        type: string
+      kksjbc:
+        description: 扣款时间步长(无限额默认填99)
+        type: string
+      kksjdw:
+        description: 扣款时间单位(TU00:年,TU01:月,TU002:日)
+        type: string
+      kkzh:
+        description: 扣款账号
+        type: string
+      kkzqnkfxe:
+        description: 扣款周期内扣费限额(无限额默认填 0)
+        type: number
+      kkzqnxzbs:
+        description: 扣款周期内限制笔数(无限额默认填 0)
+        type: integer
+      lxdh:
+        description: 联系电话
+        type: string
+      qyxyh:
+        description: 签约协议号
+        type: string
+      qyzt:
+        description: 签约状态 - 00- 签约成功 01- 签约失败 10- 解约成功 11- 解约失败 20- 变更成功 21- 变更失败
+        type: string
+      remark:
+        description: 备注
+        type: string
+      rwjgh:
+        description: 入网机构号
+        type: string
+      updatetime:
+        description: 更新时间
+        type: string
+      userid:
+        description: 用户ID
+        type: integer
+      xydqrq:
+        description: 协议到期日期(yyyy-mm-dd)
+        type: string
+      xydrrq:
+        description: 协议导入时间(变更\解约) - 协议签约
+        type: string
+      xyqsrq:
+        description: 协议签署日期(yyyy-mm-dd)
+        type: string
+      xysxrq:
+        description: 协议生效日(yyyy-mm-dd)
+        type: string
+      yckfxe:
+        description: 一次扣费限额
+        type: number
+      zhlx:
+        description: 账户类型
+        type: string
+    required:
+    - userid
+    type: object
   models.Gzbscgoods:
     properties:
       countryname:
@@ -21005,8 +21171,7 @@ definitions:
         description: 可退定金
         type: number
       tHDetailEx:
-        allOf:
-        - $ref: '#/definitions/models.TradeHolderDetailEx'
+        $ref: '#/definitions/models.TradeHolderDetailEx'
         description: 交易持仓扩展表记录
     type: object
   models.RegisterMoney:
@@ -22451,8 +22616,7 @@ definitions:
   models.THJGoodsDetailRsp:
     properties:
       goodsinfo:
-        allOf:
-        - $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
+        $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
         description: 商品信息
       spotgoodspricelogs:
         description: 历史价格走势
@@ -22609,8 +22773,7 @@ definitions:
           $ref: '#/definitions/models.THJPurchaseTradeDetail_Date'
         type: array
       goodsinfo:
-        allOf:
-        - $ref: '#/definitions/models.THJPurchaseTradeDetail_Goodsinfo'
+        $ref: '#/definitions/models.THJPurchaseTradeDetail_Goodsinfo'
         description: 商品信息
       spotgoodspricelogs:
         description: 历史价格走势
@@ -22789,8 +22952,7 @@ definitions:
           $ref: '#/definitions/models.THJDeliveryMonth'
         type: array
       goodsinfo:
-        allOf:
-        - $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
+        $ref: '#/definitions/models.THJWrstandardDetail_GoodsInfo'
         description: 商品信息
       presaleapplydeposits:
         description: 支付方式
@@ -23825,8 +23987,7 @@ definitions:
         description: 商品ID
         type: integer
       infoc:
-        allOf:
-        - $ref: '#/definitions/pb.GoodsMarginCfgStruct'
+        $ref: '#/definitions/pb.GoodsMarginCfgStruct'
         description: 配置参数
       marketid:
         description: 市场ID
@@ -23850,7 +24011,7 @@ definitions:
         description: 委托单号
         type: string
       orderprice:
-        description: 委托价格
+        description: 期初均价
         type: number
       orderqty:
         description: 委托数量
@@ -23901,7 +24062,7 @@ definitions:
         description: 市场ID
         type: integer
       qty:
-        description: 转让数量(数量)
+        description: 期初均价
         type: number
       tradeid:
         description: 成交单号(关联持仓)
@@ -24239,7 +24400,7 @@ definitions:
         description: 行权日类型 - 1:滚动行权 2:固定日行权
         type: integer
       freezeqty:
-        description: 冻结数量
+        description: 期初均价
         type: number
       goodscode:
         description: 商品代码
@@ -24266,7 +24427,7 @@ definitions:
         description: 持仓价格
         type: number
       holderqty:
-        description: 持仓数量
+        description: 期初均价
         type: number
       isconfirmexercise:
         description: 是否确认行权- 0:否 1:是
@@ -24284,7 +24445,7 @@ definitions:
         description: 建仓价格
         type: number
       openqty:
-        description: 建仓数量
+        description: 期初均价
         type: number
       optiontype:
         description: 期权类型 - 1:认购(看涨) 2:认沽(看跌)
@@ -25394,13 +25555,13 @@ definitions:
         description: 单位名称
         type: string
       fixedprice:
-        description: 挂牌价格
+        description: 期初均价
         type: number
       handlestatus:
         description: 处理状态
         type: integer
       marginvalue:
-        description: 履约保证金比例
+        description: 期初均价
         type: number
       marketid:
         description: 市场ID
@@ -25535,7 +25696,7 @@ definitions:
   models.WrAverageTradePrice:
     properties:
       averageprice:
-        description: 成交均价
+        description: 期初均价
         type: number
       tradedate:
         description: 交易日yyyymm
@@ -25723,7 +25884,7 @@ definitions:
         description: 账号ID
         type: integer
       averageprice:
-        description: 交割均价 = 交割金额 / 交割数量
+        description: 期初均价
         type: number
       begindate:
         description: 开始交易日(yyyymmdd)
@@ -25816,7 +25977,7 @@ definitions:
         description: 交易合约交割价
         type: number
       xgoodsamount:
-        description: 合约金额 = 货款金额(DELIVERYAMOUNT) - 点价货款(P1GOODSREMAINAMOUNT)
+        description: 期初均价
         type: number
       xgoodscode:
         description: 商品代码
@@ -26472,7 +26633,7 @@ definitions:
         description: 步骤名称
         type: string
       stepvalue:
-        description: 步骤值
+        description: 期初均价
         type: number
       templateid:
         description: 履约计划模板ID
@@ -26707,7 +26868,7 @@ definitions:
         description: 是否全好友可见 - 0:否 1:是
         type: integer
       amount:
-        description: 挂牌金额 = 委托数量 * 固定价或升贴水
+        description: 期初均价
         type: number
       bannerpicurl:
         description: Banner图
@@ -26752,10 +26913,10 @@ definitions:
         description: 固定价格    -   [挂牌]
         type: number
       freezecharge:
-        description: 冻结手续费
+        description: 期初均价
         type: number
       freezemargin:
-        description: 冻结保证金(保证金)
+        description: 期初均价
         type: number
       futupricemove:
         description: 期货升贴水
@@ -26782,7 +26943,7 @@ definitions:
         description: 提单ID(208+Unix秒时间戳(10位)+xxxxxx)
         type: string
       marginvalue:
-        description: 保证金设置值(履约保证金)
+        description: 期初均价
         type: number
       marketid:
         description: 市场ID
@@ -26963,7 +27124,7 @@ definitions:
         description: 买卖 - 0:买 1:卖
         type: integer
       delistminqty:
-        description: 起摘数量
+        description: 期初均价
         type: number
       deliverymonth:
         description: 交收月
@@ -27278,7 +27439,7 @@ definitions:
         description: 履约类型 名称
         type: string
       unpaidamount:
-        description: 剩余款(待支付金额)
+        description: 期初均价
         type: number
       userid:
         description: 用户id
@@ -27690,7 +27851,7 @@ definitions:
         description: 是否允许部份摘牌 - 0:不允许 1:允许
         type: integer
       delistminqty:
-        description: 起摘数量
+        description: 期初均价
         type: number
       deliverygoodscode:
         description: 品种代码
@@ -27792,10 +27953,10 @@ definitions:
         description: 日期 格式 yyyymmdd
         type: string
       tradeamount:
-        description: 日成交金额(当日单方向成交金额)
+        description: 期初均价
         type: number
       tradeqty:
-        description: 日成交数量(当日单方向成交数量)
+        description: 期初均价
         type: number
       wrstandardid:
         description: 现货商品ID
@@ -27922,7 +28083,7 @@ definitions:
         description: 已计利息 -> 已计费用
         type: number
       unpaidinterest:
-        description: 未结费用
+        description: 期初均价
         type: number
       updatetime:
         description: 更新时间
@@ -28358,7 +28519,7 @@ definitions:
         description: 委托单号
         type: string
       orderprice:
-        description: 委托价格
+        description: 期初均价
         type: number
       orderqty:
         description: 委托数量
@@ -30804,12 +30965,10 @@ definitions:
   tencent.CreateFlowByTemplateDirectlyReq:
     properties:
       organizationInfo:
-        allOf:
-        - $ref: '#/definitions/tencent.OrganizationInfo'
+        $ref: '#/definitions/tencent.OrganizationInfo'
         description: 签署企业信息,用户类型为企业时必填
       personInfo:
-        allOf:
-        - $ref: '#/definitions/tencent.PersonInfo'
+        $ref: '#/definitions/tencent.PersonInfo'
         description: 签署人信息,用户类型为个人时必填
       userESignRecordID:
         description: 用户电子签记录表ID 只有当前状态是1和4的电子签记录才能发起合同签署
@@ -30921,8 +31080,7 @@ definitions:
           $ref: '#/definitions/models.Goodsgroup'
         type: array
       loginAccount:
-        allOf:
-        - $ref: '#/definitions/models.Loginaccount'
+        $ref: '#/definitions/models.Loginaccount'
         description: 登录账号
       markets:
         description: 市场
@@ -30935,12 +31093,10 @@ definitions:
           $ref: '#/definitions/models.Systemparam'
         type: array
       userAccount:
-        allOf:
-        - $ref: '#/definitions/models.Useraccount'
+        $ref: '#/definitions/models.Useraccount'
         description: 用户账号
       userInfo:
-        allOf:
-        - $ref: '#/definitions/models.Userinfo'
+        $ref: '#/definitions/models.Userinfo'
         description: 用户信息
       username:
         description: 用户姓名
@@ -42531,6 +42687,30 @@ paths:
       summary: 检索商品信息
       tags:
       - 检索服务
+  /TaAccount/GetGtwithholdsigninfo:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.Gtwithholdsigninfo'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      summary: 获取代扣签约信息表
+      tags:
+      - 资金账户
   /TaAccount/GetTaAccounts:
     get:
       parameters:
@@ -42599,6 +42779,52 @@ paths:
       summary: 资金流水查询(当前)
       tags:
       - 资金账户
+  /TaAccount/QueryGtwithholddepositapply:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 开始交易日(yyyymmdd)
+        in: query
+        name: begindate
+        type: string
+      - description: 结束交易日(yyyymmdd)
+        in: query
+        name: enddate
+        type: string
+      - description: 批扣结果 - 0-扣费成功、1-扣费失败
+        in: query
+        name: billresult
+        type: integer
+      - description: 页码
+        in: query
+        name: page
+        type: integer
+      - description: 每页条数
+        in: query
+        name: pagesize
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.Gtwithholddepositapply'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询代扣入金申请表
+      tags:
+      - 资金账户
   /TaAccount/QueryHisAmountLog:
     get:
       parameters:

+ 183 - 0
models/account.go

@@ -1312,3 +1312,186 @@ func UpdateUserInfoWechatAndEmail(wechat, email *string, userid int) (err error)
 
 	return
 }
+
+// Gtwithholdsigninfo 代扣签约信息表
+type Gtwithholdsigninfo struct {
+	ACCOUNTID         int64     `json:"accountid" xorm:"ACCOUNTID"`                            // 资金账户ID
+	USERID            int64     `json:"userid" xorm:"USERID" form:"userid" binding:"required"` // 用户ID
+	ACCOUNTSIGNSTATUS int32     `json:"accountsignstatus" xorm:"ACCOUNTSIGNSTATUS"`            // 账户签约状态 - 1:未签约 3:签约中 4:已签约 6:解约中 7:已解约
+	JFXMBH            string    `json:"jfxmbh" xorm:"JFXMBH"`                                  // 缴费项目编号(变更\解约)
+	JFHM              string    `json:"jfhm" xorm:"JFHM"`                                      // 用户编号(变更\解约)
+	KHMC              string    `json:"khmc" xorm:"KHMC"`                                      // 客户名称
+	RWJGH             string    `json:"rwjgh" xorm:"RWJGH"`                                    // 入网机构号
+	KHHHH             string    `json:"khhhh" xorm:"KHHHH"`                                    // 开户行行号
+	ZHLX              string    `json:"zhlx" xorm:"ZHLX"`                                      // 账户类型
+	KKZH              string    `json:"kkzh" xorm:"KKZH"`                                      // 扣款账号
+	YCKFXE            float64   `json:"yckfxe" xorm:"YCKFXE"`                                  // 一次扣费限额
+	XYQSRQ            string    `json:"xyqsrq" xorm:"XYQSRQ"`                                  // 协议签署日期(yyyy-mm-dd)
+	XYSXRQ            string    `json:"xysxrq" xorm:"XYSXRQ"`                                  // 协议生效日(yyyy-mm-dd)
+	XYDQRQ            string    `json:"xydqrq" xorm:"XYDQRQ"`                                  // 协议到期日期(yyyy-mm-dd)
+	JFRMC             string    `json:"jfrmc" xorm:"JFRMC"`                                    // 缴费人名称
+	JFRZJLX           string    `json:"jfrzjlx" xorm:"JFRZJLX"`                                // 缴费人证件类型
+	JFRZJHM           string    `json:"jfrzjhm" xorm:"JFRZJHM"`                                // 缴费人证件号码
+	LXDH              string    `json:"lxdh" xorm:"LXDH"`                                      // 联系电话
+	ADDR              string    `json:"addr" xorm:"ADDR"`                                      // 地址
+	KKSJDW            string    `json:"kksjdw" xorm:"KKSJDW"`                                  // 扣款时间单位(TU00:年,TU01:月,TU002:日)
+	KKSJBC            string    `json:"kksjbc" xorm:"KKSJBC"`                                  // 扣款时间步长(无限额默认填99)
+	KKZQNKFXE         float64   `json:"kkzqnkfxe" xorm:"KKZQNKFXE"`                            // 扣款周期内扣费限额(无限额默认填 0)
+	KKZQNXZBS         int32     `json:"kkzqnxzbs" xorm:"KKZQNXZBS"`                            // 扣款周期内限制笔数(无限额默认填 0)
+	FILEDNAME         string    `json:"filedname" xorm:"FILEDNAME"`                            // 协议附件名称(变更\解约) - 协议签约
+	XYDRRQ            string    `json:"xydrrq" xorm:"XYDRRQ"`                                  // 协议导入时间(变更\解约) - 协议签约
+	DXYZM             string    `json:"dxyzm" xorm:"DXYZM"`                                    // 短信验证码 - 短信签约
+	DXSQH             string    `json:"dxsqh" xorm:"DXSQH"`                                    // 申请号 - 短信签约
+	REMARK            string    `json:"remark" xorm:"REMARK"`                                  // 备注
+	CZRMC             string    `json:"czrmc" xorm:"CZRMC"`                                    // 操作人名称(变更\解约)
+	DGJFHM            string    `json:"dgjfhm" xorm:"DGJFHM"`                                  // 缴费号码(变更\解约)
+	DGJFMC            string    `json:"dgjfmc" xorm:"DGJFMC"`                                  // 缴费名称(变更\解约)
+	BYZD2             string    `json:"byzd2" xorm:"BYZD2"`                                    // 备用字段2(变更\解约)
+	BYZD3             string    `json:"byzd3" xorm:"BYZD3"`                                    // 备用字段3(变更\解约)
+	BYZD4             string    `json:"byzd4" xorm:"BYZD4"`                                    // 备用字段4(变更\解约)
+	BYZD5             string    `json:"byzd5" xorm:"BYZD5"`                                    // 备用字段5(变更\解约)
+	QYZT              string    `json:"qyzt" xorm:"QYZT"`                                      // 签约状态 - 00- 签约成功 01- 签约失败 10- 解约成功 11- 解约失败 20- 变更成功 21- 变更失败
+	QYXYH             string    `json:"qyxyh" xorm:"QYXYH"`                                    // 签约协议号
+	UPDATETIME        time.Time `json:"updatetime" xorm:"UPDATETIME"`                          // 更新时间
+}
+
+func (r *Gtwithholdsigninfo) calc() {
+
+}
+
+func (r *Gtwithholdsigninfo) buildSql() string {
+	var sqlId utils.SQLVal = `
+	select 
+		t.accountid,
+		t.userid,
+		t.accountsignstatus,
+		t.jfxmbh,
+		t.jfhm,
+		t.khmc,
+		t.rwjgh,
+		t.khhhh,
+		t.zhlx,
+		t.kkzh,
+		t.yckfxe,
+		t.xyqsrq,
+		t.xysxrq,
+		t.xydqrq,
+		t.jfrmc,
+		t.jfrzjlx,
+		t.jfrzjhm,
+		t.lxdh,
+		t.addr,
+		t.kksjdw,
+		t.kksjbc,
+		t.kkzqnkfxe,
+		t.kkzqnxzbs,
+		t.filedname,
+		t.xydrrq,
+		t.dxyzm,
+		t.dxsqh,
+		t.remark,
+		t.czrmc,
+		t.dgjfhm,
+		t.dgjfmc,
+		t.byzd2,
+		t.byzd3,
+		t.byzd4,
+		t.byzd5,
+		t.qyzt,
+		t.qyxyh,
+		t.updatetime
+	from GT_WithholdSignInfo t
+	where t.userid = %v 
+	`
+	sqlId.FormatParam(r.USERID)
+
+	return sqlId.String()
+}
+
+// GetDataEx 从数据库中查询数据
+func (r *Gtwithholdsigninfo) GetDataEx() (interface{}, error) {
+	e := db.GetEngine()
+	s := e.SQL(r.buildSql())
+	sData := make([]Gtwithholdsigninfo, 0)
+	if err := s.Find(&sData); err != nil {
+		return nil, err
+	}
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, nil
+}
+
+// Gtwithholddepositapply 代扣入金申请表
+type Gtwithholddepositapply struct {
+	AUTOID         int64     `json:"autoid" xorm:"AUTOID"`                                  // 自增ID(SEQ_GT_WITHHOLDDEPOSITAPPLY)
+	ACCOUNTID      int64     `json:"accountid" xorm:"ACCOUNTID"`                            // 资金账户ID
+	USERID         int64     `json:"userid" xorm:"USERID" form:"userid" binding:"required"` // 用户ID
+	JFXMBH         string    `json:"jfxmbh" xorm:"JFXMBH"`                                  // 缴费项目编号
+	TRANDATE       string    `json:"trandate" xorm:"TRANDATE"`                              // 交易日期(yyyymmdd)
+	TRANTIME       string    `json:"trantime" xorm:"TRANTIME"`                              // 交易时间(hhmmss)
+	DEDUCTIONBNUM  string    `json:"deductionbnum" xorm:"DEDUCTIONBNUM"`                    // 扣费批次号(缴费项目编号_YYYYMMDD_01)
+	BILLINGSNUM    string    `json:"billingsnum" xorm:"BILLINGSNUM"`                        // 收费单位流水号(生成唯一的流水号)
+	DGJFHM         string    `json:"dgjfhm" xorm:"DGJFHM"`                                  // 缴费号码
+	BILLAMOUNT     string    `json:"billamount" xorm:"BILLAMOUNT"`                          // 账单金额
+	CZRMC          string    `json:"czrmc" xorm:"CZRMC"`                                    // 操作人名称
+	CODE           string    `json:"code" xorm:"CODE"`                                      // 状态码 0-解析成功 1-解析失败
+	MESSAGE        string    `json:"message" xorm:"MESSAGE"`                                // 状态码描述
+	CREATETIME     time.Time `json:"createtime" xorm:"CREATETIME"`                          // 创建时间
+	BILLRESULT     string    `json:"billresult" xorm:"BILLRESULT" form:"billresult"`        // 批扣结果 - 0-扣费成功、1-扣费失败
+	UPDATETIME     time.Time `json:"updatetime" xorm:"UPDATETIME"`                          // 更新时间
+	CLIENTSERIALNO string    `json:"clientserialno" xorm:"CLIENTSERIALNO"`                  // 客户端流水号
+
+	BeginDate string `json:"-" xorm:"-" form:"begindate"` // 开始交易日
+	EndDate   string `json:"-" xorm:"-" form:"enddate"`   // 结束交易日
+
+	PageEx `xorm:"extends"` // 页码信息
+}
+
+func (r *Gtwithholddepositapply) calc() {
+
+}
+
+func (r *Gtwithholddepositapply) buildSql() string {
+	var sqlId utils.SQLVal = `
+	select 
+		t.autoid,
+		t.accountid,
+		t.userid,
+		t.jfxmbh,
+		t.trandate,
+		t.trantime,
+		t.deductionbnum,
+		t.billingsnum,
+		t.dgjfhm,
+		t.billamount,
+		t.czrmc,
+		t.code,
+		t.message,
+		t.createtime,
+		t.billresult,
+		t.updatetime,
+		t.clientserialno
+	from GT_WithholdDepositApply t 
+	where t.userid = %v
+`
+	sqlId.FormatParam(r.USERID)
+	if r.BeginDate != "" && r.EndDate != "" {
+		sqlId.JoinFormat(" AND (t.trandate >= '%v' AND t.trandate <= '%v')", r.BeginDate, r.EndDate)
+	}
+	sqlId.AndEx("t.billresult", r.BILLRESULT, r.BILLRESULT != "")
+
+	sqlId.Page(r.Page, r.PageSize)
+	return sqlId.String()
+}
+
+func (r *Gtwithholddepositapply) GetDataByPage() (interface{}, error, int, int, int) {
+	sData := make([]Gtwithholddepositapply, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	total := 0
+	for i := range sData {
+		sData[i].calc()
+		total = sData[i].Total
+	}
+	return sData, err, r.Page, r.PageSize, total
+}

+ 3 - 0
routers/router.go

@@ -125,6 +125,9 @@ func InitRouter() *gin.Engine {
 		taAccountR.GET("/QueryHisAmountLog", taaccount.QueryHisAmountLog)
 		// 获取关联资金账户信息
 		taAccountR.GET("/QueryRelatedTaAccount", taaccount.QueryRelatedTaAccount)
+
+		taAccountR.GET("/GetGtwithholdsigninfo", taaccount.GetGtwithholdsigninfo)
+		taAccountR.GET("/QueryGtwithholddepositapply", taaccount.QueryGtwithholddepositapply)
 	}
 	// ************************ 通用服务 ************************
 	commonR := apiR.Group("Common")

Неке датотеке нису приказане због велике количине промена