| | |
| | | import java.util.Objects; |
| | | import java.util.TreeMap; |
| | | |
| | | import cn.hutool.core.convert.Convert; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.core.io.ClassPathResource; |
| | |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.web.ResponseValue; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | |
| | | /** |
| | | * @Description 机构 |
| | | * @Author wh |
| | | * @Date 2023/7/13 19:51 |
| | | */ |
| | | @Api(value = "机构管理", tags = "机构管理") |
| | | // @Api(value = "机构管理", tags = "机构管理") |
| | | @RestController |
| | | @RequestMapping("/pc/fin/sys/tenant") |
| | | public class FinSysTenantController extends BaseController { |
| | |
| | | // 获取当前用户信息 |
| | | String tenantId = user.getTenantId(); |
| | | FinSysTenant finSysTenant = new FinSysTenant(); |
| | | finSysTenant.setId(new Long(tenantId)); |
| | | finSysTenant.setId(Convert.toLong(tenantId)); |
| | | // 主键是TempId |
| | | finSysTenant.setTempId(new Long(tenantId)); |
| | | finSysTenant.setTempId(Convert.toLong(tenantId)); |
| | | // 查询当前用户的机构 |
| | | FinSysTenant userTenant = finSysTenantService.get(finSysTenant); |
| | | // 树列表 |
| | |
| | | if (userTenant.getLv() != 1 && userTenant.getParentId() != 0) { |
| | | rootMap.clear(); |
| | | this.childMap.clear(); |
| | | this.defaultParentId = new Long(user.getTenantId()); |
| | | this.defaultParentId = Convert.toLong(user.getTenantId()); |
| | | // 根据父级获取子集 |
| | | setEntityList(finSysTenantList); |
| | | treeRootList = getTreeRootList(); |
| | |
| | | return ResponseValue.success(finSysTenantUserResults); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取父级机构", notes = "获取父级机构") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "token", dataType = "String", paramType = "header"),}) |
| | | // @ApiOperation(value = "获取父级机构", notes = "获取父级机构") |
| | | @GetMapping("/get/parent/tenant") |
| | | public ResponseValue getParentTenant() { |
| | | FinSysTenantUser sysInfo = getSysInfo(); |