。。。
This commit is contained in:
		@@ -426,69 +426,69 @@ void LoadRepairOrderFromXls( const std::wstring &       filePath,
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		int colunmIndex = pSheet->firstCol();
 | 
							int colunmIndex = pSheet->firstCol();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		const wstring && branchName                  = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && branchName                  = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && orderNo                     = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && orderNo                     = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && orderType                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && orderType                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && notifyNo                    = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && notifyNo                    = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && damageArea                  = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && damageArea                  = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && damageDate                  = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && damageDate                  = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && generatingDate              = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && generatingDate              = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && policyNo                    = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && policyNo                    = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && policyNoJQX                 = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && policyNoJQX                 = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && plateNumber                 = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && plateNumber                 = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && brandName                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && brandName                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && isInsuranceObject           = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && isInsuranceObject           = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && isSuccess                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && isSuccess                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && recommandDealerCode         = 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 && 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 && recommandDealerNameInNotify = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && recommandDealerNameInSurvey = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && recommandDealerNameInSurvey = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && agentName                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && agentName                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && surveyor                    = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && surveyor                    = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && checkDate                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && checkDate                   = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && repairingStartDate          = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && repairingStartDate          = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && repairingFinishDate         = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && repairingFinishDate         = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && status                      = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && status                      = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && lostItemID                  = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && lostItemID                  = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
		const wstring && surveyorRecommandStatus     = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
							// const wstring && surveyorRecommandStatus     = ReadCellStringFromXlsx( pBook, sheetIndex, rowIndex, colunmIndex++, true );
 | 
				
			||||||
 | 
							//
 | 
				
			||||||
		//空行跳过
 | 
							// //空行跳过
 | 
				
			||||||
		if ( orderNo.empty() == true )
 | 
							// if ( orderNo.empty() == true )
 | 
				
			||||||
		{
 | 
							// {
 | 
				
			||||||
			rowIndex++;
 | 
							// 	rowIndex++;
 | 
				
			||||||
 | 
							//
 | 
				
			||||||
			continue;
 | 
							// 	continue;
 | 
				
			||||||
		}
 | 
							// }
 | 
				
			||||||
 | 
							//
 | 
				
			||||||
		RepairOrder order( branchName,
 | 
							// RepairOrder order( branchName,
 | 
				
			||||||
		                   orderNo,
 | 
							//                    orderNo,
 | 
				
			||||||
		                   orderType,
 | 
							//                    orderType,
 | 
				
			||||||
		                   notifyNo,
 | 
							//                    notifyNo,
 | 
				
			||||||
		                   damageArea,
 | 
							//                    damageArea,
 | 
				
			||||||
		                   damageDate,
 | 
							//                    damageDate,
 | 
				
			||||||
		                   generatingDate,
 | 
							//                    generatingDate,
 | 
				
			||||||
		                   policyNo,
 | 
							//                    policyNo,
 | 
				
			||||||
		                   policyNoJQX,
 | 
							//                    policyNoJQX,
 | 
				
			||||||
		                   plateNumber,
 | 
							//                    plateNumber,
 | 
				
			||||||
		                   brandName,
 | 
							//                    brandName,
 | 
				
			||||||
		                   isInsuranceObject,
 | 
							//                    isInsuranceObject,
 | 
				
			||||||
		                   isSuccess,
 | 
							//                    isSuccess,
 | 
				
			||||||
		                   recommandDealerCode,
 | 
							//                    recommandDealerCode,
 | 
				
			||||||
		                   recommandDealerName,
 | 
							//                    recommandDealerName,
 | 
				
			||||||
		                   recommandDealerCodeInNotify,
 | 
							//                    recommandDealerCodeInNotify,
 | 
				
			||||||
		                   recommandDealerNameInNotify,
 | 
							//                    recommandDealerNameInNotify,
 | 
				
			||||||
		                   recommandDealerNameInSurvey,
 | 
							//                    recommandDealerNameInSurvey,
 | 
				
			||||||
		                   agentName,
 | 
							//                    agentName,
 | 
				
			||||||
		                   surveyor,
 | 
							//                    surveyor,
 | 
				
			||||||
		                   checkDate,
 | 
							//                    checkDate,
 | 
				
			||||||
		                   repairingStartDate,
 | 
							//                    repairingStartDate,
 | 
				
			||||||
		                   repairingFinishDate,
 | 
							//                    repairingFinishDate,
 | 
				
			||||||
		                   status,
 | 
							//                    status,
 | 
				
			||||||
		                   lostItemID,
 | 
							//                    lostItemID,
 | 
				
			||||||
		                   surveyorRecommandStatus );
 | 
							//                    surveyorRecommandStatus );
 | 
				
			||||||
 | 
							//
 | 
				
			||||||
		orderVector.push_back( order );
 | 
							// orderVector.push_back( order );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		rowIndex++;
 | 
							rowIndex++;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,6 +15,14 @@ void setKey( libxl::Book * pBook )
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void setKey( libxl::IBookT<char> * pBook )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						if (pBook != nullptr)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							pBook->setKey("cpic", "windows-202d21040bc4e70060bc6264a6ucu7i1");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
std::wstring ReadCellStringFromXlsx( libxl::IBookT<wchar_t> * pBook,
 | 
					std::wstring ReadCellStringFromXlsx( libxl::IBookT<wchar_t> * pBook,
 | 
				
			||||||
                                     unsigned int             sheetIndex,
 | 
					                                     unsigned int             sheetIndex,
 | 
				
			||||||
                                     unsigned int             rowIndex,
 | 
					                                     unsigned int             rowIndex,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,7 @@
 | 
				
			|||||||
* \param pBook 
 | 
					* \param pBook 
 | 
				
			||||||
************************************************/
 | 
					************************************************/
 | 
				
			||||||
void setKey( libxl::Book * pBook );
 | 
					void setKey( libxl::Book * pBook );
 | 
				
			||||||
 | 
					void setKey( libxl::IBookT<char> * pBook );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/************************************************
 | 
					/************************************************
 | 
				
			||||||
* \brief 从xlsx文件单元格中读取数据,以字符串为返回值。
 | 
					* \brief 从xlsx文件单元格中读取数据,以字符串为返回值。
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,6 +23,8 @@ void excelTest()
 | 
				
			|||||||
	
 | 
						
 | 
				
			||||||
	wstring filePath = L"D:/develop/projects_win/2019/car_dealer_util/数据/345517_1.xls";
 | 
						wstring filePath = L"D:/develop/projects_win/2019/car_dealer_util/数据/345517_1.xls";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						string xlsFilePath = "D:/develop/projects_win/2019/car_dealer_util/数据/345517_1.xls";
 | 
				
			||||||
 | 
						
 | 
				
			||||||
	//LoadCarDealerSchemeFromXlsx(filePath, 0, 1, schemeVector);
 | 
						//LoadCarDealerSchemeFromXlsx(filePath, 0, 1, schemeVector);
 | 
				
			||||||
	//LoadCarDealerAchievementFromXlsx( filePath, 0, 1, achievementsVector );
 | 
						//LoadCarDealerAchievementFromXlsx( filePath, 0, 1, achievementsVector );
 | 
				
			||||||
	LoadRepairOrderFromXls(filePath, 0, 1, repairOrderVector);
 | 
						LoadRepairOrderFromXls(filePath, 0, 1, repairOrderVector);
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								数据/送返修工单/345540_1.xls
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								数据/送返修工单/345540_1.xls
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user