Parcourir la source

1.查定投计划、流水增加logincode,userinfotype字段(pcweb)
2.查充值提现 增加bankname 字段(pcweb)
3.更新pcweb菜单 pc_menu.json

zou.yingbin il y a 4 ans
Parent
commit
bd12771a33
9 fichiers modifiés avec 804 ajouts et 109 suppressions
  1. 1 1
      config/config.xml
  2. 80 51
      config/pc_menu.json
  3. 20 6
      controllers/qhj/qryQhj.go
  4. 1 1
      controllers/qhjPCWeb/qryQhjPCWeb.go
  5. 224 3
      docs/docs.go
  6. 224 3
      docs/swagger.json
  7. 169 3
      docs/swagger.yaml
  8. 73 36
      models/qhj.go
  9. 12 5
      models/qhjPCWeb.go

+ 1 - 1
config/config.xml

@@ -13,7 +13,7 @@
     <DbAddress value="192.168.31.117"/>
     <DbName value="orcl"/>
     <DbPort value="1521"/>
-    <DbUser value="mtp2_test175"/>
+    <DbUser value="mtp2_test171"/>
     <DbPwd value="muchinfo"/>
   </DbSetting>
   <RedisSetting>

+ 80 - 51
config/pc_menu.json

@@ -4,7 +4,7 @@
     "title": "市场",
     "sort": 1,
     "type": 1,
-    "rulekey": "",
+    "rulekey": "client_pc_web_market",
     "isshow": false,
     "children": [
       {
@@ -111,7 +111,7 @@
     "children": [
       {
         "code": "custom_info",
-        "title": "客户资料",
+        "title": "风管客户",
         "sort": 1,
         "type": 1,
         "rulekey": "client_customer",
@@ -436,7 +436,7 @@
         "title": "仓库信息",
         "sort": 4,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_warehouse",
         "isshow": true,
         "children": [
           {
@@ -1404,7 +1404,7 @@
         "sort": 2,
         "type": 1,
         "rulekey": "",
-        "isshow": true,
+        "isshow": false,
         "children": [
           {
             "code": "outaccount_status_status",
@@ -1432,7 +1432,7 @@
         "title": "财务报表",
         "sort": 1,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_report_finance",
         "isshow": true,
         "children": [
           {
@@ -1451,7 +1451,7 @@
         "title": "敞口报表",
         "sort": 2,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_report_exposure",
         "isshow": true,
         "children": [
           {
@@ -1470,7 +1470,7 @@
         "title": "现货报表",
         "sort": 3,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_report_spot",
         "isshow": true,
         "children": [
           {
@@ -1497,7 +1497,7 @@
             "title": "库存报表(品类)",
             "sort": 4,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_report_wrstandstock",
             "isshow": true,
             "children": []
           },
@@ -1506,7 +1506,7 @@
             "title": "库存报表(仓库)",
             "sort": 4,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_report_warehousestock",
             "isshow": true,
             "children": [
             ]
@@ -1518,7 +1518,7 @@
         "title": "汇总损益报表",
         "sort": 3,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_report_sumprofit",
         "isshow": true,
         "children": [
           {
@@ -1537,7 +1537,7 @@
         "title": "期货报表",
         "sort": 3,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_report_futures",
         "isshow": true,
         "children": [
           {
@@ -1614,7 +1614,7 @@
         "title": "提货查询",
         "sort": 3,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_pc_web_qhj_thcx",
         "isshow": true,
         "children": [
           {
@@ -1622,7 +1622,7 @@
             "title": "提货查询",
             "sort": 3,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_thcx",
             "isshow": true,
             "children": [
               {
@@ -1630,7 +1630,7 @@
                 "title": "完成备货",
                 "sort": 3,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_thcx_complete_stocking",
                 "isshow": true,
                 "children": [
                 ]
@@ -1640,7 +1640,7 @@
                 "title": "上传物流",
                 "sort": 3,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_thcx_upload_logistics",
                 "isshow": true,
                 "children": [
                 ]
@@ -1650,7 +1650,7 @@
                 "title": "确认收货",
                 "sort": 3,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_thcx_receipt",
                 "isshow": true,
                 "children": [
                 ]
@@ -1660,7 +1660,7 @@
                 "title": "确认取货",
                 "sort": 3,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_thcx_pickup",
                 "isshow": true,
                 "children": [
                 ]
@@ -1674,7 +1674,7 @@
         "title": "充值和提现审核",
         "sort": 3,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_pc_web_qhj_cztx",
         "isshow": true,
         "children": [
           {
@@ -1682,7 +1682,7 @@
             "title": "充值审核",
             "sort": 3,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_cztx_recharge_tab",
             "isshow": true,
             "children": [
               {
@@ -1690,7 +1690,7 @@
                 "title": "确认收款",
                 "sort": 3,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_cztx_recharge_tab_confirm_payment",
                 "isshow": true,
                 "children": [
                 ]
@@ -1700,7 +1700,7 @@
                 "title": "审核拒绝",
                 "sort": 3,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_cztx_recharge_tab_review_refuse",
                 "isshow": true,
                 "children": [
                 ]
@@ -1712,7 +1712,7 @@
             "title": "提现审核",
             "sort": 3,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_cztx_withdrawal_tab",
             "isshow": true,
             "children": [
               {
@@ -1720,7 +1720,7 @@
                 "title": "确认提现",
                 "sort": 3,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_cztx_withdrawal_tab_confirm_withdrawal",
                 "isshow": true,
                 "children": [
                 ]
@@ -1730,7 +1730,7 @@
                 "title": "审核拒绝",
                 "sort": 3,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_cztx_withdrawal_tab_review_refuse",
                 "isshow": true,
                 "children": [
                 ]
@@ -1744,7 +1744,7 @@
         "title": "定投价查询",
         "sort": 3,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_pc_web_qhj_dtj",
         "isshow": true,
         "children": [
           {
@@ -1764,7 +1764,7 @@
         "title": "定投查询",
         "sort": 3,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_pc_web_qhj_dt",
         "isshow": true,
         "children": [
           {
@@ -1772,7 +1772,7 @@
             "title": "定投计划查询",
             "sort": 3,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_dt_plan",
             "isshow": true,
             "children": [
             ]
@@ -1782,7 +1782,7 @@
             "title": "定投流水查询",
             "sort": 3,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_dt_log",
             "isshow": true,
             "children": [
             ]
@@ -1794,7 +1794,7 @@
         "title": "单据查询",
         "sort": 3,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_pc_web_qhj_dj",
         "isshow": true,
         "children": [
           {
@@ -1802,7 +1802,7 @@
             "title": "持仓",
             "sort": 3,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_dj_position",
             "isshow": true,
             "children": [
             ]
@@ -1812,7 +1812,7 @@
             "title": "委托单",
             "sort": 3,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_dj_order",
             "isshow": true,
             "children": [
             ]
@@ -1822,7 +1822,7 @@
             "title": "待付单",
             "sort": 3,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_dj_waiting",
             "isshow": true,
             "children": [
             ]
@@ -1832,7 +1832,7 @@
             "title": "成交单",
             "sort": 3,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_dj_success",
             "isshow": true,
             "children": [
             ]
@@ -1844,7 +1844,7 @@
         "title": "融资信息",
         "sort": 3,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_pc_web_qhj_rz",
         "isshow": true,
         "children": [
           {
@@ -1860,7 +1860,7 @@
                 "title": "融资明细",
                 "sort": 3,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_rz_detail",
                 "isshow": true,
                 "children": []
               }
@@ -1957,10 +1957,10 @@
       },
       {
         "code": "platinum_customer_info",
-        "title": "客户资料",
+        "title": "终端客户",
         "sort": 2,
         "type": 1,
-        "rulekey": "",
+        "rulekey": "client_pc_web_qhj_khzl",
         "isshow": true,
         "children": [
           {
@@ -1968,15 +1968,15 @@
             "title": "正常",
             "sort": 1,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_khzl_noraml",
             "isshow": true,
             "children": [
               {
-                "code": "platinum_custom_info_normal_add",
+                "code": "platinum_custom_info_add",
                 "title": "新增",
                 "sort": 1,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_khzl_noraml_add",
                 "isshow": true,
                 "children": [
                   {
@@ -1984,7 +1984,7 @@
                     "title": "修改",
                     "sort": 2,
                     "type": 2,
-                    "rulekey": "",
+                    "rulekey": "client_pc_web_qhj_khzl_noraml_modify",
                     "isshow": true,
                     "children": []
                   },
@@ -1993,7 +1993,7 @@
                     "title": "停用",
                     "sort": 3,
                     "type": 2,
-                    "rulekey": "",
+                    "rulekey": "client_pc_web_qhj_khzl_noraml_stop",
                     "isshow": true,
                     "children": []
                   }
@@ -2006,15 +2006,15 @@
             "title": "待审核",
             "sort": 1,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_khzl_waiting",
             "isshow": true,
             "children": [
               {
-                "code": "platinum_customer_info_unsubmit_add",
+                "code": "platinum_custom_info_add",
                 "title": "新增",
                 "sort": 1,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_khzl_waiting_add",
                 "isshow": true,
                 "children": [
                   {
@@ -2022,7 +2022,7 @@
                     "title": "审核",
                     "sort": 2,
                     "type": 2,
-                    "rulekey": "",
+                    "rulekey": "client_pc_web_qhj_khzl_waiting_check",
                     "isshow": true,
                     "children": []
                   }
@@ -2035,15 +2035,15 @@
             "title": "停用",
             "sort": 1,
             "type": 1,
-            "rulekey": "",
+            "rulekey": "client_pc_web_qhj_khzl_stop",
             "isshow": true,
             "children": [
               {
-                "code": "platinum_customer_info_unsubmit_add",
+                "code": "platinum_custom_info_add",
                 "title": "新增",
                 "sort": 1,
                 "type": 2,
-                "rulekey": "",
+                "rulekey": "client_pc_web_qhj_khzl_stop_add",
                 "isshow": true,
                 "children": [
                   {
@@ -2051,7 +2051,7 @@
                     "title": "恢复",
                     "sort": 2,
                     "type": 2,
-                    "rulekey": "",
+                    "rulekey": "client_pc_web_qhj_khzl_stop_resume",
                     "isshow": true,
                     "children": []
                   },
@@ -2060,7 +2060,7 @@
                     "title": "删除",
                     "sort": 3,
                     "type": 2,
-                    "rulekey": "",
+                    "rulekey": "client_pc_web_qhj_khzl_stop_delete",
                     "isshow": true,
                     "children": []
                   }
@@ -2116,6 +2116,35 @@
             ]
           }
         ]
+      },
+      {
+        "code": "platinum_spot_and_price",
+        "title": "现货市价",
+        "sort": 2,
+        "type": 1,
+        "rulekey": "client_spotmarketprice",
+        "isshow": false,
+        "children": [
+          {
+            "code": "platinum_spot_and_price_tab",
+            "title": "现货市价",
+            "sort": 2,
+            "type": 1,
+            "rulekey": "",
+            "isshow": true,
+            "children": [
+              {
+                "code": "platinum_spot_and_price_modify",
+                "title": "修改",
+                "sort": 1,
+                "type": 2,
+                "rulekey": "client_spotmarketprice_update",
+                "isshow": true,
+                "children": []
+              }
+            ]
+          }
+        ]
       }
     ]
   }

+ 20 - 6
controllers/qhj/qryQhj.go

@@ -61,7 +61,9 @@ func QueryContractLog(c *gin.Context) {
 // @Produce json
 // @Security ApiKeyAuth
 // @Param userid query int false "用户ID"
+// @Param goodsid query int false "商品id"
 // @Param status query string false "策略状态(可多选,逗号隔开) - 1:正常 2:暂停 3:终止"
+// @Param filtername query string false "名称(模糊搜索账户)"
 // @Success 200 {array} models.QhjRStrategy
 // @Failure 500 {object} app.Response
 // @Router /Qhj/QueryRStrategy [get]
@@ -69,11 +71,14 @@ func QueryContractLog(c *gin.Context) {
 func QueryRStrategy(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
 	req := struct {
-		USERID int64  `form:"userid"` // 用户id
-		STATUS string `form:"status"` // 状态
+		USERID     int64  `form:"userid"` // 用户id
+		STATUS     string `form:"status"` // 状态
+		GOODSID    int32  `form:"goodsid"`
+		FILTERNAME string `form:"filtername"`
 	}{}
 	a.DoBindReq(&req)
-	m := models.QhjRStrategy{USERID: req.USERID, FilterStatus: req.STATUS}
+	m := models.QhjRStrategy{USERID: req.USERID, FilterStatus: req.STATUS,
+		GOODSID: req.GOODSID, FilterName: req.FILTERNAME}
 	a.DoGetDataI(&m)
 }
 
@@ -83,6 +88,10 @@ func QueryRStrategy(c *gin.Context) {
 // @Security ApiKeyAuth
 // @Param userid query int false "用户ID"
 // @Param regularlystrategyid query int false "定投策略id"
+// @Param goodsid query int false "商品id"
+// @Param begindate query string false "开始交易日(yyyymmdd)"
+// @Param enddate query string false "结束交易日(yyyymmdd)"
+// @Param filtername query string false "名称(模糊搜索账户)"
 // @Success 200 {array} models.QhjRSTriggerLog
 // @Failure 500 {object} app.Response
 // @Router /Qhj/QueryRSTriggerLog [get]
@@ -90,11 +99,16 @@ func QueryRStrategy(c *gin.Context) {
 func QueryRSTriggerLog(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
 	req := struct {
-		USERID              int64 `form:"userid"`              // 用户id
-		REGULARLYSTRATEGYID int64 `form:"regularlystrategyid"` // 策略id
+		USERID              int64  `form:"userid"`              // 用户id
+		REGULARLYSTRATEGYID int64  `form:"regularlystrategyid"` // 策略id
+		GOODSID             int32  `form:"goodsid"`
+		BEGINDATE           string `form:"begindate"`
+		ENDDATE             string `form:"enddate"`
+		FILTERNAME          string `form:"filtername"`
 	}{}
 	a.DoBindReq(&req)
-	m := models.QhjRSTriggerLog{USERID: req.USERID, REGULARLYSTRATEGYID: req.REGULARLYSTRATEGYID}
+	m := models.QhjRSTriggerLog{USERID: req.USERID, REGULARLYSTRATEGYID: req.REGULARLYSTRATEGYID,
+		GOODSID: req.GOODSID, BeginDate: req.BEGINDATE, EndDate: req.ENDDATE, FilterName: req.FILTERNAME}
 	a.DoGetDataI(&m)
 }
 

+ 1 - 1
controllers/qhjPCWeb/qryQhjPCWeb.go

@@ -71,7 +71,7 @@ func QueryCustomerInfo(c *gin.Context) {
 // @Param begindate query string false "申请起始日期(格式yyyymmdd)"
 // @Param enddate query string false "申请截止日期(格式yyyymmdd)"
 // @Param likename query string false "模糊搜索名称"
-// @Success 200 {array} models.QhjAccountOutInApply
+// @Success 200 {array} models.QhjMgrAccountOutInApply
 // @Failure 500 {object} app.Response
 // @Router /QhjMgr/QueryAccountInOutApply [get]
 // @Tags 大连千海金(PCWeb)

+ 224 - 3
docs/docs.go

@@ -7642,6 +7642,30 @@ var doc = `{
                         "description": "定投策略id",
                         "name": "regularlystrategyid",
                         "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "商品id",
+                        "name": "goodsid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "开始交易日(yyyymmdd)",
+                        "name": "begindate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "结束交易日(yyyymmdd)",
+                        "name": "enddate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "名称(模糊搜索账户)",
+                        "name": "filtername",
+                        "in": "query"
                     }
                 ],
                 "responses": {
@@ -7685,10 +7709,22 @@ var doc = `{
                         "in": "query"
                     },
                     {
+                        "type": "integer",
+                        "description": "商品id",
+                        "name": "goodsid",
+                        "in": "query"
+                    },
+                    {
                         "type": "string",
                         "description": "策略状态(可多选,逗号隔开) - 1:正常 2:暂停 3:终止",
                         "name": "status",
                         "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "名称(模糊搜索账户)",
+                        "name": "filtername",
+                        "in": "query"
                     }
                 ],
                 "responses": {
@@ -7984,7 +8020,7 @@ var doc = `{
                         "schema": {
                             "type": "array",
                             "items": {
-                                "$ref": "#/definitions/models.QhjAccountOutInApply"
+                                "$ref": "#/definitions/models.QhjMgrAccountOutInApply"
                             }
                         }
                     },
@@ -23050,6 +23086,183 @@ var doc = `{
                 }
             }
         },
+        "models.QhjMgrAccountOutInApply": {
+            "type": "object",
+            "properties": {
+                "accountcode": {
+                    "description": "资金账号",
+                    "type": "string"
+                },
+                "accountname": {
+                    "description": "用户名称(名称)",
+                    "type": "string"
+                },
+                "accountpwd": {
+                    "description": "资金密码",
+                    "type": "string"
+                },
+                "accountticket": {
+                    "description": "最新账户服务流水号",
+                    "type": "string"
+                },
+                "amount": {
+                    "description": "金额",
+                    "type": "number"
+                },
+                "applyremark": {
+                    "description": "申请备注",
+                    "type": "string"
+                },
+                "applystatus": {
+                    "description": "申请状态 - 1:待审核 2:待复审 3:初审拒绝 4:交易冻结中 5:交易解冻中 6:交易解冻扣款中 7:交易入金中 8:交易冻结/解冻/扣款中(银行发起出金时用) 9:银行出金中 10:银行入金中 11:成功 12:失败 13:银行审核中  14:账户服务入金失败; 15:账户服务解冻失败; 16:账户服务解冻扣款失败; 17:账户服务出金失败 18:复审通过 19:复审拒绝 20:提交审核,账户冻结中 21:审核拒绝,账户解冻中;22: 待审核,账户服务解冻回滚中; 23:待复审,账户服务解冻回滚中; 24: 审核通过,账户冻结金额检查中;25: 复审通过,账户冻结金额检查中;",
+                    "type": "integer"
+                },
+                "auditid": {
+                    "description": "审核人",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "bank_apply_ticket": {
+                    "description": "银行申请流水",
+                    "type": "string"
+                },
+                "bankaccountname": {
+                    "description": "银行账户名",
+                    "type": "string"
+                },
+                "bankaccountno": {
+                    "description": "银行卡号",
+                    "type": "string"
+                },
+                "bankid": {
+                    "description": "银行编号",
+                    "type": "string"
+                },
+                "bankname": {
+                    "description": "银行名称",
+                    "type": "string"
+                },
+                "bankticket": {
+                    "description": "银行流水",
+                    "type": "string"
+                },
+                "branchbankid": {
+                    "description": "银行支行号",
+                    "type": "string"
+                },
+                "branchbankname": {
+                    "description": "银行支行名称",
+                    "type": "string"
+                },
+                "capamountout": {
+                    "description": "出金(劣后本金) - 外部子账户",
+                    "type": "number"
+                },
+                "certificatephotourl": {
+                    "description": "凭证地址",
+                    "type": "string"
+                },
+                "charge": {
+                    "description": "手续费",
+                    "type": "number"
+                },
+                "checkerrorflag": {
+                    "description": "对账差错标志 - 1:为单边账;其它为正常出入金",
+                    "type": "integer"
+                },
+                "currency": {
+                    "description": "币种",
+                    "type": "string"
+                },
+                "cusbankid": {
+                    "description": "托管银行编号",
+                    "type": "string"
+                },
+                "exchticket": {
+                    "description": "银行服务流水号",
+                    "type": "string"
+                },
+                "executetype": {
+                    "description": "申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金",
+                    "type": "integer"
+                },
+                "extendinfo": {
+                    "description": "扩展信息",
+                    "type": "string"
+                },
+                "extoperateid": {
+                    "description": "交易服务流水号",
+                    "type": "integer"
+                },
+                "infamount": {
+                    "description": "劣后金额(自有)",
+                    "type": "number"
+                },
+                "logincode": {
+                    "description": "登录账号(账号)",
+                    "type": "string"
+                },
+                "netaddr": {
+                    "description": "调转网址",
+                    "type": "string"
+                },
+                "priamount": {
+                    "description": "优先金额(授信)",
+                    "type": "number"
+                },
+                "reauditid": {
+                    "description": "复审人",
+                    "type": "integer"
+                },
+                "reauditremark": {
+                    "description": "复审备注",
+                    "type": "string"
+                },
+                "reaudittime": {
+                    "description": "复审时间",
+                    "type": "string"
+                },
+                "relatedorderid": {
+                    "description": "三方关联ID",
+                    "type": "string"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "remark2": {
+                    "description": "备注(失败原因)",
+                    "type": "string"
+                },
+                "soucreamount": {
+                    "description": "原始出入金金额",
+                    "type": "number"
+                },
+                "soucrecurrencyid": {
+                    "description": "原始出入金币种",
+                    "type": "integer"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "updatetime": {
+                    "description": "更新时间(申请时间)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户id",
+                    "type": "integer"
+                },
+                "userinfotype": {
+                    "description": "账户类型 1-个人 2-企业",
+                    "type": "integer"
+                }
+            }
+        },
         "models.QhjMgrContract": {
             "type": "object",
             "properties": {
@@ -23905,7 +24118,7 @@ var doc = `{
                 },
                 "goodsid": {
                     "description": "定投商品ID",
-                    "type": "string"
+                    "type": "integer"
                 },
                 "goodsname": {
                     "description": "定投商品名称",
@@ -23919,6 +24132,10 @@ var doc = `{
                     "description": "LogID(SEQ_QHJ_RSTRIGGERLOG)",
                     "type": "string"
                 },
+                "logincode": {
+                    "description": "账号(登录代码)",
+                    "type": "string"
+                },
                 "qtydecimalplace": {
                     "description": "成交量小数位",
                     "type": "integer"
@@ -23975,6 +24192,10 @@ var doc = `{
                     "description": "所属用户ID",
                     "type": "integer"
                 },
+                "userinfotype": {
+                    "description": "用户类型 1-个人 2-企业",
+                    "type": "integer"
+                },
                 "username": {
                     "description": "用户名称(userid对应的名称)",
                     "type": "string"
@@ -24014,7 +24235,7 @@ var doc = `{
                 },
                 "goodsid": {
                     "description": "定投商品ID",
-                    "type": "string"
+                    "type": "integer"
                 },
                 "goodsname": {
                     "description": "定投商品名称",

+ 224 - 3
docs/swagger.json

@@ -7626,6 +7626,30 @@
                         "description": "定投策略id",
                         "name": "regularlystrategyid",
                         "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "商品id",
+                        "name": "goodsid",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "开始交易日(yyyymmdd)",
+                        "name": "begindate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "结束交易日(yyyymmdd)",
+                        "name": "enddate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "名称(模糊搜索账户)",
+                        "name": "filtername",
+                        "in": "query"
                     }
                 ],
                 "responses": {
@@ -7669,10 +7693,22 @@
                         "in": "query"
                     },
                     {
+                        "type": "integer",
+                        "description": "商品id",
+                        "name": "goodsid",
+                        "in": "query"
+                    },
+                    {
                         "type": "string",
                         "description": "策略状态(可多选,逗号隔开) - 1:正常 2:暂停 3:终止",
                         "name": "status",
                         "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "名称(模糊搜索账户)",
+                        "name": "filtername",
+                        "in": "query"
                     }
                 ],
                 "responses": {
@@ -7968,7 +8004,7 @@
                         "schema": {
                             "type": "array",
                             "items": {
-                                "$ref": "#/definitions/models.QhjAccountOutInApply"
+                                "$ref": "#/definitions/models.QhjMgrAccountOutInApply"
                             }
                         }
                     },
@@ -23034,6 +23070,183 @@
                 }
             }
         },
+        "models.QhjMgrAccountOutInApply": {
+            "type": "object",
+            "properties": {
+                "accountcode": {
+                    "description": "资金账号",
+                    "type": "string"
+                },
+                "accountname": {
+                    "description": "用户名称(名称)",
+                    "type": "string"
+                },
+                "accountpwd": {
+                    "description": "资金密码",
+                    "type": "string"
+                },
+                "accountticket": {
+                    "description": "最新账户服务流水号",
+                    "type": "string"
+                },
+                "amount": {
+                    "description": "金额",
+                    "type": "number"
+                },
+                "applyremark": {
+                    "description": "申请备注",
+                    "type": "string"
+                },
+                "applystatus": {
+                    "description": "申请状态 - 1:待审核 2:待复审 3:初审拒绝 4:交易冻结中 5:交易解冻中 6:交易解冻扣款中 7:交易入金中 8:交易冻结/解冻/扣款中(银行发起出金时用) 9:银行出金中 10:银行入金中 11:成功 12:失败 13:银行审核中  14:账户服务入金失败; 15:账户服务解冻失败; 16:账户服务解冻扣款失败; 17:账户服务出金失败 18:复审通过 19:复审拒绝 20:提交审核,账户冻结中 21:审核拒绝,账户解冻中;22: 待审核,账户服务解冻回滚中; 23:待复审,账户服务解冻回滚中; 24: 审核通过,账户冻结金额检查中;25: 复审通过,账户冻结金额检查中;",
+                    "type": "integer"
+                },
+                "auditid": {
+                    "description": "审核人",
+                    "type": "integer"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "bank_apply_ticket": {
+                    "description": "银行申请流水",
+                    "type": "string"
+                },
+                "bankaccountname": {
+                    "description": "银行账户名",
+                    "type": "string"
+                },
+                "bankaccountno": {
+                    "description": "银行卡号",
+                    "type": "string"
+                },
+                "bankid": {
+                    "description": "银行编号",
+                    "type": "string"
+                },
+                "bankname": {
+                    "description": "银行名称",
+                    "type": "string"
+                },
+                "bankticket": {
+                    "description": "银行流水",
+                    "type": "string"
+                },
+                "branchbankid": {
+                    "description": "银行支行号",
+                    "type": "string"
+                },
+                "branchbankname": {
+                    "description": "银行支行名称",
+                    "type": "string"
+                },
+                "capamountout": {
+                    "description": "出金(劣后本金) - 外部子账户",
+                    "type": "number"
+                },
+                "certificatephotourl": {
+                    "description": "凭证地址",
+                    "type": "string"
+                },
+                "charge": {
+                    "description": "手续费",
+                    "type": "number"
+                },
+                "checkerrorflag": {
+                    "description": "对账差错标志 - 1:为单边账;其它为正常出入金",
+                    "type": "integer"
+                },
+                "currency": {
+                    "description": "币种",
+                    "type": "string"
+                },
+                "cusbankid": {
+                    "description": "托管银行编号",
+                    "type": "string"
+                },
+                "exchticket": {
+                    "description": "银行服务流水号",
+                    "type": "string"
+                },
+                "executetype": {
+                    "description": "申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金",
+                    "type": "integer"
+                },
+                "extendinfo": {
+                    "description": "扩展信息",
+                    "type": "string"
+                },
+                "extoperateid": {
+                    "description": "交易服务流水号",
+                    "type": "integer"
+                },
+                "infamount": {
+                    "description": "劣后金额(自有)",
+                    "type": "number"
+                },
+                "logincode": {
+                    "description": "登录账号(账号)",
+                    "type": "string"
+                },
+                "netaddr": {
+                    "description": "调转网址",
+                    "type": "string"
+                },
+                "priamount": {
+                    "description": "优先金额(授信)",
+                    "type": "number"
+                },
+                "reauditid": {
+                    "description": "复审人",
+                    "type": "integer"
+                },
+                "reauditremark": {
+                    "description": "复审备注",
+                    "type": "string"
+                },
+                "reaudittime": {
+                    "description": "复审时间",
+                    "type": "string"
+                },
+                "relatedorderid": {
+                    "description": "三方关联ID",
+                    "type": "string"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "remark2": {
+                    "description": "备注(失败原因)",
+                    "type": "string"
+                },
+                "soucreamount": {
+                    "description": "原始出入金金额",
+                    "type": "number"
+                },
+                "soucrecurrencyid": {
+                    "description": "原始出入金币种",
+                    "type": "integer"
+                },
+                "tradedate": {
+                    "description": "交易日(yyyyMMdd)",
+                    "type": "string"
+                },
+                "updatetime": {
+                    "description": "更新时间(申请时间)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户id",
+                    "type": "integer"
+                },
+                "userinfotype": {
+                    "description": "账户类型 1-个人 2-企业",
+                    "type": "integer"
+                }
+            }
+        },
         "models.QhjMgrContract": {
             "type": "object",
             "properties": {
@@ -23889,7 +24102,7 @@
                 },
                 "goodsid": {
                     "description": "定投商品ID",
-                    "type": "string"
+                    "type": "integer"
                 },
                 "goodsname": {
                     "description": "定投商品名称",
@@ -23903,6 +24116,10 @@
                     "description": "LogID(SEQ_QHJ_RSTRIGGERLOG)",
                     "type": "string"
                 },
+                "logincode": {
+                    "description": "账号(登录代码)",
+                    "type": "string"
+                },
                 "qtydecimalplace": {
                     "description": "成交量小数位",
                     "type": "integer"
@@ -23959,6 +24176,10 @@
                     "description": "所属用户ID",
                     "type": "integer"
                 },
+                "userinfotype": {
+                    "description": "用户类型 1-个人 2-企业",
+                    "type": "integer"
+                },
                 "username": {
                     "description": "用户名称(userid对应的名称)",
                     "type": "string"
@@ -23998,7 +24219,7 @@
                 },
                 "goodsid": {
                     "description": "定投商品ID",
-                    "type": "string"
+                    "type": "integer"
                 },
                 "goodsname": {
                     "description": "定投商品名称",

+ 169 - 3
docs/swagger.yaml

@@ -9853,6 +9853,142 @@ definitions:
         description: 用户名称
         type: string
     type: object
+  models.QhjMgrAccountOutInApply:
+    properties:
+      accountcode:
+        description: 资金账号
+        type: string
+      accountname:
+        description: 用户名称(名称)
+        type: string
+      accountpwd:
+        description: 资金密码
+        type: string
+      accountticket:
+        description: 最新账户服务流水号
+        type: string
+      amount:
+        description: 金额
+        type: number
+      applyremark:
+        description: 申请备注
+        type: string
+      applystatus:
+        description: '申请状态 - 1:待审核 2:待复审 3:初审拒绝 4:交易冻结中 5:交易解冻中 6:交易解冻扣款中 7:交易入金中
+          8:交易冻结/解冻/扣款中(银行发起出金时用) 9:银行出金中 10:银行入金中 11:成功 12:失败 13:银行审核中  14:账户服务入金失败;
+          15:账户服务解冻失败; 16:账户服务解冻扣款失败; 17:账户服务出金失败 18:复审通过 19:复审拒绝 20:提交审核,账户冻结中 21:审核拒绝,账户解冻中;22:
+          待审核,账户服务解冻回滚中; 23:待复审,账户服务解冻回滚中; 24: 审核通过,账户冻结金额检查中;25: 复审通过,账户冻结金额检查中;'
+        type: integer
+      auditid:
+        description: 审核人
+        type: integer
+      audittime:
+        description: 审核时间
+        type: string
+      bank_apply_ticket:
+        description: 银行申请流水
+        type: string
+      bankaccountname:
+        description: 银行账户名
+        type: string
+      bankaccountno:
+        description: 银行卡号
+        type: string
+      bankid:
+        description: 银行编号
+        type: string
+      bankname:
+        description: 银行名称
+        type: string
+      bankticket:
+        description: 银行流水
+        type: string
+      branchbankid:
+        description: 银行支行号
+        type: string
+      branchbankname:
+        description: 银行支行名称
+        type: string
+      capamountout:
+        description: 出金(劣后本金) - 外部子账户
+        type: number
+      certificatephotourl:
+        description: 凭证地址
+        type: string
+      charge:
+        description: 手续费
+        type: number
+      checkerrorflag:
+        description: 对账差错标志 - 1:为单边账;其它为正常出入金
+        type: integer
+      currency:
+        description: 币种
+        type: string
+      cusbankid:
+        description: 托管银行编号
+        type: string
+      exchticket:
+        description: 银行服务流水号
+        type: string
+      executetype:
+        description: '申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金
+          7:外部子账户:入金 8:外部子账户:出金'
+        type: integer
+      extendinfo:
+        description: 扩展信息
+        type: string
+      extoperateid:
+        description: 交易服务流水号
+        type: integer
+      infamount:
+        description: 劣后金额(自有)
+        type: number
+      logincode:
+        description: 登录账号(账号)
+        type: string
+      netaddr:
+        description: 调转网址
+        type: string
+      priamount:
+        description: 优先金额(授信)
+        type: number
+      reauditid:
+        description: 复审人
+        type: integer
+      reauditremark:
+        description: 复审备注
+        type: string
+      reaudittime:
+        description: 复审时间
+        type: string
+      relatedorderid:
+        description: 三方关联ID
+        type: string
+      remark:
+        description: 备注
+        type: string
+      remark2:
+        description: 备注(失败原因)
+        type: string
+      soucreamount:
+        description: 原始出入金金额
+        type: number
+      soucrecurrencyid:
+        description: 原始出入金币种
+        type: integer
+      tradedate:
+        description: 交易日(yyyyMMdd)
+        type: string
+      updatetime:
+        description: 更新时间(申请时间)
+        type: string
+      userid:
+        description: 用户id
+        type: integer
+      userinfotype:
+        description: 账户类型 1-个人 2-企业
+        type: integer
+    type: object
   models.QhjMgrContract:
     properties:
       contractconfirmtime:
@@ -10488,7 +10624,7 @@ definitions:
         type: string
       goodsid:
         description: 定投商品ID
-        type: string
+        type: integer
       goodsname:
         description: 定投商品名称
         type: string
@@ -10498,6 +10634,9 @@ definitions:
       logid:
         description: LogID(SEQ_QHJ_RSTRIGGERLOG)
         type: string
+      logincode:
+        description: 账号(登录代码)
+        type: string
       qtydecimalplace:
         description: 成交量小数位
         type: integer
@@ -10540,6 +10679,9 @@ definitions:
       userid:
         description: 所属用户ID
         type: integer
+      userinfotype:
+        description: 用户类型 1-个人 2-企业
+        type: integer
       username:
         description: 用户名称(userid对应的名称)
         type: string
@@ -10569,7 +10711,7 @@ definitions:
         type: string
       goodsid:
         description: 定投商品ID
-        type: string
+        type: integer
       goodsname:
         description: 定投商品名称
         type: string
@@ -18827,6 +18969,22 @@ paths:
         in: query
         name: regularlystrategyid
         type: integer
+      - description: 商品id
+        in: query
+        name: goodsid
+        type: integer
+      - description: 开始交易日(yyyymmdd)
+        in: query
+        name: begindate
+        type: string
+      - description: 结束交易日(yyyymmdd)
+        in: query
+        name: enddate
+        type: string
+      - description: 名称(模糊搜索账户)
+        in: query
+        name: filtername
+        type: string
       produces:
       - application/json
       responses:
@@ -18852,10 +19010,18 @@ paths:
         in: query
         name: userid
         type: integer
+      - description: 商品id
+        in: query
+        name: goodsid
+        type: integer
       - description: 策略状态(可多选,逗号隔开) - 1:正常 2:暂停 3:终止
         in: query
         name: status
         type: string
+      - description: 名称(模糊搜索账户)
+        in: query
+        name: filtername
+        type: string
       produces:
       - application/json
       responses:
@@ -19043,7 +19209,7 @@ paths:
           description: OK
           schema:
             items:
-              $ref: '#/definitions/models.QhjAccountOutInApply'
+              $ref: '#/definitions/models.QhjMgrAccountOutInApply'
             type: array
         "500":
           description: Internal Server Error

+ 73 - 36
models/qhj.go

@@ -204,7 +204,7 @@ type QhjRStrategy struct {
 	REGULARLYSTRATEGYID     int64   `json:"regularlystrategyid"  xorm:"REGULARLYSTRATEGYID"`         // 定投策略ID (SEQ_QHJ_REGULARLYSTRATEGY)
 	USERID                  int64   `json:"userid"  xorm:"USERID"`                                   // 所属用户ID
 	ACCOUNTID               int64   `json:"accountid"  xorm:"ACCOUNTID"`                             // 用户资金账户
-	GOODSID                 string  `json:"goodsid"  xorm:"GOODSID"`                                 // 定投商品ID
+	GOODSID                 int32   `json:"goodsid"  xorm:"GOODSID"`                                 // 定投商品ID
 	GOODSCODE               string  `json:"goodscode"  xorm:"'GOODSCODE'"`                           // 定投商品代码
 	GOODSNAME               string  `json:"goodsname"  xorm:"'GOODSNAME'"`                           // 定投商品名称
 	GOODUNITID              int32   `json:"goodunitid"  xorm:"'GOODUNITID'"`                         // 定投商品单位id
@@ -214,17 +214,18 @@ type QhjRStrategy struct {
 	LOGINCODE               string  `json:"logincode"  xorm:"'LOGINCODE'"`                           // 账号(登录代码)
 	USERINFOTYPE            int32   `json:"userinfotype"  xorm:"'USERINFOTYPE'"`                     // 用户类型 1-个人 2-企业
 	MOBILE                  string  `json:"-"  xorm:"'MOBILE'"`                                      // 电话号码(用户资料里的电话)
+	USERNAME                string  `json:"username"  xorm:"'USERNAME'"`                             // 用户名称(userid对应的名称)
 
-	USERNAME     string `json:"username"`     // 用户名称(userid对应的名称)
 	ACCOUNTNAME  string `json:"accountname"`  // 账号名称(ACCOUNTID对应的名称)
 	ENUMDICNAME  string `json:"enumdicname"`  // 单位名称
 	CURRENCYNAME string `json:"currencyname"` // 币种名称
 
 	FilterStatus string `json:"-"` // 状态过滤条件
+	FilterName   string `json:"-"` // 模糊搜索
 }
 
 func (r *QhjRStrategy) calc() {
-	r.USERNAME = mtpcache.GetUserNameByUserId(r.USERID)
+	//r.USERNAME = mtpcache.GetUserNameByUserId(r.USERID)
 	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.GOODUNITID)
 	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
 	ZoomByDecimal(r.QTYDECIMALPLACE, &r.TRIGGERTOTALQTY, &r.NEXTTRIGGERQTY)
@@ -268,16 +269,23 @@ func (r *QhjRStrategy) buildSql() string {
 		"       g.goodunitid," +
 		"       ta.accountname," +
 		"       k.logincode," +
-		"       ui.userinfotype" +
+		"       ui.userinfotype," +
+		"       ui.mobile," +
+		"       u.accountname username" +
 		"  FROM QHJ_REGULARLYSTRATEGY t" +
 		"  LEFT JOIN GOODS g" +
 		"    on t.goodsid = g.goodsid" +
 		"  LEFT JOIN TAACCOUNT ta" +
 		"    on t.accountid = ta.accountid" +
 		"  LEFT JOIN USERINFO ui on t.userid=ui.userid" +
+		"  LEFT JOIN USERACCOUNT u on t.userid=u.userid" +
 		"  LEFT JOIN k on t.userid=k.userid" +
 		" WHERE 1 = 1"
 	sqlId.AndEx("t.USERID", r.USERID, r.USERID > 0)
+	sqlId.AndEx("t.goodsid", r.GOODSID, r.GOODSID > 0)
+	if len(r.FilterName) > 0 {
+		sqlId.JoinFormat(" and (k.logincode like '%%%v%%' or u.accountname like '%%%v%%')", r.FilterName, r.FilterName)
+	}
 	sqlId.JoinEx(len(r.FilterStatus) > 0, fmt.Sprintf(" and t.REGULARLYSTRATEGYSTATUS in(%v)", r.FilterStatus))
 	return sqlId.String()
 }
@@ -299,7 +307,7 @@ type QhjRSTriggerLog struct {
 	REGULARLYSTRATEGYID int64   `json:"regularlystrategyid"  xorm:"REGULARLYSTRATEGYID"` // 定投策略ID
 	USERID              int64   `json:"userid"  xorm:"USERID"`                           // 所属用户ID
 	ACCOUNTID           int64   `json:"accountid"  xorm:"ACCOUNTID"`                     // 用户资金账户
-	GOODSID             string  `json:"goodsid"  xorm:"GOODSID"`                         // 定投商品ID
+	GOODSID             int32   `json:"goodsid"  xorm:"GOODSID"`                         // 定投商品ID
 	REGULARLYCYCLE      int32   `json:"regularlycycle"  xorm:"REGULARLYCYCLE"`           // 定投频率 - 1:每周 2:每月
 	REGULARLYCYCLEVALUE string  `json:"regularlycyclevalue"  xorm:"REGULARLYCYCLEVALUE"` // 定投频率值 - 每周几(0-6)  或 每月几号(<=28)
 	REGULARLYMODE       int32   `json:"regularlymode"  xorm:"REGULARLYMODE"`             // 定投方式 - 1:按数量 2:按金额
@@ -316,55 +324,84 @@ type QhjRSTriggerLog struct {
 	CURRENCYID          int32   `json:"currencyid"  xorm:"'CURRENCYID'"`                 // 币种id
 	DECIMALPLACE        int32   `json:"decimalplace"  xorm:"'DECIMALPLACE'"`             // 商品报价小数位
 	QTYDECIMALPLACE     int     `json:"qtydecimalplace"  xorm:"'QTYDECIMALPLACE'"`       // 成交量小数位
+	LOGINCODE           string  `json:"logincode"  xorm:"'LOGINCODE'"`                   // 账号(登录代码)
+	USERINFOTYPE        int32   `json:"userinfotype"  xorm:"'USERINFOTYPE'"`             // 用户类型 1-个人 2-企业
+	MOBILE              string  `json:"-"  xorm:"'MOBILE'"`                              // 电话号码(用户资料里的电话)
+	USERNAME            string  `json:"username"  xorm:"'USERNAME'"`                     // 用户名称(userid对应的名称)
 
-	USERNAME     string `json:"username"`     // 用户名称(userid对应的名称)
 	ACCOUNTNAME  string `json:"accountname"`  // 账号名称(ACCOUNTID对应的名称)
 	ENUMDICNAME  string `json:"enumdicname"`  // 单位名称
 	CURRENCYNAME string `json:"currencyname"` // 币种名称
+
+	BeginDate  string `json:"-"` // 开始交易日
+	EndDate    string `json:"-"` // 结束交易日
+	FilterName string `json:"-"` // 模糊搜索
 }
 
 func (r *QhjRSTriggerLog) calc() {
-	r.USERNAME = mtpcache.GetUserNameByUserId(r.USERID)
+	//r.USERNAME = mtpcache.GetUserNameByUserId(r.USERID)
 	r.ENUMDICNAME = mtpcache.GetEnumDicitemName(r.GOODUNITID)
 	r.CURRENCYNAME = mtpcache.GetCurrencyName(r.CURRENCYID)
 	ZoomByDecimal(r.QTYDECIMALPLACE, &r.TRIGGERQTY)
 	if r.REGULARLYMODE == 1 {
 		ZoomByDecimal(r.QTYDECIMALPLACE, &r.REGULARLYMODEVALUE)
 	}
+	if r.LOGINCODE == "" {
+		r.LOGINCODE = DecryptField(r.MOBILE)
+	}
 }
 
 func (r *QhjRSTriggerLog) buildSql() string {
-	var sqlId utils.SQLVal = "SELECT t.TRADEID," +
-		"        t.LOGID," +
-		"        t.REGULARLYSTRATEGYID," +
-		"        t.USERID," +
-		"        t.ACCOUNTID," +
-		"        t.GOODSID," +
-		"        t.REGULARLYCYCLE," +
-		"        t.REGULARLYCYCLEVALUE," +
-		"        t.REGULARLYMODE," +
-		"        t.REGULARLYMODEVALUE," +
-		"        to_char(t.TRIGGERTIME, 'yyyy-mm-dd hh24:mi:ss') TRIGGERTIME," +
-		"        t.TRIGGERTRADEDATE," +
-		"        t.TRIGGERQTY," +
-		"        t.TRIGGERAMOUNT," +
-		"        t.TRIGGERSTATUS," +
-		"        t.RETCODE," +
-		"        g.goodscode," +
-		"        g.goodsname," +
-		"        g.decimalplace," +
-		"        g.qtydecimalplace," +
-		"        g.goodunitid," +
-		"        ta.accountname," +
-		"        ta.currencyid" +
-		"   FROM QHJ_RSTRIGGERLOG t" +
-		"   LEFT JOIN GOODS g" +
-		"     on t.goodsid = g.goodsid" +
-		"   LEFT JOIN TAACCOUNT ta" +
-		"     on t.accountid = ta.accountid" +
-		"  WHERE 1 = 1"
+	var sqlId utils.SQLVal = "with k as (select t.userid, wm_concat(t.logincode) logincode from loginaccount t group by t.userid)" +
+		"SELECT t.TRADEID," +
+		"       t.LOGID," +
+		"       t.REGULARLYSTRATEGYID," +
+		"       t.USERID," +
+		"       t.ACCOUNTID," +
+		"       t.GOODSID," +
+		"       t.REGULARLYCYCLE," +
+		"       t.REGULARLYCYCLEVALUE," +
+		"       t.REGULARLYMODE," +
+		"       t.REGULARLYMODEVALUE," +
+		"       to_char(t.TRIGGERTIME, 'yyyy-mm-dd hh24:mi:ss') TRIGGERTIME," +
+		"       t.TRIGGERTRADEDATE," +
+		"       t.TRIGGERQTY," +
+		"       t.TRIGGERAMOUNT," +
+		"       t.TRIGGERSTATUS," +
+		"       t.RETCODE," +
+		"       g.goodscode," +
+		"       g.goodsname," +
+		"       g.decimalplace," +
+		"       g.qtydecimalplace," +
+		"       g.goodunitid," +
+		"       ta.accountname," +
+		"       ta.currencyid," +
+		"       k.logincode," +
+		"       ui.userinfotype," +
+		"       ui.mobile," +
+		"       u.accountname username" +
+		"  FROM QHJ_RSTRIGGERLOG t" +
+		"  LEFT JOIN GOODS g" +
+		"    on t.goodsid = g.goodsid" +
+		"  LEFT JOIN TAACCOUNT ta" +
+		"    on t.accountid = ta.accountid" +
+		"  LEFT JOIN k on t.userid=k.userid" +
+		"  LEFT JOIN USERACCOUNT u on t.userid=u.userid" +
+		"  LEFT JOIN USERINFO ui on t.userid=ui.userid" +
+		" WHERE 1 = 1"
 	sqlId.AndEx("t.USERID", r.USERID, r.USERID > 0)
 	sqlId.AndEx("t.REGULARLYSTRATEGYID", r.REGULARLYSTRATEGYID, r.REGULARLYSTRATEGYID > 0)
+	sqlId.AndEx("ui.USERINFOTYPE", r.USERINFOTYPE, r.USERINFOTYPE > 0)
+	sqlId.AndEx("t.goodsid", r.GOODSID, r.GOODSID > 0)
+	if len(r.BeginDate) > 0 {
+		sqlId.JoinFormat(" and t.TRIGGERTRADEDATE >=%v", r.BeginDate)
+	}
+	if len(r.EndDate) > 0 {
+		sqlId.JoinFormat(" and t.TRIGGERTRADEDATE <=%v", r.EndDate)
+	}
+	if len(r.FilterName) > 0 {
+		sqlId.JoinFormat(" and (k.logincode like '%%%v%%' or u.accountname like '%%%v%%')", r.FilterName, r.FilterName)
+	}
 	return sqlId.String()
 }
 

+ 12 - 5
models/qhjPCWeb.go

@@ -269,6 +269,7 @@ type QhjMgrAccountOutInApply struct {
 	ACCOUNTPWD          string  `json:"accountpwd"  xorm:"ACCOUNTPWD"`                   // 资金密码
 	UPDATETIME          string  `json:"updatetime"  xorm:"UPDATETIME"`                   // 更新时间(申请时间)
 	BANKID              string  `json:"bankid"  xorm:"BANKID"`                           // 银行编号
+	BANKNAME            string  `json:"bankname"  xorm:"'BANKNAME'"`                     // 银行名称
 	BRANCHBANKID        string  `json:"branchbankid"  xorm:"BRANCHBANKID"`               // 银行支行号
 	BRANCHBANKNAME      string  `json:"branchbankname"  xorm:"BRANCHBANKNAME"`           // 银行支行名称
 	BANKACCOUNTNO       string  `json:"bankaccountno"  xorm:"BANKACCOUNTNO"`             // 银行卡号
@@ -360,12 +361,18 @@ func (r *QhjMgrAccountOutInApply) buildSql() string {
 		"       ta.userid," +
 		"       u.accountname," +
 		"       ui.userinfotype," +
-		"       tmp.logincode" +
+		"       tmp.logincode," +
+		"       b.bankname" +
 		"  FROM BANK_ACCOUNTOUTINAPPLY t" +
-		"  INNER JOIN TAACCOUNT ta on t.accountcode=to_char(ta.accountid)" +
-		"  INNER JOIN USERACCOUNT u on ta.relateduserid=u.userid" +
-		"  INNER JOIN USERINFO ui on u.userid=ui.userid" +
-		"  LEFT JOIN tmp on u.userid=tmp.userid" +
+		" INNER JOIN TAACCOUNT ta" +
+		"    on t.accountcode = to_char(ta.accountid)" +
+		" INNER JOIN USERACCOUNT u" +
+		"    on ta.relateduserid = u.userid" +
+		" INNER JOIN USERINFO ui" +
+		"    on u.userid = ui.userid" +
+		" LEFT JOIN BANK_BANKINFO b on t.bankid=b.bankid" +
+		" LEFT JOIN tmp" +
+		"    on u.userid = tmp.userid" +
 		" WHERE 1 = 1"
 	sqlId.And("EXECUTETYPE", r.QUERYTYPE)
 	switch r.STATUS {