xiangpei
2025-02-24 e9719f559ccaa5ab0689df9331f4d016c0b8c9e6
项目直接使用项目阶段
8个文件已修改
333 ■■■■■ 已修改文件
business/src/main/java/com/ycl/domain/entity/ProjectInfo.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/mapper/ProjectInfoMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java 280 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/resources/mapper/ProjectInfoMapper.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/pom.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
start/src/main/java/com/ycl/Application.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
start/src/main/resources/application.yml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
system/src/main/resources/mapper/system/SysDeptMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
business/src/main/java/com/ycl/domain/entity/ProjectInfo.java
@@ -62,9 +62,9 @@
    /** 投资类别(0企业投资,1政府投资,2外商投资,3境外投资) */
    private String investType;
//    @TableField("project_phase")
//    /** 项目阶段(0储备规划阶段,  1项目前期阶段,  2实施阶段,  3竣工投用阶段) */
//    private String projectPhase;
    @TableField("project_phase")
    /** 项目阶段(0储备规划阶段,  1项目前期阶段,  2实施阶段,  3竣工投用阶段) */
    private String projectPhase;
    @TableField("tag")
    /** 标签 */
business/src/main/java/com/ycl/mapper/ProjectInfoMapper.java
@@ -35,7 +35,7 @@
    *  分页
    */
    @DataScope(deptAlias = "d")
    @InterceptorIgnore(tenantLine = "true")
//    @InterceptorIgnore(tenantLine = "true")
    IPage getPage(@Param("query") ProjectInfoQuery query, IPage page);
    @DataScope(deptAlias = "d")
business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
@@ -10,6 +10,7 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ycl.common.base.Result;
import com.ycl.common.config.SysConfig;
@@ -108,8 +109,6 @@
        //添加基本信息
        ProjectInfo entity = ProjectInfoForm.getEntityByForm(form, null);
        Long userId = SecurityUtils.getUserId();
//        Long deptId = SecurityUtils.getDeptId();
//        entity.setProjectOwnerUnit(deptId);
        entity.setCreateBy(userId);
        entity.setUpdateBy(userId);
        //如果是储备项目(未开工项目)不需要审核
@@ -121,18 +120,28 @@
        }
        baseMapper.insert(entity);
        addPlan(entity.getId()); //添加计划表
        //添加文件
        List<File> fileList = form.getFileList();
        fileList.forEach(item -> {
            item.setBusId(entity.getId());
            item.setType(FileTypeEnum.PROJECT_INFO);
        });
        fileService.saveBatch(fileList);
        //添加项目中标单位
        saveUnit(entity.getId(), form.getWinUnitList());
        List<ProjectInfoWinUnit> projectInfoWinUnits = new ArrayList<>();
        for (ProjectInfoWinUnitForm winUnitForm : form.getWinUnitList()) {
            ProjectInfoWinUnit projectInfoWinUnit = ProjectInfoWinUnitForm.getEntityByForm(winUnitForm, null);
            projectInfoWinUnit.setId(null);
            projectInfoWinUnit.setProjectInfoId(entity.getId());
            projectInfoWinUnits.add(projectInfoWinUnit);
        }
        if (!CollectionUtils.isEmpty(projectInfoWinUnits)) {
            projectInfoWinUnitService.saveBatch(projectInfoWinUnits);
        }
        //添加年度投资计划
        saveYearPlan(entity.getId(), form.getYearPlanList());
        List<ProjectInfoYearPlan> projectInfoYearPlans = new ArrayList<>();
        for (ProjectInfoYearPlanForm yearPlanForm : form.getYearPlanList()) {
            ProjectInfoYearPlan yearPlan = ProjectInfoYearPlanForm.getEntityByForm(yearPlanForm, null);
            yearPlan.setId(null);
            yearPlan.setProjectInfoId(entity.getId());
            projectInfoYearPlans.add(yearPlan);
        }
        if (!CollectionUtils.isEmpty(projectInfoYearPlans)) {
            projectInfoYearPlanService.saveBatch(projectInfoYearPlans);
        }
        return Result.ok("添加成功").data(entity.getId());
    }
@@ -202,35 +211,39 @@
        }
        //更新项目信息
        baseMapper.updateById(entity);
        List<File> fileList = form.getFileList();
        fileList.forEach(item -> {
            item.setId(null);
            item.setBusId(entity.getId());
            item.setType(FileTypeEnum.PROJECT_INFO);
        });
        //删除原有文件
        QueryWrapper<File> fileQueryWrapper = new QueryWrapper<>();
        fileQueryWrapper.eq("type", FileTypeEnum.PROJECT_INFO.getType());
        fileQueryWrapper.eq("bus_id", entity.getId());
        fileMapper.delete(fileQueryWrapper);
        //替换成现有
        fileService.saveBatch(fileList);
        //修改项目中标单位
        //删除原数据
        QueryWrapper<ProjectInfoWinUnit> unitWrapper = new QueryWrapper<>();
        unitWrapper.eq("project_info_id", form.getId());
        projectInfoWinUnitService.remove(unitWrapper);
        new LambdaUpdateChainWrapper<>(projectInfoWinUnitService.getBaseMapper())
                .eq(ProjectInfoWinUnit::getProjectInfoId, entity.getId())
                .remove();
        //添加项目中标单位
        saveUnit(entity.getId(), form.getWinUnitList());
        List<ProjectInfoWinUnit> projectInfoWinUnits = new ArrayList<>();
        for (ProjectInfoWinUnitForm winUnitForm : form.getWinUnitList()) {
            ProjectInfoWinUnit projectInfoWinUnit = ProjectInfoWinUnitForm.getEntityByForm(winUnitForm, null);
            projectInfoWinUnit.setId(null);
            projectInfoWinUnit.setProjectInfoId(entity.getId());
            projectInfoWinUnits.add(projectInfoWinUnit);
        }
        if (!CollectionUtils.isEmpty(projectInfoWinUnits)) {
            projectInfoWinUnitService.saveBatch(projectInfoWinUnits);
        }
        //修改年度投资计划
        //删除原数据
        QueryWrapper<ProjectInfoYearPlan> yearPlanWrapper = new QueryWrapper<>();
        unitWrapper.eq("project_info_id", form.getId());
        projectInfoYearPlanService.remove(yearPlanWrapper);
        new LambdaUpdateChainWrapper<>(projectInfoYearPlanService.getBaseMapper())
                .eq(ProjectInfoYearPlan::getProjectInfoId, entity.getId())
                .remove();
        //添加年度投资计划
        saveYearPlan(entity.getId(), form.getYearPlanList());
        List<ProjectInfoYearPlan> projectInfoYearPlans = new ArrayList<>();
        for (ProjectInfoYearPlanForm yearPlanForm : form.getYearPlanList()) {
            ProjectInfoYearPlan yearPlan = ProjectInfoYearPlanForm.getEntityByForm(yearPlanForm, null);
            yearPlan.setId(null);
            yearPlan.setProjectInfoId(entity.getId());
            projectInfoYearPlans.add(yearPlan);
        }
        if (!CollectionUtils.isEmpty(projectInfoYearPlans)) {
            projectInfoYearPlanService.saveBatch(projectInfoYearPlans);
        }
        return Result.ok("修改成功");
    }
@@ -311,25 +324,10 @@
        if (query.getProjectEndTime() != null) {
            query.setProjectEndTime(DateUtils.getDayEnd(query.getProjectEndTime()));
        }
        String projectCategory = query.getProjectCategory();
        //实施阶段有两个值放在sql处理
        if (ProjectCategoryEnum.RESERVE.getType().equals(projectCategory)) {
            query.setProjectStatus(ProjectCategoryEnum.RESERVE.getStatus());
            query.setReserveOrPrevious(ProjectCategoryEnum.RESERVE.getCode());
        } else if (ProjectCategoryEnum.PREVIOUS.getType().equals(projectCategory)) {
            query.setProjectStatus(ProjectCategoryEnum.PREVIOUS.getStatus());
            query.setReserveOrPrevious(ProjectCategoryEnum.PREVIOUS.getCode());
        } else if (ProjectCategoryEnum.FINISH.getType().equals(projectCategory)) {
            query.setProjectStatus(ProjectCategoryEnum.FINISH.getStatus());
        } else if (ProjectCategoryEnum.EXCEPTION.getType().equals(projectCategory)) {
            //TODO
            //先查出异常流程或者异常进度或者异常计划的projectId和异常种类
            //通过projectId查出项目数据
            //补充相应的异常数据(异常种类、异常流程节点等)
            List<ProjectVO> list = new ArrayList<>();
            return Result.ok().data(list).total(0);
        // 异常项目暂时返回空
        if (ProjectCategoryEnum.EXCEPTION.getType().equals(query.getProjectPhase())) {
            return Result.ok().data(new ArrayList<>()).total(0);
        }
        Long userId = SecurityUtils.getUserId();
        String ancestors = sysDeptMapper.selectAncestors(userId);
        String[] ancestorArr = ancestors.split(",");
@@ -339,10 +337,12 @@
            query.setProjectOwnerUnit(SecurityUtils.getDeptId());
            //业主
            query.setRole(0);
        } else if (!CollectionUtils.isEmpty(ancestorList) && ancestorList.contains("102")) {
        } else if ((!CollectionUtils.isEmpty(ancestorList) && ancestorList.contains("102"))) {
            query.setCompetentDepartment(SecurityUtils.getDeptId());
            //审批 对应主管部门
            query.setRole(1);
        } else if (SecurityUtils.isAdmin(userId)) {
            query.setRole(3);
        }
        IPage<ProjectInfoVO> page = PageUtil.getPage(query, ProjectInfoVO.class);
@@ -399,9 +399,6 @@
        QueryWrapper<File> fileQueryWrapper = new QueryWrapper<>();
        fileQueryWrapper.eq("type", FileTypeEnum.PROJECT_INFO.getType());
        fileQueryWrapper.eq("bus_id", vo.getId());
        List<File> files = fileMapper.selectList(fileQueryWrapper);
        vo.setFileList(files);
        //中标单位
        List<ProjectInfoWinUnitVO> unitVOS = new ArrayList<>();
@@ -815,53 +812,136 @@
        if (ObjectUtil.isNotNull(form.getProjectInfoForm())) {
            if (ObjectUtil.isNull(form.getProjectInfoForm().getId())) {
                //新增
                projectId = (Long) ((ProjectInfoServiceImpl) AopContext.currentProxy()).add(form.getProjectInfoForm()).get("data");
                ProjectInfo entity = ProjectInfoForm.getEntityByForm(form.getProjectInfoForm(), null);
                Long userId = SecurityUtils.getUserId();
                entity.setCreateBy(userId);
                entity.setUpdateBy(userId);
                //如果是储备项目(未开工项目)不需要审核
                if (ProjectConstant.COMMIT.equals(entity.getUsedStatus()) && ProjectStatusEnum.PENDDING.getType().equals(entity.getProjectStatus())) {
                    entity.setUsedStatus(ProjectConstant.PASS);
                }
                // 管理员修改的直接通过
                if (SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
                    entity.setUsedStatus(ProjectConstant.PASS);
                }
                if(!checkProjectNameAndIdIsUnique(entity,null)){
                    throw new RuntimeException("项目重复,项目名称、项目码已存在");
                }
                baseMapper.insert(entity);
                addPlan(entity.getId()); //添加计划表
                //添加项目中标单位
                List<ProjectInfoWinUnit> projectInfoWinUnits = new ArrayList<>();
                for (ProjectInfoWinUnitForm winUnitForm : form.getProjectInfoForm().getWinUnitList()) {
                    ProjectInfoWinUnit projectInfoWinUnit = ProjectInfoWinUnitForm.getEntityByForm(winUnitForm, null);
                    projectInfoWinUnit.setId(null);
                    projectInfoWinUnit.setProjectInfoId(entity.getId());
                    projectInfoWinUnits.add(projectInfoWinUnit);
                }
                if (!CollectionUtils.isEmpty(projectInfoWinUnits)) {
                    projectInfoWinUnitService.saveBatch(projectInfoWinUnits);
                }
                //添加年度投资计划
                List<ProjectInfoYearPlan> projectInfoYearPlans = new ArrayList<>();
                for (ProjectInfoYearPlanForm yearPlanForm : form.getProjectInfoForm().getYearPlanList()) {
                    ProjectInfoYearPlan yearPlan = ProjectInfoYearPlanForm.getEntityByForm(yearPlanForm, null);
                    yearPlan.setId(null);
                    yearPlan.setProjectInfoId(entity.getId());
                    projectInfoYearPlans.add(yearPlan);
                }
                if (!CollectionUtils.isEmpty(projectInfoYearPlans)) {
                    projectInfoYearPlanService.saveBatch(projectInfoYearPlans);
                }
                // 新增
                if (Objects.nonNull(form.getProjectInvestmentInfoForm())) {
                    form.getProjectInvestmentInfoForm().setProjectId(projectId);
                    projectInvestmentInfoServiceImpl.add(form.getProjectInvestmentInfoForm());
                }
                if (Objects.nonNull(form.getProjectInvestmentFundingForm())) {
                    form.getProjectInvestmentFundingForm().setProjectId(projectId);
                    projectInvestmentFundingServiceImpl.add(form.getProjectInvestmentFundingForm());
                }
                if (Objects.nonNull(form.getProjectInvestmentPolicyComplianceForm())) {
                    form.getProjectInvestmentPolicyComplianceForm().setProjectId(projectId);
                    projectInvestmentPolicyComplianceServiceImpl.add(form.getProjectInvestmentPolicyComplianceForm());
                }
                if (Objects.nonNull(form.getProjectUnitRegistrationInfoForm())) {
                    form.getProjectUnitRegistrationInfoForm().setProjectId(projectId);
                    projectUnitRegistrationInfoServiceImpl.add(form.getProjectUnitRegistrationInfoForm());
                }
            } else {
                //更新
                ((ProjectInfoServiceImpl) AopContext.currentProxy()).update(form.getProjectInfoForm());
            }
        }
        if (ObjectUtil.isNotNull(form.getProjectInvestmentInfoForm())) {
            if (ObjectUtil.isNull(form.getProjectInvestmentInfoForm().getId())) {
                form.getProjectInvestmentInfoForm().setProjectId(projectId);
                projectInvestmentInfoServiceImpl.add(form.getProjectInvestmentInfoForm());
            } else {
                projectInvestmentInfoServiceImpl.update(form.getProjectInvestmentInfoForm());
            }
        }
        if (ObjectUtil.isNotNull(form.getProjectInvestmentFundingForm())) {
            if (ObjectUtil.isNull(form.getProjectInvestmentFundingForm().getId())) {
                form.getProjectInvestmentFundingForm().setProjectId(projectId);
                projectInvestmentFundingServiceImpl.add(form.getProjectInvestmentFundingForm());
            } else {
                projectInvestmentFundingServiceImpl.update(form.getProjectInvestmentFundingForm());
            }
        }
        if (ObjectUtil.isNotNull(form.getProjectInvestmentPolicyComplianceForm())) {
            if (ObjectUtil.isNull(form.getProjectInvestmentPolicyComplianceForm().getId())) {
                form.getProjectInvestmentPolicyComplianceForm().setProjectId(projectId);
                projectInvestmentPolicyComplianceServiceImpl.add(form.getProjectInvestmentPolicyComplianceForm());
            } else {
                projectInvestmentPolicyComplianceServiceImpl.update(form.getProjectInvestmentPolicyComplianceForm());
            }
        }
        if (ObjectUtil.isNotNull(form.getProjectUnitRegistrationInfoForm())) {
            if (ObjectUtil.isNull(form.getProjectUnitRegistrationInfoForm().getId())) {
                form.getProjectUnitRegistrationInfoForm().setProjectId(projectId);
                projectUnitRegistrationInfoServiceImpl.add(form.getProjectUnitRegistrationInfoForm());
            } else {
                projectUnitRegistrationInfoServiceImpl.update(form.getProjectUnitRegistrationInfoForm());
            }
        }
        if (ObjectUtil.isNotNull(form.getDocumentInfoForm())) {
            if (ObjectUtil.isNull(form.getDocumentInfoForm().getProjectId())) {
                return Result.error("请先保存投资管理基本信息");
            } else {
                addDoc(form.getDocumentInfoForm());
            }
        }
                ProjectInfo entity = baseMapper.selectById(form.getProjectInfoForm().getId());
        return Result.ok("提交成功");
                // 为空抛IllegalArgumentException,做全局异常处理
                Assert.notNull(entity, "记录不存在");
                ProjectInfoForm.getEntityByForm(form.getProjectInfoForm(), entity);
                Long userId = SecurityUtils.getUserId();
                entity.setUpdateBy(userId);
                //如果是储备项目(未开工项目)不需要审核
                if (ProjectConstant.COMMIT.equals(entity.getUsedStatus()) && ProjectStatusEnum.PENDDING.getType().equals(entity.getProjectStatus())) {
                    entity.setUsedStatus(ProjectConstant.PASS);
                }
                // 管理员修改的直接通过
                if (SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
                    entity.setUsedStatus(ProjectConstant.PASS);
                }
                if(!checkProjectNameAndIdIsUnique(entity, entity.getId())){
                    throw new RuntimeException("项目重复,项目名称、项目码已存在");
                }
                //更新项目信息
                baseMapper.updateById(entity);
                //修改项目中标单位
                //删除原数据
                new LambdaUpdateChainWrapper<>(projectInfoWinUnitService.getBaseMapper())
                        .eq(ProjectInfoWinUnit::getProjectInfoId, entity.getId())
                        .remove();
                //添加项目中标单位
                List<ProjectInfoWinUnit> projectInfoWinUnits = new ArrayList<>();
                for (ProjectInfoWinUnitForm winUnitForm : form.getProjectInfoForm().getWinUnitList()) {
                    ProjectInfoWinUnit projectInfoWinUnit = ProjectInfoWinUnitForm.getEntityByForm(winUnitForm, null);
                    projectInfoWinUnit.setId(null);
                    projectInfoWinUnit.setProjectInfoId(entity.getId());
                    projectInfoWinUnits.add(projectInfoWinUnit);
                }
                if (!CollectionUtils.isEmpty(projectInfoWinUnits)) {
                    projectInfoWinUnitService.saveBatch(projectInfoWinUnits);
                }
                //修改年度投资计划
                //删除原数据
                new LambdaUpdateChainWrapper<>(projectInfoYearPlanService.getBaseMapper())
                        .eq(ProjectInfoYearPlan::getProjectInfoId, entity.getId())
                        .remove();
                //添加年度投资计划
                List<ProjectInfoYearPlan> projectInfoYearPlans = new ArrayList<>();
                for (ProjectInfoYearPlanForm yearPlanForm : form.getProjectInfoForm().getYearPlanList()) {
                    ProjectInfoYearPlan yearPlan = ProjectInfoYearPlanForm.getEntityByForm(yearPlanForm, null);
                    yearPlan.setId(null);
                    yearPlan.setProjectInfoId(entity.getId());
                    projectInfoYearPlans.add(yearPlan);
                }
                if (!CollectionUtils.isEmpty(projectInfoYearPlans)) {
                    projectInfoYearPlanService.saveBatch(projectInfoYearPlans);
                }
                // 更新
                if (Objects.nonNull(form.getProjectInvestmentInfoForm())) {
                    projectInvestmentInfoServiceImpl.update(form.getProjectInvestmentInfoForm());
                }
                if (Objects.nonNull(form.getProjectInvestmentFundingForm())) {
                    projectInvestmentFundingServiceImpl.update();
                }
                if (Objects.nonNull(form.getProjectInvestmentPolicyComplianceForm())) {
                    projectInvestmentPolicyComplianceServiceImpl.update(form.getProjectInvestmentPolicyComplianceForm());
                }
                if (Objects.nonNull(form.getProjectUnitRegistrationInfoForm())) {
                    projectUnitRegistrationInfoServiceImpl.update(form.getProjectUnitRegistrationInfoForm());
                }
            }
        }
        return Result.ok("保存成功");
    }
    @Override
business/src/main/resources/mapper/ProjectInfoMapper.xml
@@ -132,17 +132,14 @@
            <if test="query.projectStatus !=null and query.projectStatus!=''">
                and TPI.project_status = #{query.projectStatus}
            </if>
            <if test="query.projectPhase !=null and query.projectPhase!=''">
            <if test="query.projectPhase !=null and query.projectPhase!='' and query.projectPhase!='6' and query.projectPhase!='5'">
                and TPI.project_phase = #{query.projectPhase}
            </if>
<!--            <if test=" assignmentStatus !=null and assignmentStatus!=''">-->
<!--                and TPI.project_phase = #{projectPhase}-->
<!--            </if>-->
            <if test="query.projectPhase != '6' and query.projectPhase!='5'">
                and TPI.used_status = 2
            </if>
            <if test="query.fundType !=null and query.fundType!=''">
                and TPI.fund_type = #{query.fundType}
            </if>
            <if test="query.projectPhase !=null and query.projectPhase!=''">
                and TPI.project_phase = #{query.projectPhase}
            </if>
            <if test="query.investType !=null and query.investType!=''">
                and TPI.invest_type = #{query.investType}
@@ -159,22 +156,16 @@
            <if test="query.reserveOrPrevious != null and query.reserveOrPrevious == 'previous'">
                and TPP.process_ins_id is not null
            </if>
            <if test="query.projectCategory != 6">
                and TPI.used_status = 2
            </if>
            <if test="query.projectCategory == 3">
            <if test="query.projectPhase == '3'">
                and (TPI.project_status = 'working' or TPI.project_status = 'stop')
            </if>
            <if test="query.projectCategory == 6">
<!--                <if test="query.role == 0">-->
<!--                    and TPI.used_status != 2-->
<!--                </if>-->
                <if test="query.role == 1">
            <if test="query.projectPhase == '6'">
                <if test="query.role != null and query.role == 1">
                    and TPI.used_status = 1 and  FIND_IN_SET(#{query.competentDepartment}, TPI.competent_department) > 0
                </if>
            </if>
            <!-- 业主数据权限 -->
            <if test="query.role == 0">
            <if test="query.role != null and query.role == 0">
                ${query.params.dataScope}
            </if>
        </where>
common/pom.xml
@@ -20,7 +20,20 @@
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>mybatis-plus-boot-starter</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>jsqlparser</artifactId>
                    <groupId>com.github.jsqlparser</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.github.jsqlparser</groupId>
            <artifactId>jsqlparser</artifactId>
            <version>4.2</version>
        </dependency>
        <!-- lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
start/src/main/java/com/ycl/Application.java
@@ -12,7 +12,7 @@
 * @author ycl
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class},proxyBeanMethods = false)
@EnableAspectJAutoProxy(exposeProxy = true)
//@EnableAspectJAutoProxy(exposeProxy = true)
public class Application
{
    public static void main(String[] args)
start/src/main/resources/application.yml
@@ -7,7 +7,7 @@
  configuration:
    shrink-whitespaces-in-sql: true #从SQL中删除多余的空格字符
    default-enum-type-handler: com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler # 通用枚举处理器
  #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 日志打印
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 日志打印
  global-config:
    db-config:
      id-type: auto
@@ -41,6 +41,7 @@
logging:
  level:
    com.ruoyi: debug
    com.ycl: debug
    org.springframework: warn
    org.flowable.engine.impl.persistence.entity.*: debug
    org.flowable.task.service.impl.persistence.entity.*: debug
system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -94,7 +94,7 @@
        where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
    </select>
    <select id="selectAncestors" resultType="java.lang.String">
        select ancestors
        select SD.ancestors
        from sys_user SU
        INNER JOIN sys_dept SD ON SU.dept_id = SD.dept_id
        where SU.user_id = #{userId}