heheng
6 天以前 ab795dcf9b4783682fbb85c37d5c20b2b9006a86
multi-system/src/main/java/com/gkhy/exam/system/service/impl/SysDeptServiceImpl.java
@@ -6,16 +6,20 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.gkhy.exam.common.api.CommonPage;
import com.gkhy.exam.common.constant.UserConstant;
import com.gkhy.exam.common.domain.TreeSelect;
import com.gkhy.exam.common.domain.entity.SysDept;
import com.gkhy.exam.common.domain.entity.SysRole;
import com.gkhy.exam.common.exception.ApiException;
import com.gkhy.exam.common.utils.NaturalOrderComparator;
import com.gkhy.exam.common.utils.PageUtils;
import com.gkhy.exam.common.utils.SecurityUtils;
import com.gkhy.exam.common.utils.SpringUtils;
import com.gkhy.exam.system.domain.SysDeptManage;
import com.gkhy.exam.system.domain.SysDeptResponsibility;
import com.gkhy.exam.system.domain.SysFunctionalDistribution;
import com.gkhy.exam.system.domain.req.SysDeptPageReq;
import com.gkhy.exam.system.domain.vo.*;
import com.gkhy.exam.system.mapper.SysDeptMapper;
import com.gkhy.exam.system.mapper.SysDeptResponsibilityMapper;
@@ -55,6 +59,28 @@
            "7.1.1",  "7.1.2", "7.1.3", "7.1.4", "7.1.5", "7.1.6","7.2", "7.3", "7.4", "7.5", "7.6","8.1","8.2","8.2.1","8.2.2", "8.2.3", "8.2.4", "8.3", "8.3.1", "8.3.2", "8.3.3", "8.3.4", "8.3.5", "8.3.6", "8.3.7", "8.3.8", "8.4",
    "8.4.1", "8.4.2", "8.4.3", "8.5", "8.5.1", "8.5.2", "8.5.3", "8.5.4", "8.5.5", "8.5.6", "8.5.7", "8.6","8.7","9.1","9.1.1","9.1.2","9.1.3","9.2", "9.3","10.1"
            ,"10.2", "10.3"};
    @Override
    public CommonPage selectDeptPageList(SysDeptPageReq req) {
        PageUtils.startPage();
        List<DeptVo> deptVos = deptMapper.selectDeptPageList(req);
        if (ObjectUtil.isNotEmpty(deptVos)){
            for (DeptVo deptVo : deptVos) {
                List<CaluseVO1> caluseVO1List = deptVo.getCaluseVO1List();
                if (ObjectUtil.isNotEmpty(caluseVO1List)){
                    caluseVO1List.sort(Comparator.comparing(CaluseVO1::getClauseNum, new NaturalOrderComparator()));
                }
            }
        }
        CommonPage<DeptVo> deptVoCommonPage = CommonPage.restPage(deptVos);
        return deptVoCommonPage;
    }
    /**
     * 查询部门管理数据
     * 
@@ -68,7 +94,17 @@
        if (dept.getCompanyId() == null){
            dept.setCompanyId(SecurityUtils.getCompanyId());
        }
        return deptMapper.selectDeptList(dept);
        List<DeptVo> deptVos = deptMapper.selectDeptList(dept);
        if (ObjectUtil.isNotEmpty(deptVos)){
            for (DeptVo deptVo : deptVos) {
                List<CaluseVO1> caluseVO1List = deptVo.getCaluseVO1List();
                if (ObjectUtil.isNotEmpty(caluseVO1List)){
                    caluseVO1List.sort(Comparator.comparing(CaluseVO1::getClauseNum, new NaturalOrderComparator()));
                }
            }
        }
        return deptVos;
    }
    @Override
@@ -204,6 +240,9 @@
                .eq(SysDeptResponsibility::getDelFlag, UserConstant.ENABLE)
                .orderByAsc(SysDeptResponsibility::getClauseNum);
        List<SysDeptResponsibility> sysDeptResponsibilities = deptResponsibilityMapper.selectList(lambdaQueryWrapper);
        if (ObjectUtil.isNotEmpty(sysDeptResponsibilities)){
            sysDeptResponsibilities.sort(Comparator.comparing(SysDeptResponsibility::getClauseNum, new NaturalOrderComparator()));
        }
        deptDetialVo.setSysDeptResponsibilitys(sysDeptResponsibilities);
        return deptDetialVo ;