linwu 3 hari lalu
induk
melakukan
bc180cac61
1 mengubah file dengan 21 tambahan dan 0 penghapusan
  1. 21 0
      app/home/controller/Index.php

+ 21 - 0
app/home/controller/Index.php

@@ -45,4 +45,25 @@ class Index extends HomeBaseController
 
         return '完成';
     }
+
+    public function t2()
+    {
+        $old_file = '1.xls';
+        $data     = ['id', 'name', 'card_type', 'idcard', 'sex', 'birthday', 'mobile', 'tag', 'company', 'street', 'industry', 'job', 'graduate', 'level', 'people'];
+        $old_list = import_exl($old_file, $data, 1);
+
+        $companys = [];
+        foreach ($old_list as $v) {
+            $companys[$v['company']][] = $v['people'];
+        }
+
+        $companys2 = [];
+        foreach ($companys as $k => $v) {
+            $item = array_filter(array_unique($v));
+            if (count($item) > 1) {
+                $companys2[$k] = $item;
+            }
+        }
+        halt($companys2);
+    }
 }