gestione g201 2
This commit is contained in:
@@ -365,6 +365,8 @@ if ( $filename = m/^(\d\d_\d\d\d\d_|)(DT\d\d\d\d|LOC\d.*|GD\d*)$/i ) { # GD801
|
||||
$fileTime = $strings[3] . ":" . $strings[4] . ":" . $strings[5];
|
||||
$unittype = $strings[6];
|
||||
$unit = $strings[7];
|
||||
$tool = $strings[8];
|
||||
$tooltype = 'MUX';
|
||||
}
|
||||
|
||||
while ( my $line = <FILE> ) {
|
||||
@@ -455,10 +457,15 @@ while ( my $line = <FILE> ) {
|
||||
}
|
||||
else {
|
||||
my ( $y, $m, $d, $t ) = split( /[\s\/]/, $first );
|
||||
if (length($y) != 4) { # G201 con la data invertita
|
||||
my $w = $y;
|
||||
$y = $d;
|
||||
$m = sprintf('%02d',$m);
|
||||
$d = sprintf('%02d',$w);
|
||||
}
|
||||
foreach (@data) {
|
||||
if ( $sql[ ( $outcount % $maxsqllines ) ] eq "" ) {
|
||||
$sql[ ( $outcount % $maxsqllines ) ] =
|
||||
"('$unit','$tool','$nodenum','$y-$m-$d','$t','$toolbatt','$tooltemp'";
|
||||
$sql[ ( $outcount % $maxsqllines ) ] = "('$unit','$tool','$nodenum','$y-$m-$d','$t','$toolbatt','$tooltemp'";
|
||||
}
|
||||
$sql[ ( $outcount % $maxsqllines ) ] .= ",'" . $_ . "'";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user