|
|
@@ -14,6 +14,7 @@ import cn.com.taiji.core.entity.invw.InvwCardDetails; |
|
|
|
import cn.com.taiji.core.entity.invw.InvwObuDetails; |
|
|
|
import cn.com.taiji.core.entity.issue.IssueOrderinfo; |
|
|
|
import cn.com.taiji.core.entity.issue.IssueProduct; |
|
|
|
import cn.com.taiji.core.entity.issue.VfjCOSRecord; |
|
|
|
import cn.com.taiji.core.entity.log.InssInterfaceLog; |
|
|
|
import cn.com.taiji.core.entity.managew.ActiveRecord; |
|
|
|
import cn.com.taiji.core.entity.ygz.DaspOfflineHasSend; |
|
|
@@ -32,6 +33,7 @@ import cn.com.taiji.core.repo.jpa.invw.InvwCardDetailsRepo; |
|
|
|
import cn.com.taiji.core.repo.jpa.invw.InvwObuDetailsRepo; |
|
|
|
import cn.com.taiji.core.repo.jpa.issue.IssueOrderinfoRepo; |
|
|
|
import cn.com.taiji.core.repo.jpa.issue.IssueProductRepo; |
|
|
|
import cn.com.taiji.core.repo.jpa.issue.VfjCOSRecordRepo; |
|
|
|
import cn.com.taiji.core.repo.jpa.managew.ActiveRecordRepo; |
|
|
|
import cn.com.taiji.core.repo.jpa.ygz.DaspOfflineHasSendRepo; |
|
|
|
import cn.com.taiji.inss.config.VfjConfigProperties; |
|
|
@@ -688,12 +690,14 @@ public class InstOnlineActiveMananger extends AbstractCallBackManager { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
protected VfjConfigProperties vfjConfig; |
|
|
|
@Autowired |
|
|
|
private VfjCOSRecordRepo cosRecordRepo; |
|
|
|
|
|
|
|
@Override |
|
|
|
protected boolean needSpecialHandle(InstCallBackRequest request, IssueOrderVO vo) throws ServiceHandleException { |
|
|
|
if (request.getStepNo() == 11) { |
|
|
|
if (!vo.getLastCos().equals(request.getCmd())) |
|
|
|
throw GlyServiceError.FORMAT_VALIDATE_ERR.toHandleException("返回指令信息与指令记录中不一致"); |
|
|
|
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("返回指令信息与指令记录中不一致"); |
|
|
|
String[] cmds = vo.getLastCos().split(","); |
|
|
|
String[] cmdResults = request.getCmdResult().split(","); |
|
|
|
if (cmds.length != cmdResults.length) { |
|
|
@@ -707,11 +711,17 @@ public class InstOnlineActiveMananger extends AbstractCallBackManager { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected InstCallBackResponse specialHandle(InstCallBackRequest request, IssueOrderVO vo) { |
|
|
|
VfjCOSRecord cosRecord = cosRecordRepo.findById(vo.getCosRecordId()).orElse(null); |
|
|
|
|
|
|
|
String cos_pin = COSConstant.pinVertify_second; |
|
|
|
String cmd = COSConstant.selectRoot + COSConstant.COS_SEPERATOR + COSConstant.selectDF01 + COSConstant.COS_SEPERATOR |
|
|
|
+ COSConstant.read0015 + COSConstant.COS_SEPERATOR + cos_pin + COSConstant.COS_SEPERATOR |
|
|
|
+ COSConstant.initializeLoad(vo.getChargeMoney(), vfjConfig.getTerminalId(), vo.getCardVersion()); |
|
|
|
vo.setLastCos(cmd); |
|
|
|
cosRecord.setLastCos(vo.getLastCos()); |
|
|
|
cosRecord.setStepOrder(11); |
|
|
|
cosRecord.setUpdateTime(LocalDateTime.now()); |
|
|
|
cosRecordRepo.save(cosRecord); |
|
|
|
return new InstCallBackResponse().setCmd(cmd).setCmdType(vo.getCmdType()).setStepNo(11).setTransOrderId(request.getTransOrderId()); |
|
|
|
} |
|
|
|
} |