...
This commit is contained in:
		@@ -223,12 +223,24 @@ void ImportRepairOrderToOracle( const std::string &              userName,
 | 
				
			|||||||
	                              OCI_SESSION_DEFAULT );
 | 
						                              OCI_SESSION_DEFAULT );
 | 
				
			||||||
	pStmt = OCI_StatementCreate( pConn );
 | 
						pStmt = OCI_StatementCreate( pConn );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						try
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
		OCI_AllowRebinding(pStmt, true);
 | 
							OCI_AllowRebinding(pStmt, true);
 | 
				
			||||||
		OCI_Prepare(pStmt, szSqlImport);
 | 
							OCI_Prepare(pStmt, szSqlImport);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						catch ( runtime_error & error )
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							OCI_ConnectionFree(pConn);
 | 
				
			||||||
 | 
							OCI_Cleanup();
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
							throw error;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for ( auto iterOrder = orderVector.begin();
 | 
						for ( auto iterOrder = orderVector.begin();
 | 
				
			||||||
	      iterOrder != orderVector.end();
 | 
						      iterOrder != orderVector.end();
 | 
				
			||||||
	      ++iterOrder )
 | 
						      ++iterOrder )
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							try
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			string branchName = QString::fromStdWString(iterOrder->getBranchName()).toStdString();
 | 
								string branchName = QString::fromStdWString(iterOrder->getBranchName()).toStdString();
 | 
				
			||||||
			string orderNo = QString::fromStdWString(iterOrder->getOrderNo()).toStdString();
 | 
								string orderNo = QString::fromStdWString(iterOrder->getOrderNo()).toStdString();
 | 
				
			||||||
@@ -252,10 +264,48 @@ void ImportRepairOrderToOracle( const std::string &              userName,
 | 
				
			|||||||
			string surveyor = QString::fromStdWString(iterOrder->getSurveyor()).toStdString();
 | 
								string surveyor = QString::fromStdWString(iterOrder->getSurveyor()).toStdString();
 | 
				
			||||||
			string repairingStartDate = QString::fromStdWString(iterOrder->getRepairingStartDate()).toStdString();
 | 
								string repairingStartDate = QString::fromStdWString(iterOrder->getRepairingStartDate()).toStdString();
 | 
				
			||||||
			string repairingEndDate = QString::fromStdWString(iterOrder->getRepairingFinishDate()).toStdString();
 | 
								string repairingEndDate = QString::fromStdWString(iterOrder->getRepairingFinishDate()).toStdString();
 | 
				
			||||||
 | 
								string checkDate = QString::fromStdWString(iterOrder->getCheckDate()).toStdString();
 | 
				
			||||||
			string status = QString::fromStdWString(iterOrder->getStatus()).toStdString();
 | 
								string status = QString::fromStdWString(iterOrder->getStatus()).toStdString();
 | 
				
			||||||
			string lostItemID = QString::fromStdWString(iterOrder->getLostItemId()).toStdString();
 | 
								string lostItemID = QString::fromStdWString(iterOrder->getLostItemId()).toStdString();
 | 
				
			||||||
			string surveyorRecommandStatus = QString::fromStdWString(iterOrder->getSurveyorRecommandStatus()).toStdString();
 | 
								string surveyorRecommandStatus = QString::fromStdWString(iterOrder->getSurveyorRecommandStatus()).toStdString();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		//OCI_BindString(pStmt, ":a_branch_name", QString::fromStdWString(iterOrder->getBranchName()).toStdString().c_str(), 0);
 | 
								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_Execute(pStmt);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							catch ( runtime_error & error )
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								//输出日志,让过程继续
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						OCI_ConnectionFree(pConn);
 | 
				
			||||||
 | 
						OCI_Cleanup();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user