Пример #1
0
def company_legalperson_findall():
    legalperson = []
    for item in readall(CompanyRegisitAllLegalPerson):
        info = item.serialize
        legalperson.append(info)

    data = {'status': 200, 'submit': legalperson, 'message': '法人环节读取成功'}

    return jsonify(data)
Пример #2
0
def company_kind_findall():
    companyRegisitKind = []
    for item in readall(CompanyRegisitKind):
        info = item.serialize
        companyRegisitKind.append(info)

    data = {'status': 200, 'submit': companyRegisitKind, 'message': '金融种类读取成功'}

    return jsonify(data)
Пример #3
0
def provider_serviceContent_findall():
    allservice = []
    for item in readall(CompanyProviderAllContent):
        info = item.serialize
        allservice.append(info)

    data = {'status': 200, 'message': '服务商服务读取成功', 'submit': allservice}

    return jsonify(data)
Пример #4
0
def company_serviceContent_findall():
    allservice = []
    for item in readall(CompanyRegisitServiceAllContent):
        info = item.serialize
        allservice.append(info)

    data = {'status': 200, 'submit': allservice, 'message': '法人环节读取成功'}

    return jsonify(data)
Пример #5
0
def templatefile_findall():
    '''
    查找全部模板文件
    :parmam 无
    :return:
    '''
    status = 200
    message = '模板查找成功'
    templateFile = readall(TemplateFile)
    templateFile = [item.serialize for item in templateFile]

    info = {
        'status': status,
        'message': message,
        'info': templateFile
    }
    return jsonify(info)
Пример #6
0
def process_findall():
    '''
    查找全部流程
    :parmam 无
    :return:
    '''
    status = 200
    message = '转让公司查找成功'
    process = readall(Process)
    process = [item.serialize for item in process]

    info = {
        'status': status,
        'message': message,
        'info': process
    }
    return jsonify(info)
Пример #7
0
def message_all():
    if request.method == 'POST':
        user = readall(UserAndOA)
        users = []
        for x in user:
            y = {'name': x.username, 'uid': x.user_id}
            users.append(y)

        data = {
            'status': 200,
            'message': 'ok',
            'data': {
                'user': users
            },
        }
        data = json.dumps(data, default=lambda o: o.__dict__)
        return data, 200, {"ContentType": "application/json"}
Пример #8
0
def permission_user_all():
    # 板块权限读取
    lists = readall(PermissionUser)
    pe_list = []
    for x in lists:
        m = x.serialize
        user_list = x.puermission_users
        m['pu_users'] = []
        for y in user_list:
            y = y.serialize
            m['pu_users'].append({
                "username": y["username"],
                "user_id": y["user_id"],
            })

        pe_list.append(m)

    data = {'info': pe_list, 'status': 200, 'message': '板块查询成功!'}
    return jsonify(data)
Пример #9
0
def permission_user_server_all():
    # 人员情况查询
    user_lists = readall(UserAndOA)
    u_list = []
    for x in user_lists:
        m = x.serialize
        pe_list = x.puermission
        m['permission'] = []
        for y in pe_list:
            m['permission'].append(y.serialize)

        m["team"] = []
        team_list = x.team_value
        for u in team_list:
            m['team'].append(u.serialize)

        u_list.append(m)

    data = {'info': u_list, 'status': 200, 'message': '板块查询成功!'}
    return jsonify(data)
Пример #10
0
def shell_type_findall():
    '''
    壳公司类型查找
    :parmam
    :return:
    '''
    status = 200
    message = '壳公司类型查找成功'
    form = request.json
    shellTypes = readall(ShellType)

    # ShellType.query.all().paginate(page, num, False).items

    shellTypes = [item.serialize for item in shellTypes]
    shellTypes = sorted(shellTypes, key=lambda x: x['grade'], reverse=True)
    info = {
        'status': status,
        'message': message,
        'info': shellTypes
    }
    return jsonify(info)