heheng
2026-02-05 c057a07946df22aeaab2a464426d630b78646d01
multi-system/src/main/java/com/gkhy/exam/system/service/impl/StandardizedTemplateServiceImpl.java
@@ -2,7 +2,6 @@
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.common.api.CommonPage;
@@ -79,7 +78,7 @@
    @Override
    public CommonResult insertStandardizedTemplate(StandardizedTemplate standardizedTemplate) {
        checkPer();
//        checkPer();
        LoginUserDetails loginUser = SecurityUtils.getLoginUser();
        SysCompany sysCompany = sysCompanyService.selectCompanyById(standardizedTemplate.getCompanyId().longValue());
@@ -104,7 +103,7 @@
    @Override
    public CommonResult updateStandardizedTemplate(StandardizedTemplate standardizedTemplate) {
        checkPer();
//        checkPer();
        LoginUserDetails loginUser = SecurityUtils.getLoginUser();
        SysCompany sysCompany = sysCompanyService.selectCompanyById(standardizedTemplate.getCompanyId().longValue());
        standardizedTemplate.setCompanyName(sysCompany.getName());
@@ -119,7 +118,7 @@
    @Override
    public CommonResult deletedStandardizedTemplate(Integer standardizedTemplateId) {
        checkPer();
//        checkPer();
        StandardizedTemplate standardizedTemplate = new StandardizedTemplate();
        LoginUserDetails loginUser = SecurityUtils.getLoginUser();
        standardizedTemplate.setUpdateBy(loginUser.getUsername());
@@ -134,7 +133,7 @@
    }
    private void checkPer(){
        boolean admin = SecurityUtils.adminUser();
        boolean admin = SecurityUtils.isAdmin(SecurityUtils.getUserId());
        if (!admin) {
            throw new ApiException("非管理员不可操作");
        }
@@ -213,7 +212,7 @@
        //部门
        SysDept sysDept = new SysDept();
        sysDept.setCompanyId(companyId.longValue());
        sysDept.setResponsType("1");
//        sysDept.setResponsType("1");
        List<TreeSelect> treeSelects = iSysDeptService.selectDeptTreeList(sysDept);
        //公司概况
@@ -256,4 +255,13 @@
        }
        return CommonResult.success(map);
    }
    @Override
    public CommonResult topStandardizedTemplate(Integer id) {
        StandardizedTemplate standardizedTemplate = new StandardizedTemplate();
        standardizedTemplate.setId(id);
        standardizedTemplate.setTopTime(LocalDateTime.now());
        standardizedTemplateMapper.updateById(standardizedTemplate);
        return CommonResult.success();
    }
}