| Line 7... |
Line 7... |
| 7 |
from dtr.storage import Mongo
|
7 |
from dtr.storage import Mongo
|
| 8 |
from dtr.storage.DataService import Retailers, Users, CallHistory, RetryConfig, \
|
8 |
from dtr.storage.DataService import Retailers, Users, CallHistory, RetryConfig, \
|
| 9 |
RetailerLinks, Activation_Codes, Agents, Agent_Roles, AgentLoginTimings, \
|
9 |
RetailerLinks, Activation_Codes, Agents, Agent_Roles, AgentLoginTimings, \
|
| 10 |
FetchDataHistory, RetailerContacts, Orders, OnboardedRetailerChecklists,\
|
10 |
FetchDataHistory, RetailerContacts, Orders, OnboardedRetailerChecklists,\
|
| 11 |
RetailerAddresses, Pincodeavailability, app_offers, appmasters, user_app_cashbacks, user_app_installs,\
|
11 |
RetailerAddresses, Pincodeavailability, app_offers, appmasters, user_app_cashbacks, user_app_installs,\
|
| 12 |
Postoffices, UserCrmCallingData, CallHistoryCrm
|
12 |
Postoffices, UserCrmCallingData, CallHistoryCrm, ProductPricingInputs
|
| 13 |
from dtr.storage.Mongo import get_mongo_connection
|
13 |
from dtr.storage.Mongo import get_mongo_connection
|
| 14 |
from dtr.storage.Mysql import fetchResult
|
14 |
from dtr.storage.Mysql import fetchResult
|
| 15 |
from dtr.utils import FetchLivePrices, DealSheet as X_DealSheet, \
|
15 |
from dtr.utils import FetchLivePrices, DealSheet as X_DealSheet, \
|
| 16 |
UserSpecificDeals
|
16 |
UserSpecificDeals
|
| 17 |
from dtr.utils.utils import getLogger,encryptMessage,decryptMessage,\
|
17 |
from dtr.utils.utils import getLogger,encryptMessage,decryptMessage,\
|
| Line 1759... |
Line 1759... |
| 1759 |
self.callHistoryCrm.disposition_description='Will Place Order'
|
1759 |
self.callHistoryCrm.disposition_description='Will Place Order'
|
| 1760 |
session.commit()
|
1760 |
session.commit()
|
| 1761 |
lgr.info( "Disposition Id ----" + str(self.callHistoryCrm.id))
|
1761 |
lgr.info( "Disposition Id ----" + str(self.callHistoryCrm.id))
|
| 1762 |
jdata =self.inputs
|
1762 |
jdata =self.inputs
|
| 1763 |
lgr.info( "Input ----" + str(jdata))
|
1763 |
lgr.info( "Input ----" + str(jdata))
|
| - |
|
1764 |
if jdata:
|
| 1764 |
for d in jdata:
|
1765 |
for d in jdata:
|
| 1765 |
for key, value in d.iteritems():
|
1766 |
for key, value in d.iteritems():
|
| - |
|
1767 |
productpricingInputs = ProductPricingInputs()
|
| - |
|
1768 |
productpricingInputs.user_id = self.callHistoryCrm.user_id
|
| - |
|
1769 |
productpricingInputs.agent_id = self.callHistoryCrm.agent_id
|
| - |
|
1770 |
productpricingInputs.disposition_id = self.callHistoryCrm.id
|
| - |
|
1771 |
productpricingInputs.user_id = self.callHistoryCrm.user_id
|
| - |
|
1772 |
productpricingInputs.call_disposition = self.callHistoryCrm.call_disposition
|
| - |
|
1773 |
productpricingInputs.project_id = self.callHistoryCrm.project_id
|
| 1766 |
lgr.info( "Output " + key +" " + value)
|
1774 |
productpricingInputs.product_input = key
|
| - |
|
1775 |
productpricingInputs.pricing_input = value
|
| - |
|
1776 |
session.commit()
|
| 1767 |
return True
|
1777 |
return True
|
| 1768 |
|
1778 |
|
| 1769 |
def callLaterAccs(self):
|
1779 |
def callLaterAccs(self):
|
| 1770 |
self.user.status='retry'
|
1780 |
self.user.status='retry'
|
| 1771 |
self.user.modified = datetime.now()
|
1781 |
self.user.modified = datetime.now()
|
| Line 1805... |
Line 1815... |
| 1805 |
self.user.disposition=self.callDisposition
|
1815 |
self.user.disposition=self.callDisposition
|
| 1806 |
session.commit()
|
1816 |
session.commit()
|
| 1807 |
lgr.info( "Disposition Id ----\n" + str(self.callHistoryCrm.id))
|
1817 |
lgr.info( "Disposition Id ----\n" + str(self.callHistoryCrm.id))
|
| 1808 |
jdata =self.inputs
|
1818 |
jdata =self.inputs
|
| 1809 |
lgr.info( "Input ----\n" + str(jdata))
|
1819 |
lgr.info( "Input ----\n" + str(jdata))
|
| - |
|
1820 |
if jdata:
|
| 1810 |
for d in jdata:
|
1821 |
for d in jdata:
|
| 1811 |
for key, value in d.iteritems():
|
1822 |
for key, value in d.iteritems():
|
| - |
|
1823 |
productpricingInputs = ProductPricingInputs()
|
| - |
|
1824 |
productpricingInputs.user_id = self.callHistoryCrm.user_id
|
| - |
|
1825 |
productpricingInputs.agent_id = self.callHistoryCrm.agent_id
|
| - |
|
1826 |
productpricingInputs.disposition_id = self.callHistoryCrm.id
|
| - |
|
1827 |
productpricingInputs.user_id = self.callHistoryCrm.user_id
|
| - |
|
1828 |
productpricingInputs.call_disposition = self.callHistoryCrm.call_disposition
|
| - |
|
1829 |
productpricingInputs.project_id = self.callHistoryCrm.project_id
|
| 1812 |
lgr.info( "Output " + key +" " + value)
|
1830 |
productpricingInputs.product_input = key
|
| - |
|
1831 |
productpricingInputs.pricing_input = value
|
| - |
|
1832 |
session.commit()
|
| 1813 |
return True
|
1833 |
return True
|
| 1814 |
|
1834 |
|
| 1815 |
def insertUserCrmData(project_id):
|
1835 |
def insertUserCrmData(project_id):
|
| 1816 |
if project_id==1:
|
1836 |
if project_id==1:
|
| 1817 |
getCartDetailsUser()
|
1837 |
getCartDetailsUser()
|