完成转换
This commit is contained in:
parent
1e383920be
commit
054ef9e65a
@ -20,6 +20,7 @@ Global
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
Qt5Version = 5.10.1_msvc2017_x64
|
||||
SolutionGuid = {A4A9332B-14DA-4126-B98B-613DCABA7F66}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -11,7 +11,6 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\source\check.cpp" />
|
||||
<ClCompile Include="..\..\..\source\DataManipulation.cpp" />
|
||||
<ClCompile Include="..\..\..\source\main.cpp" />
|
||||
<ClCompile Include="..\..\..\source\Parameters.cpp" />
|
||||
@ -23,21 +22,17 @@
|
||||
<ClCompile Include="..\..\..\source\QRapidInputWidget.cpp" />
|
||||
<ClCompile Include="..\..\..\source\QTelSalePolicyInfoInputWidget.cpp" />
|
||||
<ClCompile Include="..\..\..\source\QTelSalePolicyInfoQuery.cpp" />
|
||||
<ClCompile Include="..\..\..\source\sqlite\shell.c" />
|
||||
<ClCompile Include="..\..\..\source\sqlite\sqlite3.c" />
|
||||
<ClCompile Include="..\..\..\source\StringCodeConverter.cpp" />
|
||||
<ClCompile Include="..\..\..\source\SystemData.cpp" />
|
||||
<ClCompile Include="..\..\..\source\SystemDataQuery.cpp" />
|
||||
<ClCompile Include="..\..\..\source\TelSalePolicyManager.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\source\check.h" />
|
||||
<ClInclude Include="..\..\..\source\DataManipulation.h" />
|
||||
<ClInclude Include="..\..\..\source\Parameters.h" />
|
||||
<ClInclude Include="..\..\..\source\StringCodeConverter.h" />
|
||||
<ClInclude Include="..\..\..\source\SystemData.h" />
|
||||
<ClInclude Include="..\..\..\source\SystemDataQuery.h" />
|
||||
<ClInclude Include="..\..\..\source\TelSalePolicyManager.h" />
|
||||
<QtMoc Include="..\..\..\source\QTelSalePolicyInfoQuery.h" />
|
||||
<QtMoc Include="..\..\..\source\QTelSalePolicyInfoInputWidget.h" />
|
||||
<QtMoc Include="..\..\..\source\QRapidInputWidget.h" />
|
||||
@ -171,6 +166,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<LibraryPath>D:\develop\sdk\cpp\Qt\qt_5.10.1\5.10.1\msvc2017_64\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
@ -197,25 +193,26 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN32;WIN64;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN32;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<AdditionalOptions>/source-charset:utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>qtmaind.lib;Qt5Widgetsd.lib;Qt5Cored.lib;Qt5Guid.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<QtMoc>
|
||||
<OutputFile>.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</OutputFile>
|
||||
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
|
||||
<IncludePath>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName)\.;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets</IncludePath>
|
||||
<Define>UNICODE;_UNICODE;WIN32;WIN64;QT_DLL;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB</Define>
|
||||
<IncludePath>.\GeneratedFiles;.;$(QTDIR)\include;$(QTDIR)\include\QtCore;.\GeneratedFiles\$(ConfigurationName);%(AdditionalIncludeDirectories)</IncludePath>
|
||||
<Define>UNICODE;_UNICODE;WIN32;WIN64;%(PreprocessorDefinitions)</Define>
|
||||
</QtMoc>
|
||||
<QtUic>
|
||||
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
|
||||
@ -229,8 +226,8 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN32;WIN64;QT_DLL;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>UNICODE;_UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat />
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
@ -240,13 +237,13 @@
|
||||
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>qtmain.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<QtMoc>
|
||||
<OutputFile>.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</OutputFile>
|
||||
<ExecutionDescription>Moc'ing %(Identity)...</ExecutionDescription>
|
||||
<IncludePath>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName)\.;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtANGLE;$(QTDIR)\include\QtWidgets</IncludePath>
|
||||
<Define>UNICODE;_UNICODE;WIN32;WIN64;QT_DLL;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB</Define>
|
||||
<IncludePath>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);%(AdditionalIncludeDirectories)</IncludePath>
|
||||
<Define>UNICODE;_UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;%(PreprocessorDefinitions)</Define>
|
||||
</QtMoc>
|
||||
<QtUic>
|
||||
<ExecutionDescription>Uic'ing %(Identity)...</ExecutionDescription>
|
||||
@ -265,7 +262,7 @@
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_x64="5.10.1" MocOptions="" />
|
||||
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_x64="5.10.1_msvc2017_x64" MocOptions="" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
@ -75,9 +75,6 @@
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\source\sqlite\shell.c">
|
||||
<Filter>sqlite3</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\source\sqlite\sqlite3.c">
|
||||
<Filter>sqlite3</Filter>
|
||||
</ClCompile>
|
||||
@ -96,9 +93,6 @@
|
||||
<ClCompile Include="..\..\..\source\StringCodeConverter.cpp">
|
||||
<Filter>数据\工具</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\source\check.cpp">
|
||||
<Filter>数据\数据库操作</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\source\SystemData.cpp">
|
||||
<Filter>数据\数据库操作</Filter>
|
||||
</ClCompile>
|
||||
@ -126,9 +120,6 @@
|
||||
<ClCompile Include="..\..\..\source\QMainWidget.cpp">
|
||||
<Filter>窗口\层叠窗口\层叠子窗口</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\source\TelSalePolicyManager.cpp">
|
||||
<Filter>数据</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\..\source\sqlite\sqlite3.h">
|
||||
@ -143,9 +134,6 @@
|
||||
<ClInclude Include="..\..\..\source\StringCodeConverter.h">
|
||||
<Filter>数据\工具</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\source\check.h">
|
||||
<Filter>数据\数据库操作</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\source\SystemData.h">
|
||||
<Filter>数据\数据库操作</Filter>
|
||||
</ClInclude>
|
||||
@ -155,9 +143,6 @@
|
||||
<ClInclude Include="..\..\..\source\Parameters.h">
|
||||
<Filter>数据\参数管理</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\source\TelSalePolicyManager.h">
|
||||
<Filter>数据</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="..\..\..\source\Resources\car.png">
|
||||
|
@ -2,11 +2,11 @@
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<QTDIR>D:\develop\sdk\cpp\qt\qt_5.10.1\5.10.1\msvc2017_64</QTDIR>
|
||||
<QTDIR>D:\develop\sdk\cpp\Qt\qt_5.10.1\5.10.1\msvc2017_64</QTDIR>
|
||||
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<QTDIR>D:\develop\sdk\cpp\qt\qt_5.10.1\5.10.1\msvc2017_64</QTDIR>
|
||||
<QTDIR>D:\develop\sdk\cpp\Qt\qt_5.10.1\5.10.1\msvc2017_64</QTDIR>
|
||||
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -362,10 +362,10 @@ void QueryPolicyGifts(const string & strPolicyNo, string & strGifts, double dGif
|
||||
}
|
||||
|
||||
|
||||
void readTelsaleXlsFile(const string strFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle, bool isXML )
|
||||
/*void readTelsaleXlsFile(const string strFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle, bool isXML )
|
||||
{
|
||||
IBookT<char> * pBook = NULL;
|
||||
ISheetT<char> * pSheet = NULL;
|
||||
Book * pBook = NULL;
|
||||
Sheet * pSheet = NULL;
|
||||
|
||||
int iRowCount = 0;
|
||||
int iRowIndex = 0;
|
||||
@ -413,13 +413,13 @@ void readTelsaleXlsFile(const string strFilePath, vector<SPolicyRecord> & listPo
|
||||
|
||||
CellType type = pSheet->cellType( iRowIndex, 4 );
|
||||
|
||||
policy.strSignDate = readXlsCell( pSheet, iRowIndex, 0 );
|
||||
policy.strPolicySerial = readXlsCell( pSheet, iRowIndex, 1 );
|
||||
policy.strPlateSerial = readXlsCell( pSheet, iRowIndex, 2 );
|
||||
policy.strCustomerName = readXlsCell( pSheet, iRowIndex, 3 );
|
||||
policy.strSalerCode = readXlsCell( pSheet, iRowIndex, 4 );
|
||||
policy.strSignDate = readXlsxCell( pSheet, iRowIndex, 0 );
|
||||
policy.strPolicySerial = readXlsxCell( pSheet, iRowIndex, 1 );
|
||||
policy.strPlateSerial = readXlsxCell( pSheet, iRowIndex, 2 );
|
||||
policy.strCustomerName = readXlsxCell( pSheet, iRowIndex, 3 );
|
||||
policy.strSalerCode = readXlsxCell( pSheet, iRowIndex, 4 );
|
||||
//policy.strAutoTraderName = readXlsCell( pSheet, iRowIndex, 5 );
|
||||
policy.strAutoTraderCode = readXlsCell( pSheet, iRowIndex, 6 );
|
||||
policy.strAutoTraderCode = readXlsxCell( pSheet, iRowIndex, 6 );
|
||||
|
||||
//补齐工号
|
||||
if ( policy.strSalerCode.length() == 1 )
|
||||
@ -449,7 +449,7 @@ void readTelsaleXlsFile(const string strFilePath, vector<SPolicyRecord> & listPo
|
||||
}
|
||||
|
||||
pBook->release();
|
||||
}
|
||||
}*/
|
||||
|
||||
string readXlsCell(ISheetT<char> * pSheet, int iRowIndex, int iColIndex)
|
||||
{
|
||||
@ -521,7 +521,7 @@ string readXlsxCell(ISheetT<wchar_t> * pSheet, int iRowIndex, int iColIndex)
|
||||
return strReturn;
|
||||
}
|
||||
|
||||
void readTelsaleXlsxFile(wchar_t * wszFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle)
|
||||
void readTelsaleXlsxFile( const wstring & filePath, vector<SPolicyRecord> & listPolicy, bool hasTitle)
|
||||
{
|
||||
IBookT<wchar_t> * pBook = NULL;
|
||||
ISheetT<wchar_t> * pSheet = NULL;
|
||||
@ -537,7 +537,7 @@ void readTelsaleXlsxFile(wchar_t * wszFilePath, vector<SPolicyRecord> & listPoli
|
||||
throw string("");
|
||||
}
|
||||
|
||||
if ( pBook->load(L"D:/1111.xlsx") == false )
|
||||
if ( pBook->load( filePath.data() ) == false )
|
||||
{
|
||||
throw string("打开文件失败!" );
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <libxl.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include "SystemData.h"
|
||||
|
||||
using namespace std;
|
||||
@ -133,9 +134,9 @@ void QueryPolicyGifts( const string & strPolicyNo,
|
||||
string & strGifts,
|
||||
double dGiftPriceSum );
|
||||
|
||||
void readTelsaleXlsFile( const string strFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle, bool isXML );
|
||||
//void readTelsaleXlsFile( const string & strFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle, bool isXML );
|
||||
|
||||
void readTelsaleXlsxFile( wchar_t * wszFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle );
|
||||
void readTelsaleXlsxFile( const wstring & filePath, vector<SPolicyRecord> & listPolicy, bool hasTitle );
|
||||
|
||||
string readXlsCell( ISheetT<char> * pSheet, int iRowIndex, int iColIndex );
|
||||
string readXlsxCell( ISheetT<wchar_t> * pSheet, int iRowIndex, int iColIndex);
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
#include <exception>
|
||||
#include <unordered_map>
|
||||
#include "Parameters.h"
|
||||
#include "sqlite/sqlite3.h"
|
||||
|
||||
|
@ -16,10 +16,10 @@
|
||||
#define Parameters_h__
|
||||
|
||||
#include <string>
|
||||
#include <hash_map>
|
||||
#include <unordered_map>
|
||||
|
||||
using std::string;
|
||||
using std::hash_map;
|
||||
using std::unordered_map;
|
||||
|
||||
class Parameters
|
||||
{
|
||||
@ -35,7 +35,7 @@ private:
|
||||
|
||||
private:
|
||||
string m_strDbFilePath;
|
||||
hash_map<string, string> m_parameters;
|
||||
unordered_map<string, string> m_parameters;
|
||||
};
|
||||
|
||||
#endif // Parameters_h__
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef QCONFIGURATIONWIDGET_H
|
||||
#define QCONFIGURATIONWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <string>
|
||||
#include "ui_QConfigurationWidget.h"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
//#include <occi.h>
|
||||
#include <QTextCodec>
|
||||
//#include <QTextCodec>
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include "QLoginWidget.h"
|
||||
#include "SystemData.h"
|
||||
@ -24,8 +24,8 @@ void QLoginWidget::init()
|
||||
initWidget();
|
||||
initSignal();
|
||||
|
||||
pCodecLocal = QTextCodec::codecForLocale();
|
||||
pCodecUTF8 = QTextCodec::codecForName( "UTF-8" );
|
||||
//pCodecLocal = QTextCodec::codecForLocale();
|
||||
//pCodecUTF8 = QTextCodec::codecForName( "UTF-8" );
|
||||
|
||||
m_isLoginSuccess = false;
|
||||
}
|
||||
|
@ -2,8 +2,9 @@
|
||||
#define QLOGINWIDGET_H
|
||||
|
||||
#include <string>
|
||||
#include <QDialog>
|
||||
#include <QTextCodec>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
//#include <QDialog>
|
||||
//#include <QTextCodec>
|
||||
#include "ui_QLoginWidget.h"
|
||||
//#include "DataManipulate.h"
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <QStatusBar>
|
||||
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include "QMainFrame.h"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef QMAINFRAME_H
|
||||
#define QMAINFRAME_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include "SystemData.h"
|
||||
#include "QMyStackedWidget.h"
|
||||
#include "QTelSalePolicyInfoInputWidget.h"
|
||||
|
@ -1,7 +1,9 @@
|
||||
#ifndef QMYSTACKEDWIDGET_H
|
||||
#define QMYSTACKEDWIDGET_H
|
||||
|
||||
#include <QHash>
|
||||
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
|
||||
|
||||
#include <QtCore/qhash.h>
|
||||
#include <QtWidgets/QStackedWidget>
|
||||
|
||||
class QMyStackedWidget : public QStackedWidget
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "QRapidInputWidget.h"
|
||||
#include "DataManipulation.h"
|
||||
|
||||
QRapidInputWidget::QRapidInputWidget(QWidget *parent)
|
||||
QRapidInputWidget::QRapidInputWidget(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
@ -11,7 +11,6 @@ QRapidInputWidget::QRapidInputWidget(QWidget *parent)
|
||||
|
||||
QRapidInputWidget::~QRapidInputWidget()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QRapidInputWidget::init()
|
||||
@ -23,42 +22,43 @@ void QRapidInputWidget::init()
|
||||
|
||||
void QRapidInputWidget::initWidget()
|
||||
{
|
||||
setLayout( ui.pLayoutMain );
|
||||
setLayout(ui.pLayoutMain);
|
||||
|
||||
setAcceptDrops( true );
|
||||
setAcceptDrops(true);
|
||||
}
|
||||
|
||||
void QRapidInputWidget::initSignal()
|
||||
{
|
||||
connect( ui.pButtonSave,SIGNAL(clicked()), this, SLOT(onSaveTelSalePolicy()) );
|
||||
connect( ui.pButtonClean,SIGNAL(clicked()), this, SLOT(onCleanTable()) );
|
||||
connect( ui.pButtonOpenFile,SIGNAL(clicked()), this, SLOT(onOpenFile()) );
|
||||
connect(ui.pButtonSave,SIGNAL(clicked()), this, SLOT(onSaveTelSalePolicy()));
|
||||
connect(ui.pButtonClean,SIGNAL(clicked()), this, SLOT(onCleanTable()));
|
||||
connect(ui.pButtonOpenFile,SIGNAL(clicked()), this, SLOT(onOpenFile()));
|
||||
}
|
||||
|
||||
void QRapidInputWidget::initData()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QRapidInputWidget::dragEnterEvent(QDragEnterEvent * pEvent)
|
||||
void QRapidInputWidget::dragEnterEvent(QDragEnterEvent* pEvent)
|
||||
{
|
||||
if ( pEvent->mimeData()->hasUrls() )
|
||||
if (pEvent->mimeData()->hasUrls())
|
||||
{
|
||||
pEvent->acceptProposedAction();
|
||||
}
|
||||
}
|
||||
|
||||
void QRapidInputWidget::dropEvent(QDropEvent * pEvent)
|
||||
void QRapidInputWidget::dropEvent(QDropEvent* pEvent)
|
||||
{
|
||||
QList<QUrl> listURL = pEvent->mimeData()->urls();
|
||||
QString strFilePath;
|
||||
QString strFilePath;
|
||||
|
||||
//正则表达式判断文件类型
|
||||
QRegularExpression regXlsx( QString::fromLocal8Bit(".xlsx$"), QRegularExpression::PatternOption::CaseInsensitiveOption );
|
||||
QRegularExpression regXls( QString::fromLocal8Bit(".xls$"), QRegularExpression::PatternOption::CaseInsensitiveOption );
|
||||
QRegularExpression regXlsx(QString::fromLocal8Bit(".xlsx$"),
|
||||
QRegularExpression::PatternOption::CaseInsensitiveOption);
|
||||
QRegularExpression regXls(QString::fromLocal8Bit(".xls$"),
|
||||
QRegularExpression::PatternOption::CaseInsensitiveOption);
|
||||
QRegularExpressionMatch match;
|
||||
|
||||
if ( listURL.size() == 0 )
|
||||
if (listURL.size() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -66,96 +66,101 @@ void QRapidInputWidget::dropEvent(QDropEvent * pEvent)
|
||||
strFilePath = listURL[0].toLocalFile();
|
||||
|
||||
//是xlsx文件
|
||||
match = regXlsx.match( strFilePath );
|
||||
match = regXlsx.match(strFilePath);
|
||||
|
||||
if ( match.hasMatch() )
|
||||
if (match.hasMatch())
|
||||
{
|
||||
readTelsaleXlsFile( strFilePath.toLocal8Bit().data(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked(), true );
|
||||
readTelsaleXlsxFile(strFilePath.toStdWString(),
|
||||
m_vPolicy,
|
||||
ui.pCheckBoxHasTitle->isChecked());
|
||||
}
|
||||
|
||||
//是xls文件
|
||||
match = regXls.match( strFilePath );
|
||||
|
||||
if ( match.hasMatch() )
|
||||
match = regXls.match(strFilePath);
|
||||
|
||||
if (match.hasMatch())
|
||||
{
|
||||
readTelsaleXlsFile( strFilePath.toLocal8Bit().data(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked(), false );
|
||||
//readTelsaleXlsFile(strFilePath.toStdWString(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked(), false);
|
||||
QMessageBox::critical(this,
|
||||
QString::fromLocal8Bit("文件类型错误!"),
|
||||
QString::fromLocal8Bit("文件格式需为Excel 2007及以后!"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
showPolicy();
|
||||
}
|
||||
|
||||
void QRapidInputWidget::showPolicy()
|
||||
{
|
||||
int iRowCount = m_vPolicy.size();
|
||||
QTableWidgetItem * pItem = NULL;
|
||||
int iRowCount = m_vPolicy.size();
|
||||
QTableWidgetItem* pItem = NULL;
|
||||
|
||||
ui.pTableWidgetPolicy->setRowCount( iRowCount );
|
||||
ui.pTableWidgetPolicy->setRowCount(iRowCount);
|
||||
|
||||
for ( int iRowIndex = 0; iRowIndex < iRowCount; iRowIndex++ )
|
||||
for (int iRowIndex = 0; iRowIndex < iRowCount; iRowIndex++)
|
||||
{
|
||||
//保单号
|
||||
pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strPolicySerial.c_str()) );
|
||||
pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
|
||||
pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
|
||||
pItem = new QTableWidgetItem(QString::fromLocal8Bit(m_vPolicy[iRowIndex].strPolicySerial.c_str()));
|
||||
pItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
pItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
|
||||
ui.pTableWidgetPolicy->setItem( iRowIndex, 0, pItem );
|
||||
ui.pTableWidgetPolicy->setItem(iRowIndex, 0, pItem);
|
||||
|
||||
//签单日期
|
||||
pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strSignDate.c_str()) );
|
||||
pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
|
||||
pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
|
||||
pItem = new QTableWidgetItem(QString::fromLocal8Bit(m_vPolicy[iRowIndex].strSignDate.c_str()));
|
||||
pItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
pItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
|
||||
ui.pTableWidgetPolicy->setItem( iRowIndex, 1, pItem );
|
||||
ui.pTableWidgetPolicy->setItem(iRowIndex, 1, pItem);
|
||||
|
||||
//车牌号
|
||||
pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strPlateSerial.c_str()) );
|
||||
pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
|
||||
pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
|
||||
pItem = new QTableWidgetItem(QString::fromLocal8Bit(m_vPolicy[iRowIndex].strPlateSerial.c_str()));
|
||||
pItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
pItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
|
||||
ui.pTableWidgetPolicy->setItem( iRowIndex, 2, pItem );
|
||||
ui.pTableWidgetPolicy->setItem(iRowIndex, 2, pItem);
|
||||
|
||||
//被保险人
|
||||
pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strCustomerName.c_str()) );
|
||||
pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
|
||||
pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
|
||||
pItem = new QTableWidgetItem(QString::fromLocal8Bit(m_vPolicy[iRowIndex].strCustomerName.c_str()));
|
||||
pItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
pItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
|
||||
ui.pTableWidgetPolicy->setItem( iRowIndex, 3, pItem );
|
||||
ui.pTableWidgetPolicy->setItem(iRowIndex, 3, pItem);
|
||||
|
||||
//车商代码
|
||||
pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strAutoTraderCode.c_str()) );
|
||||
pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
|
||||
pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
|
||||
pItem = new QTableWidgetItem(QString::fromLocal8Bit(m_vPolicy[iRowIndex].strAutoTraderCode.c_str()));
|
||||
pItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
pItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
|
||||
ui.pTableWidgetPolicy->setItem( iRowIndex, 4, pItem );
|
||||
ui.pTableWidgetPolicy->setItem(iRowIndex, 4, pItem);
|
||||
|
||||
//经办人代码
|
||||
pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strSalerCode.c_str()) );
|
||||
pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
|
||||
pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable );
|
||||
pItem = new QTableWidgetItem(QString::fromLocal8Bit(m_vPolicy[iRowIndex].strSalerCode.c_str()));
|
||||
pItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
pItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable);
|
||||
|
||||
ui.pTableWidgetPolicy->setItem( iRowIndex, 5, pItem );
|
||||
ui.pTableWidgetPolicy->setItem(iRowIndex, 5, pItem);
|
||||
|
||||
//经办人名称
|
||||
pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strSalerName.c_str()) );
|
||||
pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
|
||||
pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
|
||||
pItem = new QTableWidgetItem(QString::fromLocal8Bit(m_vPolicy[iRowIndex].strSalerName.c_str()));
|
||||
pItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
pItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
|
||||
ui.pTableWidgetPolicy->setItem( iRowIndex, 6, pItem );
|
||||
ui.pTableWidgetPolicy->setItem(iRowIndex, 6, pItem);
|
||||
|
||||
//部门
|
||||
pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strSalerDeptName.c_str()) );
|
||||
pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
|
||||
pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
|
||||
pItem = new QTableWidgetItem(QString::fromLocal8Bit(m_vPolicy[iRowIndex].strSalerDeptName.c_str()));
|
||||
pItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
pItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
|
||||
ui.pTableWidgetPolicy->setItem( iRowIndex, 7, pItem );
|
||||
ui.pTableWidgetPolicy->setItem(iRowIndex, 7, pItem);
|
||||
|
||||
//科室
|
||||
pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strSalerOfficeName.c_str()) );
|
||||
pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
|
||||
pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
|
||||
pItem = new QTableWidgetItem(QString::fromLocal8Bit(m_vPolicy[iRowIndex].strSalerOfficeName.c_str()));
|
||||
pItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
pItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
|
||||
ui.pTableWidgetPolicy->setItem( iRowIndex, 8, pItem );
|
||||
ui.pTableWidgetPolicy->setItem(iRowIndex, 8, pItem);
|
||||
}
|
||||
|
||||
ui.pTableWidgetPolicy->resizeColumnsToContents();
|
||||
@ -167,20 +172,21 @@ void QRapidInputWidget::onSaveTelSalePolicy()
|
||||
|
||||
m_vErrorPolicy.clear();
|
||||
|
||||
for ( vector<SPolicyRecord>::iterator iter = m_vPolicy.begin(); iter != m_vPolicy.end(); ++iter )
|
||||
for (vector<SPolicyRecord>::iterator iter = m_vPolicy.begin(); iter != m_vPolicy.end(); ++iter)
|
||||
{
|
||||
try
|
||||
{
|
||||
SaveTelSalePolicyInfo( *iter, vGifts );
|
||||
SaveTelSalePolicyInfo(*iter, vGifts);
|
||||
}
|
||||
catch( runtime_error &excpt )
|
||||
catch (runtime_error& excpt)
|
||||
{
|
||||
m_vErrorPolicy.push_back( *iter );
|
||||
m_vErrorPolicy.push_back(*iter);
|
||||
|
||||
QString strInfo = QString::fromLocal8Bit("保单") + QString::fromLocal8Bit( (*iter).strPolicySerial.c_str() ) + QString::fromLocal8Bit("保存错误!\n") +
|
||||
QString::fromLocal8Bit("错误信息:") + QString::fromLocal8Bit( excpt.what() );
|
||||
QString strInfo = QString::fromLocal8Bit("保单") + QString::fromLocal8Bit((*iter).strPolicySerial.c_str()) + QString::
|
||||
fromLocal8Bit("保存错误!\n") +
|
||||
QString::fromLocal8Bit("错误信息:") + QString::fromLocal8Bit(excpt.what());
|
||||
|
||||
QMessageBox::critical( this, QString::fromLocal8Bit("保存错误"), strInfo );
|
||||
QMessageBox::critical(this, QString::fromLocal8Bit("保存错误"), strInfo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,20 +206,20 @@ void QRapidInputWidget::onCleanTable()
|
||||
|
||||
void QRapidInputWidget::onOpenFile()
|
||||
{
|
||||
QSettings reg( "HKEY_CURRENT_USER\\Software\\TelsalePolicyInfoManager", QSettings::NativeFormat);
|
||||
QString strPath = reg.value( QString::fromLocal8Bit("打开地址") ).toString();
|
||||
QSettings reg("HKEY_CURRENT_USER\\Software\\TelsalePolicyInfoManager", QSettings::NativeFormat);
|
||||
QString strPath = reg.value(QString::fromLocal8Bit("打开地址")).toString();
|
||||
|
||||
QStringList listFileNames = QFileDialog::getOpenFileNames( this,
|
||||
QString::fromLocal8Bit("打开Excel文件"),
|
||||
strPath,
|
||||
QString::fromLocal8Bit("Excel文件 (*.xls *.xlsx)") );
|
||||
QStringList listFileNames = QFileDialog::getOpenFileNames(this,
|
||||
QString::fromLocal8Bit("打开Excel文件"),
|
||||
strPath,
|
||||
QString::fromLocal8Bit("Excel文件 (*.xls *.xlsx)"));
|
||||
|
||||
//记录一下打开的路径
|
||||
if ( listFileNames.size() > 0 )
|
||||
if (listFileNames.size() > 0)
|
||||
{
|
||||
strPath = listFileNames[0].left( listFileNames[0].lastIndexOf( QString::fromLocal8Bit("/") ) + 1 );
|
||||
strPath = listFileNames[0].left(listFileNames[0].lastIndexOf(QString::fromLocal8Bit("/")) + 1);
|
||||
|
||||
reg.setValue( QString::fromLocal8Bit("打开地址"), strPath );
|
||||
reg.setValue(QString::fromLocal8Bit("打开地址"), strPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -221,26 +227,31 @@ void QRapidInputWidget::onOpenFile()
|
||||
}
|
||||
|
||||
//正则表达式判断文件类型
|
||||
QRegularExpression regXlsx( QString::fromLocal8Bit(".xlsx$"), QRegularExpression::PatternOption::CaseInsensitiveOption );
|
||||
QRegularExpression regXls( QString::fromLocal8Bit(".xls$"), QRegularExpression::PatternOption::CaseInsensitiveOption );
|
||||
QRegularExpression regXlsx(QString::fromLocal8Bit(".xlsx$"),
|
||||
QRegularExpression::PatternOption::CaseInsensitiveOption);
|
||||
QRegularExpression regXls(QString::fromLocal8Bit(".xls$"),
|
||||
QRegularExpression::PatternOption::CaseInsensitiveOption);
|
||||
QRegularExpressionMatch match;
|
||||
|
||||
strPath = listFileNames[0];
|
||||
|
||||
//是xlsx文件
|
||||
match = regXlsx.match( strPath );
|
||||
match = regXlsx.match(strPath);
|
||||
|
||||
if ( match.hasMatch() )
|
||||
if (match.hasMatch())
|
||||
{
|
||||
readTelsaleXlsFile( strPath.toLocal8Bit().data(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked(), true );
|
||||
readTelsaleXlsxFile(strPath.toStdWString(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked());
|
||||
}
|
||||
|
||||
//是xls文件
|
||||
match = regXls.match( strPath );
|
||||
match = regXls.match(strPath);
|
||||
|
||||
if ( match.hasMatch() )
|
||||
if (match.hasMatch())
|
||||
{
|
||||
readTelsaleXlsFile( strPath.toLocal8Bit().data(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked(), false );
|
||||
//readTelsaleXlsFile( strPath.toLocal8Bit().data(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked(), false );
|
||||
QMessageBox::critical(this,
|
||||
QString::fromLocal8Bit("文件类型错误!"),
|
||||
QString::fromLocal8Bit("文件格式需为Excel 2007及以后!"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define QRAPIDINPUTWIDGET_H
|
||||
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <QWidget>
|
||||
//#include <QWidget>
|
||||
#include <vector>
|
||||
#include "ui_QRapidInputWidget.h"
|
||||
#include "DataManipulation.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define QTELSALEPOLICYINFOINPUTWIDGET_H
|
||||
|
||||
#include <vector>
|
||||
#include <QWidget>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include "DataManipulation.h"
|
||||
#include "ui_QTelSalePolicyInfoInputWidget.h"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define QTELSALEPOLICYINFOQUERY_H
|
||||
|
||||
#include <vector>
|
||||
#include <QWidget>
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include "DataManipulation.h"
|
||||
#include "ui_QTelSalePolicyInfoQuery.h"
|
||||
|
||||
|
@ -42,7 +42,7 @@ wstring StringCodeConverter::mbs2unicode( const string &cstrSource )
|
||||
|
||||
if ( iConvertedCount == -1 )
|
||||
{
|
||||
delete [] pwszBuffer;
|
||||
delete [] pwszBuffer;
|
||||
throw string( "mbs2unicode参数有非中英文字符" );
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#ifndef SystemData_h__
|
||||
#define SystemData_h__
|
||||
|
||||
#include <hash_map>
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
#include "Parameters.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace std;
|
||||
using namespace StringCodeConverter;
|
||||
|
||||
#ifndef _UNICODE
|
||||
@ -51,11 +51,11 @@ void CTelSalePolicyManager::Query( SPolicyQuery &policy, std::vector<SPolicyReco
|
||||
SACommand command;
|
||||
|
||||
|
||||
//生成查询字符串
|
||||
//生成查询字符串
|
||||
string strCommand;
|
||||
|
||||
strCommand.reserve( 1024 );
|
||||
strCommand.append( "select bdh, zhjywy, to_char(czrq, '%Y年%m月%d日') from w_dxbd_i where 1=1 and czrq >='" );
|
||||
strCommand.append( "select bdh, zhjywy, to_char(czrq, '%Y年%m月%d日') from w_dxbd_i where 1=1 and czrq >='" );
|
||||
|
||||
strCommand += policy.strStartDate;
|
||||
strCommand += "' and czrq <= '";
|
||||
@ -239,18 +239,18 @@ void CTelSalePolicyManager::SavePolicy( const SPolicyRecord & policy,
|
||||
{
|
||||
if ( policy.strPolicySerial.empty() == true )
|
||||
{
|
||||
throw invalid_argument( "保单号为空!" );
|
||||
throw invalid_argument( "保单号为空!" );
|
||||
}
|
||||
|
||||
if ( policy.strSalerCode.empty() == true )
|
||||
{
|
||||
throw invalid_argument( "保单号为空!" );
|
||||
throw invalid_argument( "保单号为空!" );
|
||||
}
|
||||
|
||||
ostringstream ostrCommand;
|
||||
string strAutotraderCall;
|
||||
|
||||
//车店联呼
|
||||
//车店联呼
|
||||
if ( policy.bIsAutotraderCall == true )
|
||||
{
|
||||
strAutotraderCall = "1";
|
||||
@ -324,12 +324,12 @@ void CTelSalePolicyManager::SavePolicy( const SPolicyRecord & policy,
|
||||
g_cszUserNameYwgl,
|
||||
g_cszPasswordYwgl,
|
||||
SA_Informix_Client );
|
||||
//conn.setAutoCommit( SA_AutoCommitOff ); //导致锁表
|
||||
//conn.setAutoCommit( SA_AutoCommitOff ); //导致锁表
|
||||
|
||||
//保存保单
|
||||
//保存保单
|
||||
command.Execute();
|
||||
|
||||
//保存礼品列表,先删除旧数据
|
||||
//保存礼品列表,先删除旧数据
|
||||
command.setCommandText( "delete w_dxbd_gift_i where bdh = :1 " );
|
||||
command.Param( 1 ).setAsString() = policy.strPolicySerial.c_str();
|
||||
command.Execute();
|
||||
@ -427,7 +427,7 @@ void CTelSalePolicyManager::SavePolicyGift( const string & strPolicyNo, const ve
|
||||
|
||||
if ( giftsList.empty() )
|
||||
{
|
||||
throw invalid_argument( "礼品列表为空!" );
|
||||
throw invalid_argument( "礼品列表为空!" );
|
||||
}
|
||||
|
||||
SAConnection conn;
|
||||
@ -478,12 +478,12 @@ string getCellString( ISheetT<wchar_t> *pSheet, int iRowIndex, int iColIndex )
|
||||
switch ( celltype )
|
||||
{
|
||||
case CELLTYPE_STRING:
|
||||
//字符串
|
||||
//字符串
|
||||
strCell = unicode2mbs( pSheet->readStr( iRowIndex, iColIndex ) );
|
||||
break;
|
||||
|
||||
case CELLTYPE_NUMBER:
|
||||
//数字
|
||||
//数字
|
||||
iCellValue = pSheet->readNum( iRowIndex, iColIndex );
|
||||
|
||||
sprintf( pszNumber,"%d", iCellValue );
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
#include "check.h"
|
||||
|
||||
hash_map<string, string> parameters; //存放参数的hashmap
|
||||
unordered_map<string, string> parameters; //存放参数的hashmap
|
||||
|
||||
//版本号
|
||||
const string cstrVersion = "0.99";
|
||||
@ -13,7 +13,7 @@ string strUserPassword;
|
||||
bool checkVersion()
|
||||
{
|
||||
bool result = false;
|
||||
hash_map<string,string>::iterator iter = parameters.find( string("版本号") );
|
||||
unordered_map<string,string>::iterator iter = parameters.find( string("版本号") );
|
||||
|
||||
if ( iter != parameters.end() && iter->second == cstrVersion )
|
||||
{
|
||||
|
@ -2,12 +2,12 @@
|
||||
#ifndef check_h__
|
||||
#define check_h__
|
||||
|
||||
#include <hash_map>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
using namespace std;
|
||||
|
||||
extern hash_map<string, string> parameters;
|
||||
extern unordered_map<string, string> parameters;
|
||||
|
||||
bool checkVersion();
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//#include <QTextCodec>
|
||||
#include <QString>
|
||||
|
||||
#include <QtWidgets/QtWidgets>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <exception>
|
||||
|
Loading…
x
Reference in New Issue
Block a user