From f9cb0f3f384279b2cbe87c35dde3ba573a0197f3 Mon Sep 17 00:00:00 2001 From: “djh” <“3298565835@qq.com”> Date: 星期四, 24 四月 2025 16:17:25 +0800 Subject: [PATCH] 煤矿缴费修改 --- exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayServiceImpl.java | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayServiceImpl.java index eb34654..bcf6e86 100644 --- a/exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayServiceImpl.java +++ b/exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayServiceImpl.java @@ -129,8 +129,8 @@ throw new RuntimeException("地州信息错误"); } if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())) { - if (!SecurityUtils.getDeptDistrictCode().equals(nonCoalPay.getDistrictCode())) { - throw new RuntimeException("仅可新增本地州数据"); + if (Constants.DIS_XINJIANG_CODE.equals(nonCoalPay.getDistrictCode())) { + throw new RuntimeException("仅可选择下级地州"); } } @@ -228,7 +228,7 @@ int i = nonCoalPayMapper.updateNonCoalPay(nonCoalPay1); if (payPersonType == 2) { //更新未缴费的为团体 - nonCoalPayStudentMapper.updateNonCoalPayStudentType(id, SecurityUtils.getUsername()); + nonCoalPayStudentMapper.updateNonCoalPayStudentType(id, SecurityUtils.getUsername(),0); } return i; } @@ -257,7 +257,13 @@ throw new ServiceException("该数据不存在"); } //验证是否有学员已缴费 - checkHavePay(id); + NonCoalPayStudent nonCoalPayStudent = new NonCoalPayStudent(); + nonCoalPayStudent.setNonCoalPayId(id); + nonCoalPayStudent.setPayStatus(1L); + List<NonCoalPayStudent> nonCoalPayStudents = nonCoalPayStudentService.selectNonCoalPayStudentList(nonCoalPayStudent); + if (nonCoalPayStudents.size()>0){ + throw new ServiceException("该批次存在已缴费学员,请勿删除"); + } return nonCoalPayMapper.deleteNonCoalPayById(id, SecurityUtils.getUsername()); } -- Gitblit v1.9.2