当前位置: 首页>>代码示例>>PHP>>正文


PHP DepartmentPeer::getTableMap方法代码示例

本文整理汇总了PHP中DepartmentPeer::getTableMap方法的典型用法代码示例。如果您正苦于以下问题:PHP DepartmentPeer::getTableMap方法的具体用法?PHP DepartmentPeer::getTableMap怎么用?PHP DepartmentPeer::getTableMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DepartmentPeer的用法示例。


在下文中一共展示了DepartmentPeer::getTableMap方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: filter

 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         $column = DepartmentPeer::getTableMap()->getColumn($key);
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:actions.class.php

示例2: getPhpNameMap

 public static function getPhpNameMap()
 {
     if (self::$phpNameMap === null) {
         $map = DepartmentPeer::getTableMap();
         $columns = $map->getColumns();
         $nameMap = array();
         foreach ($columns as $column) {
             $nameMap[$column->getPhpName()] = $column->getColumnName();
         }
         self::$phpNameMap = $nameMap;
     }
     return self::$phpNameMap;
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:13,代码来源:BaseDepartmentPeer.php

示例3: filter

 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $c->addJoin(CounselingPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CODE_CLASS') {
             $c->addJoin(CounselingPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CLASS_GROUP_ID') {
             $c->addJoin(CounselingPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $c->addJoin(VClassParentPeer::ID, ClassGroupPeer::PARENT);
             $column = VClassParentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'EMPLOYEE_NAME') {
             $c->addJoin(EmployeePeer::ID, CounselingTutorPeer::EMPLOYEE_ID);
             $c->addJoin(CounselingPeer::ID, CounselingTutorPeer::COUNSELING_ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } else {
             $column = CounselingPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:48,代码来源:actions.class.php

示例4: filterEkskul

 public function filterEkskul($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $c->addJoin(SchedulePeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CODE_CLASS') {
             $c->addJoin(SchedulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'EMPLOYEE_NAME') {
             $c->addJoin(SchedulePeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'SUBJECT_ID') {
             $c->addJoin(SubjectPeer::ID, SubjectCurrPeer::SUBJECT_ID);
             $c->addJoin(SubjectCurrPeer::ID, SchedulePeer::SUBJECT_CURR_ID);
             $column = SubjectPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'SUBJECT_NAME') {
             $c->addJoin(SubjectPeer::ID, SubjectCurrPeer::SUBJECT_ID);
             $c->addJoin(SubjectCurrPeer::ID, SchedulePeer::SUBJECT_CURR_ID);
             $column = SubjectPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'EKSUL_NAME') {
             $c->addJoin(SchedulePeer::GRADE_COMPONENT_ID, GradeComponentPeer::ID);
             $column = GradeComponentPeer::getTableMap()->getColumn('NAME');
         } else {
             $column = SchedulePeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $c->add($name, $value, Criteria::LIKE);
             } else {
                 if ($creoleType == CreoleTypes::INTEGER) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:58,代码来源:actions.class.php

示例5: filterStudent

 public function filterStudent($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(AcademicCalendarPeer::ID, StudentPeer::ACADEMIC_CALENDAR_ID);
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CLASS_NAME') {
             $c->addJoin(ClassGroupPeer::ID, StudentPeer::CLASS_GROUP_ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } else {
             $column = StudentPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 if ($name == StudentPeer::CLASS_GROUP_ID) {
                     $cg = ClassGroupPeer::retrieveByPK($value);
                     $c->add($name, $cg->getChildRecurs(), Criteria::IN);
                 } else {
                     $c->add($name, $value, Criteria::EQUAL);
                 }
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:45,代码来源:actions.class.php

示例6: filter

 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'writer_name') {
             $column = VOpacDigitalPeer::getTableMap()->getColumn('WRITER_NAME');
         } elseif ($key == 'department_id') {
             if ($filters[$key] == 1) {
                 $c->addJoin(VOpacDigitalPeer::CATALOG_ID, CatalogPeer::ID);
                 $c->addJoin(DepartmentPeer::ID, VOpacDigitalPeer::DEPARTMENT_ID);
                 $column = DepartmentPeer::getTableMap()->getColumn('ID');
             } else {
                 $c->addJoin(VOpacDigitalPeer::CATALOG_ID, CatalogPeer::ID);
                 $c->addJoin(DepartmentPeer::ID, VOpacDigitalPeer::DEPARTMENT_ID);
                 $c->addJoin(VDepartmentPeer::ID, DepartmentPeer::PARENT);
                 $column = VDepartmentPeer::getTableMap()->getColumn('ID');
             }
         } elseif ($key == 'cat_category_id') {
             $c->addJoin(VOpacDigitalPeer::CATALOG_ID, CatalogPeer::ID);
             $c->addJoin(CatCategoryPeer::ID, VOpacDigitalPeer::CAT_CATEGORY_ID);
             $column = CatCategoryPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'publisher_name') {
             $column = VOpacDigitalPeer::getTableMap()->getColumn('PUBLISHER_NAME');
         } elseif ($key == 'title') {
             $column = VOpacDigitalPeer::getTableMap()->getColumn('TITLE');
         } elseif ($key == 'keyword') {
             $c->addJoin(CatalogPeer::ID, VOpacDigitalPeer::CATALOG_ID);
             $column = CatalogPeer::getTableMap()->getColumn('SEARCH_KEYWORDS');
         } elseif ($key == 'synopsis') {
             $c->addJoin(CatalogPeer::ID, VOpacDigitalPeer::CATALOG_ID);
             $column = CatalogPeer::getTableMap()->getColumn('SYNOPSIS');
         } elseif ($key == 'published_location') {
             $column = VOpacDigitalPeer::getTableMap()->getColumn('PUBLISHED_LOCATION');
         } elseif ($key == 'published_year') {
             $column = VOpacDigitalPeer::getTableMap()->getColumn('PUBLISHED_YEAR');
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER || $creoleType == CreoleTypes::BIGINT) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 } else {
                     if ($creoleType == CreoleTypes::NUMERIC) {
                         $c->add($name, $value, Criteria::EQUAL);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:66,代码来源:actions.class.php

示例7: filterLocation

 public function filterLocation($cr, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(TestSchedulePeer::ID, VTestApplSched1Peer::TEST_SCHEDULED_ID);
             $c->addJoin(RegTestPeriodPeer::ID, TestSchedulePeer::REG_TEST_PERIOD_ID);
             $c->addJoin(RegPeriodPeer::ID, RegTestPeriodPeer::REG_PERIOD_ID);
             $c->addJoin(AcademicCalendarPeer::ID, RegPeriodPeer::ACADEMIC_CALENDAR_ID);
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'YEAR') {
             $c->addJoin(TestSchedulePeer::ID, VTestApplSched1Peer::TEST_SCHEDULED_ID);
             $c->addJoin(RegTestPeriodPeer::ID, TestSchedulePeer::REG_TEST_PERIOD_ID);
             $c->addJoin(RegPeriodPeer::ID, RegTestPeriodPeer::REG_PERIOD_ID);
             $c->addJoin(AcademicCalendarPeer::ID, RegPeriodPeer::ACADEMIC_CALENDAR_ID);
             $column = AcademicCalendarPeer::getTableMap()->getColumn('YEAR');
         } elseif ($key == 'NAME') {
             $c->addJoin(TestSchedulePeer::ID, VTestApplSched1Peer::TEST_SCHEDULED_ID);
             $c->addJoin(RegTestPeriodPeer::ID, TestSchedulePeer::REG_TEST_PERIOD_ID);
             $column = RegTestPeriodPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CODE') {
             $c->addJoin(TestSchedulePeer::ID, VTestApplSched1Peer::TEST_SCHEDULED_ID);
             $c->addJoin(RegTestPeriodPeer::ID, TestSchedulePeer::REG_TEST_PERIOD_ID);
             $column = RegTestPeriodPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'REG_PERIOD_ID') {
             $c->addJoin(TestSchedulePeer::ID, VTestApplSched1Peer::TEST_SCHEDULED_ID);
             $c->addJoin(RegTestPeriodPeer::ID, TestSchedulePeer::REG_TEST_PERIOD_ID);
             $c->addJoin(RegPeriodPeer::ID, RegTestPeriodPeer::REG_PERIOD_ID);
             $column = RegTestPeriodPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'START') {
             $c->addJoin(TestSchedulePeer::ID, VTestApplSched1Peer::TEST_SCHEDULED_ID);
             $column = TestSchedulePeer::getTableMap()->getColumn('START');
         } else {
             $column = VTestApplSched1Peer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:62,代码来源:actions.class.php

示例8: filterAbsence

 public function filterAbsence($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $c->addJoin(StudentPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $c->addJoin(StudentAbsencePeer::STUDENT_ID, StudentPeer::ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'CODE_CLASS') {
             $c->addJoin(StudentAbsencePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
             $column = ClassGroupPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CODE') {
             $c->addJoin(StudentAbsencePeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'NAME') {
             $c->addJoin(StudentAbsencePeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } else {
             $column = StudentAbsencePeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $c->add($name, $value, Criteria::LIKE);
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $c->add($name, $value, Criteria::LIKE);
             } else {
                 if ($creoleType == CreoleTypes::INTEGER) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:44,代码来源:actions.class.php

示例9: filterPerSource

 public function filterPerSource($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'writer_id') {
             $c->addJoin(VCatalogPerSourcePeer::CATALOG_ID, CatalogPeer::ID);
             $c->addJoin(CatalogWriterPeer::CATALOG_ID, CatalogPeer::ID);
             $column = CatalogWriterPeer::getTableMap()->getColumn('WRITER_ID');
         } elseif ($key == 'code') {
             $c->addJoin(VCatalogPerSourcePeer::CATALOG_ID, CatalogPeer::ID);
             $column = CatalogPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'title') {
             $c->addJoin(VCatalogPerSourcePeer::CATALOG_ID, CatalogPeer::ID);
             $column = CatalogPeer::getTableMap()->getColumn('TITLE');
         } elseif ($key == 'writer') {
             $c->addJoin(VCatalogPerSourcePeer::CATALOG_ID, CatalogPeer::ID);
             $c->addJoin(CatalogWriterPeer::CATALOG_ID, CatalogPeer::ID);
             $c->addJoin(WriterPeer::ID, CatalogWriterPeer::WRITER_ID);
             $column = WriterPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'publisher') {
             $c->addJoin(VCatalogPerSourcePeer::CATALOG_ID, CatalogPeer::ID);
             $c->addJoin(PublisherPeer::ID, CatalogPeer::PUBLISHER_ID);
             $column = PublisherPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'cat_category_id') {
             $c->addJoin(VCatalogPerSourcePeer::CATALOG_ID, CatalogPeer::ID);
             $column = CatalogPeer::getTableMap()->getColumn('CAT_CATEGORY_ID');
         } elseif ($key == 'publisher_id') {
             $c->addJoin(VCatalogPerSourcePeer::CATALOG_ID, CatalogPeer::ID);
             $column = CatalogPeer::getTableMap()->getColumn('PUBLISHER_ID');
         } elseif ($key == 'YEAR_ADDED') {
             $column = VCatalogPerSourcePeer::getTableMap()->getColumn('YEAR_ADDED');
             #$c->addJoin(VCatalogPerSourcePeer::CATALOG_ID, ColItemPeer::CATALOG_ID);
             #$c->addJoin(ColItemPeer::CATALOG_ID, CatalogPeer::ID);
             #$column = ColItemPeer::getTableMap()->getColumn('YEAR_ADDED');
         } elseif ($key == 'department_id') {
             #	if ($filters[$key] == 1) {
             $c->addJoin(VCatalogPerSourcePeer::CATALOG_ID, CatalogPeer::ID);
             $c->addJoin(DepartmentPeer::ID, VCatalogPerSourcePeer::DEPARTMENT_ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
             #	} else {
             #		$c->addJoin(VCatalogPerSourcePeer::CATALOG_ID, CatalogPeer::ID);
             #		$c->addJoin(DepartmentPeer::ID, VCatalogPerSourcePeer::DEPARTMENT_ID);
             #		$c->addJoin(VDepartmentPeer::ID, DepartmentPeer::PARENT);
             #		$column = VDepartmentPeer::getTableMap()->getColumn('ID');
             #	}
         } else {
             $column = VCatalogPerSourcePeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER || $creoleType == CreoleTypes::BIGINT) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 } else {
                     if ($creoleType == CreoleTypes::NUMERIC) {
                         $c->add($name, $value, Criteria::EQUAL);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:78,代码来源:actions.class_.php

示例10: filter

 public function filter($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(AcademicCalendarPeer::ID, AccalActivityPeer::ACADEMIC_CALENDAR_ID);
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } else {
             $column = AccalActivityPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::INTEGER) {
                 $c->add($name, $value, Criteria::EQUAL);
             } else {
                 if ($creoleType == CreoleTypes::VARCHAR) {
                     $c->add($name, "%{$value}%", Criteria::LIKE);
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:37,代码来源:actions.class.php

示例11: filterAbsence

 public function filterAbsence($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'EXTRA_CODE') {
             $c->addJoin(EmployeePeer::ID, EmployeeAbsenceDevPeer::EMPLOYEE_ID);
             $c->addJoin(EmployeeDetailPeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeeDetailPeer::getTableMap()->getColumn('EXTRA_CODE');
         } elseif ($key == 'FINGERCODE') {
             $c->addJoin(EmployeePeer::ID, EmployeeAbsenceDevPeer::EMPLOYEE_ID);
             $c->addJoin(EmployeeDetailPeer::EMPLOYEE_ID, EmployeePeer::ID);
             $column = EmployeeDetailPeer::getTableMap()->getColumn('FINGERCODE');
         } elseif ($key = 'EMP_NO') {
             $c->addJoin(EmployeePeer::ID, EmployeeAbsenceDevPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('CODE');
         } elseif ($key = 'EMP_NAME') {
             $c->addJoin(EmployeePeer::ID, EmployeeAbsenceDevPeer::EMPLOYEE_ID);
             $column = EmployeePeer::getTableMap()->getColumn('NAME');
         } elseif ($key = 'DEPARTMENT_ID') {
             $c->addJoin(EmployeePeer::ID, EmployeeAbsenceDevPeer::EMPLOYEE_ID);
             $c->addJoin(DepartmentPeer::ID, EmployeePeer::DEPARTMENT_ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key = 'STATUS') {
             $column = EmployeeAbsenceDevPeer::getTableMap()->getColumn('STATUS');
         } else {
             $column = EmployeeAbsenceDevPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
             }
             if ($to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } elseif ($creoleType == CreoleTypes::DATE) {
             #$from = $value['from'];
             #$to = $value['to'];
             #if ($from != '' && $from != null)
             #    $c->add($name, $from, Criteria::GREATER_EQUAL);
             #if ($to != '' && $to != null)
             #    $c->add($name, $to, Criteria::LESS_EQUAL);
             $c->add($name, $value, Criteria::EQUAL);
         } elseif ($creoleType == CreoleTypes::INTEGER) {
             $c->add($name, $value, Criteria::EQUAL);
         } elseif ($creoleType == CreoleTypes::VARCHAR || $creoleType == CreoleTypes::CHAR) {
             $c->add($name, "%{$value}%", Criteria::LIKE);
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:57,代码来源:actions.class.php

示例12: filterPayment

 public function filterPayment($c, $filters)
 {
     $filters_key = array_keys($filters);
     foreach ($filters_key as $key) {
         $value = $filters[$key];
         if ($value == '' || $value == null) {
             continue;
         }
         if ($key == 'DEPARTMENT_ID') {
             $c->addJoin(DepartmentPeer::ID, AcademicCalendarPeer::DEPARTMENT_ID);
             $c->addJoin(VInfaqPaymentPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
             $column = DepartmentPeer::getTableMap()->getColumn('ID');
         } elseif ($key == 'USER_NAME') {
             $c->addJoin(VInfaqPaymentPeer::USER_ID, UserPeer::ID);
             $column = UserPeer::getTableMap()->getColumn('LOGIN');
         } elseif ($key == 'NAME') {
             $c->addJoin(VInfaqPaymentPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('NAME');
         } elseif ($key == 'CODE') {
             $c->addJoin(VInfaqPaymentPeer::STUDENT_ID, StudentPeer::ID);
             $column = StudentPeer::getTableMap()->getColumn('CODE');
         } elseif ($key == 'STUDENT_TYPE_ID') {
             $c->addJoin(VInfaqPaymentPeer::STUDENT_TYPE_ID, PayerTypePeer::ID);
             $column = PayerTypePeer::getTableMap()->getColumn('ID');
         } else {
             $column = VInfaqPaymentPeer::getTableMap()->getColumn($key);
         }
         $name = $column->getFullyQualifiedName();
         $creoleType = $column->getCreoleType();
         if ($creoleType == CreoleTypes::TIMESTAMP) {
             $from = $value['from'];
             $to = $value['to'];
             $c2 = null;
             if ($from != '' && $from != null) {
                 $c->add($name, $from, Criteria::GREATER_EQUAL);
                 $c2 = $c->getCriterion($name);
             }
             if ($from != '' && $from != null && $to != '' && $to != null) {
                 $c3 = new Criterion($c, $name, $to, Criteria::LESS_EQUAL);
                 $c2->addAnd($c3);
             }
             if (($from == '' || $from == null) && $to != '' && $to != null) {
                 $c->add($name, $to, Criteria::LESS_EQUAL);
             }
         } else {
             if ($creoleType == CreoleTypes::DATE) {
                 $from = $value['from'];
                 $to = $value['to'];
                 $c2 = null;
                 if ($from != '' && $from != null) {
                     $c->add($name, $from, Criteria::GREATER_EQUAL);
                     $c2 = $c->getCriterion($name);
                 }
                 if ($from != '' && $from != null && $to != '' && $to != null) {
                     $c3 = new Criterion($c, $name, $to, Criteria::LESS_EQUAL);
                     $c2->addAnd($c3);
                 }
                 if (($from == '' || $from == null) && $to != '' && $to != null) {
                     $c->add($name, $to, Criteria::LESS_EQUAL);
                 }
                 #$c->add($name, $value, Criteria::LIKE );
             } else {
                 if ($creoleType == CreoleTypes::INTEGER || $creoleType == CreoleTypes::NUMERIC || $creoleType == CreoleTypes::CHAR) {
                     $c->add($name, $value, Criteria::EQUAL);
                 } else {
                     if ($creoleType == CreoleTypes::VARCHAR) {
                         $c->add($name, "%{$value}%", Criteria::LIKE);
                     }
                 }
             }
         }
     }
 }
开发者ID:taryono,项目名称:school,代码行数:73,代码来源:actions.class.php


注:本文中的DepartmentPeer::getTableMap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。