...
|
...
|
@@ -154,6 +154,7 @@ class AdminEquipmentController extends AdminBaseController{ |
|
|
$allRow = $sheet->getHighestRow(); //取得总行数
|
|
|
// $testInfo=new TestinfoModel();
|
|
|
//从第二行开始插入,第一行是列名
|
|
|
$Equipment=new EquipmentModel();
|
|
|
for ($j = 2; $j <= $allRow; $j++) {
|
|
|
$data=[
|
|
|
'serial_number'=> $objPHPExcel->getActiveSheet()->getCell("a" . $j)->getValue(),
|
...
|
...
|
@@ -170,7 +171,6 @@ class AdminEquipmentController extends AdminBaseController{ |
|
|
echo "第" . $j . "行".$data['name']."的设备已存在!<br/>";
|
|
|
continue;
|
|
|
}
|
|
|
$Equipment=new EquipmentModel();
|
|
|
try{
|
|
|
$Equipment->save($data);
|
|
|
echo "第" . $j . "行数据导入成功!<br/>";
|
...
|
...
|
|