diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dd74d54 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +#.idea/ +.vs/ +x64/ +out/ +ipch/ +win32/ +win64/ +Debug/ +Release/ +GeneratedFiles/ +*.~sql +*.~pck +*.~* +*.pkg +*.suo +*.sdf +*.opensdf +*.db +*.obj +workspace.xml +Browse.VC.opendb \ No newline at end of file diff --git a/代码/python/车商渠道数据采集/RepairOrderScrap/RepairOrderScrap.py b/代码/python/车商渠道数据采集/RepairOrderScrap/RepairOrderScrap.py new file mode 100644 index 0000000..a886c1b --- /dev/null +++ b/代码/python/车商渠道数据采集/RepairOrderScrap/RepairOrderScrap.py @@ -0,0 +1,153 @@ + +#送返修数据采集 + +import time +from bs4 import BeautifulSoup +from urllib.error import HTTPError +from urllib.error import URLError +from selenium import webdriver +from selenium.webdriver.common.by import By +from selenium.webdriver.common.action_chains import ActionChains +from selenium.webdriver.remote.webelement import WebElement +from selenium.common.exceptions import StaleElementReferenceException +from selenium.common.exceptions import NoSuchElementException + +#常量 +SITE_LINK = 'http://10.190.48.74:8601/' +IMAGE_LINK = 'images/repairMissionQuery.png' +BUTTON_TEXT = '统计查询' +MENU_TEXT = '送返修工单查询' +SCRAP_TIME_INTERVAL = 10 #抓取的时间间隔 + +def WaitForLogin( wbDriver, tagID ): + waitCount = 0 + MaxCount = 100 + + while True: + #waitCount += 1 + + if waitCount > MaxCount: + print('骑上我的小摩托!!!!') + return + + #查找id,如果找到则继续循环,如果找不到说明页面跳转了 + try: + element = wbDriver.find_element_by_id( tagID ) + print('等待用户登录!') + time.sleep(1) + except StaleElementReferenceException: + return + except NoSuchElementException: + return + +#打开driver,登录网页 +try: + wb_ie = webdriver.Ie(executable_path='D:/develop/sdk/python/Selenium/ie_driver/IEDriverServer.exe') + wb_ie.get('http://10.190.48.74:8601/login.jsp') +except: + print('打开driver和网页时出错!') + exit(-1) + +action = ActionChains(wb_ie) +bs = BeautifulSoup( wb_ie.page_source, 'html.parser') +names = bs.find_all("img", {'id':'captcha'}) + +#填写登录信息 +try: + captcha = wb_ie.find_element_by_id('captcha') + branchCode = wb_ie.find_element_by_id('branchCode') + userCode = wb_ie.find_element_by_id('userCode') + password = wb_ie.find_element_by_id('password') + + branchCode.send_keys('3080100') + userCode.send_keys('588') + password.send_keys('Kane@1982') +except NoSuchElementException: + print('获取登录页面元素失败!') + wb_ie.close() + exit(-1) + +try: + WaitForLogin( wb_ie, 'captcha') +except NoSuchElementException: + print('浏览器异常关闭!') + exit() + +#输出cookie +try: + cookies = wb_ie.get_cookies() + + cookie_dict = dict(cookies[0]) + + print( cookie_dict['name'] + '=' + cookie_dict['value'] ) +except: + wb_ie.close() + exit() + +try: + #点击统计查询 + element = wb_ie.find_element_by_xpath("//*[text()='统计查询']") + + action.move_to_element_with_offset(element, 1, 1 ).perform() + #time.sleep(1) + action.context_click(element).perform() + action.click(element) + action.perform() + + #点击送返修工单查询 + element = wb_ie.find_element_by_xpath("//*[text()='送返修工单查询']") + + action.move_to_element_with_offset(element, 1, 1 ).perform() + #time.sleep(1) + action.context_click(element).perform() + action.click(element) + action.perform() + + #time.sleep(1) + + #切换iframe tabset_workOrderQuery + wb_ie.switch_to.frame('tabset_workOrderQuery') + + #按钮 + queryButton = wb_ie.find_element_by_xpath("//*[text()='查询']") + + #日期元素 + startDateElement = wb_ie.find_element_by_id('createStartDate') + endDateElement = wb_ie.find_element_by_id('createEndDate') + + + #开始查询和抓取循环 + while True: + #填写起始日期和终止日期 + startDateElement.clear() + endDateElement.clear() + + startDateElement.send_keys('2019-11-10') + endDateElement.send_keys('2019-12-10') + + #查询 + action.move_to_element_with_offset( queryButton, 2, 2 ).perform() + action.click(queryButton).perform() + + #查询后等待一段时间 + #time.sleep(2) + +except NoSuchElementException: + print('查找不到元素') + exit(-1) +except: + print('页面读取错误') + exit(-1) +finally: + #wb_ie.close() + None + + + + +while True: + time.sleep(1) + print('已登录!!!') + + + diff --git a/代码/python/车商渠道数据采集/RepairOrderScrap/__init__.py b/代码/python/车商渠道数据采集/RepairOrderScrap/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/代码/python/车商渠道数据采集/RepairOrderScrap/__init__.py @@ -0,0 +1 @@ + diff --git a/代码/python/车商渠道数据采集/车商渠道数据采集.pyproj b/代码/python/车商渠道数据采集/车商渠道数据采集.pyproj new file mode 100644 index 0000000..0954cef --- /dev/null +++ b/代码/python/车商渠道数据采集/车商渠道数据采集.pyproj @@ -0,0 +1,47 @@ + + + Debug + 2.0 + 81f2541e-c96a-4c05-b3f5-643b25e708d5 + . + RepairOrderScrap\RepairOrderScrap.py + + + . + . + 车商渠道数据采集 + 车商渠道数据采集 + Global|PythonCore|3.8 + + + true + false + + + true + false + + + + + + + Code + + + Code + + + + + + + + + + + + + \ No newline at end of file diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统.sln b/代码/车商可视化数据管理系统/车商可视化数据管理系统.sln new file mode 100644 index 0000000..287023f --- /dev/null +++ b/代码/车商可视化数据管理系统/车商可视化数据管理系统.sln @@ -0,0 +1,67 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29519.181 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "车商可视化数据管理系统", "车商可视化数据管理系统\车商可视化数据管理系统.vcxproj", "{DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}" +EndProject +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "车商渠道数据采集", "..\python\车商渠道数据采集\车商渠道数据采集.pyproj", "{81F2541E-C96A-4C05-B3F5-643B25E708D5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|Any CPU.ActiveCfg = Debug|x86 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|ARM.ActiveCfg = Debug|ARM + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|ARM.Build.0 = Debug|ARM + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|ARM.Deploy.0 = Debug|ARM + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|ARM64.Build.0 = Debug|ARM64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|x64.ActiveCfg = Debug|x64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|x64.Build.0 = Debug|x64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|x64.Deploy.0 = Debug|x64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|x86.ActiveCfg = Debug|x86 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|x86.Build.0 = Debug|x86 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Debug|x86.Deploy.0 = Debug|x86 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|Any CPU.ActiveCfg = Release|x86 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|ARM.ActiveCfg = Release|ARM + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|ARM.Build.0 = Release|ARM + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|ARM.Deploy.0 = Release|ARM + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|ARM64.ActiveCfg = Release|ARM64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|ARM64.Build.0 = Release|ARM64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|ARM64.Deploy.0 = Release|ARM64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|x64.ActiveCfg = Release|x64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|x64.Build.0 = Release|x64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|x64.Deploy.0 = Release|x64 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|x86.ActiveCfg = Release|x86 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|x86.Build.0 = Release|x86 + {DFAB7824-DB3C-4114-AFE8-6DBD2892C07E}.Release|x86.Deploy.0 = Release|x86 + {81F2541E-C96A-4C05-B3F5-643B25E708D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81F2541E-C96A-4C05-B3F5-643B25E708D5}.Debug|ARM.ActiveCfg = Debug|Any CPU + {81F2541E-C96A-4C05-B3F5-643B25E708D5}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {81F2541E-C96A-4C05-B3F5-643B25E708D5}.Debug|x64.ActiveCfg = Debug|Any CPU + {81F2541E-C96A-4C05-B3F5-643B25E708D5}.Debug|x86.ActiveCfg = Debug|Any CPU + {81F2541E-C96A-4C05-B3F5-643B25E708D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81F2541E-C96A-4C05-B3F5-643B25E708D5}.Release|ARM.ActiveCfg = Release|Any CPU + {81F2541E-C96A-4C05-B3F5-643B25E708D5}.Release|ARM64.ActiveCfg = Release|Any CPU + {81F2541E-C96A-4C05-B3F5-643B25E708D5}.Release|x64.ActiveCfg = Release|Any CPU + {81F2541E-C96A-4C05-B3F5-643B25E708D5}.Release|x86.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {7E4BC0FE-85CA-48B9-B575-9487FEBCF24C} + EndGlobalSection +EndGlobal diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/main.cpp b/代码/车商可视化数据管理系统/车商可视化数据管理系统/main.cpp new file mode 100644 index 0000000..7e12c97 --- /dev/null +++ b/代码/车商可视化数据管理系统/车商可视化数据管理系统/main.cpp @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("hello from 车商可视化数据管理系统!\n"); + return 0; +} \ No newline at end of file diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/ArchOptions.gif b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/ArchOptions.gif new file mode 100644 index 0000000..1ac4891 Binary files /dev/null and b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/ArchOptions.gif differ diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/ChangeRemote.gif b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/ChangeRemote.gif new file mode 100644 index 0000000..0de4274 Binary files /dev/null and b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/ChangeRemote.gif differ diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/ManageConnections.gif b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/ManageConnections.gif new file mode 100644 index 0000000..be6ee98 Binary files /dev/null and b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/ManageConnections.gif differ diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/OutputTypes.gif b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/OutputTypes.gif new file mode 100644 index 0000000..41ccb08 Binary files /dev/null and b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/OutputTypes.gif differ diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/debuggerexport.png b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/debuggerexport.png new file mode 100644 index 0000000..6579d86 Binary files /dev/null and b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/debuggerexport.png differ diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/firstconnection.png b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/firstconnection.png new file mode 100644 index 0000000..71c3591 Binary files /dev/null and b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/firstconnection.png differ diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/linker.png b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/linker.png new file mode 100644 index 0000000..ec67688 Binary files /dev/null and b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/linker.png differ diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/postbuild.png b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/postbuild.png new file mode 100644 index 0000000..09a6a77 Binary files /dev/null and b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/images/postbuild.png differ diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/readme.html b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/readme.html new file mode 100644 index 0000000..212d238 --- /dev/null +++ b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/readme.html @@ -0,0 +1,77 @@ + + + + + + + + Getting Started + + + + +
+ + + + +
+ +
+ + + +
+
+

Setting up your project for Linux Development

+ +

With this workload you can author C++ code for Linux servers, desktops and devices. You can manage your connections to these machines from within VS. VS will automatically copy and remotely build your sources and can launch your application with the debugger. Our project system supports targeting specific architectures, including ARM.

+ + +

Connecting to Linux

+

Prerequisites

+

Today we only support building remotely on the Linux target machine. We are not limited by specific Linux distros but we do have dependencies on the presence of some tools. Specifically, we need openssh-server, g++, gdb and gdbserver. Use your favorite package manager to install them, e.g. on Debian based systems: sudo apt-get install openssh-server g++ gdb gdbserver

+ +

First connection

+

The first time you target a Linux machine you will be prompted for connection information. This is triggered by building the project.

+ + +

Adding and removing connections

+

To add a new connection, go to Tools > Options and search for Connection, Connection Manager will be under Cross Platform. From here you can add and remove connections.

+ + +

To change which connection a project is using go to the project properties general settings and update the Remote Build Machine option.

+ + +

Project Properties

+

All of the options necessary to control C++ compilation are exposed on the project properies pages. We'll cover a few specific to how things work for Linux. First under general settings, you will see the remote root is set to ~/projects/ by default and that we are setting the remote project directory to match our project name in that location.

+ + +

Looking at the General settings for the project, you can see how our output and intermediate directories were configured. Additionally, you’ll see that this project was configured as an application – thus our executable is under bin/x64/Debug/ as ConsoleApplication1.out. Notice that for configuration types we also support static and dynamic libraries.

+ +

Add additional library dependencies on the Linker > Input property page.

+ + +

You can pass additional pre launch commands to the debugger to do things like launch graphical apps on the remote linux machine.

+ + +

You can also send post build events to control remote behavior, as in this example that exports a gpio pin for use without requiring the executable run as super user.

+ + +
+
+
+ +

Resources

+ +

Check out the VC++ for Linux Development page where we will keep updates posted and provider more in depth details on usage.

+

Give us feedback

+

Use the send feedback function in Visual Studio or contact us directly at VC++ Linux Support

+
+
+
+ + diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/stylesheet.css b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/stylesheet.css new file mode 100644 index 0000000..eb851aa --- /dev/null +++ b/代码/车商可视化数据管理系统/车商可视化数据管理系统/readme/stylesheet.css @@ -0,0 +1,119 @@ +body { + margin: 0; + padding: 0; + border: 0; + color: #1E1E1E; + font-size: 13px; + font-family: "Segoe UI", Helvetica, Arial, sans-serif; + line-height: 1.45; + word-wrap: break-word; +} + +/* General & 'Reset' Stuff */ + + +.container { + width: 1100px; + margin: 0 auto; +} + +section { + display: block; + margin: 0; +} + +h1, h2, h3, h4, h5, h6 { + margin: 0; +} + +table, tr { + width: 1100px; + padding: 0px; + vertical-align: top; + } + +/* Header,
+ header - container + h1 - project name + h2 - project description +*/ + +#header { + color: #FFF; + background: #68217a; + position:relative; +} +h1, h2 { + font-family: "Segoe UI Light", "Segoe UI", Helvetica, Arial, sans-serif; + line-height: 1; + margin: 0 18px;; + padding: 0; +} +#header h1 { + font-size: 3.4em; + padding-top: 18px; + font-weight: normal; + margin-left: 15px; +} + +#header h2 { + font-size: 1.5em; + margin-top: 10px; + padding-bottom: 18px; + font-weight: normal; +} + +#main_content { + width: 100%; + display: flex; + flex-direction: row; +} + + +h1, h2, h3, h4, h5, h6 { + font-weight: bolder; +} + +#main_content h1 { + font-size: 1.8em; + margin-top: 34px; +} + + #main_content h1:first-child { + margin-top: 30px; + } + +#main_content h2 { + font-size: 1.8em; +} +p, ul { + margin: 11px 18px; +} + +#main_content a { + color: #06C; + text-decoration: none; +} +ul { + margin-top: 13px; + margin-left: 18px; + padding-left: 0; +} + ul li { + margin-left: 18px; + padding-left: 0; + } +#lpanel { + width: 870px; + float: left; +} +#rpanel ul { + list-style-type: none; +} + #rpanel ul li { + line-height: 1.8em; + } +#rpanel { + background: #e7e7e7; + width: 230px; +} diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/车商可视化数据管理系统.vcxproj b/代码/车商可视化数据管理系统/车商可视化数据管理系统/车商可视化数据管理系统.vcxproj new file mode 100644 index 0000000..e34a325 --- /dev/null +++ b/代码/车商可视化数据管理系统/车商可视化数据管理系统/车商可视化数据管理系统.vcxproj @@ -0,0 +1,85 @@ + + + + + Debug + ARM + + + Release + ARM + + + Debug + ARM64 + + + Release + ARM64 + + + Debug + x86 + + + Release + x86 + + + Debug + x64 + + + Release + x64 + + + + {dfab7824-db3c-4114-afe8-6dbd2892c07e} + Linux + 车商可视化数据管理系统 + 15.0 + Linux + 1.0 + Generic + {D51BCBC9-82E9-4017-911E-C93873C4EA2B} + + + + true + + + false + + + true + + + false + + + true + + + false + + + false + + + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/代码/车商可视化数据管理系统/车商可视化数据管理系统/车商可视化数据管理系统.vcxproj.user b/代码/车商可视化数据管理系统/车商可视化数据管理系统/车商可视化数据管理系统.vcxproj.user new file mode 100644 index 0000000..2b67bc9 --- /dev/null +++ b/代码/车商可视化数据管理系统/车商可视化数据管理系统/车商可视化数据管理系统.vcxproj.user @@ -0,0 +1,7 @@ + + + + LinuxDebugger + 0 + + \ No newline at end of file diff --git a/工具软件/selenium/WebDriver/IEDriverServer.exe b/工具软件/selenium/WebDriver/IEDriverServer.exe new file mode 100644 index 0000000..ef2c477 Binary files /dev/null and b/工具软件/selenium/WebDriver/IEDriverServer.exe differ