Subversion Repositories SmartDukaan

Rev

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

Rev 18951 Rev 18960
Line 18... Line 18...
18
from sqlalchemy.sql.expression import or_
18
from sqlalchemy.sql.expression import or_
19
import datetime
19
import datetime
20
import os, binascii
20
import os, binascii
21
from shop2020.model.v1.user.impl.Converters import to_t_line
21
from shop2020.model.v1.user.impl.Converters import to_t_line
22
 
22
 
23
CounterStateMap = {"Telangana" : "TS", "Andhra Pradesh" : "AP", "Delhi" : "DL"}
23
CounterStateMap = {"Andhra Pradesh":"AP",
-
 
24
                    "Arunachal Pradesh":"AR",
-
 
25
                    "Assam":"AS",
-
 
26
                    "Bihar":"BR",
-
 
27
                    "Chhattisgarh":"CT",
-
 
28
                    "Goa":"GA",
-
 
29
                    "Gujarat":"GJ",
-
 
30
                    "Haryana":"HR",
-
 
31
                    "Himachal Pradesh":"HP",
-
 
32
                    "Jammu and Kashmir":"JK",
-
 
33
                    "Jharkhand":"JH",
-
 
34
                    "Karnataka":"KA",
-
 
35
                    "Kerala":"KL",
-
 
36
                    "Madhya Pradesh":"MP",
-
 
37
                    "Maharashtra":"MH",
-
 
38
                    "Manipur":"MN",
-
 
39
                    "Meghalaya":"ML",
-
 
40
                    "Mizoram":"MZ",
-
 
41
                    "Nagaland":"NL",
-
 
42
                    "Odisha":"OR",
-
 
43
                    "Punjab":"PB",
-
 
44
                    "Rajasthan":"RJ",
-
 
45
                    "Sikkim":"SK",
-
 
46
                    "Tamil Nadu":"TN",
-
 
47
                    "Telangana":"TS",
-
 
48
                    "Tripura":"TR",
-
 
49
                    "Uttarakhand":"UT",
-
 
50
                    "Uttar Pradesh":"UP",
-
 
51
                    "West Bengal":"WB",
-
 
52
                    "Andaman and Nicobar Islands":"AN",
-
 
53
                    "Chandigarh":"CH",
-
 
54
                    "Dadra and Nagar Haveli":"DN",
-
 
55
                    "Daman and Diu":"DD",
-
 
56
                    "Delhi":"DL",
-
 
57
                    "Lakshadweep":"LD",
-
 
58
                    "Puducherry":"PY",
-
 
59
                    "Pondicherry":"PY"
-
 
60
                    }
24
 
61
 
25
def initialize(dbname='user', db_hostname="localhost"):
62
def initialize(dbname='user', db_hostname="localhost"):
26
    log_entry("initialize@DataAccessor", "Initializing data service")
63
    log_entry("initialize@DataAccessor", "Initializing data service")
27
    Dataservice.initialize(dbname, db_hostname)
64
    Dataservice.initialize(dbname, db_hostname)
28
 
65
 
Line 669... Line 706...
669
    m = {}
706
    m = {}
670
    m['counter_code'] = counter.code
707
    m['counter_code'] = counter.code
671
    return m 
708
    return m 
672
 
709
 
673
def _setCounter(counter,tCounter,address):
710
def _setCounter(counter,tCounter,address):
674
    counter = Counter()
-
 
675
    counter.name = tCounter.name
711
    counter.name = tCounter.name
676
    counter.ownerName = tCounter.ownerName
712
    counter.ownerName = tCounter.ownerName
677
    counter.createdOn = datetime.datetime.now()
713
    counter.createdOn = datetime.datetime.now()
678
    counter.email = tCounter.email
714
    counter.email = tCounter.email
679
    counter.mobile = tCounter.mobile
715
    counter.mobile = tCounter.mobile