예제 #1
0
파일: app.py 프로젝트: ROOPABUDDA/RVS_SALES
def getIndustryList():
    orgDetails = orgData()
    IndustryList = []
    for industry in orgDetails:
        IndustryList.append(industry.org_primaryindustry)
    print(IndustryList)
    return IndustryList
예제 #2
0
파일: app.py 프로젝트: ROOPABUDDA/RVS_SALES
def organisation():
    OrgDetails, orgCount, empCount = getOrgAndEmpCount()
    orgDetails = orgData()
    IndustryList = []
    for industry in orgDetails:
        IndustryList.append(industry.org_primaryindustry)
    uniqueIndustryList = list(set(IndustryList))
    geographyList = []
    for geography in orgDetails:
        geographyList.append(geography.hq_country)
    uniqueCountryList = list(set(geographyList))
    revenue = getMaxAndMinRevenue()
    if request.method == 'POST':
        formData = request.form
        print('org form---------------', formData)
        searchRes = searchData(formData)
        print(type(searchRes))
        if len(searchRes) == 0:
            print("No result found!!")
            OrgDetails = searchRes
        else:
            print('ppppppp', searchRes)
            OrgDetails = searchRes

    return render_template('organisation.html',
                           recCount=OrgDetails,
                           orgCount=orgCount,
                           empCount=empCount,
                           industryList=uniqueIndustryList,
                           geographyList=uniqueCountryList)
예제 #3
0
파일: app.py 프로젝트: ROOPABUDDA/RVS_SALES
def getCompanyList():
    # import pdb; pdb.set_trace()
    keyword = request.form.get('companyname')
    orgDetails = orgData()
    companyNames = []
    for company in orgDetails:
        companyNames.append(company.org_name)
    return Response(json.dumps(companyNames), mimetype='application/json')
예제 #4
0
파일: app.py 프로젝트: ROOPABUDDA/RVS_SALES
def getGeographyList():
    orgDetails = orgData()
    geographyList = []
    for geography in orgDetails:
        geographyList.append(geography.hq_country)
    return Response(json.dumps(geographyList), mimetype='application/json')