Commit d7f53c7c authored by hongguangwu's avatar hongguangwu

MVP1.7.2 优化

parent a268c512
...@@ -829,7 +829,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -829,7 +829,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
|| ("05".equals(responseV1.getStatus()) && responseV1.getDatalist() != null && !responseV1.getDatalist().isEmpty() )) { || ("05".equals(responseV1.getStatus()) && responseV1.getDatalist() != null && !responseV1.getDatalist().isEmpty() )) {
// 生成日志主表 // 生成日志主表
logs = saveNewEkpBankGrantLog(responseV1, vo); logs = new EkpBankGrantLog();
saveNewEkpBankGrantLog(responseV1, vo, vo.getFdId(), logs);
dataList = responseV1.getDatalist(); dataList = responseV1.getDatalist();
oldDetailList = ekpBankGrantDetailService.getListByParentId(vo.getFdId()); oldDetailList = ekpBankGrantDetailService.getListByParentId(vo.getFdId());
...@@ -855,7 +856,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -855,7 +856,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
money = BigDecimalUtils.safeDivide(new BigDecimal(data.getPayamt()), new BigDecimal("100"), 2); money = BigDecimalUtils.safeDivide(new BigDecimal(data.getPayamt()), new BigDecimal("100"), 2);
moneyAll = BigDecimalUtils.safeAdd(moneyAll, money); moneyAll = BigDecimalUtils.safeAdd(moneyAll, money);
// 初始化日志明细 // 初始化日志明细
logDetail = setLogDetailBaseInfo(logs, money, vo, data); logDetail = new EkpBankGrantLogDetail();
setLogDetailBaseInfo(logs, money, logDetail, data);
detailData = oldMap.get(data.getPlatDetailId()); detailData = oldMap.get(data.getPlatDetailId());
if (detailData != null) { if (detailData != null) {
...@@ -950,32 +952,12 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -950,32 +952,12 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
data = dataList.get(0); data = dataList.get(0);
money = BigDecimalUtils.safeDivide(new BigDecimal(data.getPayamt()), new BigDecimal("100"), 2); money = BigDecimalUtils.safeDivide(new BigDecimal(data.getPayamt()), new BigDecimal("100"), 2);
// 生成日志主表
logs = saveNewEkpBankGrantLog(responseV1, vo);
// 失败总金额
logs.setFdFailFee(BigDecimal.ZERO);
// 成功总金额
logs.setFdSuccessFee(BigDecimal.ZERO);
// 总金额
logs.setFdSumFee(money);
// 失败总笔数
logs.setFdTransactionFailTotal(0);
// 成功总笔数
logs.setFdTransactionSuccessTotal(0);
// 交易时间
if (Common.isNotNull(data.getCompanyHandleTime())) {
logs.setFdTransactionTime(DateUtil.stringToDateByFormat(data.getCompanyHandleTime(), DateUtil.DATETIME_PATTERN_SECOND));
}
// 初始化日志明细
logDetail = setLogDetailBaseInfo(logs, money, vo, data);
// 收款人名称
logDetail.setFdPayee(vo.getFdPayeeName());
logDetail.setFdRecipientBank(vo.getFdRecipientBank());
ekpBankGrantLogDetailService.save(logDetail);
detailData = new EkpBankGrantDetail(); detailData = new EkpBankGrantDetail();
detailData.setFdId(vo.getFdId()); detailData.setFdId(vo.getFdId());
detailData.setFdSerialNumber(data.getPlatDetailId()); detailData.setFdSerialNumber(data.getPlatDetailId());
// 生成日志主表
logs = new EkpBankGrantLog();
if ("02".equals(data.getResult())) { if ("02".equals(data.getResult())) {
// 失败总笔数 // 失败总笔数
logs.setFdTransactionSuccessTotal(1); logs.setFdTransactionSuccessTotal(1);
...@@ -995,7 +977,28 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -995,7 +977,28 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
ekpBankGrantDetailService.updateZhongXinStatus(vo.getFdSalaryId(), vo.getFdId()); ekpBankGrantDetailService.updateZhongXinStatus(vo.getFdSalaryId(), vo.getFdId());
ekpBankGrantDetailService.updateZhongXinMainStatus(vo.getFdSalaryId(), vo.getFdId()); ekpBankGrantDetailService.updateZhongXinMainStatus(vo.getFdSalaryId(), vo.getFdId());
} }
ekpBankGrantLogService.updateById(logs); // 失败总金额
logs.setFdFailFee(BigDecimal.ZERO);
// 成功总金额
logs.setFdSuccessFee(BigDecimal.ZERO);
// 总金额
logs.setFdSumFee(money);
// 失败总笔数
logs.setFdTransactionFailTotal(0);
// 成功总笔数
logs.setFdTransactionSuccessTotal(0);
// 交易时间
if (Common.isNotNull(data.getCompanyHandleTime())) {
logs.setFdTransactionTime(DateUtil.stringToDateByFormat(data.getCompanyHandleTime(), DateUtil.DATETIME_PATTERN_SECOND));
}
saveNewEkpBankGrantLog(responseV1, vo, vo.getFdParentId(), logs);
// 初始化日志明细
logDetail = new EkpBankGrantLogDetail();
setLogDetailBaseInfo(logs, money, logDetail, data);
// 收款人名称
logDetail.setFdPayee(vo.getFdPayeeName());
logDetail.setFdRecipientBank(vo.getFdRecipientBank());
ekpBankGrantLogDetailService.save(logDetail);
detailDataList.add(detailData); detailDataList.add(detailData);
} }
} }
...@@ -1049,9 +1052,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1049,9 +1052,8 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
* @Date: 2024/11/26 20:08 * @Date: 2024/11/26 20:08
* @return: com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantLogDetail * @return: com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantLogDetail
**/ **/
private EkpBankGrantLogDetail setLogDetailBaseInfo(EkpBankGrantLog logs, BigDecimal money, EkpBankResultVo vo, JftApiPayrollQueryDetailResponseV1.JftApiPayrollDetail data) { private void setLogDetailBaseInfo(EkpBankGrantLog logs, BigDecimal money, EkpBankGrantLogDetail logDetail
EkpBankGrantLogDetail logDetail; , JftApiPayrollQueryDetailResponseV1.JftApiPayrollDetail data) {
logDetail = new EkpBankGrantLogDetail();
// 指令状态 // 指令状态
logDetail.setFdCommandStatus(STATUS_MAP.get(data.getResult())); logDetail.setFdCommandStatus(STATUS_MAP.get(data.getResult()));
logDetail.setFdParentId(logs.getFdId()); logDetail.setFdParentId(logs.getFdId());
...@@ -1061,7 +1063,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1061,7 +1063,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
logDetail.setFdRemark(data.getRemark()); logDetail.setFdRemark(data.getRemark());
// 汇款用途 // 汇款用途
logDetail.setFdRemittancePurpose("工资"); logDetail.setFdRemittancePurpose("工资");
return logDetail;
} }
/** /**
...@@ -1070,11 +1071,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1070,11 +1071,10 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
* @Date: 2024/11/26 20:09 * @Date: 2024/11/26 20:09
* @return: com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantLog * @return: com.yifu.cloud.plus.v1.ekp.entity.EkpBankGrantLog
**/ **/
private EkpBankGrantLog saveNewEkpBankGrantLog(JftApiPayrollQueryDetailResponseV1 responseV1, EkpBankResultVo vo) { private void saveNewEkpBankGrantLog(JftApiPayrollQueryDetailResponseV1 responseV1, EkpBankResultVo vo
EkpBankGrantLog logs; , String parentId, EkpBankGrantLog logs) {
logs = new EkpBankGrantLog();
logs.setFdBatchNumber(vo.getFdWxNo()); logs.setFdBatchNumber(vo.getFdWxNo());
logs.setFdParentId(vo.getFdId()); logs.setFdParentId(parentId);
logs.setFdBatchPackage(responseV1.getRemark()); logs.setFdBatchPackage(responseV1.getRemark());
logs.setFdBusinessType("代发工资"); logs.setFdBusinessType("代发工资");
logs.setFdCurrency("人民币"); logs.setFdCurrency("人民币");
...@@ -1084,7 +1084,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1084,7 +1084,6 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
// 总笔数 // 总笔数
logs.setFdTransactionTotal(vo.getNum()); logs.setFdTransactionTotal(vo.getNum());
ekpBankGrantLogService.save(logs); ekpBankGrantLogService.save(logs);
return logs;
} }
} }
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