Переглянути джерело

1.修改查询客户资料接口(pcweb)
2.fix bug: #96161 #96162

zou.yingbin 4 роки тому
батько
коміт
f54552ab8f
6 змінених файлів з 474 додано та 9 видалено
  1. 2 2
      controllers/order/order.go
  2. 1 1
      controllers/qhjPCWeb/qryQhjPCWeb.go
  3. 162 1
      docs/docs.go
  4. 162 1
      docs/swagger.json
  5. 123 1
      docs/swagger.yaml
  6. 24 3
      models/qhjPCWeb.go

+ 2 - 2
controllers/order/order.go

@@ -523,7 +523,7 @@ func QueryTradeDetail(c *gin.Context) {
 				TRADE_TRADEDETAIL.*, CASE TRADE_TRADEDETAIL.BUILDTYPE WHEN 1 THEN TRADE_TRADEDETAIL.OPENCHARGE ELSE TRADE_TRADEDETAIL.CLOSECHARGE END as CHARGE,
 				GOODS.GOODSCODE, GOODS.GOODSNAME, GOODS.DECIMALPLACE, GOODS.QTYDECIMALPLACE,GOODS.GOODUNITID, MARKET.MARKETNAME, MARKET.TRADEMODE, 
 				TRADE_ORDERDETAIL.LISTINGSELECTTYPE, TRADE_PAYORDER.ADVANCERATIO, TRADE_PAYORDER.PAYAMOUNT, TRADE_PAYORDER.TRADECHARGE`).
-		Where(fmt.Sprintf("TRADE_TRADEDETAIL.TRADETYPE <= 13 and TRADE_TRADEDETAIL.ACCOUNTID in (%s)", req.AccountID)).
+		Where(fmt.Sprintf("TRADE_TRADEDETAIL.ACCOUNTID in (%s)", req.AccountID)).
 		Desc("TRADE_TRADEDETAIL.TRADETIME")
 	if req.TradeID > 0 {
 		s = s.And("TRADE_TRADEDETAIL.TRADEID = ?", req.TradeID)
@@ -642,7 +642,7 @@ func QueryHisTradeDetail(c *gin.Context) {
 				HIS_TRADE_TRADEDETAIL.*, CASE HIS_TRADE_TRADEDETAIL.BUILDTYPE WHEN 1 THEN HIS_TRADE_TRADEDETAIL.OPENCHARGE ELSE HIS_TRADE_TRADEDETAIL.CLOSECHARGE END as CHARGE,
 				GOODS.GOODSCODE, GOODS.GOODSNAME,GOODS.DECIMALPLACE, GOODS.QTYDECIMALPLACE, GOODS.GOODUNITID, MARKET.MARKETNAME, MARKET.TRADEMODE, 
 				HIS_TRADE_ORDERDETAIL.LISTINGSELECTTYPE, TRADE_PAYORDER.ADVANCERATIO, TRADE_PAYORDER.PAYAMOUNT, TRADE_PAYORDER.TRADECHARGE`).
-		Where(fmt.Sprintf("HIS_TRADE_TRADEDETAIL.TRADETYPE <= 13 and HIS_TRADE_TRADEDETAIL.ISVALIDDATA = 1 and HIS_TRADE_TRADEDETAIL.ACCOUNTID in (%s)", req.AccountID)).
+		Where(fmt.Sprintf("HIS_TRADE_TRADEDETAIL.ISVALIDDATA = 1 and HIS_TRADE_TRADEDETAIL.ACCOUNTID in (%s)", req.AccountID)).
 		Desc("HIS_TRADE_TRADEDETAIL.TRADETIME")
 	if req.TradeID > 0 {
 		s = s.And("HIS_TRADE_TRADEDETAIL.TRADEID = ?", req.TradeID)

+ 1 - 1
controllers/qhjPCWeb/qryQhjPCWeb.go

@@ -41,7 +41,7 @@ func QuerySubArea(c *gin.Context) {
 // @Param customername query string false "客户名称(模糊匹配)"
 // @Param nickname query string false "昵称(模糊匹配)"
 // @Param includesub query int false "是否包含子级 1-包含"
-// @Success 200 {array} models.QhjCustomer
+// @Success 200 {array} models.QhjMgrCustomer
 // @Failure 500 {object} app.Response
 // @Router /QhjMgr/QueryCustomerInfo [get]
 // @Tags 大连千海金(PCWeb)

+ 162 - 1
docs/docs.go

@@ -8164,7 +8164,7 @@ var doc = `{
                         "schema": {
                             "type": "array",
                             "items": {
-                                "$ref": "#/definitions/models.QhjCustomer"
+                                "$ref": "#/definitions/models.QhjMgrCustomer"
                             }
                         }
                     },
@@ -24101,6 +24101,167 @@ var doc = `{
                 }
             }
         },
+        "models.QhjMgrCustomer": {
+            "type": "object",
+            "properties": {
+                "address": {
+                    "description": "通讯地址",
+                    "type": "string"
+                },
+                "attachment1": {
+                    "description": "附件1",
+                    "type": "string"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "cardbackphotourl": {
+                    "description": "证件反面图片地址",
+                    "type": "string"
+                },
+                "cardfrontphotourl": {
+                    "description": "证件正面图片地址",
+                    "type": "string"
+                },
+                "cardnum": {
+                    "description": "证件号码",
+                    "type": "string"
+                },
+                "cardtype": {
+                    "description": "证件类型",
+                    "type": "integer"
+                },
+                "cardtypename": {
+                    "description": "证件类型名称",
+                    "type": "string"
+                },
+                "cityid": {
+                    "description": "市",
+                    "type": "integer"
+                },
+                "cityname": {
+                    "description": "城市名称",
+                    "type": "string"
+                },
+                "contactname": {
+                    "description": "联系人",
+                    "type": "string"
+                },
+                "countryid": {
+                    "description": "国家",
+                    "type": "integer"
+                },
+                "countryname": {
+                    "description": "国家名称",
+                    "type": "string"
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "customername": {
+                    "description": "客户名称",
+                    "type": "string"
+                },
+                "districtid": {
+                    "description": "区域",
+                    "type": "integer"
+                },
+                "districtname": {
+                    "description": "地区名称",
+                    "type": "string"
+                },
+                "email": {
+                    "description": "邮件",
+                    "type": "string"
+                },
+                "legalpersonname": {
+                    "description": "法人姓名(企业)",
+                    "type": "string"
+                },
+                "logincode": {
+                    "description": "登录账号(代码)",
+                    "type": "string"
+                },
+                "memberuserid": {
+                    "description": "所属机构ID(所属会员)",
+                    "type": "integer"
+                },
+                "memberusername": {
+                    "description": "所属会员名称",
+                    "type": "string"
+                },
+                "mobile": {
+                    "description": "手机号码",
+                    "type": "string"
+                },
+                "modifytime": {
+                    "description": "修改时间",
+                    "type": "string"
+                },
+                "nickname": {
+                    "description": "昵称",
+                    "type": "string"
+                },
+                "parentuserid": {
+                    "description": "上级机构(所属机构)",
+                    "type": "integer"
+                },
+                "parentusername": {
+                    "description": "所属机构名称",
+                    "type": "string"
+                },
+                "provinceid": {
+                    "description": "省",
+                    "type": "integer"
+                },
+                "provincename": {
+                    "description": "省名称",
+                    "type": "string"
+                },
+                "proxystatementurl": {
+                    "description": "授权委托书",
+                    "type": "string"
+                },
+                "querytype": {
+                    "description": "查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用",
+                    "type": "integer"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "status": {
+                    "description": "开户状态(网上开户表wskh_userinfo) - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过 ; 账户状态(正式表useraccount) - 1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销) 7:注销(删除)",
+                    "type": "integer"
+                },
+                "statusdesc": {
+                    "description": "账户状态中文描述",
+                    "type": "string"
+                },
+                "taxpayernum": {
+                    "description": "纳税人识别号",
+                    "type": "string"
+                },
+                "telphone": {
+                    "description": "联系电话",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "userinfotype": {
+                    "description": "客户类型 1-个人 2-企业",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "用户名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.QhjMgrPositionRsp": {
             "type": "object",
             "properties": {

+ 162 - 1
docs/swagger.json

@@ -8148,7 +8148,7 @@
                         "schema": {
                             "type": "array",
                             "items": {
-                                "$ref": "#/definitions/models.QhjCustomer"
+                                "$ref": "#/definitions/models.QhjMgrCustomer"
                             }
                         }
                     },
@@ -24085,6 +24085,167 @@
                 }
             }
         },
+        "models.QhjMgrCustomer": {
+            "type": "object",
+            "properties": {
+                "address": {
+                    "description": "通讯地址",
+                    "type": "string"
+                },
+                "attachment1": {
+                    "description": "附件1",
+                    "type": "string"
+                },
+                "audittime": {
+                    "description": "审核时间",
+                    "type": "string"
+                },
+                "cardbackphotourl": {
+                    "description": "证件反面图片地址",
+                    "type": "string"
+                },
+                "cardfrontphotourl": {
+                    "description": "证件正面图片地址",
+                    "type": "string"
+                },
+                "cardnum": {
+                    "description": "证件号码",
+                    "type": "string"
+                },
+                "cardtype": {
+                    "description": "证件类型",
+                    "type": "integer"
+                },
+                "cardtypename": {
+                    "description": "证件类型名称",
+                    "type": "string"
+                },
+                "cityid": {
+                    "description": "市",
+                    "type": "integer"
+                },
+                "cityname": {
+                    "description": "城市名称",
+                    "type": "string"
+                },
+                "contactname": {
+                    "description": "联系人",
+                    "type": "string"
+                },
+                "countryid": {
+                    "description": "国家",
+                    "type": "integer"
+                },
+                "countryname": {
+                    "description": "国家名称",
+                    "type": "string"
+                },
+                "createtime": {
+                    "description": "创建时间",
+                    "type": "string"
+                },
+                "customername": {
+                    "description": "客户名称",
+                    "type": "string"
+                },
+                "districtid": {
+                    "description": "区域",
+                    "type": "integer"
+                },
+                "districtname": {
+                    "description": "地区名称",
+                    "type": "string"
+                },
+                "email": {
+                    "description": "邮件",
+                    "type": "string"
+                },
+                "legalpersonname": {
+                    "description": "法人姓名(企业)",
+                    "type": "string"
+                },
+                "logincode": {
+                    "description": "登录账号(代码)",
+                    "type": "string"
+                },
+                "memberuserid": {
+                    "description": "所属机构ID(所属会员)",
+                    "type": "integer"
+                },
+                "memberusername": {
+                    "description": "所属会员名称",
+                    "type": "string"
+                },
+                "mobile": {
+                    "description": "手机号码",
+                    "type": "string"
+                },
+                "modifytime": {
+                    "description": "修改时间",
+                    "type": "string"
+                },
+                "nickname": {
+                    "description": "昵称",
+                    "type": "string"
+                },
+                "parentuserid": {
+                    "description": "上级机构(所属机构)",
+                    "type": "integer"
+                },
+                "parentusername": {
+                    "description": "所属机构名称",
+                    "type": "string"
+                },
+                "provinceid": {
+                    "description": "省",
+                    "type": "integer"
+                },
+                "provincename": {
+                    "description": "省名称",
+                    "type": "string"
+                },
+                "proxystatementurl": {
+                    "description": "授权委托书",
+                    "type": "string"
+                },
+                "querytype": {
+                    "description": "查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用",
+                    "type": "integer"
+                },
+                "remark": {
+                    "description": "备注",
+                    "type": "string"
+                },
+                "status": {
+                    "description": "开户状态(网上开户表wskh_userinfo) - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过 ; 账户状态(正式表useraccount) - 1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销) 7:注销(删除)",
+                    "type": "integer"
+                },
+                "statusdesc": {
+                    "description": "账户状态中文描述",
+                    "type": "string"
+                },
+                "taxpayernum": {
+                    "description": "纳税人识别号",
+                    "type": "string"
+                },
+                "telphone": {
+                    "description": "联系电话",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "userinfotype": {
+                    "description": "客户类型 1-个人 2-企业",
+                    "type": "integer"
+                },
+                "username": {
+                    "description": "用户名称",
+                    "type": "string"
+                }
+            }
+        },
         "models.QhjMgrPositionRsp": {
             "type": "object",
             "properties": {

+ 123 - 1
docs/swagger.yaml

@@ -10242,6 +10242,128 @@ definitions:
         description: 仓单数量(数量)
         type: number
     type: object
+  models.QhjMgrCustomer:
+    properties:
+      address:
+        description: 通讯地址
+        type: string
+      attachment1:
+        description: 附件1
+        type: string
+      audittime:
+        description: 审核时间
+        type: string
+      cardbackphotourl:
+        description: 证件反面图片地址
+        type: string
+      cardfrontphotourl:
+        description: 证件正面图片地址
+        type: string
+      cardnum:
+        description: 证件号码
+        type: string
+      cardtype:
+        description: 证件类型
+        type: integer
+      cardtypename:
+        description: 证件类型名称
+        type: string
+      cityid:
+        description: 市
+        type: integer
+      cityname:
+        description: 城市名称
+        type: string
+      contactname:
+        description: 联系人
+        type: string
+      countryid:
+        description: 国家
+        type: integer
+      countryname:
+        description: 国家名称
+        type: string
+      createtime:
+        description: 创建时间
+        type: string
+      customername:
+        description: 客户名称
+        type: string
+      districtid:
+        description: 区域
+        type: integer
+      districtname:
+        description: 地区名称
+        type: string
+      email:
+        description: 邮件
+        type: string
+      legalpersonname:
+        description: 法人姓名(企业)
+        type: string
+      logincode:
+        description: 登录账号(代码)
+        type: string
+      memberuserid:
+        description: 所属机构ID(所属会员)
+        type: integer
+      memberusername:
+        description: 所属会员名称
+        type: string
+      mobile:
+        description: 手机号码
+        type: string
+      modifytime:
+        description: 修改时间
+        type: string
+      nickname:
+        description: 昵称
+        type: string
+      parentuserid:
+        description: 上级机构(所属机构)
+        type: integer
+      parentusername:
+        description: 所属机构名称
+        type: string
+      provinceid:
+        description: 省
+        type: integer
+      provincename:
+        description: 省名称
+        type: string
+      proxystatementurl:
+        description: 授权委托书
+        type: string
+      querytype:
+        description: 查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用
+        type: integer
+      remark:
+        description: 备注
+        type: string
+      status:
+        description: '开户状态(网上开户表wskh_userinfo) - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝
+          6:测评不通过 ; 账户状态(正式表useraccount) - 1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销)
+          7:注销(删除)'
+        type: integer
+      statusdesc:
+        description: 账户状态中文描述
+        type: string
+      taxpayernum:
+        description: 纳税人识别号
+        type: string
+      telphone:
+        description: 联系电话
+        type: string
+      userid:
+        description: 用户ID
+        type: integer
+      userinfotype:
+        description: 客户类型 1-个人 2-企业
+        type: integer
+      username:
+        description: 用户名称
+        type: string
+    type: object
   models.QhjMgrPositionRsp:
     properties:
       accountid:
@@ -19555,7 +19677,7 @@ paths:
           description: OK
           schema:
             items:
-              $ref: '#/definitions/models.QhjCustomer'
+              $ref: '#/definitions/models.QhjMgrCustomer'
             type: array
         "500":
           description: Internal Server Error

+ 24 - 3
models/qhjPCWeb.go

@@ -71,7 +71,7 @@ type QhjMgrCustomer struct {
 	TELPHONE          string `json:"telphone"  xorm:"'TELPHONE'"`                   // 联系电话
 	ADDRESS           string `json:"address"  xorm:"'ADDRESS'"`                     // 通讯地址
 	REMARK            string `json:"remark"  xorm:"'REMARK'"`                       // 备注
-	STATUS            int32  `json:"status"  xorm:"'STATUS'"`                       // 账户状态 -  1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:注销
+	STATUS            int32  `json:"status"  xorm:"'STATUS'"`                       // 开户状态(网上开户表wskh_userinfo) 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过 ; 账户状态(正式表useraccount) 1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销) 7:注销(删除)
 	STATUSDESC        string `json:"statusdesc"`                                    // 账户状态中文描述
 	ATTACHMENT1       string `json:"attachment1"  xorm:"'ATTACHMENT1'"`             // 附件1
 	CARDFRONTPHOTOURL string `json:"cardfrontphotourl"  xorm:"'CARDFRONTPHOTOURL'"` // 证件正面图片地址
@@ -100,8 +100,8 @@ type QhjMgrCustomer struct {
 	MEMBERUSERNAME string `json:"memberusername"` // 所属会员名称
 	PARENTUSERNAME string `json:"parentusername"` //所属机构名称
 
-	QUERYTYPE  int32 `json:"-"` // 查询类型(1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用)
-	IncludeSub int32 `json:"-"` // 包子机构客户 1-包含
+	QUERYTYPE  int32 `json:"querytype"` // 查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用
+	IncludeSub int32 `json:"-"`         // 包子机构客户 1-包含
 }
 
 func (r *QhjMgrCustomer) calc() {
@@ -115,12 +115,33 @@ func (r *QhjMgrCustomer) calc() {
 	r.PROVINCENAME = mtpcache.GetDivisionName(r.PROVINCEID)
 	r.DISTRICTNAME = mtpcache.GetDivisionName(r.DISTRICTID)
 
+	fDesc := func(status int32, vDesc string) {
+		if r.STATUS == status {
+			r.STATUSDESC = vDesc
+		}
+	}
+
 	switch r.QUERYTYPE {
 	case 1, 2: // 网上开户表
 		r.ADDRESS = DecryptField(r.ADDRESS)
 		r.TELPHONE = DecryptField(r.TELPHONE)
+		//开户状态 -  1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过
+		fDesc(1, "未提交")
+		fDesc(2, "待初审")
+		fDesc(3, "初审拒绝")
+		fDesc(4, "待复审")
+		fDesc(5, "复审拒绝")
+		fDesc(6, "测评不通过")
 	case 3, 4: // 正式表
 		r.TELPHONE = DecryptField(r.TELPHONE)
+		//账户状态 -  1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:停用(注销) 7:注销(删除)
+		fDesc(1, "待激活")
+		fDesc(2, "待审核")
+		fDesc(3, "待复审")
+		fDesc(4, "正常")
+		fDesc(5, "审核拒绝")
+		fDesc(6, "停用(注销)")
+		fDesc(7, "注销(删除)")
 	}
 	r.CARDNUM = DecryptField(r.CARDNUM)
 	r.MOBILE = DecryptField(r.MOBILE)