Compare commits

...

83 Commits
bxj ... master

Author SHA1 Message Date
puf7keiya e8b2cf9b0d Merge pull request '11' (#21) from LvYH_branch into master
2 years ago
吕一航 f2ee853fd9 v10
2 years ago
puf7keiya 42cb8530fe Merge pull request 'model' (#20) from 冯健铠 into master
2 years ago
吕一航 1cb0ab5e90 model
2 years ago
puf7keiya d45b163273 Merge pull request 'fzh' (#19) from fuzh_branch into master
2 years ago
吕一航 6c2059425d 11
2 years ago
puf7keiya 19d812d77a Merge pull request 'zyl' (#18) from zyl_branch into master
2 years ago
吕一航 f06e7223ec 11
2 years ago
puf7keiya cd8d23646b Merge pull request 'bxj' (#17) from bxj into master
2 years ago
puf7keiya 38e076e762 Merge pull request 'lyh' (#16) from LvYH_branch into master
2 years ago
吕一航 2b1955b68a 1
2 years ago
吕一航 d6addc344f 1
2 years ago
吕一航 61982e49e8 1
2 years ago
puf7keiya 0cb047beec Merge pull request 'fjk_branch' (#15) from 冯健铠 into master
2 years ago
233 90be77bb76 Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into 冯健铠
2 years ago
puf7keiya bd9c26a4c6 Merge pull request 'zyl_branch' (#14) from zyl_branch into master
2 years ago
233 f0c39fdf89 Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into zyl_branch
2 years ago
puf7keiya 39339539f9 Merge pull request 'fzh_branch' (#13) from fuzh_branch into master
2 years ago
233 d13c4d1309 Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into fuzh_branch
2 years ago
puf7keiya fdb98d20de Merge pull request 'bxj_branch' (#12) from bxj into master
2 years ago
233 d2b0239a5d Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into bxj
2 years ago
puf7keiya 57c8bd1bf6 Merge pull request 'lyh_branch' (#11) from LvYH_branch into master
2 years ago
233 5b42f80a80 Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into LvYH_branch
2 years ago
puf7keiya e943a123a8 Merge pull request 'cay_branch' (#10) from CAY into master
2 years ago
吕一航 1edcf80796 1
2 years ago
吕一航 2918f956c8 1
2 years ago
吕一航 04e0539e52 1
2 years ago
吕一航 13ce949dd9 1
2 years ago
吕一航 49ab16d4b0 1
2 years ago
吕一航 eb6d7106e3 1
2 years ago
吕一航 abef85bf7f Merge branch 'LvYH_branch' of https://bdgit.educoder.net/puf7keiya/aaaa into LvYH_branch
2 years ago
吕一航 101606c56c 1
2 years ago
吕一航 5662820a90 1
2 years ago
吕一航 cdb6452dc5 1
2 years ago
吕一航 cb5c402d04 11
2 years ago
吕一航 4b4615f806 11
2 years ago
吕一航 f6c7c9bd7a 1
2 years ago
吕一航 14d9809bdd Merge branch '冯健铠' of https://bdgit.educoder.net/puf7keiya/aaaa into 冯健铠
2 years ago
吕一航 4fc440c406 11
2 years ago
吕一航 16251d7774 11
2 years ago
puf7keiya 160856ad02 Merge pull request 'cay' (#9) from CAY into master
2 years ago
吕一航 e70dd5f95a 1
2 years ago
吕一航 8094d2f6e7 11
2 years ago
puf7keiya b4f989bc2f Merge pull request 'cay_model' (#7) from CAY into master
2 years ago
233 40dc7aa43c 11
2 years ago
233 724a02d991 Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into CAY
2 years ago
puf7keiya caf908a29e Merge pull request 'fjk_model' (#6) from 冯健铠 into master
2 years ago
puf7keiya 7840b47332 Merge pull request 'fzh_model' (#4) from fuzh_branch into master
2 years ago
puf7keiya 56c3ea0141 Merge pull request 'zyl_model' (#5) from zyl_branch into master
2 years ago
puf7keiya 7742106558 Merge pull request 'bxj_model' (#3) from bxj into master
2 years ago
puf7keiya 1634a1c89e Merge pull request 'lyhmodel' (#2) from LvYH_branch into master
2 years ago
233 213f7d660a Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into LvYH_branch
2 years ago
233 565d2e903a Merge branch '冯健铠' of https://bdgit.educoder.net/puf7keiya/aaaa into 冯健铠
2 years ago
233 71c275b7ff Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into 冯健铠
2 years ago
吕一航 2e4f147eff 1
2 years ago
吕一航 dc0913b69d Merge remote-tracking branch 'remotes/origin/master'
2 years ago
吕一航 b78084225f Merge branch 'CAY' of https://bdgit.educoder.net/puf7keiya/aaaa
2 years ago
吕一航 b66a8df698 Merge branch 'master' of https://bdgit.educoder.net/puf7keiya/aaaa into CAY
2 years ago
吕一航 44dc1fb4ba model
2 years ago
吕一航 c4c1a2465d model
2 years ago
吕一航 b38e6b8ef6 model
2 years ago
吕一航 44ff9a3ef4 model
2 years ago
吕一航 efdfe7bdcd model
2 years ago
吕一航 a0825500c9 model
2 years ago
ZhaoYL e2205e75ac 最终版
2 years ago
puf7keiya a9474b26d8 11
2 years ago
puf7keiya 16f3eb42c4 1
2 years ago
puf7keiya edf38ed2b4 111
2 years ago
吕一航 c2920bf6e6 11
2 years ago
吕一航 af76851904 11
2 years ago
fzh 57d9a5d6f0 sql1
2 years ago
fzh 17de406a58 出入校1
2 years ago
233 2b3cccbf61 2333
2 years ago
233 a63e91beff 23
2 years ago
puf7keiya 62a6b6e5a9 Add 冯健铠
2 years ago
白雪健 76e7f6ed5f 111.txt
2 years ago
白雪健 226a1d8525 1
2 years ago
吕一航 aaaa911d14 1
2 years ago
吕一航 8cce673df1 2
2 years ago
吕一航 8016019a64 11
2 years ago
pzfsnflvg 0eed6576e0 Add 1.txt
2 years ago
fzh a56e1427bd 1
2 years ago
fzh f85440fad0 1
2 years ago

@ -1 +0,0 @@
232323

@ -1,2 +1,17 @@
# aaaa # **常态化疫情下的大学生出入校管理系统**
## **系统介绍**
&emsp;&emsp;在常态化疫情防控的背景下,由于大学校园人口密度较大,为防止疫情传入学校造成聚集性传播,学校需对进出校人员进行科学合理的管理。目前针对学生、教职工及校外人员存在的出入校的需求,主要通过申请人提交申请,再由人工对健康码、核酸报告、行程码等信息进行核查。由于学校人口基数大,人工审核可能存在处理不及时、检查不准确等问题,且在当前高中低风险区的划分政策下,风险地区变化较快,人工查阅不一定及时。因此,为降低疫情传播入校的风险,对出入校管理效率和能力的提升成为目前各大学亟待解决的难题,有现实迫切的需求。`<br>`&emsp;&emsp;本软件专为提高疫情期间师生出入校申请、审批的效率而设计,它可以帮助用户(老师、学生)查看天津市本地的疫情状况,帮助用户提交出入校申请,帮助管理员进行自动审批申请表,并在发现异常时提交给管理员进行手动审批,还可以在用户进出学校的时候进行扫码操作变更自己的出入校状态,且能通过界面查看该状态。`<br>`&emsp;
## **配置环境**
前端界面:微信开发者平台 + wxml + wxss + JavaScript `<br>`
后端服务器Python 3.10 + flask框架 + jpype `<br>`
OCR模块Java 1.7以上 + maven + com.baidu.aip `<br>`
数据库SQL server 2019
## **备注**
前端使用微信小程序,该部分代码无法被质量分析软件识别。`<br>`
OCR部分封装成jar包后直接调用jar包部分也无法被质量分析软件识别已将源代码放入/src/client/OCR_baidu文件夹下。

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

@ -0,0 +1,17 @@
# **常态化疫情下的大学生出入校管理系统**
## **系统介绍**
&emsp;&emsp;在常态化疫情防控的背景下,由于大学校园人口密度较大,为防止疫情传入学校造成聚集性传播,学校需对进出校人员进行科学合理的管理。目前针对学生、教职工及校外人员存在的出入校的需求,主要通过申请人提交申请,再由人工对健康码、核酸报告、行程码等信息进行核查。由于学校人口基数大,人工审核可能存在处理不及时、检查不准确等问题,且在当前高中低风险区的划分政策下,风险地区变化较快,人工查阅不一定及时。因此,为降低疫情传播入校的风险,对出入校管理效率和能力的提升成为目前各大学亟待解决的难题,有现实迫切的需求。`<br>`&emsp;&emsp;本软件专为提高疫情期间师生出入校申请、审批的效率而设计,它可以帮助用户(老师、学生)查看天津市本地的疫情状况,帮助用户提交出入校申请,帮助管理员进行自动审批申请表,并在发现异常时提交给管理员进行手动审批,还可以在用户进出学校的时候进行扫码操作变更自己的出入校状态,且能通过界面查看该状态。`<br>`&emsp;
## **配置环境**
前端界面:微信开发者平台 + wxml + wxss + JavaScript `<br>`
后端服务器Python 3.10 + flask框架 + jpype `<br>`
OCR模块Java 1.7以上 + maven + com.baidu.aip `<br>`
数据库SQL server 2019
## **备注**
前端使用微信小程序,该部分代码无法被质量分析软件识别。`<br>`
OCR部分封装成jar包后直接调用jar包部分也无法被质量分析软件识别已将源代码放入/src/client/OCR_baidu文件夹下。

Binary file not shown.

@ -0,0 +1,3 @@
# 默认忽略的文件
/shelf/
/workspace.xml

@ -0,0 +1,12 @@
<component name="ArtifactManager">
<artifact type="jar" name="OCR_baidu:jar">
<output-path>$PROJECT_DIR$/out/artifacts/OCR_baidu_jar</output-path>
<root id="archive" name="OCR_baidu.jar">
<element id="module-output" name="OCR_baidu" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/json-20160810.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/slf4j-simple-1.7.25.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/aip-java-sdk-4.16.11.jar" path-in-jar="/" />
<element id="extracted-dir" path="$PROJECT_DIR$/lib/slf4j-api-1.7.25.jar" path-in-jar="/" />
</root>
</artifact>
</component>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
</annotationProcessing>
</component>
</project>

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="aip-java-sdk-4.16.11">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/aip-java-sdk-4.16.11.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -0,0 +1,11 @@
<component name="libraryTable">
<library name="json-20160810">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/json-20160810.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$PROJECT_DIR$/lib/json-20160810.jar!/" />
</SOURCES>
</library>
</component>

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="slf4j-api-1.7.25">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/slf4j-api-1.7.25.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -0,0 +1,9 @@
<component name="libraryTable">
<library name="slf4j-simple-1.7.25">
<CLASSES>
<root url="jar://$PROJECT_DIR$/lib/slf4j-simple-1.7.25.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CodeInsightWorkspaceSettings">
<option name="optimizeImportsOnTheFly" value="true" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/OCR_baidu.iml" filepath="$PROJECT_DIR$/OCR_baidu.iml" />
</modules>
</component>
</project>

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="df78773e-dd80-4766-8285-f044837e315a" name="变更" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../.." />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectId" id="2I8n2RJqDuEdA4rT9gP1o3Hi6sl" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true"
}
}]]></component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="默认任务">
<changelist id="df78773e-dd80-4766-8285-f044837e315a" name="变更" comment="" />
<created>1669571873455</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1669571873455</updated>
</task>
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
</project>

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: OCR

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="aip-java-sdk-4.16.11" level="project" />
<orderEntry type="library" name="json-20160810" level="project" />
<orderEntry type="library" name="slf4j-api-1.7.25" level="project" />
<orderEntry type="library" name="slf4j-simple-1.7.25" level="project" />
</component>
</module>

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: HealthCode

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: HealthCode

File diff suppressed because it is too large Load Diff

@ -0,0 +1,138 @@
import com.baidu.aip.ocr.AipOcr;
import org.json.JSONObject;
import java.util.HashMap;
public class CovidTestRep {
private String Name;
private String Time;
private String Status;
public CovidTestRep() {
Name = "";
Time = "";
Status = "";
}
public String getName() {
return Name;
}
public String getData() {
return Time;
}
public String getStatus() {
return Status;
}
public void setStatus(String status) {
Status = status;
}
public void setName(String name) {
Name = name;
}
public void setData(String data) {
Time = data;
}
public void Print() {
System.out.println("Name:" + this.Name);
System.out.println("Data:" + this.Time);
System.out.println("Status:" + this.Status);
}
public static void main(String[] args) {
String path = "C:/Users//16491/eclipse-workspace/OCR_baidu/src/3.jpg";// 初始化一个AipOcr
ocr3(path);
}
public static String Judge(String path) {
CovidTestRep Ctr=new CovidTestRep();
Ctr=ocr3(path);
String StatusNameTime=Ctr.Status+","+Ctr.Name+","+Ctr.Time;
return StatusNameTime;
}
public static CovidTestRep ocr3(String path) {
final String APP_ID = "28049220";
final String API_KEY = "qyKlUy6xSapA89DTPomExteq";
final String SECRET_KEY = "q5EYpXULVh5gC3firLU1nGaymwIwOMBd";
AipOcr client = new AipOcr(APP_ID, API_KEY, SECRET_KEY);
// 可选:设置网络连接参数
client.setConnectionTimeoutInMillis(2000);
client.setSocketTimeoutInMillis(10000);
// 可选:设置代理服务器地址, http和socket二选一或者均不设置
// client.setHttpProxy("proxy_host", proxy_port); // 设置http代理
// client.setSocketProxy("proxy_host", proxy_port); // 设置socket代理
// 可选设置log4j日志输出格式若不设置则使用默认配置
// 也可以直接通过jvm启动参数设置此环境变量
System.setProperty("aip.log4j.conf", "path/to/your/log4j.properties");
// 调用接口
JSONObject res = client.basicGeneral(path, new HashMap<String, String>());
/*Map<String,Object> m=res.toMap();
Set s=m.entrySet();*//*
for (Object str : s) {
System.out.println(str);
}
//System.out.println(s);*/
String str= res.toString(0);
/*for(int i=0;i<str.length();i++)
{char c=str.charAt(i);
System.out.println(i);
System.out.println(c);
}*/
//System.out.println(str);
String s="";
for(int i=0;i<str.length();i++){
char c=str.charAt(i);
if((c>='a'&&c<='z')||(c>='A'&&c<='Z')||c=='{'||c=='"'||c==':'||c=='}'||c==''||c=='_'){
continue;
}
else
s+=c;
if(c==']')break;
}
//System.out.println(s);
CovidTestRep CTR=new CovidTestRep();
for(int i=0;i<s.length();i++)
{
if(s.charAt(i)=='姓'&&s.charAt(i+1)=='名')
{
String Na= CTR.getName();
i=i+3;
for(;s.charAt(i)!=',';i++)
{
Na+=s.charAt(i);
}
CTR.setName(Na);
}
if(s.charAt(i)=='采'&&s.charAt(i+1)=='样'&&s.charAt(i+2)=='时'&&s.charAt(i+3)=='间')
{
String Da= CTR.getData();
i=i+5;
for(;s.charAt(i)!=',';i++)
{
Da+=s.charAt(i);
}
CTR.setData(Da);
}
if(s.charAt(i)=='检'&&s.charAt(i+1)=='测'&&s.charAt(i+2)=='结'&&s.charAt(i+3)=='果')
{
String St= CTR.getStatus();
i=i+5;
for(;s.charAt(i)!=']';i++)
{
St+=s.charAt(i);
}
CTR.setStatus(St);
}
}
return CTR;
}
}

@ -0,0 +1,129 @@
import com.baidu.aip.ocr.AipOcr;
import org.json.JSONObject;
import java.util.HashMap;
public class HealthCode {
private String Name;
private String Data;
private String Status;
public HealthCode() {
Name = "";
Data = "";
Status = "";
}
public String getName() {
return Name;
}
public String getData() {
return Data;
}
public String getStatus() {
return Status;
}
public void setStatus(String status) {
Status = status;
}
public void setName(String name) {
Name = name;
}
public void setData(String data) {
Data = data;
}
public void Print() {
System.out.println("Name:" + this.Name);
System.out.println("Data:" + this.Data);
System.out.println("Status:" + this.Status);
}
public static void main(String[] args) {
String path = "C:/Users//16491/eclipse-workspace/OCR_baidu/src/1.jpg";
System.out.println(Judge(path));
}
public static String Judge(String path) {
HealthCode H = new HealthCode();
H = ocr1(path);
String StatusNameData = "S"+H.Status + "," + H.Name + "," + H.Data+"E";
return StatusNameData;
}
/*class OCR {
//设置APPID/AK/SK
public OCR(){
}*/
public static HealthCode ocr1(String path) {
final String APP_ID = "28049220";
final String API_KEY = "qyKlUy6xSapA89DTPomExteq";
final String SECRET_KEY = "q5EYpXULVh5gC3firLU1nGaymwIwOMBd";
// 初始化一个AipOcr
AipOcr client = new AipOcr(APP_ID, API_KEY, SECRET_KEY);
// 可选:设置网络连接参数
client.setConnectionTimeoutInMillis(2000);
client.setSocketTimeoutInMillis(60000);
// 可选:设置代理服务器地址, http和socket二选一或者均不设置
// client.setHttpProxy("proxy_host", proxy_port); // 设置http代理
// client.setSocketProxy("proxy_host", proxy_port); // 设置socket代理
// 可选设置log4j日志输出格式若不设置则使用默认配置
// 也可以直接通过jvm启动参数设置此环境变量
System.setProperty("aip.log4j.conf", "path/to/your/log4j.properties");
// 调用接口
JSONObject res = client.basicGeneral(path, new HashMap<String, String>());
String str= res.toString(0);
int flag = 0;
int flag1 = 0;
int flag2 = 0;
HealthCode HC = new HealthCode();
for (int i = 16; i < str.length(); i++) {
char c = str.charAt(i);
if (c == '[' && flag == 0) {
flag = 1;
} else if (flag == 1 && c == ']') {
break;
} else {
if (i == 27) {
String N = HC.getName();
for (; str.charAt(i) != '\"'; i++) {
N = N + str.charAt(i);
}
HC.setName(N);
}
if (str.charAt(i) == '-' && flag1 == 0) {
flag1 = 1;
String D = HC.getData();
for (i = i - 4; str.charAt(i) != '\"'; i++) {
D = D + str.charAt(i);
}
HC.setData(D);
}
if (str.charAt(i) == '码' && flag2 == 0) {
flag2 = 1;
String S = HC.getStatus();
S = S + str.charAt(i - 1);
HC.setStatus(S);
}
}
}
return HC;
}
}

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: HealthCode

@ -0,0 +1,146 @@
import com.baidu.aip.ocr.AipOcr;
import org.json.JSONObject;
import java.util.HashMap;
public class TripCode {
private String Status;
private String Telephone;
private String Time;
private String District;
public TripCode() {
Status = "";
Telephone = "";
Time = "";
District = "";
}
public void setStatus(String status) {
Status = status;
}
public void setTelephone(String telephone) {
Telephone = telephone;
}
public void setTime(String time) {
Time = time;
}
public void setDistrict(String district) {
District = district;
}
public String getTelephone() {
return Telephone;
}
public String getStatus() {
return Status;
}
public String getDistrict() {
return District;
}
public String getTime() {
return Time;
}
public void Print() {
System.out.println("Status:" + this.Status);
System.out.println("Telephone:" + this.Telephone);
System.out.println("Time:" + this.Time);
System.out.println("District:" + this.District);
}
public static void main(String[] args) {
String path = "C:\\Users\\16491\\Desktop\\1.jpg";
System.out.println(Judge(path));
}
/*};
class OCR2 {
//设置APPID/AK/SK*/
public static String Judge(String path) {
TripCode T = new TripCode();
T = ocr2(path);
String InfM = T.Status + "," + T.Telephone + "," + T.Time + "," + T.District;
return InfM;
}
public static TripCode ocr2(String path) {
final String APP_ID = "28049220";
final String API_KEY = "qyKlUy6xSapA89DTPomExteq";
final String SECRET_KEY = "q5EYpXULVh5gC3firLU1nGaymwIwOMBd";
// 初始化一个AipOcr
AipOcr client = new AipOcr(APP_ID, API_KEY, SECRET_KEY);
// 可选:设置网络连接参数
client.setConnectionTimeoutInMillis(2000);
client.setSocketTimeoutInMillis(10000);
// 可选:设置代理服务器地址, http和socket二选一或者均不设置
// client.setHttpProxy("proxy_host", proxy_port); // 设置http代理
// client.setSocketProxy("proxy_host", proxy_port); // 设置socket代理
// 可选设置log4j日志输出格式若不设置则使用默认配置
// 也可以直接通过jvm启动参数设置此环境变量
System.setProperty("aip.log4j.conf", "path/to/your/log4j.properties");
// 调用接口
JSONObject res = client.basicGeneral(path, new HashMap<String, String>());
//System.out.println(res);
String str = res.toString(0);
//System.out.println(str);
String s = "";
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '{' || c == '"' || c == ':' || c == '}' || c == '' || c == '_') {
continue;
} else
s += c;
if (c == ']') break;
}
//System.out.println(s);
TripCode TC = new TripCode();
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) == '的' && s.charAt(i + 1) == '动' && s.charAt(i + 2) == '态' && s.charAt(i + 3) == '行' && s.charAt(i + 4) == '程' && s.charAt(i + 5) == '卡') {
String tel = TC.getTelephone();
for(;s.charAt(i)!=',';i--);
i++;
for (; s.charAt(i) != ','; i++) {
tel += s.charAt(i);
}
TC.setTelephone(tel);
}
if (s.charAt(i) == '请' && s.charAt(i + 1) == '收' && s.charAt(i + 2) == '下') {
String St = TC.getStatus();
i = i + 3;
for (; s.charAt(i) != ','; i++) {
St += s.charAt(i);
}
TC.setStatus(St);
}
if (s.charAt(i) == '更' && s.charAt(i + 1) == '新' && s.charAt(i + 2) == '于') {
String Data = TC.getTime();
i = i + 3;
for (; s.charAt(i) != ','; i++) {
Data += s.charAt(i);
}
TC.setTime(Data);
}
if (s.charAt(i) == '到' && s.charAt(i + 1) == '达' && s.charAt(i + 2) == '或' && s.charAt(i + 3) == '途' && s.charAt(i + 4) == '经') {
String Dis = TC.getDistrict();
i = i + 5;
for (; s.charAt(i) != ']'; i++) {
Dis += s.charAt(i);
}
TC.setDistrict(Dis);
}
}
return TC;
}
}

@ -0,0 +1,53 @@
from codecs import ignore_errors
from pickle import TRUE
import turtle
from xmlrpc.client import boolean
import numpy as np
from asyncore import write
import xlrd
import pandas as pd
import openpyxl
from xlrd import Book
import datetime
import time
import time
from flask import Flask,request
from encodings import utf_8
import pymssql
import json
import base64
import jpype
class admin_log():
def admin_log1(c,a):
b={
'test1':[],
'text':'2'
}
# 把数据装载成json格式并回传
#a='{"a":{"test":1},"b":2,"c":3,"d":4,"e":5}'
conn =pymssql.connect(
server="LAPTOP-FLH9FTB4",#本地服务器
user="sa",password="as2799094948",
database="software_project",
charset="utf8"
)
if conn:
print('连接数据库成功!')#测试是否连接上
cursor =conn.cursor() #使用cursor()方法获取操作游标
a= request.json
username=a['username']
passwd=a['password']
sql_select="SELECT [password] FROM admin where username = '{}'".format(username) #数据库查询语句
cursor.execute(sql_select) #执行语句
results =cursor.fetchall() #获取所有记录列表
if len(results)==0:
b['text']=1
elif results[0][0]==passwd:
b['text']=2
else: b['text']=3
conn.commit()
cursor.close()
conn.close()
# 把数据装载成json格式并回传
a1=json.dumps(b,ensure_ascii=False)
return a1

@ -0,0 +1,16 @@
'''b={
'test1':[],
'text':'2',
'image':[]
}
b['test1'].append(['学号200340001','姓名:白雪健','电话13080337680','时间2020','校门:南','市:天津','区:东丽区','详细地址:中国民航大学'])
print(b)'''
b={
'test1':[],
'text':'2',
'image':[]
}
b['test1'].append([])
b['test1'][0].append('申请表类型')
b['test1'][0].append('申请表类型')
print(b)

@ -0,0 +1,88 @@
import time
import requests
import pymssql
import re
from bs4 import BeautifulSoup
cookies = {
'security_session_verify': '2b416949a891a8c262d984ce4252acc6',
'__yjs_duid': '1_0b113b04c0c0e5c875c1b9485d5285781666539190108',
'Hm_lvt_133c8ee1fed22328c57193e7ed6ce0c5': '1666539138,1666540035',
'Hm_lpvt_133c8ee1fed22328c57193e7ed6ce0c5': '1666540145',
}
headers = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
'Accept-Language': 'zh-CN,zh;q=0.9',
'Cache-Control': 'max-age=0',
'Connection': 'keep-alive',
# Requests sorts cookies= alphabetically
# 'Cookie': 'security_session_verify=2b416949a891a8c262d984ce4252acc6; __yjs_duid=1_0b113b04c0c0e5c875c1b9485d5285781666539190108; Hm_lvt_133c8ee1fed22328c57193e7ed6ce0c5=1666539138,1666540035; Hm_lpvt_133c8ee1fed22328c57193e7ed6ce0c5=1666540145',
'Referer': 'http://tj.bendibao.com/news/gelizhengce/fengxianmingdan.php?isqg=0',
'Upgrade-Insecure-Requests': '1',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36',
}
params = {
'isqg': '1',
'qu': '全部',
}
t=0
while True:
conn =pymssql.connect(
server="LAPTOP-FLH9FTB4",#本地服务器
user="sa",password="as2799094948",
database="software_project",
charset="utf8"
#这里设置全局的GBK如果设置的是UTF—8需要将数据库默认的GBK转化成UTF-8
)
if conn:
print('连接数据库成功!')#测试是否连接上
res = requests.get('http://tj.bendibao.com/news/gelizhengce/fengxianmingdan.php', params=params, cookies=cookies, headers=headers)
res.encoding='utf-8'
soup = BeautifulSoup(res.text, 'html.parser')
# 使用cursor()方法获取操作游标
cursor =conn.cursor()
# 高风险地区信息
# 清除原有数据
cursor.execute("truncate table height")
conn.commit()
# 存入新数据
content='#info > div.height.info-item > div > div > div > div'
a=soup.select(content)
for i in range(1,len(a)):
a[i] = a[i].text.strip().replace("\n", "")
if len(a[i])!=0:
area=re.search(r'.*?区',a[i]).group()
cursor.execute("insert into height values('{0}','{1}')".format(area,a[i]))
conn.commit()
# 中风险地区信息
# 清除原有数据
cursor.execute("truncate table middle")
conn.commit()
# 存入新数据
content='#info > div.middle.info-item > div > div > div > div'
a=soup.select(content)
for i in range(1,len(a)):
a[i] = a[i].text.strip().replace("\n", "")
if len(a[i])!=0:
area=re.search(r'.*?区',a[i]).group()
cursor.execute("insert into middle values('{0}','{1}')".format(area,a[i]))
conn.commit()
# 低风险地区信息
# 清除原有数据
cursor.execute("truncate table low")
conn.commit()
# 存入新数据
content='#info > div.low.info-item > div > div > div > div'
a=soup.select(content)
for i in range(1,len(a)):
a[i] = a[i].text.strip().replace("\n", "")
if len(a[i])!=0:
area=re.search(r'.*?区',a[i]).group()
cursor.execute("insert into low values('{0}','{1}')".format(area,a[i]))
conn.commit()
cursor.close()
# 断开数据库连接
conn.close()
# 设置休眠时间,定时执行
time.sleep(43200) #12小时

@ -0,0 +1,190 @@
# from crypt import methods
# 将对应图片的base64编码解析为图片
from audioop import add
import base64
import os
from unicodedata import name
import time
from flask import Flask,request
from codecs import ignore_errors
from pickle import TRUE
import turtle
from xmlrpc.client import boolean
import numpy as np
from asyncore import write
import xlrd
import pandas as pd
import openpyxl
from xlrd import Book
import datetime
import time
import time
from flask import Flask,request
from encodings import utf_8
import pymssql
import json
import base64
import jpype
# 出校申请请求的类def decode_base64(base64_data,i):
# print(type(base64_data))
#print(base64_data)
# 如果想要在浏览器上访问base64格式图片需要在前面加上data:image/jpeg;base64,
class in_school:
def __init__(self,type='',sno='',name='',phone='',time='',door='',city='',area='',address='',health_code='',Tour_code='',NAT='',Pass=''):
self.type=''
self.sno=''
self.name=''
self.phone=''
self.time=''
self.door=''
self.city=''
self.area=''
self.address=''
self.health_code=''
self.Tour_code=''
self.NAT=''
self.Pass=''
def in_school1(p,json_data):
Conn = pymssql.connect('LAPTOP-FLH9FTB4',"sa","as2799094948","software_project",charset='utf8')
cur = Conn.cursor()
sql = "Select [sno] from Form where sno= '{}'".format(json_data['sno'])
cur.execute(sql)
requests = cur.fetchall()
if(len (requests)!=0):
return '2'
sql = "Select state from [user] where username= '{}'".format(json_data['sno'])
cur.execute(sql)
requests = cur.fetchall()
for row in requests:
if(row[0]==json_data['type']):
return '3'
cur.close()
Conn.close()
#将请求得到的数据转换为json格式
l1 = len(json_data['test'])
'''for i in range(l1):
decode_base64(json_data['test'][i],i) #调用base64编码转换图片的函数得到相应图片并存到目录中'''
#查找user表如果state是在校 就return 2
a = in_school()
a.type='入校'
a.sno=json_data['sno']
a.name = json_data['name']
a.phone = json_data['phone']
a.time = json_data['time']
a.door = json_data['door']
a.city =json_data['city']
a.area =json_data['area']
a.address = json_data['address']
a.health_code = json_data['test'][0]
a.Tour_code = json_data['test'][1]
a.NAT = json_data['test'][2]
f=a.shengpi1(json_data['area'],json_data['time'],json_data['test'][2],json_data['test'][1],json_data['test'][0])
a.Pass = str(f)
return a
def shengpi1(p,a,b,c,d,e):#a:xx区 b时间 c健康码 d行程码 e核酸
year,month,day=b.split('-',2)
Conn = pymssql.connect('LAPTOP-FLH9FTB4',"sa","as2799094948","software_project",charset='utf8')#xxx是防疫表现在先不填
cur = Conn.cursor()
sql = "Select [area] from height"
cur.execute(sql)
now=str(time.strftime("%d"))#调用本地时间
x=0
if '' not in a:
a=a+''
# wb1=openpyxl.load_workbook('D:\\fanyi.xlsx')
#ws1=wb1['Sheet1']
#num_rows1 = ws1.max_row # 总行数
#num_cols1 = ws1.max_column
row = cur.fetchone()
while row:
if(a==row[0]):
return 3 # ---调用防疫区数据库将a和防疫区数据库的值进行一一比较如果找到返回不通过
row = cur.fetchone()
#-----
a2=1
if(day!=now):
return 3 #2----将本地时间和b进行比较如果异常将数据库中对应用户的通过情况改成不通过。
#2----
#jarpath =r"D:\tupian\OCR_baidu.jar" # jar包地址
#jvmPath = jpype.getDefaultJVMPath()
#jpype.startJVM(jvmPath, "-ea", "-Djava.class.path=%s" % (jarpath))
java1 = jpype.JClass("HealthCode")
java2 = jpype.JClass("TripCode")
java3 = jpype.JClass("CovidTestRep")
j1 = java1()
j2 = java2()
j3 = java3()
a2=1
path="D:/tupian//12.jpg"
with open(path,'wb') as file:
img = base64.b64decode(c)
file.write(img)
str1 = str(j1.Judge(r"D:\tupian\12.jpg")) #Hst, Hname, Hdata 对应健康码颜色姓名日期3---- 将c传给ocr让ocr把颜色传回来对应给参数进行比较如果异常将数据库中对应用户的通过情况改成不通过。
Hst, Hname, Hdata = str1.split(',')
year1,month1,day1=Hdata.split('-')
#if(year1!=year or month!= month1 or day!=day1):
#return 3
print(Hst)
#if(Hst!='S绿'):
#return 3
path="D:/tupian//13.jpg"
with open(path,'wb') as file:
img = base64.b64decode(d)
file.write(img)
str2 = str(j2.Judge(r"D:\tupian\13.jpg"))
Tst, Ttel, Tdata, Tdis = str2.split(',')#Tst, Ttel, Tdata, Tdis 对应行程码颜色电话日期去过的地方4--- 将d传给ocr让ocr把地点颜色传回来 查看行程码是否是正常,如果异常,将数据库中对应用户的通过情况改成不通过。
year2,month2,day2=Tdata.split('.')
#if(year2!=year or month!= month2 or day!=day2):
#return 3
if(Tdis!='天津市'):
return 3
#4---
path="D://tupian/11.jpg"
with open(path,'wb') as file:
img = base64.b64decode(e)
file.write(img)
str3 = str(j3.Judge(r"D:\tupian\11.jpg"))
Cst, Cname, Cdata = str3.split(',')#Cst, Cname, Cdata 对应 核酸结果 姓名 核酸日期5--- 将e传给ocr让ocr把状态传回来 查看核酸是否是正常,如果异常,将数据库中对应用户的通过情况改成不通过。
year3,month3,day3=Cdata.split('-')
#if(year3!=year or month!= month3 or day-day3<=14):
#return 3
if(Cst!='阴性'):
return 3
return 2
# 路由交换数据
# def change(self):
# app= Flask(__name__)
# @app.route('/',methods=['GET','POST'])#开启app.route进到根目录里面
# def hello_world():
# json_data = request.json #将请求得到的数据转换为json格式
# l1 = len(json_data['test'])
# for i in range(l1):
# decode_base64(json_data['test'][i],i) #调用base64编码转换图片的函数得到相应图片并存到目录中
# self.name = json_data['name']
# self.sno = json_data['sno']
# self.phone = json_data['phone']
# self.time = json_data['time']
# self.door = json_data['door']
# self.city =json_data['city']
# self.area =json_data['area']
# self.address = json_data['address']
# return '1' #如果一切正常则返回1
# app.run(host='127.0.0.1',port=2022)
# if __name__=='__main__':
# a = in_school1()
# a.change()
# print(a.name)
# print(a.sno)
# print(a.)

@ -0,0 +1,172 @@
from audioop import add
import base64
import os
import json
from unicodedata import name
from codecs import ignore_errors
from pickle import TRUE
import turtle
from xmlrpc.client import boolean
import numpy as np
from asyncore import write
import xlrd
import pandas as pd
import openpyxl
from xlrd import Book
import datetime
import time
from flask import Flask,request
from encodings import utf_8
import pymssql
import json
import base64
from out_school import out_school
from in_school import in_school
import time
from flask import Flask,request
from shengpi import approval
from admin_log import admin_log
from user_log import user_log
from view import view
from scan_the_code import scan_the_code
import jpype
app= Flask(__name__)
@app.route('/',methods=['GET','POST'])
def hello():
return '2'
@app.route('/uesr',methods=['GET','POST'])
def log():
a= request.json
user=user_log()
a1=user.user_log1(a)
return a1
@app.route('/admin',methods=['GET','POST'])
def log1():
a= request.json
admin=admin_log()
a1=admin.admin_log1(a)
#a='{"a":{"test":1},"b":2,"c":3,"d":4,"e":5}'
return a1
@app.route('/in_school',methods=['GET','POST'])#开启app.route进到根目录里面
def in_school1():
json_data = request.json
a=in_school()
b=a.in_school1(json_data)
if(b=='2' or b == '3'):
print(b)
return b
to_mssql(b)
# print(a.sno)
return '1'
@app.route('/out_school',methods=['GET','POST'])#开启app.route进到根目录里面
def out_school1():
json_data = request.json #将请求得到的数据转换为json格式
a=out_school()
b=a.out_school1(json_data)
if(b=='2' or b == '3'):
return b
to_mssql(b)
return '1'
def a():
password = request.values.get("password")
print(password)
@app.route('/shengpi',methods=['GET','POST'])
def Userdisplay(): #收到request返回所有没有通过申请的用户名字的列表
a=approval()
data=a.list()
data=json.dumps(data,ensure_ascii=False)
return data
@app.route('/info',methods=['GET','POST'])
def Userdisplay1(): #收到学号返回该用户信息
a=approval()
b=a.list2()
a=json.dumps(b,ensure_ascii=False)
data=json.loads(a)
# print(data)
return data
def to_mssql(a):
Conn = pymssql.connect('LAPTOP-FLH9FTB4',"sa","as2799094948","software_project",charset='utf8')
if Conn:
print ("连接成功")
else:
print("失败")
# print(a.type,a.sno,a.name,a.phone,a.time,a.door,a.city,a.area,a.address,a.health_code,a.Tour_code,a.NAT,a.Pass)
# print(type(a.NAT))
cur = Conn.cursor()
print(a.Pass)
insert = "insert into Form([type] ,[sno] ,[name] ,[phone] ,[time] ,[door] ,[city] ,[area] ,[address] ,[health_code] ,[Tour_code] ,[NAT] ,[Pass]) values ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s') ; COMMIT"%(
a.type,a.sno,a.name,a.phone,a.time,a.door,a.city,a.area,a.address,a.health_code,a.Tour_code,a.NAT,a.Pass
)
cur.execute(insert)
print("qqqqq")
cur.close()
Conn.close()
@app.route('/access',methods=['GET','POST'])#开启app.route进到根目录里面
def access():
# return '1'
a= request.json
a1=approval()
a1.shengpi2(a)
return '1'
@app.route('/state',methods=['GET','POST'])
def State():
a = request.json
num = a['sno']
print(num)
Conn = pymssql.connect(server="LAPTOP-FLH9FTB4",#本地服务器
user="sa",password="as2799094948",
database="software_project",
charset="utf8")
cur = Conn.cursor()
Query = 'Select [Pass] from Form where [sno] = %s'%num
cur.execute(Query)
p = cur.fetchall()
if(len(p)==0):
print('您还没有提交表单或您的申请已被管理员驳回')
return '您还没有提交表单或您的申请已被管理员驳回'
if p[0][0] == '1':
print('您的申请表待审核')
return '您的申请表待审核'
elif p[0][0] == '2':
print('您的申请表已通过审核')
return '您的申请表已通过审核'
elif p[0][0] == '3':
print('您的申请表自动审批未通过,等待管理员审批')
return '您的申请表自动审批未通过,等待管理员审批'
else:
print('error')
return 'error'
# 查看疫情信息
@app.route('/look_info',methods=['GET','POST'])
def look():
json_data = request.json
a=view()
b=a.view1(json_data)
return b
@app.route('/scan_the_code',methods=['GET','POST'])#开启app.route进到根目录里面
def scan():
data = request.json
a=scan_the_code()
b=a.scan_the_code1(data)
return b
if __name__ == "__main__":
jarpath =r"D:\tupian\OCR_baidu.jar"
jvmPath = jpype.getDefaultJVMPath()
jpype.startJVM(jvmPath, "-ea", "-Djava.class.path=%s" % (jarpath))
app.run(host='127.0.0.1',port=2020)
jpype.shutdownJVM ()

@ -0,0 +1,41 @@
import os
import jpype
jarpath = r"D:\tupian\OCR_baidu.jar" # jar包地址
jvmPath = jpype.getDefaultJVMPath()
jpype.startJVM(jvmPath, "-ea", "-Djava.class.path=%s" % (jarpath))
java1 = jpype.JClass("HealthCode")
java2 = jpype.JClass("TripCode")
java3 = jpype.JClass("CovidTestRep")
j1 = java1()
j2 = java2()
j3 = java3()
str1 = str(j1.Judge(r"D:\tupian\12.jpg")) # 健康码地址,不要包含中文 下同
str2 = str(j2.Judge(r"D:\tupian\13.jpg")) # 行程码地址
str3 = str(j3.Judge(r"D:\tupian\11.jpg")) # 核酸结果地址
# if str2==",," or str3==',,':图片有误
'''
Hst, Hname, Hdata 对应健康码颜色姓名日期
Tst, Ttel, Tdata, Tdis 对应行程码颜色电话日期去过的地方
Cst, Cname, Cdata 对应 核酸结果 姓名 核酸日期
'''
# 为方便分割Hst前加了一个大写字符S判断时应注意如绿码 Hst为S绿
Hst, Hname, Hdata = str1.split(',')
Tst, Ttel, Tdata, Tdis = str2.split(',')
Cst, Cname, Cdata = str3.split(',')
Hdata = Hdata[0:10] # 只要求精确到日,不考虑小时。
Tdata = Tdata[0:10]
Cdata = Cdata[0:10]
print(Hst)
print(Hname)
print(Hdata)
print(Tst)
print(Ttel)
print(Tdis)
print(Tdata)
print(Cst)
print(Cname)
print(Cdata)
jpype.shutdownJVM()

@ -0,0 +1,149 @@
from codecs import ignore_errors
from pickle import TRUE
import turtle
from xmlrpc.client import boolean
import numpy as np
from asyncore import write
import xlrd
import pandas as pd
import openpyxl
from xlrd import Book
import datetime
import time
import time
from flask import Flask,request
from encodings import utf_8
import pymssql
import json
import base64
import jpype
class out_school:
def __init__(self,type='',sno='',name='',phone='',time='',door='',city='',area='',address='',health_code='',Tour_code='',NAT='',Pass=''):
self.type=''
self.sno=''
self.name=''
self.phone=''
self.time=''
self.door=''
self.city=''
self.area=''
self.address=''
self.health_code=''
self.Tour_code=''
self.NAT=''
self.Pass=''
def out_school1(p,json_data):
l1 = len(json_data['test'])
Conn = pymssql.connect('LAPTOP-FLH9FTB4',"sa","as2799094948","software_project",charset='utf8')
cur = Conn.cursor()
sql = "Select [sno] from Form where sno= '{}'".format(json_data['sno'])
cur.execute(sql)
requests = cur.fetchall()
if(len (requests)!=0):
return '2'
sql = "Select state from [user] where username= '{}'".format(json_data['sno'])
cur.execute(sql)
requests = cur.fetchall()
for row in requests:
print(type(json_data['type']))
if(row[0]==json_data['type']):
return '3'
cur.close()
Conn.close()
'''for i in range(l1):
decode_base64(json_data['test'][i],i+3) #调用base64编码转换图片的函数得到相应图片并存到目录中'''
#查找user表如果state是出校 就return 2
a = out_school()
a.type = '出校'
a.sno = json_data['sno']
a.name = json_data['name']
a.phone = json_data['phone']
a.time = json_data['time']
a.door = json_data['door']
a.city =json_data['city']
a.area =json_data['area']
a.address = json_data['address']
a.health_code = json_data['test'][0]
a.Tour_code = json_data['test'][1]
a.NAT = json_data['test'][2]
f=a.shengpi1(json_data['area'],json_data['time'],json_data['test'][1],json_data['test'][2],json_data['test'][0])
a.Pass=f
return a
def shengpi1(p,a,b,c,d,e):#a:xx区 b时间 c健康码 d行程码 e核酸
year,month,day=b.split('-',2)
Conn = pymssql.connect('LAPTOP-FLH9FTB4',"sa","as2799094948","software_project",charset='utf8')#xxx是防疫表现在先不填
cur = Conn.cursor()
sql = "Select [area] from height"
cur.execute(sql)
now=str(time.strftime("%d"))#调用本地时间
x=0
if '' not in a:
a=a+''
row = cur.fetchone()
while row:
if(a==row[0]):
return 3 # ---调用防疫区数据库将a和防疫区数据库的值进行一一比较如果找到返回不通过
row = cur.fetchone()
#-----
sql = "Select [area] from middle"
cur.execute(sql)
row = cur.fetchone()
while row:
if(a==row[0]):
return 3 # ---调用防疫区数据库将a和防疫区数据库的值进行一一比较如果找到返回不通过
row = cur.fetchone()
a2=1
if(day!=now):
return 3 #2----将本地时间和b进行比较如果异常将数据库中对应用户的通过情况改成不通过。
#2----
#jarpath =r"D:\tupian\OCR_baidu.jar" # jar包地址
#jvmPath = jpype.getDefaultJVMPath()
#jpype.startJVM(jvmPath, "-ea", "-Djava.class.path=%s" % (jarpath))
java1 = jpype.JClass("HealthCode")
java2 = jpype.JClass("TripCode")
java3 = jpype.JClass("CovidTestRep")
j1 = java1()
j2 = java2()
j3 = java3()
a2=1
path="D:/tupian//12.jpg"
with open(path,'wb') as file:
img = base64.b64decode(c)
file.write(img)
str1 = str(j1.Judge(r"D:\tupian\12.jpg")) #Hst, Hname, Hdata 对应健康码颜色姓名日期3---- 将c传给ocr让ocr把颜色传回来对应给参数进行比较如果异常将数据库中对应用户的通过情况改成不通过。
Hst, Hname, Hdata = str1.split(',')
year1,month1,day1=Hdata.split('-')
#if(year1!=year or month!= month1 or day!=day1):
#return 3
if(Hst!='S绿'):
return 3
path="D:/tupian//13.jpg"
with open(path,'wb') as file:
img = base64.b64decode(d)
file.write(img)
str2 = str(j2.Judge(r"D:\tupian\13.jpg"))
Tst, Ttel, Tdata, Tdis = str2.split(',')#Tst, Ttel, Tdata, Tdis 对应行程码颜色电话日期去过的地方4--- 将d传给ocr让ocr把地点颜色传回来 查看行程码是否是正常,如果异常,将数据库中对应用户的通过情况改成不通过。
year2,month2,day2=Tdata.split('.')
#if(year2!=year or month!= month2 or day!=day2):
#return 3
if(Tdis!='天津市'):
return 3
#4---
path="D://tupian/11.jpg"
with open(path,'wb') as file:
img = base64.b64decode(e)
file.write(img)
str3 = str(j3.Judge(r"D:\tupian\11.jpg"))
Cst, Cname, Cdata = str3.split(',')#Cst, Cname, Cdata 对应 核酸结果 姓名 核酸日期5--- 将e传给ocr让ocr把状态传回来 查看核酸是否是正常,如果异常,将数据库中对应用户的通过情况改成不通过。
year3,month3,day3=Cdata.split('-')
#if(year3!=year or month!= month3 or day-day3<=14):
#return 3
if(Cst!='阴性'):
return 3
return 2

@ -0,0 +1,70 @@
from audioop import add
import base64
import os
import json
from unicodedata import name
from codecs import ignore_errors
from pickle import TRUE
import turtle
from xmlrpc.client import boolean
import numpy as np
from asyncore import write
import xlrd
import pandas as pd
import openpyxl
from xlrd import Book
import datetime
import time
from flask import Flask,request
from encodings import utf_8
import pymssql
import json
import base64
from out_school import out_school
from in_school import in_school
import time
class scan_the_code:
def scan_the_code1(p,data):
sno=data['sno']
res={
'result':[]
}
Conn = pymssql.connect(server="LAPTOP-FLH9FTB4",#本地服务器
user="sa",password="as2799094948",
database="software_project",
charset="utf8")
if Conn:
print ("连接成功")
cur = Conn.cursor()
#cur.execute("delete student where state='出' and pass='2' ")
#1在校2审批通过
if data['shuju']=='5YWl5qCh5LqM57u056CB':
cur.execute("select * from Form , [user] where state='出校' and pass='2' and sno='{}' and username=sno".format(sno))
results=cur.fetchall()
if(len(results)==0):
res['result'].append('您没有入校资格')
else:
cur.execute("update [user] set state='入校' where username='{}' ".format(sno))
cur.execute("delete from Form where sno='{}'".format(sno))
res['result'].append('入校成功')
elif data['shuju']=='5Ye65qCh5LqM57u056CB':
cur.execute("select * from Form , [user] where state='入校' and pass='2'and sno='{}' and username=sno".format(sno))
results=cur.fetchall()
if(len(results)==0):
print('无出校资格')
res['result'].append('您没有出校资格')
else:
# 测试时不更改数据
cur.execute("update [user] set state='出校' where username='{}' ".format(sno))
cur.execute("delete from Form where sno='{}'".format(sno))
print('出校成功')
res['result'].append('出校成功')
else:
print('二维码无效')
res['result'].append('二维码无效')
print ("成功")
Conn.commit()
cur.close()
Conn.close()
b=json.dumps(res,ensure_ascii=False)
return b

@ -0,0 +1,113 @@
from codecs import ignore_errors
from pickle import TRUE
import turtle
from xmlrpc.client import boolean
import numpy as np
from asyncore import write
import xlrd
import pandas as pd
import openpyxl
from xlrd import Book
import datetime
import time
import time
from flask import Flask,request
from encodings import utf_8
import pymssql
import json
import base64
import jpype
class approval:
def shengpi2(p,a):#a:xx区 b时间 c健康码 d行程码 e核酸
Conn = pymssql.connect('LAPTOP-FLH9FTB4',"sa","as2799094948","software_project",charset='utf8')
cur = Conn.cursor()
sql = "Select [type] ,[sno] ,[name] ,[phone] ,[time] ,[door] ,[city] ,[area] ,[address] ,[health_code] ,[Tour_code] ,[NAT] ,[Pass] from Form"
cur.execute(sql)
row = cur.fetchone()
sno=a['data']
sno1,sno=sno.split('')
print(sno)
print(a['condition'])
while row:
if(row[1]==sno):
if(a['condition'] == '通过'):
change = "update Form set [Pass] = '2' where [sno] = '%s';COMMIT"%row[1]
elif a['condition'] == '不通过':
change = "delete From Form where [sno] = '%s';COMMIT"%row[1]
cur.execute(change)
break
#把row找到的这个值的通过情况改为xxx
row = cur.fetchone()
cur.close()
Conn.close()
def list(p):
Conn = pymssql.connect('LAPTOP-FLH9FTB4',"sa","as2799094948","software_project",charset='utf8')
cur = Conn.cursor()
sql = "Select [type] ,[sno] ,[name] ,[phone] ,[time] ,[door] ,[city] ,[area] ,[address] ,[health_code] ,[Tour_code] ,[NAT] ,[Pass] from Form"
cur.execute(sql)
row = cur.fetchone()
data={
'test1':[],
}
while row:
# #row[1].encode('big5hkscs')
# print(row[1].encode('latin1').decode('gbk'))
if(row[12]=='3'):
data['test1'].append(row[2])#将每一行的名字进行对code的编码和在code的基础上进行gbk解码
row = cur.fetchone()
cur.close()
Conn.close()
return data
def list2(p):
Conn = pymssql.connect('LAPTOP-FLH9FTB4',"sa","as2799094948","software_project",charset='utf8')
cur = Conn.cursor()
sql = "Select [type] ,[sno] ,[name] ,[phone] ,[time] ,[door] ,[city] ,[area] ,[address] ,[health_code] ,[Tour_code] ,[NAT] ,[Pass] from Form"
cur.execute(sql)
row = cur.fetchone()
b={
'test1':[],
'text':'2',
'image':[]
}
number=0
while row:
if(row[12]=='3'):
b['image'].append([])
b['image'][number].append(row[9])
b['image'][number].append(row[10])
b['image'][number].append(row[11])
b['test1'].append([])
b['test1'][number].append('申请表类型:{}'.format(row[0]))
b['test1'][number].append('姓名:{}'.format(row[2]))
b['test1'][number].append('学号:{}'.format(row[1]))
b['test1'][number].append('联系电话:{}'.format(row[3]))
b['test1'][number].append('时间:{}'.format(row[4]))
b['test1'][number].append('校门:{}'.format(row[5]))
b['test1'][number].append('省市:{}'.format(row[6]))
b['test1'][number].append('区:{}'.format(row[7]))
b['test1'][number].append('详细地址:{}'.format(row[8]))
# b['test1'][number].append('健康码:{}'.format(row[9]))
# b['test1'][number].append('行程码:{}'.format(row[10]))
# b['test1'][number].append('核酸:{}'.format(row[11]))
b['test1'][number].append('通过情况:不通过')
number=number+1
row = cur.fetchone()
cur.close()
Conn.close()
return b
'''a1=shengpi()
path="D://tupian/11.jpg"
with open(path,'rb') as file:
a=file.read()
img = base64.b64encode(a)
path="D://tupian/12.jpg"
with open(path,'rb') as file:
a=file.read()
img1 = base64.b64encode(a)
path="D://tupian/13.jpg"
with open(path,'rb') as file:
a=file.read()
img2 = base64.b64encode(a)
print(a1.shengpi1(str('爱华'),'2022-11-12',img1,img2,img))'''

@ -0,0 +1,54 @@
from codecs import ignore_errors
from pickle import TRUE
import turtle
from xmlrpc.client import boolean
import numpy as np
from asyncore import write
import xlrd
import pandas as pd
import openpyxl
from xlrd import Book
import datetime
import time
import time
from flask import Flask,request
from encodings import utf_8
import pymssql
import json
import base64
import jpype
class user_log():
def user_log1(p,a):
b={
'test1':[],
'text':'2'
}
# 把数据装载成json格式并回传
#a='{"a":{"test":1},"b":2,"c":3,"d":4,"e":5}'
conn =pymssql.connect(
server="LAPTOP-FLH9FTB4",#本地服务器
user="sa",password="as2799094948",
database="software_project",
charset="utf8"
)
if conn:
print('连接数据库成功!')#测试是否连接上
cursor =conn.cursor() #使用cursor()方法获取操作游标
a= request.json
username=a['username']
passwd=a['password']
sql_select="SELECT password FROM [user] where username = '{}'".format(username) #数据库查询语句
cursor.execute(sql_select) #执行语句
results =cursor.fetchall() #获取所有记录列表
if len(results)==0:
b['text']=1
elif results[0][0]==passwd:
b['text']=2
else: b['text']=3
conn.commit()
cursor.close()
conn.close()
# 把数据装载成json格式并回传
a1=json.dumps(b,ensure_ascii=False)
#a='{"a":{"test":1},"b":2,"c":3,"d":4,"e":5}'
return a1

@ -0,0 +1,96 @@
from audioop import add
import base64
import os
import json
from unicodedata import name
from codecs import ignore_errors
from pickle import TRUE
import turtle
from xmlrpc.client import boolean
import numpy as np
from asyncore import write
import xlrd
import pandas as pd
import openpyxl
from xlrd import Book
import datetime
import time
from flask import Flask,request
from encodings import utf_8
import pymssql
import json
import base64
from out_school import out_school
from in_school import in_school
import time
class view():
def view1(p,json_data):
print(type(json_data['name']))
area=json_data['name']
data={
'height':[],
'middle':[],
'low':[]
}
conn =pymssql.connect(
server="LAPTOP-FLH9FTB4",#本地服务器
user="sa",password="as2799094948",
database="software_project",
charset="utf8"
#这里设置全局的GBK如果设置的是UTF—8需要将数据库默认的GBK转化成UTF-8
)
if conn:
print('连接数据库成功!')#测试是否连接上
#高风险地区
cursor =conn.cursor() #使用cursor()方法获取操作游标
if area=='全部':sql_select="SELECT location FROM height order by location"
else:sql_select="SELECT location FROM height where area ='{}' order by location".format(area)
# sql_select="SELECT location FROM height where location like '{}%'".format(area) #数据库查询语句
cursor.execute(sql_select) #执行语句
results =cursor.fetchall() #获取所有记录列表
if len(results)==0:
print('该地区暂无高风险区域')
data['height'].append('该地区暂无高风险区域')
else:
print('共查询到{}条信息'.format(len(results)))
data['height'].append('共查询到{}条信息'.format(len(results)))
for result in results:
print(result[0])
data['height'].append(result[0])
#中风险地区
cursor =conn.cursor() #使用cursor()方法获取操作游标
if area=='全部':sql_select="SELECT location FROM middle order by location"
else:sql_select="SELECT location FROM middle where area ='{}' order by location".format(area)
cursor.execute(sql_select) #执行语句
results =cursor.fetchall() #获取所有记录列表
if len(results)==0:
print('该地区暂无中风险区域')
data['middle'].append('该地区暂无中风险区域')
else:
print('共查询到{}条信息'.format(len(results)))
data['middle'].append('共查询到{}条信息'.format(len(results)))
for result in results:
print(result[0])
data['middle'].append(result[0])
#低风险地区
cursor =conn.cursor() #使用cursor()方法获取操作游标
if area=='全部':sql_select="SELECT location FROM low order by location"
else:sql_select="SELECT location FROM low where area ='{}' order by location".format(area)
cursor.execute(sql_select) #执行语句
results =cursor.fetchall() #获取所有记录列表
if len(results)==0:
print('该地区暂无低风险区域')
data['low'].append('该地区暂无低风险区域')
else:
print('共查询到{}条信息'.format(len(results)))
data['low'].append('共查询到{}条信息'.format(len(results)))
for result in results:
print(result[0])
data['low'].append(result[0])
conn.commit()
cursor.close()
conn.close()
b=json.dumps(data,ensure_ascii=False)
return b

Binary file not shown.

Binary file not shown.

@ -0,0 +1,38 @@
//app.js
App({
globalData:{
phone:null,
no:'',
globalsno:''
},
/**
* 当小程序初始化完成时会触发 onLaunch全局只触发一次
*/
onLaunch: function () {
},
/**
* 当小程序启动或从后台进入前台显示会触发 onShow
*/
onShow: function (options) {
},
/**
* 当小程序从前台进入后台会触发 onHide
*/
onHide: function () {
},
/**
* 当小程序发生脚本错误或者 api 调用失败时会触发 onError 并带上错误信息
*/
onError: function (msg) {
}
})

@ -0,0 +1,44 @@
{
"pages": [
"pages/home/home",
"pages/administrator_log/administrator_log",
"pages/user_log/user_log",
"pages/set/set",
"pages/user/user",
"pages/v6_administrator/v6_administrator",
"pages/v7_out_school/v7_out_school",
"pages/v8_in_school/v8_in_school",
"pages/v9_manual/v9_manual",
"pages/v10_auto/v10_auto",
"pages/v11_success/v11_success",
"pages/v12_submit_info/v12_submit_info",
"pages/v13_look_info/v13_look_info",
"pages/v15_scan_the_code/v15_scan_the_code",
"pages/info/info",
"pages/v19_test/v19_test",
"pages/v16_user_state/v16_user_state"
],
"window": {
"navigationBarBackgroundColor": "#00F5FF",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "学生出入校管理",
"backgroundColor": "#000000",
"backgroundTextStyle": "dark"
},
"tabBar": {
"list": [
{
"pagePath": "pages/home/home",
"text": "首页",
"iconPath": "/static/image/home.png",
"selectedIconPath": "static/image/home-o.png"
},
{
"pagePath": "pages/set/set",
"text": "简介",
"iconPath": "/static/image/my.png",
"selectedIconPath": "static/image/my-o.png"
}
]
}
}

@ -0,0 +1,152 @@
//index.js
//获取应用实例
// const app = getApp()
var i = 0;
Page({
// 在js文件中设置相关的数据data
data: {
username: '',
password: '',
snows: [],
animation: [],
dateTime: "",
},
onUnload: function () {
clearTimeout(this.data.dateTime)
this.setData({
snows: [],
animation: []
})
},
onShow: function () {
this.initSnow();
this.data.snows = [];
this.data.animation = [];
let j = 50
while (j--)
this.data.snows.push(Math.floor(Math.random() * 700))
this.setData({
snows: this.data.snows
})
},
onHide: function () {
clearTimeout(this.data.dateTime)
this.setData({
snows: [],
animation: []
})
},
initSnow: function () {
setTimeout(function () {
let animation = wx.createAnimation({})
animation.translateY(804).opacity(1).step({
duration: 4000
})
animation.translateY(0).opacity(1).step({
duration: 0
})
this.setData({
['snows[' + i + ']']: Math.floor(Math.random() * 700),
['animation[' + i + ']']: animation.export()
})
i++;
if (i == 50)
i = 0
}.bind(this), 500)
var dateTime = setTimeout(function () {
this.initSnow()
}.bind(this), 100)
this.setData({
dateTime,
})
},
// 1、将获取的账号存到数据username里面
usernameInput: function (e) {
this.setData({
username: e.detail.value
})
},
// 2、将获取的密码存到password里面
passwordInput: function (e) {
this.setData({
password: e.detail.value
})
},
//3、、点击登录进行页面跳转
bindViewTap: function() {
wx.request({
url: 'http://127.0.0.1:2020/admin',
data: {username:this.data.username,password:this.data.password},
dataType: JSON,
enableCache: true,
enableHttp2: true,
enableQuic: true,
method: 'POST',
timeout: 0,
success: (result) => {
// console.log(result)
console.log(result.data)
// JSON.parse将JSON字符串转换成一个JS对象然后利用python的调用语法对相关内容进行操作
var p=JSON.parse(result.data)
console.log(p.test1)
if(p.text=='2'){
console.log("登录成功")
wx.navigateTo({
url: '/pages/v6_administrator/v6_administrator'
})
}
if(p.text=='1'){
wx.showModal({
cancelColor: 'cancelColor',
title: '用户名不存在',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定')
} else {
console.log('用户点击取消')
}
}
})
}
if(p.text=='3'){
wx.showModal({
cancelColor: 'cancelColor',
title: '密码错误',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定')
} else {
console.log('用户点击取消')
}
}
})
}
},
fail:(res)=>{
console.log("发生错误")
}
})},
// 管理员登录
to1:function(){
wx.navigateTo({
url: "/pages/v16_registered/v16_registered",
})
},
to2:function(){
wx.navigateTo({
url: '/pages/v17_forget_mima/v17_forget_mima',
})
}
})

@ -0,0 +1,45 @@
<!-- 雪花效果 -->
<scroll-view scroll-y="true">
<!-- 页面内容 -->
<!-- 主页面 -->
<view class="container">
<text style="height: 40rpx;"></text>
<view class="login-icon">
<image class="login-img" src="/static/image/CAUC.png"></image>
</view>
<view class="login-from">
<!--账号-->
<view class="inputView">
<image class="nameImage" src="/static/image/CAUC.png"></image>
<label class="loginLab">账号</label>
<input class="inputText" placeholder="请输入管理员账号" bindinput="usernameInput" />
</view>
<view class="line"></view>
<!--密码-->
<view class="inputView">
<image class="keyImage" src="/static/image/CAUC.png"></image>
<label class="loginLab">密码</label>
<input class="inputText" password="true" placeholder="请输入密码" bindinput="passwordInput" />
</view>
<view style="height: 20rpx;"></view>
<!-- <view class="s_view">
<button class="saveBtn" bindtap="to1" >注册</button>
<button class="submitBtn" bindtap="to2" >忘记密码</button>
</view> -->
<!--按钮-->
<view class="loginBtnView">
<button class="loginBtn" type="primary" bindtap="bindViewTap">登录</button>
</view>
</view>
</view>
</scroll-view>
<view>
<image wx:for="{{snows}}" wx:key="index" src="/static/image/CAUC.png" style="left:{{snows[index]}}rpx" animation="{{animation[index]}}" class='snow' data-index='{{index}}' />
</view>

@ -0,0 +1,138 @@
page{
height: 100%;
}
/* 1、表格的整体样式 */
.container {
height: 100%;
display: flex;
flex-direction: column;
padding: 0;
box-sizing: border-box;
/* background-color: rgb(156, 23, 78) */
}
/*2、登录的图片样式*/
.login-icon{
display: flex;
justify-content: center;
align-items: center;
}
/* 3、用来设置登录图片的宽度 */
.login-img{
width: 500rpx;
height: 500rpx;
}
/*4、表单内容*/
.login-from {
/* 设置表格上方的高度 */
margin-top: 20px;
flex: auto;
height:100%;
}
/* 5、设置输入的框 */
.inputView {
/* background-color: #fff; */
line-height: 50px;
border-radius:40px;
border:1px solid #161515;
}
/*6、设置输入框旁边的图片*/
.nameImage, .keyImage {
margin-left: 22px;
width: 18px;
height: 16px
}
/* 7、设置账号、密码字体的颜色 */
.loginLab {
margin: 15px 15px 15px 10px;
color:blue;
font-size: 14px
}
/* 8、进行提示输入的框是灰色的 */
.inputText {
flex: block;
float: right;
text-align: right;
margin-right: 22px;
margin-top: 11px;
color: gray;
font-size: 14px
}
/* 9、 内部框图进行相应的分割*/
.line {
margin-top: 10px;
}
/* .line {
width: 100%;
height: 1px;
background-color: #cccccc;
margin-top: 1px;
} */
/*10、设置按钮*/
.loginBtnView {
width: 100%;
height: auto;
/* background-color:#DCDCDC; */
margin-top: 0px;
margin-bottom: 0px;
padding-bottom: 0px;
}
.loginBtn {
width: 90%;
margin-top: 40px;
border-radius:10px;
}
/* 设置字体颜色 */
.bxj{
color: red;
}
/* 用来设置注册和忘记密码 */
.saveBtn {
width: 50% !important;
float:left;
font-weight: 100;
font-size: 10px;
}
.submitBtn {
width: 50% !important;
float:right;
font-size: 10px
}
.s_view{
position: fixed;
width: 100%;
}
/* 雪花效果特效 */
page {
background: linear-gradient(180deg, #6699CC 0%, #B8DBF0 100%);
background-attachment: fixed;
background-size: cover;
background-position: center top;
height: 100%;
}
.snow {
width: fit-content;
position: absolute;
top: -100rpx;
width: 30rpx;
height: 27rpx;
z-index: 11;
}
.snow:nth-child(2n+2) {
width: 35rpx;
height: 33rpx;
}

@ -0,0 +1,113 @@
// pages/index/index.js
Page({
/**
* 页面的初始数据
*/
data: {
message:"你好nihao",
datalist:['黑夜','白天','中午'],
userinfo:{
name:"白雪健",
age:20
},
Image1:["/static/image/apic2098.jpg","/static/image/apic2098.jpg"]
},
uploadimage:function(){
var that = this;
wx.chooseMedia({
mediaType: ['image','video'],
sourceType: ['album', 'camera'],
maxDuration: 30,
camera: 'back',
success(res) {
console.log(res),
console.log(res.tempFiles[0].tempFilePath),
that.setData({
Image1:that.data.Image1.concat(res.tempFiles[0].tempFilePath)
})
}
})
},
// clearimage:function(){
// this.setData({
// Image1:''
// })
// },
// 输入用户名所采取的行动
fakeCallback:function(e){
console.log(1)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
clickme:function(){
wx.navigateTo({
url: '/pages/administrator_log/administrator_log',
})
},
clickme1:function(){
wx.navigateTo({
url: '/pages/user_log/user_log',
})
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,61 @@
<!--pages/index/index.wxml-->
<!-- span标签 -->
<view class="banner">
<swiper indicator-dots indicator-color="rgba(255,255,255,0.5)"
indicator-active-color="#fff" circular autoplay interval="4000">
<swiper-item><image src="/static/image/1.jpg"></image></swiper-item>
<swiper-item><image src="/static/image/2.jpg"></image></swiper-item>
<swiper-item><image src="/static/image/3.jpg"></image></swiper-item>
</swiper>
</view>
<view class="header">
<!-- 代码 -->
<image class="bg_ware" src="https://codermoyv.gitee.io/coder-moyv/assets/images/wechat/bg_wave.gif"></image>
<view class="content">
<view class="menu">
<view class="item">
<image src="/static/image/CAUC.png" bindtap="clickme1" class="image1"></image>
<text style="color: bisque;">用户</text>
</view>
<view class="item">
<image src="/static/image/CAUC.png" bindtap="clickme" class="image1"></image>
<text style="color: bisque;">管理员</text>
</view>
</view>
</view>
</view>
<!-- </view>
<view wx:for="{{datalist}}">{{index}}-{{item}}</view>
<view wx:for="{{userinfo}}">{{index}}-{{item}}</view> -->
<!-- 上传图片 -->
<!-- <view>请上传图片</view>
<view >
<image wx:for="{{Image1}}" src="{{item}}"></image>
</view>
<view bindtap="uploadimage"> <button>请上传图片</button></view> -->
<!-- 输入用户名 -->
<!-- <view>您输入了{{message}}</view>
<view>
<input model:value="{{message}}" bindinput="fakeCallback"/>
</view> -->

@ -0,0 +1,64 @@
/* pages/index/index.wxss */
.c1{
color: red;
}
.image1{
width: 200rpx;
height: 200rpx;
/* 如果要设置圆角的话 */
border-radius: 100rpx;
}
.menu{
display: flex;
/* 规定主轴的方向 */
flex-direction: row;
/* 元素在主轴方向的排列方式 我用的是平均排列*/
justify-content: space-around;
/* 元素在负轴方向如何展示 */
/* align-items: center; */
}
/* 缺个空格差点g。 */
.menu .item{
display: flex;
flex-direction: column;
/* 元素在负轴方向如何展示 */
align-items: center;
}
/* 设置背景图片 */
.banner{
width: 100%;
height: 550rpx;
}
.banner swiper{
height: 100%;
width: 100%;
}
.banner image{
width: 100%;
height: 550rpx;
}
.header {
position: relative;
height:300rpx;
background: linear-gradient(to bottom, #56ccf2, #2f80ed);
}
.bg_ware {
position: absolute;
left: 0;
bottom: -2rpx;
width: 100%;
mix-blend-mode: screen;
height: 120rpx;
}

@ -0,0 +1,139 @@
// pages/info/info.js
var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
list:[],
image:[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
// 返回通过的信息
backR:function(){
// console.log(abc)
// console.log(abc.currentTarget.dataset.abc)
wx.request({
url: 'http://127.0.0.1:2020/access',
data: {
data:this.data.list[2],
condition:'通过'
},
dataType: JSON,
enableCache: true,
enableHttp2: true,
enableQuic: true,
method: 'POST',
timeout: 0,
success: (result) => {
console.log(this.data.list[2])
wx.redirectTo({
url: '/pages/v9_manual/v9_manual',
})
// console.log(result.data)
},
})
},
//返回不通过的信息
backE:function(){
// console.log(abc)
wx.request({
url: 'http://127.0.0.1:2020/access',
dataType: JSON,
enableCache: true,
enableHttp2: true,
enableQuic: true,
method: 'POST',
timeout: 0,
data:{
data:this.data.list[2],
condition:'不通过'
},
success: (result) => {
wx.redirectTo({
url: '/pages/v9_manual/v9_manual',
})
// console.log(2)
},
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
console.log(app.globalData.no)
var that = this;
wx.request({
url: 'http://127.0.0.1:2020/info',
dataType: JSON,
method: 'GET',
timeout: 0,
success: (res) => {
// console.log(res.data)
var p = JSON.parse(res.data)
// console.log(app.globalData.no)
// console.log(p.test1[app.globalData.no])
// console.log(p.image)
// console.log(p)
// console.log(p.test1[app.globalData.no])
that.setData({
list:p.test1[app.globalData.no],
image:p.image[app.globalData.no]
})
// console.log(this.data.list[2])
// console.log(that.data.image)
},
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,32 @@
<!--pages/info/info.wxml-->
<!-- 循环遍历人员详细信息的列表 -->
<view wx:for="{{list}}">
<view>{{item}}</view>
</view>
<!-- <view>{{index}}</view> -->
<!-- 对base64编码进行解码成图片 -->
<view>
<view wx:for="{{image}}">
<!-- 设置图片的样式,两张图片并排 -->
<view class="school-list">
<view class="school-list-info" >
<image class="school-list-photo" src="data:image/png;base64,{{item}}"></image>
<!-- <text class="school-list-desc">{{item.content}}</text> -->
</view>
</view>
<!-- 设置是否给通过 -->
</view>
<button bindtap="backR" >通过</button>
<view style="height: 50rpx;"></view>
<button bindtap="backE" >不通过</button>
<!-- 设置一些间距 -->
<view style="height: 100rpx;"></view>
</view>
<!-- <view>{{image}}</view> -->

@ -0,0 +1,14 @@
/* pages/info/info.wxss */
.schoollist{
margin-top: 20rpx;
}
.school-list-info{
float: left;
margin-left: 20rpx;
margin-top: 20rpx;
position: relative;
}
.school-list-photo{
width: 350rpx;
height: 700rpx;
}

@ -0,0 +1,66 @@
// pages/set/set.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

@ -0,0 +1,6 @@
<!--pages/set/set.wxml-->
<view class="header">
<!-- 代码 -->
<image class="bg_ware" src="https://codermoyv.gitee.io/coder-moyv/assets/images/wechat/bg_wave.gif"></image>
</view>

@ -0,0 +1,31 @@
.banner{
width: 100%;
height: 550rpx;
}
.banner swiper{
height: 100%;
width: 100%;
}
.banner image{
width: 100%;
height: 550rpx;
}
.header {
position: relative;
height:300rpx;
background: linear-gradient(to bottom, #56ccf2, #2f80ed);
}
.bg_ware {
position: absolute;
left: 0;
bottom: -2rpx;
width: 100%;
mix-blend-mode: screen;
height: 120rpx;
}

@ -0,0 +1,160 @@
// pages/user/user.js
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
cc:"sdasdasd",
swiperList: [
{
type: 'video',
url: 'https://static.51dh.com.cn/dbp/12/98/4494bd8a6e0fcd4a992f25a42bea28f8d1fb.mp4'
}, {
type: 'image',
url: 'https://bj.bcebos.com/shitu-query-bj/2022-11-25/12/65c8785efdf614c0?authorization=bce-auth-v1%2F7e22d8caf5af46cc9310f1e3021709f3%2F2022-11-25T04%3A21%3A48Z%2F300%2F%2Fcba06b77ff3338331ba50868a058fa1e01045adb673ced5692d04f84009ca4aa'
}, {
type: 'image',
url: 'https://bj.bcebos.com/shitu-query-bj/2022-11-25/12/a12f2c0208db3f56?authorization=bce-auth-v1%2F7e22d8caf5af46cc9310f1e3021709f3%2F2022-11-25T04%3A20%3A16Z%2F300%2F%2F2d395d19e9b327015c749f3e9edfa863b1d73c8da8d935a87f8f00d34b482ba4',
}, {
type: 'image',
url: 'https://i.postimg.cc/pXDp6RXq/susu3.jpg'
}, {
type: 'image',
url: 'https://i.postimg.cc/XJmpTvCD/susu2.jpg'
}, {
type: 'image',
url: 'https://i.postimg.cc/76br1jzJ/susu1.jpg'
}, {
type: 'image',
url: 'https://i.postimg.cc/pXDp6RXq/susu3.jpg'
},
{
type: 'image',
url: 'https://i.postimg.cc/XJmpTvCD/susu2.jpg'
},
],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.tauchSwiper('swiperList');
},
// 初始化tauchSwiper
tauchSwiper(name) {
let list = this.data[name];
for (let i = 0; i < list.length; i++) {
// Math.abs(x) 函数返回指定数字 “x“ 的绝对值
list[i].zIndex = parseInt(list.length / 2) + 1 - Math.abs(i - parseInt(list.length / 2))
list[i].mLeft = i - parseInt(list.length / 2)
}
this.setData({
swiperList: list
})
},
// tauchSwiper触摸开始
tauchStart(e) {
this.setData({
tauchStart: e.touches[0].pageX
})
},
// tauchSwiper计算方向
tauchMove(e) {
this.setData({
direction: e.touches[0].pageX - this.data.tauchStart > 0 ? 'right' : 'left'
})
},
// tauchSwiper计算滚动
tauchEnd(e) {
let direction = this.data.direction;
let list = this.data.swiperList;
if (direction == 'right') {
let mLeft = list[0].mLeft;
let zIndex = list[0].zIndex;
for (let i = 1; i < list.length; i++) {
list[i - 1].mLeft = list[i].mLeft
list[i - 1].zIndex = list[i].zIndex
}
list[list.length - 1].mLeft = mLeft;
list[list.length - 1].zIndex = zIndex;
this.setData({
swiperList: list
})
} else {
let mLeft = list[list.length - 1].mLeft;
let zIndex = list[list.length - 1].zIndex;
for (let i = list.length - 1; i > 0; i--) {
list[i].mLeft = list[i - 1].mLeft
list[i].zIndex = list[i - 1].zIndex
}
list[0].mLeft = mLeft;
list[0].zIndex = zIndex;
this.setData({
swiperList: list
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// 修改全局变量值的时候再用 =其他时候用setData
this.setData({
cc:app.globalData.globalsno
})
console.log(app.globalData.globalsno)
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save