教育训练处考试制证系统后端
heheng
2025-02-18 33d850692237ff59bc07710d14817cbbac2f975b
merge
已修改1个文件
17 ■■■■ 文件已修改
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/CoalPayServiceImpl.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/CoalPayServiceImpl.java
@@ -1,7 +1,7 @@
package com.gkhy.exam.pay.service.impl;
import cn.com.jit.mof.bean.MOFVerifyResult;
import cn.com.jit.new_vstk.Bean.SignResult;
import cn.com.jit.new_vstk.Bean.VerifyResult;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.pay.dto.rep.CoalPayRepDto;
@@ -13,10 +13,7 @@
import com.gkhy.exam.pay.mapper.CoalPayMapper;
import com.gkhy.exam.pay.service.CoalPayService;
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.gkhy.exam.pay.utils.SignDto;
import com.gkhy.exam.pay.utils.*;
import com.ruoyi.common.constant.ResultConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
@@ -328,7 +325,7 @@
    }
    @Override
    public ResultVo topay() throws IOException {
    public ResultVo topay() throws IOException, BillSignException {
        PayReqData payReqData = new PayReqData();
        PayReqData.Feedata feedatas = new PayReqData.Feedata();
@@ -387,10 +384,12 @@
            throw new RuntimeException(e);
        }
        log.info("票据原文为:" + document.asXML());
        BillSign billSign = new BillSign();
        String s = billSign.readRefSignDto(document);
        Element rootElement = document.getRootElement();
        SignResult sign = payUtils.sign(fileData);
        VerifyResult verify = payUtils.verify(sign.getSignData(), fileData);
        SignDto signDto = new SignDto(new Date(), verify.getSubjectdn(), verify.getSn(), verify.getIssure());
        SignResult sign = payUtils.sign(s);
        MOFVerifyResult verify = payUtils.verify(sign.getSignData(), s);
        SignDto signDto = new SignDto(verify.getSignTime(), new String(Base64.getEncoder().encode(sign.getSignData())), verify.getIssure(), verify.getSn());
        log.info("拼接对象为:" + JSONObject.toJSONString(signDto));
        Sign sign1 = new Sign();
        Document signature = sign1.getSignature(signDto);