|
|
@@ -535,21 +535,32 @@ public class KwpSettlementWalletService {
|
|
|
* @param id 结算单id
|
|
|
* @return
|
|
|
*/
|
|
|
- public BigDecimal getConfirmTradePayment(Long id) {
|
|
|
- SettlementTradeDto byId = kwpSettlementTradeService.getById(id, TradeUnitType.SELL);
|
|
|
- if (Objects.isNull(byId)) {
|
|
|
- throw new BusinessException("结算单不存在");
|
|
|
- }
|
|
|
- if (StringUtils.isNotBlank(byId.getTrading()) && !byId.getTrading().startsWith(TradingEnum.RECEIVE_PAY.getValue())) {
|
|
|
- throw new BusinessException("只支持货货到付款方式订单进行当前操作");
|
|
|
- }
|
|
|
- List<LedgerUnitDto> listById = kwpSettlementTradeService.getListById(id);
|
|
|
- if (CollectionUtils.isEmpty(listById) || listById.size() != NumberConstant.TWO) {
|
|
|
- throw new BusinessException("对账单交易企业双方不存在或缺少");
|
|
|
- }
|
|
|
- return getWalletBalance(listById, byId.getTrading());
|
|
|
-
|
|
|
-
|
|
|
+ public WalletDto getConfirmTradePayment(Long id) {
|
|
|
+ //todo
|
|
|
+ WalletDto walletDto = new WalletDto();
|
|
|
+ walletDto.setName("测试钱宝");
|
|
|
+ walletDto.setMemberName("");
|
|
|
+ walletDto.setUid("kll_0001");
|
|
|
+ walletDto.setChannel("1");
|
|
|
+ walletDto.setCreateTime(LocalDateTime.now());
|
|
|
+ walletDto.setFilter("kll_0002");
|
|
|
+ walletDto.setFreeze(0L);
|
|
|
+ walletDto.setApMoney(0L);
|
|
|
+ walletDto.setTotalMoney(12000L);
|
|
|
+ walletDto.setMoney(1L);
|
|
|
+
|
|
|
+ return walletDto;
|
|
|
+// SettlementTradeDto byId = kwpSettlementTradeService.getById(id, TradeUnitType.SELL);
|
|
|
+// if (Objects.isNull(byId)) {
|
|
|
+// throw new BusinessException("结算单不存在");
|
|
|
+// }
|
|
|
+// if (StringUtils.isNotBlank(byId.getTrading()) && !byId.getTrading().startsWith(TradingEnum.RECEIVE_PAY.getValue())) {
|
|
|
+// throw new BusinessException("只支持货货到付款方式订单进行当前操作");
|
|
|
+// }
|
|
|
+// List<LedgerUnitDto> listById = kwpSettlementTradeService.getListById(id);
|
|
|
+// if (CollectionUtils.isEmpty(listById) || listById.size() != NumberConstant.TWO) {
|
|
|
+// throw new BusinessException("对账单交易企业双方不存在或缺少");
|
|
|
+// }
|
|
|
// Long uid = null;
|
|
|
// Long filter = null;
|
|
|
// for (LedgerUnitDto ledgerUnitDto : listById) {
|
|
|
@@ -572,9 +583,9 @@ public class KwpSettlementWalletService {
|
|
|
// throw new BusinessException("暂未开通电子钱包");
|
|
|
// }
|
|
|
// List<WalletDto> data = wallet.getData();
|
|
|
+// return data.get(NumberConstant.ZERO);
|
|
|
// return BigDecimal.valueOf(data.get(NumberConstant.ZERO).getMoney() / 100.0);
|
|
|
}
|
|
|
-
|
|
|
private BigDecimal getWalletBalance(List<LedgerUnitDto> listById, String trading) {
|
|
|
Long uid = null;
|
|
|
Long filter = null;
|