本文整理汇总了PHP中app\Country::GetStuArrayByCountry方法的典型用法代码示例。如果您正苦于以下问题:PHP Country::GetStuArrayByCountry方法的具体用法?PHP Country::GetStuArrayByCountry怎么用?PHP Country::GetStuArrayByCountry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Country
的用法示例。
在下文中一共展示了Country::GetStuArrayByCountry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: exportAllToFile
//.........这里部分代码省略.........
$stu = Student::where('stu_type', '休学')->get();
$data = array();
$num = 1;
foreach ($stu as $item) {
$data[$num - 1][0] = $num;
$data[$num - 1][1] = $item['type'];
$data[$num - 1][2] = $item['nationality'];
$data[$num - 1][3] = $item['id'];
$data[$num - 1][4] = $item['name_cn'];
$data[$num - 1][5] = $item['name_en'];
$data[$num - 1][6] = $item['csc_no'];
$data[$num - 1][7] = $item['passport_id'];
$data[$num - 1][8] = $item['gender'];
$data[$num - 1][9] = $item['birthday'];
$data[$num - 1][10] = $item['school'];
$data[$num - 1][11] = $item['major'];
$data[$num - 1][12] = $item['admission_date'];
$data[$num - 1][13] = $item['old_class'];
$data[$num - 1][14] = $item['new_class'];
$data[$num - 1][15] = $item['suspend_date'];
$data[$num - 1][16] = $item['tutor'];
$data[$num - 1][17] = $item['suspend_note'];
$data[$num - 1][18] = $item['suspend_note1'];
$num++;
}
$objPHPExcel->getActiveSheet()->fromArray($data, NULL, 'A2');
//self::setMyStyle($objPHPExcel, 2, 18, $num);
$myWorkSheet = new PHPExcel_Worksheet($objPHPExcel, $date . '国别统计');
$objPHPExcel->addSheet($myWorkSheet);
$objPHPExcel->setActiveSheetIndex(3);
//self::setMyStyle($objPHPExcel, 3, 12, 0);
$data = array('序号', '洲别', '国别', '本科', '硕研', '博研', '语言生', '普进', '高进', '人数小计', '男生', '女生');
$objPHPExcel->getActiveSheet()->fromArray($data, NULL, 'A1');
$data = Country::GetStuArrayByCountry();
$objPHPExcel->getActiveSheet()->fromArray($data, NULL, 'A2');
$myWorkSheet = new PHPExcel_Worksheet($objPHPExcel, $date . '毕业结业名单');
$objPHPExcel->addSheet($myWorkSheet);
$objPHPExcel->setActiveSheetIndex(4);
$data = array('序号', '类别', '国籍', '学号', '中文姓名', '英文姓名', 'CSC登记号', '护照号码', '性别', '出生日期', '学院', '专业', '入学日期', '毕业日期', '发证日期', '所获证书', '毕业证书号码', '学位证书号码', '进修证书号码', '学习证书号码', '联系地址', '导师', '备注');
$objPHPExcel->getActiveSheet()->fromArray($data, NULL, 'A1');
$stu = Student::where('stu_type', '毕业结业')->get();
$data = array();
$num = 1;
foreach ($stu as $item) {
$data[$num - 1][0] = $num;
$data[$num - 1][1] = $item['type'];
$data[$num - 1][2] = $item['nationality'];
$data[$num - 1][3] = $item['id'];
$data[$num - 1][4] = $item['name_cn'];
$data[$num - 1][5] = $item['name_en'];
$data[$num - 1][6] = $item['csc_no'];
$data[$num - 1][7] = $item['passport_id'];
$data[$num - 1][8] = $item['gender'];
$data[$num - 1][9] = $item['birthday'];
$data[$num - 1][10] = $item['school'];
$data[$num - 1][11] = $item['major'];
$data[$num - 1][12] = $item['admission_date'];
$data[$num - 1][13] = $item['graduate_date'];
$data[$num - 1][14] = $item['certificate_date'];
$data[$num - 1][15] = $item['certificate_type'];
$data[$num - 1][16] = $item['graduation_certificate'];
$data[$num - 1][17] = $item['degree_certificate'];
$data[$num - 1][18] = $item['further_certificate'];
$data[$num - 1][19] = $item['learn_certificate'];
$data[$num - 1][20] = $item['graduated_address'];
$data[$num - 1][21] = $item['tutor'];