修改顺丰运费个省份价格

设置运费75折
This commit is contained in:
wuchunlei
2025-08-19 09:19:27 +08:00
parent ccb4483121
commit 4086aeda01

View File

@@ -70,15 +70,20 @@ public class ExpressFeeServiceImpl extends ServiceImpl<ExpressFeeDao, ExpressFee
} else{
int weightInterval;
BigDecimal additionalWeight;
BigDecimal thridLevel = new BigDecimal(20);
if (regionCode.startsWith("15")||regionCode.startsWith("51")||regionCode.startsWith("64")
||regionCode.startsWith("46")||regionCode.startsWith("62")||regionCode.startsWith("35")){
thridLevel = new BigDecimal(15);
}
if (weight.compareTo(new BigDecimal(0)) >= 0 && weight.compareTo(new BigDecimal(3)) < 0) {
weightInterval = 1;
additionalWeight = weight.subtract(new BigDecimal(1));
} else if (weight.compareTo(new BigDecimal(3)) >= 0 && weight.compareTo(new BigDecimal(15)) < 0) {
} else if (weight.compareTo(new BigDecimal(3)) >= 0 && weight.compareTo(thridLevel) < 0) {
weightInterval = 2;
additionalWeight = weight.subtract(new BigDecimal(3));
} else {
weightInterval = 3;
additionalWeight = weight.subtract(new BigDecimal(15));
additionalWeight = weight.subtract(thridLevel);
}
QueryWrapper<ExpressFee> queryWrapper = new QueryWrapper<>();
if (!regionCode.startsWith("11") && !regionCode.startsWith("12") && !regionCode.startsWith("31") && !regionCode.startsWith("50")) {
@@ -91,6 +96,7 @@ public class ExpressFeeServiceImpl extends ServiceImpl<ExpressFeeDao, ExpressFee
BigDecimal firstWeightFee = expressFee.getFirstWeightFee();
BigDecimal additionalWeightFee = (expressFee.getAdditionalWeightFee()).multiply(additionalWeight);
flag = firstWeightFee.add(additionalWeightFee);
flag = flag.multiply(new BigDecimal(0.75)).setScale(2,BigDecimal.ROUND_HALF_UP);
}
return flag;
}