Commit 3d2e782a authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.21' into MVP1.7.21

parents a2b5766d 8852a331
...@@ -202,7 +202,7 @@ public class EkpBankPayTask { ...@@ -202,7 +202,7 @@ public class EkpBankPayTask {
@Schema(description = "发放失败处理状态:待发放、发放中、已处理、转手工") @Schema(description = "发放失败处理状态:待发放、发放中、已处理、转手工")
private String fdFailHandleStatus; private String fdFailHandleStatus;
/** /**
* 附件ID * 附件ID(存储refNo,用来回传)
*/ */
@ExcelAttribute(name = "附件ID", maxLength = 36) @ExcelAttribute(name = "附件ID", maxLength = 36)
@Length(max = 36, message = "附件ID不能超过36个字符") @Length(max = 36, message = "附件ID不能超过36个字符")
...@@ -210,7 +210,7 @@ public class EkpBankPayTask { ...@@ -210,7 +210,7 @@ public class EkpBankPayTask {
@Schema(description = "附件ID") @Schema(description = "附件ID")
private String fdAttaId; private String fdAttaId;
/** /**
* 附件名称 * 附件名称(四大报销用区分类型,后续招投标也是)
*/ */
@ExcelAttribute(name = "附件名称", maxLength = 200) @ExcelAttribute(name = "附件名称", maxLength = 200)
@Length(max = 200, message = "附件名称不能超过200个字符") @Length(max = 200, message = "附件名称不能超过200个字符")
......
...@@ -59,7 +59,7 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo> ...@@ -59,7 +59,7 @@ public interface IcbcTransactionFlowQueryService extends IService<EkpSocialInfo>
// 工行非税支付 // 工行非税支付
// type 0 对公; 1 对私. // type 0 对公; 1 对私.
R<String> submitIcbcToNoTax(String title, String totalAmt, String totalCount, String wxNo R<String> submitIcbcToNoTax(String title, String totalAmt, String totalCount, String wxNo
, List<EkpBankExcelNoTaxVo> detailList, int type, String fdId, String packageName); , List<EkpBankExcelNoTaxVo> detailList, int type, String fdId, String packageName, String refNo);
R submitSearch(); R submitSearch();
......
...@@ -962,14 +962,17 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -962,14 +962,17 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
String totalAmt = String.valueOf(BigDecimalUtils.safeMultiply(main.getFdMoney(), new BigDecimal("100"), 0)); String totalAmt = String.valueOf(BigDecimalUtils.safeMultiply(main.getFdMoney(), new BigDecimal("100"), 0));
String totalCount = String.valueOf(count); String totalCount = String.valueOf(count);
String wxNo = main.getFdWxNo(); String wxNo = main.getFdWxNo();
String refNo = main.getFdAttaId();
// 为空或者失败数=-1,则生成新的wxNo // 为空或者失败数=-1,则生成新的wxNo
if (Common.isEmpty(wxNo) || if (Common.isEmpty(wxNo) ||
(Common.isNotNull(main.getFdFailNum()) && main.getFdFailNum() == CommonConstants.ONE_INT_NEGATE)) { (Common.isNotNull(main.getFdFailNum()) && main.getFdFailNum() == CommonConstants.ONE_INT_NEGATE)) {
wxNo = wxNoPre + new Date().getTime(); refNo = String.valueOf(new Date().getTime());
wxNo = wxNoPre + refNo;
String cur = ekpBankGrantDetailService.getWxNoByWxNo(wxNo); String cur = ekpBankGrantDetailService.getWxNoByWxNo(wxNo);
if (Common.isNotNull(cur)) { if (Common.isNotNull(cur)) {
wxNo = wxNoPre + new Date().getTime(); wxNo = wxNoPre + new Date().getTime();
} }
main.setFdAttaId(refNo);
main.setFdWxNo(wxNo); main.setFdWxNo(wxNo);
main.setFdFailNum(CommonConstants.ZERO_INT); main.setFdFailNum(CommonConstants.ZERO_INT);
// 更新wxno // 更新wxno
...@@ -988,7 +991,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -988,7 +991,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
packageName = main.getFdSettlementNo() + CommonConstants.DOWN_LINE_STRING ; packageName = main.getFdSettlementNo() + CommonConstants.DOWN_LINE_STRING ;
} }
packageName += DateUtil.getThisTime(); packageName += DateUtil.getThisTime();
R<String> returnR = icbcTransactionFlowQueryService.submitIcbcToNoTax(title, totalAmt, totalCount, wxNo, detailList, noTaxPayType, fdId, packageName); R<String> returnR = icbcTransactionFlowQueryService.submitIcbcToNoTax(title, totalAmt, totalCount, wxNo, detailList, noTaxPayType, fdId, packageName, refNo);
if (returnR.getCode() == CommonConstants.SUCCESS) { if (returnR.getCode() == CommonConstants.SUCCESS) {
String serialNo = returnR.getData(); String serialNo = returnR.getData();
// 存储日志 // 存储日志
...@@ -1044,16 +1047,20 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1044,16 +1047,20 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
} }
String totalAmt = String.valueOf(BigDecimalUtils.safeMultiply(detail.getFdMoney(), new BigDecimal("100"), 0)); String totalAmt = String.valueOf(BigDecimalUtils.safeMultiply(detail.getFdMoney(), new BigDecimal("100"), 0));
String totalCount = "1"; String totalCount = "1";
String refNo = detail.getFdAttaId();
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 = wxNoPre + new Date().getTime(); refNo = String.valueOf(new Date().getTime());
wxNo = wxNoPre + refNo;
String cur = ekpBankGrantDetailService.getWxNoByWxNo(wxNo); String cur = ekpBankGrantDetailService.getWxNoByWxNo(wxNo);
if (Common.isNotNull(cur)) { if (Common.isNotNull(cur)) {
wxNo = wxNoPre + new Date().getTime(); wxNo = wxNoPre + new Date().getTime();
} }
refNo += CommonConstants.DOWN_LINE_STRING + detail.getFdSerialNumber();
detail.setFdAttaId(refNo);
detail.setFdWxNo(wxNo); detail.setFdWxNo(wxNo);
ekpBankGrantDetailService.updateById(detail); ekpBankGrantDetailService.updateById(detail);
} }
...@@ -1072,7 +1079,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1072,7 +1079,7 @@ public class IcbcTransactionFlowIssueServiceImpl extends ServiceImpl<EkpSocialIn
noTaxPayType = CommonConstants.ONE_INT; noTaxPayType = CommonConstants.ONE_INT;
} }
List<EkpBankExcelNoTaxVo> detailList = ekpBankGrantDetailService.getEkpBankExcelVoByIdAndDetailNoTax(fdId); List<EkpBankExcelNoTaxVo> detailList = ekpBankGrantDetailService.getEkpBankExcelVoByIdAndDetailNoTax(fdId);
R<String> returnR = icbcTransactionFlowQueryService.submitIcbcToNoTax(title, totalAmt, totalCount, wxNo, detailList, noTaxPayType, fdId, packageName); R<String> returnR = icbcTransactionFlowQueryService.submitIcbcToNoTax(title, totalAmt, totalCount, wxNo, detailList, noTaxPayType, fdId, packageName, refNo);
if (returnR.getCode() == CommonConstants.SUCCESS) { if (returnR.getCode() == CommonConstants.SUCCESS) {
String serialNo = returnR.getData(); String serialNo = returnR.getData();
// 存储日志 // 存储日志
......
...@@ -848,7 +848,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -848,7 +848,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
// 改造自上面的demo接口:executePayment // 改造自上面的demo接口:executePayment
// type 0 对公; 1 对私. // type 0 对公; 1 对私.
public R<String> submitIcbcToNoTax(String title, String totalAmt, String totalCount, String wxNo public R<String> submitIcbcToNoTax(String title, String totalAmt, String totalCount, String wxNo
, List<EkpBankExcelNoTaxVo> detailList, int type, String fdId, String packageName) { , List<EkpBankExcelNoTaxVo> detailList, int type, String fdId, String packageName, String refNo) {
// 获取当前时间 // 获取当前时间
LocalTime currentTime = LocalTime.now(); LocalTime currentTime = LocalTime.now();
// 使用DateTimeFormatter格式化 // 使用DateTimeFormatter格式化
...@@ -890,9 +890,9 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -890,9 +890,9 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
for (EkpBankExcelNoTaxVo detail : detailList) { for (EkpBankExcelNoTaxVo detail : detailList) {
// 0 对公 // 0 对公
if (CommonConstants.ZERO_INT == type) { if (CommonConstants.ZERO_INT == type) {
rdDetail = buildPayRecordDuiGong(detail, wxNo); rdDetail = buildPayRecordDuiGong(detail, refNo);
} else { } else {
rdDetail = buildPayRecordDuiSi(detail, wxNo); rdDetail = buildPayRecordDuiSi(detail, refNo);
} }
rd.add(rdDetail); rd.add(rdDetail);
} }
...@@ -1115,7 +1115,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1115,7 +1115,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
} }
// 对公 // 对公
private MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 buildPayRecordDuiGong(EkpBankExcelNoTaxVo detail, String wxNo) { private MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 buildPayRecordDuiGong(EkpBankExcelNoTaxVo detail, String refNo) {
MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 payRecord = MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 payRecord =
new MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2(); new MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2();
...@@ -1125,7 +1125,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1125,7 +1125,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
} }
//业务唯一编号:相同指令不重复 //业务唯一编号:相同指令不重复
payRecord.setUniBusiId(fdId); payRecord.setUniBusiId(fdId);
payRecord.setRefNo(wxNo + CommonConstants.DOWN_LINE_STRING + detail.getFdSerialNumber()); payRecord.setRefNo(refNo);
//指令顺序号:每笔指令的序号,本包内不重复 //指令顺序号:每笔指令的序号,本包内不重复
payRecord.setiSeqNo(detail.getFdSerialNumber()); payRecord.setiSeqNo(detail.getFdSerialNumber());
//预约日期 //预约日期
...@@ -1209,7 +1209,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1209,7 +1209,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
return payRecord; return payRecord;
} }
private MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 buildPayRecordDuiSi(EkpBankExcelNoTaxVo detail, String wxNo) { private MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 buildPayRecordDuiSi(EkpBankExcelNoTaxVo detail, String refNo) {
MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 payRecord = MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2 payRecord =
new MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2(); new MybankEnterprisePayPayentRequestV2.MybankEnterprisePayPayentRequestRdV2();
String fdId = detail.getFdId(); String fdId = detail.getFdId();
...@@ -1218,7 +1218,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn ...@@ -1218,7 +1218,7 @@ public class IcbcTransactionFlowQueryServiceImpl extends ServiceImpl<EkpSocialIn
} }
//业务唯一编号:相同指令不重复 //业务唯一编号:相同指令不重复
payRecord.setUniBusiId(fdId); payRecord.setUniBusiId(fdId);
payRecord.setRefNo(wxNo + CommonConstants.DOWN_LINE_STRING + detail.getFdSerialNumber()); payRecord.setRefNo(refNo);
//指令顺序号:每笔指令的序号,本包内不重复 //指令顺序号:每笔指令的序号,本包内不重复
payRecord.setiSeqNo(detail.getFdSerialNumber()); payRecord.setiSeqNo(detail.getFdSerialNumber());
//预约日期 //预约日期
......
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