Browse Source

feat(all): 修改结算配送费逻辑

1 修改结算费的计算逻辑,取消配送计价方式的匹配
visual
zhaoqiaobo 5 months ago
parent
commit
169c8bc954
  1. 49
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java

49
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java

@ -10,17 +10,41 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.logpm.basicdata.entity.BasicdataPriceTemplateEntity;
import com.logpm.basicdata.feign.IBasicdataCodeClient;
import com.logpm.basicdata.feign.IBasicdataPriceClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.basicdata.vo.*;
import com.logpm.basicdata.vo.BasicdatPriceApiVO;
import com.logpm.basicdata.vo.PriceClientVO;
import com.logpm.basicdata.vo.PriceDispatchBasicVO;
import com.logpm.basicdata.vo.PriceDispatchVO;
import com.logpm.basicdata.vo.PriceWarehouseAdditionalVO;
import com.logpm.basicdata.vo.PriceWarehouseBasicVO;
import com.logpm.basicdata.vo.PriceWarehouseVO;
import com.logpm.statistics.dto.AftersalesOrderDTO;
import com.logpm.statistics.dto.ChangesRecordDTO;
import com.logpm.statistics.dto.MerchantStatisticsDTO;
import com.logpm.statistics.entity.*;
import com.logpm.statistics.entity.StatisticsAftersalesOrderRecordEntity;
import com.logpm.statistics.entity.StatisticsBalanceOrderInfoEntity;
import com.logpm.statistics.entity.StatisticsChangesPhotoEntity;
import com.logpm.statistics.entity.StatisticsChangesRecordEntity;
import com.logpm.statistics.entity.StatisticsDistributionPackageEntity;
import com.logpm.statistics.entity.StatisticsOrderInfoEntity;
import com.logpm.statistics.entity.StatisticsReconciliationOrderInfoEntity;
import com.logpm.statistics.entity.StatisticsWarehousePackageEntity;
import com.logpm.statistics.mapper.StatisticsOrderInfoMapper;
import com.logpm.statistics.service.*;
import com.logpm.statistics.vo.*;
import com.logpm.statistics.service.IStatisticsAftersalesOrderRecordService;
import com.logpm.statistics.service.IStatisticsBalanceOrderInfoService;
import com.logpm.statistics.service.IStatisticsChangesPhotoService;
import com.logpm.statistics.service.IStatisticsChangesRecordService;
import com.logpm.statistics.service.IStatisticsDistributionPackageService;
import com.logpm.statistics.service.IStatisticsOrderInfoService;
import com.logpm.statistics.service.IStatisticsReconciliationOrderInfoService;
import com.logpm.statistics.service.IStatisticsWarehousePackageService;
import com.logpm.statistics.vo.StatisticsChangesRecordVO;
import com.logpm.statistics.vo.StatisticsOrderInfoExportVO;
import com.logpm.statistics.vo.StatisticsOrderInfoVO;
import com.logpm.statistics.vo.StatisticsPackageFeeInfoVO;
import com.logpm.statistics.vo.StatisticsReconciliationOrderInfoVO;
import com.logpm.statistics.vo.WaybillDetailByWaybillNoVo;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.enums.BooleanZeroOneEnums;
@ -35,7 +59,16 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
@ -834,7 +867,7 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl<StatisticsOr
private void calculateDispatchCost(BasicdataPriceTemplateEntity template, String typeService, List<StatisticsDistributionPackageEntity> distributionPackageEntities, PriceDispatchVO dispatch, Integer dispatchIsMinCost, Long brandId, Long consigneeId) {
String dispatchPricingType = template.getDispatchPricingType();
// 服务类型与模版的服务类型一致
if (StrUtil.equals(dispatchPricingType, typeService)) {
// if (StrUtil.equals(dispatchPricingType, typeService)) {
// 计算基础配送费
Integer dispatchIsByCategory = template.getDispatchIsByCategory();
if (ObjectUtil.isNotEmpty(dispatch)) {
@ -895,7 +928,7 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl<StatisticsOr
});
distributionPackageService.saveOrUpdateBatch(distributionPackageEntities);
}
}
// }
}
private void buildBasicDispatchCost(StatisticsDistributionPackageEntity statisticsDistributionPackageEntity, PriceDispatchVO dispatch, Integer dispatchIsByCategory) {

Loading…
Cancel
Save