|
|
@@ -2,6 +2,7 @@ package com.sckw.payment.service;
|
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
+import com.sckw.core.common.enums.enums.DictTypeEnum;
|
|
|
import com.sckw.core.exception.BusinessException;
|
|
|
import com.sckw.core.model.vo.TableTop;
|
|
|
import com.sckw.core.utils.StringTimeUtil;
|
|
|
@@ -10,6 +11,7 @@ import com.sckw.payment.dao.KwpSettlementLogisticsMapper;
|
|
|
import com.sckw.payment.model.KwpSettlementLogistics;
|
|
|
import com.sckw.payment.model.constant.LogisticsUnitType;
|
|
|
import com.sckw.payment.model.constant.SettlementEnum;
|
|
|
+import com.sckw.payment.model.constant.TradingEnum;
|
|
|
import com.sckw.payment.model.dto.SettlementLogisticsDto;
|
|
|
import com.sckw.payment.model.vo.req.SettlementReq;
|
|
|
import com.sckw.payment.model.vo.res.SettlementLogisticsStatusCountVo;
|
|
|
@@ -17,6 +19,7 @@ import com.sckw.payment.model.vo.res.SettlementLogisticsSumVo;
|
|
|
import com.sckw.payment.utils.CommonValidator;
|
|
|
import com.sckw.payment.utils.PageMoreRes;
|
|
|
import com.sckw.system.api.RemoteSystemService;
|
|
|
+import com.sckw.system.api.model.dto.res.SysDictResDto;
|
|
|
import com.sckw.system.api.model.dto.res.UserCacheResDto;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -244,6 +247,18 @@ public class KwpSettlementLogisticsService {
|
|
|
return settlementLogisticsDto;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private String changeDict(String trading) {
|
|
|
+ //字典等数据转换
|
|
|
+ String tradingLabel = "";
|
|
|
+ Map<String, SysDictResDto> dictResDtoMap = remoteSystemService.queryDictMapByType(DictTypeEnum.TRADE_TYPE.getType());
|
|
|
+ SysDictResDto sysDictResDto = dictResDtoMap.get(trading);
|
|
|
+ if (Objects.nonNull(sysDictResDto)) {
|
|
|
+ tradingLabel = sysDictResDto.getLabel();
|
|
|
+ }
|
|
|
+ return tradingLabel;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 增加 创建、更新人名称及字段
|
|
|
*
|
|
|
@@ -251,12 +266,16 @@ public class KwpSettlementLogisticsService {
|
|
|
* @date 2023-08-07 10:14
|
|
|
*/
|
|
|
private void setDetailDesc(SettlementLogisticsDto settlementLogisticsDto) {
|
|
|
+ //更改支付方式 TradingEnum
|
|
|
+ settlementLogisticsDto.setTradingLabel(changeDict(settlementLogisticsDto.getTrading()));
|
|
|
+
|
|
|
+ //更改创建、更新人名称及字段
|
|
|
settlementLogisticsDto.setStatusLabel(SettlementEnum.getStatusDesc(settlementLogisticsDto.getStatus()));
|
|
|
- if (settlementLogisticsDto.getSettlePrice() != null) {
|
|
|
+ if (settlementLogisticsDto.getTotalPrice() != null) {
|
|
|
if (settlementLogisticsDto.getActualPrice() != null) {
|
|
|
- settlementLogisticsDto.setWaitPrice(settlementLogisticsDto.getSettlePrice().subtract(settlementLogisticsDto.getActualPrice()));
|
|
|
+ settlementLogisticsDto.setWaitPrice(settlementLogisticsDto.getTotalPrice().subtract(settlementLogisticsDto.getActualPrice()));
|
|
|
} else {
|
|
|
- settlementLogisticsDto.setWaitPrice(settlementLogisticsDto.getSettlePrice());
|
|
|
+ settlementLogisticsDto.setWaitPrice(settlementLogisticsDto.getTotalPrice());
|
|
|
}
|
|
|
} else {
|
|
|
settlementLogisticsDto.setWaitPrice(new BigDecimal(0));
|