diff --git a/.gitignore b/.gitignore index 871ec0f..29bb775 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ -#.idea/ +.idea/workspace.xml +out/ +dataSources/ .vs/ out/ ipch/ diff --git a/代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit.sln b/代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit.sln similarity index 100% rename from 代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit.sln rename to 代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit.sln diff --git a/代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/config.db b/代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/config.db similarity index 100% rename from 代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/config.db rename to 代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/config.db diff --git a/代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.ico b/代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.ico similarity index 100% rename from 代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.ico rename to 代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.ico diff --git a/代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj b/代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj similarity index 99% rename from 代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj rename to 代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj index 102aae6..7cee004 100644 --- a/代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj +++ b/代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj @@ -185,6 +185,7 @@ + diff --git a/代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj.filters b/代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj.filters similarity index 100% rename from 代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj.filters rename to 代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj.filters diff --git a/代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj.user b/代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj.user similarity index 100% rename from 代码/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj.user rename to 代码/cpp/telsale_aux_kit/proj/vs2017/telsale_aux_kit/telsale_aux_kit.vcxproj.user diff --git a/代码/telsale_aux_kit/source/DataManipulation.cpp b/代码/cpp/telsale_aux_kit/source/DataManipulation.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/DataManipulation.cpp rename to 代码/cpp/telsale_aux_kit/source/DataManipulation.cpp diff --git a/代码/telsale_aux_kit/source/DataManipulation.h b/代码/cpp/telsale_aux_kit/source/DataManipulation.h similarity index 100% rename from 代码/telsale_aux_kit/source/DataManipulation.h rename to 代码/cpp/telsale_aux_kit/source/DataManipulation.h diff --git a/代码/telsale_aux_kit/source/Parameters.cpp b/代码/cpp/telsale_aux_kit/source/Parameters.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/Parameters.cpp rename to 代码/cpp/telsale_aux_kit/source/Parameters.cpp diff --git a/代码/telsale_aux_kit/source/Parameters.h b/代码/cpp/telsale_aux_kit/source/Parameters.h similarity index 100% rename from 代码/telsale_aux_kit/source/Parameters.h rename to 代码/cpp/telsale_aux_kit/source/Parameters.h diff --git a/代码/telsale_aux_kit/source/QConfigurationWidget.cpp b/代码/cpp/telsale_aux_kit/source/QConfigurationWidget.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/QConfigurationWidget.cpp rename to 代码/cpp/telsale_aux_kit/source/QConfigurationWidget.cpp diff --git a/代码/telsale_aux_kit/source/QConfigurationWidget.h b/代码/cpp/telsale_aux_kit/source/QConfigurationWidget.h similarity index 100% rename from 代码/telsale_aux_kit/source/QConfigurationWidget.h rename to 代码/cpp/telsale_aux_kit/source/QConfigurationWidget.h diff --git a/代码/telsale_aux_kit/source/QConfigurationWidget.ui b/代码/cpp/telsale_aux_kit/source/QConfigurationWidget.ui similarity index 100% rename from 代码/telsale_aux_kit/source/QConfigurationWidget.ui rename to 代码/cpp/telsale_aux_kit/source/QConfigurationWidget.ui diff --git a/代码/telsale_aux_kit/source/QLoginWidget.cpp b/代码/cpp/telsale_aux_kit/source/QLoginWidget.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/QLoginWidget.cpp rename to 代码/cpp/telsale_aux_kit/source/QLoginWidget.cpp diff --git a/代码/telsale_aux_kit/source/QLoginWidget.h b/代码/cpp/telsale_aux_kit/source/QLoginWidget.h similarity index 100% rename from 代码/telsale_aux_kit/source/QLoginWidget.h rename to 代码/cpp/telsale_aux_kit/source/QLoginWidget.h diff --git a/代码/telsale_aux_kit/source/QLoginWidget.ui b/代码/cpp/telsale_aux_kit/source/QLoginWidget.ui similarity index 100% rename from 代码/telsale_aux_kit/source/QLoginWidget.ui rename to 代码/cpp/telsale_aux_kit/source/QLoginWidget.ui diff --git a/代码/telsale_aux_kit/source/QMainFrame.cpp b/代码/cpp/telsale_aux_kit/source/QMainFrame.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/QMainFrame.cpp rename to 代码/cpp/telsale_aux_kit/source/QMainFrame.cpp diff --git a/代码/telsale_aux_kit/source/QMainFrame.h b/代码/cpp/telsale_aux_kit/source/QMainFrame.h similarity index 100% rename from 代码/telsale_aux_kit/source/QMainFrame.h rename to 代码/cpp/telsale_aux_kit/source/QMainFrame.h diff --git a/代码/telsale_aux_kit/source/QMainFrame.ui b/代码/cpp/telsale_aux_kit/source/QMainFrame.ui similarity index 100% rename from 代码/telsale_aux_kit/source/QMainFrame.ui rename to 代码/cpp/telsale_aux_kit/source/QMainFrame.ui diff --git a/代码/telsale_aux_kit/source/QMainWidget.cpp b/代码/cpp/telsale_aux_kit/source/QMainWidget.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/QMainWidget.cpp rename to 代码/cpp/telsale_aux_kit/source/QMainWidget.cpp diff --git a/代码/telsale_aux_kit/source/QMainWidget.h b/代码/cpp/telsale_aux_kit/source/QMainWidget.h similarity index 100% rename from 代码/telsale_aux_kit/source/QMainWidget.h rename to 代码/cpp/telsale_aux_kit/source/QMainWidget.h diff --git a/代码/telsale_aux_kit/source/QMainWidget.ui b/代码/cpp/telsale_aux_kit/source/QMainWidget.ui similarity index 100% rename from 代码/telsale_aux_kit/source/QMainWidget.ui rename to 代码/cpp/telsale_aux_kit/source/QMainWidget.ui diff --git a/代码/telsale_aux_kit/source/QMyStackedWidget.cpp b/代码/cpp/telsale_aux_kit/source/QMyStackedWidget.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/QMyStackedWidget.cpp rename to 代码/cpp/telsale_aux_kit/source/QMyStackedWidget.cpp diff --git a/代码/telsale_aux_kit/source/QMyStackedWidget.h b/代码/cpp/telsale_aux_kit/source/QMyStackedWidget.h similarity index 100% rename from 代码/telsale_aux_kit/source/QMyStackedWidget.h rename to 代码/cpp/telsale_aux_kit/source/QMyStackedWidget.h diff --git a/代码/telsale_aux_kit/source/QRapidInputWidget.cpp b/代码/cpp/telsale_aux_kit/source/QRapidInputWidget.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/QRapidInputWidget.cpp rename to 代码/cpp/telsale_aux_kit/source/QRapidInputWidget.cpp diff --git a/代码/telsale_aux_kit/source/QRapidInputWidget.h b/代码/cpp/telsale_aux_kit/source/QRapidInputWidget.h similarity index 100% rename from 代码/telsale_aux_kit/source/QRapidInputWidget.h rename to 代码/cpp/telsale_aux_kit/source/QRapidInputWidget.h diff --git a/代码/telsale_aux_kit/source/QRapidInputWidget.ui b/代码/cpp/telsale_aux_kit/source/QRapidInputWidget.ui similarity index 100% rename from 代码/telsale_aux_kit/source/QRapidInputWidget.ui rename to 代码/cpp/telsale_aux_kit/source/QRapidInputWidget.ui diff --git a/代码/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.cpp b/代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.cpp rename to 代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.cpp diff --git a/代码/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.h b/代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.h similarity index 100% rename from 代码/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.h rename to 代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.h diff --git a/代码/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.ui b/代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.ui similarity index 100% rename from 代码/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.ui rename to 代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoInputWidget.ui diff --git a/代码/telsale_aux_kit/source/QTelSalePolicyInfoQuery.cpp b/代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoQuery.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/QTelSalePolicyInfoQuery.cpp rename to 代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoQuery.cpp diff --git a/代码/telsale_aux_kit/source/QTelSalePolicyInfoQuery.h b/代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoQuery.h similarity index 100% rename from 代码/telsale_aux_kit/source/QTelSalePolicyInfoQuery.h rename to 代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoQuery.h diff --git a/代码/telsale_aux_kit/source/QTelSalePolicyInfoQuery.ui b/代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoQuery.ui similarity index 100% rename from 代码/telsale_aux_kit/source/QTelSalePolicyInfoQuery.ui rename to 代码/cpp/telsale_aux_kit/source/QTelSalePolicyInfoQuery.ui diff --git a/代码/telsale_aux_kit/source/Resources/20121016085311441_easyicon_cn_128.png b/代码/cpp/telsale_aux_kit/source/Resources/20121016085311441_easyicon_cn_128.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/20121016085311441_easyicon_cn_128.png rename to 代码/cpp/telsale_aux_kit/source/Resources/20121016085311441_easyicon_cn_128.png diff --git a/代码/telsale_aux_kit/source/Resources/8218_box1.png b/代码/cpp/telsale_aux_kit/source/Resources/8218_box1.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/8218_box1.png rename to 代码/cpp/telsale_aux_kit/source/Resources/8218_box1.png diff --git a/代码/telsale_aux_kit/source/Resources/CNY_Red.png b/代码/cpp/telsale_aux_kit/source/Resources/CNY_Red.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/CNY_Red.png rename to 代码/cpp/telsale_aux_kit/source/Resources/CNY_Red.png diff --git a/代码/telsale_aux_kit/source/Resources/CPIC.png b/代码/cpp/telsale_aux_kit/source/Resources/CPIC.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/CPIC.png rename to 代码/cpp/telsale_aux_kit/source/Resources/CPIC.png diff --git a/代码/telsale_aux_kit/source/Resources/app.ico b/代码/cpp/telsale_aux_kit/source/Resources/app.ico similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/app.ico rename to 代码/cpp/telsale_aux_kit/source/Resources/app.ico diff --git a/代码/telsale_aux_kit/source/Resources/car.png b/代码/cpp/telsale_aux_kit/source/Resources/car.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/car.png rename to 代码/cpp/telsale_aux_kit/source/Resources/car.png diff --git a/代码/telsale_aux_kit/source/Resources/car2.png b/代码/cpp/telsale_aux_kit/source/Resources/car2.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/car2.png rename to 代码/cpp/telsale_aux_kit/source/Resources/car2.png diff --git a/代码/telsale_aux_kit/source/Resources/cat.png b/代码/cpp/telsale_aux_kit/source/Resources/cat.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/cat.png rename to 代码/cpp/telsale_aux_kit/source/Resources/cat.png diff --git a/代码/telsale_aux_kit/source/Resources/clean.png b/代码/cpp/telsale_aux_kit/source/Resources/clean.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/clean.png rename to 代码/cpp/telsale_aux_kit/source/Resources/clean.png diff --git a/代码/telsale_aux_kit/source/Resources/dec.png b/代码/cpp/telsale_aux_kit/source/Resources/dec.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/dec.png rename to 代码/cpp/telsale_aux_kit/source/Resources/dec.png diff --git a/代码/telsale_aux_kit/source/Resources/edit.png b/代码/cpp/telsale_aux_kit/source/Resources/edit.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/edit.png rename to 代码/cpp/telsale_aux_kit/source/Resources/edit.png diff --git a/代码/telsale_aux_kit/source/Resources/excel.png b/代码/cpp/telsale_aux_kit/source/Resources/excel.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/excel.png rename to 代码/cpp/telsale_aux_kit/source/Resources/excel.png diff --git a/代码/telsale_aux_kit/source/Resources/face.png b/代码/cpp/telsale_aux_kit/source/Resources/face.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/face.png rename to 代码/cpp/telsale_aux_kit/source/Resources/face.png diff --git a/代码/telsale_aux_kit/source/Resources/find.png b/代码/cpp/telsale_aux_kit/source/Resources/find.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/find.png rename to 代码/cpp/telsale_aux_kit/source/Resources/find.png diff --git a/代码/telsale_aux_kit/source/Resources/folder.png b/代码/cpp/telsale_aux_kit/source/Resources/folder.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/folder.png rename to 代码/cpp/telsale_aux_kit/source/Resources/folder.png diff --git a/代码/telsale_aux_kit/source/Resources/gear.png b/代码/cpp/telsale_aux_kit/source/Resources/gear.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/gear.png rename to 代码/cpp/telsale_aux_kit/source/Resources/gear.png diff --git a/代码/telsale_aux_kit/source/Resources/login.png b/代码/cpp/telsale_aux_kit/source/Resources/login.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/login.png rename to 代码/cpp/telsale_aux_kit/source/Resources/login.png diff --git a/代码/telsale_aux_kit/source/Resources/manager.png b/代码/cpp/telsale_aux_kit/source/Resources/manager.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/manager.png rename to 代码/cpp/telsale_aux_kit/source/Resources/manager.png diff --git a/代码/telsale_aux_kit/source/Resources/new.png b/代码/cpp/telsale_aux_kit/source/Resources/new.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/new.png rename to 代码/cpp/telsale_aux_kit/source/Resources/new.png diff --git a/代码/telsale_aux_kit/source/Resources/ok.png b/代码/cpp/telsale_aux_kit/source/Resources/ok.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/ok.png rename to 代码/cpp/telsale_aux_kit/source/Resources/ok.png diff --git a/代码/telsale_aux_kit/source/Resources/option.png b/代码/cpp/telsale_aux_kit/source/Resources/option.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/option.png rename to 代码/cpp/telsale_aux_kit/source/Resources/option.png diff --git a/代码/telsale_aux_kit/source/Resources/plus.png b/代码/cpp/telsale_aux_kit/source/Resources/plus.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/plus.png rename to 代码/cpp/telsale_aux_kit/source/Resources/plus.png diff --git a/代码/telsale_aux_kit/source/Resources/print.png b/代码/cpp/telsale_aux_kit/source/Resources/print.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/print.png rename to 代码/cpp/telsale_aux_kit/source/Resources/print.png diff --git a/代码/telsale_aux_kit/source/Resources/quit.png b/代码/cpp/telsale_aux_kit/source/Resources/quit.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/quit.png rename to 代码/cpp/telsale_aux_kit/source/Resources/quit.png diff --git a/代码/telsale_aux_kit/source/Resources/save.png b/代码/cpp/telsale_aux_kit/source/Resources/save.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/save.png rename to 代码/cpp/telsale_aux_kit/source/Resources/save.png diff --git a/代码/telsale_aux_kit/source/Resources/save2.png b/代码/cpp/telsale_aux_kit/source/Resources/save2.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/save2.png rename to 代码/cpp/telsale_aux_kit/source/Resources/save2.png diff --git a/代码/telsale_aux_kit/source/Resources/telephone.png b/代码/cpp/telsale_aux_kit/source/Resources/telephone.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/telephone.png rename to 代码/cpp/telsale_aux_kit/source/Resources/telephone.png diff --git a/代码/telsale_aux_kit/source/Resources/tongji.png b/代码/cpp/telsale_aux_kit/source/Resources/tongji.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/tongji.png rename to 代码/cpp/telsale_aux_kit/source/Resources/tongji.png diff --git a/代码/telsale_aux_kit/source/Resources/x.png b/代码/cpp/telsale_aux_kit/source/Resources/x.png similarity index 100% rename from 代码/telsale_aux_kit/source/Resources/x.png rename to 代码/cpp/telsale_aux_kit/source/Resources/x.png diff --git a/代码/telsale_aux_kit/source/StringCodeConverter.cpp b/代码/cpp/telsale_aux_kit/source/StringCodeConverter.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/StringCodeConverter.cpp rename to 代码/cpp/telsale_aux_kit/source/StringCodeConverter.cpp diff --git a/代码/telsale_aux_kit/source/StringCodeConverter.h b/代码/cpp/telsale_aux_kit/source/StringCodeConverter.h similarity index 100% rename from 代码/telsale_aux_kit/source/StringCodeConverter.h rename to 代码/cpp/telsale_aux_kit/source/StringCodeConverter.h diff --git a/代码/telsale_aux_kit/source/SystemData.cpp b/代码/cpp/telsale_aux_kit/source/SystemData.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/SystemData.cpp rename to 代码/cpp/telsale_aux_kit/source/SystemData.cpp diff --git a/代码/telsale_aux_kit/source/SystemData.h b/代码/cpp/telsale_aux_kit/source/SystemData.h similarity index 100% rename from 代码/telsale_aux_kit/source/SystemData.h rename to 代码/cpp/telsale_aux_kit/source/SystemData.h diff --git a/代码/telsale_aux_kit/source/SystemDataQuery.cpp b/代码/cpp/telsale_aux_kit/source/SystemDataQuery.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/SystemDataQuery.cpp rename to 代码/cpp/telsale_aux_kit/source/SystemDataQuery.cpp diff --git a/代码/telsale_aux_kit/source/SystemDataQuery.h b/代码/cpp/telsale_aux_kit/source/SystemDataQuery.h similarity index 100% rename from 代码/telsale_aux_kit/source/SystemDataQuery.h rename to 代码/cpp/telsale_aux_kit/source/SystemDataQuery.h diff --git a/代码/telsale_aux_kit/source/TelSaleAuxKit.ico b/代码/cpp/telsale_aux_kit/source/TelSaleAuxKit.ico similarity index 100% rename from 代码/telsale_aux_kit/source/TelSaleAuxKit.ico rename to 代码/cpp/telsale_aux_kit/source/TelSaleAuxKit.ico diff --git a/代码/telsale_aux_kit/source/TelSaleAuxKit.rc b/代码/cpp/telsale_aux_kit/source/TelSaleAuxKit.rc similarity index 100% rename from 代码/telsale_aux_kit/source/TelSaleAuxKit.rc rename to 代码/cpp/telsale_aux_kit/source/TelSaleAuxKit.rc diff --git a/代码/telsale_aux_kit/source/TelSalePolicyManager.cpp b/代码/cpp/telsale_aux_kit/source/TelSalePolicyManager.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/TelSalePolicyManager.cpp rename to 代码/cpp/telsale_aux_kit/source/TelSalePolicyManager.cpp diff --git a/代码/telsale_aux_kit/source/TelSalePolicyManager.h b/代码/cpp/telsale_aux_kit/source/TelSalePolicyManager.h similarity index 100% rename from 代码/telsale_aux_kit/source/TelSalePolicyManager.h rename to 代码/cpp/telsale_aux_kit/source/TelSalePolicyManager.h diff --git a/代码/telsale_aux_kit/source/check.cpp b/代码/cpp/telsale_aux_kit/source/check.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/check.cpp rename to 代码/cpp/telsale_aux_kit/source/check.cpp diff --git a/代码/telsale_aux_kit/source/check.h b/代码/cpp/telsale_aux_kit/source/check.h similarity index 100% rename from 代码/telsale_aux_kit/source/check.h rename to 代码/cpp/telsale_aux_kit/source/check.h diff --git a/代码/telsale_aux_kit/source/config.db b/代码/cpp/telsale_aux_kit/source/config.db similarity index 100% rename from 代码/telsale_aux_kit/source/config.db rename to 代码/cpp/telsale_aux_kit/source/config.db diff --git a/代码/telsale_aux_kit/source/libxl.props b/代码/cpp/telsale_aux_kit/source/libxl.props similarity index 100% rename from 代码/telsale_aux_kit/source/libxl.props rename to 代码/cpp/telsale_aux_kit/source/libxl.props diff --git a/代码/telsale_aux_kit/source/main.cpp b/代码/cpp/telsale_aux_kit/source/main.cpp similarity index 100% rename from 代码/telsale_aux_kit/source/main.cpp rename to 代码/cpp/telsale_aux_kit/source/main.cpp diff --git a/代码/telsale_aux_kit/source/resource.qrc b/代码/cpp/telsale_aux_kit/source/resource.qrc similarity index 100% rename from 代码/telsale_aux_kit/source/resource.qrc rename to 代码/cpp/telsale_aux_kit/source/resource.qrc diff --git a/代码/telsale_aux_kit/source/sql_api.props b/代码/cpp/telsale_aux_kit/source/sql_api.props similarity index 100% rename from 代码/telsale_aux_kit/source/sql_api.props rename to 代码/cpp/telsale_aux_kit/source/sql_api.props diff --git a/代码/telsale_aux_kit/source/sqlite/shell.c b/代码/cpp/telsale_aux_kit/source/sqlite/shell.c similarity index 100% rename from 代码/telsale_aux_kit/source/sqlite/shell.c rename to 代码/cpp/telsale_aux_kit/source/sqlite/shell.c diff --git a/代码/telsale_aux_kit/source/sqlite/sqlite3.c b/代码/cpp/telsale_aux_kit/source/sqlite/sqlite3.c similarity index 100% rename from 代码/telsale_aux_kit/source/sqlite/sqlite3.c rename to 代码/cpp/telsale_aux_kit/source/sqlite/sqlite3.c diff --git a/代码/telsale_aux_kit/source/sqlite/sqlite3.h b/代码/cpp/telsale_aux_kit/source/sqlite/sqlite3.h similarity index 100% rename from 代码/telsale_aux_kit/source/sqlite/sqlite3.h rename to 代码/cpp/telsale_aux_kit/source/sqlite/sqlite3.h diff --git a/代码/telsale_aux_kit/source/sqlite/sqlite3ext.h b/代码/cpp/telsale_aux_kit/source/sqlite/sqlite3ext.h similarity index 100% rename from 代码/telsale_aux_kit/source/sqlite/sqlite3ext.h rename to 代码/cpp/telsale_aux_kit/source/sqlite/sqlite3ext.h diff --git a/代码/jsp/.gitignore b/代码/jsp/.gitignore new file mode 100644 index 0000000..0054f52 --- /dev/null +++ b/代码/jsp/.gitignore @@ -0,0 +1,3 @@ +.idea/workspace.xml +out/ +dataSources/ diff --git a/代码/jsp/.idea/.name b/代码/jsp/.idea/.name new file mode 100644 index 0000000..dfb2e4d --- /dev/null +++ b/代码/jsp/.idea/.name @@ -0,0 +1 @@ +2018版电销管理系统 \ No newline at end of file diff --git a/代码/jsp/.idea/artifacts/2018_war_exploded.xml b/代码/jsp/.idea/artifacts/2018_war_exploded.xml new file mode 100644 index 0000000..08aff9c --- /dev/null +++ b/代码/jsp/.idea/artifacts/2018_war_exploded.xml @@ -0,0 +1,13 @@ + + + $PROJECT_DIR$/out/artifacts/2018_war_exploded + + + + + + + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/dataSources.local.xml b/代码/jsp/.idea/dataSources.local.xml new file mode 100644 index 0000000..7393ef9 --- /dev/null +++ b/代码/jsp/.idea/dataSources.local.xml @@ -0,0 +1,29 @@ + + + + + + $# + " + + + master_key + idst0 + *:IDST0 + *:IDST0,PUBLIC + *:IDST0,PUBLIC + + + + $# + " + + + master_key + telsale + *:TELSALE + *:PUBLIC,TELSALE + *:PUBLIC,TELSALE + + + \ No newline at end of file diff --git a/代码/jsp/.idea/dataSources.xml b/代码/jsp/.idea/dataSources.xml new file mode 100644 index 0000000..24c520a --- /dev/null +++ b/代码/jsp/.idea/dataSources.xml @@ -0,0 +1,20 @@ + + + + + oracle + true + false + oracle.jdbc.OracleDriver + jdbc:oracle:thin:@10.39.0.86:1521:xmcx1 + + + oracle + true + true + false + oracle.jdbc.OracleDriver + jdbc:oracle:thin:@ + + + \ No newline at end of file diff --git a/代码/jsp/.idea/inspectionProfiles/Project_Default.xml b/代码/jsp/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..e9844ba --- /dev/null +++ b/代码/jsp/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/kotlinc.xml b/代码/jsp/.idea/kotlinc.xml new file mode 100644 index 0000000..1c24f9a --- /dev/null +++ b/代码/jsp/.idea/kotlinc.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/libraries/annotations_api.xml b/代码/jsp/.idea/libraries/annotations_api.xml new file mode 100644 index 0000000..7b8e5ae --- /dev/null +++ b/代码/jsp/.idea/libraries/annotations_api.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/libraries/commons_codec_1_10.xml b/代码/jsp/.idea/libraries/commons_codec_1_10.xml new file mode 100644 index 0000000..b7f4a0c --- /dev/null +++ b/代码/jsp/.idea/libraries/commons_codec_1_10.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/libraries/jsp_api.xml b/代码/jsp/.idea/libraries/jsp_api.xml new file mode 100644 index 0000000..17341c9 --- /dev/null +++ b/代码/jsp/.idea/libraries/jsp_api.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/libraries/lib.xml b/代码/jsp/.idea/libraries/lib.xml new file mode 100644 index 0000000..b7ef0c0 --- /dev/null +++ b/代码/jsp/.idea/libraries/lib.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/libraries/poi_3_17.xml b/代码/jsp/.idea/libraries/poi_3_17.xml new file mode 100644 index 0000000..9d91e08 --- /dev/null +++ b/代码/jsp/.idea/libraries/poi_3_17.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/misc.xml b/代码/jsp/.idea/misc.xml new file mode 100644 index 0000000..925b1cc --- /dev/null +++ b/代码/jsp/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/modules.xml b/代码/jsp/.idea/modules.xml new file mode 100644 index 0000000..2f9d536 --- /dev/null +++ b/代码/jsp/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/uiDesigner.xml b/代码/jsp/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/代码/jsp/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/代码/jsp/.idea/vcs.xml b/代码/jsp/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/代码/jsp/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/代码/jsp/2018版电销转介绍管理系统.iml b/代码/jsp/2018版电销转介绍管理系统.iml new file mode 100644 index 0000000..0fb9ad6 --- /dev/null +++ b/代码/jsp/2018版电销转介绍管理系统.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/代码/jsp/src/com/cpic/telsale/DataImport/DataImport.java b/代码/jsp/src/com/cpic/telsale/DataImport/DataImport.java new file mode 100644 index 0000000..84ad985 --- /dev/null +++ b/代码/jsp/src/com/cpic/telsale/DataImport/DataImport.java @@ -0,0 +1,296 @@ +package com.cpic.telsale.DataImport; + +/** + * Created by Kane on 2017/3/28. + */ + +import java.io.*; +import java.sql.*; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; + +import org.apache.poi.hssf.*; +import org.apache.poi.hssf.usermodel.*; +import org.apache.poi.ss.usermodel.CellType; + +import com.cpic.util.staff.*; + +public class DataImport +{ + private DataImport() + { + } + + /** + * 读取xls表格插入数据,要么全部成功,要么全部失败。 + * @param fileName xls文件名 + * @param oracleURL oracle数据库URL + * @param oracleUserName oracle用户名 + * @param oraclePassword oracle密码 + * @param informixURL informix数据库URL + * @return + * @throws IOException + * @throws ClassNotFoundException + * @throws SQLException 数据库异常 + * @throws XlsFileFormatException xls文件格式错误异常 + */ + public static String importTelsalePolicyDataFromXlsx( String fileName, + String oracleURL, + String oracleUserName, + String oraclePassword, + String informixURL ) throws + IOException, + ClassNotFoundException, + SQLException, + XlsFileFormatException + { + String importResult = ""; + String importMessage = null; + int rowCount = 1; + int successCount = 0; + int failCount = 0; + + //excel相关 + FileInputStream xlsFileIn = null; + HSSFWorkbook xlsFile = null; + HSSFSheet sheet = null; + HSSFRow row = null; + + try + { + xlsFileIn = new FileInputStream( fileName ); + xlsFile = new HSSFWorkbook( xlsFileIn ); + sheet = xlsFile.getSheet( "Sheet1" ); + row = sheet.getRow( rowCount ); + } + catch( IOException error ) //有文件格式错误的可能。 + { + xlsFile.close(); + xlsFileIn.close(); + + throw new XlsFileFormatException( "文件格式错误,请检查是否xls格式文件。" ); + } + + //oracle相关 + Class.forName( "oracle.jdbc.driver.OracleDriver" ); + + Connection oracleConn = null; + PreparedStatement oracleStmt = null; + String oraSql = + "INSERT INTO telsale_oper_lst\n" + + " (policy_no,\n" + + " operator_code,\n" + + " operator_name,\n" + + " section_office_code,\n" + + " section_office_name,\n" + + " department_code,\n" + + " department_name,\n" + + " autotrader_code,\n" + + " insruant_name,\n" + + " plate_no,\n" + + " entry_staff_code,\n" + + " entry_date)\n" + + "VALUES\n" + + " (?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " '800',\n" + + " SYSDATE)"; + + oracleConn = DriverManager.getConnection( oracleURL, oracleUserName, oraclePassword ); + oracleConn.setAutoCommit( false );//关闭自动提交,整个表格要么全部成写入,要么全部失败。 + oracleStmt = oracleConn.prepareStatement( oraSql ); + + //informix相关 + Class.forName( "com.informix.jdbc.IfxDriver" ); + String ifxSql = + "INSERT INTO w_dxbd_i\n" + + " (bdh,\n" + + " zhjywy,\n" + + " zhjywymc,\n" + + " kshdm,\n" + + " kshmc,\n" + + " zhjywybm,\n" + + " zhjywybmm,\n" + + " chshdm,\n" + + " khmc,\n" + + " chph,\n" + + " khjl,\n" + + " khjllx,\n" + + " jjbj,\n" + + " czydm,\n" + + " czrq)\n" + + "VALUES\n" + + " (?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " ?,\n" + + " 0,\n" + + " 0,\n" + + " 1,\n" + + " '800',\n" + + " today)"; + Connection ifxConn = DriverManager.getConnection( informixURL ); + PreparedStatement ifxStmt = ifxConn.prepareStatement( ifxSql ); + + ifxConn.setAutoCommit( false );//关闭自动提交,整个表格要么全部成写入,要么全部失败。 + + //数据相关 + String policyNo = null; + String operatorCode = null; + StaffInfo staff = null; + boolean isSuccess = true; //标志位,用来指示在保存过程中是否出现错误。 + + while ( row != null ) + { + policyNo = row.getCell( 1 ).getStringCellValue().trim(); + operatorCode = getStringValueFromHSSFCell( row.getCell( 4 ) ); + + //判断一下是不是空的单元格 + if ( policyNo.length() == 0 || operatorCode.length() == 0 ) + { + importResult = importResult + "第" + rowCount + "行数据为空。
"; + + isSuccess = false; + } + else //不是空单元格,进行处理 + { + try + { + //取得经办人信息 + staff = new StaffInfo( operatorCode ); + + //写入oracle +// oracleStmt.setString( 1, policyNo ); +// oracleStmt.setString( 2, staff.getStaffCode() ); +// oracleStmt.setString( 3, staff.getStaffName() ); +// oracleStmt.setString( 4, staff.getSectionOfficeCode() ); +// oracleStmt.setString( 5, staff.getSectionOfficeName() ); +// oracleStmt.setString( 6, staff.getDepartmentCode() ); +// oracleStmt.setString( 7, staff.getDepartmentName() ); +// oracleStmt.setString( 8, getStringValueFromHSSFCell( row.getCell( 6 ) ) ); +// oracleStmt.setString( 9, getStringValueFromHSSFCell( row.getCell( 3 ) ) ); +// oracleStmt.setString( 10, getStringValueFromHSSFCell( row.getCell( 2 ) ) ); +// +// oracleStmt.execute(); + + //写入informix + ifxStmt.setString( 1, policyNo ); + ifxStmt.setString( 2, staff.getStaffCode() ); + ifxStmt.setString( 3, staff.getStaffName() ); + ifxStmt.setString( 4, staff.getSectionOfficeCode() ); + ifxStmt.setString( 5, staff.getSectionOfficeName() ); + ifxStmt.setString( 6, staff.getDepartmentCode() ); + ifxStmt.setString( 7, staff.getDepartmentName() ); + ifxStmt.setString( 8, getStringValueFromHSSFCell( row.getCell( 6 ) ) ); + ifxStmt.setString( 9, getStringValueFromHSSFCell( row.getCell( 3 ) ) ); + ifxStmt.setString( 10, getStringValueFromHSSFCell( row.getCell( 2 ) ) ); + + ifxStmt.execute(); + } + catch( StaffCodeNotExistException error ) + { + //经办人不存在 + importResult = importResult + "第" + rowCount + "行,保单号" + policyNo + ",经办人" + operatorCode + "不存在。
"; + + //标志位 + isSuccess = false; + } + catch( SQLException error ) + { + //写入错误 + importResult = importResult + "第" + rowCount + "行,保单号" + policyNo + ",数据库写入错误,错误信息:" + error.getMessage() + "。
"; + + //标志位 + isSuccess = false; + } + } + + rowCount++; + row = sheet.getRow( rowCount ); + } + + //判断标志位,如果为false,则说明在保存过程中出现了错误,放弃所有过程,进行回滚。 + if ( isSuccess == true ) + { + oracleConn.commit(); + ifxConn.commit(); + } + else + { + oracleConn.rollback(); + ifxConn.rollback(); + } + + //清理 + oracleConn.close(); + xlsFile.close(); + xlsFileIn.close(); + + //日志 + importMessage = "记录数量:" + (rowCount - 1) + + "
导入成功数量:" + successCount + + "
导入失败数量:" + failCount + + "
" + importResult; + + return importMessage; + } + + private static String getStringValueFromHSSFCell( HSSFCell cell ) + { + String value = null; + + switch ( cell.getCellType() ) + { + case HSSFCell.CELL_TYPE_NUMERIC: + { + //判断是不是整数 + double dValue = cell.getNumericCellValue(); + + if ( dValue == ( int )dValue ) + { + value = String.valueOf( ( int )dValue ); + } + else + { + value = String.valueOf( dValue ); + } + + break; + } + case HSSFCell.CELL_TYPE_STRING: + { + value = cell.getStringCellValue(); + break; + } + case HSSFCell.CELL_TYPE_BLANK: + { + value = ""; + break; + } + default: + { + value = ""; + break; + } + } + + return value; + } +} + + diff --git a/代码/jsp/src/com/cpic/telsale/DataImport/XlsFileFormatException.java b/代码/jsp/src/com/cpic/telsale/DataImport/XlsFileFormatException.java new file mode 100644 index 0000000..23daa9e --- /dev/null +++ b/代码/jsp/src/com/cpic/telsale/DataImport/XlsFileFormatException.java @@ -0,0 +1,16 @@ +package com.cpic.telsale.DataImport; + +/** + * Created by Kane on 2017/3/29. + */ + +/** + * 文件格式错误异常 + */ +public class XlsFileFormatException extends Exception +{ + public XlsFileFormatException( String message ) + { + super( message ); + } +} diff --git a/代码/jsp/src/com/cpic/telsale/SessionListener/SessionListener.java b/代码/jsp/src/com/cpic/telsale/SessionListener/SessionListener.java new file mode 100644 index 0000000..16d15d7 --- /dev/null +++ b/代码/jsp/src/com/cpic/telsale/SessionListener/SessionListener.java @@ -0,0 +1,70 @@ +package com.cpic.telsale.SessionListener; + +/** + * Created by Kane on 2017/3/27. + */ + + +import javax.servlet.ServletContext; +import javax.servlet.http.*; +import java.io.File; +import java.io.IOException; + +import com.cpic.util.FileTools; + + +public class SessionListener implements HttpSessionListener +{ + @Override + public void sessionCreated( HttpSessionEvent event ) + { + HttpSession session = event.getSession(); + ServletContext context = session.getServletContext(); + + String sessionID = session.getId(); + String tempPathRoot = context.getRealPath( context.getInitParameter( "临时文件根目录" ) ); + String sessionTempPath = tempPathRoot + "/" + sessionID; + + File tempDir = new File( sessionTempPath ); + + if ( !tempDir.exists() ) + { + if ( tempDir.mkdirs() == true ) + { + session.setAttribute( "临时文件根目录", sessionTempPath ); + } + else + { + session.removeAttribute( "临时文件根目录" ); + } + } + } + + @Override + public void sessionDestroyed( HttpSessionEvent event ) + { + String tempPath = ( String ) event.getSession().getAttribute( "临时文件根目录" ); + + if ( tempPath == null ) + { + return; + } + + File tempDir = new File( tempPath ); + + if ( !tempDir.exists() ) + { + return; + } + + //删掉临时目录 + try + { + FileTools.deleteDirectory( tempPath ); + } + catch( IOException error ) + { + event.getSession().getServletContext().log( "删除“临时文件根目录”出错!" ); + } + } +} diff --git a/代码/jsp/src/com/cpic/telsale/uploadData/uploadDataProcessor.java b/代码/jsp/src/com/cpic/telsale/uploadData/uploadDataProcessor.java new file mode 100644 index 0000000..6b01c35 --- /dev/null +++ b/代码/jsp/src/com/cpic/telsale/uploadData/uploadDataProcessor.java @@ -0,0 +1,142 @@ +package com.cpic.telsale.uploadData; + +/** + * Created by Kane on 2017/3/27. + */ + +import org.apache.commons.fileupload.*; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; + +import javax.servlet.*; +import javax.servlet.http.*; +import java.io.*; +import java.io.IOException; +import java.util.*; + +import com.cpic.telsale.DataImport.*; + +public class uploadDataProcessor extends HttpServlet +{ + private String tempPathRoot; //临时文件目录 + private String oracleURL; + private String oracleUserName; + private String oraclePassword; + private String informixURL; + + @Override + public void init( ServletConfig config ) throws ServletException + { + //获取参数 + //tempPathRoot = ( String )config.getServletContext().getAttribute( "临时文件根目录" ); + + //oracle + oracleURL = ( String )config.getServletContext().getInitParameter( "oracleURL" ); + oracleUserName = ( String )config.getServletContext().getInitParameter( "oracleUserName" ); + oraclePassword = ( String )config.getServletContext().getInitParameter( "oraclePassword" ); + + //informix + informixURL = ( String )config.getServletContext().getInitParameter( "informixURL" ); + } + + @Override + public void doPost( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException + { + tempPathRoot = ( String )request.getSession().getAttribute( "临时文件根目录" ); + String importMessage = null; + + try + { + DiskFileItemFactory factory = new DiskFileItemFactory(); + + factory.setRepository( new File( tempPathRoot ) ); + + ServletFileUpload upload = new ServletFileUpload( factory ); + + List uploadFiles = upload.parseRequest( request ); + Iterator iterFiles = uploadFiles.iterator(); + + while ( iterFiles.hasNext() ) + { + FileItem fileItem = ( FileItem )iterFiles.next(); + + if ( !fileItem.isFormField() ) + { + //保存上传的文件,返回文件完整路径。 + String upLoadedFileName = saveUploadedFile( fileItem ); + + importMessage = DataImport.importTelsalePolicyDataFromXlsx( upLoadedFileName, + oracleURL, + oracleUserName, + oraclePassword, + informixURL ); + } + } + } + catch( FileUploadException error ) + { + //文件上传有异常,包装一下重新抛出 + throw new ServletException( error.getMessage() ); + } + catch( XlsFileFormatException error ) + { + //文件格式异常 + importMessage = error.getMessage(); + } + catch( IOException error ) + { + //包装一下重新抛出 + throw new ServletException( error.getMessage() ); + } + catch( Exception error ) + { + throw new ServletException( error.getMessage() ); + } + finally + { + request.getSession().setAttribute( "保存日志", importMessage ); + } + + response.sendRedirect( "uploadPolicyData/uploadPolicyData.jsp" ); + } + + /** + * 保存上传文件 + * + * @param item + * @return + * @throws Exception + */ + private String saveUploadedFile( FileItem item ) throws Exception + { + String fileName = item.getName(); + + int fileNameIndex = 0; + long fileSize = item.getSize(); + + //文件路径中可能有使用\和/作为目录分隔符,要分别判断 + fileNameIndex = fileName.lastIndexOf( "\\" ); + + if ( fileNameIndex == 0 ) + { + fileNameIndex = fileName.lastIndexOf( "/" ); + } + + //把文件名从路径中提取出来 + fileName = fileName.substring( fileNameIndex + 1, fileName.length() ); + + if ( fileName.equals( "" ) && fileSize == 0 ) + { + throw new Exception( "上传文件错误!" ); + } + + //生成最终的路径 + fileName = tempPathRoot + "/" + String.valueOf( Calendar.getInstance().getTimeInMillis() ) + fileName; + + File uploadedFile = new File( fileName ); + + item.write( uploadedFile ); + + return fileName; + } +} diff --git a/代码/jsp/src/com/cpic/util/FileTools.java b/代码/jsp/src/com/cpic/util/FileTools.java new file mode 100644 index 0000000..1dbad9e --- /dev/null +++ b/代码/jsp/src/com/cpic/util/FileTools.java @@ -0,0 +1,44 @@ +package com.cpic.util; + +/** + * Created by Kane on 2017/3/27. + */ + +import java.io.File; +import java.io.IOException; + +public class FileTools +{ + private FileTools() {} + + public static void deleteDirectory( String path ) throws IOException + { + File dir = new File( path ); + + if ( !dir.exists() ) + { + return; + } + + //先删除子目录和文件 + File[] subFiles = dir.listFiles(); + int index = 0; + + while ( index < subFiles.length ) + { + if ( subFiles[index].isDirectory() ) + { + deleteDirectory( subFiles[index].getAbsolutePath() ); + } + + if ( !subFiles[index].delete() ) + { + throw new IOException( "目录" + subFiles[index].getAbsolutePath() + "无法删除!" ); + } + + index++; + } + + dir.delete(); + } +} diff --git a/代码/jsp/src/com/cpic/util/staff/StaffCodeNotExistException.java b/代码/jsp/src/com/cpic/util/staff/StaffCodeNotExistException.java new file mode 100644 index 0000000..188936c --- /dev/null +++ b/代码/jsp/src/com/cpic/util/staff/StaffCodeNotExistException.java @@ -0,0 +1,12 @@ +package com.cpic.util.staff; + +/** + * Created by Kane on 2017/3/28. + */ +public class StaffCodeNotExistException extends Exception +{ + StaffCodeNotExistException( String message ) + { + super( message ); + } +} diff --git a/代码/jsp/src/com/cpic/util/staff/StaffInfo.java b/代码/jsp/src/com/cpic/util/staff/StaffInfo.java new file mode 100644 index 0000000..37dddf5 --- /dev/null +++ b/代码/jsp/src/com/cpic/util/staff/StaffInfo.java @@ -0,0 +1,107 @@ +package com.cpic.util.staff; + +/** + * Created by Kane on 2017/3/28. + */ + +import java.io.*; +import java.sql.*; +import java.text.ParseException; + +public class StaffInfo +{ + private String staffCode; + private String staffName; + private String sectionOfficeCode; + private String sectionOfficeName; + private String departmentCode; + private String departmentName; + + public StaffInfo( String staffCode ) throws StaffCodeNotExistException, ClassNotFoundException + { + if ( staffCode.length() < 3 ) + { + throw new StaffCodeNotExistException( staffCode + "不存在。"); + } + + String oracleURL = "jdbc:oracle:thin:@10.39.0.86:1521:xmcx1"; + String oracleUserName = "idst0"; + String oraclePassword = "cpic123456"; + + this.staffCode = staffCode; + + Class.forName( "oracle.jdbc.driver.OracleDriver" ); + + Connection conn = null; + PreparedStatement stmt = null; + ResultSet result = null; + + String sql = + "SELECT ry.staff_name,\n" + + " ksh.section_office_code,\n" + + " ksh.section_office_name,\n" + + " bm.department_code,\n" + + " bm.department_name\n" + + " FROM idst0.rydm_t ry,\n" + + " idst0.ks_t ksh,\n" + + " idst0.bm_t bm\n" + + " WHERE ry.staff_code = ?\n" + + " AND ry.department_code = bm.department_code\n" + + " AND ry.section_office_code = ksh.section_office_code"; + + try + { + conn = DriverManager.getConnection( oracleURL, oracleUserName, oraclePassword ); + stmt = conn.prepareStatement(sql); + stmt.setString( 1, staffCode ); + result = stmt.executeQuery(); + + if ( result.next() ) + { + staffName = result.getString( "staff_name" ); + sectionOfficeCode = result.getString( "section_office_code" ); + sectionOfficeName = result.getString( "section_office_name" ); + departmentCode = result.getString( "department_code" ); + departmentName = result.getString( "department_name" ); + } + + conn.close(); + } + catch ( SQLException error ) + { + //sql错误当做工号错误抛出 + throw new StaffCodeNotExistException( error.getMessage() ); + } + } + + public String getStaffCode() + { + return staffCode; + } + + public String getStaffName() + { + return staffName; + } + + public String getSectionOfficeCode() + { + return sectionOfficeCode; + } + + public String getSectionOfficeName() + { + return sectionOfficeName; + } + + public String getDepartmentCode() + { + return departmentCode; + } + + public String getDepartmentName() + { + return departmentName; + } +} + diff --git a/代码/jsp/web/WEB-INF/lib/commons-codec-1.10.jar b/代码/jsp/web/WEB-INF/lib/commons-codec-1.10.jar new file mode 100644 index 0000000..1d7417c Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/commons-codec-1.10.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/commons-collections4-4.1.jar b/代码/jsp/web/WEB-INF/lib/commons-collections4-4.1.jar new file mode 100644 index 0000000..43a9413 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/commons-collections4-4.1.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/commons-compress-1.12-javadoc.jar b/代码/jsp/web/WEB-INF/lib/commons-compress-1.12-javadoc.jar new file mode 100644 index 0000000..064ea73 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/commons-compress-1.12-javadoc.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/commons-compress-1.12.jar b/代码/jsp/web/WEB-INF/lib/commons-compress-1.12.jar new file mode 100644 index 0000000..4867705 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/commons-compress-1.12.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/commons-fileupload-1.3.2.jar b/代码/jsp/web/WEB-INF/lib/commons-fileupload-1.3.2.jar new file mode 100644 index 0000000..4975590 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/commons-fileupload-1.3.2.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/commons-io-2.5-javadoc.jar b/代码/jsp/web/WEB-INF/lib/commons-io-2.5-javadoc.jar new file mode 100644 index 0000000..b957529 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/commons-io-2.5-javadoc.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/commons-io-2.5.jar b/代码/jsp/web/WEB-INF/lib/commons-io-2.5.jar new file mode 100644 index 0000000..1234918 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/commons-io-2.5.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/commons-logging-1.2.jar b/代码/jsp/web/WEB-INF/lib/commons-logging-1.2.jar new file mode 100644 index 0000000..93a3b9f Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/commons-logging-1.2.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/ifxjdbc.jar b/代码/jsp/web/WEB-INF/lib/ifxjdbc.jar new file mode 100644 index 0000000..b6b00c5 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/ifxjdbc.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/junit-4.12.jar b/代码/jsp/web/WEB-INF/lib/junit-4.12.jar new file mode 100644 index 0000000..3a7fc26 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/junit-4.12.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/log4j-1.2.17.jar b/代码/jsp/web/WEB-INF/lib/log4j-1.2.17.jar new file mode 100644 index 0000000..1d425cf Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/log4j-1.2.17.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/ojdbc5.jar b/代码/jsp/web/WEB-INF/lib/ojdbc5.jar new file mode 100644 index 0000000..13d7feb Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/ojdbc5.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/ojdbc6.jar b/代码/jsp/web/WEB-INF/lib/ojdbc6.jar new file mode 100644 index 0000000..8240f40 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/ojdbc6.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/poi-3.15.jar b/代码/jsp/web/WEB-INF/lib/poi-3.15.jar new file mode 100644 index 0000000..ab368bd Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/poi-3.15.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/poi-excelant-3.15.jar b/代码/jsp/web/WEB-INF/lib/poi-excelant-3.15.jar new file mode 100644 index 0000000..65a5ad0 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/poi-excelant-3.15.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/poi-ooxml-3.15.jar b/代码/jsp/web/WEB-INF/lib/poi-ooxml-3.15.jar new file mode 100644 index 0000000..6de9956 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/poi-ooxml-3.15.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/poi-ooxml-schemas-3.15.jar b/代码/jsp/web/WEB-INF/lib/poi-ooxml-schemas-3.15.jar new file mode 100644 index 0000000..f3ed205 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/poi-ooxml-schemas-3.15.jar differ diff --git a/代码/jsp/web/WEB-INF/lib/poi-scratchpad-3.15.jar b/代码/jsp/web/WEB-INF/lib/poi-scratchpad-3.15.jar new file mode 100644 index 0000000..f68ae81 Binary files /dev/null and b/代码/jsp/web/WEB-INF/lib/poi-scratchpad-3.15.jar differ diff --git a/代码/jsp/web/WEB-INF/web.xml b/代码/jsp/web/WEB-INF/web.xml new file mode 100644 index 0000000..526cfd3 --- /dev/null +++ b/代码/jsp/web/WEB-INF/web.xml @@ -0,0 +1,50 @@ + + + + + + com.cpic.telsale.SessionListener.SessionListener + + + + + 10 + + + + + 临时文件根目录 + temporaryFiles + + + oracleURL + jdbc:oracle:thin:@10.39.0.86:1521:xmcx1 + + + oracleUserName + telsale + + + oraclePassword + cpic123456 + + + informixURL + jdbc:informix-sqli://10.39.0.92:16192/ywgl_xm:INFORMIXSERVER=xmcx2;newcodeset=GBK,8859-1,819;user=ccx99;password=c92IT09 + + + + + UploadDataProcessor + com.cpic.telsale.uploadData.uploadDataProcessor + + + + UploadDataProcessor + /upload-policy-data + + + \ No newline at end of file diff --git a/代码/jsp/web/image/telephone.png b/代码/jsp/web/image/telephone.png new file mode 100644 index 0000000..da0e53a Binary files /dev/null and b/代码/jsp/web/image/telephone.png differ diff --git a/代码/jsp/web/index.jsp b/代码/jsp/web/index.jsp new file mode 100644 index 0000000..c236b1c --- /dev/null +++ b/代码/jsp/web/index.jsp @@ -0,0 +1,20 @@ +<%-- + Created by IntelliJ IDEA. + User: Kane + Date: 2017/3/27 + Time: 15:07 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + $Title$ + + + +<% + response.sendRedirect( "uploadPolicyData/uploadPolicyData.jsp" ); + //session.getAttribute( "tst" ); +%> + + diff --git a/代码/jsp/web/uploadPolicyData/uploadPolicyData.css b/代码/jsp/web/uploadPolicyData/uploadPolicyData.css new file mode 100644 index 0000000..fc968eb --- /dev/null +++ b/代码/jsp/web/uploadPolicyData/uploadPolicyData.css @@ -0,0 +1,10 @@ + +#resultDiv +{ + border: 1px solid silver; + min-height: 600px; + max-height: 800px; + margin-left: 0px; + margin-right: 0px; + overflow-y:scroll +} \ No newline at end of file diff --git a/代码/jsp/web/uploadPolicyData/uploadPolicyData.jsp b/代码/jsp/web/uploadPolicyData/uploadPolicyData.jsp new file mode 100644 index 0000000..eeab53b --- /dev/null +++ b/代码/jsp/web/uploadPolicyData/uploadPolicyData.jsp @@ -0,0 +1,58 @@ +<%-- + Created by IntelliJ IDEA. + User: Kane + Date: 2017/3/27 + Time: 16:14 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=gb2312" language="java" %> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + ת嵥ϴ + + + + +

ת嵥ϴ

+
+
+ + + +
+ +<% + int uploadCount = 0; + int successedCount = 0; + int failCount = 0; + String resultText = "

־

"; + + Object result = session.getAttribute( "־" ); + + if ( result != null ) + { + //uploadCount = (int)session.getAttribute( "ϴ¼" ); + //successedCount = (int)session.getAttribute( "ɹ¼" ); + //failCount = (int)session.getAttribute( "ʧܼ¼" ); + resultText = (String)session.getAttribute( "־" ); + + %>
<% + } + else + { + %> +<% + session.removeAttribute( "־" ); +%> + + diff --git a/代码/oracle/建表/telsale_operator_list.sql b/代码/oracle/建表/telsale_operator_list.sql new file mode 100644 index 0000000..1f3081e --- /dev/null +++ b/代码/oracle/建表/telsale_operator_list.sql @@ -0,0 +1,46 @@ +-- Create table +create table TELSALE_OPERATOR_LIST +( + policy_no VARCHAR2(20), + operator_code VARCHAR2(6) not null, + operator_name VARCHAR2(100 CHAR) not null, + section_office_code VARCHAR2(6) not null, + section_office_name VARCHAR2(100 CHAR) not null, + department_code VARCHAR2(6), + department_name VARCHAR2(100 CHAR), + autotrader_code VARCHAR2(30), + insruant_name VARCHAR2(200 CHAR), + plate_no VARCHAR2(7 CHAR), + entry_staff_code VARCHAR2(6) not null, + entry_date DATE +) +tablespace TELSALE; + +-- Add comments to the table +comment on table TELSALE_OPERATOR_LIST + is 'תܱԱϵ'; +-- Add comments to the columns +comment on column TELSALE_OPERATOR_LIST.policy_no + is ''; +comment on column TELSALE_OPERATOR_LIST.operator_code + is '˴'; +comment on column TELSALE_OPERATOR_LIST.operator_name + is ''; +comment on column TELSALE_OPERATOR_LIST.section_office_code + is 'ڿҴ'; +comment on column TELSALE_OPERATOR_LIST.section_office_name + is 'ڿ'; +comment on column TELSALE_OPERATOR_LIST.department_code + is 'ڲŴ'; +comment on column TELSALE_OPERATOR_LIST.department_name + is 'ڲ'; +comment on column TELSALE_OPERATOR_LIST.autotrader_code + is '̴'; +comment on column TELSALE_OPERATOR_LIST.insruant_name + is ''; +comment on column TELSALE_OPERATOR_LIST.plate_no + is 'ƺ'; +comment on column TELSALE_OPERATOR_LIST.entry_staff_code + is '¼Ա'; +comment on column TELSALE_OPERATOR_LIST.entry_date + is '¼';