master
wubin 5 years ago
parent e903bcbee7
commit 9731b9131a

@ -8,3 +8,5 @@
[Error]2020/08/24 17:16:04 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value
[Error]2020/09/09 14:31:02 SqlQueryError sql: expected 1 arguments, got 3
[Error]2020/09/09 14:31:02 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value
[Error]2020/09/16 15:14:03 SqlQueryError sql: expected 1 arguments, got 3
[Error]2020/09/16 15:14:03 SqlQueryError WRONGTYPE Operation against a key holding the wrong kind of value

@ -3,6 +3,7 @@ package AccessSystemController
import (
"dsSupport/Model"
"dsSupport/MyModel/AccessSystem/AccessSystemDao"
"dsSupport/MyModel/AccessSystem/AccessSystemRpc/BaseOrganizationService"
"dsSupport/MyModel/AccessSystem/AccessSystemRpc/BasePositionService"
"dsSupport/MyModel/AccessSystem/AccessSystemRpc/GovAreaService"
"dsSupport/Utils/CommonUtil"
@ -39,6 +40,7 @@ func Routers(r *gin.RouterGroup) {
rr.POST("/SettingAccessSystemStageInfo", SettingAccessSystemStageInfo)
rr.GET("/PageGovArea", PageGovArea)
rr.GET("/GetOrganizationList", GetOrganizationList)
return
}
@ -783,3 +785,39 @@ func PageGovArea(c *gin.Context) {
Count: r.Count,
})
}
// @Summary 获取行政区划信息
// @Description 获取行政区划信息
// @Tags 接入系统
// @Accept application/x-www-form-urlencoded
// @Produce json
// @Param page query int true "第几页"
// @Param limit query int true "一页显示多少条"
// @Param areaCode query string true "行政区划码"
// @Param orgName query string false "行政区划码"
// @Success 200 {object} Model.Res
// @Router /support/accessSystem/GetOrganizationList [get]
// @X-EmptyLimit ["page","limit","areaCode"]
// @X-LengthLimit [{"areaCode":"6,6"}]
// @X-Sort [20]
func GetOrganizationList(c *gin.Context) {
page := CommonUtil.ConvertStringToInt32(c.Query("page"))
limit := CommonUtil.ConvertStringToInt32(c.Query("limit"))
areaCode := c.Query("areaCode")
orgName := c.Query("orgName")
r, err := BaseOrganizationService.GetOrganizationList(page, limit, areaCode, orgName)
if err != nil {
c.JSON(http.StatusOK, Model.Res{
Success: false,
Message: "调用RPC服务失败",
})
return
}
c.JSON(http.StatusOK, Model.Res{
Success: true,
List: CommonUtil.ConvertJsonStringToMapArray(r.List),
Message: "获取成功",
Count: r.Count,
})
}

@ -363,9 +363,10 @@ func ConvertIntegerArrayToStringArray(nums []int) []string {
func ConvertInt64ToString(int64 int64) string {
return strconv.FormatInt(int64, 10)
}
/**
*/
*/
func RemoveRepeatedElement(arr []string) (newArr []string) {
newArr = make([]string, 0)
for i := 0; i < len(arr); i++ {
@ -757,6 +758,9 @@ func ListMerge(a string, b string, correspondSourceId string, correspondTargetId
case int64:
bKey = strconv.FormatInt(bRecord[correspondTargetId].(int64), 10)
break
case float64:
bKey = strconv.FormatFloat(bRecord[correspondTargetId].(float64), 'f', -1, 64)
break
}
bMap[bKey] = bRecord[displayTargetKey]
}
@ -776,6 +780,8 @@ func ListMerge(a string, b string, correspondSourceId string, correspondTargetId
break
case int64:
aKey = strconv.FormatInt(aRecord[correspondSourceId].(int64), 10)
case float64:
aKey = strconv.FormatFloat(aRecord[correspondSourceId].(float64), 'f', -1, 64)
}
display := ""
if bMap[aKey] != nil {

@ -1,6 +1,6 @@
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// This file was generated by swaggo/swag at
// 2020-09-15 11:39:33.2605259 +0800 CST m=+0.164906801
// 2020-09-16 17:27:17.425148 +0800 CST m=+0.158909101
package docs
@ -556,6 +556,71 @@ var doc = `{
]
}
},
"/support/accessSystem/GetOrganizationList": {
"get": {
"description": "获取行政区划信息",
"consumes": [
"application/x-www-form-urlencoded"
],
"produces": [
"application/json"
],
"tags": [
"接入系统"
],
"summary": "获取行政区划信息",
"parameters": [
{
"type": "integer",
"description": "第几页",
"name": "page",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "一页显示多少条",
"name": "limit",
"in": "query",
"required": true
},
{
"type": "string",
"description": "行政区划码",
"name": "areaCode",
"in": "query",
"required": true
},
{
"type": "string",
"description": "行政区划码",
"name": "orgName",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Model.Res"
}
}
},
"x-emptylimit": [
"page",
"limit",
"areaCode"
],
"x-lengthlimit": [
{
"areaCode": "6,6"
}
],
"x-sort": [
20
]
}
},
"/support/accessSystem/GetPositionTreeInfo": {
"get": {
"description": "获取职务树信息",

@ -539,6 +539,71 @@
]
}
},
"/support/accessSystem/GetOrganizationList": {
"get": {
"description": "获取行政区划信息",
"consumes": [
"application/x-www-form-urlencoded"
],
"produces": [
"application/json"
],
"tags": [
"接入系统"
],
"summary": "获取行政区划信息",
"parameters": [
{
"type": "integer",
"description": "第几页",
"name": "page",
"in": "query",
"required": true
},
{
"type": "integer",
"description": "一页显示多少条",
"name": "limit",
"in": "query",
"required": true
},
{
"type": "string",
"description": "行政区划码",
"name": "areaCode",
"in": "query",
"required": true
},
{
"type": "string",
"description": "行政区划码",
"name": "orgName",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Model.Res"
}
}
},
"x-emptylimit": [
"page",
"limit",
"areaCode"
],
"x-lengthlimit": [
{
"areaCode": "6,6"
}
],
"x-sort": [
20
]
}
},
"/support/accessSystem/GetPositionTreeInfo": {
"get": {
"description": "获取职务树信息",

@ -695,6 +695,49 @@ paths:
- 17
x-tablename:
- t_app_base
/support/accessSystem/GetOrganizationList:
get:
consumes:
- application/x-www-form-urlencoded
description: 获取行政区划信息
parameters:
- description: 第几页
in: query
name: page
required: true
type: integer
- description: 一页显示多少条
in: query
name: limit
required: true
type: integer
- description: 行政区划码
in: query
name: areaCode
required: true
type: string
- description: 行政区划码
in: query
name: orgName
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 获取行政区划信息
tags:
- 接入系统
x-emptylimit:
- page
- limit
- areaCode
x-lengthlimit:
- areaCode: 6,6
x-sort:
- 20
/support/accessSystem/GetPositionTreeInfo:
get:
consumes:

Loading…
Cancel
Save