コード例 #1
0
 def listGroupUser(self,**kw):
     groups = DBSession.query(Group).all();
     self.listgroup = [];
     for group in groups:
         self.listgroup.append({'id' : group.group_id ,
                           'name' :  group.group_name 
                      }); 
    
     return dict(root = self.listgroup,total=str(len(self.listgroup)));
コード例 #2
0
ファイル: books.py プロジェクト: tongpa/bantakCom
 def showProgramClinicReport(cls,startDate, stopDate,book_type,bookSearch,offset=0,limit=15):
     
     query = DBSession.query(cls).filter( and_( cls.activate == '1', and_( cls.book_detail.like(bookSearch) ,and_( cls.book_type_id == book_type ,cls.book_recive.between(startDate, stopDate)  ) )) );
     count = query.count();
     list = query.order_by(desc(cls.book_number)).limit(limit).offset(offset).all();
     #DBSession.query(cls).filter(between(cls.book_recive, startDate, stopDate)).all();
     print count ;
     
     return count, list;   
コード例 #3
0
    def search(cls, fiscalyear=None, group=None, subgroup=None):
        sql = "1=1 "
        if (fiscalyear):
            sql = sql + " and fiscal_year = " + fiscalyear
        if (group):
            sql = sql + " and revenue_list_id = " + group
        if (subgroup):
            sql = sql + " and revenue_sub_list_id = " + subgroup

        log.info(sql)
        return DBSession.query(cls).filter(sql).all()
コード例 #4
0
ファイル: revenue.py プロジェクト: tongpa/bantakCom
 def search(cls,fiscalyear = None, group= None, subgroup= None):
     sql = "1=1 ";
     if (fiscalyear):
         sql = sql + " and fiscal_year = " + fiscalyear;
     if(group):
         sql = sql + " and revenue_list_id = " + group;
     if(subgroup):
         sql = sql + " and revenue_sub_list_id = " + subgroup;
      
         
     log.info(sql);
     return DBSession.query(cls).filter(sql).all();
コード例 #5
0
 def search(cls,fiscalyear = None, group= None, subgroup= None):
     sql = "1=1 ";
     if (fiscalyear):
         sql = sql + " and fiscal_year = " + fiscalyear;
     if(group):
         sql = sql + " and expenses_list_id = " + group;
     if(subgroup):
         sql = sql + " and expenses_sub_list_id = " + subgroup;
      
         
     log.info(sql);
     return DBSession.query(cls).filter(sql).all();
コード例 #6
0
 def listUser(self,**kw):
     #users = DBSession.query(User).all();
     groups = DBSession.query(Group).all();
     self.list = [];
     for group in groups:
         for guser in group.users:
             self.list.append({'id' : guser.user_id ,
                      'name' : guser.user_name,
                      'display' : guser.display_name,
                      'email' : guser.email_address,
                      'group_id' :  group.group_id,
                      'group' : group.group_name
                      }); 
    
     return dict(root = self.list,total=str(len(self.list)));
コード例 #7
0
ファイル: project.py プロジェクト: tongpa/bantakCom
 def search(cls,fiscalyear=None,division=None,section=None,status=None,projectType=None,start=0,limit=25):
     
     sql = "1=1 ";
     if (fiscalyear):
         sql = sql + " and fiscal_year = " + fiscalyear;
     if(projectType):
         sql = sql + " and project_type_id = " + projectType;
     if(division):
         sql = sql + " and division_id = " + division;
     if(section):
         sql = sql + " and section_id = " + section;
     if(status):
         sql = sql + " and project_status_id = " + status ;
         
     log.info(sql);
     return DBSession.query(cls).filter(sql).all();
コード例 #8
0
    def showProgramClinicReport(cls,
                                startDate,
                                stopDate,
                                book_type,
                                bookSearch,
                                offset=0,
                                limit=15):

        query = DBSession.query(cls).filter(
            and_(
                cls.activate == '1',
                and_(
                    cls.book_detail.like(bookSearch),
                    and_(cls.book_type_id == book_type,
                         cls.book_recive.between(startDate, stopDate)))))
        count = query.count()
        list = query.order_by(desc(
            cls.book_number)).limit(limit).offset(offset).all()
        #DBSession.query(cls).filter(between(cls.book_recive, startDate, stopDate)).all();
        print count

        return count, list
コード例 #9
0
ファイル: project.py プロジェクト: tongpa/bantak_program
    def search(cls,
               fiscalyear=None,
               division=None,
               section=None,
               status=None,
               projectType=None,
               start=0,
               limit=25):

        sql = "1=1 "
        if (fiscalyear):
            sql = sql + " and fiscal_year = " + fiscalyear
        if (projectType):
            sql = sql + " and project_type_id = " + projectType
        if (division):
            sql = sql + " and division_id = " + division
        if (section):
            sql = sql + " and section_id = " + section
        if (status):
            sql = sql + " and project_status_id = " + status

        log.info(sql)
        return DBSession.query(cls).filter(sql).all()
コード例 #10
0
 def listAll(cls):
     return DBSession.query(cls).order_by(
         cls.dental_senior_club_service_id).all()
コード例 #11
0
 def listAll(cls):
     return DBSession.query(cls).order_by(
         cls.dental_child_dev_center_service_id).all()
コード例 #12
0
ファイル: indicator.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.years_id).all();
コード例 #13
0
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.dental_school_kpi_id).all()
コード例 #14
0
 def getById(cls, id):
     return DBSession.query(cls).get(str(id))
コード例 #15
0
ファイル: dental.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.school_class_id).all();
コード例 #16
0
 def listAll(cls):
     return DBSession.query(cls).filter(
         cls.revenue_list_id != '0').order_by(cls.revenue_list_id).all()
コード例 #17
0
ファイル: indicator.py プロジェクト: tongpa/bantak_program
 def listAll(cls):
     return DBSession.query(cls).filter(cls.active == 1).order_by(
         cls.years_id).all()
コード例 #18
0
ファイル: auth.py プロジェクト: tongpa/bantakCom
 def by_user_name(cls, username):
     """Return the user object whose user name is ``username``."""
     return DBSession.query(cls).filter_by(user_name=username).first()
コード例 #19
0
 def getByBookId(cls, id):
     return DBSession.query(cls).filter(cls.book_id == id).all()
コード例 #20
0
ファイル: auth.py プロジェクト: tongpa/bantakCom
 def by_email_address(cls, email):
     """Return the user object whose email address is ``email``."""
     return DBSession.query(cls).filter_by(email_address=email).first()
コード例 #21
0
ファイル: __init__.py プロジェクト: tongpa/bantakCom
 def test_query_obj(self):
     """Model objects can be queried"""
     obj = DBSession.query(self.klass).one()
     for key, value in self.attrs.iteritems():
         assert_equals(getattr(obj, key), value)
コード例 #22
0
ファイル: project.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).all();
コード例 #23
0
ファイル: project.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.project_status_id).all();
コード例 #24
0
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.revenue_sub_list_id).all()
コード例 #25
0
ファイル: computers.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.description).all();
コード例 #26
0
ファイル: revenue.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.fiscal_year).all();
コード例 #27
0
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.expenses_sub_list_id).all();
コード例 #28
0
 def test_query_obj(self):
     """Model objects can be queried"""
     obj = DBSession.query(self.klass).one()
     for key, value in self.attrs.items():
         eq_(getattr(obj, key), value)
コード例 #29
0
ファイル: auth.py プロジェクト: tongpa/bantak_program
 def by_user_name(cls, username):
     """Return the user object whose user name is ``username``."""
     return DBSession.query(cls).filter_by(user_name=username).first()
コード例 #30
0
ファイル: revenue.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).filter(  cls.revenue_list_id != '0' ).order_by(cls.revenue_list_id).all();
コード例 #31
0
ファイル: indicator.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).filter(  cls.active == 1 ).order_by(cls.years_id).all();  
コード例 #32
0
ファイル: indicator.py プロジェクト: tongpa/bantak_program
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.years_id).all()
コード例 #33
0
 def listkpibygroup(cls, group):
     return DBSession.query(cls).filter(
         cls.dental_school_kpi_group_id == str(group)).order_by(
             cls.dental_school_kpi_id).all()
コード例 #34
0
ファイル: books.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.book_type_id).all(); 
コード例 #35
0
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.senior_club_id).all()
コード例 #36
0
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.school_class_id).all()
コード例 #37
0
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.child_dev_center_id).all()
コード例 #38
0
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.book_type_id).all()
コード例 #39
0
 def listPrimarySchool(cls):
     return DBSession.query(cls).filter(cls.high_school == str(0)).order_by(
         cls.school_id).all()
コード例 #40
0
ファイル: coredb.py プロジェクト: tongpa/bantak_program
 def listByDivision(cls,division):
     return DBSession.query(cls).filter(  cls.division_id==str(division) ).order_by(cls.section_id ).all();
コード例 #41
0
ファイル: revenue.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.revenue_sub_list_id).all();
コード例 #42
0
ファイル: project.py プロジェクト: tongpa/bantak_program
 def listAll(cls):
     return DBSession.query(cls).all()
コード例 #43
0
ファイル: revenue.py プロジェクト: tongpa/bantakCom
 def listByGroup(cls,group):
     return DBSession.query(cls).filter(  cls.revenue_list_id==str(group) ).order_by(cls.revenue_list_id ).all();
コード例 #44
0
ファイル: dental.py プロジェクト: tongpa/bantakCom
 def listkpibygroup(cls,group):
     return DBSession.query(cls).filter(  cls.dental_school_kpi_group_id==str(group) ).order_by(cls.dental_school_kpi_id ).all();
コード例 #45
0
ファイル: books.py プロジェクト: tongpa/bantakCom
 def getByBookId(cls,id):
     return DBSession.query(cls).filter(cls.book_id == id).all();   
コード例 #46
0
ファイル: dental.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.dental_school_kpi_id).all();
コード例 #47
0
ファイル: project.py プロジェクト: tongpa/bantak_program
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.project_status_id).all()
コード例 #48
0
ファイル: dental.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.senior_club_id).all();
コード例 #49
0
ファイル: computers.py プロジェクト: tongpa/bantakCom
 def getById(cls,id):
     return DBSession.query(cls) .get(str(id));  
コード例 #50
0
ファイル: dental.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.dental_senior_club_service_id).all();
コード例 #51
0
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.fiscal_year).all();
コード例 #52
0
ファイル: dental.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.child_dev_center_id).all();
コード例 #53
0
 def listAll(cls):
     return DBSession.query(cls).filter(  cls.expenses_list_id != '0' ).order_by(cls.expenses_list_id).all();
コード例 #54
0
ファイル: dental.py プロジェクト: tongpa/bantakCom
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.dental_child_dev_center_service_id).all();
コード例 #55
0
 def listByGroup(cls,group):
     return DBSession.query(cls).filter(  cls.expenses_list_id==str(group) ).order_by(cls.expenses_list_id ).all();
コード例 #56
0
ファイル: dental.py プロジェクト: tongpa/bantakCom
 def listPrimarySchool(cls):
     return DBSession.query(cls).filter(  cls.high_school==str(0) ).order_by(cls.school_id).all();
コード例 #57
0
 def listAll(cls):
     return DBSession.query(cls).order_by(cls.description).all()
コード例 #58
0
ファイル: auth.py プロジェクト: tongpa/bantak_program
 def by_email_address(cls, email):
     """Return the user object whose email address is ``email``."""
     return DBSession.query(cls).filter_by(email_address=email).first()