From 5217bbc0a0278915e5c641316c20489d8f1868f1 Mon Sep 17 00:00:00 2001
From: heheng <heheng@123456>
Date: Tue, 21 Jan 2025 08:31:05 +0800
Subject: [PATCH] 特种作业非煤缴费版本
---
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayServiceImpl.java | 10 +++++++++-
1 files changed, 9 insertions(+), 1 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 30bf5de..b8fb55f 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
@@ -18,6 +18,7 @@
import com.gkhy.exam.pay.service.NonCoalPayCategoryService;
import com.gkhy.exam.pay.service.NonCoalPayService;
import com.gkhy.exam.pay.service.NonCoalPayStudentService;
+import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.bean.BeanUtils;
@@ -73,7 +74,9 @@
@Override
public List<NonCoalPayPageRepDto> selectNonCoalPayList(NonCoalPay nonCoalPay) {
if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
- nonCoalPay.setDistrictCode(SecurityUtils.getDeptDistrictCode());
+ if (!Constants.DIS_XINJIANG_CODE.equals(SecurityUtils.getDeptDistrictCode())) {
+ nonCoalPay.setDistrictCode(SecurityUtils.getDeptDistrictCode());
+ }
}
return nonCoalPayMapper.getNonCoalPayList(nonCoalPay);
}
@@ -122,6 +125,9 @@
@Override
@Transactional
public int insertNonCoalPay(NonCoalPayReqDto nonCoalPay) {
+ if (!nonCoalPay.getDistrictCode().startsWith(Constants.DIS_XINJIANG_CODE)) {
+ throw new RuntimeException("地州信息错误");
+ }
checkData(nonCoalPay);
NonCoalPay nonCoalPay1 = new NonCoalPay();
BeanUtils.copyProperties(nonCoalPay, nonCoalPay1);
@@ -173,10 +179,12 @@
@Override
@Transactional
public int updateNonCoalPay(NonCoalPayReqDto nonCoalPay) {
+
checkData(nonCoalPay);
checkHavePay(nonCoalPay.getId());
NonCoalPay nonCoalPay1 = new NonCoalPay();
BeanUtils.copyProperties(nonCoalPay, nonCoalPay1);
+ nonCoalPay1.setDistrictCode(null);
nonCoalPay1.setUpdateBy(SecurityUtils.getUsername());
int i = nonCoalPayMapper.updateNonCoalPay(nonCoalPay1);
if (i > 0) {
--
Gitblit v1.9.2