예제 #1
0
def c_3d_2():
    sql = 'select a.j_t, a.j_e, cast(a.avg_sal as int) from t_bj a;'
    db_n = 'job_db'
    items = select_t(sql, db_n)

    def f_x(j):
        if j == '不限':
            return 0
        if j == '应届毕业生':
            return 1
        if j == '1年以下':
            return 2
        if j == '1-3年':
            return 3
        if j == '3-5年':
            return 4
        if j == '5-10年经验':
            return 5
        if j == '10年以上':
            return 6

        if j == '不限':
            return 0
        if j == '中专及以下':
            return 1
        if j == '大专':
            return 2
        if j == '本科':
            return 3
        if j == '硕士':
            return 4
        if j == '博士':
            return 5

    t = []
    for i in items:
        t.append([f_x(i[0]), f_x(i[1]), i[2]])

    return render_template('charts/bar3d.html', t_data=t)
예제 #2
0
파일: index.py 프로젝트: Mew97/atoz
def welfare():
    col_n = ('福利名称', '公司数目', '岗位大类', '岗位数目')
    sql = 'select a.welfare, cast(a.c_conunt as int), a.j_cate_l, cast(a.count as int) from welfare_info a order by cast(a.c_conunt as int) desc limit 1000;'
    db_n = 'job_db'
    items = select_t(sql, db_n)
    return render_template('_table.html', items=items, col_n=col_n)
예제 #3
0
파일: index.py 프로젝트: Mew97/atoz
def salary():
    col_n = ('岗位类别', '所属大类', '最高薪资', '最低薪资', '城市岗位数', '平均薪资', '学历', '经验要求')
    sql = 'select a.j_cate_s, a.j_cate_l, a.sal_max, a.sal_min, a.j_c_count, cast(a.sal_avg as int ), a.j_e, a.j_t from sal_infore a where cast(a.sal_min as int) > 2000;'
    db_n = 'job_db'
    items = select_t(sql, db_n)
    return render_template('_table.html', items=items, col_n=col_n)
예제 #4
0
파일: index.py 프로젝트: Mew97/atoz
def city_area():
    col_n = ('城市', '省份', '地区', '平均薪资', '工作岗位', '公司数量')
    sql = 'select a.city, a.pcv_name, a.area_name, cast(a.avg as int), a.count, a.count_c from city_info a where pcv_name not in ("不明");'
    db_n = 'job_db'
    items = select_t(sql, db_n)
    return render_template('_table.html', items=items, col_n=col_n)