作者 lyh

gx

@@ -36,6 +36,7 @@ class RemainDay extends Command @@ -36,6 +36,7 @@ class RemainDay extends Command
36 */ 36 */
37 protected $ceaseProjectId = [ 37 protected $ceaseProjectId = [
38 354, 38 354,
  39 + 378,
39 649, 40 649,
40 1283, 41 1283,
41 2066 42 2066
@@ -73,163 +73,6 @@ class Demo extends Command @@ -73,163 +73,6 @@ class Demo extends Command
73 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL; 73 echo date('Y-m-d H:i:s') . 'end' . PHP_EOL;
74 } 74 }
75 75
76 - public function ceshi(){  
77 - $data = 'MBR10100CT,Schottky Barrier Rectifier,TO-220AB,100,5*2,common cathode,100,0.85,10,2500,175,-,Active  
78 -MBR2060BCT,Schottky Barrier Rectifier,ITO-220AB,60,10*2,common cathode,150,0.75,50,5000,150,-,Active  
79 -MBR20150DCT,Schottky Barrier Rectifier,TO-263(D2PAK),150,10*2,common cathode,150,0.88,5,1500,175,-,Active  
80 -MUR2060CT,High Efficient Rectifier,TO-220AB,600,10*2,common cathode,150,1.7,1,500,150,50,Active  
81 -MUR2040FCT,High Efficient Rectifier,ITO-220AB,400,10*2,common cathode,150,1.3,1,500,150,50,Active  
82 -DSEK20S04B,Ultra fast soft Recovery Rectifier,TO-252(DPAK),400,10*2,common cathode,125,1.25,2,500,175,35,Active  
83 -DSEK30S06D,Ultra fast soft Recovery Rectifier,TO-263(D2PAK),600,15*2,common cathode,150,1.7,2,500,175,35,Active  
84 -DSEK60H06P,Ultra fast soft Recovery Rectifier,TO-247AD,600,30*2,common cathode,300,1.7,5,500,175,60,Active  
85 -GBU410,Bridge Rectifier,GBU,1000,4,-,125,1,1,500,150,-,Active  
86 -GBU1510,Bridge Rectifier,GBU,1000,15,-,250,1,1,500,150,-,Active  
87 -GBJ2510,Bridge Rectifier,GBJ,1000,25,-,300,1,1,500,150,-,Active  
88 -GBU1504H,High Efficient Bridge Rectifier,GBU,400,15,-,150,1.3,1,500,150,-,Active  
89 -GBU1506H,High Efficient Bridge Rectifier,GBU,400,15,-,150,1.7,1,500,150,-,Active  
90 -GBJ2504H,High Efficient Bridge Rectifier,GBJ,600,25,-,250,1.3,1,500,150,-,Active  
91 -GBJ2506H,High Efficient Bridge Rectifier,GBJ,600,25,-,250,1.7,1,500,150,-,Active  
92 -1N4007,Standard Recovery Rectifier,DO-41,1000,1,-,50,1,1,500,150,-,Active  
93 -1N5399,Standard Recovery Rectifier,DO-15,1000,1.5,-,75,1,1,500,150,-,Active  
94 -1N5408,Standard Recovery Rectifier,DO-27,1000,3,-,100,1,1,500,150,-,Active  
95 -RS1M,Fast Recovery Rectifier,SMA,1000,1,-,50,1.3,1,500,150,500,Active  
96 -RS2M,Fast Recovery Rectifier,SMB,1000,2,-,75,1.3,1,500,150,500,Active  
97 -RS3M,Fast Recovery Rectifier,SMC,1000,3,-,100,1.3,1,500,150,500,Active  
98 -SF28,Super fast Recovery Rectifier,DO-15,600,2,-,60,1.7,1,500,150,35,Active  
99 -SF56G,Super fast Recovery Rectifier,DO-27,400,5,-,125,1.3,1,500,150,35,Active  
100 -DSE1006,Super fast Recovery Rectifier,TO-220AC,600,10,Single Positive,150,1.7,1,500,150,35,Active  
101 -DSE1504F,Super fast Recovery Rectifier,ITO-220AC,400,15,Single Positive,150,1.4,1,500,150,35,Active';  
102 - $array = explode("\n", $data);  
103 - foreach ($array as $values){  
104 - $array1 = explode(',',$values);  
105 - $contentData = [  
106 - 'name'=>$array1[0],  
107 - 'route'=>'',  
108 - 'project_id'=>2837,  
109 - 'operator_id'=>6393,  
110 - 'module_id'=>2,  
111 - ];  
112 - $customModuleContentModel = new CustomModuleContent();  
113 - $contentId = $customModuleContentModel->addReturnId($contentData);  
114 - $route = RouteMap::setRoute($array1[0],RouteMap::SOURCE_MODULE,$contentId,2837);  
115 - $customModuleContentModel->edit(['route'=>$route],['id'=>$contentId]);  
116 - $pd_extended_field_arr = [  
117 - [  
118 - 'key'=>'pd_extended_field_1',  
119 - 'type'=>1,  
120 - 'project_id'=>2837,  
121 - 'values'=>$array1[2],  
122 - 'content_id'=>$contentId,  
123 - 'module_id'=>2,  
124 - 'created_at'=>date('Y-m-d H:i:s'),  
125 - 'updated_at'=>date('Y-m-d H:i:s'),  
126 - ],  
127 - [  
128 - 'key'=>'pd_extended_field_2',  
129 - 'type'=>1,  
130 - 'project_id'=>2837,  
131 - 'values'=>$array1[3],  
132 - 'module_id'=>2,  
133 - 'content_id'=>$contentId,  
134 - 'created_at'=>date('Y-m-d H:i:s'),  
135 - 'updated_at'=>date('Y-m-d H:i:s'),  
136 - ],  
137 - [  
138 - 'key'=>'pd_extended_field_3',  
139 - 'type'=>1,  
140 - 'project_id'=>2837,  
141 - 'values'=>$array1[4],  
142 - 'module_id'=>2,  
143 - 'content_id'=>$contentId,  
144 - 'created_at'=>date('Y-m-d H:i:s'),  
145 - 'updated_at'=>date('Y-m-d H:i:s'),  
146 - ],  
147 - [  
148 - 'key'=>'pd_extended_field_4',  
149 - 'type'=>1,  
150 - 'project_id'=>2837,  
151 - 'values'=>$array1[5],  
152 - 'module_id'=>2,  
153 - 'content_id'=>$contentId,  
154 - 'created_at'=>date('Y-m-d H:i:s'),  
155 - 'updated_at'=>date('Y-m-d H:i:s'),  
156 - ],  
157 - [  
158 - 'key'=>'pd_extended_field_5',  
159 - 'type'=>1,  
160 - 'project_id'=>2837,  
161 - 'values'=>$array1[6],  
162 - 'module_id'=>2,  
163 - 'content_id'=>$contentId,  
164 - 'created_at'=>date('Y-m-d H:i:s'),  
165 - 'updated_at'=>date('Y-m-d H:i:s'),  
166 - ],  
167 - [  
168 - 'key'=>'pd_extended_field_6',  
169 - 'type'=>1,  
170 - 'project_id'=>2837,  
171 - 'values'=>$array1[7],  
172 - 'module_id'=>2,  
173 - 'content_id'=>$contentId,  
174 - 'created_at'=>date('Y-m-d H:i:s'),  
175 - 'updated_at'=>date('Y-m-d H:i:s'),  
176 - ],  
177 - [  
178 - 'key'=>'pd_extended_field_7',  
179 - 'type'=>1,  
180 - 'project_id'=>2837,  
181 - 'values'=>$array1[8],  
182 - 'module_id'=>2,  
183 - 'content_id'=>$contentId,  
184 - 'created_at'=>date('Y-m-d H:i:s'),  
185 - 'updated_at'=>date('Y-m-d H:i:s'),  
186 - ],  
187 - [  
188 - 'key'=>'pd_extended_field_8',  
189 - 'type'=>1,  
190 - 'project_id'=>2837,  
191 - 'values'=>$array1[9],  
192 - 'module_id'=>2,  
193 - 'content_id'=>$contentId,  
194 - 'created_at'=>date('Y-m-d H:i:s'),  
195 - 'updated_at'=>date('Y-m-d H:i:s'),  
196 - ],  
197 - [  
198 - 'key'=>'pd_extended_field_9',  
199 - 'type'=>1,  
200 - 'project_id'=>2837,  
201 - 'values'=>$array1[10],  
202 - 'module_id'=>2,  
203 - 'content_id'=>$contentId,  
204 - 'created_at'=>date('Y-m-d H:i:s'),  
205 - 'updated_at'=>date('Y-m-d H:i:s'),  
206 - ],  
207 - [  
208 - 'key'=>'pd_extended_field_10',  
209 - 'type'=>1,  
210 - 'project_id'=>2837,  
211 - 'values'=>$array1[11],  
212 - 'module_id'=>2,  
213 - 'content_id'=>$contentId,  
214 - 'created_at'=>date('Y-m-d H:i:s'),  
215 - 'updated_at'=>date('Y-m-d H:i:s'),  
216 - ],  
217 - [  
218 - 'key'=>'pd_extended_field_11',  
219 - 'type'=>1,  
220 - 'project_id'=>2837,  
221 - 'values'=>$array1[12],  
222 - 'module_id'=>2,  
223 - 'content_id'=>$contentId,  
224 - 'created_at'=>date('Y-m-d H:i:s'),  
225 - 'updated_at'=>date('Y-m-d H:i:s'),  
226 - ],  
227 - ];  
228 - $extendContentModel = new CustomModuleExtentContent();  
229 - $extendContentModel->insert($pd_extended_field_arr);  
230 - }  
231 - }  
232 -  
233 /** 76 /**
234 * @remark :更新产品 77 * @remark :更新产品
235 * @name :getProduct 78 * @name :getProduct
@@ -13,6 +13,7 @@ use App\Enums\Common\Code; @@ -13,6 +13,7 @@ use App\Enums\Common\Code;
13 use App\Http\Logic\Bside\News\NewsLogic; 13 use App\Http\Logic\Bside\News\NewsLogic;
14 use App\Models\Channel\Channel; 14 use App\Models\Channel\Channel;
15 use App\Models\CustomModule\CustomModuleContent; 15 use App\Models\CustomModule\CustomModuleContent;
  16 +use App\Models\CustomModule\CustomModuleExtentContent;
16 use App\Models\Domain\DomainInfo; 17 use App\Models\Domain\DomainInfo;
17 use App\Models\ExtentModule\ExtensionModuleValue; 18 use App\Models\ExtentModule\ExtensionModuleValue;
18 use App\Models\Manage\ManageHr; 19 use App\Models\Manage\ManageHr;
@@ -35,4 +36,167 @@ class TestController extends BaseController @@ -35,4 +36,167 @@ class TestController extends BaseController
35 $this->response('success',Code::SUCCESS,[]); 36 $this->response('success',Code::SUCCESS,[]);
36 } 37 }
37 38
  39 + /**
  40 + * @remark :导入扩展模块 (保留)
  41 + * @name :ceshis
  42 + * @author :lyh
  43 + * @method :post
  44 + * @time :2024/12/6 17:02
  45 + */
  46 + public function ceshis(){
  47 + $data = 'MBR10100CT,Schottky Barrier Rectifier,TO-220AB,100,5*2,common cathode,100,0.85,10,2500,175,-,Active
  48 +MBR2060BCT,Schottky Barrier Rectifier,ITO-220AB,60,10*2,common cathode,150,0.75,50,5000,150,-,Active
  49 +MBR20150DCT,Schottky Barrier Rectifier,TO-263(D2PAK),150,10*2,common cathode,150,0.88,5,1500,175,-,Active
  50 +MUR2060CT,High Efficient Rectifier,TO-220AB,600,10*2,common cathode,150,1.7,1,500,150,50,Active
  51 +MUR2040FCT,High Efficient Rectifier,ITO-220AB,400,10*2,common cathode,150,1.3,1,500,150,50,Active
  52 +DSEK20S04B,Ultra fast soft Recovery Rectifier,TO-252(DPAK),400,10*2,common cathode,125,1.25,2,500,175,35,Active
  53 +DSEK30S06D,Ultra fast soft Recovery Rectifier,TO-263(D2PAK),600,15*2,common cathode,150,1.7,2,500,175,35,Active
  54 +DSEK60H06P,Ultra fast soft Recovery Rectifier,TO-247AD,600,30*2,common cathode,300,1.7,5,500,175,60,Active
  55 +GBU410,Bridge Rectifier,GBU,1000,4,-,125,1,1,500,150,-,Active
  56 +GBU1510,Bridge Rectifier,GBU,1000,15,-,250,1,1,500,150,-,Active
  57 +GBJ2510,Bridge Rectifier,GBJ,1000,25,-,300,1,1,500,150,-,Active
  58 +GBU1504H,High Efficient Bridge Rectifier,GBU,400,15,-,150,1.3,1,500,150,-,Active
  59 +GBU1506H,High Efficient Bridge Rectifier,GBU,400,15,-,150,1.7,1,500,150,-,Active
  60 +GBJ2504H,High Efficient Bridge Rectifier,GBJ,600,25,-,250,1.3,1,500,150,-,Active
  61 +GBJ2506H,High Efficient Bridge Rectifier,GBJ,600,25,-,250,1.7,1,500,150,-,Active
  62 +1N4007,Standard Recovery Rectifier,DO-41,1000,1,-,50,1,1,500,150,-,Active
  63 +1N5399,Standard Recovery Rectifier,DO-15,1000,1.5,-,75,1,1,500,150,-,Active
  64 +1N5408,Standard Recovery Rectifier,DO-27,1000,3,-,100,1,1,500,150,-,Active
  65 +RS1M,Fast Recovery Rectifier,SMA,1000,1,-,50,1.3,1,500,150,500,Active
  66 +RS2M,Fast Recovery Rectifier,SMB,1000,2,-,75,1.3,1,500,150,500,Active
  67 +RS3M,Fast Recovery Rectifier,SMC,1000,3,-,100,1.3,1,500,150,500,Active
  68 +SF28,Super fast Recovery Rectifier,DO-15,600,2,-,60,1.7,1,500,150,35,Active
  69 +SF56G,Super fast Recovery Rectifier,DO-27,400,5,-,125,1.3,1,500,150,35,Active
  70 +DSE1006,Super fast Recovery Rectifier,TO-220AC,600,10,Single Positive,150,1.7,1,500,150,35,Active
  71 +DSE1504F,Super fast Recovery Rectifier,ITO-220AC,400,15,Single Positive,150,1.4,1,500,150,35,Active';
  72 + $array = explode("\n", $data);
  73 + foreach ($array as $values){
  74 + $array1 = explode(',',$values);
  75 + $contentData = [
  76 + 'name'=>$array1[0],
  77 + 'route'=>'',
  78 + 'project_id'=>2837,
  79 + 'operator_id'=>6393,
  80 + 'module_id'=>2,
  81 + ];
  82 + $customModuleContentModel = new CustomModuleContent();
  83 + $contentId = $customModuleContentModel->addReturnId($contentData);
  84 + $route = RouteMap::setRoute($array1[0],RouteMap::SOURCE_MODULE,$contentId,2837);
  85 + $customModuleContentModel->edit(['route'=>$route],['id'=>$contentId]);
  86 + $pd_extended_field_arr = [
  87 + [
  88 + 'key'=>'pd_extended_field_1',
  89 + 'type'=>1,
  90 + 'project_id'=>2837,
  91 + 'values'=>$array1[2],
  92 + 'content_id'=>$contentId,
  93 + 'module_id'=>2,
  94 + 'created_at'=>date('Y-m-d H:i:s'),
  95 + 'updated_at'=>date('Y-m-d H:i:s'),
  96 + ],
  97 + [
  98 + 'key'=>'pd_extended_field_2',
  99 + 'type'=>1,
  100 + 'project_id'=>2837,
  101 + 'values'=>$array1[3],
  102 + 'module_id'=>2,
  103 + 'content_id'=>$contentId,
  104 + 'created_at'=>date('Y-m-d H:i:s'),
  105 + 'updated_at'=>date('Y-m-d H:i:s'),
  106 + ],
  107 + [
  108 + 'key'=>'pd_extended_field_3',
  109 + 'type'=>1,
  110 + 'project_id'=>2837,
  111 + 'values'=>$array1[4],
  112 + 'module_id'=>2,
  113 + 'content_id'=>$contentId,
  114 + 'created_at'=>date('Y-m-d H:i:s'),
  115 + 'updated_at'=>date('Y-m-d H:i:s'),
  116 + ],
  117 + [
  118 + 'key'=>'pd_extended_field_4',
  119 + 'type'=>1,
  120 + 'project_id'=>2837,
  121 + 'values'=>$array1[5],
  122 + 'module_id'=>2,
  123 + 'content_id'=>$contentId,
  124 + 'created_at'=>date('Y-m-d H:i:s'),
  125 + 'updated_at'=>date('Y-m-d H:i:s'),
  126 + ],
  127 + [
  128 + 'key'=>'pd_extended_field_5',
  129 + 'type'=>1,
  130 + 'project_id'=>2837,
  131 + 'values'=>$array1[6],
  132 + 'module_id'=>2,
  133 + 'content_id'=>$contentId,
  134 + 'created_at'=>date('Y-m-d H:i:s'),
  135 + 'updated_at'=>date('Y-m-d H:i:s'),
  136 + ],
  137 + [
  138 + 'key'=>'pd_extended_field_6',
  139 + 'type'=>1,
  140 + 'project_id'=>2837,
  141 + 'values'=>$array1[7],
  142 + 'module_id'=>2,
  143 + 'content_id'=>$contentId,
  144 + 'created_at'=>date('Y-m-d H:i:s'),
  145 + 'updated_at'=>date('Y-m-d H:i:s'),
  146 + ],
  147 + [
  148 + 'key'=>'pd_extended_field_7',
  149 + 'type'=>1,
  150 + 'project_id'=>2837,
  151 + 'values'=>$array1[8],
  152 + 'module_id'=>2,
  153 + 'content_id'=>$contentId,
  154 + 'created_at'=>date('Y-m-d H:i:s'),
  155 + 'updated_at'=>date('Y-m-d H:i:s'),
  156 + ],
  157 + [
  158 + 'key'=>'pd_extended_field_8',
  159 + 'type'=>1,
  160 + 'project_id'=>2837,
  161 + 'values'=>$array1[9],
  162 + 'module_id'=>2,
  163 + 'content_id'=>$contentId,
  164 + 'created_at'=>date('Y-m-d H:i:s'),
  165 + 'updated_at'=>date('Y-m-d H:i:s'),
  166 + ],
  167 + [
  168 + 'key'=>'pd_extended_field_9',
  169 + 'type'=>1,
  170 + 'project_id'=>2837,
  171 + 'values'=>$array1[10],
  172 + 'module_id'=>2,
  173 + 'content_id'=>$contentId,
  174 + 'created_at'=>date('Y-m-d H:i:s'),
  175 + 'updated_at'=>date('Y-m-d H:i:s'),
  176 + ],
  177 + [
  178 + 'key'=>'pd_extended_field_10',
  179 + 'type'=>1,
  180 + 'project_id'=>2837,
  181 + 'values'=>$array1[11],
  182 + 'module_id'=>2,
  183 + 'content_id'=>$contentId,
  184 + 'created_at'=>date('Y-m-d H:i:s'),
  185 + 'updated_at'=>date('Y-m-d H:i:s'),
  186 + ],
  187 + [
  188 + 'key'=>'pd_extended_field_11',
  189 + 'type'=>1,
  190 + 'project_id'=>2837,
  191 + 'values'=>$array1[12],
  192 + 'module_id'=>2,
  193 + 'content_id'=>$contentId,
  194 + 'created_at'=>date('Y-m-d H:i:s'),
  195 + 'updated_at'=>date('Y-m-d H:i:s'),
  196 + ],
  197 + ];
  198 + $extendContentModel = new CustomModuleExtentContent();
  199 + $extendContentModel->insert($pd_extended_field_arr);
  200 + }
  201 + }
38 } 202 }