用字符串保存时间,现在改成用日期对象保存!
This commit is contained in:
		@@ -36909,94 +36909,94 @@ static const unsigned char qt_resource_struct[] = {
 | 
			
		||||
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
 | 
			
		||||
  // :/QMainFrame/Resources/8218_box1.png
 | 
			
		||||
  0x0,0x0,0x1,0x2,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x3f,0xef,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0x84,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xf6,
 | 
			
		||||
  // :/QMainFrame/Resources/find.png
 | 
			
		||||
  0x0,0x0,0x1,0x22,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0xaa,0x5f,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xbf,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xfd,
 | 
			
		||||
  // :/QMainFrame/Resources/print.png
 | 
			
		||||
  0x0,0x0,0x1,0x62,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x2,0x47,0x63,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xd4,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x2,
 | 
			
		||||
  // :/QMainFrame/Resources/option.png
 | 
			
		||||
  0x0,0x0,0x2,0x94,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x7,0x6,0xb8,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xd0,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x1,
 | 
			
		||||
  // :/QMainFrame/Resources/x.png
 | 
			
		||||
  0x0,0x0,0x2,0x2c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x5,0x6a,0x2d,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xe5,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x6,
 | 
			
		||||
  // :/QMainFrame/Resources/telephone.png
 | 
			
		||||
  0x0,0x0,0x2,0xc4,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x7,0xb2,0x8,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xdf,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x5,
 | 
			
		||||
  // :/QMainFrame/Resources/plus.png
 | 
			
		||||
  0x0,0x0,0x2,0x52,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x6,0x5d,0x5f,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xd2,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x2,
 | 
			
		||||
  // :/QMainFrame/Resources/20121016085311441_easyicon_cn_128.png
 | 
			
		||||
  0x0,0x0,0x0,0x82,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x77,0x17,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0x81,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xf5,
 | 
			
		||||
  // :/QMainFrame/Resources/new.png
 | 
			
		||||
  0x0,0x0,0x2,0xe4,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x7,0xcc,0x61,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xcb,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x0,
 | 
			
		||||
  // :/QMainFrame/Resources/CPIC.png
 | 
			
		||||
  0x0,0x0,0x2,0x3c,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x5,0xc9,0x50,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0x89,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xf7,
 | 
			
		||||
  // :/QMainFrame/Resources/ok.png
 | 
			
		||||
  0x0,0x0,0x1,0x38,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0xe8,0x27,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xcd,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x1,
 | 
			
		||||
  // :/QMainFrame/Resources/face.png
 | 
			
		||||
  0x0,0x0,0x1,0xc8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4,0x29,0xa6,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xbd,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xfd,
 | 
			
		||||
  // :/QMainFrame/Resources/CNY_Red.png
 | 
			
		||||
  0x0,0x0,0x1,0xf8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4,0xfc,0xe0,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0x87,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xf6,
 | 
			
		||||
  // :/QMainFrame/Resources/car2.png
 | 
			
		||||
  0x0,0x0,0x3,0x10,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x8,0x69,0x71,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xae,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xfa,
 | 
			
		||||
  // :/QMainFrame/Resources/app.ico
 | 
			
		||||
  0x0,0x0,0x0,0x46,0x0,0x1,0x0,0x0,0x0,0x1,0x0,0x0,0x2,0x22,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xa9,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xf9,
 | 
			
		||||
  // :/QMainFrame/Resources/save.png
 | 
			
		||||
  0x0,0x0,0x2,0x7e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x6,0xcf,0x1,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xd9,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x4,
 | 
			
		||||
  // :/QMainFrame/Resources/car.png
 | 
			
		||||
  0x0,0x0,0x0,0x5a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x1f,0x7e,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xab,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xf9,
 | 
			
		||||
  // :/QMainFrame/Resources/cat.png
 | 
			
		||||
  0x0,0x0,0x0,0x6e,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x55,0x58,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xb0,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xfa,
 | 
			
		||||
  // :/QMainFrame/Resources/excel.png
 | 
			
		||||
  0x0,0x0,0x2,0x14,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x5,0x51,0x43,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xba,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xfc,
 | 
			
		||||
  // :/QMainFrame/Resources/CPIC??.png
 | 
			
		||||
  0x0,0x0,0x1,0x7a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x2,0x9e,0xab,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0x8c,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xf8,
 | 
			
		||||
  // :/QMainFrame/Resources/dec.png
 | 
			
		||||
  0x0,0x0,0x0,0x32,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xb5,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xfb,
 | 
			
		||||
  // :/QMainFrame/Resources/folder.png
 | 
			
		||||
  0x0,0x0,0x0,0xd2,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xcc,0x2a,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xc2,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xfe,
 | 
			
		||||
  // :/QMainFrame/Resources/edit.png
 | 
			
		||||
  0x0,0x0,0x2,0x68,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x6,0x61,0x1b,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xb8,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xfc,
 | 
			
		||||
  // :/QMainFrame/Resources/clean.png
 | 
			
		||||
  0x0,0x0,0x2,0xf8,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x8,0x3a,0x47,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xb3,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xfb,
 | 
			
		||||
  // :/QMainFrame/Resources/gear.png
 | 
			
		||||
  0x0,0x0,0x2,0xae,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x7,0x5c,0x60,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xc4,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xfe,
 | 
			
		||||
  // :/QMainFrame/Resources/quit.png
 | 
			
		||||
  0x0,0x0,0x0,0xec,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0xe0,0xcc,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xd7,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x3,
 | 
			
		||||
  // :/QMainFrame/Resources/save2.png
 | 
			
		||||
  0x0,0x0,0x1,0x4a,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x2,0x29,0x5d,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xdc,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x4,
 | 
			
		||||
  // :/QMainFrame/Resources/manager.png
 | 
			
		||||
  0x0,0x0,0x1,0x94,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x3,0x55,0x8f,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xc9,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x0,
 | 
			
		||||
  // :/QMainFrame/Resources/login.png
 | 
			
		||||
  0x0,0x0,0x1,0xb0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x3,0xb9,0xe4,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xc6,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x0,0xff,
 | 
			
		||||
  // :/QMainFrame/Resources/tongji.png
 | 
			
		||||
  0x0,0x0,0x1,0xde,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x4,0x8a,0x1,
 | 
			
		||||
0x0,0x0,0x1,0x70,0xde,0xab,0x11,0xe2,
 | 
			
		||||
0x0,0x0,0x1,0x68,0x54,0x2f,0x1,0x5,
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -328,7 +328,7 @@ void LoadRepairOrderFromXlsx( const std::wstring &       filePath,
 | 
			
		||||
		const wstring && isSuccess                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
		const wstring && recommandDealerCode         = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
		const wstring && recommandDealerName         = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
		const wstring && recommandDealerCodeInNotify = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
		const wstring && recommandDealerCodeInNotify = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex, true );
 | 
			
		||||
		const wstring && recommandDealerNameInNotify = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
		const wstring && recommandDealerNameInSurvey = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
		const wstring && agentName                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
 
 | 
			
		||||
@@ -178,32 +178,32 @@ void ImportRepairOrderToOracle( const std::string &              userName,
 | 
			
		||||
	int           returnCode  = 0;
 | 
			
		||||
	const otext * szSqlImport =
 | 
			
		||||
			"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,"
 | 
			
		||||
			"  car_dealer.data_import_util_pkg.import_repairing_order(:a_branch_name, \n"
 | 
			
		||||
			"                                                          :a_order_no,\n"
 | 
			
		||||
			"                                                          :a_order_type,\n"
 | 
			
		||||
			"                                                          :a_notify_no,\n"
 | 
			
		||||
			"                                                          :a_damage_area,\n"
 | 
			
		||||
			"                                                          :a_damage_date,\n"
 | 
			
		||||
			"                                                          :a_generating_date,\n\n"
 | 
			
		||||
			"                                                          :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 );"
 | 
			
		||||
			"                                                          :a_policy_no_jqx,\n"
 | 
			
		||||
			"                                                          :a_plate_number,\n"
 | 
			
		||||
			"                                                          :a_brand_name,\n"
 | 
			
		||||
			"                                                          :a_is_insurance_object,\n"
 | 
			
		||||
			"                                                          :a_is_success,\n"
 | 
			
		||||
			"                                                          :a_recommend_dealer_code,\n"
 | 
			
		||||
			"                                                          :a_recommend_dealer_name,\n"
 | 
			
		||||
			//"                                                          :a_recomm_dealer_code_in_notify,\n"
 | 
			
		||||
			"                                                          :a_recomm_dealer_name_in_notify,\n"
 | 
			
		||||
			"                                                          :a_recomm_dealer_name_in_survey,\n"
 | 
			
		||||
			"                                                          :a_agent_name,\n"
 | 
			
		||||
			"                                                          :a_surveyor,\n"
 | 
			
		||||
			"                                                          :a_check_date,\n"
 | 
			
		||||
			"                                                          :a_repairing_start_date,\n"
 | 
			
		||||
			"                                                          :a_repairing_finish_date,\n"
 | 
			
		||||
			"                                                          :a_status,\n"
 | 
			
		||||
			"                                                          :a_lost_item_id,\n"
 | 
			
		||||
			"                                                          :a_surveyor_recomm_status );\n"
 | 
			
		||||
			"END;";
 | 
			
		||||
 | 
			
		||||
	//初始化
 | 
			
		||||
@@ -225,14 +225,14 @@ void ImportRepairOrderToOracle( const std::string &              userName,
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		OCI_AllowRebinding(pStmt, true);
 | 
			
		||||
		OCI_Prepare(pStmt, szSqlImport);
 | 
			
		||||
		OCI_AllowRebinding( pStmt, true );
 | 
			
		||||
		OCI_Prepare( pStmt, szSqlImport );
 | 
			
		||||
	}
 | 
			
		||||
	catch ( runtime_error & error )
 | 
			
		||||
	{
 | 
			
		||||
		OCI_ConnectionFree(pConn);
 | 
			
		||||
		OCI_ConnectionFree( pConn );
 | 
			
		||||
		OCI_Cleanup();
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
		throw error;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -242,70 +242,90 @@ void ImportRepairOrderToOracle( const std::string &              userName,
 | 
			
		||||
	{
 | 
			
		||||
		try
 | 
			
		||||
		{
 | 
			
		||||
			string branchName = QString::fromStdWString(iterOrder->getBranchName()).toStdString();
 | 
			
		||||
			string orderNo = QString::fromStdWString(iterOrder->getOrderNo()).toStdString();
 | 
			
		||||
			string orderType = QString::fromStdWString(iterOrder->getOrderType()).toStdString();
 | 
			
		||||
			string notifyNo = QString::fromStdWString(iterOrder->getNotifyNo()).toStdString();
 | 
			
		||||
			string damageArea = QString::fromStdWString(iterOrder->getDamageArea()).toStdString();
 | 
			
		||||
			string damageDate = QString::fromStdWString(iterOrder->getDamageDate()).toStdString();
 | 
			
		||||
			string genDate = QString::fromStdWString(iterOrder->getGeneratingDate()).toStdString();
 | 
			
		||||
			string policyNo = QString::fromStdWString(iterOrder->getPolicyNo()).toStdString();
 | 
			
		||||
			string policyNoJQX = QString::fromStdWString(iterOrder->getPolicyNoJqx()).toStdString();
 | 
			
		||||
			string plateNumber = QString::fromStdWString(iterOrder->getPlateNumber()).toStdString();;
 | 
			
		||||
			string brandName = QString::fromStdWString(iterOrder->getBrandName()).toStdString();;
 | 
			
		||||
			string isInsuranceObject = QString::fromStdWString(iterOrder->getIsInsuranceObject()).toStdString();
 | 
			
		||||
			string isSuccess = QString::fromStdWString(iterOrder->getIsSuccess()).toStdString();
 | 
			
		||||
			string recommandDealerCode = QString::fromStdWString(iterOrder->getRecommandDealerCode()).toStdString();
 | 
			
		||||
			string recommandDealerName = QString::fromStdWString(iterOrder->getRecommandDealerName()).toStdString();
 | 
			
		||||
			string recommandDealerCodeInNotify = QString::fromStdWString(iterOrder->getRecommandDealerCodeInNotify()).toStdString();
 | 
			
		||||
			string recommandDealerCodeInNameInNotify = QString::fromStdWString(iterOrder->getRecommandDealerNameInNotify()).toStdString();
 | 
			
		||||
			string recommandDealerCodeInSurvy = QString::fromStdWString(iterOrder->getRecommandDealerNameInSurvey()).toStdString();
 | 
			
		||||
			string agentName = QString::fromStdWString(iterOrder->getAgentName()).toStdString();
 | 
			
		||||
			string surveyor = QString::fromStdWString(iterOrder->getSurveyor()).toStdString();
 | 
			
		||||
			string repairingStartDate = QString::fromStdWString(iterOrder->getRepairingStartDate()).toStdString();
 | 
			
		||||
			string repairingEndDate = QString::fromStdWString(iterOrder->getRepairingFinishDate()).toStdString();
 | 
			
		||||
			string checkDate = QString::fromStdWString(iterOrder->getCheckDate()).toStdString();
 | 
			
		||||
			string status = QString::fromStdWString(iterOrder->getStatus()).toStdString();
 | 
			
		||||
			string lostItemID = QString::fromStdWString(iterOrder->getLostItemId()).toStdString();
 | 
			
		||||
			string surveyorRecommandStatus = QString::fromStdWString(iterOrder->getSurveyorRecommandStatus()).toStdString();
 | 
			
		||||
			string branchName                        = QString::fromStdWString( iterOrder->getBranchName() ).toLocal8Bit();
 | 
			
		||||
			string orderNo                           = QString::fromStdWString( iterOrder->getOrderNo() ).toLocal8Bit();
 | 
			
		||||
			string orderType                         = QString::fromStdWString( iterOrder->getOrderType() ).toLocal8Bit();
 | 
			
		||||
			string notifyNo                          = QString::fromStdWString( iterOrder->getNotifyNo() ).toLocal8Bit();
 | 
			
		||||
			string damageArea                        = QString::fromStdWString( iterOrder->getDamageArea() ).toLocal8Bit();
 | 
			
		||||
			string damageDate                     = QString::fromStdWString( iterOrder->getDamageDate() ).toLocal8Bit();
 | 
			
		||||
			string genDate                        = QString::fromStdWString( iterOrder->getGeneratingDate() ).toLocal8Bit();
 | 
			
		||||
			string policyNo                          = QString::fromStdWString( iterOrder->getPolicyNo() ).toLocal8Bit();
 | 
			
		||||
			string policyNoJQX                       = QString::fromStdWString( iterOrder->getPolicyNoJqx() ).toLocal8Bit();
 | 
			
		||||
			string plateNumber                       = QString::fromStdWString( iterOrder->getPlateNumber() ).toLocal8Bit();;
 | 
			
		||||
			string brandName                         = QString::fromStdWString( iterOrder->getBrandName() ).toLocal8Bit();;
 | 
			
		||||
			string isInsuranceObject                 = QString::fromStdWString( iterOrder->getIsInsuranceObject() ).toLocal8Bit();
 | 
			
		||||
			string isSuccess                         = QString::fromStdWString( iterOrder->getIsSuccess() ).toLocal8Bit();
 | 
			
		||||
			string recommandDealerCode               = QString::fromStdWString( iterOrder->getRecommandDealerCode() ).toLocal8Bit();
 | 
			
		||||
			string recommandDealerName               = QString::fromStdWString( iterOrder->getRecommandDealerName() ).toLocal8Bit();
 | 
			
		||||
			//string recommandDealerCodeInNotify       = QString::fromStdWString( iterOrder->getRecommandDealerCodeInNotify() ).toLocal8Bit();
 | 
			
		||||
			string recommandDealerCodeInNameInNotify = QString::fromStdWString( iterOrder->getRecommandDealerNameInNotify() ).toLocal8Bit();
 | 
			
		||||
			string recommandDealerCodeInSurvy        = QString::fromStdWString( iterOrder->getRecommandDealerNameInSurvey() ).toLocal8Bit();
 | 
			
		||||
			string agentName                         = QString::fromStdWString( iterOrder->getAgentName() ).toLocal8Bit();
 | 
			
		||||
			string surveyor                          = QString::fromStdWString( iterOrder->getSurveyor() ).toLocal8Bit();
 | 
			
		||||
			string repairingStartDate             = QString::fromStdWString( iterOrder->getRepairingStartDate() ).toLocal8Bit();
 | 
			
		||||
			string repairingEndDate               = QString::fromStdWString( iterOrder->getRepairingFinishDate() ).toLocal8Bit();
 | 
			
		||||
			string checkDate                      = QString::fromStdWString( iterOrder->getCheckDate() ).toLocal8Bit();
 | 
			
		||||
			string status                            = QString::fromStdWString( iterOrder->getStatus() ).toLocal8Bit();
 | 
			
		||||
			string lostItemID                        = QString::fromStdWString( iterOrder->getLostItemId() ).toLocal8Bit();
 | 
			
		||||
			string surveyorRecommandStatus           = QString::fromStdWString( iterOrder->getSurveyorRecommandStatus() ).toLocal8Bit();
 | 
			
		||||
 | 
			
		||||
			OCI_BindString(pStmt, ":a_branch_name", const_cast<otext*>(branchName.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_order_no", const_cast<otext*>(orderNo.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_order_type", const_cast<otext*>(orderType.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_notify_no", const_cast<otext*>(notifyNo.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_damage_area", const_cast<otext*>(damageArea.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_damage_date", const_cast<otext*>(damageDate.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_generating_date", const_cast<otext*>(genDate.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_policy_no", const_cast<otext*>(policyNo.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_policy_no_jqx", const_cast<otext*>(policyNoJQX.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_plate_number", const_cast<otext*>(plateNumber.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_brand_name", const_cast<otext*>(brandName.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_is_insurance_object", const_cast<otext*>(isInsuranceObject.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_is_success", const_cast<otext*>(isSuccess.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_recommend_dealer_code", const_cast<otext*>(recommandDealerCode.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_recommend_dealer_name", const_cast<otext*>(recommandDealerName.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_bra_recomm_dealer_code_in_notifyanch_name", const_cast<otext*>(recommandDealerCodeInNotify.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_recomm_dealer_name_in_notify", const_cast<otext*>(recommandDealerCodeInNameInNotify.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_recomm_dealer_name_in_survey", const_cast<otext*>(recommandDealerCodeInSurvy.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_agent_name", const_cast<otext*>(agentName.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_surveyor", const_cast<otext*>(surveyor.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_check_date", const_cast<otext*>(checkDate.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_repairing_start_date", const_cast<otext*>(repairingStartDate.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_repairing_finish_date", const_cast<otext*>(repairingEndDate.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_status", const_cast<otext*>(status.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_lost_item_id", const_cast<otext*>(lostItemID.c_str()), 0);
 | 
			
		||||
			OCI_BindString(pStmt, ":a_surveyor_recomm_status", const_cast<otext*>(surveyorRecommandStatus.c_str()), 0);
 | 
			
		||||
			// OCI_Date * pDamageDate         = OCI_DateCreate( pConn );
 | 
			
		||||
			// OCI_Date * pGenDate            = OCI_DateCreate( pConn );
 | 
			
		||||
			// OCI_Date * pRepairingStartDate = OCI_DateCreate( pConn );
 | 
			
		||||
			// OCI_Date * pRepairingEndDate   = OCI_DateCreate( pConn );
 | 
			
		||||
			// OCI_Date * pCheckDate          = OCI_DateCreate( pConn );
 | 
			
		||||
 | 
			
		||||
			OCI_Execute(pStmt);
 | 
			
		||||
			// OCI_DateFromText( pDamageDate, strDamageDate.c_str(), "YYYY-MM-DD HH24:MI:SS" );
 | 
			
		||||
			// OCI_DateFromText( pGenDate, strGenDate.c_str(), "YYYY-MM-DD" );
 | 
			
		||||
			// OCI_DateFromText( pRepairingStartDate, strRepairingStartDate.c_str(), "YYYY-MM-DD HH24:MI:SS" );
 | 
			
		||||
			// OCI_DateFromText( pRepairingEndDate, strRepairingEndDate.c_str(), "YYYY-MM-DD HH24:MI:SS" );
 | 
			
		||||
			// OCI_DateFromText( pCheckDate, strCheckDate.c_str(), "YYYY-MM-DD HH24:MI:SS" );
 | 
			
		||||
			//OCI_Date
 | 
			
		||||
 | 
			
		||||
			OCI_BindString( pStmt, ":a_branch_name", const_cast<otext*>(branchName.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_order_no", const_cast<otext*>(orderNo.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_order_type", const_cast<otext*>(orderType.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_notify_no", const_cast<otext*>(notifyNo.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_damage_area", const_cast<otext*>(damageArea.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_policy_no", const_cast<otext*>(policyNo.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_policy_no_jqx", const_cast<otext*>(policyNoJQX.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_plate_number", const_cast<otext*>(plateNumber.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_brand_name", const_cast<otext*>(brandName.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_is_insurance_object", const_cast<otext*>(isInsuranceObject.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_is_success", const_cast<otext*>(isSuccess.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_recommend_dealer_code", const_cast<otext*>(recommandDealerCode.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_recommend_dealer_name", const_cast<otext*>(recommandDealerName.c_str()), 0 );
 | 
			
		||||
			//OCI_BindString( pStmt, ":a_recomm_dealer_code_in_notify", const_cast<otext*>(recommandDealerCodeInNotify.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_recomm_dealer_name_in_notify", const_cast<otext*>(recommandDealerCodeInNameInNotify.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_recomm_dealer_name_in_survey", const_cast<otext*>(recommandDealerCodeInSurvy.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_agent_name", const_cast<otext*>(agentName.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_surveyor", const_cast<otext*>(surveyor.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_status", const_cast<otext*>(status.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_lost_item_id", const_cast<otext*>(lostItemID.c_str()), 0 );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_surveyor_recomm_status", const_cast<otext*>(surveyorRecommandStatus.c_str()), 0 );
 | 
			
		||||
 | 
			
		||||
			OCI_BindString( pStmt, ":a_damage_date", const_cast<otext*>(damageDate.c_str()), 0);
 | 
			
		||||
			OCI_BindString( pStmt, ":a_generating_date", const_cast<otext*>(genDate.c_str()), 0);
 | 
			
		||||
			OCI_BindString( pStmt, ":a_check_date", const_cast<otext*>(checkDate.c_str()), 0);
 | 
			
		||||
			OCI_BindString( pStmt, ":a_repairing_start_date", const_cast<otext*>(repairingStartDate.c_str()), 0);
 | 
			
		||||
			OCI_BindString( pStmt, ":a_repairing_finish_date", const_cast<otext*>(repairingEndDate.c_str()), 0);
 | 
			
		||||
			//
 | 
			
		||||
			OCI_Execute( pStmt );
 | 
			
		||||
		}
 | 
			
		||||
		catch ( runtime_error & error )
 | 
			
		||||
		{
 | 
			
		||||
			//输出日志,让过程继续
 | 
			
		||||
			string errorMessage = "送返修工单编号";
 | 
			
		||||
 | 
			
		||||
			errorMessage.append( QString::fromStdWString( iterOrder->getOrderNo() ).toLocal8Bit() );
 | 
			
		||||
			errorMessage.append( "保存失败,提示信息:" );
 | 
			
		||||
			errorMessage.append( error.what() );
 | 
			
		||||
 | 
			
		||||
			output_error_message( errorMessage );
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	OCI_ConnectionFree(pConn);
 | 
			
		||||
	OCI_Commit( pConn );
 | 
			
		||||
	OCI_ConnectionFree( pConn );
 | 
			
		||||
	OCI_Cleanup();
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -11,10 +11,10 @@ void ImportCarDealerAchievementToOracle( std::string                         use
 | 
			
		||||
                                         std::string                         tnsName,
 | 
			
		||||
                                         std::vector<CarDealerAchievement> & achievementVector );
 | 
			
		||||
 | 
			
		||||
void ImportRepairOrderToOracle( std::string                userName,
 | 
			
		||||
                                std::string                password,
 | 
			
		||||
                                std::string                tnsName,
 | 
			
		||||
                                std::vector<RepairOrder> & orderVector );
 | 
			
		||||
void ImportRepairOrderToOracle( const std::string &              userName,
 | 
			
		||||
                                const std::string &              password,
 | 
			
		||||
                                const std::string &              tnsName,
 | 
			
		||||
                                const std::vector<RepairOrder> & orderVector );
 | 
			
		||||
 | 
			
		||||
// void ImportRepairOrderToOracle( std::string userName,
 | 
			
		||||
//     std::string password,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
 | 
			
		||||
#include <exception>
 | 
			
		||||
#include <stdexcept>
 | 
			
		||||
#include <QDebug>
 | 
			
		||||
#include "db_oper.h"
 | 
			
		||||
 | 
			
		||||
const int ERROR_MESSAGE_LENGTH = 1001;
 | 
			
		||||
@@ -68,9 +69,14 @@ void l_error_handler(OCI_Error* pError)
 | 
			
		||||
	throw error;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void output_error_message( const std::string & errorMessage )
 | 
			
		||||
{
 | 
			
		||||
	qDebug() << QString::fromLocal8Bit(errorMessage.c_str());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
std::string get_last_error_message()
 | 
			
		||||
{
 | 
			
		||||
	OCI_Error * pError = OCI_GetLastError();
 | 
			
		||||
 | 
			
		||||
	return std::string(OCI_ErrorGetString(pError));
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,8 @@ void releaseOciLib();
 | 
			
		||||
void error_handler(OCI_Error * pError);
 | 
			
		||||
void l_error_handler(OCI_Error* pError);
 | 
			
		||||
 | 
			
		||||
void output_error_message(const std::string& errorMessage);
 | 
			
		||||
 | 
			
		||||
std::string get_last_error_message();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@
 | 
			
		||||
#include <QtWidgets/QMessageBox>
 | 
			
		||||
#include "test.h"
 | 
			
		||||
#include "../data/DataManipulation/Excel/LoadFromExcel.h"
 | 
			
		||||
#include "../data/DataManipulation/oracle/ImportToOracle.h"
 | 
			
		||||
#include "../system/system_util.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
@@ -28,7 +29,8 @@ void excelTest()
 | 
			
		||||
	//LoadCarDealerSchemeFromXlsx(filePath, 0, 1, schemeVector);
 | 
			
		||||
	//LoadCarDealerAchievementFromXlsx( filePath, 0, 1, achievementsVector );
 | 
			
		||||
	LoadRepairOrderFromXlsx(filePath, 0, 1, repairOrderVector);
 | 
			
		||||
 | 
			
		||||
	ImportRepairOrderToOracle("car_dealer", "cpic123456", "xmcx1", repairOrderVector);
 | 
			
		||||
	
 | 
			
		||||
	return;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user