| | |
| | | import com.gkhy.exam.pay.service.CoalPayStudentService; |
| | | import com.gkhy.exam.pay.utils.PayUtils; |
| | | import com.gkhy.exam.pay.utils.ResultVo; |
| | | import com.gkhy.exam.pay.utils.Sign; |
| | | import com.ruoyi.common.constant.ResultConstants; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.mapper.SysDeptMapper; |
| | | import org.dom4j.Element; |
| | | import org.redisson.api.RLock; |
| | | import org.redisson.api.RedissonClient; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | //学员数据 |
| | | List<CoalPayStudent> coalPayStudents = coalPayStudentService.selectByCoalPayId(pay.getId()); |
| | | List<CoalPayStudent> havePay = coalPayStudents.stream() |
| | | .filter(stu -> stu.getPayStatus() != null && stu.getPayStatus().equals(1)) |
| | | .filter(stu -> stu.getPayStatus() != null && stu.getPayStatus()==1) |
| | | .collect(Collectors.toList()); |
| | | coalPayRepDto.setTotalNum(coalPayStudents.size()); |
| | | coalPayRepDto.setHavePayNum(havePay.size()); |
| | |
| | | for (CoalPayStudent payStudent : coalPayStudents) { |
| | | //封装学生基础信息 |
| | | CoalPayStudentRep coalPayStudentRep = new CoalPayStudentRep(); |
| | | coalPayStudentRep.setId(payStudent.getId()); |
| | | coalPayStudentRep.setName(payStudent.getName()); |
| | | coalPayStudentRep.setIdCard(payStudent.getIdCard()); |
| | | coalPayStudentRep.setPhone(payStudent.getPhone()); |
| | |
| | | |
| | | ResultVo resultVo = payUtils.sendApiPost(payReqData); |
| | | if (resultVo.getRespcode().equals("BUS0000")) { |
| | | //进行票据签名并校验 |
| | | ResultVo resultVo1 = payUtils.uploadXml(resultVo.getRespdata().getOrderNo(), resultVo.getRespdata().getFileData()); |
| | | if (!resultVo1.getRespcode().equals("BUS0000")){ |
| | | throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "签名验证错误"); |
| | | } |
| | | payStudent.setId(studentId); |
| | | payStudent.setOrderId(resultVo.getRespdata().getOrderNo()); |
| | | payStudent.setGovPayStatus(1); |