| | |
| | | if (student.getPayStatus() == 1) { |
| | | throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "请勿重新缴费"); |
| | | } |
| | | if (student.getGovPayStatus() == 2){ |
| | | return student.getOrderId(); |
| | | } |
| | | |
| | | PayReqData payReqData = fillData(coalPayStudent, coalPay, coalCategories, coalTicket, 1, null); |
| | | |
| | | ResultVo resultVo = payUtils.sendApiPost(payReqData); |
| | | ResultVo resultVo = payUtils.faqiV2(payReqData); |
| | | if (resultVo.getRespcode().equals("BUS0000")) { |
| | | //进行票据签名并校验 |
| | | // ResultVo resultVo1 = payUtils.uploadXml(resultVo.getRespdata().getOrderNo(), resultVo.getRespdata().getFileData()); |
| | |
| | | // throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "签名验证错误"); |
| | | // } |
| | | payStudent.setId(studentId); |
| | | payStudent.setOrderId(resultVo.getRespdata().getOrderNo()); |
| | | payStudent.setGovPayStatus(1); |
| | | payStudent.setOrderNo(resultVo.getRespdata().getOrderNo()); |
| | | payStudent.setOrderId(resultVo.getRespdata().getOrderId()); |
| | | payStudent.setGovPayStatus(2); |
| | | payStudent.setPayCode(resultVo.getRespdata().getBillNo()); |
| | | coalPayStudentService.updateByCoalPayStudent(payStudent); |
| | | coalPayStudentService.updateByIdAndPayType(payStudent); |
| | | return resultVo.getRespdata().getOrderId(); |
| | | } else { |
| | | throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, resultVo.getRespmsg()); |
| | | } |
| | | } catch (BusinessException e) { |
| | | throw new RuntimeException(e); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } finally { |
| | | if (lock.isLocked()) { |
| | |
| | | if (coalPay == null) { |
| | | throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "未找到相关缴费信息"); |
| | | } |
| | | if (coalPayStudents.get(0).getGovPayStatus() == 2){ |
| | | return coalPayStudents.get(0).getOrderId(); |
| | | } |
| | | |
| | | CoalPayStudent payStudent = new CoalPayStudent(); |
| | | PayReqData payReqData = fillData(coalPayStudents, coalPay, coalCategories, coalTicket, 2, coalTeamPayReq); |
| | | ResultVo resultVo = payUtils.sendApiPost(payReqData); |
| | | ResultVo resultVo = payUtils.faqiV2(payReqData); |
| | | if (resultVo.getRespcode().equals("BUS0000")) { |
| | | payStudent.setCoalPayId(coalPay.getId()); |
| | | payStudent.setOrderId(resultVo.getRespdata().getOrderNo()); |
| | | payStudent.setGovPayStatus(1); |
| | | payStudent.setOrderId(resultVo.getRespdata().getOrderId()); |
| | | payStudent.setOrderNo(resultVo.getRespdata().getOrderNo()); |
| | | payStudent.setGovPayStatus(2); |
| | | payStudent.setPayCode(resultVo.getRespdata().getBillNo()); |
| | | coalPayStudentService.updateByCoalPayIdAndStatus(payStudent); |
| | | return resultVo.getRespdata().getOrderId(); |