fix caricamento e invio ftp

This commit is contained in:
2021-04-19 23:40:40 +02:00
parent 461d687897
commit a3ab52eeec
2 changed files with 6 additions and 6 deletions

View File

@@ -437,14 +437,14 @@ elsif ( $filecsvname =~ m/^D2W_ID\d\d\d\d_DT\d\d\d\d_\d*$/i ) {
$unittype = $strings[0]; $unittype = $strings[0];
$unit = $strings[1]; $unit = $strings[1];
$tool = $strings[2]; $tool = $strings[2];
$tooltype = 'MUX'; $tooltype = 'D2W';
} }
elsif ( $filecsvname =~ m/^G301_ID\d\d\d\d_DT\d\d\d\d_\d*$/i ) { 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]; $unittype = $strings[0];
$unit = $strings[1]; $unit = $strings[1];
$tool = $strings[2]; $tool = $strings[2];
$tooltype = 'MUX'; $tooltype = 'G301';
} }
while ( my $line = <FILE> ) { while ( my $line = <FILE> ) {
@@ -498,7 +498,7 @@ while ( my $line = <FILE> ) {
$G301_fcheck = 1; $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; #$NodeData =~ s/Dis\./N\/A/g;
@NewData = grep /\S/, split( /\||;/, $NodeData ); @NewData = grep /\S/, split( /\||;/, $NodeData );
@@ -600,7 +600,7 @@ while ( my $line = <FILE> ) {
} }
else { else {
my ( $y, $m, $d, $t ) = split( /[\s\/]/, $first ); 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; my $w = $y;
$y = $d; $y = $d;
$m = sprintf( '%02d', $m ); $m = sprintf( '%02d', $m );

View File

@@ -72,7 +72,7 @@ sub trxelab {
my $fileelab; my $fileelab;
if ( $ftp_filename eq "" ) { if ( !defined($ftp_filename) or $ftp_filename eq "" ) {
$fileelab = $fileelab =
'/var/lib/mysql-files/' '/var/lib/mysql-files/'
. $tool . '_' . $tool . '_'