|
|
|
@ -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,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|