Add script to get file from motiv. #549
This commit is contained in:
parent
60a4d0bb60
commit
699c135f33
3 changed files with 9 additions and 207 deletions
|
|
@ -32,8 +32,7 @@ $filename = 'warrantylogs' . $date . '.csv';
|
|||
$res = $blob_client->getBlob('warranty', $filename);
|
||||
// print_r($res);
|
||||
|
||||
file_put_contents("output.txt", $res->getContentStream());
|
||||
|
||||
file_put_contents("/tmp/output.txt", $res->getContentStream());
|
||||
|
||||
/*
|
||||
// NOTE: getting via url
|
||||
|
|
|
|||
|
|
@ -1,204 +0,0 @@
|
|||
PV1000240341,N/A,Dispatch,In,2021-04-12T01:12:16.5930000+08:00
|
||||
PV1000240344,N/A,Dispatch,In,2021-04-12T01:12:16.6100000+08:00
|
||||
PV1000240335,N/A,Dispatch,In,2021-04-12T01:12:16.5630000+08:00
|
||||
PV1000240345,N/A,Dispatch,In,2021-04-12T01:12:16.5930000+08:00
|
||||
PV1000240338,N/A,Dispatch,In,2021-04-12T01:12:16.5930000+08:00
|
||||
PV1000240340,N/A,Dispatch,In,2021-04-12T01:12:16.5930000+08:00
|
||||
PV1000240337,N/A,Dispatch,In,2021-04-12T01:12:16.5770000+08:00
|
||||
PV1000240334,N/A,Dispatch,In,2021-04-12T01:12:16.6100000+08:00
|
||||
PV1000240330,N/A,Dispatch,In,2021-04-12T01:12:16.5630000+08:00
|
||||
PV1000240342,N/A,Dispatch,In,2021-04-12T01:12:16.6100000+08:00
|
||||
PV1000240343,N/A,Dispatch,In,2021-04-12T01:12:16.6100000+08:00
|
||||
PV1000240336,N/A,Dispatch,In,2021-04-12T01:12:16.5630000+08:00
|
||||
PV1000240339,N/A,Dispatch,In,2021-04-12T01:12:16.5470000+08:00
|
||||
PV1000240332,N/A,Dispatch,In,2021-04-12T01:12:16.5770000+08:00
|
||||
PV1000240333,N/A,Dispatch,In,2021-04-12T01:12:16.6100000+08:00
|
||||
PV1000240324,N/A,Dispatch,In,2021-04-12T01:12:16.5770000+08:00
|
||||
PV1000240326,N/A,Dispatch,In,2021-04-12T01:12:16.5770000+08:00
|
||||
MX2000056889,N/A,Dispatch,In,2021-04-12T02:58:37.8900000+08:00
|
||||
MX2000056874,N/A,Dispatch,In,2021-04-12T02:58:37.9070000+08:00
|
||||
MX2000056888,N/A,Dispatch,In,2021-04-12T02:58:37.9070000+08:00
|
||||
MX2000056887,N/A,Dispatch,In,2021-04-12T02:58:37.9070000+08:00
|
||||
MX2000056881,N/A,Dispatch,In,2021-04-12T02:58:37.9070000+08:00
|
||||
MX2000056880,N/A,Dispatch,In,2021-04-12T02:58:37.9230000+08:00
|
||||
MX2000056879,N/A,Dispatch,In,2021-04-12T02:58:37.9370000+08:00
|
||||
MX2000056886,N/A,Dispatch,In,2021-04-12T02:58:37.9370000+08:00
|
||||
MX2000056890,N/A,Dispatch,In,2021-04-12T02:58:37.9370000+08:00
|
||||
MX2000056885,N/A,Dispatch,In,2021-04-12T02:58:37.9370000+08:00
|
||||
MG3102419196,N/A,Dispatch,In,2021-04-12T02:58:38.2200000+08:00
|
||||
MG3102419202,N/A,Dispatch,In,2021-04-12T02:58:38.2330000+08:00
|
||||
MG3102419197,N/A,Dispatch,In,2021-04-12T02:58:38.2330000+08:00
|
||||
MG3102419203,N/A,Dispatch,In,2021-04-12T02:58:38.2200000+08:00
|
||||
MG3102419198,N/A,Dispatch,In,2021-04-12T02:58:38.2200000+08:00
|
||||
PV1000225903,N/A,Dispatch,In,2021-04-11T23:45:21.0630000+08:00
|
||||
PV1000225928,N/A,Dispatch,In,2021-04-11T23:45:21.0500000+08:00
|
||||
PV1000225905,N/A,Dispatch,In,2021-04-11T23:45:20.9870000+08:00
|
||||
PV1000225909,N/A,Dispatch,In,2021-04-11T23:45:21.0330000+08:00
|
||||
PV1000225918,N/A,Dispatch,In,2021-04-11T23:45:21.1900000+08:00
|
||||
PV1000225911,N/A,Dispatch,In,2021-04-11T23:45:21.1100000+08:00
|
||||
PV1000225933,N/A,Dispatch,In,2021-04-11T23:45:21.0170000+08:00
|
||||
PV1000225939,N/A,Dispatch,In,2021-04-11T23:45:21.0500000+08:00
|
||||
PV1000225940,N/A,Dispatch,In,2021-04-11T23:45:21.2030000+08:00
|
||||
PV1000225934,N/A,Dispatch,In,2021-04-11T23:45:21.0500000+08:00
|
||||
PV1000225916,N/A,Dispatch,In,2021-04-11T23:45:21.0630000+08:00
|
||||
PV1000225915,N/A,Dispatch,In,2021-04-11T23:45:21+08:00
|
||||
PV1000225937,N/A,Dispatch,In,2021-04-11T23:45:21+08:00
|
||||
PV1000225929,N/A,Dispatch,In,2021-04-11T23:45:21.0170000+08:00
|
||||
PV1000225906,N/A,Dispatch,In,2021-04-11T23:45:21.1100000+08:00
|
||||
PV1000225938,N/A,Dispatch,In,2021-04-11T23:45:21.0970000+08:00
|
||||
PV1000225902,N/A,Dispatch,In,2021-04-11T23:45:21.0800000+08:00
|
||||
PV1000225914,N/A,Dispatch,In,2021-04-11T23:45:21+08:00
|
||||
PV1000225932,N/A,Dispatch,In,2021-04-11T23:45:21+08:00
|
||||
PV1000225908,N/A,Dispatch,In,2021-04-11T23:45:21.0630000+08:00
|
||||
PV1000225907,N/A,Dispatch,In,2021-04-11T23:45:21.0800000+08:00
|
||||
PV1000225910,N/A,Dispatch,In,2021-04-11T23:45:20.9870000+08:00
|
||||
PV1000225917,N/A,Dispatch,In,2021-04-11T23:45:21.0330000+08:00
|
||||
PV1000225921,N/A,Dispatch,In,2021-04-11T23:45:21.0330000+08:00
|
||||
PV1000225913,N/A,Dispatch,In,2021-04-11T23:45:20.9870000+08:00
|
||||
PV1000225919,N/A,Dispatch,In,2021-04-11T23:45:21.0800000+08:00
|
||||
PV1000225935,N/A,Dispatch,In,2021-04-11T23:45:21.0970000+08:00
|
||||
PV1000225900,N/A,Dispatch,In,2021-04-11T23:45:21.0330000+08:00
|
||||
PV1000225904,N/A,Dispatch,In,2021-04-11T23:45:21.1100000+08:00
|
||||
PV1000225931,N/A,Dispatch,In,2021-04-11T23:45:21.0970000+08:00
|
||||
PV1000225897,N/A,Dispatch,In,2021-04-11T23:45:21.0800000+08:00
|
||||
PV1000225901,N/A,Dispatch,In,2021-04-11T23:45:20.9870000+08:00
|
||||
PV1000225930,N/A,Dispatch,In,2021-04-11T23:45:21.2030000+08:00
|
||||
PV1000225926,N/A,Dispatch,In,2021-04-11T23:45:21.1900000+08:00
|
||||
PV1000225898,N/A,Dispatch,In,2021-04-11T23:45:21.0630000+08:00
|
||||
PV1000225927,N/A,Dispatch,In,2021-04-11T23:45:21.0970000+08:00
|
||||
PV1000225896,N/A,Dispatch,In,2021-04-11T23:45:21.0330000+08:00
|
||||
PV1000225924,N/A,Dispatch,In,2021-04-11T23:45:21.0500000+08:00
|
||||
PV1000225983,N/A,Dispatch,In,2021-04-11T23:45:20.9700000+08:00
|
||||
PV1000225925,N/A,Dispatch,In,2021-04-11T23:45:21.0170000+08:00
|
||||
PV1000225985,N/A,Dispatch,In,2021-04-11T23:45:20.9700000+08:00
|
||||
PV1000225912,N/A,Dispatch,In,2021-04-11T23:45:20.9870000+08:00
|
||||
PV1000225980,N/A,Dispatch,In,2021-04-11T23:45:20.9700000+08:00
|
||||
PV1000225982,N/A,Dispatch,In,2021-04-11T23:45:20.9700000+08:00
|
||||
PV1000225922,N/A,Dispatch,In,2021-04-11T23:45:21.1900000+08:00
|
||||
PV1000225923,N/A,Dispatch,In,2021-04-11T23:45:21.0800000+08:00
|
||||
PV1000225984,N/A,Dispatch,In,2021-04-11T23:45:20.9700000+08:00
|
||||
PV1000225899,N/A,Dispatch,In,2021-04-11T23:45:20.9870000+08:00
|
||||
PV1000225920,N/A,Dispatch,In,2021-04-11T23:45:21.0500000+08:00
|
||||
MES215591711,N/A,Dispatch,In,2021-04-11T22:36:43.9830000+08:00
|
||||
MES215591707,N/A,Dispatch,In,2021-04-11T22:36:43.9670000+08:00
|
||||
MES215591708,N/A,Dispatch,In,2021-04-11T22:36:43.9830000+08:00
|
||||
MES215591699,N/A,Dispatch,In,2021-04-11T22:36:43.8600000+08:00
|
||||
MES215591700,N/A,Dispatch,In,2021-04-11T22:36:43.8430000+08:00
|
||||
MES215591718,N/A,Dispatch,In,2021-04-11T22:36:44.0770000+08:00
|
||||
MES215591733,N/A,Dispatch,In,2021-04-11T22:36:44.0770000+08:00
|
||||
MES215591725,N/A,Dispatch,In,2021-04-11T22:36:44.0600000+08:00
|
||||
MES215591723,N/A,Dispatch,In,2021-04-11T22:36:44.0930000+08:00
|
||||
MES215591724,N/A,Dispatch,In,2021-04-11T22:36:44.0930000+08:00
|
||||
MES215591712,N/A,Dispatch,In,2021-04-11T22:36:44.0130000+08:00
|
||||
MES215591716,N/A,Dispatch,In,2021-04-11T22:36:44.0300000+08:00
|
||||
MES215591713,N/A,Dispatch,In,2021-04-11T22:36:44.0130000+08:00
|
||||
MES215591714,N/A,Dispatch,In,2021-04-11T22:36:44.0300000+08:00
|
||||
MES215591719,N/A,Dispatch,In,2021-04-11T22:36:44.0130000+08:00
|
||||
MES215591721,N/A,Dispatch,In,2021-04-11T22:36:44.0300000+08:00
|
||||
MES215591720,N/A,Dispatch,In,2021-04-11T22:36:44.0300000+08:00
|
||||
MES215591722,N/A,Dispatch,In,2021-04-11T22:36:44.0470000+08:00
|
||||
MES215591715,N/A,Dispatch,In,2021-04-11T22:36:44.0470000+08:00
|
||||
MES215591709,N/A,Dispatch,In,2021-04-11T22:36:44+08:00
|
||||
MES215591710,N/A,Dispatch,In,2021-04-11T22:36:44+08:00
|
||||
MES215591704,N/A,Dispatch,In,2021-04-11T22:36:43.9670000+08:00
|
||||
MES215591706,N/A,Dispatch,In,2021-04-11T22:36:43.9830000+08:00
|
||||
MES215591698,N/A,Dispatch,In,2021-04-11T22:36:43.8430000+08:00
|
||||
MES215591705,N/A,Dispatch,In,2021-04-11T22:36:43.8600000+08:00
|
||||
MES215591732,N/A,Dispatch,In,2021-04-11T22:36:44.0770000+08:00
|
||||
MES215591731,N/A,Dispatch,In,2021-04-11T22:36:44.0770000+08:00
|
||||
MES215591717,N/A,Dispatch,In,2021-04-11T22:36:44.0470000+08:00
|
||||
MES215591727,N/A,Dispatch,In,2021-04-11T22:36:44.0470000+08:00
|
||||
MES215591695,N/A,Dispatch,In,2021-04-11T22:36:43.9530000+08:00
|
||||
MES215591701,N/A,Dispatch,In,2021-04-11T22:36:44+08:00
|
||||
MES215591702,N/A,Dispatch,In,2021-04-11T22:36:44+08:00
|
||||
MES215591689,N/A,Dispatch,In,2021-04-11T22:36:43.8430000+08:00
|
||||
MES215591692,N/A,Dispatch,In,2021-04-11T22:36:43.8600000+08:00
|
||||
MES215591696,N/A,Dispatch,In,2021-04-11T22:36:43.9670000+08:00
|
||||
MES215591697,N/A,Dispatch,In,2021-04-11T22:36:43.9670000+08:00
|
||||
MES215591703,N/A,Dispatch,In,2021-04-11T22:36:44+08:00
|
||||
MES215591690,N/A,Dispatch,In,2021-04-11T22:36:43.8430000+08:00
|
||||
MES215591693,N/A,Dispatch,In,2021-04-11T22:36:43.8600000+08:00
|
||||
MES215591681,N/A,Dispatch,In,2021-04-11T22:36:43.8270000+08:00
|
||||
MES215591683,N/A,Dispatch,In,2021-04-11T22:36:43.9530000+08:00
|
||||
MES215591687,N/A,Dispatch,In,2021-04-11T22:36:43.9530000+08:00
|
||||
MES215591686,N/A,Dispatch,In,2021-04-11T22:36:43.9530000+08:00
|
||||
MES215591688,N/A,Dispatch,In,2021-04-11T22:36:44.0130000+08:00
|
||||
MES215591685,N/A,Dispatch,In,2021-04-11T22:36:43.8730000+08:00
|
||||
MES215591682,N/A,Dispatch,In,2021-04-11T22:36:43.8270000+08:00
|
||||
MES215591684,N/A,Dispatch,In,2021-04-11T22:36:43.8430000+08:00
|
||||
MES215591691,N/A,Dispatch,In,2021-04-11T22:36:43.8600000+08:00
|
||||
MES215591694,N/A,Dispatch,In,2021-04-11T22:36:43.9670000+08:00
|
||||
MG3101407704,N/A,Dispatch,In,2021-04-12T00:39:47.1870000+08:00
|
||||
MG3101407702,N/A,Dispatch,In,2021-04-12T00:39:47.1870000+08:00
|
||||
MG3101407703,N/A,Dispatch,In,2021-04-12T00:39:47.1870000+08:00
|
||||
MG3101407701,N/A,Dispatch,In,2021-04-12T00:39:47.1870000+08:00
|
||||
MG3101407705,N/A,Dispatch,In,2021-04-12T00:39:47.1700000+08:00
|
||||
MG2000112754,N/A,Dispatch,In,2021-04-12T00:40:11.3670000+08:00
|
||||
MX2000067982,N/A,Dispatch,In,2021-04-12T00:33:42.1830000+08:00
|
||||
MX2000067975,N/A,Dispatch,In,2021-04-12T00:33:42.4670000+08:00
|
||||
MX2000067983,N/A,Dispatch,In,2021-04-12T00:33:42.1830000+08:00
|
||||
MX2000067979,N/A,Dispatch,In,2021-04-12T00:33:42.4500000+08:00
|
||||
MX2000067984,N/A,Dispatch,In,2021-04-12T00:33:42.1700000+08:00
|
||||
MX2000067972,N/A,Dispatch,In,2021-04-12T00:33:42.3730000+08:00
|
||||
MX2000067971,N/A,Dispatch,In,2021-04-12T00:33:42.4330000+08:00
|
||||
MX2000067977,N/A,Dispatch,In,2021-04-12T00:33:42.4500000+08:00
|
||||
MX2000067981,N/A,Dispatch,In,2021-04-12T00:33:42.4670000+08:00
|
||||
MX2000067974,N/A,Dispatch,In,2021-04-12T00:33:42.4500000+08:00
|
||||
MX2000067978,N/A,Dispatch,In,2021-04-12T00:33:42.4670000+08:00
|
||||
MX2000067989,N/A,Dispatch,In,2021-04-12T00:33:42.1700000+08:00
|
||||
MX2000067980,N/A,Dispatch,In,2021-04-12T00:33:42.1830000+08:00
|
||||
MX2000067976,N/A,Dispatch,In,2021-04-12T00:33:42.1830000+08:00
|
||||
MX2000067973,N/A,Dispatch,In,2021-04-12T00:33:42.2170000+08:00
|
||||
MX2000067985,N/A,Dispatch,In,2021-04-12T00:33:42.1530000+08:00
|
||||
MX2000067990,N/A,Dispatch,In,2021-04-12T00:33:42.1700000+08:00
|
||||
MX2000067987,N/A,Dispatch,In,2021-04-12T00:33:42.1700000+08:00
|
||||
MX2000067992,N/A,Dispatch,In,2021-04-12T00:33:42.5270000+08:00
|
||||
MX2000067988,N/A,Dispatch,In,2021-04-12T00:33:41.9330000+08:00
|
||||
MX2000067986,N/A,Dispatch,In,2021-04-12T00:33:42.1700000+08:00
|
||||
MX2000068005,N/A,Dispatch,In,2021-04-12T00:33:42.4800000+08:00
|
||||
MX2000068006,N/A,Dispatch,In,2021-04-12T00:33:42.4800000+08:00
|
||||
MX2000068010,N/A,Dispatch,In,2021-04-12T00:33:42.4970000+08:00
|
||||
MX2000067994,N/A,Dispatch,In,2021-04-12T00:33:42.8570000+08:00
|
||||
MX2000067991,N/A,Dispatch,In,2021-04-12T00:33:42.5270000+08:00
|
||||
MX2000067995,N/A,Dispatch,In,2021-04-12T00:33:42.5130000+08:00
|
||||
MX2000067997,N/A,Dispatch,In,2021-04-12T00:33:42.5270000+08:00
|
||||
MX2000067999,N/A,Dispatch,In,2021-04-12T00:33:42.5730000+08:00
|
||||
MX2000068003,N/A,Dispatch,In,2021-04-12T00:33:42.5130000+08:00
|
||||
MX2000068015,N/A,Dispatch,In,2021-04-12T00:33:42.9500000+08:00
|
||||
MX2000068020,N/A,Dispatch,In,2021-04-12T00:33:42.9500000+08:00
|
||||
MX2000068028,N/A,Dispatch,In,2021-04-12T00:33:42.9030000+08:00
|
||||
MX2000068024,N/A,Dispatch,In,2021-04-12T00:33:42.9330000+08:00
|
||||
MX2000068029,N/A,Dispatch,In,2021-04-12T00:33:42.9200000+08:00
|
||||
MX2000068026,N/A,Dispatch,In,2021-04-12T00:33:42.9200000+08:00
|
||||
MX2000068023,N/A,Dispatch,In,2021-04-12T00:33:42.9330000+08:00
|
||||
MX2000068019,N/A,Dispatch,In,2021-04-12T00:33:42.9800000+08:00
|
||||
MX2000068018,N/A,Dispatch,In,2021-04-12T00:33:42.9800000+08:00
|
||||
MX2000068014,N/A,Dispatch,In,2021-04-12T00:33:42.9800000+08:00
|
||||
MX2000068022,N/A,Dispatch,In,2021-04-12T00:33:42.9330000+08:00
|
||||
MX2000068017,N/A,Dispatch,In,2021-04-12T00:33:42.9670000+08:00
|
||||
MX2000068011,N/A,Dispatch,In,2021-04-12T00:33:42.9500000+08:00
|
||||
MX2000068012,N/A,Dispatch,In,2021-04-12T00:33:42.9670000+08:00
|
||||
MX2000068008,N/A,Dispatch,In,2021-04-12T00:33:42.4800000+08:00
|
||||
MX2000068009,N/A,Dispatch,In,2021-04-12T00:33:42.4800000+08:00
|
||||
MX2000068004,N/A,Dispatch,In,2021-04-12T00:33:42.4970000+08:00
|
||||
MX2000067993,N/A,Dispatch,In,2021-04-12T00:33:42.5430000+08:00
|
||||
MX2000068016,N/A,Dispatch,In,2021-04-12T00:33:42.9670000+08:00
|
||||
MX2000068013,N/A,Dispatch,In,2021-04-12T00:33:42.9670000+08:00
|
||||
MX2000068025,N/A,Dispatch,In,2021-04-12T00:33:42.9030000+08:00
|
||||
MX2000068021,N/A,Dispatch,In,2021-04-12T00:33:42.9500000+08:00
|
||||
MX2000068007,N/A,Dispatch,In,2021-04-12T00:33:42.4970000+08:00
|
||||
MX2000068002,N/A,Dispatch,In,2021-04-12T00:33:42.5130000+08:00
|
||||
MX2000068000,N/A,Dispatch,In,2021-04-12T00:33:42.5600000+08:00
|
||||
MX2000067998,N/A,Dispatch,In,2021-04-12T00:33:42.5270000+08:00
|
||||
MX2000068001,N/A,Dispatch,In,2021-04-12T00:33:42.5130000+08:00
|
||||
MX2000067996,N/A,Dispatch,In,2021-04-12T00:33:42.5130000+08:00
|
||||
MX2000067967,N/A,Dispatch,In,2021-04-12T00:33:42.9030000+08:00
|
||||
MX2000067969,N/A,Dispatch,In,2021-04-12T00:33:42.8870000+08:00
|
||||
MX2000067968,N/A,Dispatch,In,2021-04-12T00:33:42.8570000+08:00
|
||||
MX2000067970,N/A,Dispatch,In,2021-04-12T00:33:42.8870000+08:00
|
||||
MX2000067965,N/A,Dispatch,In,2021-04-12T00:33:42.8730000+08:00
|
||||
MX2000067966,N/A,Dispatch,In,2021-04-12T00:33:42.8870000+08:00
|
||||
MX2000067964,N/A,Dispatch,In,2021-04-12T00:33:42.8870000+08:00
|
||||
MX2000067963,N/A,Dispatch,In,2021-04-12T00:33:42.9030000+08:00
|
||||
MX2000068030,N/A,Dispatch,In,2021-04-12T00:33:42.9200000+08:00
|
||||
MX2000068027,N/A,Dispatch,In,2021-04-12T00:33:42.9200000+08:00
|
||||
|
|
@ -25,10 +25,17 @@ while (($row = fgetcsv($csv)) !== false)
|
|||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
$serial = trim(strtoupper($row[0]));
|
||||
$sku = trim($row[1]);
|
||||
$date_create = $row[2];
|
||||
$ref_id = $row[3];
|
||||
$ref_id = $row[3]; */
|
||||
|
||||
// sample of line in output file:
|
||||
// MG3101407704,N/A,Dispatch,In,2021-04-12T00:39:47.1870000+08:00
|
||||
$serial = trim(strtoupper($row[0]);
|
||||
$sku = trim($row[1]);
|
||||
$date_create = $row[4]);
|
||||
|
||||
$res = $sth->execute([
|
||||
':serial' => $serial,
|
||||
|
|
|
|||
Loading…
Reference in a new issue