logistics/logisticsClass/logisticsTail_CA.py

34 lines
923 B
Python

""" 加拿大尾端物流模块实现类"""
import math
import re
import pandas
from logisticsClass.logisticsBaseClass import LogisticsType, TailLogistics
from pathlib import Path
from utils.gtools import DBconnect
class FedexLogistics(TailLogistics):
"""Fedex"""
country = "United States"
country_code = "US"
def __init__(self):
super().__init__()
self.fuel_rate = 0.18 # 燃油费率
def calculate_fee(self,packages,postcode):
"""计算运费,抛重计费,系数275"""
detail_amount = {
"base":0.00,
"oversize":0.00,
"remote":0.00,
"big_package":0.00,
"big_package_peak":0.00,
"residential_delivery":0.00,
"residential_peak":0.00,
"fuel":0.00,
"tail_amount":0.00
}
# 先看分区
zone = self.get_west_zone(postcode)