Subversion Repositories SmartDukaan

Rev

Rev 20724 | Rev 22634 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 20724 Rev 20745
Line 6... Line 6...
6
from shop2020.clients.CatalogClient import CatalogClient
6
from shop2020.clients.CatalogClient import CatalogClient
7
from shop2020.clients.InventoryClient import InventoryClient
7
from shop2020.clients.InventoryClient import InventoryClient
8
from shop2020.config.client.ConfigClient import ConfigClient
8
from shop2020.config.client.ConfigClient import ConfigClient
9
from shop2020.logistics.service.impl import DataAccessor
9
from shop2020.logistics.service.impl import DataAccessor
10
from shop2020.logistics.service.impl.Converters import to_t_awbupdate, \
10
from shop2020.logistics.service.impl.Converters import to_t_awbupdate, \
11
    to_t_provider, to_t_pickup_store
11
    to_t_provider, to_t_pickup_store, to_t_bluedart_attribute
12
from shop2020.logistics.service.impl.DataAccessor import get_empty_AWB, \
12
from shop2020.logistics.service.impl.DataAccessor import get_empty_AWB, \
13
    get_shipment_info, initialize, get_logistics_estimation, get_provider, \
13
    get_shipment_info, initialize, get_logistics_estimation, get_provider, \
14
    get_providers, close_session, get_free_awb_count, get_holidays, is_alive, \
14
    get_providers, close_session, get_free_awb_count, get_holidays, is_alive, \
15
    get_provider_for_pickup_type, get_pickup_store, get_all_pickup_stores, \
15
    get_provider_for_pickup_type, get_pickup_store, get_all_pickup_stores, \
16
    get_pickup_store_by_hotspot_id, get_destination_code, update_pincode, \
16
    get_pickup_store_by_hotspot_id, get_destination_code, update_pincode, \
17
    add_pincode, store_shipment_info, adjust_delivery_time, get_min_advance_amount, \
17
    add_pincode, store_shipment_info, adjust_delivery_time, get_min_advance_amount, \
18
    add_new_awbs, run_Logistics_Location_Info_Update, \
18
    add_new_awbs, run_Logistics_Location_Info_Update, \
19
    get_first_delivery_estimate_for_wh_location, \
19
    get_first_delivery_estimate_for_wh_location, \
20
    get_provider_limit_details_for_pincode, get_new_empty_awb, \
20
    get_provider_limit_details_for_pincode, get_new_empty_awb, \
21
    get_logistics_locations, get_costing_and_delivery_estimate_for_pincode
21
    get_logistics_locations, get_costing_and_delivery_estimate_for_pincode, \
-
 
22
    get_bluedart_attributes_for_logistics_txn_id
22
from shop2020.logistics.service.impl.DataService import \
23
from shop2020.logistics.service.impl.DataService import \
23
    ServiceableLocationDetails
24
    ServiceableLocationDetails
24
from shop2020.thriftpy.logistics.ttypes import ItemText, LogisticsInfo, \
25
from shop2020.thriftpy.logistics.ttypes import ItemText, LogisticsInfo, \
25
    LogisticsServiceException, DeliveryType, PickUpType
26
    LogisticsServiceException, DeliveryType, PickUpType
26
from shop2020.thriftpy.model.v1.catalog.ttypes import status
27
from shop2020.thriftpy.model.v1.catalog.ttypes import status
Line 446... Line 447...
446
            costingAndDeliveryEstimateObj.deliveryTime = delivery_time
447
            costingAndDeliveryEstimateObj.deliveryTime = delivery_time
447
            costingAndDeliveryEstimateObj.shippingTime = shipping_delay
448
            costingAndDeliveryEstimateObj.shippingTime = shipping_delay
448
            return costingAndDeliveryEstimateObj
449
            return costingAndDeliveryEstimateObj
449
        finally:
450
        finally:
450
            close_session()
451
            close_session()
451
            
-
 
452
452
    
-
 
453
    def getBluedartAttributesForLogisticsTxnId(self, logisticsTxnId, name):
-
 
454
        try:
-
 
455
            return to_t_bluedart_attribute(get_bluedart_attributes_for_logistics_txn_id(logisticsTxnId, name))
-
 
456
        finally:
-
 
457
            close_session()
-
 
458
453
459