tolto update temp gd
This commit is contained in:
@@ -454,49 +454,15 @@ while ( my $line = <FILE> ) {
|
||||
close FILE;
|
||||
$sql[ ( $outcount % $maxsqllines ) - 1 ] =~ s/,$/;/g;
|
||||
writeOutSql($tool);
|
||||
if ( $tooltype eq "GD-disattivato" ) {
|
||||
my ( $Vbat, $Tmod ) = split( /;/, $CSVData[0] );
|
||||
my ( $TName, $STime, $ETime ) = split( /;/, $CSVData[1] );
|
||||
my $dbh =
|
||||
DBI->connect( "DBI:mysql:$db_lar;host=$server", $username, $password )
|
||||
or die getTimeStamp("log")
|
||||
. " - pid $$ >> Could not connect to database: $DBI::errstr";
|
||||
|
||||
my $sth =
|
||||
$dbh->prepare( "UPDATE RAWDATACOR "
|
||||
. "SET BatLevel = '"
|
||||
. $Vbat
|
||||
. "', Temperature = '"
|
||||
. $Tmod
|
||||
. "' WHERE UnitName = '"
|
||||
. $unit
|
||||
. "' and ToolNameID = '"
|
||||
. $TName
|
||||
. "' and EventDate = '"
|
||||
. $GDEventDate
|
||||
. "' and EventTime between '"
|
||||
. $STime
|
||||
. "' and '"
|
||||
. $ETime
|
||||
. "';" )
|
||||
or die getTimeStamp("log") . " - pid $$ >> $DBI::errstr ";
|
||||
|
||||
$sth->execute();
|
||||
$sth->finish;
|
||||
|
||||
# Disconnect
|
||||
$dbh->disconnect;
|
||||
|
||||
#update DT corrispondente con stessa parte numerica ToolNameID, EventDate, EventTime e UnitName
|
||||
if ( $tooltype eq "GD" ) {
|
||||
print getTimeStamp("log") . " - pid $$ >> tool GD: nothing to do.\n";
|
||||
}
|
||||
else {
|
||||
#update DT se esiste GD corrispondente con stesso ToolNameID, EventDate, EventTime
|
||||
matlabCalc();
|
||||
if ($ftp_send) {
|
||||
if ( $tool = 'DT0076' ) {
|
||||
if ( $tool eq 'DT0076' ) {
|
||||
sleep(600);
|
||||
}
|
||||
|
||||
trxelab();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user