教育训练处考试制证系统后端
heheng
2025-02-05 c9227740f02c4973751fe63f1f51ee24d5649caf
新增强制校验
已修改2个文件
12 ■■■■■ 文件已修改
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalCategoryServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalCategoryServiceImpl.java
@@ -63,6 +63,12 @@
        if (!nonCoalCategory.getDistrictCode().startsWith(Constants.DIS_XINJIANG_CODE)) {
            throw new RuntimeException("地州信息错误");
        }
        if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
            if (!SecurityUtils.getDeptDistrictCode().equals(nonCoalCategory.getDistrictCode())) {
                throw new RuntimeException("仅可新增本地州数据");
            }
        }
        checkSubjectName(nonCoalCategory);
        nonCoalCategory.setCreateBy(SecurityUtils.getUsername());
        return nonCoalCategoryMapper.insertNonCoalCategory(nonCoalCategory);
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayServiceImpl.java
@@ -128,6 +128,12 @@
        if (!nonCoalPay.getDistrictCode().startsWith(Constants.DIS_XINJIANG_CODE)) {
            throw new RuntimeException("地州信息错误");
        }
        if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
            if (!SecurityUtils.getDeptDistrictCode().equals(nonCoalPay.getDistrictCode())) {
                throw new RuntimeException("仅可新增本地州数据");
            }
        }
        checkData(nonCoalPay);
        NonCoalPay nonCoalPay1 = new NonCoalPay();
        BeanUtils.copyProperties(nonCoalPay, nonCoalPay1);