浏览代码

内部市场化

任敬轩 1 月之前
父节点
当前提交
3e8640fafa
共有 1 个文件被更改,包括 26 次插入0 次删除
  1. 26 0
      app/Console/Commands/Nbsch.php

+ 26 - 0
app/Console/Commands/Nbsch.php

@@ -95,6 +95,32 @@ class Nbsch extends Command
             ORDER BY DATE_FORMAT(a.DOCUMENT_DATE, '%Y-%m') DESC
         ");
 
+        if(count($result) > 0){
+            for($i=0;$i<count($result);$i++){
+                $id = mt_rand(pow(10, 18), pow(10, 18) + 999999999);
+                $insert = [
+                    'ID' => $id,
+                    'FORM_DATA_ID' => $id,
+                    'DATA_INDEX' => 0.0,
+                    'CREATE_TIME' => date('Y-m-d H:i:s'),
+                    'TENANT_KEY' => 't1zz9w8165',
+                    'IS_DELETE' => 0,
+                    'DELETE_TYPE' => 0,
+                    'FT_STATUS' => 0,
+
+                    'document_type' => $result[$i]->DOCUMENT_TYPE,
+                    'document_date' => $result[$i]->DOCUMENT_DATE,
+                    'dyjsje' => $result[$i]->dyjsje,
+                    'zcspje' => $result[$i]->zcspje,
+                    'qtje' => $result[$i]->qtje,
+                    'sptgl' => $result[$i]->sptgl,
+                    'sptgl_val' => $result[$i]->sptgl_val
+                ];
+
+                DB::connection('mysql_fwe10')->table('uf_jsxmsp')->insert($insert);
+            }
+        }
+
         Log::info('654321');
         Log::info($result);
         var_dump($result);