Exemple #1
0
 def get_product_by_barcode(self, branchcode, barcode):
     productbarcode = ProductBarCode(branchcode)
     rst = productbarcode.seek_branch_product_barcode(barcode)
     # barcode查询步到,使用prodid查询
     if len(rst) == 2:
         rst = productbarcode.seek_branch_product_proid(barcode)
     return rst
Exemple #2
0
def sync_all():
    check_branch_sqllite()
    activebranch=GetBranch()
    branches=activebranch.get_active_branch()
    for row in branches:
        print row[0],row[1]
        branch = Branch(row[0])
        branchemployee = BranchEmployee(row[0])
        product = Product(row[0])
        productbarcode = ProductBarCode(row[0])
        productbranchrel = ProductBranchRel(row[0])
        pmtdmrel = PMTDMREL(row[0])

        branchemployee.sync_branch_employee()
        branch.sync_branch()
        product.sync_product()
        productbarcode.sync_productbarcode()
        productbranchrel.sync_productbranchrel()
        pmtdmrel.sync_pmtdmdel()
Exemple #3
0
 def get_product_by_proname(self, branchcode, proname):
     productbarcode = ProductBarCode(branchcode)
     rst = productbarcode.seek_branch_product_name(proname)
     return rst