|
|
|
@@ -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();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|