正在显示
1 个修改的文件
包含
31 行增加
和
26 行删除
| @@ -13,7 +13,9 @@ use App\Models\CustomModule\CustomModuleCategory; | @@ -13,7 +13,9 @@ use App\Models\CustomModule\CustomModuleCategory; | ||
| 13 | use App\Models\CustomModule\CustomModuleContent; | 13 | use App\Models\CustomModule\CustomModuleContent; |
| 14 | use App\Models\CustomModule\CustomModuleExtentContent; | 14 | use App\Models\CustomModule\CustomModuleExtentContent; |
| 15 | use App\Models\RouteMap\RouteMap; | 15 | use App\Models\RouteMap\RouteMap; |
| 16 | +use App\Services\ProjectServer; | ||
| 16 | use Illuminate\Console\Command; | 17 | use Illuminate\Console\Command; |
| 18 | +use Illuminate\Support\Facades\DB; | ||
| 17 | 19 | ||
| 18 | class ImportCustomModule extends Command | 20 | class ImportCustomModule extends Command |
| 19 | { | 21 | { |
| @@ -39,7 +41,10 @@ class ImportCustomModule extends Command | @@ -39,7 +41,10 @@ class ImportCustomModule extends Command | ||
| 39 | * @time :2024/12/9 11:36 | 41 | * @time :2024/12/9 11:36 |
| 40 | */ | 42 | */ |
| 41 | public function handle(){ | 43 | public function handle(){ |
| 42 | - | 44 | + echo date('Y-m-d H:i:s') . 'project_id:' . PHP_EOL; |
| 45 | + ProjectServer::useProject(2837); | ||
| 46 | + $this->import_module_content(); | ||
| 47 | + DB::disconnect('custom_mysql'); | ||
| 43 | } | 48 | } |
| 44 | 49 | ||
| 45 | /** | 50 | /** |
| @@ -50,31 +55,31 @@ class ImportCustomModule extends Command | @@ -50,31 +55,31 @@ class ImportCustomModule extends Command | ||
| 50 | * @time :2024/12/6 17:02 | 55 | * @time :2024/12/6 17:02 |
| 51 | */ | 56 | */ |
| 52 | public function import_module_content(){ | 57 | public function import_module_content(){ |
| 53 | - $data = 'MBR10100CT,Schottky Barrier Rectifier,TO-220AB,100,5*2,common cathode,100,0.85,10,2500,175,-,Active | ||
| 54 | -MBR2060BCT,Schottky Barrier Rectifier,ITO-220AB,60,10*2,common cathode,150,0.75,50,5000,150,-,Active | ||
| 55 | -MBR20150DCT,Schottky Barrier Rectifier,TO-263(D2PAK),150,10*2,common cathode,150,0.88,5,1500,175,-,Active | ||
| 56 | -MUR2060CT,High Efficient Rectifier,TO-220AB,600,10*2,common cathode,150,1.7,1,500,150,50,Active | ||
| 57 | -MUR2040FCT,High Efficient Rectifier,ITO-220AB,400,10*2,common cathode,150,1.3,1,500,150,50,Active | ||
| 58 | -DSEK20S04B,Ultra fast soft Recovery Rectifier,TO-252(DPAK),400,10*2,common cathode,125,1.25,2,500,175,35,Active | ||
| 59 | -DSEK30S06D,Ultra fast soft Recovery Rectifier,TO-263(D2PAK),600,15*2,common cathode,150,1.7,2,500,175,35,Active | ||
| 60 | -DSEK60H06P,Ultra fast soft Recovery Rectifier,TO-247AD,600,30*2,common cathode,300,1.7,5,500,175,60,Active | ||
| 61 | -GBU410,Bridge Rectifier,GBU,1000,4,-,125,1,1,500,150,-,Active | ||
| 62 | -GBU1510,Bridge Rectifier,GBU,1000,15,-,250,1,1,500,150,-,Active | ||
| 63 | -GBJ2510,Bridge Rectifier,GBJ,1000,25,-,300,1,1,500,150,-,Active | ||
| 64 | -GBU1504H,High Efficient Bridge Rectifier,GBU,400,15,-,150,1.3,1,500,150,-,Active | ||
| 65 | -GBU1506H,High Efficient Bridge Rectifier,GBU,400,15,-,150,1.7,1,500,150,-,Active | ||
| 66 | -GBJ2504H,High Efficient Bridge Rectifier,GBJ,600,25,-,250,1.3,1,500,150,-,Active | ||
| 67 | -GBJ2506H,High Efficient Bridge Rectifier,GBJ,600,25,-,250,1.7,1,500,150,-,Active | ||
| 68 | -1N4007,Standard Recovery Rectifier,DO-41,1000,1,-,50,1,1,500,150,-,Active | ||
| 69 | -1N5399,Standard Recovery Rectifier,DO-15,1000,1.5,-,75,1,1,500,150,-,Active | ||
| 70 | -1N5408,Standard Recovery Rectifier,DO-27,1000,3,-,100,1,1,500,150,-,Active | ||
| 71 | -RS1M,Fast Recovery Rectifier,SMA,1000,1,-,50,1.3,1,500,150,500,Active | ||
| 72 | -RS2M,Fast Recovery Rectifier,SMB,1000,2,-,75,1.3,1,500,150,500,Active | ||
| 73 | -RS3M,Fast Recovery Rectifier,SMC,1000,3,-,100,1.3,1,500,150,500,Active | ||
| 74 | -SF28,Super fast Recovery Rectifier,DO-15,600,2,-,60,1.7,1,500,150,35,Active | ||
| 75 | -SF56G,Super fast Recovery Rectifier,DO-27,400,5,-,125,1.3,1,500,150,35,Active | ||
| 76 | -DSE1006,Super fast Recovery Rectifier,TO-220AC,600,10,Single Positive,150,1.7,1,500,150,35,Active | ||
| 77 | -DSE1504F,Super fast Recovery Rectifier,ITO-220AC,400,15,Single Positive,150,1.4,1,500,150,35,Active'; | 58 | + $data = 'MBR10100CT,Schottky Barrier Rectifier,TO-220AB,100,5*2,common cathode,100,0.85,10,2500,175,-,Active,https://v6-file.globalso.com/upload/p/2837/files/MBR10100CT.pdf |
| 59 | +MBR2060BCT,Schottky Barrier Rectifier,ITO-220AB,60,10*2,common cathode,150,0.75,50,5000,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/MBR2060BCT.pdf | ||
| 60 | +MBR20150DCT,Schottky Barrier Rectifier,TO-263(D2PAK),150,10*2,common cathode,150,0.88,5,1500,175,-,Active,https://v6-file.globalso.com/upload/p/2837/files/MBR20150DCT.pdf | ||
| 61 | +MUR2060CT,High Efficient Rectifier,TO-220AB,600,10*2,common cathode,150,1.7,1,500,150,50,Active,https://v6-file.globalso.com/upload/p/2837/files/MUR2060CT.pdf | ||
| 62 | +MUR2040FCT,High Efficient Rectifier,ITO-220AB,400,10*2,common cathode,150,1.3,1,500,150,50,Active,https://v6-file.globalso.com/upload/p/2837/files/MUR2040FCT.pdf | ||
| 63 | +DSEK20S04B,Ultra fast soft Recovery Rectifier,TO-252(DPAK),400,10*2,common cathode,125,1.25,2,500,175,35,Active,https://v6-file.globalso.com/upload/p/2837/files/DSEK20S04B.pdf | ||
| 64 | +DSEK30S06D,Ultra fast soft Recovery Rectifier,TO-263(D2PAK),600,15*2,common cathode,150,1.7,2,500,175,35,Active,https://v6-file.globalso.com/upload/p/2837/files/DSEK30S06D.pdf | ||
| 65 | +DSEK60H06P,Ultra fast soft Recovery Rectifier,TO-247AD,600,30*2,common cathode,300,1.7,5,500,175,60,Active,https://v6-file.globalso.com/upload/p/2837/files/DSEK60H06P.pdf | ||
| 66 | +GBU410,Bridge Rectifier,GBU,1000,4,-,125,1,1,500,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/GBU410.pdf | ||
| 67 | +GBU1510,Bridge Rectifier,GBU,1000,15,-,250,1,1,500,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/GBU1510.pdf | ||
| 68 | +GBJ2510,Bridge Rectifier,GBJ,1000,25,-,300,1,1,500,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/GBJ2510.pdf | ||
| 69 | +GBU1504H,High Efficient Bridge Rectifier,GBU,400,15,-,150,1.3,1,500,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/GBU1504H.pdf | ||
| 70 | +GBU1506H,High Efficient Bridge Rectifier,GBU,400,15,-,150,1.7,1,500,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/GBU1506H.pdf | ||
| 71 | +GBJ2504H,High Efficient Bridge Rectifier,GBJ,600,25,-,250,1.3,1,500,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/GBJ2504H.pdf | ||
| 72 | +GBJ2506H,High Efficient Bridge Rectifier,GBJ,600,25,-,250,1.7,1,500,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/GBJ2506H.pdf | ||
| 73 | +1N4007,Standard Recovery Rectifier,DO-41,1000,1,-,50,1,1,500,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/1N4007.pdf | ||
| 74 | +1N5399,Standard Recovery Rectifier,DO-15,1000,1.5,-,75,1,1,500,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/1N5399.pdf | ||
| 75 | +1N5408,Standard Recovery Rectifier,DO-27,1000,3,-,100,1,1,500,150,-,Active,https://v6-file.globalso.com/upload/p/2837/files/1N5408.pdf | ||
| 76 | +RS1M,Fast Recovery Rectifier,SMA,1000,1,-,50,1.3,1,500,150,500,Active,https://v6-file.globalso.com/upload/p/2837/files/RS1M.pdf | ||
| 77 | +RS2M,Fast Recovery Rectifier,SMB,1000,2,-,75,1.3,1,500,150,500,Active,https://v6-file.globalso.com/upload/p/2837/files/RS2M.pdf | ||
| 78 | +RS3M,Fast Recovery Rectifier,SMC,1000,3,-,100,1.3,1,500,150,500,Active,https://v6-file.globalso.com/upload/p/2837/files/RS3M.pdf | ||
| 79 | +SF28,Super fast Recovery Rectifier,DO-15,600,2,-,60,1.7,1,500,150,35,Active,https://v6-file.globalso.com/upload/p/2837/files/SF28.pdf | ||
| 80 | +SF56G,Super fast Recovery Rectifier,DO-27,400,5,-,125,1.3,1,500,150,35,Active,https://v6-file.globalso.com/upload/p/2837/files/SF56G.pdf | ||
| 81 | +DSE1006,Super fast Recovery Rectifier,TO-220AC,600,10,Single Positive,150,1.7,1,500,150,35,Active,https://v6-file.globalso.com/upload/p/2837/files/DSE1006.pdf | ||
| 82 | +DSE1504F,Super fast Recovery Rectifier,ITO-220AC,400,15,Single Positive,150,1.4,1,500,150,35,Active,https://v6-file.globalso.com/upload/p/2837/files/DSE1504F.pdf'; | ||
| 78 | $array = explode("\n", $data); | 83 | $array = explode("\n", $data); |
| 79 | foreach ($array as $values){ | 84 | foreach ($array as $values){ |
| 80 | $array1 = explode(',',$values); | 85 | $array1 = explode(',',$values); |
-
请 注册 或 登录 后发表评论