|
|
@ -361,7 +361,14 @@ CashRecordDone cashRecordDone1 = new CashRecordDone(); |
|
|
userGoldRecord.setType((byte) 2); |
|
|
userGoldRecord.setType((byte) 2); |
|
|
userGoldRecord.setIsRefund((byte) 1); |
|
|
userGoldRecord.setIsRefund((byte) 1); |
|
|
userGoldRecord.setRefundType("金币退款"); |
|
|
userGoldRecord.setRefundType("金币退款"); |
|
|
userGoldRecord.setCrefundModel(cashRecordDone.getRefundModel()); |
|
|
|
|
|
|
|
|
if (cashRecordDone.getRefundModel() == 1){ |
|
|
|
|
|
userGoldRecord.setRefundModel(Byte.valueOf("1")); |
|
|
|
|
|
} |
|
|
|
|
|
else if (cashRecordDone.getRefundModel() == 0){ |
|
|
|
|
|
userGoldRecord.setRefundModel(Byte.valueOf("0")); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
userGoldRecord.setJwcode(cashRecordDone.getJwcode()); |
|
|
userGoldRecord.setJwcode(cashRecordDone.getJwcode()); |
|
|
userGoldRecord.setSumGold(cashRecordDone.getPermanentGold()+cashRecordDone.getFreeGold()); |
|
|
userGoldRecord.setSumGold(cashRecordDone.getPermanentGold()+cashRecordDone.getFreeGold()); |
|
|
userGoldRecord.setPermanentGold(cashRecordDone.getPermanentGold()); |
|
|
userGoldRecord.setPermanentGold(cashRecordDone.getPermanentGold()); |
|
|
@ -418,6 +425,79 @@ CashRecordDone cashRecordDone1 = new CashRecordDone(); |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public PageInfo<CashRecordDTO> financeSelect(Integer pageNum, Integer pageSize, CashRecordDTO cashRecordDTO) { |
|
|
public PageInfo<CashRecordDTO> financeSelect(Integer pageNum, Integer pageSize, CashRecordDTO cashRecordDTO) { |
|
|
|
|
|
List<String> markets = marketMapper.getMarketIds(cashRecordDTO.getMarkets()); |
|
|
|
|
|
if (markets.contains("9") || markets.contains("9999")){ |
|
|
|
|
|
markets=null; |
|
|
|
|
|
} |
|
|
|
|
|
cashRecordDTO.setMarkets(markets); |
|
|
|
|
|
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper |
|
|
|
|
|
// System.out.println(goldDetail.getMarkets()); |
|
|
|
|
|
List<CashRecordDTO> list = cashRefundMapper.financeSelect(cashRecordDTO); |
|
|
|
|
|
if (list.isEmpty()) { |
|
|
|
|
|
return new PageInfo<>(list); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 批量收集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()); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 批量查询 |
|
|
|
|
|
Map<Integer, CashCollection> cashCollectionMap = cashCollectionMapper.selectBatchIds(relatedIds) |
|
|
|
|
|
.stream().collect(Collectors.toMap(CashCollection::getId, Function.identity())); |
|
|
|
|
|
|
|
|
|
|
|
Map<Integer, String> marketNameMap = marketMapper.getMarketByIds(marketIds) |
|
|
|
|
|
.stream().collect(Collectors.toMap(Market::getId, Market::getName)); |
|
|
|
|
|
|
|
|
|
|
|
Map<Integer, String> submitterNameMap = auditMapper.getNamesByIds(submitterIds) |
|
|
|
|
|
.stream().collect(Collectors.toMap(Admin::getId, Admin::getAdminName)); |
|
|
|
|
|
|
|
|
|
|
|
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 -> { |
|
|
|
|
|
CashCollection cashCollection = cashCollectionMap.get(item.getRelatedId()); |
|
|
|
|
|
if (cashCollection != null) { |
|
|
|
|
|
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()); |
|
|
|
|
|
item.setAreaFinance(lhlAudit.getAreaFinance()); |
|
|
|
|
|
item.setAreaCharge(lhlAudit.getAreaCharge()); |
|
|
|
|
|
item.setHeadFinance(lhlAudit.getHeadFinance()); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return new PageInfo<>(list); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public PageInfo<CashRecordDTO> financeSelect2(Integer pageNum, Integer pageSize, CashRecordDTO cashRecordDTO) { |
|
|
|
|
|
List<String> markets = marketMapper.getMarketIds(cashRecordDTO.getMarkets()); |
|
|
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper |
|
|
PageHelper.startPage(pageNum, pageSize); //必须要直接跟mapper |
|
|
// System.out.println(goldDetail.getMarkets()); |
|
|
// System.out.println(goldDetail.getMarkets()); |
|
|
List<CashRecordDTO> list = cashRefundMapper.financeSelect(cashRecordDTO); |
|
|
List<CashRecordDTO> list = cashRefundMapper.financeSelect(cashRecordDTO); |
|
|
|