|
@@ -21,6 +21,7 @@ import com.sckw.payment.model.*;
|
|
|
import com.sckw.payment.model.constant.LedgerEnum;
|
|
import com.sckw.payment.model.constant.LedgerEnum;
|
|
|
import com.sckw.payment.model.constant.SettlementEnum;
|
|
import com.sckw.payment.model.constant.SettlementEnum;
|
|
|
import com.sckw.payment.model.constant.TradeUnitType;
|
|
import com.sckw.payment.model.constant.TradeUnitType;
|
|
|
|
|
+import com.sckw.payment.model.constant.TradingEnum;
|
|
|
import com.sckw.payment.model.dto.*;
|
|
import com.sckw.payment.model.dto.*;
|
|
|
import com.sckw.payment.model.vo.req.*;
|
|
import com.sckw.payment.model.vo.req.*;
|
|
|
import com.sckw.payment.model.vo.res.LedgerCountSumVo;
|
|
import com.sckw.payment.model.vo.res.LedgerCountSumVo;
|
|
@@ -253,17 +254,22 @@ public class KwpLedgerTradeService extends AbsLedger {
|
|
|
tradeOrderService.check(ids);
|
|
tradeOrderService.check(ids);
|
|
|
List<OrderDetailRes> resList = new ArrayList<>();
|
|
List<OrderDetailRes> resList = new ArrayList<>();
|
|
|
Map<Long, String> map = new HashMap<>();
|
|
Map<Long, String> map = new HashMap<>();
|
|
|
-
|
|
|
|
|
|
|
+ String trading = tradeSendReq.getTrading();
|
|
|
for (Long id : ids) {
|
|
for (Long id : ids) {
|
|
|
OrderDetailRes orderDetailById = tradeOrderInfoService.getOrderDetailById(id);
|
|
OrderDetailRes orderDetailById = tradeOrderInfoService.getOrderDetailById(id);
|
|
|
if (Objects.isNull(orderDetailById)) {
|
|
if (Objects.isNull(orderDetailById)) {
|
|
|
throw new BusinessException("订单未找到");
|
|
throw new BusinessException("订单未找到");
|
|
|
}
|
|
}
|
|
|
- KwpTradeFreeze byTOrderId = kwpTradeFreezeService.getByTOrderId(id);
|
|
|
|
|
- if (Objects.isNull(byTOrderId)) {
|
|
|
|
|
- throw new BusinessException("未找到关联的冻结单");
|
|
|
|
|
|
|
+ //1x 预付款 2x 货到付款 3x 线下付款
|
|
|
|
|
+ Integer prefix = TradingEnum.getPrefix(trading);
|
|
|
|
|
+ //仅预付款需要校验冻结单号
|
|
|
|
|
+ if (Objects.nonNull(prefix) && prefix == TradingEnum.PRE_PAY.getStatus() ) {
|
|
|
|
|
+ KwpTradeFreeze byTOrderId = kwpTradeFreezeService.getByTOrderId(id);
|
|
|
|
|
+ if(Objects.isNull(byTOrderId)){
|
|
|
|
|
+ throw new BusinessException("未找到关联的冻结单");
|
|
|
|
|
+ }
|
|
|
|
|
+ map.put(id, byTOrderId.getOrderNo());
|
|
|
}
|
|
}
|
|
|
- map.put(id, byTOrderId.getOrderNo());
|
|
|
|
|
resList.add(orderDetailById);
|
|
resList.add(orderDetailById);
|
|
|
}
|
|
}
|
|
|
for (Long id : ids) {
|
|
for (Long id : ids) {
|