|
|
|
@ -67,18 +67,20 @@ public class CashRefundServiceImpl implements RefundService { |
|
|
|
if (list.isEmpty()) { |
|
|
|
return new PageInfo<>(list); |
|
|
|
} |
|
|
|
System.out.println("135"); |
|
|
|
|
|
|
|
// 批量收集ID |
|
|
|
Set<Integer> relatedIds = new HashSet<>(); |
|
|
|
Set<Integer> marketIds = new HashSet<>(); |
|
|
|
Set<Integer> submitterIds = new HashSet<>(); |
|
|
|
Set<Integer> auditIds = new HashSet<>(); |
|
|
|
Set<Integer> executorIds = new HashSet<>(); |
|
|
|
|
|
|
|
list.forEach(item -> { |
|
|
|
if (item.getRelatedId() != null) relatedIds.add(item.getRelatedId()); |
|
|
|
if (item.getMarket() != null) marketIds.add(item.getMarket()); |
|
|
|
if (item.getSubmitterId() != null) submitterIds.add(item.getSubmitterId()); |
|
|
|
if (item.getAuditId() != null) auditIds.add(item.getAuditId()); |
|
|
|
if (item.getExecutor() != null) executorIds.add(item.getExecutor()); |
|
|
|
}); |
|
|
|
|
|
|
|
// 批量查询 |
|
|
|
@ -93,6 +95,8 @@ public class CashRefundServiceImpl implements RefundService { |
|
|
|
|
|
|
|
Map<Integer, LhlAudit> auditMap = cashRefundMapper.getAuditBatch(auditIds) |
|
|
|
.stream().collect(Collectors.toMap(LhlAudit::getId, Function.identity())); |
|
|
|
Map<String, String> executorNameMap = auditMapper.getNamesByJwcodes(executorIds) |
|
|
|
.stream().collect(Collectors.toMap(Admin::getAccount, Admin::getAdminName)); |
|
|
|
|
|
|
|
// 处理数据 |
|
|
|
list.forEach(item -> { |
|
|
|
@ -101,12 +105,15 @@ public class CashRefundServiceImpl implements RefundService { |
|
|
|
processCashCollection(item, cashCollection); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String marketName = marketNameMap.get(item.getMarket()); |
|
|
|
String submitter = submitterNameMap.get(item.getSubmitterId()); |
|
|
|
LhlAudit lhlAudit = auditMap.get(item.getAuditId()); |
|
|
|
String executorName = executorNameMap.get(String.valueOf(item.getExecutor())); |
|
|
|
|
|
|
|
item.setMarketName(marketName != null ? marketName : ""); |
|
|
|
item.setSubmitter(submitter != null ? submitter : ""); |
|
|
|
item.setExecutorName(executorName != null ? executorName : ""); |
|
|
|
|
|
|
|
if (lhlAudit != null) { |
|
|
|
item.setAreaServise(lhlAudit.getAreaServise()); |
|
|
|
@ -127,13 +134,15 @@ public class CashRefundServiceImpl implements RefundService { |
|
|
|
BigDecimal free = new BigDecimal(freeGold).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP); |
|
|
|
BigDecimal permanent = new BigDecimal(permanentGold).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
item.setGold(permanent); |
|
|
|
item.setFree(free); |
|
|
|
item.setActivity(cashCollection.getActivity()); |
|
|
|
item.setPaymentCurrency(cashCollection.getPaymentCurrency()); |
|
|
|
item.setPaymentAmount(cashCollection.getPaymentAmount()); |
|
|
|
item.setPaymentAmount(cashCollection.getPaymentAmount().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP)); |
|
|
|
item.setReceivedCurrency(cashCollection.getReceivedCurrency()); |
|
|
|
item.setReceivedAmount(cashCollection.getReceivedAmount()); |
|
|
|
item.setReceivedAmount(cashCollection.getReceivedAmount().divide(new BigDecimal(100), 2, RoundingMode.HALF_UP)); |
|
|
|
item.setPayType(cashCollection.getPayType()); |
|
|
|
item.setPayTime(cashCollection.getPayTime()); |
|
|
|
item.setPayBankCode(cashCollection.getBankCode()); |
|
|
|
@ -382,12 +391,14 @@ CashRecordDone cashRecordDone1 = new CashRecordDone(); |
|
|
|
Set<Integer> marketIds = new HashSet<>(); |
|
|
|
Set<Integer> submitterIds = new HashSet<>(); |
|
|
|
Set<Integer> auditIds = new HashSet<>(); |
|
|
|
Set<Integer> executorIds = new HashSet<>(); |
|
|
|
|
|
|
|
list.forEach(item -> { |
|
|
|
if (item.getRelatedId() != null) relatedIds.add(item.getRelatedId()); |
|
|
|
if (item.getMarket() != null) marketIds.add(item.getMarket()); |
|
|
|
if (item.getSubmitterId() != null) submitterIds.add(item.getSubmitterId()); |
|
|
|
if (item.getAuditId() != null) auditIds.add(item.getAuditId()); |
|
|
|
if (item.getExecutor() != null) executorIds.add(item.getExecutor()); |
|
|
|
}); |
|
|
|
|
|
|
|
// 批量查询 |
|
|
|
@ -402,6 +413,8 @@ CashRecordDone cashRecordDone1 = new CashRecordDone(); |
|
|
|
|
|
|
|
Map<Integer, LhlAudit> auditMap = cashRefundMapper.getAuditBatch(auditIds) |
|
|
|
.stream().collect(Collectors.toMap(LhlAudit::getId, Function.identity())); |
|
|
|
Map<String, String> executorNameMap = auditMapper.getNamesByJwcodes(executorIds) |
|
|
|
.stream().collect(Collectors.toMap(Admin::getAccount, Admin::getAdminName)); |
|
|
|
|
|
|
|
// 处理数据 |
|
|
|
list.forEach(item -> { |
|
|
|
@ -410,12 +423,15 @@ CashRecordDone cashRecordDone1 = new CashRecordDone(); |
|
|
|
processCashCollection(item, cashCollection); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String marketName = marketNameMap.get(item.getMarket()); |
|
|
|
String submitter = submitterNameMap.get(item.getSubmitterId()); |
|
|
|
LhlAudit lhlAudit = auditMap.get(item.getAuditId()); |
|
|
|
String executorName = executorNameMap.get(String.valueOf(item.getExecutor())); |
|
|
|
|
|
|
|
item.setMarketName(marketName != null ? marketName : ""); |
|
|
|
item.setSubmitter(submitter != null ? submitter : ""); |
|
|
|
item.setExecutorName(executorName != null ? executorName : ""); |
|
|
|
|
|
|
|
if (lhlAudit != null) { |
|
|
|
item.setAreaServise(lhlAudit.getAreaServise()); |
|
|
|
|