Commit c9db7822 authored by hongguangwu's avatar hongguangwu

1.7.20-非扣税银企

parent 81abf079
...@@ -114,6 +114,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -114,6 +114,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 非扣税的指令状态:0:提交成功,等待银行处理 1:授权成功,等待银行处理 2:等待授权 3:等待二次授权 4:等待银行答复 5:主机返回待处理 6:被银行拒绝 7:处理成功 8:指令被拒绝授权 9:银行正在处理 10:预约指令 11:预约取消 12:等待监管审批 13:监管审批成功,等待银行处理 14:指令被监管审批拒绝 40:待确认 41:客户取消 42:等待华商审批 43:华商审批成功 | 9 | // 非扣税的指令状态:0:提交成功,等待银行处理 1:授权成功,等待银行处理 2:等待授权 3:等待二次授权 4:等待银行答复 5:主机返回待处理 6:被银行拒绝 7:处理成功 8:指令被拒绝授权 9:银行正在处理 10:预约指令 11:预约取消 12:等待监管审批 13:监管审批成功,等待银行处理 14:指令被监管审批拒绝 40:待确认 41:客户取消 42:等待华商审批 43:华商审批成功 | 9 |
protected static final Map<String, String> NO_TAX_STATUS_MAP; protected static final Map<String, String> NO_TAX_STATUS_MAP;
static { static {
NO_TAX_STATUS_MAP = new HashMap<>(); NO_TAX_STATUS_MAP = new HashMap<>();
NO_TAX_STATUS_MAP.put("0", "提交成功,等待银行处理"); NO_TAX_STATUS_MAP.put("0", "提交成功,等待银行处理");
...@@ -443,7 +444,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -443,7 +444,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
@Transactional @Transactional
public R<EkpBankAttaReturnVo> getIssueFileByFdId(String fdId, String type) { public R<EkpBankAttaReturnVo> getIssueFileByFdId(String fdId, String type) {
if (Common.isNotNull(fdId) && Common.isNotNull(type)) { if (Common.isNotNull(fdId) && Common.isNotNull(type)) {
String redisKey = "DOWN_BANK_"+fdId; String redisKey = "DOWN_BANK_" + fdId;
// 返回EKP的Vo // 返回EKP的Vo
EkpBankAttaReturnVo vo = new EkpBankAttaReturnVo(); EkpBankAttaReturnVo vo = new EkpBankAttaReturnVo();
...@@ -626,6 +627,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -626,6 +627,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
} }
} }
} }
// 初始化收款银行行号和行名 // 初始化收款银行行号和行名
private void initNoTaxFdRecipientBankCodeAndName(List<EkpBankExcelNoTaxVo> list, Map<String, EkpBankCodeConfiglVo> bankMap) { private void initNoTaxFdRecipientBankCodeAndName(List<EkpBankExcelNoTaxVo> list, Map<String, EkpBankCodeConfiglVo> bankMap) {
//工行的卡号bin list //工行的卡号bin list
...@@ -796,7 +798,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -796,7 +798,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
@Transactional @Transactional
public R<String> submitBankTask(String fdId, String type, String submitUser) { public R<String> submitBankTask(String fdId, String type, String submitUser) {
if (Common.isNotNull(fdId) && Common.isNotNull(type)) { if (Common.isNotNull(fdId) && Common.isNotNull(type)) {
String redisKey = "SUBMIT_BANK_"+fdId; String redisKey = "SUBMIT_BANK_" + fdId;
if (Common.isNotNull(redisUtil.get(redisKey))) { if (Common.isNotNull(redisUtil.get(redisKey))) {
return R.failed("数据锁定中,请耐心等待!"); return R.failed("数据锁定中,请耐心等待!");
} else { } else {
...@@ -909,7 +911,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -909,7 +911,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
@Transactional @Transactional
public synchronized R<String> submitNoTaxTask(String fdId, String type, String submitUser) { public synchronized R<String> submitNoTaxTask(String fdId, String type, String submitUser) {
if (Common.isNotNull(fdId) && Common.isNotNull(type)) { if (Common.isNotNull(fdId) && Common.isNotNull(type)) {
String redisKey = "SUBMIT_NO_TAX_BANK_"+fdId; String redisKey = "SUBMIT_NO_TAX_BANK_" + fdId;
if (Common.isNotNull(redisUtil.get(redisKey))) { if (Common.isNotNull(redisUtil.get(redisKey))) {
return R.failed("数据锁定中,请耐心等待!"); return R.failed("数据锁定中,请耐心等待!");
} else { } else {
...@@ -997,7 +999,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -997,7 +999,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
String wxNo = detail.getFdWxNo(); String wxNo = detail.getFdWxNo();
// 为空,或失败再次发放,生成新的wxNo // 为空,或失败再次发放,生成新的wxNo
if (Common.isEmpty(wxNo) || if (Common.isEmpty(wxNo) ||
(Common.isNotNull(detail.getFdFailNum()) && detail.getFdFailNum()>CommonConstants.ZERO_INT (Common.isNotNull(detail.getFdFailNum()) && detail.getFdFailNum() > CommonConstants.ZERO_INT
&& Common.isNotNull(detail.getFdGrantNum()) && detail.getFdFailNum() >= detail.getFdGrantNum())) { && Common.isNotNull(detail.getFdGrantNum()) && detail.getFdFailNum() >= detail.getFdGrantNum())) {
wxNo = "FKSMX" + new Date().getTime(); wxNo = "FKSMX" + new Date().getTime();
String cur = ekpBankGrantDetailService.getWxNoByWxNo(wxNo); String cur = ekpBankGrantDetailService.getWxNoByWxNo(wxNo);
...@@ -1582,6 +1584,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1582,6 +1584,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
/** /**
* 重写获取PDF文件的方法 * 重写获取PDF文件的方法
* 该方法通过SFTP协议从工商银行的服务器下载PDF文件 * 该方法通过SFTP协议从工商银行的服务器下载PDF文件
*
* @Author: huych * @Author: huych
* @Date: 2025/5/19 17:36 * @Date: 2025/5/19 17:36
**/ **/
...@@ -1753,7 +1756,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1753,7 +1756,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 登录用户名 // 登录用户名
String username = "WXYQHL"; String username = "WXYQHL";
// 私钥路径(用于身份验证) // 私钥路径(用于身份验证)
//E:\IdeaProjects\yifu_mvp\yifu-ekp\yifu-ekp-biz\src\main\resources\icbc\icbc
String privateKeyPath = ""; String privateKeyPath = "";
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("id_rsa"); InputStream inputStream = getClass().getClassLoader().getResourceAsStream("id_rsa");
if (inputStream == null) { if (inputStream == null) {
...@@ -1820,19 +1822,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1820,19 +1822,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
//找到存回单的压缩文件 //找到存回单的压缩文件
if (fileName.contains(targetDate) && fileName.endsWith(".zip")) { if (fileName.contains(targetDate) && fileName.endsWith(".zip")) {
try { try {
// 1. 处理压缩包文件
//String date = extractDateFromFileName(fileName);
//String indexFileName = "ReceiptIndex_00_" + date + ".bin";
// 2. 查找对应的索引文件
/*Optional<ChannelSftp.LsEntry> indexEntry = files.stream()
.filter(e -> e.getFilename().equals(indexFileName))
.findFirst();
if (!indexEntry.isPresent()) {
log.info("未找到对应的索引文件:{}", indexFileName);
continue;
}*/
// 3. 创建临时目录 // 3. 创建临时目录
tempDir = tempDirPre + System.currentTimeMillis() + "/"; tempDir = tempDirPre + System.currentTimeMillis() + "/";
dir = new File(tempDir); dir = new File(tempDir);
...@@ -1847,11 +1836,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1847,11 +1836,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
unzipDir = tempDir + "unzipped/"; unzipDir = tempDir + "unzipped/";
unzipFile(localZipPath, unzipDir); unzipFile(localZipPath, unzipDir);
// 5. 下载并解析索引文件
/*String localIndexPath = tempDir + indexFileName;
channelSftp.get(indexFileName, localIndexPath);
Map<String, String> salaryPdfMap = parseIndexFile(localIndexPath);*/
// 6. 处理映射关系 // 6. 处理映射关系
processPdfFilesByNoTax(unzipDir, returnMap); processPdfFilesByNoTax(unzipDir, returnMap);
...@@ -1862,8 +1846,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1862,8 +1846,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
log.error("处理文件[{}]时发生错误:", fileName, e); log.error("处理文件[{}]时发生错误:", fileName, e);
} }
} }
// log.info("正在下载: " + fileName);
// channelSftp.get(fileName, localPath + fileName);
} }
} }
} catch (JSchException e) { } catch (JSchException e) {
...@@ -2090,6 +2072,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -2090,6 +2072,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
icbcLog.setFdLog(JSON.toJSONString(responseV1)); icbcLog.setFdLog(JSON.toJSONString(responseV1));
icbcLogList.add(icbcLog); icbcLogList.add(icbcLog);
} }
/** /**
* @Description: 获取结果记录日志——非扣税 * @Description: 获取结果记录日志——非扣税
* @Author: hgw * @Author: hgw
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment