WangHan
2025-04-02 a8ba678a3fe5a39da2c732014cebbb66e408e97c
consum-base/src/main/java/com/consum/base/controller/FinSysTenantController.java
@@ -12,6 +12,7 @@
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;
@@ -49,17 +50,12 @@
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 {
@@ -102,9 +98,9 @@
        // 获取当前用户信息
        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);
        // 树列表
@@ -113,7 +109,7 @@
            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();
@@ -635,9 +631,7 @@
        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();