package BaseOrganizationController import ( "dsBaseWeb/Business/BaseOrganization/BaseOrganizationService" "dsBaseWeb/Model" "dsBaseWeb/Utils/CommonUtil" "github.com/gin-gonic/gin" "net/http" ) //模块的路由配置 func Routers(r *gin.RouterGroup) { rr := r.Group("/organization") //教育局相关接口 rr.GET("/PageEnableEduInfo", PageEnableEduInfo) rr.GET("/PageDisableEduInfo", PageDisableEduInfo) rr.GET("/GetEduInfoById", GetEduInfoById) rr.POST("/EnableEdu", EnableEdu) rr.POST("/DisableEdu", DisableEdu) rr.POST("/UpdateEduInfo", UpdateEduInfo) //教辅单位相关接口 rr.GET("/PageEduAssistInfo", PageEduAssistInfo) rr.GET("/GetEduAssistInfoById", GetEduAssistInfoById) rr.POST("/AddEduAssistInfo", AddEduAssistInfo) rr.POST("/UpdateEduAssistInfo", UpdateEduAssistInfo) rr.POST("/DeleteEduAssistInfo", DeleteEduAssistInfo) //学校相关接口 rr.GET("/PageSchoolInfo", PageSchoolInfo) rr.GET("/PageMainSchoolInfo", PageMainSchoolInfo) rr.GET("/GetSchoolInfoById", GetSchoolInfoById) rr.POST("/AddSchoolInfo", AddSchoolInfo) rr.POST("/UpdateSchoolInfo", UpdateSchoolInfo) rr.POST("/DeleteSchoolInfo", DeleteSchoolInfo) //部门相关接口 rr.GET("/PageOrgInfo", PageOrgInfo) rr.GET("/GetOrgInfo", GetOrgInfo) rr.POST("/AddOrgInfo", AddOrgInfo) rr.POST("/UpdateOrgInfo", UpdateOrgInfo) rr.POST("/DeleteOrgInfo", DeleteOrgInfo) rr.GET("/GetOrgTreeInfo", GetOrgTreeInfo) return } //START↓↓↓↓↓↓↓↓↓↓教育局↓↓↓↓↓↓↓↓↓↓ // @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 /base/organization/PageEnableEduInfo [get] // @X-EmptyLimit ["page","limit","areaCode"] // @X-LengthLimit [{"areaCode":"6,6"},{"orgName":"1,50"}] // @X-IntRangeLimit [{"page":"1,1000"},{"limit":"1,1000"}] // @X-RoleLimit ["1"] // @X-TableName ["t_base_organization"] // @X-ExtendSwaggerField [{"column_name":"login_name","sample_data":"sys001","column_comment":"登录账号"},{"column_name":"login_pwd","sample_data":"741369","column_comment":"初始密码"}] // @X-RemoveSwaggerField ["id_int","parent_id","bureau_id","org_type","edu_assist_type","main_school_type","main_school_id","manage_org_id","directly_under_type","xxbbm","xxbxlxm","szdcxlxm","xxjbzm","fzr","fddbr","fddbrdh","address","lxdh","org_lng","org_lat","sort_id","b_use","province_code","city_code","district_code","last_updated_time"] // @X-Sort [1] func PageEnableEduInfo(c *gin.Context) { //第几页 page := CommonUtil.ConvertStringToInt32(c.Query("page")) //一页显示多少条 limit := CommonUtil.ConvertStringToInt32(c.Query("limit")) //市行政编码 areaCode := c.Query("areaCode") //教育局名称 orgName := c.Query("orgName") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.PageEnableEduInfo(page, limit, areaCode, orgName, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray(r.List), 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 /base/organization/PageDisableEduInfo [get] // @X-EmptyLimit ["page","limit","areaCode"] // @X-LengthLimit [{"areaCode":"6,6"},{"orgName":"1,50"}] // @X-IntRangeLimit [{"page":"1,1000"},{"limit":"1,1000"}] // @X-RoleLimit ["1"] // @X-InterfaceName ["PageBaseOrganization"] // @X-TableName ["t_base_organization"] // @X-RemoveSwaggerField ["id_int","parent_id","bureau_id","org_type","edu_assist_type","main_school_type","main_school_id","manage_org_id","directly_under_type","xxbbm","xxbxlxm","szdcxlxm","xxjbzm","fzr","fddbr","fddbrdh","address","lxdh","org_lng","org_lat","sort_id","b_use","province_code","city_code","district_code","last_updated_time"] // @X-Sort [2] func PageDisableEduInfo(c *gin.Context) { //第几页 page := CommonUtil.ConvertStringToInt32(c.Query("page")) //一页显示多少条 limit := CommonUtil.ConvertStringToInt32(c.Query("limit")) //市行政编码 areaCode := c.Query("areaCode") //教育局名称 orgName := c.Query("orgName") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.PageDisableEduInfo(page, limit, areaCode, orgName, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray(r.List), Count: r.Count, }) } // @Summary 根据教育局ID获取教育局信息 // @Description 根据教育局ID获取教育局信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId query string true "教育局ID" // @Success 200 {object} Model.Res // @Router /base/organization/GetEduInfoById [get] // @X-EmptyLimit ["orgId"] // @X-LengthLimit [{"orgId":"36,36"}] // @X-RoleLimit ["1"] // @X-InterfaceName ["GetBaseOrganization"] // @X-TableName ["t_base_organization"] // @X-RemoveSwaggerField ["id_int","parent_id","bureau_id","org_type","edu_assist_type","main_school_type","main_school_id","manage_org_id","directly_under_type","xxbbm","xxbxlxm","szdcxlxm","xxjbzm","fzr","org_lng","org_lat","b_use","province_code","city_code","district_code","last_updated_time"] // @X-Sort [3] func GetEduInfoById(c *gin.Context) { //教育局ID orgId := c.Query("orgId") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.GetEduInfoById(orgId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray(r.List), Count: r.Count, }) } // @Summary 启用教育局 // @Description 启用教育局 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId formData string true "教育局ID" // @Param orgCode formData string true "教育局编码" // @Param orgName formData string true "教育局名称" // @Param fddbr formData string false "教育局法定代表人" // @Param fddbrdh formData string false "教育局法定代表人电话" // @Param address formData string false "教育局地址" // @Param lxdh formData string false "联系电话" // @Param sortId formData int false "排序号" // @Success 200 {object} Model.Res // @Router /base/organization/EnableEdu [post] // @X-EmptyLimit ["orgId","orgCode","orgName"] // @X-IntRangeLimit [{"sortId":"1,9999"}] // @X-LengthLimit [{"orgId":"36,36"},{"orgCode":"2,20"},{"orgName":"2,50"},{"fddbr":"2,30"},{"fddbrdh":"2,30"},{"address":"2,100"},{"lxdh":"2,30"}] // @X-RoleLimit ["1"] // @X-InterfaceName ["UpdateBaseOrganization"] // @X-Sort [4] func EnableEdu(c *gin.Context) { //教育局ID orgId := c.PostForm("orgId") //教育局编码 orgCode := c.PostForm("orgCode") //教育局名称 orgName := c.PostForm("orgName") //教育局法定代表人 fddbr := c.PostForm("fddbr") //教育局法定代表人电话 fddbrdh := c.PostForm("fddbrdh") //教育局地址 address := c.PostForm("address") //联系电话 lxdh := c.PostForm("lxdh") //排序号 sortId := CommonUtil.ConvertStringToInt32(c.PostForm("sortId")) //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.EnableEdu(orgId, orgCode, orgName, fddbr, fddbrdh, address, lxdh, sortId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } // @Summary 禁用教育局 // @Description 禁用教育局 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId formData string true "教育局ID" // @Success 200 {object} Model.Res // @Router /base/organization/DisableEdu [post] // @X-EmptyLimit ["orgId"] // @X-LengthLimit [{"orgId":"36,36"}] // @X-RoleLimit ["1"] // @X-InterfaceName ["UpdateBaseOrganization"] // @X-Sort [5] func DisableEdu(c *gin.Context) { //教育局ID orgId := c.PostForm("orgId") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.DisableEdu(orgId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } // @Summary 修改教育局信息 // @Description 修改教育局信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId formData string true "教育局ID" // @Param orgCode formData string true "教育局编码" // @Param orgName formData string true "教育局名称" // @Param fddbr formData string false "教育局法定代表人" // @Param fddbrdh formData string false "教育局法定代表人电话" // @Param address formData string false "教育局地址" // @Param lxdh formData string false "联系电话" // @Param sortId formData int false "排序号" // @Success 200 {object} Model.Res // @Router /base/organization/UpdateEduInfo [post] // @X-EmptyLimit ["orgId","orgCode","orgName"] // @X-IntRangeLimit [{"sortId":"1,9999"}] // @X-LengthLimit [{"orgId":"36,36"},{"orgCode":"2,20"},{"orgName":"2,50"},{"fddbr":"2,30"},{"fddbrdh":"2,30"},{"address":"2,100"},{"lxdh":"2,30"}] // @X-RoleLimit ["1"] // @X-InterfaceName ["UpdateBaseOrganization"] // @X-Sort [6] func UpdateEduInfo(c *gin.Context) { //教育局ID orgId := c.PostForm("orgId") //教育局编码 orgCode := c.PostForm("orgCode") //教育局名称 orgName := c.PostForm("orgName") //教育局法定代表人 fddbr := c.PostForm("fddbr") //教育局法定代表人电话 fddbrdh := c.PostForm("fddbrdh") //教育局地址 address := c.PostForm("address") //联系电话 lxdh := c.PostForm("lxdh") //排序号 sortId := CommonUtil.ConvertStringToInt32(c.PostForm("sortId")) //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.UpdateEduInfo(orgId, orgCode, orgName, fddbr, fddbrdh, address, lxdh, sortId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } //END↑↑↑↑↑↑↑↑↑↑教育局↑↑↑↑↑↑↑↑↑↑ //START↓↓↓↓↓↓↓↓↓↓教辅单位↓↓↓↓↓↓↓↓↓↓ // @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 /base/organization/PageEduAssistInfo [get] // @X-EmptyLimit ["page","limit","areaCode"] // @X-LengthLimit [{"areaCode":"6,6"},{"orgName":"1,50"}] // @X-IntRangeLimit [{"page":"1,1000"},{"limit":"1,1000"}] // @X-RoleLimit ["1","2","3","4"] // @X-TableName ["t_base_organization"] // @X-RemoveSwaggerField ["id_int","parent_id","bureau_id","org_type","edu_assist_type","main_school_type","main_school_id","manage_org_id","directly_under_type","xxbbm","xxbxlxm","szdcxlxm","xxjbzm","fzr","fddbr","fddbrdh","address","lxdh","org_lng","org_lat","sort_id","b_use","province_code","city_code","district_code","last_updated_time"] // @X-Sort [7] func PageEduAssistInfo(c *gin.Context) { //第几页 page := CommonUtil.ConvertStringToInt32(c.Query("page")) //一页显示多少条 limit := CommonUtil.ConvertStringToInt32(c.Query("limit")) //市行政编码 areaCode := c.Query("areaCode") //教辅单位名称 orgName := c.Query("orgName") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.PageEduAssistInfo(page, limit, areaCode, orgName, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray(r.List), Count: r.Count, }) } // @Summary 根据教辅单位ID获取教辅单位信息 // @Description 根据教辅单位ID获取教辅单位信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId query string true "教辅单位ID" // @Success 200 {object} Model.Res // @Router /base/organization/GetEduAssistInfoById [get] // @X-EmptyLimit ["orgId"] // @X-LengthLimit [{"orgId":"36,36"}] // @X-RoleLimit ["1","2","3","4"] // @X-InterfaceName ["GetBaseOrganization"] // @X-TableName ["t_base_organization"] // @X-RemoveSwaggerField ["id_int","parent_id","bureau_id","org_type","edu_assist_type","main_school_type","main_school_id","manage_org_id","directly_under_type","xxbbm","xxbxlxm","szdcxlxm","xxjbzm","fzr","org_lng","org_lat","b_use","province_code","city_code","district_code","last_updated_time"] // @X-Sort [8] func GetEduAssistInfoById(c *gin.Context) { //教育局ID orgId := c.Query("orgId") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.GetEduAssistInfoById(orgId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray(r.List), Count: r.Count, }) } // @Summary 增加教辅单位信息 // @Description 增加教辅单位信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param areaCode formData string true "行政区划编码" // @Param orgCode formData string true "教辅单位编码" // @Param orgName formData string true "教辅单位名称" // @Param fddbr formData string false "教辅单位法定代表人" // @Param fddbrdh formData string false "教辅单位法定代表人电话" // @Param address formData string false "教辅单位地址" // @Param lxdh formData string false "联系电话" // @Param sortId formData int false "排序号" // @Success 200 {object} Model.Res // @Router /base/organization/AddEduAssistInfo [post] // @X-EmptyLimit ["areaCode","orgCode","orgName"] // @X-LengthLimit [{"areaCode":"6,6"},{"orgCode":"2,20"},{"orgName":"2,50"},{"fddbr":"2,30"},{"fddbrdh":"2,30"},{"address":"2,100"},{"lxdh":"2,30"}] // @X-IntRangeLimit [{"sortId":"1,9999"}] // @X-RoleLimit ["1","2","3","4"] // @X-InterfaceName ["AddBaseOrganization"] // @X-Sort [9] func AddEduAssistInfo(c *gin.Context) { //行政区划编码 areaCode := c.PostForm("areaCode") //教辅单位编码 orgCode := c.PostForm("orgCode") //教辅单位名称 orgName := c.PostForm("orgName") //教辅单位法定代表人 fddbr := c.PostForm("fddbr") //教辅单位法定代表人电话 fddbrdh := c.PostForm("fddbrdh") //教辅单位地址 address := c.PostForm("address") //联系电话 lxdh := c.PostForm("lxdh") //排序号 sortId := CommonUtil.ConvertStringToInt32(c.PostForm("sortId")) //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.AddEduAssistInfo(areaCode, orgCode, orgName, fddbr, fddbrdh, address, lxdh, sortId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!" + err.Error(), }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } // @Summary 修改教辅单位信息 // @Description 修改教辅单位信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId formData string true "教辅单位ID" // @Param orgCode formData string true "教辅单位编码" // @Param orgName formData string true "教辅单位名称" // @Param fddbr formData string false "教辅单位法定代表人" // @Param fddbrdh formData string false "教辅单位法定代表人电话" // @Param address formData string false "教辅单位地址" // @Param lxdh formData string false "联系电话" // @Param sortId formData int false "排序号" // @Success 200 {object} Model.Res // @Router /base/organization/UpdateEduAssistInfo [post] // @X-EmptyLimit ["orgId","orgCode","orgName"] // @X-IntRangeLimit [{"sortId":"1,9999"}] // @X-LengthLimit [{"orgId":"36,36"},{"areaCode":"6,6"},{"orgCode":"2,20"},{"orgName":"2,50"},{"fddbr":"2,30"},{"fddbrdh":"2,30"},{"address":"2,100"}] // @X-RoleLimit ["1","2","3","4"] // @X-InterfaceName ["UpdateBaseOrganization"] // @X-Sort [10] func UpdateEduAssistInfo(c *gin.Context) { //教育局ID orgId := c.PostForm("orgId") //教育局编码 orgCode := c.PostForm("orgCode") //教育局名称 orgName := c.PostForm("orgName") //教育局法定代表人 fddbr := c.PostForm("fddbr") //教育局法定代表人电话 fddbrdh := c.PostForm("fddbrdh") //教育局地址 address := c.PostForm("address") //联系电话 lxdh := c.PostForm("lxdh") //排序号 sortId := CommonUtil.ConvertStringToInt32(c.PostForm("sortId")) //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.UpdateEduAssistInfo(orgId, orgCode, orgName, fddbr, fddbrdh, address, lxdh, sortId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } // @Summary 删除教辅单位信息 // @Description 删除教辅单位信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgIds formData string true "教辅单位ID,如果是多个用逗号分隔" // @Success 200 {object} Model.Res // @Router /base/organization/DeleteEduAssistInfo [post] // @X-EmptyLimit ["orgIds"] // @X-LengthLimit [{"orgIds":"36,1800"}] // @X-RoleLimit ["1","2","3","4"] // @X-InterfaceName ["DeleteBaseOrganization"] // @X-Sort [11] func DeleteEduAssistInfo(c *gin.Context) { //教辅单位ID orgIds := c.PostForm("orgIds") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.DeleteEduAssistInfo(orgIds, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } //END↑↑↑↑↑↑↑↑↑↑教辅单位↑↑↑↑↑↑↑↑↑↑ //START↓↓↓↓↓↓↓↓↓↓学校↓↓↓↓↓↓↓↓↓↓ // @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 xxbxlxm query string true "学校办学类型 -1:全部" // @Param orgName query string false "学校名称" // @Success 200 {object} Model.Res // @Router /base/organization/PageSchoolInfo [get] // @X-EmptyLimit ["page","limit","areaCode"] // @X-LengthLimit [{"areaCode":"6,6"},{"orgName":"1,50"}] // @X-IntRangeLimit [{"page":"1,1000"},{"limit":"1,1000"}] // @X-RoleLimit ["1","2","3","4","7"] // @X-InterfaceName ["PageBaseOrganization"] // @X-TableName ["t_base_organization"] // @X-ExtendSwaggerField [{"column_name":"xxbxlxm_name","sample_data":"小学","column_comment":"学校办学类型名称"}] // @X-RemoveSwaggerField ["id_int","parent_id","bureau_id","org_type","edu_assist_type","main_school_id","manage_org_id","directly_under_type","xxbbm","szdcxlxm","xxjbzm","fzr","fddbr","fddbrdh","address","lxdh","org_lng","org_lat","sort_id","b_use","province_code","city_code","district_code","last_updated_time"] // @X-Sort [12] func PageSchoolInfo(c *gin.Context) { //第几页 page := CommonUtil.ConvertStringToInt32(c.Query("page")) //一页显示多少条 limit := CommonUtil.ConvertStringToInt32(c.Query("limit")) //行政区划编码 areaCode := c.Query("areaCode") //学校办学类型 -1:全部 xxbxlxm := c.Query("xxbxlxm") //学校名称 orgName := c.Query("orgName") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.PageSchoolInfo(page, limit, areaCode, xxbxlxm, orgName, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray(r.List), 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 "行政区划编码" // @Success 200 {object} Model.Res // @Router /base/organization/PageMainSchoolInfo [get] // @X-EmptyLimit ["page","limit","areaCode"] // @X-LengthLimit [{"areaCode":"6,6"}] // @X-IntRangeLimit [{"page":"1,1000"},{"limit":"1,1000"}] // @X-RoleLimit ["1","2","3","4","7"] // @X-InterfaceName ["PageBaseOrganization"] // @X-TableName ["t_base_organization"] // @X-ExtendSwaggerField [{"column_name":"xxbxlxm_name","sample_data":"小学","column_comment":"学校办学类型名称"}] // @X-RemoveSwaggerField ["id_int","parent_id","bureau_id","org_type","edu_assist_type","main_school_id","manage_org_id","directly_under_type","xxbbm","szdcxlxm","xxjbzm","fzr","fddbr","fddbrdh","address","lxdh","org_lng","org_lat","sort_id","b_use","province_code","city_code","district_code","last_updated_time"] // @X-Sort [12] func PageMainSchoolInfo(c *gin.Context) { //第几页 page := CommonUtil.ConvertStringToInt32(c.Query("page")) //一页显示多少条 limit := CommonUtil.ConvertStringToInt32(c.Query("limit")) //行政区划编码 areaCode := c.Query("areaCode") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.PageMainSchoolInfo(page, limit, areaCode, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray(r.List), Count: r.Count, }) } // @Summary 根据学校ID获取学校信息 // @Description 根据学校ID获取学校信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId query string true "学校ID" // @Success 200 {object} Model.Res // @Router /base/organization/GetSchoolInfoById [get] // @X-EmptyLimit ["orgId"] // @X-LengthLimit [{"orgId":"36,36"}] // @X-RoleLimit ["1","2","3","4","7"] // @X-InterfaceName ["GetBaseOrganization"] // @X-TableName ["t_base_organization"] // @X-RemoveSwaggerField ["id_int","parent_id","bureau_id","org_type","edu_assist_type","org_lng","org_lat","b_use","province_code","city_code","district_code","area_code","last_updated_time"] // @X-Sort [13] func GetSchoolInfoById(c *gin.Context) { //教育局ID orgId := c.Query("orgId") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.GetSchoolInfoById(orgId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray(r.List), Count: r.Count, }) } // @Summary 增加学校信息 // @Description 增加学校信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param areaCode formData string true "行政区划编码" // @Param orgCode formData string true "学校编码" // @Param orgName formData string true "学校名称" // @Param directlyUnderType formData int true "直属类型 1:普通 2:省直 3:市直" // @Param isBranchSchool formData int true "是否为分校 -1:非分校 1:是分校" // @Param mainSchoolId formData string false "主校ID(是分校时才传)" // @Param xxbbm formData string true "学校办别(字典:xxbbm)" // @Param xxbxlxm formData string true "学校办学类型(字典:xxbxlxm)" // @Param szdcxlxm formData string true "学校城乡类型(字典:szdcxlxm)" // @Param xxjbzm formData string true "学校举办者(字典:xxjbzm)" // @Param fddbr formData string false "学校法定代表人" // @Param fddbrdh formData string false "学校法定代表人电话" // @Param address formData string false "学校地址" // @Param lxdh formData string false "联系电话" // @Param sortId formData int false "排序号" // @Success 200 {object} Model.Res // @Router /base/organization/AddSchoolInfo [post] // @X-EmptyLimit ["areaCode","orgCode","orgName"] // @X-IntRangeLimit [{"sortId":"1,9999"}] // @X-LengthLimit [{"areaCode":"6,6"},{"orgCode":"2,20"},{"orgName":"2,50"},{"fddbr":"2,30"},{"fddbrdh":"2,30"},{"address":"2,100"}] // @X-RoleLimit ["1","2","3","4","7"] // @X-InterfaceName ["AddBaseOrganization"] // @X-Sort [14] func AddSchoolInfo(c *gin.Context) { //行政区划编码 areaCode := c.PostForm("areaCode") //学校编码 orgCode := c.PostForm("orgCode") //学校名称 orgName := c.PostForm("orgName") //直属类型 1:普通 2:省直 3:市直 directlyUnderType := CommonUtil.ConvertStringToInt32(c.PostForm("directlyUnderType")) //是否为分校 -1:非分校 1:是分校 isBranchSchool := CommonUtil.ConvertStringToInt32(c.PostForm("isBranchSchool")) //主校ID mainSchoolId := c.PostForm("mainSchoolId") //学校办别 xxbbm := c.PostForm("xxbbm") //学校办学类型 xxbxlxm := c.PostForm("xxbxlxm") //学校城乡类型 szdcxlxm := c.PostForm("szdcxlxm") //学校举办者 xxjbzm := c.PostForm("xxjbzm") //学校法定代表人 fddbr := c.PostForm("fddbr") //学校法定代表人电话 fddbrdh := c.PostForm("fddbrdh") //学校地址 address := c.PostForm("address") //联系电话 lxdh := c.PostForm("lxdh") //排序号 sortId := CommonUtil.ConvertStringToInt32(c.PostForm("sortId")) //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.AddSchoolInfo(areaCode, orgCode, orgName, directlyUnderType, isBranchSchool, mainSchoolId, xxbbm, xxbxlxm, szdcxlxm, xxjbzm, fddbr, fddbrdh, address, lxdh, sortId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!" + err.Error(), }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } // @Summary 修改学校信息 // @Description 修改学校信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId formData string true "学校ID" // @Param orgCode formData string true "学校编码" // @Param orgName formData string true "学校名称" // @Param directlyUnderType formData int true "直属类型 1:普通 2:省直 3:市直" // @Param isBranchSchool formData int true "是否为分校 -1:非分校 1:是分校" // @Param mainSchoolId formData string false "主校ID(是分校时才传)" // @Param xxbbm formData string true "学校办别(字典:xxbbm)" // @Param xxbxlxm formData string true "学校办学类型(字典:xxbxlxm)" // @Param szdcxlxm formData string true "学校城乡类型(字典:szdcxlxm)" // @Param xxjbzm formData string true "学校举办者(字典:xxjbzm)" // @Param fddbr formData string false "学校法定代表人" // @Param fddbrdh formData string false "学校法定代表人电话" // @Param address formData string false "学校地址" // @Param lxdh formData string false "联系电话" // @Param sortId formData int false "排序号" // @Success 200 {object} Model.Res // @Router /base/organization/UpdateSchoolInfo [post] // @X-EmptyLimit ["orgId","orgCode","orgName","directlyUnderType","isBranchSchool","xxbbm","xxbxlxm","szdcxlxm","xxjbzm"] // @X-IntRangeLimit [{"sortId":"1,9999"}] // @X-LengthLimit [{"orgId":"36,36"},{"areaCode":"6,6"},{"orgCode":"2,20"},{"orgName":"2,50"},{"fddbr":"2,30"},{"fddbrdh":"2,30"},{"address":"2,100"}] // @X-RoleLimit ["1","2","3","4","7"] // @X-InterfaceName ["UpdateBaseOrganization"] // @X-Sort [15] func UpdateSchoolInfo(c *gin.Context) { //学校ID orgId := c.PostForm("orgId") //学校编码 orgCode := c.PostForm("orgCode") //学校名称 orgName := c.PostForm("orgName") //直属类型 1:普通 2:省直 3:市直 directlyUnderType := CommonUtil.ConvertStringToInt32(c.PostForm("directlyUnderType")) //是否为分校 -1:非分校 1:是分校 isBranchSchool := CommonUtil.ConvertStringToInt32(c.PostForm("isBranchSchool")) //主校ID mainSchoolId := c.PostForm("mainSchoolId") //学校办别 xxbbm := c.PostForm("xxbbm") //学校办学类型 xxbxlxm := c.PostForm("xxbxlxm") //学校城乡类型 szdcxlxm := c.PostForm("szdcxlxm") //学校举办者 xxjbzm := c.PostForm("xxjbzm") //学校法定代表人 fddbr := c.PostForm("fddbr") //学校法定代表人电话 fddbrdh := c.PostForm("fddbrdh") //学校地址 address := c.PostForm("address") //联系电话 lxdh := c.PostForm("lxdh") //排序号 sortId := CommonUtil.ConvertStringToInt32(c.PostForm("sortId")) //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.UpdateSchoolInfo(orgId, orgCode, orgName, directlyUnderType, isBranchSchool, mainSchoolId, xxbbm, xxbxlxm, szdcxlxm, xxjbzm, fddbr, fddbrdh, address, lxdh, sortId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } // @Summary 删除学校信息 // @Description 删除学校信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgIds formData string true "学校ID,如果是多个用逗号分隔" // @Success 200 {object} Model.Res // @Router /base/organization/DeleteSchoolInfo [post] // @X-EmptyLimit ["orgIds"] // @X-LengthLimit [{"orgIds":"36,1800"}] // @X-RoleLimit ["1","2","3","4","7"] // @X-InterfaceName ["DeleteBaseOrganization"] // @X-Sort [16] func DeleteSchoolInfo(c *gin.Context) { //学校ID orgIds := c.PostForm("orgIds") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.DeleteSchoolInfo(orgIds, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } //END↑↑↑↑↑↑↑↑↑↑学校↑↑↑↑↑↑↑↑↑↑ //START↓↓↓↓↓↓↓↓↓↓部门↓↓↓↓↓↓↓↓↓↓ // @Summary 获取部门列表 // @Description 获取部门列表 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param page query int true "第几页" // @Param limit query int true "一页显示多少条" // @Param orgId query string true "单位ID" // @Success 200 {object} Model.Res // @Router /base/organization/PageOrgInfo [get] // @X-EmptyLimit ["page","limit","bureauId"] // @X-LengthLimit [{"orgId":"36,36"}] // @X-IntRangeLimit [{"page":"1,1000"},{"limit":"1,1000"}] // @X-RoleLimit ["1","2","3","4","5","6","7"] // @X-InterfaceName ["PageBaseOrganization"] // @X-TableName ["t_base_organization"] // @X-ExtendSwaggerField [{"column_name":"org_manager_name","sample_data":"李老师","column_comment":"部门领导"}] // @X-RemoveSwaggerField ["id_int","bureau_id","org_type","edu_assist_type","main_school_type","main_school_id","manage_org_id","directly_under_type","xxbbm","xxbxlxm","szdcxlxm","xxjbzm","fzr","fddbr","fddbrdh","address","lxdh","org_lng","org_lat","sort_id","b_use","province_code","city_code","district_code","area_code","last_updated_time"] // @X-Sort [17] func PageOrgInfo(c *gin.Context) { //第几页 page := CommonUtil.ConvertStringToInt32(c.Query("page")) //一页显示多少条 limit := CommonUtil.ConvertStringToInt32(c.Query("limit")) //单位ID bureauId := c.Query("orgId") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.PageOrgInfo(page, limit, bureauId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray(r.List), Count: r.Count, }) } // @Summary 获取部门信息 // @Description 获取部门信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId query string true "部门ID" // @Success 200 {object} Model.Res // @Router /base/organization/GetOrgInfo [get] // @X-EmptyLimit ["orgId"] // @X-LengthLimit [{"orgId":"36,36"}] // @X-RoleLimit ["1","2","3","4","5","6","7"] // @X-InterfaceName ["GetBaseOrganization"] // @X-TableName ["t_base_organization"] // @X-ExtendSwaggerField [{"column_name":"org_manager_id","sample_data":"00B15A6D-4EE1-481C-88F4-054A7BE9F60F","column_comment":"部门领导ID"},{"column_name":"org_manager_name","sample_data":"李老师","column_comment":"部门领导名称"}] // @X-RemoveSwaggerField ["id_int","bureau_id","org_type","edu_assist_type","main_school_type","main_school_id","manage_org_id","directly_under_type","xxbbm","xxbxlxm","szdcxlxm","xxjbzm","fzr","fddbr","fddbrdh","address","lxdh","org_lng","org_lat","b_use","province_code","city_code","district_code","area_code","last_updated_time"] // @X-Sort [18] func GetOrgInfo(c *gin.Context) { //部门ID orgId := c.Query("orgId") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.GetOrgInfo(orgId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray(r.List), Count: r.Count, }) } // @Summary 增加部门信息 // @Description 增加部门信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId formData string true "单位ID" // @Param orgCode formData string true "部门编码" // @Param orgName formData string true "部门名称" // @Param parentId formData string true "上级部门ID" // @Param sortId formData int false "排序号" // @Param orgManagerIds formData string false "部门领导的人员ID" // @Success 200 {object} Model.Res // @Router /base/organization/AddOrgInfo [post] // @X-EmptyLimit ["orgId","orgCode","orgName"] // @X-IntRangeLimit [{"sortId":"1,9999"}] // @X-LengthLimit [{"orgId":"36,36"},{"orgCode":"2,20"},{"orgName":"2,50"},{"parentId":"36,36"},{"orgManagerIds":"36,1800"}] // @X-RoleLimit ["1","2","3","4","5","6","7"] // @X-InterfaceName ["AddBaseOrganization"] // @X-Sort [19] func AddOrgInfo(c *gin.Context) { //单位ID bureauId := c.PostForm("orgId") //部门编码 orgCode := c.PostForm("orgCode") //部门名称 orgName := c.PostForm("orgName") //上级部门ID parentId := c.PostForm("parentId") //排序号 sortId := CommonUtil.ConvertStringToInt32(c.PostForm("sortId")) //部门领导的人员ID orgManagerIds := c.PostForm("orgManagerIds") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.AddOrgInfo(bureauId, orgCode, orgName, parentId, sortId, orgManagerIds, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!" + err.Error(), }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } // @Summary 修改部门信息 // @Description 修改部门信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId formData string true "部门ID" // @Param orgCode formData string true "部门编码" // @Param orgName formData string true "部门名称" // @Param sortId formData int false "排序号" // @Param orgManagerIds formData string false "部门领导的人员ID" // @Success 200 {object} Model.Res // @Router /base/organization/UpdateOrgInfo [post] // @X-EmptyLimit ["orgId","orgCode","orgName"] // @X-IntRangeLimit [{"sortId":"1,9999"}] // @X-LengthLimit [{"orgId":"36,36"},{"orgCode":"2,20"},{"orgName":"2,50"},{"orgManagerIds":"36,1800"}] // @X-RoleLimit ["1","2","3","4","5","6","7"] // @X-InterfaceName ["UpdateBaseOrganization"] // @X-Sort [20] func UpdateOrgInfo(c *gin.Context) { //部门ID orgId := c.PostForm("orgId") //部门编码 orgCode := c.PostForm("orgCode") //部门名称 orgName := c.PostForm("orgName") //排序号 sortId := CommonUtil.ConvertStringToInt32(c.PostForm("sortId")) //部门领导的人员ID orgManagerIds := c.PostForm("orgManagerIds") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.UpdateOrgInfo(orgId, orgCode, orgName, sortId, orgManagerIds, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } // @Summary 删除部门信息 // @Description 删除部门信息 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId formData string true "部门ID" // @Success 200 {object} Model.Res // @Router /base/organization/DeleteOrgInfo [post] // @X-EmptyLimit ["orgId"] // @X-LengthLimit [{"orgId":"36,36"}] // @X-RoleLimit ["1","2","3","4","5","6","7"] // @X-InterfaceName ["DeleteBaseOrganization"] // @X-Sort [21] func DeleteOrgInfo(c *gin.Context) { //部门ID orgId := c.PostForm("orgId") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.DeleteOrgInfo(orgId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, }) } // @Summary 根据单位ID获取部门树 // @Description 根据单位ID获取部门树 // @Tags 组织机构 // @Accept application/x-www-form-urlencoded // @Produce json // @Param orgId query string true "单位ID" // @Success 200 {object} Model.Res // @Router /base/organization/GetOrgTreeInfo [get] // @X-EmptyLimit ["orgId"] // @X-LengthLimit [{"orgId":"36,36"}] // @X-RoleLimit ["1","2","3","4","5","6","7"] // @X-RemoveSwaggerField ["id_int","bureau_id","org_type","edu_assist_type","main_school_type","main_school_id","manage_org_id","directly_under_type","xxbbm","xxbxlxm","szdcxlxm","xxjbzm","fzr","fddbr","fddbrdh","address","lxdh","org_lng","org_lat","b_use","province_code","city_code","district_code","area_code","last_updated_time"] // @X-Sort [22] func GetOrgTreeInfo(c *gin.Context) { //单位ID bureauId := c.Query("orgId") //操作人 actionPersonId, err := c.Cookie("person_id") if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "未获取到Cookie中的人员编码!", }) return } //操作IP actionIpAddress := c.ClientIP() r, err := BaseOrganizationService.GetOrgTreeInfo(bureauId, actionPersonId, actionIpAddress) if err != nil { c.JSON(http.StatusOK, Model.Res{ Success: false, Message: "调用RPC服务失败!", }) return } c.JSON(http.StatusOK, Model.Res{ Success: r.Success, Message: r.Message, List: CommonUtil.ConvertJsonStringToMapArray("[" + r.List + "]"), Count: r.Count, }) } //END↑↑↑↑↑↑↑↑↑↑部门↑↑↑↑↑↑↑↑↑↑