提交信息!
This commit is contained in:
		
										
											Binary file not shown.
										
									
								
							@@ -7,4 +7,4 @@ UserInfo * pStaffInfo = nullptr;
 | 
			
		||||
 | 
			
		||||
const string SYSTEM_ADMIN = "999";
 | 
			
		||||
const string ADMIN = "000";
 | 
			
		||||
const string TEAM_LEADER = "000";
 | 
			
		||||
const string TEAM_LEADER = "001";
 | 
			
		||||
@@ -70,6 +70,7 @@ const wchar_t *    pwszRepairOrderCaption[]   = {
 | 
			
		||||
//卢霖城-送返修推荐表
 | 
			
		||||
const unsigned int REPAIR_RECOMMANDATION_CAPTION_COUNT = 11;
 | 
			
		||||
const wchar_t *    pwszRepairRecommandationCaption[]   = {
 | 
			
		||||
	L"分公司名称",
 | 
			
		||||
	L"工单号",
 | 
			
		||||
	L"工单类型",
 | 
			
		||||
	L"报案号",
 | 
			
		||||
@@ -781,6 +782,7 @@ void LoadRepairRecommandationFromXlsx( const std::wstring &
 | 
			
		||||
		//起始列索引
 | 
			
		||||
		int colunmIndex = pSheet->firstCol();
 | 
			
		||||
 | 
			
		||||
		wstring branchName             = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
		wstring orderNo                = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
		wstring orderType              = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
		wstring notifyNo               = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
@@ -793,7 +795,8 @@ void LoadRepairRecommandationFromXlsx( const std::wstring &
 | 
			
		||||
		wstring messageSendingDate     = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
		wstring dataSource             = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
			
		||||
 | 
			
		||||
		RepairRecommandationRecord record( orderNo,
 | 
			
		||||
		RepairRecommandationRecord record( branchName,
 | 
			
		||||
			                               orderNo,
 | 
			
		||||
		                                   orderType,
 | 
			
		||||
		                                   notifyNo,
 | 
			
		||||
		                                   RecommandCarDealerCode,
 | 
			
		||||
 
 | 
			
		||||
@@ -448,7 +448,8 @@ void ImportRepairRecommandationToOracle( const std::string &
 | 
			
		||||
 | 
			
		||||
	const otext * szSql =
 | 
			
		||||
			"BEGIN \n"
 | 
			
		||||
			"    car_dealer.data_import_util_pkg.import_repairing_suggestion(:a_order_no, \n"
 | 
			
		||||
			"    car_dealer.data_import_util_pkg.import_repairing_suggestion(:a_branch_name, \n"
 | 
			
		||||
	        "                                                                :a_order_no, \n"
 | 
			
		||||
			"                                                                :a_order_type, \n"
 | 
			
		||||
			"                                                                :a_notify_no, \n"
 | 
			
		||||
			"                                                                :a_sug_cardealer_code, \n"
 | 
			
		||||
@@ -484,7 +485,6 @@ void ImportRepairRecommandationToOracle( const std::string &
 | 
			
		||||
	}
 | 
			
		||||
	catch ( runtime_error & error )
 | 
			
		||||
	{
 | 
			
		||||
		OCI_ConnectionFree( pConn );
 | 
			
		||||
		OCI_Cleanup();
 | 
			
		||||
 | 
			
		||||
		throw error;
 | 
			
		||||
@@ -497,6 +497,7 @@ void ImportRepairRecommandationToOracle( const std::string &
 | 
			
		||||
		try
 | 
			
		||||
		{
 | 
			
		||||
			//绑定数据
 | 
			
		||||
			string 分公司名称 = QString::fromStdWString(iterOrder->getBrandName()).toLocal8Bit();
 | 
			
		||||
			string 工单号    = QString::fromStdWString( iterOrder->getOrderNo() ).toLocal8Bit();
 | 
			
		||||
			string 工单类型   = QString::fromStdWString( iterOrder->getOrderType() ).toLocal8Bit();
 | 
			
		||||
			string 报案号    = QString::fromStdWString( iterOrder->getNotifyNo() ).toLocal8Bit();
 | 
			
		||||
@@ -515,6 +516,7 @@ void ImportRepairRecommandationToOracle( const std::string &
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			//执行语句
 | 
			
		||||
			OCI_BindString(pStmt, ":a_branch_name", (otext*)分公司名称.c_str(), 分公司名称.size());
 | 
			
		||||
			OCI_BindString( pStmt, ":a_order_no", (otext*)工单号.c_str(), 工单号.size() );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_order_type", (otext*)工单类型.c_str(), 工单类型.size() );
 | 
			
		||||
			OCI_BindString( pStmt, ":a_notify_no", (otext*)报案号.c_str(), 报案号.size() );
 | 
			
		||||
@@ -540,8 +542,6 @@ void ImportRepairRecommandationToOracle( const std::string &
 | 
			
		||||
 | 
			
		||||
			//output_error_message( errorMessage );
 | 
			
		||||
 | 
			
		||||
			OCI_Rollback( pConn );
 | 
			
		||||
			OCI_ConnectionFree( pConn );
 | 
			
		||||
			OCI_Cleanup();
 | 
			
		||||
 | 
			
		||||
			throw runtime_error( errorMessage );
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
@@ -9,18 +9,11 @@
 | 
			
		||||
class RepairRecommandationRecord
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	RepairRecommandationRecord( std::wstring orderNo,
 | 
			
		||||
	                            std::wstring orderType,
 | 
			
		||||
	                            std::wstring notifyNo,
 | 
			
		||||
	                            std::wstring suggestedCarDealerCode,
 | 
			
		||||
	                            std::wstring suggestedCarDealerName,
 | 
			
		||||
	                            std::wstring damageDate,
 | 
			
		||||
	                            std::wstring plateNumber,
 | 
			
		||||
	                            std::wstring brandName,
 | 
			
		||||
	                            std::wstring messageType,
 | 
			
		||||
	                            std::wstring messageSendingDate,
 | 
			
		||||
	                            std::wstring dataSource )
 | 
			
		||||
		: orderNo_( std::move( orderNo ) ),
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	RepairRecommandationRecord( std::wstring branchName, std::wstring orderNo, std::wstring orderType, std::wstring notifyNo, std::wstring suggestedCarDealerCode, std::wstring suggestedCarDealerName, std::wstring damageDate, std::wstring plateNumber, std::wstring brandName, std::wstring messageType, std::wstring messageSendingDate, std::wstring dataSource )
 | 
			
		||||
		: branchName_( std::move(branchName) ),
 | 
			
		||||
		  orderNo_( std::move(orderNo) ),
 | 
			
		||||
		  orderType_( std::move(orderType) ),
 | 
			
		||||
		  notifyNo_( std::move(notifyNo) ),
 | 
			
		||||
		  suggestedCarDealerCode_( std::move(suggestedCarDealerCode) ),
 | 
			
		||||
@@ -34,8 +27,10 @@ public:
 | 
			
		||||
	{
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	RepairRecommandationRecord( const RepairRecommandationRecord & other )
 | 
			
		||||
		: orderNo_( other.orderNo_ ),
 | 
			
		||||
		: branchName_( other.branchName_ ),
 | 
			
		||||
		  orderNo_( other.orderNo_ ),
 | 
			
		||||
		  orderType_( other.orderType_ ),
 | 
			
		||||
		  notifyNo_( other.notifyNo_ ),
 | 
			
		||||
		  suggestedCarDealerCode_( other.suggestedCarDealerCode_ ),
 | 
			
		||||
@@ -50,7 +45,8 @@ public:
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	RepairRecommandationRecord( RepairRecommandationRecord && other )
 | 
			
		||||
		: orderNo_( std::move( other.orderNo_ ) ),
 | 
			
		||||
		: branchName_( std::move(other.branchName_) ),
 | 
			
		||||
		  orderNo_( std::move(other.orderNo_) ),
 | 
			
		||||
		  orderType_( std::move(other.orderType_) ),
 | 
			
		||||
		  notifyNo_( std::move(other.notifyNo_) ),
 | 
			
		||||
		  suggestedCarDealerCode_( std::move(other.suggestedCarDealerCode_) ),
 | 
			
		||||
@@ -68,6 +64,7 @@ public:
 | 
			
		||||
	{
 | 
			
		||||
		if ( this == &other )
 | 
			
		||||
			return *this;
 | 
			
		||||
		branchName_             = other.branchName_;
 | 
			
		||||
		orderNo_                = other.orderNo_;
 | 
			
		||||
		orderType_              = other.orderType_;
 | 
			
		||||
		notifyNo_               = other.notifyNo_;
 | 
			
		||||
@@ -86,6 +83,7 @@ public:
 | 
			
		||||
	{
 | 
			
		||||
		if ( this == &other )
 | 
			
		||||
			return *this;
 | 
			
		||||
		branchName_             = std::move( other.branchName_ );
 | 
			
		||||
		orderNo_                = std::move( other.orderNo_ );
 | 
			
		||||
		orderType_              = std::move( other.orderType_ );
 | 
			
		||||
		notifyNo_               = std::move( other.notifyNo_ );
 | 
			
		||||
@@ -100,6 +98,39 @@ public:
 | 
			
		||||
		return *this;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	friend bool operator==( const RepairRecommandationRecord & lhs, const RepairRecommandationRecord & rhs )
 | 
			
		||||
	{
 | 
			
		||||
		return lhs.branchName_ == rhs.branchName_
 | 
			
		||||
		       && lhs.orderNo_ == rhs.orderNo_
 | 
			
		||||
		       && lhs.orderType_ == rhs.orderType_
 | 
			
		||||
		       && lhs.notifyNo_ == rhs.notifyNo_
 | 
			
		||||
		       && lhs.suggestedCarDealerCode_ == rhs.suggestedCarDealerCode_
 | 
			
		||||
		       && lhs.suggestedCarDealerName_ == rhs.suggestedCarDealerName_
 | 
			
		||||
		       && lhs.damageDate_ == rhs.damageDate_
 | 
			
		||||
		       && lhs.plateNumber_ == rhs.plateNumber_
 | 
			
		||||
		       && lhs.brandName_ == rhs.brandName_
 | 
			
		||||
		       && lhs.messageType_ == rhs.messageType_
 | 
			
		||||
		       && lhs.messageSendingDate_ == rhs.messageSendingDate_
 | 
			
		||||
		       && lhs.dataSource_ == rhs.dataSource_;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	friend bool operator!=( const RepairRecommandationRecord & lhs, const RepairRecommandationRecord & rhs )
 | 
			
		||||
	{
 | 
			
		||||
		return !(lhs == rhs);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	std::wstring getBranchName() const
 | 
			
		||||
	{
 | 
			
		||||
		return branchName_;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	void setBranchName( const std::wstring & branchName )
 | 
			
		||||
	{
 | 
			
		||||
		branchName_ = branchName;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	std::wstring getOrderNo() const
 | 
			
		||||
	{
 | 
			
		||||
		return orderNo_;
 | 
			
		||||
@@ -211,6 +242,7 @@ public:
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	std::wstring branchName_;
 | 
			
		||||
	std::wstring orderNo_;
 | 
			
		||||
	std::wstring orderType_;
 | 
			
		||||
	std::wstring notifyNo_;
 | 
			
		||||
 
 | 
			
		||||
@@ -159,9 +159,8 @@ void QDataManagementWidget::initWidgetByPrivileges()
 | 
			
		||||
		ui.pRepairOrderTab->setEnabled( false );
 | 
			
		||||
		ui.pNewRepairMonitorTab->setEnabled( false );
 | 
			
		||||
		ui.pRepairRecommandationTab->setEnabled( false );
 | 
			
		||||
		ui.pCarDealerSchemaTab->setEnabled( false );
 | 
			
		||||
		ui.pCarDealerSchemaTab->setEnabled(true);
 | 
			
		||||
		ui.pCarDealerAchievementTab->setEnabled( true );
 | 
			
		||||
		ui.pCarDealerAchievementTab->setFocus();
 | 
			
		||||
 | 
			
		||||
		ui.tabWidget->setCurrentWidget(ui.pCarDealerAchievementTab);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
#include <stdexcept>
 | 
			
		||||
#include <stdexcept>
 | 
			
		||||
#include <QtWidgets/QtWidgets>
 | 
			
		||||
#include "QRepairRecommendationWidget.h"
 | 
			
		||||
#include "../../Data/DataManipulation/Excel/LoadFromExcel.h"
 | 
			
		||||
@@ -75,13 +75,13 @@ void QRepairRecommendationWidget::onImport()
 | 
			
		||||
 | 
			
		||||
		QMessageBox::critical( nullptr,
 | 
			
		||||
		                       QString::fromUtf8( "保存数据出错!" ),
 | 
			
		||||
		                       QString::fromUtf8( error.what() ) );
 | 
			
		||||
		                       QString::fromLocal8Bit( error.what() ) );
 | 
			
		||||
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//提示
 | 
			
		||||
	QString messageInfo = QString::fromUtf8( "Maybe写入%1了条记录。" ).arg( recommandationVector.size() );
 | 
			
		||||
	QString messageInfo = QString::fromUtf8( "写入%1了条记录。" ).arg( recommandationVector.size() );
 | 
			
		||||
 | 
			
		||||
	QMessageBox::information( nullptr,
 | 
			
		||||
	                          QString::fromUtf8( "保存成功" ),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user