...
This commit is contained in:
		@@ -98,58 +98,85 @@ void ImportCarDealerAchievementToOracle( std::string                         use
 | 
				
			|||||||
	Environment::Cleanup();
 | 
						Environment::Cleanup();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ImportCarDealerAchievementToOracle( std::string                userName,
 | 
					void ImportRepairOrderToOracle( std::string                userName,
 | 
				
			||||||
                                         std::string                password,
 | 
					                                std::string                password,
 | 
				
			||||||
                                         std::string                tnsName,
 | 
					                                std::string                tnsName,
 | 
				
			||||||
                                         std::vector<RepairOrder> & orderVector )
 | 
					                                std::vector<RepairOrder> & orderVector )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	ostring sqlImport =
 | 
						ostring sqlImport =
 | 
				
			||||||
		"";
 | 
								"BEGIN"
 | 
				
			||||||
 | 
								"  car_dealer.dat:a_import_util_pkg.import_repairing_order(:a_branch_name,"
 | 
				
			||||||
 | 
								"                                                          :a_order_no,"
 | 
				
			||||||
 | 
								"                                                          :a_order_type,"
 | 
				
			||||||
 | 
								"                                                          :a_notify_no,"
 | 
				
			||||||
 | 
								"                                                          :a_damage_area,"
 | 
				
			||||||
 | 
								"                                                          :a_damage_date,"
 | 
				
			||||||
 | 
								"                                                          :a_generating_date,"
 | 
				
			||||||
 | 
								"                                                          :a_policy_no,"
 | 
				
			||||||
 | 
								"                                                          :a_policy_no_jqx,"
 | 
				
			||||||
 | 
								"                                                          :a_plate_number,"
 | 
				
			||||||
 | 
								"                                                          :a_brand_name,"
 | 
				
			||||||
 | 
								"                                                          :a_is_insurance_object,"
 | 
				
			||||||
 | 
								"                                                          :a_is_success,"
 | 
				
			||||||
 | 
								"                                                          :a_recommend_dealer_code,"
 | 
				
			||||||
 | 
								"                                                          :a_recommend_dealer_name,"
 | 
				
			||||||
 | 
								"                                                          :a_recomm_dealer_code_in_notify,"
 | 
				
			||||||
 | 
								"                                                          :a_recomm_dealer_name_in_notify,"
 | 
				
			||||||
 | 
								"                                                          :a_recomm_dealer_name_in_survey,"
 | 
				
			||||||
 | 
								"                                                          :a_agent_name,"
 | 
				
			||||||
 | 
								"                                                          :a_surveyor,"
 | 
				
			||||||
 | 
								"                                                          :a_check_date,"
 | 
				
			||||||
 | 
								"                                                          :a_repairing_start_date,"
 | 
				
			||||||
 | 
								"                                                          :a_repairing_finish_date,"
 | 
				
			||||||
 | 
								"                                                          :a_status,"
 | 
				
			||||||
 | 
								"                                                          :a_lost_item_id,"
 | 
				
			||||||
 | 
								"                                                          :a_surveyor_recomm_status );"
 | 
				
			||||||
 | 
								"END;";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	//初始化
 | 
						//初始化
 | 
				
			||||||
	try
 | 
						try
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		Environment::Initialize();
 | 
							Environment::Initialize();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	catch (exception & error)
 | 
						catch ( exception & error )
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		string errorMessage = "ocilib初始化失败!";
 | 
							string errorMessage = "ocilib初始化失败!";
 | 
				
			||||||
		errorMessage.append(error.what());
 | 
							errorMessage.append( error.what() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		throw runtime_error(errorMessage);
 | 
							throw runtime_error( errorMessage );
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Connection* pConn = nullptr;
 | 
						Connection * pConn = nullptr;
 | 
				
			||||||
	Statement* pStmt = nullptr;
 | 
						Statement *  pStmt = nullptr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	try
 | 
						try
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		pConn = new Connection(userName, password, tnsName);
 | 
							pConn = new Connection( userName, password, tnsName );
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	catch (exception & error)
 | 
						catch ( exception & error )
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		string errorMessage = "连接oracle失败!";
 | 
							string errorMessage = "连接oracle失败!";
 | 
				
			||||||
		errorMessage.append(error.what());
 | 
							errorMessage.append( error.what() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Environment::Cleanup();
 | 
							Environment::Cleanup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		throw runtime_error(errorMessage);
 | 
							throw runtime_error( errorMessage );
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	try
 | 
						try
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		pStmt = new Statement(*pConn);
 | 
							pStmt = new Statement( *pConn );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		pStmt->AllowRebinding(true);
 | 
							pStmt->AllowRebinding( true );
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	catch ( exception & error )
 | 
						catch ( exception & error )
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		string errorMessage = "语句执行失败!";
 | 
							string errorMessage = "语句执行失败!";
 | 
				
			||||||
		errorMessage.append(error.what());
 | 
							errorMessage.append( error.what() );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Environment::Cleanup();
 | 
							Environment::Cleanup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		throw runtime_error(errorMessage);
 | 
							throw runtime_error( errorMessage );
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Environment::Cleanup();
 | 
						Environment::Cleanup();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,8 +11,12 @@ void ImportCarDealerAchievementToOracle( std::string                         use
 | 
				
			|||||||
                                         std::string                         tnsName,
 | 
					                                         std::string                         tnsName,
 | 
				
			||||||
                                         std::vector<CarDealerAchievement> & achievementVector );
 | 
					                                         std::vector<CarDealerAchievement> & achievementVector );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ImportCarDealerAchievementToOracle( std::string                userName,
 | 
					void ImportRepairOrderToOracle( std::string                userName,
 | 
				
			||||||
                                                std::string                password,
 | 
					                                         std::string                password,
 | 
				
			||||||
                                                std::string                tnsName,
 | 
					                                         std::string                tnsName,
 | 
				
			||||||
                                                std::vector<RepairOrder> & orderVector )
 | 
					                                         std::vector<RepairOrder> & orderVector );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// void ImportRepairOrderToOracle( std::string userName,
 | 
				
			||||||
 | 
					//     std::string password,
 | 
				
			||||||
 | 
					//     std::string tnsName,
 | 
				
			||||||
 | 
					//     std::vector<>)
 | 
				
			||||||
		Reference in New Issue
	
	Block a user