改c
This commit is contained in:
@@ -6,6 +6,16 @@
|
||||
using namespace std;
|
||||
using namespace ocilib;
|
||||
|
||||
void l_error_handler(OCI_Error* pError)
|
||||
{
|
||||
string errorString = OCI_ErrorGetString(pError);
|
||||
|
||||
std::runtime_error error(OCI_ErrorGetString(pError));
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
/*
|
||||
void ImportCarDealerAchievementToOracle( std::string userName,
|
||||
std::string password,
|
||||
std::string tnsName,
|
||||
@@ -72,15 +82,15 @@ void ImportCarDealerAchievementToOracle( std::string use
|
||||
string pinganAmount = QString( "%1" ).arg( iter->getPinganAmount() ).toStdString();
|
||||
string othersAmount = QString( "%1" ).arg( iter->getOthersAmount() ).toStdString();
|
||||
|
||||
pStmt->Bind( ":a_the_year", QString::fromStdWString( iter->getTheYear() ).toStdString(), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind( ":a_the_month", QString::fromStdWString( iter->getTheMonth() ).toStdString(), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind( ":a_car_dealer_code", QString::fromStdWString( iter->getCarDealerCode() ).toStdString(), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind( ":a_checked_achievement", checkedAchievement, BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind( ":a_policy_amount", policyAmount, BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind( ":a_cpic_amount", cpicAmount, BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind( ":a_picc_amount", piccAmount, BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind( ":a_pingan_amount", pinganAmount, BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind( ":a_others_amount", othersAmount, BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind<ostring>( ostring(":a_the_year"), ostring(QString::fromStdWString( iter->getTheYear() ).toStdString().c_str()), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind<ostring>(ostring(":a_the_month"), ostring(QString::fromStdWString( iter->getTheMonth() ).toStdString().c_str()), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind<ostring>(ostring(":a_car_dealer_code"), ostring(QString::fromStdWString( iter->getCarDealerCode() ).toStdString().c_str()), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind<ostring>(ostring(":a_checked_achievement"), ostring(checkedAchievement.c_str()), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind<ostring>(ostring(":a_policy_amount"), ostring(policyAmount.c_str()), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind<ostring>(ostring(":a_cpic_amount"), ostring(cpicAmount), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind<ostring>(ostring(":a_picc_amount"), ostring(piccAmount), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind<ostring>(ostring(":a_pingan_amount"), ostring(pinganAmount), BindInfo::BindDirectionValues::In );
|
||||
pStmt->Bind<ostring>(ostring(":a_others_amount"), ostring(othersAmount), BindInfo::BindDirectionValues::In );
|
||||
|
||||
pStmt->ExecutePrepared();
|
||||
}
|
||||
@@ -97,6 +107,30 @@ void ImportCarDealerAchievementToOracle( std::string use
|
||||
|
||||
Environment::Cleanup();
|
||||
}
|
||||
*/
|
||||
|
||||
void ImportCarDealerAchievementToOracle( std::string userName,
|
||||
std::string password,
|
||||
std::string tnsName,
|
||||
std::vector<CarDealerAchievement> & achievementVector )
|
||||
{
|
||||
OCI_Connection * pConnection = nullptr;
|
||||
OCI_Statement * pStatement = nullptr;
|
||||
|
||||
ostring sqlImport =
|
||||
"BEGIN "
|
||||
" car_dealer.data_import_util_pkg.import_cardealer_achvmnt( :a_the_year, "
|
||||
" :a_the_month, "
|
||||
" :a_car_dealer_code, "
|
||||
" :a_checked_achievement, "
|
||||
" :a_policy_amount, "
|
||||
" :a_cpic_amount, "
|
||||
" :a_picc_amount , "
|
||||
" :a_pingan_amount, "
|
||||
" :a_others_amount ); "
|
||||
"END; ";
|
||||
}
|
||||
|
||||
|
||||
void ImportRepairOrderToOracle( std::string userName,
|
||||
std::string password,
|
||||
|
Reference in New Issue
Block a user