From a3ab52eeec61275c02a4a336f20a75bd50a92793 Mon Sep 17 00:00:00 2001 From: Alessandro Battilani Date: Mon, 19 Apr 2021 23:40:40 +0200 Subject: [PATCH] fix caricamento e invio ftp --- LoadCSVData.pl | 10 +++++----- SendFtpElabData.pl | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LoadCSVData.pl b/LoadCSVData.pl index ed79c51..7971ecc 100755 --- a/LoadCSVData.pl +++ b/LoadCSVData.pl @@ -437,14 +437,14 @@ elsif ( $filecsvname =~ m/^D2W_ID\d\d\d\d_DT\d\d\d\d_\d*$/i ) { $unittype = $strings[0]; $unit = $strings[1]; $tool = $strings[2]; - $tooltype = 'MUX'; + $tooltype = 'D2W'; } elsif ( $filecsvname =~ m/^G301_ID\d\d\d\d_DT\d\d\d\d_\d*$/i ) { - my @strings = $filecsvname =~ /(.{1,3})_(.{1,6})_(.{1,6}).*/; + my @strings = $filecsvname =~ /(.{1,4})_(.{1,6})_(.{1,6}).*/; $unittype = $strings[0]; $unit = $strings[1]; $tool = $strings[2]; - $tooltype = 'MUX'; + $tooltype = 'G301'; } while ( my $line = ) { @@ -498,7 +498,7 @@ while ( my $line = ) { $G301_fcheck = 1; } - if ( $tooltype eq "MUX" ) { + if ( $tooltype eq "MUX" or $tooltype eq "D2W" or $tooltype eq "G301" ) { #$NodeData =~ s/Dis\./N\/A/g; @NewData = grep /\S/, split( /\||;/, $NodeData ); @@ -600,7 +600,7 @@ while ( my $line = ) { } else { my ( $y, $m, $d, $t ) = split( /[\s\/]/, $first ); - if ( length($y) != 4 ) { # G201 con la data invertita + if ( length($y) != 4 ) { # G201/G301 con la data invertita my $w = $y; $y = $d; $m = sprintf( '%02d', $m ); diff --git a/SendFtpElabData.pl b/SendFtpElabData.pl index 4a6c016..5fc68e4 100755 --- a/SendFtpElabData.pl +++ b/SendFtpElabData.pl @@ -72,7 +72,7 @@ sub trxelab { my $fileelab; - if ( $ftp_filename eq "" ) { + if ( !defined($ftp_filename) or $ftp_filename eq "" ) { $fileelab = '/var/lib/mysql-files/' . $tool . '_'