| | |
| | | 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; |
| | |
| | | @Override |
| | | public List<NonCoalPayPageRepDto> selectNonCoalPayList(NonCoalPay nonCoalPay) { |
| | | if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())) { |
| | | if (!Constants.DIS_XINJIANG_CODE.equals(SecurityUtils.getDeptDistrictCode())) { |
| | | nonCoalPay.setDistrictCode(SecurityUtils.getDeptDistrictCode()); |
| | | } |
| | | } |
| | | return nonCoalPayMapper.getNonCoalPayList(nonCoalPay); |
| | | } |
| | |
| | | @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); |
| | |
| | | @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) { |