回家吃饭
This commit is contained in:
parent
21c3f5fe75
commit
c2251573db
|
@ -25,8 +25,8 @@
|
|||
<ClCompile Include="..\..\..\source\Data\Datastructure\CarDealerAchievement\CarDealerAchievement.cpp" />
|
||||
<ClCompile Include="..\..\..\source\Data\Datastructure\CarDealerScheme\CarDealerScheme.cpp" />
|
||||
<ClCompile Include="..\..\..\source\data\Datastructure\RepairOrder\RepairOrder.cpp" />
|
||||
<ClCompile Include="..\..\..\source\Data\Datastructure\RepairSuggestion\RepairSuggestionRecord.cpp" />
|
||||
<ClCompile Include="..\..\..\source\data\Datastructure\UserInfo\UserInfo.cpp" />
|
||||
<ClCompile Include="..\..\..\source\Data\Datastructure\送返修推荐表\送返修推荐表.cpp" />
|
||||
<ClCompile Include="..\..\..\source\data\excel\excel.cpp" />
|
||||
<ClCompile Include="..\..\..\source\data\query\query_user.cpp" />
|
||||
<ClCompile Include="..\..\..\source\db\ocilib\db_oper.cpp" />
|
||||
|
@ -63,8 +63,8 @@
|
|||
<ClInclude Include="..\..\..\source\Data\Datastructure\CarDealerAchievement\CarDealerAchievement.h" />
|
||||
<ClInclude Include="..\..\..\source\Data\Datastructure\CarDealerScheme\CarDealerScheme.h" />
|
||||
<ClInclude Include="..\..\..\source\data\Datastructure\RepairOrder\RepairOrder.h" />
|
||||
<ClInclude Include="..\..\..\source\Data\Datastructure\RepairSuggestion\RepairSuggestionRecord.h" />
|
||||
<ClInclude Include="..\..\..\source\data\Datastructure\UserInfo\UserInfo.h" />
|
||||
<ClInclude Include="..\..\..\source\Data\Datastructure\送返修推荐表\送返修推荐表.h" />
|
||||
<ClInclude Include="..\..\..\source\data\excel\excel.h" />
|
||||
<ClInclude Include="..\..\..\source\data\query\query_user.h" />
|
||||
<ClInclude Include="..\..\..\source\db\ocilib\db_oper.h" />
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
<ClCompile Include="..\..\..\source\Widgets\ContentWidget\QCarDealerAchievementWidget\QCarDealerAchievementWidget.cpp">
|
||||
<Filter>窗口\内容窗口\数据管理\车商业绩表</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\source\Data\Datastructure\送返修推荐表\送返修推荐表.cpp">
|
||||
<ClCompile Include="..\..\..\source\Data\Datastructure\RepairSuggestion\RepairSuggestionRecord.cpp">
|
||||
<Filter>数据\数据结构\送返修推荐表</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
|
@ -271,7 +271,7 @@
|
|||
<ClInclude Include="..\..\..\source\data\DataManipulation\FromExcelToOracle\FromExcelToOracle.h">
|
||||
<Filter>数据\数据管理\导入导出\直接导入导出</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\source\Data\Datastructure\送返修推荐表\送返修推荐表.h">
|
||||
<ClInclude Include="..\..\..\source\Data\Datastructure\RepairSuggestion\RepairSuggestionRecord.h">
|
||||
<Filter>数据\数据结构\送返修推荐表</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -384,6 +384,61 @@ void LoadRepairOrderFromXlsx( const std::wstring & filePath,
|
|||
pBook->release();
|
||||
}
|
||||
|
||||
void LoadRepairSuggestionFromXlsx( const std::wstring & filePath,
|
||||
unsigned sheetIndex,
|
||||
unsigned startRowIndex,
|
||||
std::vector<RepairSuggestionRecord> & recordVector )
|
||||
{
|
||||
Book * pBook = xlCreateBookW();
|
||||
Sheet * pSheet = nullptr;
|
||||
|
||||
if ( pBook == nullptr )
|
||||
{
|
||||
throw runtime_error( "libxl库加载失败!" );
|
||||
}
|
||||
|
||||
setKey( pBook );
|
||||
pSheet = pBook->getSheet( sheetIndex );
|
||||
|
||||
if ( pSheet == nullptr )
|
||||
{
|
||||
string errorMessage = "读取sheet失败!";
|
||||
errorMessage.append( pBook->errorMessage() );
|
||||
|
||||
pBook->release();
|
||||
|
||||
throw runtime_error( errorMessage );
|
||||
}
|
||||
|
||||
int lastRowIndex = pSheet->lastRow();
|
||||
int firstRowIndex = pSheet->firstRow();
|
||||
int rowIndex = firstRowIndex + startRowIndex;
|
||||
|
||||
while ( rowIndex <= lastRowIndex )
|
||||
{
|
||||
//起始列索引
|
||||
int colunmIndex = pSheet->firstCol();
|
||||
|
||||
wstring orderNo = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
wstring orderType = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
wstring notifyNo = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
wstring suggestedCarDealerCode = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
wstring suggestedCarDealerName = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
wstring damageDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
wstring plateNumber = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
wstring brandName = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
wstring messageType = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
wstring messageSendingDate = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
wstring dataSource = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
|
||||
|
||||
|
||||
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
pBook->release();
|
||||
}
|
||||
|
||||
void LoadRepairOrderFromXls( const std::wstring & filePath,
|
||||
unsigned sheetIndex,
|
||||
unsigned startRowIndex,
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "../../Datastructure/CarDealerScheme/CarDealerScheme.h"
|
||||
#include "../../Datastructure/CarDealerAchievement/CarDealerAchievement.h"
|
||||
#include "../../Datastructure/RepairOrder/RepairOrder.h"
|
||||
#include "../../Datastructure/RepairSuggestion/RepairSuggestionRecord.h"
|
||||
|
||||
/************************************************
|
||||
* \brief
|
||||
|
@ -46,3 +47,8 @@ void LoadRepairOrderFromXlsx( const std::wstring & filePath,
|
|||
// unsigned sheetIndex,
|
||||
// unsigned startRowIndex,
|
||||
// std::vector<RepairOrder> & orderVector );
|
||||
|
||||
void LoadRepairSuggestionFromXlsx( const std::wstring & filePath,
|
||||
unsigned int sheetIndex,
|
||||
unsigned int startRowIndex,
|
||||
std::vector<RepairSuggestionRecord> & recordVector );
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
/************************************************
|
||||
* \brief 送返修推荐表记录
|
||||
************************************************/
|
||||
class RepairSuggestionRecord
|
||||
{
|
||||
public:
|
||||
RepairSuggestionRecord( 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 ) ),
|
||||
orderType_( std::move( orderType ) ),
|
||||
notifyNo_( std::move( notifyNo ) ),
|
||||
suggestedCarDealerCode_( std::move( suggestedCarDealerCode ) ),
|
||||
suggestedCarDealerName_( std::move( suggestedCarDealerName ) ),
|
||||
damageDate_( std::move( damageDate ) ),
|
||||
plateNumber_( std::move( plateNumber ) ),
|
||||
brandName_( std::move( brandName ) ),
|
||||
messageType_( std::move( messageType ) ),
|
||||
messageSendingDate_( std::move( messageSendingDate ) ),
|
||||
dataSource_( std::move( dataSource ) )
|
||||
{
|
||||
}
|
||||
|
||||
RepairSuggestionRecord( const RepairSuggestionRecord & other )
|
||||
: orderNo_( other.orderNo_ ),
|
||||
orderType_( other.orderType_ ),
|
||||
notifyNo_( other.notifyNo_ ),
|
||||
suggestedCarDealerCode_( other.suggestedCarDealerCode_ ),
|
||||
suggestedCarDealerName_( other.suggestedCarDealerName_ ),
|
||||
damageDate_( other.damageDate_ ),
|
||||
plateNumber_( other.plateNumber_ ),
|
||||
brandName_( other.brandName_ ),
|
||||
messageType_( other.messageType_ ),
|
||||
messageSendingDate_( other.messageSendingDate_ ),
|
||||
dataSource_( other.dataSource_ )
|
||||
{
|
||||
}
|
||||
|
||||
RepairSuggestionRecord( RepairSuggestionRecord && other )
|
||||
: orderNo_( std::move( other.orderNo_ ) ),
|
||||
orderType_( std::move( other.orderType_ ) ),
|
||||
notifyNo_( std::move( other.notifyNo_ ) ),
|
||||
suggestedCarDealerCode_( std::move( other.suggestedCarDealerCode_ ) ),
|
||||
suggestedCarDealerName_( std::move( other.suggestedCarDealerName_ ) ),
|
||||
damageDate_( std::move( other.damageDate_ ) ),
|
||||
plateNumber_( std::move( other.plateNumber_ ) ),
|
||||
brandName_( std::move( other.brandName_ ) ),
|
||||
messageType_( std::move( other.messageType_ ) ),
|
||||
messageSendingDate_( std::move( other.messageSendingDate_ ) ),
|
||||
dataSource_( std::move( other.dataSource_ ) )
|
||||
{
|
||||
}
|
||||
|
||||
RepairSuggestionRecord & operator=( const RepairSuggestionRecord & other )
|
||||
{
|
||||
if ( this == &other )
|
||||
return *this;
|
||||
orderNo_ = other.orderNo_;
|
||||
orderType_ = other.orderType_;
|
||||
notifyNo_ = other.notifyNo_;
|
||||
suggestedCarDealerCode_ = other.suggestedCarDealerCode_;
|
||||
suggestedCarDealerName_ = other.suggestedCarDealerName_;
|
||||
damageDate_ = other.damageDate_;
|
||||
plateNumber_ = other.plateNumber_;
|
||||
brandName_ = other.brandName_;
|
||||
messageType_ = other.messageType_;
|
||||
messageSendingDate_ = other.messageSendingDate_;
|
||||
dataSource_ = other.dataSource_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
RepairSuggestionRecord & operator=( RepairSuggestionRecord && other )
|
||||
{
|
||||
if ( this == &other )
|
||||
return *this;
|
||||
orderNo_ = std::move( other.orderNo_ );
|
||||
orderType_ = std::move( other.orderType_ );
|
||||
notifyNo_ = std::move( other.notifyNo_ );
|
||||
suggestedCarDealerCode_ = std::move( other.suggestedCarDealerCode_ );
|
||||
suggestedCarDealerName_ = std::move( other.suggestedCarDealerName_ );
|
||||
damageDate_ = std::move( other.damageDate_ );
|
||||
plateNumber_ = std::move( other.plateNumber_ );
|
||||
brandName_ = std::move( other.brandName_ );
|
||||
messageType_ = std::move( other.messageType_ );
|
||||
messageSendingDate_ = std::move( other.messageSendingDate_ );
|
||||
dataSource_ = std::move( other.dataSource_ );
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
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_;
|
||||
};
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
#include "送返修推荐表.h"
|
|
@ -1,227 +0,0 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
class repair_suggestion_record
|
||||
{
|
||||
public:
|
||||
|
||||
repair_suggestion_record(const std::wstring& 工单号,
|
||||
const std::wstring& 工单类型,
|
||||
const std::wstring& 报案号,
|
||||
const std::wstring& 推荐车商代码,
|
||||
const std::wstring& 推荐车商名称,
|
||||
const std::wstring& 出险日期,
|
||||
const std::wstring& 车牌号,
|
||||
const std::wstring& 品牌名称,
|
||||
const std::wstring& 短信类型,
|
||||
const std::wstring& 发送时间,
|
||||
const std::wstring& 数据来源)
|
||||
: 工单号_(工单号),
|
||||
工单类型_(工单类型),
|
||||
报案号_(报案号),
|
||||
推荐车商代码_(推荐车商代码),
|
||||
推荐车商名称_(推荐车商名称),
|
||||
出险日期_(出险日期),
|
||||
车牌号_(车牌号),
|
||||
品牌名称_(品牌名称),
|
||||
短信类型_(短信类型),
|
||||
发送时间_(发送时间),
|
||||
数据来源_(数据来源)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
repair_suggestion_record(const repair_suggestion_record& other)
|
||||
: 工单号_(other.工单号_),
|
||||
工单类型_(other.工单类型_),
|
||||
报案号_(other.报案号_),
|
||||
推荐车商代码_(other.推荐车商代码_),
|
||||
推荐车商名称_(other.推荐车商名称_),
|
||||
出险日期_(other.出险日期_),
|
||||
车牌号_(other.车牌号_),
|
||||
品牌名称_(other.品牌名称_),
|
||||
短信类型_(other.短信类型_),
|
||||
发送时间_(other.发送时间_),
|
||||
数据来源_(other.数据来源_)
|
||||
{
|
||||
}
|
||||
|
||||
repair_suggestion_record(repair_suggestion_record&& other)
|
||||
: 工单号_(std::move(other.工单号_)),
|
||||
工单类型_(std::move(other.工单类型_)),
|
||||
报案号_(std::move(other.报案号_)),
|
||||
推荐车商代码_(std::move(other.推荐车商代码_)),
|
||||
推荐车商名称_(std::move(other.推荐车商名称_)),
|
||||
出险日期_(std::move(other.出险日期_)),
|
||||
车牌号_(std::move(other.车牌号_)),
|
||||
品牌名称_(std::move(other.品牌名称_)),
|
||||
短信类型_(std::move(other.短信类型_)),
|
||||
发送时间_(std::move(other.发送时间_)),
|
||||
数据来源_(std::move(other.数据来源_))
|
||||
{
|
||||
}
|
||||
|
||||
repair_suggestion_record& operator=(const repair_suggestion_record& other)
|
||||
{
|
||||
if (this == &other)
|
||||
return *this;
|
||||
工单号_ = other.工单号_;
|
||||
工单类型_ = other.工单类型_;
|
||||
报案号_ = other.报案号_;
|
||||
推荐车商代码_ = other.推荐车商代码_;
|
||||
推荐车商名称_ = other.推荐车商名称_;
|
||||
出险日期_ = other.出险日期_;
|
||||
车牌号_ = other.车牌号_;
|
||||
品牌名称_ = other.品牌名称_;
|
||||
短信类型_ = other.短信类型_;
|
||||
发送时间_ = other.发送时间_;
|
||||
数据来源_ = other.数据来源_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
repair_suggestion_record& operator=(repair_suggestion_record&& other)
|
||||
{
|
||||
if (this == &other)
|
||||
return *this;
|
||||
工单号_ = std::move(other.工单号_);
|
||||
工单类型_ = std::move(other.工单类型_);
|
||||
报案号_ = std::move(other.报案号_);
|
||||
推荐车商代码_ = std::move(other.推荐车商代码_);
|
||||
推荐车商名称_ = std::move(other.推荐车商名称_);
|
||||
出险日期_ = std::move(other.出险日期_);
|
||||
车牌号_ = std::move(other.车牌号_);
|
||||
品牌名称_ = std::move(other.品牌名称_);
|
||||
短信类型_ = std::move(other.短信类型_);
|
||||
发送时间_ = std::move(other.发送时间_);
|
||||
数据来源_ = std::move(other.数据来源_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
std::wstring get工单号() const
|
||||
{
|
||||
return 工单号_;
|
||||
}
|
||||
|
||||
void set工单号(const std::wstring& 工单号)
|
||||
{
|
||||
工单号_ = 工单号;
|
||||
}
|
||||
|
||||
std::wstring get工单类型() const
|
||||
{
|
||||
return 工单类型_;
|
||||
}
|
||||
|
||||
void set工单类型(const std::wstring& 工单类型)
|
||||
{
|
||||
工单类型_ = 工单类型;
|
||||
}
|
||||
|
||||
std::wstring get报案号() const
|
||||
{
|
||||
return 报案号_;
|
||||
}
|
||||
|
||||
void set报案号(const std::wstring& 报案号)
|
||||
{
|
||||
报案号_ = 报案号;
|
||||
}
|
||||
|
||||
std::wstring get推荐车商代码() const
|
||||
{
|
||||
return 推荐车商代码_;
|
||||
}
|
||||
|
||||
void set推荐车商代码(const std::wstring& 推荐车商代码)
|
||||
{
|
||||
推荐车商代码_ = 推荐车商代码;
|
||||
}
|
||||
|
||||
std::wstring get推荐车商名称() const
|
||||
{
|
||||
return 推荐车商名称_;
|
||||
}
|
||||
|
||||
void set推荐车商名称(const std::wstring& 推荐车商名称)
|
||||
{
|
||||
推荐车商名称_ = 推荐车商名称;
|
||||
}
|
||||
|
||||
std::wstring get出险日期() const
|
||||
{
|
||||
return 出险日期_;
|
||||
}
|
||||
|
||||
void set出险日期(const std::wstring& 出险日期)
|
||||
{
|
||||
出险日期_ = 出险日期;
|
||||
}
|
||||
|
||||
std::wstring get车牌号() const
|
||||
{
|
||||
return 车牌号_;
|
||||
}
|
||||
|
||||
void set车牌号(const std::wstring& 车牌号)
|
||||
{
|
||||
车牌号_ = 车牌号;
|
||||
}
|
||||
|
||||
std::wstring get品牌名称() const
|
||||
{
|
||||
return 品牌名称_;
|
||||
}
|
||||
|
||||
void set品牌名称(const std::wstring& 品牌名称)
|
||||
{
|
||||
品牌名称_ = 品牌名称;
|
||||
}
|
||||
|
||||
std::wstring get短信类型() const
|
||||
{
|
||||
return 短信类型_;
|
||||
}
|
||||
|
||||
void set短信类型(const std::wstring& 短信类型)
|
||||
{
|
||||
短信类型_ = 短信类型;
|
||||
}
|
||||
|
||||
std::wstring get发送时间() const
|
||||
{
|
||||
return 发送时间_;
|
||||
}
|
||||
|
||||
void set发送时间(const std::wstring& 发送时间)
|
||||
{
|
||||
发送时间_ = 发送时间;
|
||||
}
|
||||
|
||||
std::wstring get数据来源() const
|
||||
{
|
||||
return 数据来源_;
|
||||
}
|
||||
|
||||
void set数据来源(const std::wstring& 数据来源)
|
||||
{
|
||||
数据来源_ = 数据来源;
|
||||
}
|
||||
|
||||
private:
|
||||
std::wstring 工单号_;
|
||||
std::wstring 工单类型_;
|
||||
std::wstring 报案号_;
|
||||
std::wstring 推荐车商代码_;
|
||||
std::wstring 推荐车商名称_;
|
||||
std::wstring 出险日期_;
|
||||
std::wstring 车牌号_;
|
||||
std::wstring 品牌名称_;
|
||||
std::wstring 短信类型_;
|
||||
std::wstring 发送时间_;
|
||||
std::wstring 数据来源_;
|
||||
};
|
Binary file not shown.
Loading…
Reference in New Issue