# encoding: UTF-8
from ..dao.createDataNumberDao import CreateNumberDao


class CreateNumberService(object):
    def __init__(self):
        pass

    @staticmethod
    def get_service_number_all_no_filters(session):
        ret = CreateNumberDao.get_number_no_filters(session)
        return ret

    @staticmethod
    def get_service_number_simple_by_filters(session, filter_list):
        ret = CreateNumberDao.get_number_simple_by_filters(session, filter_list)
        return ret

    @staticmethod
    def get_service_number_by_id(session, create_data_detail_id):
        err_msg, success = CreateNumberDao.get_number_info_by_id(session, create_data_detail_id)
        return err_msg, success

    @staticmethod
    def create_service_number_data(session, create_info):
        ret = CreateNumberDao.save_number_info(session, create_info)
        return ret

    @staticmethod
    def update_service_number_data(session, update_info, create_data_detail_id):
        err_msg = CreateNumberDao.update_number_info(session, update_info, create_data_detail_id)
        return err_msg
