Merge branch 'develop'

# Conflicts:
#	pom.xml
master
luoyang 5 years ago
commit 7bbbac0507

@ -5,11 +5,11 @@
<parent>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId>
<version>2.1.40</version>
<version>2.1.41</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>2.2.33</version>
<version>2.2.34</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -138,6 +138,8 @@ public class TradeLogServiceImpl implements TradeLogService {
private org.springframework.core.io.Resource incremental_trans_flow;
@Value("classpath:/jasper/partner_upay_invoice_gst.jasper")
private org.springframework.core.io.Resource upay_trans_flow;
@Value("classpath:/jasper/incremental_partner_upay_invoice_gst.jasper")
private org.springframework.core.io.Resource incremental_upay_trans_flow;
@Value("classpath:/jasper/royalpay_logo.png")
private org.springframework.core.io.Resource logo;
@Value("classpath:/jasper/trans_excel.jasper")
@ -822,20 +824,23 @@ public class TradeLogServiceImpl implements TradeLogService {
parmerters.put("incremental_fee", takeDecimalOrDefault(analysis, "total_incremental_surcharge", BigDecimal.ZERO));
parmerters.put("incremental_gst", takeDecimalOrDefault(analysis, "total_incremental_tax", BigDecimal.ZERO));
parmerters.put("royalpay_gst", analysis.getBigDecimal("tax_amount").subtract(analysis.getBigDecimal("total_incremental_tax")).setScale(2,RoundingMode.HALF_UP));
parmerters.put("total_transaction_fee", analysis.getBigDecimal("total_transaction_fee").add(analysis.getBigDecimal("total_transaction_fee_tax")).setScale(2,RoundingMode.HALF_UP));
parmerters.put("total_royalpay_fee", analysis.getBigDecimal("total_surcharge").subtract(parmerters.getBigDecimal("total_transaction_fee")).setScale(2,RoundingMode.HALF_UP));
BigDecimal totalTransactionFee = analysis.getBigDecimal("total_transaction_fee").add(analysis.getBigDecimal("total_transaction_fee_tax")).setScale(2, RoundingMode.HALF_UP);
BigDecimal totalRoyalpayFee = analysis.getBigDecimal("total_surcharge")
.subtract(analysis.getBigDecimal("total_transaction_fee"))
.subtract(analysis.getBigDecimal("total_transaction_fee_tax"))
.subtract(analysis.getBigDecimal("total_incremental_surcharge"))
.subtract(analysis.getBigDecimal("total_incremental_tax")).setScale(2, RoundingMode.HALF_UP);
parmerters.put("total_transaction_fee", totalTransactionFee);
parmerters.put("total_royalpay_fee", totalRoyalpayFee);
parmerters.put("total_card_fee", totalRoyalpayFee.add(totalTransactionFee));
parmerters.put("total_incremental_fee", parmerters.getBigDecimal("incremental_fee").add(parmerters.getBigDecimal("incremental_gst")));
dataList.parallelStream().forEach(item -> {
BigDecimal incrementalSurcharge = item.containsKey("incremental_surcharge") ? item.getBigDecimal("incremental_surcharge") : BigDecimal.ZERO;
BigDecimal taxAmount = item.containsKey("tax_amount") ? item.getBigDecimal("tax_amount") : BigDecimal.ZERO;
BigDecimal royalpaySurhcarge = item.containsKey("royal_surcharge") ? item.getBigDecimal("royal_surcharge") : BigDecimal.ZERO;
BigDecimal surhcargeBack = item.containsKey("surcharge_cashback") ? item.getBigDecimal("surcharge_cashback") : BigDecimal.ZERO;
BigDecimal channelSurcharge = item.containsKey("channel_surcharge") ? item.getBigDecimal("channel_surcharge") : BigDecimal.ZERO;
BigDecimal incrementalTax = incrementalSurcharge.divide(new BigDecimal(10), 2, RoundingMode.HALF_UP);
BigDecimal transactionFee = item.getBigDecimal("transaction_fee");
BigDecimal transactionFeeTax = item.getBigDecimal("transaction_fee").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP);
BigDecimal royalpayTax = taxAmount.subtract(incrementalTax).subtract(transactionFeeTax);
BigDecimal realRoyalpayCharge = item.getBigDecimal("total_surcharge").add(taxAmount).subtract(transactionFee).subtract(transactionFeeTax);
BigDecimal realRoyalpayCharge = item.getBigDecimal("total_surcharge").add(taxAmount).subtract(transactionFee).subtract(transactionFeeTax).subtract(incrementalSurcharge).subtract(incrementalTax);
item.put("incremental_surcharge", incrementalSurcharge.add(incrementalTax).setScale(2, RoundingMode.HALF_UP));
item.put("total_surcharge_intax", realRoyalpayCharge.setScale(2, RoundingMode.HALF_UP));
item.put("transaction_fee_intax", transactionFee.add(transactionFeeTax).setScale(2,RoundingMode.HALF_UP));
@ -850,9 +855,8 @@ public class TradeLogServiceImpl implements TradeLogService {
String fileName = client.getString("client_moniker") + "_Card_Payment_" + parmerters.getString("dateRange").replaceAll("/", "");
response.setHeader("Content-Disposition", "attachment;fileName=" + fileName + ".pdf");
OutputStream outs = response.getOutputStream();
// JSONObject clientIncrement = clientIncrementalMapper.findByClinetIdAndChannel(client.getIntValue("client_id"), "RP跨境商城");
// InputStream jasper = clientIncrement == null ? trans_flow.getInputStream() : incremental_trans_flow.getInputStream();
InputStream jasper = upay_trans_flow.getInputStream();
JSONObject clientIncrement = clientIncrementalMapper.findByClinetIdAndChannel(client.getIntValue("client_id"), "RP跨境商城");
InputStream jasper = clientIncrement == null ? upay_trans_flow.getInputStream() : incremental_upay_trans_flow.getInputStream();
byte[] bytes = JasperRunManager.runReportToPdf(jasper, parmerters, jrDataSource);
outs.write(bytes, 0, bytes.length);
outs.flush();

@ -4,4 +4,7 @@ app:
priv-key: MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDE55tREo6t6m1hekGlaMmDivorV3a+MkA/Wna0k917u/CGYIf7FtmWk1um7VcBRdljluLjqThePZgbgtwqTdHWXJP2gPwoJjLUluVEyKh19blSgrq7K1FEryAzQ5XFLzMX//EMc1BNrqcREHC6XVlJeNzpOd8+C83cxGxL+ayLoQ/ePEyp/8yXBbA6t2yXyi7H1ry8WiFFg9RFf+zAeESFXlKIS72fw9I9GxG6PLUhbD8S+IIJ2A0ZudKUQIUw4M0wSilo40lfqp/xRyfUBZevKcPrO5/ZCJX6V2d154s1m5p0Z/eLtQ1ido0quVi/LzBb1KXDYNHV6hPJjNQmNbMnAgMBAAECggEAY/rqLW9LzVk0cwN947xiXg2qW2mM3KRtZP3NOoG+O37BcaoAQelnUILATfFDdVz/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sX85IEMZPkIqPFebAl4IvOuwzvXDPxxgh8B+XBQBydgFADeqgqXG8rxomC4PUrX47pKb1G89bTGp8Dw==
pub-key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmifNnVZG6HZBYdvLnCGyNm7rQTZKyl3w+7xdBGgjsQeaskdy/IgmrWRG4Ii1o82KV/ZA+bw86vE37axpoxbqOU3LYVb69nVYvmJOL018iBs74HhbZ8CtWtQmEIKqmX/rNUdp15OgwzDckvrK/EEzjdOoQfAkFB68wLOsTcsRwBB3JUL/uiHGK6b5Ofmh4PxYeAVNpWYHyCaQIuN6JH85VHBVS4etP25GbgWxl+ktuZucaPsQ2G25mwhlpNiC28J4la0wD33JKMfCNCjORlWkw2HcDvrRLqza4lJOXu0rFy3JuUkZ0hn834ZWd3MboqNNE6a2xe4ppZUJ9ccM9312JQIDAQAB
server-root: https://channel.rpayplus.com/channel/v1/
upload-file-keys:
- upay_application_form
- upay_desc_file

@ -466,7 +466,7 @@
</div>
</div>
<!-- 卡支付配置 -->
<div class="panel panel-default" ng-if="(('111'|withRole) || ('retail_surcharge'|withFunc) )&&paymentInfo.enable_card_payment!=0">
<div class="panel panel-default" ng-if="(('111'|withRole))&&paymentInfo.enable_card_payment!=0">
<div class="panel-heading">Card Payment Config</div>
<div class="panel-body">
<div class="form-horizontal">

@ -390,7 +390,7 @@
<ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="single-button"
style="min-width: 80px">
<li><a target="_blank" ng-href="{{export('pdf')}}">Cross-border Payment PDF</a></li>
<!-- <li><a target="_blank" ng-href="{{export('upay-pdf')}}">Card Payment PDF</a></li>-->
<li><a target="_blank" ng-href="{{export('upay-pdf')}}">Card Payment PDF</a></li>
<li><a target="_blank" ng-href="{{export('excel')}}">EXCEL</a></li>
<li><a target="_blank"
ng-href="{{export('excel_detail')}}">EXCEL(Detail)</a></li>

Loading…
Cancel
Save