Initial commit
This commit is contained in:
17
.idea/compiler.xml
generated
Normal file
17
.idea/compiler.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<annotationProcessing>
|
||||||
|
<profile name="Maven default annotation processors profile" enabled="true">
|
||||||
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
|
<outputRelativeToContentRoot value="true" />
|
||||||
|
<module name="smartlive-admin" />
|
||||||
|
<module name="smartlive-framework" />
|
||||||
|
<module name="smartlive-system" />
|
||||||
|
<module name="smart-position-watch" />
|
||||||
|
<module name="smartlive-common" />
|
||||||
|
</profile>
|
||||||
|
</annotationProcessing>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
17
.idea/encodings.xml
generated
Normal file
17
.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding">
|
||||||
|
<file url="file://$PROJECT_DIR$/smart-position-watch/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/smart-position-watch/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/smartlive-admin/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/smartlive-admin/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/smartlive-common/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/smartlive-common/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/smartlive-framework/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/smartlive-framework/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/smartlive-system/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/smartlive-system/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
25
.idea/jarRepositories.xml
generated
Normal file
25
.idea/jarRepositories.xml
generated
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="public" />
|
||||||
|
<option name="name" value="aliyun nexus" />
|
||||||
|
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Central Repository" />
|
||||||
|
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
12
.idea/misc.xml
generated
Normal file
12
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="MavenProjectsManager">
|
||||||
|
<option name="originalFiles">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK" />
|
||||||
|
</project>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
190
.idea/workspace.xml
generated
Normal file
190
.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
<?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="addfa900-73c8-4ad8-9805-c1e0dfdf2c58" name="Changes" 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="FileTemplateManagerImpl">
|
||||||
|
<option name="RECENT_TEMPLATES">
|
||||||
|
<list>
|
||||||
|
<option value="Interface" />
|
||||||
|
<option value="Class" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</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="MavenImportPreferences">
|
||||||
|
<option name="generalSettings">
|
||||||
|
<MavenGeneralSettings>
|
||||||
|
<option name="mavenHome" value="$PROJECT_DIR$/../../../java/apache-maven-3.6.0" />
|
||||||
|
<option name="useMavenConfig" value="true" />
|
||||||
|
<option name="userSettingsFile" value="D:\java\apache-maven-3.6.0\conf\settings.xml" />
|
||||||
|
</MavenGeneralSettings>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProblemsViewState">
|
||||||
|
<option name="selectedTabId" value="CurrentFile" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectId" id="36NB6YmIxFUbDCrYGiFVWVmI2Mr" />
|
||||||
|
<component name="ProjectViewState">
|
||||||
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
|
<option name="showLibraryContents" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">{
|
||||||
|
"keyToString": {
|
||||||
|
"RequestMappingsPanelOrder0": "0",
|
||||||
|
"RequestMappingsPanelOrder1": "1",
|
||||||
|
"RequestMappingsPanelWidth0": "75",
|
||||||
|
"RequestMappingsPanelWidth1": "75",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"WebServerToolWindowFactoryState": "false",
|
||||||
|
"last_opened_file_path": "D:/javaProject/ceshiProject/smart_netty",
|
||||||
|
"node.js.detected.package.eslint": "true",
|
||||||
|
"node.js.detected.package.tslint": "true",
|
||||||
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
|
"nodejs_package_manager_path": "npm",
|
||||||
|
"run.code.analysis.last.selected.profile": "pProject Default",
|
||||||
|
"settings.editor.selected.configurable": "MavenSettings",
|
||||||
|
"spring.configuration.checksum": "e4d6fc2a447bf0856d23d09850674ed3",
|
||||||
|
"vue.rearranger.settings.migration": "true"
|
||||||
|
}
|
||||||
|
}</component>
|
||||||
|
<component name="ReactorSettings">
|
||||||
|
<option name="notificationShown" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="RecentsManager">
|
||||||
|
<key name="CopyFile.RECENT_KEYS">
|
||||||
|
<recent name="D:\javaProject\ceshiProject\smart_netty\smart-position-watch\src\main\java\com\smartlive\bswatch\service\impl" />
|
||||||
|
<recent name="D:\javaProject\ceshiProject\smart_netty\smart-position-watch\src\main\java\com\smartlive\bswatch\service" />
|
||||||
|
<recent name="D:\javaProject\ceshiProject\smart_netty\smart-position-watch\src\main\java\com\smartlive\bswatch\entity" />
|
||||||
|
<recent name="D:\javaProject\ceshiProject\smart_netty\smart-position-watch\src\main\java\com\smartlive\bswatch\mapper" />
|
||||||
|
<recent name="D:\javaProject\ceshiProject\smart_netty\smart-position-watch\src\main\resources\mapper\bswatch" />
|
||||||
|
</key>
|
||||||
|
<key name="CopyClassDialog.RECENTS_KEY">
|
||||||
|
<recent name="com.smartlive.bswatch.controller.common" />
|
||||||
|
<recent name="com.smartlive.bswatch.vo.commandVO" />
|
||||||
|
</key>
|
||||||
|
</component>
|
||||||
|
<component name="RunManager" selected="Spring Boot.RuoYiApplication">
|
||||||
|
<configuration name="AESUtils" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||||
|
<option name="MAIN_CLASS_NAME" value="com.smartlive.common.utils.AESUtils" />
|
||||||
|
<module name="smartlive-common" />
|
||||||
|
<extension name="coverage">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="com.smartlive.common.utils.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
<configuration name="IdUtils" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||||
|
<option name="MAIN_CLASS_NAME" value="com.smartlive.common.utils.uuid.IdUtils" />
|
||||||
|
<module name="smartlive-common" />
|
||||||
|
<extension name="coverage">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="com.smartlive.common.utils.uuid.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
<configuration name="TimesUtil" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||||
|
<option name="MAIN_CLASS_NAME" value="com.smartlive.bswatch.utils.TimesUtil" />
|
||||||
|
<module name="smart-position-watch" />
|
||||||
|
<extension name="coverage">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="com.smartlive.bswatch.utils.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="JetRunConfigurationType">
|
||||||
|
<module name="smart_netty" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
<configuration default="true" type="KotlinStandaloneScriptRunConfigurationType">
|
||||||
|
<module name="smart_netty" />
|
||||||
|
<option name="filePath" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
<configuration name="RuoYiApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
|
||||||
|
<module name="smartlive-admin" />
|
||||||
|
<option name="SPRING_BOOT_MAIN_CLASS" value="com.smartlive.RuoYiApplication" />
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
<recent_temporary>
|
||||||
|
<list>
|
||||||
|
<item itemvalue="Application.IdUtils" />
|
||||||
|
<item itemvalue="Application.AESUtils" />
|
||||||
|
<item itemvalue="Application.TimesUtil" />
|
||||||
|
</list>
|
||||||
|
</recent_temporary>
|
||||||
|
</component>
|
||||||
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
|
<component name="SpringBootOptions">
|
||||||
|
<option name="showAdditionalConfigNotification" value="false" />
|
||||||
|
</component>
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="addfa900-73c8-4ad8-9805-c1e0dfdf2c58" name="Changes" comment="" />
|
||||||
|
<created>1764836974735</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1764836974735</updated>
|
||||||
|
<workItem from="1764836976152" duration="8931000" />
|
||||||
|
<workItem from="1765435655759" duration="4774000" />
|
||||||
|
<workItem from="1765504194709" duration="4645000" />
|
||||||
|
<workItem from="1765758719755" duration="20460000" />
|
||||||
|
<workItem from="1765964069142" duration="5956000" />
|
||||||
|
<workItem from="1766022916441" duration="23124000" />
|
||||||
|
<workItem from="1766367233212" duration="8747000" />
|
||||||
|
<workItem from="1766968962073" duration="10142000" />
|
||||||
|
<workItem from="1767519513906" duration="82000" />
|
||||||
|
<workItem from="1767519603900" duration="559000" />
|
||||||
|
<workItem from="1767520197273" duration="36452000" />
|
||||||
|
<workItem from="1767834438539" duration="1941000" />
|
||||||
|
<workItem from="1767858924997" duration="196000" />
|
||||||
|
<workItem from="1767859167504" duration="1318000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="3" />
|
||||||
|
</component>
|
||||||
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
<option name="TAB_STATES">
|
||||||
|
<map>
|
||||||
|
<entry key="MAIN">
|
||||||
|
<value>
|
||||||
|
<State />
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
20
LICENSE
Normal file
20
LICENSE
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2018 RuoYi
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
232
pom.xml
Normal file
232
pom.xml
Normal file
@@ -0,0 +1,232 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<groupId>com.smartlive</groupId>
|
||||||
|
<artifactId>smartlive</artifactId>
|
||||||
|
<version>3.8.8</version>
|
||||||
|
|
||||||
|
<name>smartlive</name>
|
||||||
|
<url>http://www.ruoyi.vip</url>
|
||||||
|
<description>智慧生活平台</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<smartlive.version>3.8.8</smartlive.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||||
|
<spring-framework.version>5.3.33</spring-framework.version>
|
||||||
|
<spring-security.version>5.7.12</spring-security.version>
|
||||||
|
<druid.version>1.2.23</druid.version>
|
||||||
|
<bitwalker.version>1.21</bitwalker.version>
|
||||||
|
<swagger.version>3.0.0</swagger.version>
|
||||||
|
<kaptcha.version>2.3.3</kaptcha.version>
|
||||||
|
<pagehelper.boot.version>1.4.7</pagehelper.boot.version>
|
||||||
|
<fastjson.version>2.0.43</fastjson.version>
|
||||||
|
<oshi.version>6.6.1</oshi.version>
|
||||||
|
<commons.io.version>2.13.0</commons.io.version>
|
||||||
|
<poi.version>4.1.2</poi.version>
|
||||||
|
<velocity.version>2.3</velocity.version>
|
||||||
|
<jwt.version>0.9.1</jwt.version>
|
||||||
|
<mybatis-plus.version>3.5.2</mybatis-plus.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<!-- 依赖声明 -->
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
<version>${mybatis-plus.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- SpringFramework的依赖配置-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework</groupId>
|
||||||
|
<artifactId>spring-framework-bom</artifactId>
|
||||||
|
<version>${spring-framework.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringSecurity的依赖配置-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.security</groupId>
|
||||||
|
<artifactId>spring-security-bom</artifactId>
|
||||||
|
<version>${spring-security.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- SpringBoot的依赖配置-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-dependencies</artifactId>
|
||||||
|
<version>2.5.15</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 阿里数据库连接池 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>druid-spring-boot-starter</artifactId>
|
||||||
|
<version>${druid.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 解析客户端操作系统、浏览器等 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>eu.bitwalker</groupId>
|
||||||
|
<artifactId>UserAgentUtils</artifactId>
|
||||||
|
<version>${bitwalker.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- pagehelper 分页插件 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.pagehelper</groupId>
|
||||||
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
|
<version>${pagehelper.boot.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 获取系统信息 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.oshi</groupId>
|
||||||
|
<artifactId>oshi-core</artifactId>
|
||||||
|
<version>${oshi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Swagger3依赖 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-boot-starter</artifactId>
|
||||||
|
<version>${swagger.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>io.swagger</groupId>
|
||||||
|
<artifactId>swagger-models</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- io常用工具类 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-io</groupId>
|
||||||
|
<artifactId>commons-io</artifactId>
|
||||||
|
<version>${commons.io.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- excel工具 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.poi</groupId>
|
||||||
|
<artifactId>poi-ooxml</artifactId>
|
||||||
|
<version>${poi.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- velocity代码生成使用模板 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.velocity</groupId>
|
||||||
|
<artifactId>velocity-engine-core</artifactId>
|
||||||
|
<version>${velocity.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 阿里JSON解析器 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba.fastjson2</groupId>
|
||||||
|
<artifactId>fastjson2</artifactId>
|
||||||
|
<version>${fastjson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Token生成与解析-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.jsonwebtoken</groupId>
|
||||||
|
<artifactId>jjwt</artifactId>
|
||||||
|
<version>${jwt.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 验证码 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>pro.fessional</groupId>
|
||||||
|
<artifactId>kaptcha</artifactId>
|
||||||
|
<version>${kaptcha.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 核心模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.smartlive</groupId>
|
||||||
|
<artifactId>smartlive-framework</artifactId>
|
||||||
|
<version>${smartlive.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 系统模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.smartlive</groupId>
|
||||||
|
<artifactId>smartlive-system</artifactId>
|
||||||
|
<version>${smartlive.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 通用工具-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.smartlive</groupId>
|
||||||
|
<artifactId>smartlive-common</artifactId>
|
||||||
|
<version>${smartlive.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.qcloudsms</groupId>
|
||||||
|
<artifactId>qcloudsms</artifactId>
|
||||||
|
<version>1.0.6</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>smartlive-admin</module>
|
||||||
|
<module>smartlive-framework</module>
|
||||||
|
<module>smartlive-system</module>
|
||||||
|
<module>smartlive-common</module>
|
||||||
|
<module>smart-position-watch</module>
|
||||||
|
</modules>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>${java.version}</source>
|
||||||
|
<target>${java.version}</target>
|
||||||
|
<encoding>${project.build.sourceEncoding}</encoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>public</id>
|
||||||
|
<name>aliyun nexus</name>
|
||||||
|
<url>https://maven.aliyun.com/repository/public</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>public</id>
|
||||||
|
<name>aliyun nexus</name>
|
||||||
|
<url>https://maven.aliyun.com/repository/public</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
|
||||||
|
</project>
|
||||||
31
smart-position-watch/.gitignore
vendored
Normal file
31
smart-position-watch/.gitignore
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
HELP.md
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
!**/src/main/**
|
||||||
|
!**/src/test/**
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
.sts4-cache
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### NetBeans ###
|
||||||
|
/nbproject/private/
|
||||||
|
/nbbuild/
|
||||||
|
/dist/
|
||||||
|
/nbdist/
|
||||||
|
/.nb-gradle/
|
||||||
|
build/
|
||||||
|
|
||||||
|
### VS Code ###
|
||||||
|
.vscode/
|
||||||
33
smart-position-watch/pom.xml
Normal file
33
smart-position-watch/pom.xml
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>smartlive</artifactId>
|
||||||
|
<groupId>com.smartlive</groupId>
|
||||||
|
<version>3.8.8</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>smart-position-watch</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.smartlive</groupId>
|
||||||
|
<artifactId>smartlive-system</artifactId>
|
||||||
|
<version>3.8.8</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.aspectj</groupId>
|
||||||
|
<artifactId>aspectjweaver</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>5.8.11</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.smartlive.bswatch.TO;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/6/10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class Casts {
|
||||||
|
/**
|
||||||
|
* 日期 yyyy-MM-dd格式
|
||||||
|
*/
|
||||||
|
private String date;
|
||||||
|
/**
|
||||||
|
* 周几,1-7 周一至周日
|
||||||
|
*/
|
||||||
|
private String week;
|
||||||
|
/**
|
||||||
|
* 白天天气
|
||||||
|
*/
|
||||||
|
private String dayweather;
|
||||||
|
/**
|
||||||
|
* 夜间天气
|
||||||
|
*/
|
||||||
|
private String nightweather;
|
||||||
|
/**
|
||||||
|
* 白天温度,最高气温
|
||||||
|
*/
|
||||||
|
private String daytemp;
|
||||||
|
/**
|
||||||
|
* 夜间天气
|
||||||
|
*/
|
||||||
|
private String nighttemp;
|
||||||
|
/**
|
||||||
|
* 白天风向
|
||||||
|
*/
|
||||||
|
private String daywind;
|
||||||
|
/**
|
||||||
|
* 夜间风向
|
||||||
|
*/
|
||||||
|
private String nightwind;
|
||||||
|
/**
|
||||||
|
* 白天风力
|
||||||
|
*/
|
||||||
|
private String daypower;
|
||||||
|
/**
|
||||||
|
* 晚上风力
|
||||||
|
*/
|
||||||
|
private String nightpower;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.smartlive.bswatch.TO;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class HeathReportTO {
|
||||||
|
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
private String watchName;
|
||||||
|
|
||||||
|
private String reportTitle;
|
||||||
|
|
||||||
|
private String createTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
package com.smartlive.bswatch.TO;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/6
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LocationTO {
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private BigDecimal longitude;
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private BigDecimal latitude;
|
||||||
|
/**
|
||||||
|
* 地址信息
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定位时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址区划信息:
|
||||||
|
*/
|
||||||
|
private String areaCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 高德智能定位返回的是7位小数,系统存储的是6位小数,进行处理
|
||||||
|
* @param longitude
|
||||||
|
*/
|
||||||
|
public void setLongitude(BigDecimal longitude) {
|
||||||
|
int scale = 6; // 指定小数位数
|
||||||
|
RoundingMode roundingMode = RoundingMode.HALF_UP; // 四舍五入模式
|
||||||
|
this.longitude = longitude.setScale(scale, roundingMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(BigDecimal latitude) {
|
||||||
|
int scale = 6; // 指定小数位数
|
||||||
|
RoundingMode roundingMode = RoundingMode.HALF_UP; // 四舍五入模式
|
||||||
|
this.latitude = latitude.setScale(scale, roundingMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
LocationTO that = (LocationTO) o;
|
||||||
|
//使用compareTo进行比较
|
||||||
|
return this.compareBigDecimal(longitude, that.longitude) && this.compareBigDecimal(latitude, that.latitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(longitude, latitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean compareBigDecimal(BigDecimal a, BigDecimal b){
|
||||||
|
if(a == b) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if(a == null || b == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return a.compareTo(b) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
// LocationTO locationTO = new LocationTO();
|
||||||
|
// locationTO.setLongitude(new BigDecimal("0.000000"));
|
||||||
|
// locationTO.setLatitude(new BigDecimal("0.000000"));
|
||||||
|
//
|
||||||
|
// LocationTO locationTO1 = new LocationTO();
|
||||||
|
// // locationTO1.setLongitude(new BigDecimal("0.000000"));
|
||||||
|
// // locationTO1.setLatitude(new BigDecimal("1.000000"));
|
||||||
|
// System.out.println(locationTO.equals(locationTO1));
|
||||||
|
|
||||||
|
|
||||||
|
BigDecimal longitude = new BigDecimal("123.4");
|
||||||
|
int scale = 4; // 指定小数位数
|
||||||
|
RoundingMode roundingMode = RoundingMode.HALF_UP; // 四舍五入模式
|
||||||
|
|
||||||
|
BigDecimal roundedLongitude = longitude.setScale(scale, roundingMode);
|
||||||
|
System.out.println(roundedLongitude);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.smartlive.bswatch.TO;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.poi.hpsf.Decimal;
|
||||||
|
|
||||||
|
import javax.validation.constraints.DecimalMin;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单请求参数
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PayRequestTO{
|
||||||
|
|
||||||
|
@NotNull(message = "用户ID不能为空")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@NotNull(message = "支付类型不能为空")
|
||||||
|
private Integer payType;
|
||||||
|
|
||||||
|
@Min(value = 1, message = "商品数量不能小于1")
|
||||||
|
private Integer num;
|
||||||
|
|
||||||
|
@DecimalMin(value = "0.00", message = "金额不能小于0")
|
||||||
|
private BigDecimal money;
|
||||||
|
|
||||||
|
@NotNull(message = "商品不能为空")
|
||||||
|
private Integer watchId;
|
||||||
|
|
||||||
|
@NotNull(message = "地址不能为空")
|
||||||
|
private Long addressId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.smartlive.bswatch.TO;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规则匹配上下文
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RuleMatchContext {
|
||||||
|
|
||||||
|
//"指标类型"
|
||||||
|
private String indicatorType;
|
||||||
|
|
||||||
|
//"总测量次数"
|
||||||
|
private Integer totalCount;
|
||||||
|
|
||||||
|
//"异常次数"
|
||||||
|
private Integer abnormalCount;
|
||||||
|
|
||||||
|
//"过缓次数"
|
||||||
|
private Integer bradycardiaCount;
|
||||||
|
|
||||||
|
//"过速次数"
|
||||||
|
private Integer tachycardiaCount;
|
||||||
|
|
||||||
|
//"偏低次数"
|
||||||
|
private Integer lowCount;
|
||||||
|
|
||||||
|
//"偏高次数"
|
||||||
|
private Integer highCount;
|
||||||
|
|
||||||
|
//"异常比例"
|
||||||
|
private BigDecimal abnormalRatio;
|
||||||
|
|
||||||
|
public RuleMatchContext(String indicatorType) {
|
||||||
|
this.indicatorType = indicatorType;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.smartlive.bswatch.TO;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/5
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StepTO {
|
||||||
|
/**
|
||||||
|
* 步数对应的哪一天
|
||||||
|
*/
|
||||||
|
private String date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 步数
|
||||||
|
*/
|
||||||
|
private Integer stepCount;
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
package com.smartlive.bswatch.TO;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.enmus.WatchApiEnum;
|
||||||
|
import com.smartlive.bswatch.entity.WatchDevice;
|
||||||
|
import com.smartlive.bswatch.netty.watchvo.MessageHeaderVO;
|
||||||
|
import com.smartlive.bswatch.netty.watchvo.MessageVO;
|
||||||
|
import com.smartlive.bswatch.netty.watchvo.req.deviceReq.LoginReq;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/5
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WatchDeviceTO {
|
||||||
|
//watch_sign(查询用),protocol_version,rfid,iccid
|
||||||
|
|
||||||
|
private String watchSign;
|
||||||
|
private String iccid;
|
||||||
|
private String protocolVersion;
|
||||||
|
private String rfid;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) return true;
|
||||||
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
WatchDeviceTO that = (WatchDeviceTO) o;
|
||||||
|
return Objects.equals(watchSign, that.watchSign) && Objects.equals(iccid, that.iccid) && Objects.equals(protocolVersion, that.protocolVersion) && Objects.equals(rfid, that.rfid);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(watchSign, iccid, protocolVersion, rfid);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static WatchDeviceTO messageToWatchDeviceTO(MessageVO messageVO){
|
||||||
|
if(messageVO==null || messageVO.getMessageHeader()==null || messageVO.getMessageBody()==null ){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
MessageHeaderVO messageHeaderVO=messageVO.getMessageHeader();
|
||||||
|
if(!WatchApiEnum.LOGIN.getApiName().equals(messageVO.getMessageHeader().getApiName())){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
LoginReq loginReq= (LoginReq) messageVO.getMessageBody();
|
||||||
|
WatchDeviceTO watchDeviceTO=new WatchDeviceTO();
|
||||||
|
watchDeviceTO.setWatchSign(messageHeaderVO.getWatchSign());
|
||||||
|
watchDeviceTO.setIccid(messageHeaderVO.getIccid());
|
||||||
|
watchDeviceTO.setProtocolVersion(loginReq.getProtocolVersion());
|
||||||
|
watchDeviceTO.setRfid(loginReq.getRfid());
|
||||||
|
return watchDeviceTO;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static WatchDeviceTO watchDeviceToWatchDeviceTO(WatchDevice watchDevice){
|
||||||
|
if(watchDevice==null){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
WatchDeviceTO watchDeviceTO=new WatchDeviceTO();
|
||||||
|
watchDeviceTO.setWatchSign(watchDevice.getWatchSign());
|
||||||
|
watchDeviceTO.setIccid(watchDevice.getIccid());
|
||||||
|
watchDeviceTO.setProtocolVersion(watchDevice.getProtocolVersion());
|
||||||
|
watchDeviceTO.setRfid(watchDevice.getRfid());
|
||||||
|
return watchDeviceTO;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.smartlive.bswatch.TO;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/6/10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WeatherForecast {
|
||||||
|
/**
|
||||||
|
* 市
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
/**
|
||||||
|
* 区划编码
|
||||||
|
*/
|
||||||
|
private String adcode;
|
||||||
|
/**
|
||||||
|
* 省
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
/**
|
||||||
|
* 发布时间
|
||||||
|
*/
|
||||||
|
private String reporttime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 天气预报
|
||||||
|
*/
|
||||||
|
private List<Casts> casts;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.smartlive.bswatch.TO;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/6/10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WeatherLive {
|
||||||
|
/**
|
||||||
|
* 省
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
/**
|
||||||
|
* 市
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
/**
|
||||||
|
* 区划编码
|
||||||
|
*/
|
||||||
|
private String adcode;
|
||||||
|
/**
|
||||||
|
* 天气:汉字描述
|
||||||
|
*/
|
||||||
|
private String weather;
|
||||||
|
/**
|
||||||
|
* 温度
|
||||||
|
*/
|
||||||
|
private String temperature;
|
||||||
|
/**
|
||||||
|
* 风向
|
||||||
|
*/
|
||||||
|
private String winddirection;
|
||||||
|
/**
|
||||||
|
* 风力
|
||||||
|
*/
|
||||||
|
private String windpower;
|
||||||
|
/**
|
||||||
|
* 湿度
|
||||||
|
*/
|
||||||
|
private String humidity;
|
||||||
|
/**
|
||||||
|
* 数据发布时间:yyyy-MM-dd HH:mm:ss格式
|
||||||
|
*/
|
||||||
|
private String reporttime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.smartlive.bswatch.TO;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/6/10
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class WeatherTO {
|
||||||
|
//"status": "1",
|
||||||
|
// "count": "1",
|
||||||
|
// "info": "OK",
|
||||||
|
// "infocode": "10000",
|
||||||
|
private String status;
|
||||||
|
private String count;
|
||||||
|
private String info;
|
||||||
|
private String infocode;
|
||||||
|
private List<WeatherForecast> forecasts;
|
||||||
|
private List<WeatherLive> lives;
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.smartlive.bswatch.annotation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/12
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备绑定校验注解
|
||||||
|
*/
|
||||||
|
@Target(java.lang.annotation.ElementType.METHOD)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
public @interface BindValidateAno {
|
||||||
|
/**
|
||||||
|
* 方法名
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String methodName() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务名
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String serviceName() default "";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务名称
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String bizName() default "";
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.smartlive.bswatch.aop;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.annotation.BindValidateAno;
|
||||||
|
import com.smartlive.common.enums.WatchReturnMessage;
|
||||||
|
import com.smartlive.bswatch.entity.WatchDevice;
|
||||||
|
import com.smartlive.bswatch.service.CommonService;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.CommonVO;
|
||||||
|
import com.smartlive.common.exception.ServiceException;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
|
import org.aspectj.lang.annotation.Around;
|
||||||
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
import org.aspectj.lang.annotation.Pointcut;
|
||||||
|
import org.aspectj.lang.reflect.MethodSignature;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/12
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Aspect
|
||||||
|
@Component
|
||||||
|
public class BindValidAop {
|
||||||
|
@Autowired
|
||||||
|
private CommonService commonService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切入点表达式:表示匹配带有注解BindValidateAno的方法
|
||||||
|
*/
|
||||||
|
@Pointcut("@annotation(com.smartlive.bswatch.annotation.BindValidateAno)")
|
||||||
|
public void pointcut() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 环绕通知
|
||||||
|
* @param joinPoint
|
||||||
|
* @return
|
||||||
|
* @throws Throwable
|
||||||
|
*/
|
||||||
|
@Around("pointcut()")
|
||||||
|
public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
|
||||||
|
// 获取注解携带参数
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
|
||||||
|
BindValidateAno bindValidateAno = methodSignature.getMethod().getAnnotation(BindValidateAno.class);
|
||||||
|
Object result= null;
|
||||||
|
if(bindValidateAno==null){
|
||||||
|
log.info("方法:{}没有注解BindValidateAno,直接放行",methodSignature.getName());
|
||||||
|
result= joinPoint.proceed();
|
||||||
|
long endTime = System.currentTimeMillis();
|
||||||
|
log.info("方法:{}执行时间:{}ms",methodSignature.getName(),endTime-startTime);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 解析注解参数
|
||||||
|
String serviceName = bindValidateAno.serviceName();
|
||||||
|
String methodName = bindValidateAno.methodName();
|
||||||
|
String bizName = bindValidateAno.bizName();
|
||||||
|
log.info("服务类:{} 方法:{} 注解参数:serviceName:{},methodName:{},bizName:{}",methodSignature.getName(),serviceName,methodName,bizName);
|
||||||
|
|
||||||
|
// 获取方法参数
|
||||||
|
Object[] args = joinPoint.getArgs();
|
||||||
|
if(args==null || args.length==0){
|
||||||
|
log.info("方法:{}没有参数,直接放行",methodSignature.getName());
|
||||||
|
result= joinPoint.proceed();
|
||||||
|
long endTime = System.currentTimeMillis();
|
||||||
|
log.info("方法:{}执行时间:{}ms",methodSignature.getName(),endTime-startTime);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
Object param = args[0];
|
||||||
|
if(param==null){
|
||||||
|
log.info("方法:{}参数为空,直接放行",methodSignature.getName());
|
||||||
|
result= joinPoint.proceed();
|
||||||
|
long endTime = System.currentTimeMillis();
|
||||||
|
log.info("方法:{}执行时间:{}ms",methodSignature.getName(),endTime-startTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(param instanceof CommonVO){
|
||||||
|
CommonVO commonVO = (CommonVO) param;
|
||||||
|
// 执行逻辑
|
||||||
|
// 查询数据库检验有无绑定设备
|
||||||
|
String empNo = commonVO.getEmpNo();
|
||||||
|
WatchDevice watchDevice = commonService.getWatchDeviceByEmpNo(empNo,commonVO.getWatchSign());
|
||||||
|
if(watchDevice==null || watchDevice.getWatchSign()==null){
|
||||||
|
log.info("员工编号:{}未绑定设备,抛出EMPLOYEE_UNBIND_DEVICE异常,不执行后续操作",empNo);
|
||||||
|
throw new ServiceException(WatchReturnMessage.EMPLOYEE_UNBIND_DEVICE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result = joinPoint.proceed();
|
||||||
|
long endTime = System.currentTimeMillis();
|
||||||
|
log.info("方法:{}执行时间:{}ms",methodSignature.getName(),endTime-startTime);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
package com.smartlive.bswatch.component;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alipay.api.AlipayApiException;
|
||||||
|
import com.alipay.api.AlipayClient;
|
||||||
|
import com.alipay.api.DefaultAlipayClient;
|
||||||
|
import com.alipay.api.domain.AlipayTradeAppPayModel;
|
||||||
|
import com.alipay.api.internal.util.AlipaySignature;
|
||||||
|
import com.alipay.api.request.AlipayTradeAppPayRequest;
|
||||||
|
import com.alipay.api.request.AlipayTradePagePayRequest;
|
||||||
|
import com.alipay.api.request.AlipayTradeQueryRequest;
|
||||||
|
import com.alipay.api.request.AlipayTradeRefundRequest;
|
||||||
|
import com.alipay.api.response.AlipayTradeAppPayResponse;
|
||||||
|
import com.alipay.api.response.AlipayTradePagePayResponse;
|
||||||
|
import com.alipay.api.response.AlipayTradeQueryResponse;
|
||||||
|
import com.alipay.api.response.AlipayTradeRefundResponse;
|
||||||
|
import com.smartlive.bswatch.config.AlipayConfig;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class AlipayUtil {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AlipayConfig alipayConfig;
|
||||||
|
|
||||||
|
private AlipayClient alipayClient;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取支付宝客户端
|
||||||
|
*/
|
||||||
|
private AlipayClient getAlipayClient() {
|
||||||
|
if (alipayClient == null) {
|
||||||
|
alipayClient = new DefaultAlipayClient(
|
||||||
|
alipayConfig.getGateway(),
|
||||||
|
alipayConfig.getAppId(),
|
||||||
|
alipayConfig.getPrivateKey(),
|
||||||
|
alipayConfig.getFormat(),
|
||||||
|
alipayConfig.getCharset(),
|
||||||
|
alipayConfig.getPublicKey(),
|
||||||
|
alipayConfig.getSignType()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return alipayClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建支付宝支付订单
|
||||||
|
*/
|
||||||
|
public String createOrder(String outTradeNo, String subject,
|
||||||
|
BigDecimal totalAmount, String body) throws AlipayApiException {
|
||||||
|
|
||||||
|
AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
|
||||||
|
|
||||||
|
// 设置异步回调地址
|
||||||
|
request.setNotifyUrl(alipayConfig.getNotifyUrl());
|
||||||
|
|
||||||
|
|
||||||
|
// 设置业务参数
|
||||||
|
// 设置业务参数
|
||||||
|
AlipayTradeAppPayModel model = new AlipayTradeAppPayModel();
|
||||||
|
model.setOutTradeNo(outTradeNo);
|
||||||
|
model.setSubject(subject);
|
||||||
|
model.setBody(body);
|
||||||
|
model.setTotalAmount(totalAmount.toString());
|
||||||
|
model.setProductCode(alipayConfig.getProductCode());
|
||||||
|
model.setTimeoutExpress(alipayConfig.getTimeoutExpress());
|
||||||
|
|
||||||
|
request.setBizModel(model);
|
||||||
|
|
||||||
|
|
||||||
|
// 生成支付订单信息
|
||||||
|
AlipayTradeAppPayResponse response = getAlipayClient().sdkExecute(request);
|
||||||
|
|
||||||
|
if (response.isSuccess()) {
|
||||||
|
log.info("支付宝APP支付订单创建成功,订单号:{}", outTradeNo);
|
||||||
|
return response.getBody();
|
||||||
|
} else {
|
||||||
|
log.error("支付宝支付订单创建失败: {}", response.getSubMsg());
|
||||||
|
throw new AlipayApiException(response.getSubMsg());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询支付宝订单
|
||||||
|
*/
|
||||||
|
public Map<String, String> queryOrder(String outTradeNo) throws AlipayApiException {
|
||||||
|
AlipayTradeQueryRequest request = new AlipayTradeQueryRequest();
|
||||||
|
|
||||||
|
Map<String, Object> bizContent = new HashMap<>();
|
||||||
|
bizContent.put("out_trade_no", outTradeNo);
|
||||||
|
request.setBizContent(JSON.toJSONString(bizContent));
|
||||||
|
|
||||||
|
AlipayTradeQueryResponse response = getAlipayClient().execute(request);
|
||||||
|
|
||||||
|
Map<String, String> result = new HashMap<>();
|
||||||
|
if (response.isSuccess()) {
|
||||||
|
result.put("tradeStatus", response.getTradeStatus());
|
||||||
|
result.put("tradeNo", response.getTradeNo());
|
||||||
|
result.put("totalAmount", response.getTotalAmount());
|
||||||
|
result.put("buyerUserId", response.getBuyerUserId());
|
||||||
|
result.put("buyerLogonId", response.getBuyerLogonId());
|
||||||
|
} else {
|
||||||
|
result.put("errorMsg", response.getSubMsg());
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付宝退款
|
||||||
|
*/
|
||||||
|
public boolean refund(String outTradeNo, String refundAmount,
|
||||||
|
String refundReason) throws AlipayApiException {
|
||||||
|
|
||||||
|
AlipayTradeRefundRequest request = new AlipayTradeRefundRequest();
|
||||||
|
|
||||||
|
Map<String, Object> bizContent = new HashMap<>();
|
||||||
|
bizContent.put("out_trade_no", outTradeNo);
|
||||||
|
bizContent.put("refund_amount", refundAmount);
|
||||||
|
bizContent.put("refund_reason", refundReason);
|
||||||
|
|
||||||
|
request.setBizContent(JSON.toJSONString(bizContent));
|
||||||
|
|
||||||
|
AlipayTradeRefundResponse response = getAlipayClient().execute(request);
|
||||||
|
|
||||||
|
return response.isSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证支付宝回调签名
|
||||||
|
*/
|
||||||
|
public boolean verifyCallback(HttpServletRequest request) {
|
||||||
|
try {
|
||||||
|
// 获取支付宝POST过来的反馈信息
|
||||||
|
Map<String, String> params = new HashMap<>();
|
||||||
|
Map<String, String[]> requestParams = request.getParameterMap();
|
||||||
|
|
||||||
|
for (Iterator<String> iter = requestParams.keySet().iterator(); iter.hasNext();) {
|
||||||
|
String name = iter.next();
|
||||||
|
String[] values = requestParams.get(name);
|
||||||
|
String valueStr = "";
|
||||||
|
for (int i = 0; i < values.length; i++) {
|
||||||
|
valueStr = (i == values.length - 1) ? valueStr + values[i] : valueStr + values[i] + ",";
|
||||||
|
}
|
||||||
|
params.put(name, valueStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 验证签名
|
||||||
|
boolean signVerified = AlipaySignature.rsaCheckV1(
|
||||||
|
params,
|
||||||
|
alipayConfig.getPublicKey(),
|
||||||
|
alipayConfig.getCharset(),
|
||||||
|
alipayConfig.getSignType()
|
||||||
|
);
|
||||||
|
|
||||||
|
return signVerified;
|
||||||
|
|
||||||
|
} catch (AlipayApiException e) {
|
||||||
|
log.error("支付宝回调签名验证失败", e);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理支付宝回调参数
|
||||||
|
*/
|
||||||
|
public Map<String, String> processCallbackParams(HttpServletRequest request) {
|
||||||
|
Map<String, String> params = new HashMap<>();
|
||||||
|
|
||||||
|
// 获取所有参数
|
||||||
|
Map<String, String[]> requestParams = request.getParameterMap();
|
||||||
|
for (String key : requestParams.keySet()) {
|
||||||
|
String[] values = requestParams.get(key);
|
||||||
|
String valueStr = "";
|
||||||
|
for (int i = 0; i < values.length; i++) {
|
||||||
|
valueStr = (i == values.length - 1) ? valueStr + values[i] : valueStr + values[i] + ",";
|
||||||
|
}
|
||||||
|
params.put(key, valueStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,225 @@
|
|||||||
|
package com.smartlive.bswatch.component;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.config.WechatPayConfig;
|
||||||
|
import com.wechat.pay.java.core.Config;
|
||||||
|
import com.wechat.pay.java.core.RSAAutoCertificateConfig;
|
||||||
|
import com.wechat.pay.java.service.payments.app.AppService;
|
||||||
|
import com.wechat.pay.java.service.payments.app.model.Amount;
|
||||||
|
import com.wechat.pay.java.service.payments.app.model.PrepayRequest;
|
||||||
|
import com.wechat.pay.java.service.payments.app.model.PrepayResponse;
|
||||||
|
import com.wechat.pay.java.service.payments.model.Transaction;
|
||||||
|
import com.wechat.pay.java.core.notification.NotificationConfig;
|
||||||
|
import com.wechat.pay.java.core.notification.NotificationParser;
|
||||||
|
import com.wechat.pay.java.core.notification.RequestParam;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class WechatPayUtil {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WechatPayConfig wechatAppConfig;
|
||||||
|
|
||||||
|
private AppService appService;
|
||||||
|
|
||||||
|
private NotificationParser notificationParser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取微信APP支付服务
|
||||||
|
*/
|
||||||
|
private AppService getAppService() {
|
||||||
|
if (appService == null) {
|
||||||
|
Config config = new RSAAutoCertificateConfig.Builder()
|
||||||
|
.merchantId(wechatAppConfig.getMchId())
|
||||||
|
.privateKey(wechatAppConfig.getPrivateKey())
|
||||||
|
.merchantSerialNumber(wechatAppConfig.getMchSerialNo())
|
||||||
|
.apiV3Key(wechatAppConfig.getApiV3Key())
|
||||||
|
.build();
|
||||||
|
appService = new AppService.Builder().config(config).build();
|
||||||
|
}
|
||||||
|
return appService;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取通知解析器
|
||||||
|
*/
|
||||||
|
private NotificationParser getNotificationParser() {
|
||||||
|
if (notificationParser == null) {
|
||||||
|
NotificationConfig config = new RSAAutoCertificateConfig.Builder()
|
||||||
|
.merchantId(wechatAppConfig.getMchId())
|
||||||
|
.privateKey(wechatAppConfig.getPrivateKey())
|
||||||
|
.merchantSerialNumber(wechatAppConfig.getMchSerialNo())
|
||||||
|
.apiV3Key(wechatAppConfig.getApiV3Key())
|
||||||
|
.build();
|
||||||
|
notificationParser = new NotificationParser(config);
|
||||||
|
}
|
||||||
|
return notificationParser;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建微信APP支付订单
|
||||||
|
*/
|
||||||
|
public Map<String, String> createAppOrder(String outTradeNo, String description,
|
||||||
|
BigDecimal totalAmount) throws Exception {
|
||||||
|
|
||||||
|
AppService service = getAppService();
|
||||||
|
|
||||||
|
PrepayRequest request = new PrepayRequest();
|
||||||
|
request.setAppid(wechatAppConfig.getAppId());
|
||||||
|
request.setMchid(wechatAppConfig.getMchId());
|
||||||
|
request.setDescription(description);
|
||||||
|
request.setOutTradeNo(outTradeNo);
|
||||||
|
request.setNotifyUrl(wechatAppConfig.getNotifyUrl());
|
||||||
|
|
||||||
|
// 设置金额(单位:分)
|
||||||
|
Amount amount = new Amount();
|
||||||
|
amount.setTotal(totalAmount.multiply(new BigDecimal("100")).intValue());
|
||||||
|
request.setAmount(amount);
|
||||||
|
|
||||||
|
// 调用预支付API
|
||||||
|
PrepayResponse response = service.prepay(request);
|
||||||
|
|
||||||
|
// 生成调起微信APP的参数
|
||||||
|
return generateAppPayParams(response.getPrepayId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成调起微信APP支付的参数
|
||||||
|
*/
|
||||||
|
private Map<String, String> generateAppPayParams(String prepayId) {
|
||||||
|
Map<String, String> params = new HashMap<>();
|
||||||
|
|
||||||
|
String appId = wechatAppConfig.getAppId();
|
||||||
|
String partnerId = wechatAppConfig.getMchId();
|
||||||
|
String nonceStr = generateNonceStr();
|
||||||
|
String timeStamp = String.valueOf(System.currentTimeMillis() / 1000);
|
||||||
|
String packageValue = "Sign=WXPay";
|
||||||
|
|
||||||
|
// 构造签名参数
|
||||||
|
params.put("appid", appId);
|
||||||
|
params.put("partnerid", partnerId);
|
||||||
|
params.put("prepayid", prepayId);
|
||||||
|
params.put("package", packageValue);
|
||||||
|
params.put("noncestr", nonceStr);
|
||||||
|
params.put("timestamp", timeStamp);
|
||||||
|
|
||||||
|
// 生成签名
|
||||||
|
String sign = generateSign(params);
|
||||||
|
params.put("sign", sign);
|
||||||
|
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成签名(V3版本使用RSA签名)
|
||||||
|
*/
|
||||||
|
private String generateSign(Map<String, String> params) {
|
||||||
|
try {
|
||||||
|
// 构造签名字符串
|
||||||
|
List<String> keys = new ArrayList<>(params.keySet());
|
||||||
|
Collections.sort(keys);
|
||||||
|
|
||||||
|
StringBuilder signStr = new StringBuilder();
|
||||||
|
for (String key : keys) {
|
||||||
|
if ("sign".equals(key)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String value = params.get(key);
|
||||||
|
if (value != null && !value.trim().isEmpty()) {
|
||||||
|
signStr.append(key).append("=").append(value).append("&");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (signStr.length() > 0) {
|
||||||
|
signStr.setLength(signStr.length() - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
log.debug("微信APP支付签名字符串:{}", signStr.toString());
|
||||||
|
|
||||||
|
// 使用RSA签名
|
||||||
|
java.security.PrivateKey privateKey = loadPrivateKey(wechatAppConfig.getPrivateKey());
|
||||||
|
java.security.Signature signature = java.security.Signature.getInstance("SHA256withRSA");
|
||||||
|
signature.initSign(privateKey);
|
||||||
|
signature.update(signStr.toString().getBytes("UTF-8"));
|
||||||
|
|
||||||
|
byte[] signBytes = signature.sign();
|
||||||
|
return Base64.getEncoder().encodeToString(signBytes);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("生成微信APP支付签名失败", e);
|
||||||
|
throw new RuntimeException("生成签名失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加载私钥
|
||||||
|
*/
|
||||||
|
private java.security.PrivateKey loadPrivateKey(String privateKeyContent) throws Exception {
|
||||||
|
String privateKeyPEM = privateKeyContent
|
||||||
|
.replace("-----BEGIN PRIVATE KEY-----", "")
|
||||||
|
.replace("-----END PRIVATE KEY-----", "")
|
||||||
|
.replaceAll("\\s+", "");
|
||||||
|
|
||||||
|
byte[] keyBytes = Base64.getDecoder().decode(privateKeyPEM);
|
||||||
|
java.security.spec.PKCS8EncodedKeySpec keySpec =
|
||||||
|
new java.security.spec.PKCS8EncodedKeySpec(keyBytes);
|
||||||
|
java.security.KeyFactory keyFactory = java.security.KeyFactory.getInstance("RSA");
|
||||||
|
return keyFactory.generatePrivate(keySpec);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成随机字符串
|
||||||
|
*/
|
||||||
|
private String generateNonceStr() {
|
||||||
|
return UUID.randomUUID().toString().replaceAll("-", "").substring(0, 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理微信支付回调
|
||||||
|
*/
|
||||||
|
public Transaction handleNotify(HttpServletRequest httpRequest) {
|
||||||
|
try {
|
||||||
|
// 构建请求参数
|
||||||
|
RequestParam requestParam = new RequestParam.Builder()
|
||||||
|
.serialNumber(httpRequest.getHeader("Wechatpay-Serial"))
|
||||||
|
.nonce(httpRequest.getHeader("Wechatpay-Nonce"))
|
||||||
|
.signature(httpRequest.getHeader("Wechatpay-Signature"))
|
||||||
|
.timestamp(httpRequest.getHeader("Wechatpay-Timestamp"))
|
||||||
|
.signType(httpRequest.getHeader("Wechatpay-Signature-Type"))
|
||||||
|
.body(getRequestBody(httpRequest))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// 验证签名并解析通知
|
||||||
|
NotificationParser parser = getNotificationParser();
|
||||||
|
return parser.parse(requestParam, Transaction.class);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("处理微信支付回调失败", e);
|
||||||
|
throw new RuntimeException("处理微信支付回调失败:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取请求体
|
||||||
|
*/
|
||||||
|
private String getRequestBody(HttpServletRequest request) {
|
||||||
|
StringBuilder stringBuilder = new StringBuilder();
|
||||||
|
try (BufferedReader reader = request.getReader()) {
|
||||||
|
String line;
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
stringBuilder.append(line);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("读取请求体失败", e);
|
||||||
|
}
|
||||||
|
return stringBuilder.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.smartlive.bswatch.config;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Component
|
||||||
|
@ConfigurationProperties(prefix = "alipay")
|
||||||
|
public class AlipayConfig {
|
||||||
|
|
||||||
|
// 应用ID
|
||||||
|
private String appId;
|
||||||
|
|
||||||
|
// 商户私钥
|
||||||
|
private String privateKey;
|
||||||
|
|
||||||
|
// 支付宝公钥
|
||||||
|
private String publicKey;
|
||||||
|
|
||||||
|
// 支付宝网关
|
||||||
|
private String gateway = "https://openapi.alipay.com/gateway.do";
|
||||||
|
|
||||||
|
// 编码格式
|
||||||
|
private String charset = "UTF-8";
|
||||||
|
|
||||||
|
// 签名算法类型
|
||||||
|
private String signType = "RSA2";
|
||||||
|
|
||||||
|
// 异步通知地址
|
||||||
|
private String notifyUrl;
|
||||||
|
|
||||||
|
// 格式
|
||||||
|
private String format = "json";
|
||||||
|
|
||||||
|
// 超时时间(分钟)
|
||||||
|
private String timeoutExpress = "30m";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取产品码
|
||||||
|
*/
|
||||||
|
public String getProductCode() {
|
||||||
|
return "QUICK_MSECURITY_PAY"; // APP支付产品码
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.smartlive.bswatch.config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/1/21
|
||||||
|
*/
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.enmus.WatchApiEnum;
|
||||||
|
import com.smartlive.bswatch.netty.watchvo.resp.commonResp.ErrorResp;
|
||||||
|
import com.smartlive.bswatch.netty.watchvo.resp.deviceResp.*;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Api名称与实体类class对象映射关系
|
||||||
|
*/
|
||||||
|
public class ApiEntityMap {
|
||||||
|
public static Map<String,Class> map = new HashMap<>();
|
||||||
|
static {
|
||||||
|
map.put(WatchApiEnum.LOGIN.getApiName(), LoginResp.class);
|
||||||
|
map.put(WatchApiEnum.GET_BUTTON.getApiName(), NormalButtonResp.class);
|
||||||
|
map.put(WatchApiEnum.GET_INCOME_CALL.getApiName(), IncomeCallResp.class);
|
||||||
|
map.put(WatchApiEnum.GET_CLASS_MODEL.getApiName(), ClassModelResp.class);
|
||||||
|
map.put(WatchApiEnum.GET_STUDENT_INFO.getApiName(), StudentInfoResp.class);
|
||||||
|
map.put(WatchApiEnum.ERROR_RESP.getApiName(), ErrorResp.class);
|
||||||
|
|
||||||
|
map.put(WatchApiEnum.SET_REDAY_MODE.getApiName(), SetRedayModeResp.class);
|
||||||
|
map.put(WatchApiEnum.SET_LOCATION_MODE.getApiName(), SetLocationModelResp.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.smartlive.bswatch.config;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/1/20
|
||||||
|
*/
|
||||||
|
public class TestConfig {
|
||||||
|
|
||||||
|
// 通过接口控制实际响应数据
|
||||||
|
public static boolean realResp = true;
|
||||||
|
public static Object paramObject;
|
||||||
|
public static String bizType;
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.smartlive.bswatch.config;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Component
|
||||||
|
@ConfigurationProperties(prefix = "wechat.app")
|
||||||
|
public class WechatPayConfig {
|
||||||
|
// 应用ID(APP)
|
||||||
|
private String appId;
|
||||||
|
|
||||||
|
// 商户号
|
||||||
|
private String mchId;
|
||||||
|
|
||||||
|
// API v3密钥(32位)
|
||||||
|
private String apiV3Key;
|
||||||
|
|
||||||
|
// 商户证书序列号
|
||||||
|
private String mchSerialNo;
|
||||||
|
|
||||||
|
// 商户私钥文件路径(PKCS8格式)
|
||||||
|
private String privateKeyPath;
|
||||||
|
|
||||||
|
// 私钥内容(二选一)
|
||||||
|
private String privateKeyContent;
|
||||||
|
|
||||||
|
// 异步通知地址
|
||||||
|
private String notifyUrl;
|
||||||
|
|
||||||
|
// 交易类型
|
||||||
|
private String tradeType = "APP"; // APP支付固定为APP
|
||||||
|
|
||||||
|
// 签名类型
|
||||||
|
private String signType = "RSA";
|
||||||
|
|
||||||
|
// 是否使用沙箱环境
|
||||||
|
private boolean sandbox = false;
|
||||||
|
|
||||||
|
// 沙箱API密钥
|
||||||
|
private String sandboxApiKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取商户私钥
|
||||||
|
*/
|
||||||
|
public String getPrivateKey() {
|
||||||
|
if (privateKeyContent != null && !privateKeyContent.trim().isEmpty()) {
|
||||||
|
return privateKeyContent.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (privateKeyPath != null && !privateKeyPath.trim().isEmpty()) {
|
||||||
|
try {
|
||||||
|
java.nio.file.Path path = java.nio.file.Paths.get(privateKeyPath);
|
||||||
|
if (!java.nio.file.Files.exists(path)) {
|
||||||
|
// 尝试从classpath加载
|
||||||
|
path = java.nio.file.Paths.get(
|
||||||
|
Thread.currentThread().getContextClassLoader()
|
||||||
|
.getResource(privateKeyPath).toURI()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return new String(java.nio.file.Files.readAllBytes(path)).trim();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("读取微信支付私钥文件失败", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new RuntimeException("微信支付私钥未配置");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.Address;
|
||||||
|
import com.smartlive.bswatch.service.AddressService;
|
||||||
|
import com.smartlive.common.core.controller.BaseController;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/address")
|
||||||
|
public class AddressController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AddressService addressService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加地址
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public AjaxResult addAddress(@Valid @RequestBody Address address) {
|
||||||
|
boolean result = addressService.addAddress(address);
|
||||||
|
if (result) {
|
||||||
|
return success("地址添加成功");
|
||||||
|
}
|
||||||
|
return error("地址添加失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改地址
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public AjaxResult updateAddress(@Valid @RequestBody Address address) {
|
||||||
|
boolean result = addressService.updateAddress(address);
|
||||||
|
if (result) {
|
||||||
|
return success("地址修改成功");
|
||||||
|
}
|
||||||
|
return error("地址修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除地址
|
||||||
|
*/
|
||||||
|
@RequestMapping("/delete")
|
||||||
|
public AjaxResult deleteAddress(@RequestParam Long addressId) {
|
||||||
|
boolean result = addressService.deleteAddress(addressId);
|
||||||
|
if (result) {
|
||||||
|
return success("地址删除成功");
|
||||||
|
}
|
||||||
|
return error("地址删除失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户地址列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult getAddressList(@RequestParam Long userId) {
|
||||||
|
List<Address> addressList = addressService.getAddressList(userId);
|
||||||
|
return success(addressList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置默认地址
|
||||||
|
*/
|
||||||
|
@GetMapping("/setDefault")
|
||||||
|
public AjaxResult setDefaultAddress(@RequestParam Long addressId, @RequestParam Long userId) {
|
||||||
|
boolean result = addressService.setDefaultAddress(addressId, userId);
|
||||||
|
if (result) {
|
||||||
|
return success("默认地址设置成功");
|
||||||
|
}
|
||||||
|
return error("默认地址设置失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户默认地址
|
||||||
|
*/
|
||||||
|
@GetMapping("/default")
|
||||||
|
public AjaxResult getDefaultAddress(@RequestParam Long userId) {
|
||||||
|
Address defaultAddress = addressService.getDefaultAddress(userId);
|
||||||
|
return success(defaultAddress);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.TO.PayRequestTO;
|
||||||
|
import com.smartlive.bswatch.service.AlipayService;
|
||||||
|
import com.smartlive.bswatch.service.WechatService;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pay")
|
||||||
|
|
||||||
|
public class AppPaymentController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private AlipayService alipayService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private WechatService wechatService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APP支付统一下单接口
|
||||||
|
*/
|
||||||
|
@PostMapping("/create")
|
||||||
|
public AjaxResult createPayOrder(@Validated @RequestBody PayRequestTO request) {
|
||||||
|
log.info("收到APP支付请求:{}", request);
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
Map<String, Object> result;
|
||||||
|
|
||||||
|
// 根据支付类型调用不同服务
|
||||||
|
if (1==request.getPayType()) {
|
||||||
|
// 支付宝APP支付
|
||||||
|
result = alipayService.createAlipayAppOrder(
|
||||||
|
request.getUserId(),
|
||||||
|
request.getWatchId(),
|
||||||
|
request.getMoney(),
|
||||||
|
request.getNum(),
|
||||||
|
request.getAddressId()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (Boolean.TRUE.equals(result.get("success"))) {
|
||||||
|
String message = (String) result.get("message");
|
||||||
|
String orderInfo = (String) result.get("alipayOrderInfo");
|
||||||
|
return AjaxResult.success(message, orderInfo);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
String message = (String) result.get("message");
|
||||||
|
return AjaxResult.error(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (2==request.getPayType()) {
|
||||||
|
// 微信APP支付
|
||||||
|
result = wechatService.createWechatAppOrder(
|
||||||
|
request.getUserId(),
|
||||||
|
request.getWatchId(),
|
||||||
|
request.getMoney(),
|
||||||
|
request.getNum(),
|
||||||
|
request.getAddressId()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (Boolean.TRUE.equals(result.get("success"))) {
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
Map<String, String> payParams = (Map<String, String>) result.get("payParams");
|
||||||
|
String message = (String) result.get("message");
|
||||||
|
return AjaxResult.success(message, payParams);
|
||||||
|
} else {
|
||||||
|
String message = (String) result.get("message");
|
||||||
|
return AjaxResult.error(message);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error("不支持的支付类型");
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("创建APP支付订单失败", e);
|
||||||
|
return AjaxResult.error("创建APP支付订单失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付宝APP支付回调通知
|
||||||
|
*/
|
||||||
|
@PostMapping("/notify/alipay")
|
||||||
|
public String alipayNotify(HttpServletRequest request, HttpServletResponse httpResponse) {
|
||||||
|
log.info("接收支付宝APP支付异步通知");
|
||||||
|
|
||||||
|
try {
|
||||||
|
String result = alipayService.handleAlipayNotify(request);
|
||||||
|
|
||||||
|
// 设置响应
|
||||||
|
if ("success".equals(result)) {
|
||||||
|
httpResponse.setStatus(200);
|
||||||
|
} else {
|
||||||
|
httpResponse.setStatus(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("处理支付宝回调异常", e);
|
||||||
|
httpResponse.setStatus(500);
|
||||||
|
return "failure";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信APP支付回调通知
|
||||||
|
*/
|
||||||
|
@PostMapping("/notify/wechat")
|
||||||
|
public String wechatNotify(HttpServletRequest request, HttpServletResponse httpResponse) {
|
||||||
|
log.info("接收微信APP支付异步通知");
|
||||||
|
|
||||||
|
try {
|
||||||
|
String result = wechatService.handleWechatNotify(request);
|
||||||
|
|
||||||
|
// 设置响应
|
||||||
|
if (result.contains("SUCCESS")) {
|
||||||
|
httpResponse.setStatus(200);
|
||||||
|
} else {
|
||||||
|
httpResponse.setStatus(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("处理微信支付回调异常", e);
|
||||||
|
httpResponse.setStatus(500);
|
||||||
|
return "{\"code\": \"FAIL\", \"message\": \"处理异常\"}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APP支付退款
|
||||||
|
*/
|
||||||
|
@PostMapping("/refund")
|
||||||
|
public Map<String, Object> refund(@RequestParam String orderNo,
|
||||||
|
@RequestParam BigDecimal refundAmount,
|
||||||
|
@RequestParam String refundReason) {
|
||||||
|
log.info("APP支付退款,订单号:{},退款金额:{}", orderNo, refundAmount);
|
||||||
|
|
||||||
|
// 这里需要根据订单号判断支付渠道
|
||||||
|
// 简化处理,先调用支付宝退款
|
||||||
|
return alipayService.refund(orderNo, refundAmount, refundReason);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchHealthReport;
|
||||||
|
import com.smartlive.bswatch.service.IWatchHealthReportService;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/watch/report")
|
||||||
|
public class HealthReportController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IWatchHealthReportService watchHealthReportService;
|
||||||
|
|
||||||
|
@RequestMapping("generate")
|
||||||
|
public AjaxResult generate(String empNo,String watchSign,String watchName, String startDate, String endDate) {
|
||||||
|
watchHealthReportService.generateWeeklyReport(empNo,watchName,watchSign, startDate, endDate);
|
||||||
|
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
@RequestMapping("getReport")
|
||||||
|
public AjaxResult getReport(Long reportId) {
|
||||||
|
WatchHealthReport watchHealthReport = watchHealthReportService.getWeeklyReport(reportId);
|
||||||
|
|
||||||
|
return AjaxResult.success(watchHealthReport);
|
||||||
|
}
|
||||||
|
@RequestMapping("getReportHistory")
|
||||||
|
public AjaxResult getReportHistory(String watchSign, String time) {
|
||||||
|
return AjaxResult.success(watchHealthReportService.getReportHistory(watchSign, time));
|
||||||
|
}
|
||||||
|
@RequestMapping("batchGenerate")
|
||||||
|
public AjaxResult batchGenerate(String reportDate) {
|
||||||
|
watchHealthReportService.batchGenerateWeeklyReports(reportDate);
|
||||||
|
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.service.IWatchLocationService;
|
||||||
|
import com.smartlive.common.validator.group.QueryValidate;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.LocationQueryVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import com.smartlive.common.enums.WatchReturnMessage;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/13
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实现功能:
|
||||||
|
* 1. 获取实时定位: 发送实时定位命令; 查询实时定位信息.
|
||||||
|
* 2. 获取历史轨迹: 发送历史轨迹命令; 查询历史轨迹信息.
|
||||||
|
*/
|
||||||
|
@RequestMapping("/watch/location")
|
||||||
|
@RestController
|
||||||
|
public class LocationController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWatchLocationService locationService;
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/sendLocationCommond")
|
||||||
|
public AjaxResult sendLocationCommond(@Validated(QueryValidate.class) LocationQueryVO locationQueryVO) {
|
||||||
|
return locationService.sendLocationCommond(locationQueryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取实时定位信息
|
||||||
|
*/
|
||||||
|
@RequestMapping("/getCurrentLocationInfo")
|
||||||
|
public AjaxResult getCurrentLocationInfo(@Validated(QueryValidate.class) LocationQueryVO locationQueryVO) {
|
||||||
|
if(locationQueryVO == null|| StringUtils.isBlank(locationQueryVO.getEmpNo())){
|
||||||
|
return AjaxResult.error(WatchReturnMessage.EMPNO_NOT_NULL);
|
||||||
|
}
|
||||||
|
return locationService.getCurrentLocationInfo(locationQueryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取历史轨迹信息
|
||||||
|
*/
|
||||||
|
@GetMapping("locationTrack")
|
||||||
|
public AjaxResult locationTrack(@Validated(QueryValidate.class) LocationQueryVO locationQueryVO) {
|
||||||
|
if(locationQueryVO == null|| StringUtils.isBlank(locationQueryVO.getEmpNo())){
|
||||||
|
return AjaxResult.error(WatchReturnMessage.EMPNO_NOT_NULL);
|
||||||
|
}
|
||||||
|
return locationService.lcoationTrack(locationQueryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.service.IWatchSosService;
|
||||||
|
import com.smartlive.common.validator.group.InsertValidate;
|
||||||
|
import com.smartlive.common.validator.group.UpdateValidate;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.SosPhoneVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import com.smartlive.common.utils.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/10
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sos与白名单电话
|
||||||
|
*/
|
||||||
|
@RequestMapping("/watch/sosPhone")
|
||||||
|
@RestController
|
||||||
|
public class SosPhoneController {
|
||||||
|
@Autowired
|
||||||
|
private IWatchSosService watchSosService;
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult list(SosPhoneVO sosPhoneVo) {
|
||||||
|
if(sosPhoneVo==null){
|
||||||
|
return AjaxResult.error("请指定查询条件");
|
||||||
|
}
|
||||||
|
if(StringUtils.isBlank(sosPhoneVo.getEmpNo())){
|
||||||
|
return AjaxResult.error("人员id不能为空");
|
||||||
|
}
|
||||||
|
if(StringUtils.isBlank(sosPhoneVo.getWatchSign())){
|
||||||
|
return AjaxResult.error("腕表唯一标识不能为空");
|
||||||
|
}
|
||||||
|
return watchSosService.qeuryByVO(sosPhoneVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 生成sos的增删改查方法
|
||||||
|
@GetMapping("/add")
|
||||||
|
public AjaxResult add(@Validated(InsertValidate.class) SosPhoneVO sosPhoneVo) {
|
||||||
|
return watchSosService.saveSosPhone(sosPhoneVo) ? AjaxResult.success() : AjaxResult.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
// SOS更新方法
|
||||||
|
@GetMapping("/update")
|
||||||
|
public AjaxResult update(@Validated(UpdateValidate.class) SosPhoneVO sosPhoneVo) {
|
||||||
|
return watchSosService.updateSosPhone(sosPhoneVo) ? AjaxResult.success() : AjaxResult.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
// sos删除方法
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除sos号码
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/delete")
|
||||||
|
public AjaxResult delete(Integer id) {
|
||||||
|
if(id==null){
|
||||||
|
return AjaxResult.error("请指定要删除的sos号码");
|
||||||
|
}
|
||||||
|
List<Integer> idList = java.util.Arrays.asList(id);
|
||||||
|
return watchSosService.deleteByIds(idList) ? AjaxResult.success() : AjaxResult.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
// sos删除方法
|
||||||
|
@GetMapping("/deleteBatch")
|
||||||
|
public AjaxResult deleteBatch(Integer[] ids) {
|
||||||
|
if(ids==null || ids.length==0){
|
||||||
|
return AjaxResult.error("请指定要删除的sos号码");
|
||||||
|
}
|
||||||
|
List<Integer> idList = java.util.Arrays.asList(ids);
|
||||||
|
return watchSosService.deleteByIds(idList) ? AjaxResult.success() : AjaxResult.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.service.IWatchEmpPhoneService;
|
||||||
|
import com.smartlive.common.validator.group.InsertValidate;
|
||||||
|
import com.smartlive.common.validator.group.UpdateValidate;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchEmpPhoneVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import com.smartlive.common.utils.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/10
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RequestMapping("watch/empPhone")
|
||||||
|
@RestController
|
||||||
|
public class WatchEmpPhoneController {
|
||||||
|
@Autowired
|
||||||
|
private IWatchEmpPhoneService empPhoneService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询亲情电话话信息
|
||||||
|
*
|
||||||
|
* @param empPhoneVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("selectEmpPhone")
|
||||||
|
public AjaxResult selectEmpPhone(WatchEmpPhoneVO empPhoneVO) {
|
||||||
|
if(empPhoneVO==null){
|
||||||
|
return AjaxResult.error("请指定查询条件");
|
||||||
|
}
|
||||||
|
if(StringUtils.isBlank(empPhoneVO.getEmpNo())){
|
||||||
|
return AjaxResult.error("人员id不能为空");
|
||||||
|
}
|
||||||
|
if(StringUtils.isBlank(empPhoneVO.getWatchSign())){
|
||||||
|
return AjaxResult.error("腕表唯一标识不能为空");
|
||||||
|
}
|
||||||
|
return empPhoneService.selectEmpPhone(empPhoneVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置为亲情电话
|
||||||
|
*/
|
||||||
|
@GetMapping("updateEmpPhone")
|
||||||
|
public AjaxResult updateEmphone(@Validated(UpdateValidate.class) WatchEmpPhoneVO empPhoneVO){
|
||||||
|
return empPhoneService.updateEmphone(empPhoneVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增亲情电话
|
||||||
|
*/
|
||||||
|
@GetMapping("addEmpPhone")
|
||||||
|
public AjaxResult addEmpPhone(@Validated(InsertValidate.class) WatchEmpPhoneVO empPhoneVO){
|
||||||
|
return empPhoneService.addEmpPhone(empPhoneVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除亲情电话
|
||||||
|
*/
|
||||||
|
@GetMapping("delete")
|
||||||
|
public AjaxResult delete(Integer id){
|
||||||
|
return empPhoneService.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.service.IWatchFenceService;
|
||||||
|
import com.smartlive.common.validator.group.InsertValidate;
|
||||||
|
import com.smartlive.common.validator.group.UpdateValidate;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchFenceVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/13
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表电子围栏
|
||||||
|
*/
|
||||||
|
@RequestMapping("/watch/fence")
|
||||||
|
@RestController
|
||||||
|
public class WatchFenceController {
|
||||||
|
@Autowired
|
||||||
|
private IWatchFenceService watchFenceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询电子围栏
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult fenceList(WatchFenceVO fenceVO) {
|
||||||
|
if(fenceVO==null){
|
||||||
|
return AjaxResult.error("请指定查询的参数");
|
||||||
|
}
|
||||||
|
if(StringUtils.isBlank(fenceVO.getEmpNo())){
|
||||||
|
return AjaxResult.error("人员id不能为空");
|
||||||
|
}
|
||||||
|
if(StringUtils.isBlank(fenceVO.getWatchSign())){
|
||||||
|
return AjaxResult.error("腕表唯一标识不能为空");
|
||||||
|
}
|
||||||
|
return watchFenceService.listVO(fenceVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增删改查
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public AjaxResult addFence(@Validated(InsertValidate.class) WatchFenceVO fenceVO) {
|
||||||
|
return watchFenceService.saveVO(fenceVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新电子围栏
|
||||||
|
*/
|
||||||
|
@GetMapping("/update")
|
||||||
|
public AjaxResult updateFence(@Validated(UpdateValidate.class) WatchFenceVO fenceVO) {
|
||||||
|
return watchFenceService.updateVO(fenceVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除电子围栏
|
||||||
|
*/
|
||||||
|
@GetMapping("/delete")
|
||||||
|
public AjaxResult deleteFence(Long id) {
|
||||||
|
if(id==null){
|
||||||
|
return AjaxResult.error("请指定要删除的电子围栏");
|
||||||
|
}
|
||||||
|
return watchFenceService.delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除电子围栏
|
||||||
|
*/
|
||||||
|
@GetMapping("/deleteBatch")
|
||||||
|
public AjaxResult deleteFence(Long[] ids) {
|
||||||
|
if(ids==null || ids.length==0){
|
||||||
|
return AjaxResult.error("请指定要删除的电子围栏");
|
||||||
|
}
|
||||||
|
List<Long> idList = Arrays.asList(ids);
|
||||||
|
return watchFenceService.deleteBatch(idList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.service.IWatchHealthService;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.HealthQueryVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/14
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表健康数据查询
|
||||||
|
*/
|
||||||
|
@RequestMapping("/watch/health")
|
||||||
|
@RestController
|
||||||
|
public class WatchHealthController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWatchHealthService watchHealthService;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/heart")
|
||||||
|
public AjaxResult heartRate(@Validated HealthQueryVO healthQueryVO){
|
||||||
|
return watchHealthService.queryHeartBeat(healthQueryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/temperature")
|
||||||
|
public AjaxResult temperature(@Validated HealthQueryVO healthQueryVO){
|
||||||
|
return watchHealthService.queryTemperature(healthQueryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/bloodOxy")
|
||||||
|
public AjaxResult bloodOxy(@Validated HealthQueryVO healthQueryVO){
|
||||||
|
return watchHealthService.queryBloodOxy(healthQueryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/step")
|
||||||
|
public AjaxResult selectStep(@Validated HealthQueryVO healthQueryVO) {
|
||||||
|
return watchHealthService.queryStep(healthQueryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/pressure")
|
||||||
|
public AjaxResult selectPressure(@Validated HealthQueryVO healthQueryVO) {
|
||||||
|
return watchHealthService.queryPressure(healthQueryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/sleep")
|
||||||
|
public AjaxResult selectSleep(@Validated HealthQueryVO healthQueryVO) {
|
||||||
|
return watchHealthService.querySleep(healthQueryVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,125 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/14
|
||||||
|
*/
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.costant.WatchConstant;
|
||||||
|
import com.smartlive.bswatch.service.IWatchSkipService;
|
||||||
|
import com.smartlive.bswatch.service.IWatchDeviceService;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchDeviceVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchSkipVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import com.smartlive.common.validator.group.*;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表模式设置:
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RequestMapping("/watch/set")
|
||||||
|
@RestController
|
||||||
|
public class WatchSetController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询当前腕表的模式信息
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWatchDeviceService watchDeviceService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWatchSkipService watchSkipService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备当前信息
|
||||||
|
* @param watchSign
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/watchInfo")
|
||||||
|
public AjaxResult queryWatchMode(@NotBlank String watchSign){
|
||||||
|
return watchDeviceService.queryWatchInfo(watchSign);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备绑定信息修改:
|
||||||
|
* 1.设备唯一标识
|
||||||
|
* 2. empNo
|
||||||
|
* 3. 手机号信息修改
|
||||||
|
*/
|
||||||
|
@RequestMapping("/bindDevice")
|
||||||
|
public AjaxResult bindDevice(@Validated(WatchBindGroup.class) WatchDeviceVO watchDeviceVO){
|
||||||
|
return watchDeviceService.bindDevice(watchDeviceVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表解绑
|
||||||
|
*/
|
||||||
|
@GetMapping("/unbindDevice")
|
||||||
|
public AjaxResult unbindDevice(@NotBlank String empNo,@NotBlank String watchSign){
|
||||||
|
return watchDeviceService.unbindDevice(empNo,watchSign);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表模式切换
|
||||||
|
*/
|
||||||
|
@GetMapping("/modeChange")
|
||||||
|
public AjaxResult modeChange(@Validated(WatchModeChangeGroup.class) WatchDeviceVO watchDeviceVO){
|
||||||
|
return watchDeviceService.modeChange(watchDeviceVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表待机模式时间段设置
|
||||||
|
*/
|
||||||
|
@GetMapping("/setRedayTime")
|
||||||
|
public AjaxResult setRedayTime(@Validated(RedayModeGroup.class) WatchDeviceVO watchDeviceVO){
|
||||||
|
watchDeviceVO.setWatchMode(WatchConstant.WATCH_MODE_REDAY);
|
||||||
|
// 参数处理:
|
||||||
|
String start = watchDeviceVO.getStartTime().replaceAll(":", "");
|
||||||
|
String end = watchDeviceVO.getEndTime().replaceAll(":", "");
|
||||||
|
watchDeviceVO.setRedayTime(start + "-" + end);
|
||||||
|
return watchDeviceService.modeChange(watchDeviceVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表定位信息上传频率设置
|
||||||
|
*/
|
||||||
|
@GetMapping("/setLocationFreq")
|
||||||
|
public AjaxResult setLocationFreq(@Validated(LocationFreqGroup.class) WatchDeviceVO watchDeviceVO){
|
||||||
|
return watchDeviceService.setLocationFreq(watchDeviceVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询蓝牙跳绳信息
|
||||||
|
*/
|
||||||
|
@GetMapping("/querySkip")
|
||||||
|
public AjaxResult querySkip(@NotBlank(message = "人员编号不能为空") String empNo,@NotBlank(message = "设备唯一标识不能为空") String watchSign){
|
||||||
|
return watchSkipService.querySkip(empNo,watchSign);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定跳绳
|
||||||
|
*/
|
||||||
|
@PostMapping("/bindSkip")
|
||||||
|
public AjaxResult bindSkip(@Validated(InsertValidate.class) @RequestBody WatchSkipVO watchSkipVO){
|
||||||
|
return watchSkipService.bindSkip(watchSkipVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解绑跳绳
|
||||||
|
*/
|
||||||
|
@GetMapping("/unbindSkip")
|
||||||
|
public AjaxResult unbindSkip(@NotBlank(message = "人员编号不能为空") String empNo,@NotBlank(message = "设备唯一标识不能为空") String watchSign){
|
||||||
|
return watchSkipService.unbindSkip(empNo,watchSign);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.service.IWatchWarnService;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchWarnVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/13
|
||||||
|
*/
|
||||||
|
@RequestMapping("/watch/warn")
|
||||||
|
@RestController
|
||||||
|
public class WatchWarnController {
|
||||||
|
@Autowired
|
||||||
|
private IWatchWarnService watchWarnService;
|
||||||
|
|
||||||
|
@GetMapping("/list")
|
||||||
|
public AjaxResult warnList(@Validated WatchWarnVO watchWarnVO) {
|
||||||
|
return watchWarnService.queryVO(watchWarnVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.smartlive.bswatch.controller.common;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.service.IWatchWhiteService;
|
||||||
|
import com.smartlive.common.validator.group.InsertValidate;
|
||||||
|
import com.smartlive.common.validator.group.UpdateValidate;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchWhiteVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import com.smartlive.common.utils.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/11
|
||||||
|
*/
|
||||||
|
@RequestMapping("watch/white")
|
||||||
|
@RestController
|
||||||
|
public class WatchWhiteController {
|
||||||
|
@Autowired
|
||||||
|
private IWatchWhiteService watchWhiteService;
|
||||||
|
// 增删改查
|
||||||
|
|
||||||
|
// 白名单查询
|
||||||
|
@RequestMapping("list")
|
||||||
|
public AjaxResult list(WatchWhiteVO watchWhiteVO) {
|
||||||
|
if(watchWhiteVO==null){
|
||||||
|
return AjaxResult.error("请指定查询条件");
|
||||||
|
}
|
||||||
|
if(StringUtils.isBlank(watchWhiteVO.getEmpNo())){
|
||||||
|
return AjaxResult.error("人员id不能为空");
|
||||||
|
}
|
||||||
|
if(StringUtils.isBlank(watchWhiteVO.getWatchSign())){
|
||||||
|
return AjaxResult.error("腕表唯一标识不能为空");
|
||||||
|
}
|
||||||
|
return watchWhiteService.queryByVO(watchWhiteVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// // 白名单添加
|
||||||
|
// @PostMapping("add")
|
||||||
|
// public AjaxResult add(@Validated(InsertValidate.class) @RequestBody WatchWhitePhoneAddVO watchWhitePhoneAddVO) {
|
||||||
|
// return watchWhiteService.add(watchWhitePhoneAddVO);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 白名单添加
|
||||||
|
@PostMapping("addWhitePhone")
|
||||||
|
public AjaxResult addWhitePhone(@Validated(InsertValidate.class) @RequestBody WatchWhiteVO watchWhiteVO) {
|
||||||
|
return watchWhiteService.addWhitePhone(watchWhiteVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 白名单修改
|
||||||
|
@GetMapping("update")
|
||||||
|
public AjaxResult update(@Validated(UpdateValidate.class) WatchWhiteVO watchWhiteVO) {
|
||||||
|
return watchWhiteService.updateWithVO(watchWhiteVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 白名单删除
|
||||||
|
@GetMapping("delete")
|
||||||
|
public AjaxResult delete(Integer id) {
|
||||||
|
if(id==null){
|
||||||
|
return AjaxResult.error("请指定要删除的白名单限制电话");
|
||||||
|
}
|
||||||
|
List<Integer> idList = java.util.Arrays.asList(id);
|
||||||
|
return watchWhiteService.removeWithIds(idList);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 白名单删除
|
||||||
|
@GetMapping("deleteBatch")
|
||||||
|
public AjaxResult deleteBatch(Integer[] ids) {
|
||||||
|
if(ids==null || ids.length==0){
|
||||||
|
return AjaxResult.error("请指定要删除的白名单电话");
|
||||||
|
}
|
||||||
|
List<Integer> idList = java.util.Arrays.asList(ids);
|
||||||
|
return watchWhiteService.removeWithIds(idList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,239 @@
|
|||||||
|
package com.smartlive.bswatch.controller.utilController;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.smartlive.bswatch.enmus.WatchApiEnum;
|
||||||
|
import com.smartlive.bswatch.utils.WatchMsgSendUtil;
|
||||||
|
import com.smartlive.bswatch.netty.watchvo.MessageVO;
|
||||||
|
import com.smartlive.bswatch.vo.commandVO.*;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import com.smartlive.common.enums.WatchReturnMessage;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/1/22
|
||||||
|
*/
|
||||||
|
@RequestMapping("watch/command")
|
||||||
|
@RestController
|
||||||
|
public class CommandController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置可呼入号码:
|
||||||
|
* 默认一周七天,限制白名单以外号码呼入;时间段建表,学校自己设置从学校中取出
|
||||||
|
* 删除与添加号码拆分成两个功能.
|
||||||
|
* 白名单20个号码.
|
||||||
|
* @param
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping("addPhone")
|
||||||
|
public AjaxResult addPhone(@RequestBody WhitePhoneVO addPhoneVO) throws Exception {
|
||||||
|
//删除号码@添加号码和时段@呼入限制@周期
|
||||||
|
addPhoneVO.setApiName(WatchApiEnum.SET_INCOMING_CALL.getApiName());
|
||||||
|
// 构建vo:
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(addPhoneVO);
|
||||||
|
//向腕表发送指令
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
// 接收腕表响应
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(addPhoneVO.getWatchSign(),addPhoneVO.getApiName());
|
||||||
|
if ("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("设置成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.SET_WHITE_PHONE_ERROR.getCode(), WatchReturnMessage.SET_WHITE_PHONE_ERROR.getInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("delPhones")
|
||||||
|
public AjaxResult delPhones(@RequestBody WhitePhoneVO delPhoneVO) throws Exception {
|
||||||
|
delPhoneVO.setApiName(WatchApiEnum.SET_INCOMING_CALL.getApiName());
|
||||||
|
|
||||||
|
// 构建vo:
|
||||||
|
MessageVO messageVO = WatchMsgSendUtil.buildMsgVO(delPhoneVO);
|
||||||
|
//向腕表发送指令
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
// 接收腕表响应
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(delPhoneVO.getWatchSign(), delPhoneVO.getApiName());
|
||||||
|
if ("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("设置成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.SET_WHITE_PHONE_ERROR.getCode(), WatchReturnMessage.SET_WHITE_PHONE_ERROR.getInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("/setButton")
|
||||||
|
public AjaxResult setButton(@RequestBody NormalButtonVO normalButtonVO) throws Exception {
|
||||||
|
normalButtonVO.setApiName(WatchApiEnum.SET_NORMAL_BUTTON.getApiName());
|
||||||
|
// 构建vo:
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(normalButtonVO);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(normalButtonVO.getWatchSign(),normalButtonVO.getApiName());
|
||||||
|
if ("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("设置成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.SET_BUTTON_ERROR.getCode(), WatchReturnMessage.SET_BUTTON_ERROR.getInfo());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实时位置获取
|
||||||
|
* @param currentPositionVO
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping("getCurrentPosition")
|
||||||
|
public AjaxResult getCurrentPosition(@RequestBody CommonNoParamVO currentPositionVO) throws Exception {
|
||||||
|
currentPositionVO.setApiName(WatchApiEnum.LOCATION_INFO_GET.getApiName());
|
||||||
|
// 构建vo:
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(currentPositionVO);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(currentPositionVO.getWatchSign(),currentPositionVO.getApiName());
|
||||||
|
try{
|
||||||
|
CurrentPositionRespVO currentPositionRespVO = JSONObject.parseObject(result, CurrentPositionRespVO.class);
|
||||||
|
if(currentPositionRespVO==null){
|
||||||
|
return AjaxResult.error(WatchReturnMessage.GET_POSITION_ERROR.getCode(), WatchReturnMessage.GET_POSITION_ERROR.getInfo());
|
||||||
|
}
|
||||||
|
return AjaxResult.success("获取成功",currentPositionRespVO);
|
||||||
|
}catch (Exception e){
|
||||||
|
return AjaxResult.error(WatchReturnMessage.GET_POSITION_ERROR.getCode(), WatchReturnMessage.GET_POSITION_ERROR.getInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全防护
|
||||||
|
* @param callVO
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping("requestCall")
|
||||||
|
public AjaxResult requestCall(@RequestBody RequestCallVO callVO) throws Exception {
|
||||||
|
callVO.setApiName(WatchApiEnum.REQUEST_CALL.getApiName());
|
||||||
|
callVO.setConrent("1");
|
||||||
|
// 构建vo:
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(callVO);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(callVO.getWatchSign(),callVO.getApiName());
|
||||||
|
if("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("请求成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.REQUEST_CALL_ERROR.getCode(), WatchReturnMessage.REQUEST_CALL_ERROR.getInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("frequencyLocationSet")
|
||||||
|
public AjaxResult frequencyLocationSet(@RequestBody FrequencyLocationVO frequencyLocationVO) throws Exception {
|
||||||
|
frequencyLocationVO.setApiName(WatchApiEnum.FREQUENCY_LOCATION_SET.getApiName());
|
||||||
|
// 构建vo:
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(frequencyLocationVO);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(frequencyLocationVO.getWatchSign(),frequencyLocationVO.getApiName());
|
||||||
|
if("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("设置成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.FREQUENCY_LOCATION_SET_ERROR.getCode(), WatchReturnMessage.FREQUENCY_LOCATION_SET_ERROR.getInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("setHeartBeat")
|
||||||
|
public AjaxResult setHeartBeat(@RequestBody HeartBeatVO heartBeatVO) throws Exception {
|
||||||
|
heartBeatVO.setApiName(WatchApiEnum.SET_HEARTBEAT.getApiName());
|
||||||
|
// 构建vo:
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(heartBeatVO);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(heartBeatVO.getWatchSign(),heartBeatVO.getApiName());
|
||||||
|
if("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("设置成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.SET_HEARTBEAT_ERROR.getCode(), WatchReturnMessage.SET_HEARTBEAT_ERROR.getInfo());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("setClassModel")
|
||||||
|
public AjaxResult setClassModel(@RequestBody ClassModelVO classModelVO) throws Exception {
|
||||||
|
classModelVO.setApiName(WatchApiEnum.SET_CLASS_MODEL.getApiName());
|
||||||
|
// 构建vo:
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(classModelVO);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(classModelVO.getWatchSign(),classModelVO.getApiName());
|
||||||
|
if("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("设置成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.SET_CLASS_MODEL_ERROR.getCode(), WatchReturnMessage.SET_CLASS_MODEL_ERROR.getInfo());
|
||||||
|
}
|
||||||
|
@RequestMapping("sendSms")
|
||||||
|
public AjaxResult sendSms(@RequestBody SendSmsVO sendSmsVO) throws Exception {
|
||||||
|
sendSmsVO.setApiName(WatchApiEnum.SEND_SMS.getApiName());
|
||||||
|
// 构建vo:
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(sendSmsVO);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(sendSmsVO.getWatchSign(),sendSmsVO.getApiName());
|
||||||
|
if("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("发送成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.SEND_SMS_ERROR.getCode(), WatchReturnMessage.SEND_SMS_ERROR.getInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("setStudentInfo")
|
||||||
|
public AjaxResult setStudentInfo(@RequestBody StudentInfoVO studentInfoVO) throws Exception {
|
||||||
|
studentInfoVO.setApiName(WatchApiEnum.SET_STUDENT_INFO.getApiName());
|
||||||
|
// 构建vo:
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(studentInfoVO);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(studentInfoVO.getWatchSign(),studentInfoVO.getApiName());
|
||||||
|
if("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("设置成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.SET_STUDENT_INFO_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping("sendTestCommand")
|
||||||
|
public AjaxResult sendTestCommand(String apiName,String command,String watchSign) throws Exception {
|
||||||
|
command=command.replaceAll(" ","+");
|
||||||
|
if(StringUtils.isBlank(watchSign)){
|
||||||
|
return AjaxResult.error("设备IMEI为空");
|
||||||
|
}
|
||||||
|
MessageVO messageVO = WatchMsgSendUtil.buildMsgVO(watchSign,"89860120801609197568",apiName,command);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
// 接收腕表响应
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult("865593070205859", apiName);
|
||||||
|
if ("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("设置成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error("设置失败,请稍后再试");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置待机模式
|
||||||
|
*/
|
||||||
|
@RequestMapping("setRedayMode")
|
||||||
|
public AjaxResult setRedayMode(@RequestBody SetRedayModeVO setRedayModeVO) throws Exception {
|
||||||
|
setRedayModeVO.setApiName(WatchApiEnum.SET_REDAY_MODE.getApiName());
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(setRedayModeVO);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(setRedayModeVO.getWatchSign(),setRedayModeVO.getApiName());
|
||||||
|
if("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("设置成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.SET_REDAY_MODE_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置待机模式
|
||||||
|
*/
|
||||||
|
@RequestMapping("setLoactionMode")
|
||||||
|
public AjaxResult setLoactionMode(@RequestBody SetLocationModelVO setLocationModelVO) throws Exception {
|
||||||
|
setLocationModelVO.setApiName(WatchApiEnum.SET_LOCATION_MODE.getApiName());
|
||||||
|
MessageVO messageVO =WatchMsgSendUtil.buildMsgVO(setLocationModelVO);
|
||||||
|
WatchMsgSendUtil.sendCommand(messageVO);
|
||||||
|
String result = WatchMsgSendUtil.getCommandResult(setLocationModelVO.getWatchSign(),setLocationModelVO.getApiName());
|
||||||
|
if("0".equals(result)){
|
||||||
|
return AjaxResult.successMsg("设置成功");
|
||||||
|
}
|
||||||
|
return AjaxResult.error(WatchReturnMessage.SET_LOCATION_MODEL_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,164 @@
|
|||||||
|
package com.smartlive.bswatch.controller.utilController;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.smartlive.bswatch.config.ApiEntityMap;
|
||||||
|
import com.smartlive.bswatch.config.TestConfig;
|
||||||
|
import com.smartlive.bswatch.entity.WatchDevice;
|
||||||
|
import com.smartlive.bswatch.netty.event.TestEvent;
|
||||||
|
import com.smartlive.bswatch.netty.publisher.TestPublisher;
|
||||||
|
import com.smartlive.bswatch.service.CommonService;
|
||||||
|
import com.smartlive.bswatch.service.IDeviceUploadService;
|
||||||
|
import com.smartlive.bswatch.utils.CardAesUtil;
|
||||||
|
import com.smartlive.bswatch.utils.WatchMsgParseUtil;
|
||||||
|
import com.smartlive.bswatch.netty.watchvo.MessageVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/1/20
|
||||||
|
*/
|
||||||
|
@RequestMapping("watch/util")
|
||||||
|
@RestController
|
||||||
|
public class UtilController {
|
||||||
|
@Autowired
|
||||||
|
private IDeviceUploadService deviceUploadService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TestPublisher testPublisher;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CommonService commonService;
|
||||||
|
|
||||||
|
// 加解密
|
||||||
|
@RequestMapping("enAndDe")
|
||||||
|
public AjaxResult enAndDe(@RequestBody String content) throws Exception {
|
||||||
|
JSONObject jsonObject = JSON.parseObject(content);
|
||||||
|
String msg = jsonObject.getString("msg");
|
||||||
|
String type = jsonObject.getString("type");
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(msg)) {
|
||||||
|
return AjaxResult.error("参数为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("en".equals(type)) {
|
||||||
|
String enStr = new String(CardAesUtil.encryptBsj(msg.getBytes()));
|
||||||
|
return AjaxResult.success("加密成功", enStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("de".equals(type)) {
|
||||||
|
String deStr = CardAesUtil.decryptBsj(msg);
|
||||||
|
return AjaxResult.success("解密成功", deStr);
|
||||||
|
}
|
||||||
|
return AjaxResult.error("参数错误");
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/toMsgVO")
|
||||||
|
public AjaxResult toMsgVO(@RequestBody String msg) throws Exception {
|
||||||
|
if (StringUtils.isBlank(msg)) {
|
||||||
|
return AjaxResult.error("参数为空");
|
||||||
|
}
|
||||||
|
JSONObject jsonObject = JSON.parseObject(msg);
|
||||||
|
msg = jsonObject.getString("msg");
|
||||||
|
return AjaxResult.success("转换成功", WatchMsgParseUtil.getMsg(msg));
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/modifyParam")
|
||||||
|
public AjaxResult modifyParam(Map<String, Object> map) throws Exception {
|
||||||
|
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/setConfig")
|
||||||
|
public AjaxResult setConfig(@RequestBody Map<String, Object> cfg) throws Exception {
|
||||||
|
TestConfig.realResp = (Boolean) cfg.get("realResp");
|
||||||
|
Object paramObject = cfg.get("paramObject");
|
||||||
|
TestConfig.bizType = (String) cfg.get("bizType");
|
||||||
|
TestConfig.paramObject = JSON.to(ApiEntityMap.map.get(TestConfig.bizType), paramObject);
|
||||||
|
return AjaxResult.success(cfg);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/getSysTime")
|
||||||
|
public AjaxResult getSysTime() throws Exception {
|
||||||
|
Date now = new Date();
|
||||||
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
return AjaxResult.success(format.format(now));
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/saveDevice")
|
||||||
|
public AjaxResult saveDevice(String msg) throws Exception {
|
||||||
|
String message = "issnCSpq6oIfYo4ig+AFWJuKlhZW8Gi03TCBb/aodbZzCUE9vwwYw/QT30ZhAyRtucs+Zq+gH4/mng30KWqDK0fiz2rU+5s2d70BzLujhAhzdgn/fA6esMT7IiEeNzWfsY/5DpVsx1WSAxG2gL8jeeTEXen0HxCt2rCOZhOLxxw=#kdsjafjalsdjg#170";
|
||||||
|
MessageVO messageVO = WatchMsgParseUtil.getMsg(message);
|
||||||
|
deviceUploadService.login(messageVO);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/saveStep")
|
||||||
|
public AjaxResult saveStep(String msg) throws Exception {
|
||||||
|
String message = "issnCSpq6oIfYo4ig+AFWJuKlhZW8Gi03TCBb/aodbZjRd/3xafcZnyG75kc4qQdtW2atrrQug/TlLOLWL4aom1WKdkMdzsgpvJ3k6ScA3zwf+z6ky6Qy92HOM69tNs4JTBfzAVL6WnvTgGdeAJDBg==#kdsjafjalsdjg#170";
|
||||||
|
MessageVO messageVO = WatchMsgParseUtil.getMsg(message);
|
||||||
|
deviceUploadService.recordStep(messageVO);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/saveHealth")
|
||||||
|
public AjaxResult saveHealth(String msg) throws Exception {
|
||||||
|
String message = "issnCSpq6oIfYo4ig+AFWJuKlhZW8Gi03TCBb/aodbZilxhnxd39gWWphBLQVGDsalFYrg22LlGXzYcXAQmFNxhs9A7WuBdh7Jw0057zrNZ32V/52RxyuLbXH4cSDUOsS/Zs2xsiFXuRtcYOGQpvwg==#kdsjafjalsdjg#170";
|
||||||
|
MessageVO messageVO = WatchMsgParseUtil.getMsg(message);
|
||||||
|
deviceUploadService.recordHealth(messageVO);
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试springBoot事件
|
||||||
|
*/
|
||||||
|
@RequestMapping("/testEvent")
|
||||||
|
public AjaxResult testEvent(String msg) throws Exception {
|
||||||
|
TestEvent testEvent = new TestEvent(this, msg);
|
||||||
|
System.out.println("当前线程:" + Thread.currentThread().getName());
|
||||||
|
testPublisher.publish(msg);
|
||||||
|
return AjaxResult.success("事件发布成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 测试缓存功能
|
||||||
|
*/
|
||||||
|
@RequestMapping("/testCache")
|
||||||
|
public AjaxResult testCache(String type, String watchSign, String empNo) throws Exception {
|
||||||
|
watchSign = StringUtils.isBlank(watchSign) ? "865593070205859" : watchSign;
|
||||||
|
empNo = StringUtils.isBlank(empNo) ? "TC1336019032" : empNo;
|
||||||
|
|
||||||
|
// 清除缓存
|
||||||
|
if ("0".equals(type)) {
|
||||||
|
commonService.cacheEvictDeviceByWatchSign(watchSign);
|
||||||
|
return AjaxResult.success("根据empNo ---> 清除缓存成功");
|
||||||
|
}
|
||||||
|
// 查询设备信息
|
||||||
|
if ("1".equals(type)) {
|
||||||
|
WatchDevice watchDeviceByWatchSign = commonService.getWatchDeviceByWatchSign(watchSign);
|
||||||
|
return AjaxResult.success(watchDeviceByWatchSign);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("2".equals(type)) {
|
||||||
|
commonService.cacheEvictDeviceByEmpNo(empNo,watchSign);
|
||||||
|
return AjaxResult.success("根据empNo ---> 清除缓存成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("3".equals(type)) {
|
||||||
|
WatchDevice watchDevice = commonService.getWatchDeviceByEmpNo(empNo,watchSign);
|
||||||
|
return AjaxResult.success(watchDevice);
|
||||||
|
}
|
||||||
|
return AjaxResult.error("未知类型的消息");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.smartlive.bswatch.controller.web;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.service.IWatchClassModelService;
|
||||||
|
import com.smartlive.common.validator.group.InsertValidate;
|
||||||
|
import com.smartlive.common.validator.group.UpdateValidate;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchClassModelVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/14
|
||||||
|
*/
|
||||||
|
@RequestMapping("/watch/classMode")
|
||||||
|
@RestController
|
||||||
|
public class WatchClassModeController {
|
||||||
|
@Autowired
|
||||||
|
private IWatchClassModelService watchClassModelService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
* @param classModelVO
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/list")
|
||||||
|
public AjaxResult list(WatchClassModelVO classModelVO) {
|
||||||
|
return watchClassModelService.queryVO(classModelVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增加数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public AjaxResult add(@Validated(InsertValidate.class) @RequestBody WatchClassModelVO classModelVO) {
|
||||||
|
return watchClassModelService.saveVO(classModelVO);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public AjaxResult update(@Validated(UpdateValidate.class) @RequestBody WatchClassModelVO classModelVO) {
|
||||||
|
return watchClassModelService.updateVO(classModelVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*/
|
||||||
|
@RequestMapping("/delete")
|
||||||
|
public AjaxResult delete(Integer id) {
|
||||||
|
return watchClassModelService.delete(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package com.smartlive.bswatch.controller.web;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.service.IWatchDeviceService;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchOperationAddVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchOperationVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import com.smartlive.common.utils.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/3/19
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备管理接口:
|
||||||
|
* 查询
|
||||||
|
* 修改
|
||||||
|
* 新增
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/watch/operation")
|
||||||
|
public class WatchOperationController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询腕表设备信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Autowired
|
||||||
|
private IWatchDeviceService watchDeviceService;
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
@RequestMapping("/query")
|
||||||
|
public AjaxResult query(WatchOperationVO watchOperationVO) {
|
||||||
|
if(StringUtils.isNotBlank(watchOperationVO.getEmpName())){
|
||||||
|
watchOperationVO.setEmpName(watchOperationVO.getEmpName());
|
||||||
|
}
|
||||||
|
return watchDeviceService.queryWatches(watchOperationVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
@PostMapping("/add")
|
||||||
|
public AjaxResult add(@RequestBody @Validated WatchOperationAddVO watchOperationAddVO) {
|
||||||
|
return watchDeviceService.addWatch(watchOperationAddVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
@GetMapping("/delete")
|
||||||
|
public AjaxResult delete(@NotBlank(message = "腕表id不能为空") Long deviceId) {
|
||||||
|
return watchDeviceService.deleteWatch(deviceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.smartlive.bswatch.controller.web;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.service.IWatchWhitePeriodService;
|
||||||
|
import com.smartlive.common.validator.group.InsertValidate;
|
||||||
|
import com.smartlive.common.validator.group.UpdateValidate;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchWhitePeriodVO;
|
||||||
|
import com.smartlive.common.core.domain.AjaxResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/11
|
||||||
|
*/
|
||||||
|
@RequestMapping("watch/whitePeriod")
|
||||||
|
@RestController
|
||||||
|
public class WatchWhitePeriodController {
|
||||||
|
@Autowired
|
||||||
|
private IWatchWhitePeriodService watchWhitePeriodService;
|
||||||
|
|
||||||
|
// 增删改查
|
||||||
|
/**
|
||||||
|
* 查询
|
||||||
|
*/
|
||||||
|
@RequestMapping("list")
|
||||||
|
public AjaxResult list(WatchWhitePeriodVO watchWhitePeriodVO) {
|
||||||
|
return watchWhitePeriodService.queryByVO(watchWhitePeriodVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("add")
|
||||||
|
public AjaxResult add(@Validated(InsertValidate.class) @RequestBody WatchWhitePeriodVO watchWhitePeriodVO) {
|
||||||
|
return watchWhitePeriodService.saveWithVO(watchWhitePeriodVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("update")
|
||||||
|
public AjaxResult update(@Validated(UpdateValidate.class) @RequestBody WatchWhitePeriodVO watchWhitePeriodVO) {
|
||||||
|
return watchWhitePeriodService.updateWithVO(watchWhitePeriodVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("delete")
|
||||||
|
public AjaxResult delete(Integer id){
|
||||||
|
if(id==null){
|
||||||
|
return AjaxResult.error("请指定要删除的白名单限制周期");
|
||||||
|
}
|
||||||
|
return watchWhitePeriodService.removeWithIds(java.util.Arrays.asList(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("deleteBatch")
|
||||||
|
public AjaxResult deleteBatch(Integer[] ids){
|
||||||
|
if(ids==null || ids.length==0){
|
||||||
|
return AjaxResult.error("请指定要删除的白名单限制周期");
|
||||||
|
}
|
||||||
|
return watchWhitePeriodService.removeWithIds(java.util.Arrays.asList(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package com.smartlive.bswatch.costant;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.enmus.WatchApiEnum;
|
||||||
|
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/2/5
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 分隔符
|
||||||
|
public interface CacheConstant {
|
||||||
|
String CACHE_SEPARATOR="_";
|
||||||
|
String WATCH_DEVICE_INFO_KEY= WatchApiEnum.LOGIN.getApiName();
|
||||||
|
String STEP_KEY= WatchApiEnum.REPORT_HEARTBEAT.getApiName();
|
||||||
|
String DEVICE_STATUS_KEY = WatchApiEnum.DEVICE_STATUS.getApiName();
|
||||||
|
String REPORT_LOCATION_INFO_KEY=WatchApiEnum.REPORT_LOCATION_INFO.getApiName();
|
||||||
|
/**
|
||||||
|
* 普通命令缓存60s
|
||||||
|
*/
|
||||||
|
Integer COMMON_CACHE_TTL=60;
|
||||||
|
TimeUnit COMMON_CACHE_TTL_UNIT=TimeUnit.SECONDS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存有效时间:命令key缓存时间
|
||||||
|
*/
|
||||||
|
int LOCATION_CACHE_TIME = 20;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存时间单位:命令key缓存时间单位
|
||||||
|
*/
|
||||||
|
TimeUnit LOCATION_CACHE_TIME_UNIT = TimeUnit.MINUTES;
|
||||||
|
String WATCH_WARN_KEY = "watchWarn";
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
package com.smartlive.bswatch.costant;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/1/21
|
||||||
|
*/
|
||||||
|
public interface WatchConstant {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全周
|
||||||
|
*/
|
||||||
|
String ALL_PERIOD = "0+1+2+3+4+5+6";
|
||||||
|
/**
|
||||||
|
* 全天
|
||||||
|
*/
|
||||||
|
String ALL_TIME = "0000-2359";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* =默认待机时间段
|
||||||
|
*/
|
||||||
|
String REDAY_TIME = "2300-0600";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取命令执行结果的循环次数
|
||||||
|
*/
|
||||||
|
// TODO: 演示用降低循环次数以及休眠时间
|
||||||
|
// int LOOP_COUNT = 20;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每次循环休眠的时间数:单位毫秒
|
||||||
|
*/
|
||||||
|
// int LOOP_SLEEP_TIME = 500;
|
||||||
|
|
||||||
|
// 演示设置为命令等待时间最长为2s
|
||||||
|
int LOOP_COUNT = 20;
|
||||||
|
int LOOP_SLEEP_TIME = 100;
|
||||||
|
|
||||||
|
|
||||||
|
// 1.下发请求
|
||||||
|
// 2.下发响应
|
||||||
|
// 3.上报请求
|
||||||
|
// 4.上报响应
|
||||||
|
String MSG_TYPE_DOWN_REQ = "1";
|
||||||
|
String MSG_TYPE_DOWN_RESP = "2";
|
||||||
|
String MSG_TYPE_UP_REQ = "3";
|
||||||
|
String MSG_TYPE_UP_RESP = "4";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课堂模式sos是否可以呼入: 0 否 1是
|
||||||
|
*/
|
||||||
|
String SOS_CALL_IN = "0";
|
||||||
|
/**
|
||||||
|
* 课堂模式sos是否可以呼出: 0 否 1 是
|
||||||
|
*/
|
||||||
|
String SOS_CALL_ON = "0";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生性别
|
||||||
|
*/
|
||||||
|
String STUDENT_MALE = "1";
|
||||||
|
String STUDENT_FEMALE = "2";
|
||||||
|
String STUDENT_UNKNOWN = "3";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片url
|
||||||
|
*/
|
||||||
|
String STUDENT_MALE_AVATAR = "http://download.zhengfankeji.com/upload/technology/stuImg/male.png";
|
||||||
|
String STUDENT_FEMALE_AVATAR = "http://download.zhengfankeji.com/upload/technology/stuImg/female.png";
|
||||||
|
String STUDENT_DEFAULT_AVATAR = "http://download.zhengfankeji.com/upload/technology/stuImg/default.png";
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表模式设置
|
||||||
|
* 0: 待机模式: 待机模式下,设备不连接平台,只可使用拨打电话,接听电话和收发短信;待机模式结束,自动切换为之前模式,如设备处于实时模式则延时至实时
|
||||||
|
* 模式结束进入待机模式
|
||||||
|
* 1: 省电模式: 主动定位,保持正常心跳,设备不主动上报位置
|
||||||
|
* 2: 平衡模式: 平衡模式下设备可主动定位,保持正常心跳,设备每 20 分钟为基准,上报一次当前位置
|
||||||
|
* 3: 实时模式: 设备与平台保持正常心跳,每 3 分钟上报一次位置信息。
|
||||||
|
* 每次切换模式后立即上报一次当前位置。
|
||||||
|
*/
|
||||||
|
Integer WATCH_MODE_REDAY = 0;
|
||||||
|
Integer WATCH_MODE_POWER_SAVE = 1;
|
||||||
|
Integer WATCH_MODE_BALANCE = 2;
|
||||||
|
Integer WATCH_MODE_IMMEDIATE = 3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 白名单电话最大数量
|
||||||
|
*/
|
||||||
|
int WATCH_WHITE_MAX_COUNT = 20;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时定位频率设置
|
||||||
|
*/
|
||||||
|
int WATCH_LOCATION_FREQUENCY_MIN = 5;
|
||||||
|
|
||||||
|
int WATCH_LOCATION_FREQUENCY_MIDDLE = 10;
|
||||||
|
|
||||||
|
int WATCH_LOCATION_FREQUENCY_MAX = 20;
|
||||||
|
|
||||||
|
int WATCH_LOCATION_FREQUENCY_DEFAULT =20;
|
||||||
|
|
||||||
|
String LOGIN_PREFIX = "watch_login:";
|
||||||
|
|
||||||
|
// 禁用电话的学校id
|
||||||
|
final Set<Integer> DISABLE_PHONE_ORGI_IDS = new HashSet<Integer>(){
|
||||||
|
{
|
||||||
|
// add(20230);
|
||||||
|
// 建安区三高 吧
|
||||||
|
// add(56861);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.smartlive.bswatch.enmus;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/1/21
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum PowerEnum {
|
||||||
|
|
||||||
|
// 上报类型(1=缺电报警; 2=关机报警 ; 3=自
|
||||||
|
// 动关机报警 ; 4=开机报警,5=设备充电,6=电
|
||||||
|
// 源已断开 7=设备电量已充满)
|
||||||
|
POOR_ALARM("1", "缺电报警"),
|
||||||
|
CLOSE_ALARM("2", "关机报警"),
|
||||||
|
AUTO_CLOSE_ALARM("3", "自动关机报警"),
|
||||||
|
OPEN_ALARM("4", "开机报警"),
|
||||||
|
CHARGE_ALARM("5", "设备充电"),
|
||||||
|
DIS_POWER_ALARM("6", "电源已断开"),
|
||||||
|
FULL_POWER_ALARM("7", "设备电量已充满");
|
||||||
|
|
||||||
|
private String powerType;
|
||||||
|
private String desc;
|
||||||
|
|
||||||
|
PowerEnum(String powerType, String desc) {
|
||||||
|
this.powerType = powerType;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package com.smartlive.bswatch.enmus;
|
||||||
|
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author:lilj
|
||||||
|
* @date:2025/1/18
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
public enum WatchApiEnum {
|
||||||
|
// 设备请求平台,拉取配置数据
|
||||||
|
LOGIN("DEVICE_LOGIN","设备登录"),
|
||||||
|
GET_BUTTON("GET_NORMAL_BUTTON","按键获取"),
|
||||||
|
GET_INCOME_CALL("GET_INCOMING_CALL","呼入电话获取"),
|
||||||
|
GET_CLASS_MODEL("GET_CLASS_MODEL","课堂模式获取"),
|
||||||
|
ERROR_RESP("ERROR_RESP","错误响应"),
|
||||||
|
GET_SMS_PORT("GET_SMS_PORT","短信端口获取"),
|
||||||
|
GET_WEATHER_NOW("GET_WEATHER_NOW","获取实时天气"),
|
||||||
|
GET_WEATHER_FORCAST("GET_WEATHER_FORCAST","获取未来天气"),
|
||||||
|
GET_WEATHER_INFO("GET_WEATHER_INFO","获取天气信息"),
|
||||||
|
GET_STUDENT_INFO("GET_STUDENT_INFO","学生信息获取"),
|
||||||
|
DEVICE_STATUS("DEVICE_STATUS","设备状态上报"),
|
||||||
|
GET_BALANCE_INFO("GET_BALANCE_INFO", "获取设备绑定人员余额信息"),
|
||||||
|
|
||||||
|
// 设备上传数据到平台
|
||||||
|
ALARM_POWER("ALARM_POWER","电量上报"),
|
||||||
|
REPORT_HEARTBEAT("REPORT_HEARTBEAT","心跳请求,携带电量与步数"),
|
||||||
|
REPORT_LOCATION_INFO("REPORT_LOCATION_INFO","位置数据上传"),
|
||||||
|
REPORT_CALL_LOG("REPORT_CALL_LOG","通话记录上传"),
|
||||||
|
GET_SKIP_MAC("GET_SKIP_MAC","获取跳绳蓝牙MAC"),
|
||||||
|
REPORT_HEART_HEALTH("REPORT_HEART_HEALTH","心率健康上报"),
|
||||||
|
REPORT_SMS_READ("REPORT_SMS_READ","短信读取上报"),
|
||||||
|
REPORT_SOS("REPORT_SOS","sos上报"),
|
||||||
|
REPORT_SLEEP_DATA("REPORT_SLEEP_DATA","睡眠数据上报"),
|
||||||
|
|
||||||
|
// 平台下发,设备响应接口
|
||||||
|
SET_INCOMING_CALL("SET_INCOMING_CALL","设置呼入电话"),
|
||||||
|
SET_NORMAL_BUTTON("SET_NORMAL_BUTTON","设置按键"),
|
||||||
|
LOCATION_INFO_GET("LOCATION_INFO_GET","实时位置获取"),
|
||||||
|
REQUEST_CALL("REQUEST_CALL","安全防护"),
|
||||||
|
FREQUENCY_LOCATION_SET("FREQUENCY_LOCATION_SET","定时上报位置频率设置"),
|
||||||
|
SET_HEARTBEAT("SET_HEARTBEAT","设备心跳频率设置"),
|
||||||
|
SET_CLASS_MODEL("SET_CLASS_MODEL","设置课堂模式"),
|
||||||
|
SEND_SMS("SEND_SMS","发送短信"),
|
||||||
|
SET_STUDENT_INFO("SET_STUDENT_INFO","设置学生信息"),
|
||||||
|
SET_REDAY_MODE("SET_REDAY_MODE","设置待机模式"),
|
||||||
|
SET_LOCATION_MODE("SET_LOCATION_MODE","设置定位模式"),
|
||||||
|
;
|
||||||
|
|
||||||
|
private static HashMap<String,WatchApiEnum> map = new HashMap<>();
|
||||||
|
|
||||||
|
private String apiName;
|
||||||
|
private String desc;
|
||||||
|
private WatchApiEnum (String apiName,String desc){
|
||||||
|
this.apiName = apiName;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
public static WatchApiEnum getByApiName(String apiName){
|
||||||
|
if(map.size() == 0){
|
||||||
|
for (WatchApiEnum watachApiEnum : values()) {
|
||||||
|
map.put(watachApiEnum.apiName,watachApiEnum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map.get(apiName);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("order_address")
|
||||||
|
public class Address {
|
||||||
|
|
||||||
|
@TableId(value = "address_id")
|
||||||
|
private Long addressId;
|
||||||
|
|
||||||
|
@NotNull(message = "用户ID不能为空")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@NotBlank(message = "收货人姓名不能为空")
|
||||||
|
private String consignee;
|
||||||
|
|
||||||
|
@NotBlank(message = "联系电话不能为空")
|
||||||
|
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@NotBlank(message = "地区信息不能为空")
|
||||||
|
private String region;
|
||||||
|
|
||||||
|
@NotBlank(message = "详细地址不能为空")
|
||||||
|
private String detailedAddress;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
//状态 1默认,0非默认
|
||||||
|
private Integer status;
|
||||||
|
//删除标志 0正常,1删除
|
||||||
|
private Integer delFlag;
|
||||||
|
}
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 员工表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class Employee implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织id
|
||||||
|
*/
|
||||||
|
private Integer organiId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门id
|
||||||
|
*/
|
||||||
|
private Integer deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有权限 1:表示有 0:表示没有
|
||||||
|
*/
|
||||||
|
private Boolean isAccess;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标识
|
||||||
|
*/
|
||||||
|
private Boolean delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物理卡号
|
||||||
|
*/
|
||||||
|
private String telId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频公话是否授权:1、表示有 0、表示没有
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0 -正常 1-挂失卡
|
||||||
|
*/
|
||||||
|
private Integer icCardStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0 -正常 1-挂失卡
|
||||||
|
*/
|
||||||
|
private String simCardStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别3:未知
|
||||||
|
*/
|
||||||
|
private String sex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员编号
|
||||||
|
*/
|
||||||
|
private Integer personNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SIM卡ICCID, 插卡式使用
|
||||||
|
*/
|
||||||
|
private Integer phoneCardNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人脸url
|
||||||
|
*/
|
||||||
|
private String facePhoto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人脸特征
|
||||||
|
*/
|
||||||
|
private String feature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 过期时间
|
||||||
|
*/
|
||||||
|
private Date expireDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级id
|
||||||
|
*/
|
||||||
|
private Integer gradeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级id
|
||||||
|
*/
|
||||||
|
private Integer classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年级名称
|
||||||
|
*/
|
||||||
|
private String gradeName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 班级名称
|
||||||
|
*/
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校名
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 授权版本号
|
||||||
|
*/
|
||||||
|
private String authVer;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-04-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class Meal implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物理编号
|
||||||
|
*/
|
||||||
|
@TableField("phyId")
|
||||||
|
private String phyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑卡号
|
||||||
|
*/
|
||||||
|
@TableField("cardId")
|
||||||
|
private Integer cardId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
@TableField("begTime")
|
||||||
|
private Date begTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
@TableField("endTime")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 余额
|
||||||
|
*/
|
||||||
|
@TableField("balance")
|
||||||
|
private Double balance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 补贴
|
||||||
|
*/
|
||||||
|
@TableField("subsidy")
|
||||||
|
private Double subsidy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缁鐎?
|
||||||
|
*/
|
||||||
|
@TableField("type")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField("createTime")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@TableField("operator")
|
||||||
|
private String operator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构
|
||||||
|
*/
|
||||||
|
@TableField("school")
|
||||||
|
private String school;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@TableField("empId")
|
||||||
|
private Integer empId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("order_watch")
|
||||||
|
public class OrderWatch {
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
private String tradeNo;
|
||||||
|
|
||||||
|
private Integer payType;
|
||||||
|
|
||||||
|
|
||||||
|
private BigDecimal credit;
|
||||||
|
|
||||||
|
private Integer isPass;
|
||||||
|
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private String payNo;
|
||||||
|
|
||||||
|
private Integer watchId;
|
||||||
|
|
||||||
|
private String watchName;
|
||||||
|
|
||||||
|
private BigDecimal watchPrice;
|
||||||
|
|
||||||
|
private Integer watchNum;
|
||||||
|
|
||||||
|
private String watchImage;
|
||||||
|
|
||||||
|
private String adress;
|
||||||
|
|
||||||
|
private String trackNum;
|
||||||
|
|
||||||
|
private Date orderTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createdTime;
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updatedTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,163 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 组织表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class SysOrgani implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织简称,至多8个字符.
|
||||||
|
*/
|
||||||
|
private String simpleName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织类型1幼教,2小学,3初中,4高中,5企业,6教育局,7完全学校,8完全中校,9九年义务教育学校,10培训机构
|
||||||
|
*/
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 省code
|
||||||
|
*/
|
||||||
|
private String province;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市code
|
||||||
|
*/
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区code
|
||||||
|
*/
|
||||||
|
private String district;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细地址
|
||||||
|
*/
|
||||||
|
private String detaild;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(正常0,停用1)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 补卡金额
|
||||||
|
*/
|
||||||
|
private Double rmoney;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 补卡事项
|
||||||
|
*/
|
||||||
|
private String rmoneyNote;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 家校沟通服务:0:未开通,1:开通
|
||||||
|
*/
|
||||||
|
private Integer jxPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 亲情电话服务:0:未开通,1:开通
|
||||||
|
*/
|
||||||
|
private Integer qqPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学费缴纳服务,0:未开通,1:开通,默认0
|
||||||
|
*/
|
||||||
|
private Integer xfPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监控服务:0:关闭,1:开通
|
||||||
|
*/
|
||||||
|
private Integer jkPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电子学生证服务:0:关闭,1:开通
|
||||||
|
*/
|
||||||
|
private Integer postPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 餐卡服务:0:未开通,1:开通
|
||||||
|
*/
|
||||||
|
private Integer ckPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 补卡服务:0:未开通,1:开通
|
||||||
|
*/
|
||||||
|
private Integer bkPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 水卡服务:0:未开通,1:开通
|
||||||
|
*/
|
||||||
|
private Integer skPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 餐卡微信充值服务:0:未开通,1:开通
|
||||||
|
*/
|
||||||
|
private Integer ckWxPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 餐卡支付宝充值服务:0:未开通,1:开通
|
||||||
|
*/
|
||||||
|
private Integer ckZfbPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 水卡微信充值服务:0:未开通,1:开通
|
||||||
|
*/
|
||||||
|
private Integer skWxPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 水卡支付宝充值服务:0:未开通,1:开通
|
||||||
|
*/
|
||||||
|
private Integer skZfbPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0:正常,1:已删除)
|
||||||
|
*/
|
||||||
|
private Integer delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchCallRecord implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通话记录id
|
||||||
|
*/
|
||||||
|
@TableId(value = "record_id", type = IdType.AUTO)
|
||||||
|
private Long recordId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本机sim卡iccid
|
||||||
|
*/
|
||||||
|
private String iccid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 本机号码
|
||||||
|
*/
|
||||||
|
private String selfPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通信电话
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "call_begin_time")
|
||||||
|
private Date startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
@TableField(value = "call_end_time")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通话时长(秒)
|
||||||
|
*/
|
||||||
|
private Integer duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通话类型:0 呼入 1 呼出
|
||||||
|
*/
|
||||||
|
private Integer callType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通话记录上传时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表课堂模式表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchClassModel implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课堂模式id
|
||||||
|
*/
|
||||||
|
@TableId(value = "class_id", type = IdType.AUTO)
|
||||||
|
private Integer classId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段
|
||||||
|
*/
|
||||||
|
private String times;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 周几生效:0周末.1-6:周一到周六
|
||||||
|
*/
|
||||||
|
private String period;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学校id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer effective;
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchDevice implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表id
|
||||||
|
*/
|
||||||
|
@TableId(value = "device_id", type = IdType.AUTO)
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 按键数量
|
||||||
|
*/
|
||||||
|
private Integer keyNums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 有无SOS按键:0 无 1有
|
||||||
|
*/
|
||||||
|
private Integer hasSosKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 暂无明确含义
|
||||||
|
*/
|
||||||
|
private String terminalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否支持区域报警:0 否 1 是
|
||||||
|
*/
|
||||||
|
private Integer hasAreaAlarm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否具备设备呼入功能
|
||||||
|
*/
|
||||||
|
private Integer hasCallIn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 协议版本
|
||||||
|
*/
|
||||||
|
private String protocolVersion;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rfid:10位
|
||||||
|
*/
|
||||||
|
private String rfid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备绑定电话号码
|
||||||
|
*/
|
||||||
|
private String bindPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SIM卡iccid
|
||||||
|
*/
|
||||||
|
private String iccid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备模式:
|
||||||
|
* 0 待机模式
|
||||||
|
* 1 省电模式
|
||||||
|
* 2 平衡模式
|
||||||
|
* 3 实时模式
|
||||||
|
*/
|
||||||
|
private Integer watchMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 待机模式时间段: 默认23:00-0600
|
||||||
|
*/
|
||||||
|
private String redayTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String empName;
|
||||||
|
|
||||||
|
private Integer locationFreq;
|
||||||
|
private Integer workTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0 表示刚录入系统 1 表示腕表已经有平台有交互了
|
||||||
|
*/
|
||||||
|
private Integer watchStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表备注信息
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 员工亲情电话
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchEmpPhone implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电话id
|
||||||
|
*/
|
||||||
|
@TableId(value = "watch_phone_id", type = IdType.AUTO)
|
||||||
|
@NotNull(message = "watchPhoneId不能为空")
|
||||||
|
private Integer watchPhoneId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 持有人名称
|
||||||
|
*/
|
||||||
|
private String phoneName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:0可用
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表安全围栏表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchFence implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生标识
|
||||||
|
*/
|
||||||
|
@TableField("emp_no")
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏名称
|
||||||
|
*/
|
||||||
|
@TableField("fence_name")
|
||||||
|
private String fenceName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 围栏地址
|
||||||
|
*/
|
||||||
|
@TableField("fence_address")
|
||||||
|
private String fenceAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
@TableField("longitude")
|
||||||
|
private BigDecimal longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
@TableField("latitude")
|
||||||
|
private BigDecimal latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 安全范围
|
||||||
|
*/
|
||||||
|
@TableField("size")
|
||||||
|
private Integer size;
|
||||||
|
|
||||||
|
@TableField(value = "create_time", fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
@TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑删除字段:0 正常数据;1删除数据
|
||||||
|
*/
|
||||||
|
@TableLogic(value = "0",delval = "1")
|
||||||
|
private Integer delFlag;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表血压数据表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchFloodPressure implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率数据id
|
||||||
|
*/
|
||||||
|
@TableId(value = "pressure_id", type = IdType.AUTO)
|
||||||
|
private Long pressureId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 舒张压
|
||||||
|
*/
|
||||||
|
private String lowPressure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收缩压
|
||||||
|
*/
|
||||||
|
private String highPressure;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据上传时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工编号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.DecimalMin;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName("watch_goods")
|
||||||
|
public class WatchGoods {
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@NotBlank(message = "腕表名称不能为空")
|
||||||
|
private String watchName;
|
||||||
|
|
||||||
|
@DecimalMin(value = "0.00", message = "价格不能小于0")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
private String image;
|
||||||
|
|
||||||
|
private Integer stock;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,357 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 健康周报告表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @since 2025-11-17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchHealthReport implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "report_id", type = IdType.AUTO)
|
||||||
|
private Long reportId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工编号
|
||||||
|
*/
|
||||||
|
@TableField("emp_no")
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
@TableField("watch_sign")
|
||||||
|
private String watchSign;
|
||||||
|
/**
|
||||||
|
* 设备名称
|
||||||
|
*/
|
||||||
|
@TableField("watch_name")
|
||||||
|
private String watchName;
|
||||||
|
/**
|
||||||
|
* 报告标题
|
||||||
|
*/
|
||||||
|
@TableField("report_title")
|
||||||
|
private String reportTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告年月
|
||||||
|
*/
|
||||||
|
@TableField("report_date")
|
||||||
|
private String reportDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告开始日期
|
||||||
|
*/
|
||||||
|
@TableField("start_date")
|
||||||
|
private String startDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告结束日期
|
||||||
|
*/
|
||||||
|
@TableField("end_date")
|
||||||
|
private String endDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血压测量总次数
|
||||||
|
*/
|
||||||
|
@TableField("bp_total_count")
|
||||||
|
private Integer bpTotalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血压正常次数
|
||||||
|
*/
|
||||||
|
@TableField("bp_normal_count")
|
||||||
|
private Integer bpNormalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血压异常次数
|
||||||
|
*/
|
||||||
|
@TableField("bp_abnormal_count")
|
||||||
|
private Integer bpAbnormalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血压异常比例
|
||||||
|
*/
|
||||||
|
@TableField("bp_abnormal_ratio")
|
||||||
|
private BigDecimal bpAbnormalRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血压建议文案
|
||||||
|
*/
|
||||||
|
@TableField("bp_advice")
|
||||||
|
private String bpAdvice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血压状态
|
||||||
|
*/
|
||||||
|
@TableField("bp_status")
|
||||||
|
private Integer bpStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血压周数据
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 心率测量总次数
|
||||||
|
*/
|
||||||
|
@TableField("hr_total_count")
|
||||||
|
private Integer hrTotalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率正常次数
|
||||||
|
*/
|
||||||
|
@TableField("hr_normal_count")
|
||||||
|
private Integer hrNormalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率异常次数
|
||||||
|
*/
|
||||||
|
@TableField("hr_abnormal_count")
|
||||||
|
private Integer hrAbnormalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率过缓次数
|
||||||
|
*/
|
||||||
|
@TableField("hr_bradycardia_count")
|
||||||
|
private Integer hrBradycardiaCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率过速次数
|
||||||
|
*/
|
||||||
|
@TableField("hr_tachycardia_count")
|
||||||
|
private Integer hrTachycardiaCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率异常比例
|
||||||
|
*/
|
||||||
|
@TableField("hr_abnormal_ratio")
|
||||||
|
private BigDecimal hrAbnormalRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率建议文案
|
||||||
|
*/
|
||||||
|
@TableField("hr_advice")
|
||||||
|
private String hrAdvice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率状态
|
||||||
|
*/
|
||||||
|
@TableField("hr_status")
|
||||||
|
private Integer hrStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温测量总次数
|
||||||
|
*/
|
||||||
|
@TableField("temp_total_count")
|
||||||
|
private Integer tempTotalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温正常次数
|
||||||
|
*/
|
||||||
|
@TableField("temp_normal_count")
|
||||||
|
private Integer tempNormalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温异常次数
|
||||||
|
*/
|
||||||
|
@TableField("temp_abnormal_count")
|
||||||
|
private Integer tempAbnormalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温偏低次数
|
||||||
|
*/
|
||||||
|
@TableField("temp_low_count")
|
||||||
|
private Integer tempLowCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温偏高次数
|
||||||
|
*/
|
||||||
|
@TableField("temp_high_count")
|
||||||
|
private Integer tempHighCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温异常比例
|
||||||
|
*/
|
||||||
|
@TableField("temp_abnormal_ratio")
|
||||||
|
private BigDecimal tempAbnormalRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温建议文案
|
||||||
|
*/
|
||||||
|
@TableField("temp_advice")
|
||||||
|
private String tempAdvice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温状态
|
||||||
|
*/
|
||||||
|
@TableField("temp_status")
|
||||||
|
private Integer tempStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血氧测量总次数
|
||||||
|
*/
|
||||||
|
@TableField("oxy_total_count")
|
||||||
|
private Integer oxyTotalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血氧正常次数
|
||||||
|
*/
|
||||||
|
@TableField("oxy_normal_count")
|
||||||
|
private Integer oxyNormalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血氧异常次数
|
||||||
|
*/
|
||||||
|
@TableField("oxy_abnormal_count")
|
||||||
|
private Integer oxyAbnormalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血氧异常比例
|
||||||
|
*/
|
||||||
|
@TableField("oxy_abnormal_ratio")
|
||||||
|
private BigDecimal oxyAbnormalRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血氧建议文案
|
||||||
|
*/
|
||||||
|
@TableField("oxy_advice")
|
||||||
|
private String oxyAdvice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血氧状态
|
||||||
|
*/
|
||||||
|
@TableField("oxy_status")
|
||||||
|
private Integer oxyStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠记录总次数
|
||||||
|
*/
|
||||||
|
@TableField("sleep_total_count")
|
||||||
|
private Integer sleepTotalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠正常次数
|
||||||
|
*/
|
||||||
|
@TableField("sleep_normal_count")
|
||||||
|
private Integer sleepNormalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠异常次数
|
||||||
|
*/
|
||||||
|
@TableField("sleep_abnormal_count")
|
||||||
|
private Integer sleepAbnormalCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠异常比例
|
||||||
|
*/
|
||||||
|
@TableField("sleep_abnormal_ratio")
|
||||||
|
private BigDecimal sleepAbnormalRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠建议文案
|
||||||
|
*/
|
||||||
|
@TableField("sleep_advice")
|
||||||
|
private String sleepAdvice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠状态
|
||||||
|
*/
|
||||||
|
@TableField("sleep_status")
|
||||||
|
private Integer sleepStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整体异常次数
|
||||||
|
*/
|
||||||
|
@TableField("overall_score")
|
||||||
|
private Integer overallScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整体状态
|
||||||
|
*/
|
||||||
|
@TableField("overall_status")
|
||||||
|
private String overallStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 整体健康文案
|
||||||
|
*/
|
||||||
|
@TableField("overall_assessment")
|
||||||
|
private String overallAssessment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 舒张压
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<Integer> lowPressures;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收缩压
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<Integer> highPressures;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率数据
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<Integer> heartBeats;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血氧数据
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<Integer> oxyDatas;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温数据
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<Double> temperatureDatas;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠总时长(分钟)
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<Double> sleepTotalTimes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<String> times;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报告生成时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表健康规则表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @since 2025-11-17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchHealthRules implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规则ID
|
||||||
|
*/
|
||||||
|
@TableId(value = "rule_id", type = IdType.AUTO)
|
||||||
|
private Long ruleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指标类型: BLOOD_PRESSURE(血压), HEART_RATE(心率), TEMPERATURE(体温), BLOOD_OXYGEN(血氧), SLEEP(睡眠)
|
||||||
|
*/
|
||||||
|
private String indicatorType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规则名称
|
||||||
|
*/
|
||||||
|
private String ruleName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 条件表达式(JSON格式)
|
||||||
|
*/
|
||||||
|
private String conditionExpression;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断标准描述
|
||||||
|
*/
|
||||||
|
private String judgmentCriteria;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建议文案模板
|
||||||
|
*/
|
||||||
|
private String adviceTemplate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 优先级(数字越小优先级越高)
|
||||||
|
*/
|
||||||
|
private Integer priority;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态:1启用,0禁用
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最小值
|
||||||
|
*/
|
||||||
|
private BigDecimal minValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最大值
|
||||||
|
*/
|
||||||
|
private BigDecimal maxValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常类型: NORMAL(正常), ABNORMAL(异常),OCCASIONAL(偶尔异常)
|
||||||
|
*/
|
||||||
|
private Integer abnormalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 阈值比例
|
||||||
|
*/
|
||||||
|
private BigDecimal thresholdRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchHeart implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率数据id
|
||||||
|
*/
|
||||||
|
@TableId(value = "heart_id", type = IdType.AUTO)
|
||||||
|
private Long heartId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 心率数据
|
||||||
|
*/
|
||||||
|
private Integer heartBeat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据上传时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchLocation implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 位置信息id
|
||||||
|
*/
|
||||||
|
@TableId(value = "location_id", type = IdType.AUTO)
|
||||||
|
private Long locationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定位模式:0:LBS+wifi 1:GPS
|
||||||
|
*/
|
||||||
|
private Integer locationType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private BigDecimal longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private BigDecimal latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址名称
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
private String areaCode;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchModeLog implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备模式切换日志id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换前模式
|
||||||
|
*/
|
||||||
|
private Integer beforeMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换后模式
|
||||||
|
*/
|
||||||
|
private Integer afterMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换时间
|
||||||
|
*/
|
||||||
|
private Date changeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 之前模式工作时间
|
||||||
|
*/
|
||||||
|
private Integer workTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日志创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchOxy implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血氧数据id
|
||||||
|
*/
|
||||||
|
@TableId(value = "oxy_id", type = IdType.AUTO)
|
||||||
|
private Long oxyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血氧数据
|
||||||
|
*/
|
||||||
|
private String oxyData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 血氧数据上传时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-28
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchPower implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电量id
|
||||||
|
*/
|
||||||
|
@TableId(value = "power_id", type = IdType.AUTO)
|
||||||
|
private Long powerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电量
|
||||||
|
*/
|
||||||
|
private String power;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上报类型(1=缺电报警; 2=关机报警 ; 3=自
|
||||||
|
* 动关机报警 ; 4=开机报警,5=设备充电,6=电
|
||||||
|
* 源已断开 7=设备电量已充满)
|
||||||
|
*/
|
||||||
|
private String powerType;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-04-02
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchSkip implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳绳id
|
||||||
|
*/
|
||||||
|
@TableId(value = "skip_id", type = IdType.AUTO)
|
||||||
|
private Long skipId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳绳mac地址
|
||||||
|
*/
|
||||||
|
private String skipMac;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联学号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联人员信息
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表睡眠数据表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-03-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchSleep implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠数据id
|
||||||
|
*/
|
||||||
|
@TableId(value = "sleep_id", type = IdType.AUTO)
|
||||||
|
private Long sleepId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠时间段
|
||||||
|
*/
|
||||||
|
private String sleepPeriod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠数据上传时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工编号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 睡眠总时长(分钟)
|
||||||
|
*/
|
||||||
|
private String sleepTotalTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 深度睡眠时长
|
||||||
|
*/
|
||||||
|
private String deepSleepTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 浅度睡眠时长
|
||||||
|
*/
|
||||||
|
private String lightSleepTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rem睡眠时长
|
||||||
|
*/
|
||||||
|
private String remSleepTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清醒时长
|
||||||
|
*/
|
||||||
|
private String wakeTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchSos implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sos电话id
|
||||||
|
*/
|
||||||
|
@TableId(value = "sos_id", type = IdType.AUTO)
|
||||||
|
private Long sosId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sos电话
|
||||||
|
*/
|
||||||
|
private String sosPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电话联系人
|
||||||
|
*/
|
||||||
|
private String phoneName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学生标识
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表sos报警日志表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-03-18
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchSosLog implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sos上报记录id
|
||||||
|
*/
|
||||||
|
@TableId(value = "sos_log_id", type = IdType.AUTO)
|
||||||
|
private Long sosLogId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sos上报时间
|
||||||
|
*/
|
||||||
|
private Date reportTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统保存时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工编号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchStep implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 步数id
|
||||||
|
*/
|
||||||
|
@TableId(value = "step_id", type = IdType.AUTO)
|
||||||
|
private Long stepId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 步数
|
||||||
|
*/
|
||||||
|
private Integer stepCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 每日日期,精确到日
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 部门表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("sys_dept")
|
||||||
|
public class WatchSysDept implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(value = "dept_id", type = IdType.AUTO)
|
||||||
|
private Integer deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门名称
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 父部门Id
|
||||||
|
*/
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织id
|
||||||
|
*/
|
||||||
|
private Integer organiId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0正常,1停用)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0正常,1删除)
|
||||||
|
*/
|
||||||
|
private Integer delFalg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchTemperature implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温数据id
|
||||||
|
*/
|
||||||
|
@TableId(value = "temperature_id", type = IdType.AUTO)
|
||||||
|
private Long temperatureId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温数据
|
||||||
|
*/
|
||||||
|
private String temperatureData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 体温数据上传时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工编号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表定位警报表
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchWarn implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 学号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 腕表唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
/**
|
||||||
|
* 报警名称
|
||||||
|
*/
|
||||||
|
private String warnName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private BigDecimal longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 纬度
|
||||||
|
*/
|
||||||
|
private BigDecimal latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 距离:4为小数
|
||||||
|
*/
|
||||||
|
private BigDecimal distance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警地点
|
||||||
|
*/
|
||||||
|
private String warnAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 报警时间
|
||||||
|
*/
|
||||||
|
private Date warnTime;
|
||||||
|
|
||||||
|
private Long fenceId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchWhite implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 白名单id
|
||||||
|
*/
|
||||||
|
@TableId(value = "white_id", type = IdType.AUTO)
|
||||||
|
private Long whiteId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 白名单电话
|
||||||
|
*/
|
||||||
|
private String whitePhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电话联系人
|
||||||
|
*/
|
||||||
|
private String phoneName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
/**
|
||||||
|
* 学生学号
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段1
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String time1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段2
|
||||||
|
*/
|
||||||
|
private String time2;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class WatchWhitePeriod implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间段id
|
||||||
|
*/
|
||||||
|
@TableId(value = "period_id", type = IdType.AUTO)
|
||||||
|
private Long periodId;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
private String empNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备唯一标识
|
||||||
|
*/
|
||||||
|
private String watchSign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
private String period;
|
||||||
|
}
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
package com.smartlive.bswatch.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-04-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class Water implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物理编号
|
||||||
|
*/
|
||||||
|
@TableField("phyId")
|
||||||
|
private String phyId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逻辑卡号
|
||||||
|
*/
|
||||||
|
@TableField("cardId")
|
||||||
|
private Integer cardId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*/
|
||||||
|
@TableField("begTime")
|
||||||
|
private Date begTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
@TableField("endTime")
|
||||||
|
private Date endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 余额
|
||||||
|
*/
|
||||||
|
@TableField("balance")
|
||||||
|
private Double balance;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 补贴
|
||||||
|
*/
|
||||||
|
@TableField("subsidy")
|
||||||
|
private Double subsidy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@TableField("status")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0直饮水,1淋浴,2吹风机
|
||||||
|
*/
|
||||||
|
@TableField("type")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField("createTime")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@TableField("operator")
|
||||||
|
private String operator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机构
|
||||||
|
*/
|
||||||
|
@TableField("school")
|
||||||
|
private String school;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@TableField("empId")
|
||||||
|
private Integer empId;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.entity.Address;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface AddressMapper extends BaseMapper<Address>{
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.entity.OrderWatch;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
@Mapper
|
||||||
|
public interface OrderWatchMapper extends BaseMapper<OrderWatch> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchCallRecord;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
public interface WatchCallRecordMapper extends BaseMapper<WatchCallRecord> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchClassModel;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchClassModelVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表课堂模式表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-07
|
||||||
|
*/
|
||||||
|
public interface WatchClassModelMapper extends BaseMapper<WatchClassModel> {
|
||||||
|
|
||||||
|
List<WatchClassModelVO> queryVO(WatchClassModelVO classModelVO);
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchDevice;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchOperationVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
public interface WatchDeviceMapper extends BaseMapper<WatchDevice> {
|
||||||
|
|
||||||
|
List<WatchOperationVO> queryVO(WatchOperationVO watchOperationVO);
|
||||||
|
|
||||||
|
List<WatchDevice> getUsedWatchDeviceList();
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.entity.WatchEmpPhone;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchEmpPhoneVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 员工亲情电话 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-06
|
||||||
|
*/
|
||||||
|
public interface WatchEmpPhoneMapper extends BaseMapper<WatchEmpPhone> {
|
||||||
|
|
||||||
|
List<WatchEmpPhoneVO> selectEmpPhone(WatchEmpPhoneVO empPhoneVO);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.Employee;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 员工表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-06
|
||||||
|
*/
|
||||||
|
public interface WatchEmployeeMapper extends BaseMapper<Employee> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchFence;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchFenceVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表安全围栏表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-08
|
||||||
|
*/
|
||||||
|
public interface WatchFenceMapper extends BaseMapper<WatchFence> {
|
||||||
|
|
||||||
|
List<WatchFenceVO> selectQueryVO(WatchFenceVO fenceVO);
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.entity.WatchFloodPressure;
|
||||||
|
import com.smartlive.bswatch.vo.commandVO.HeathReportVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.HealthQueryVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.PressureVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表血压数据表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-03-17
|
||||||
|
*/
|
||||||
|
public interface WatchFloodPressureMapper extends BaseMapper<WatchFloodPressure> {
|
||||||
|
|
||||||
|
List<PressureVO> queryVO(HealthQueryVO healthQueryVO);
|
||||||
|
|
||||||
|
List<WatchFloodPressure> selectByEmpAndTime(@Param("empNo") String empNo, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||||
|
|
||||||
|
|
||||||
|
List<HeathReportVO> selectLatestPressureByDateRange(@Param("empNo") String empNo, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.entity.WatchGoods;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface WatchGoodsMapper extends BaseMapper<WatchGoods> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.TO.HeathReportTO;
|
||||||
|
import com.smartlive.bswatch.entity.WatchHealthReport;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 健康周报告表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @since 2025-11-17
|
||||||
|
*/
|
||||||
|
public interface WatchHealthReportMapper extends BaseMapper<WatchHealthReport> {
|
||||||
|
|
||||||
|
List<HeathReportTO> getReportByEmpNo(@Param("watchSign") String watchSign, @Param("time") String time);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.entity.WatchHealthRules;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表健康规则表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author system
|
||||||
|
* @since 2025-11-17
|
||||||
|
*/
|
||||||
|
public interface WatchHealthRulesMapper extends BaseMapper<WatchHealthRules> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchHeart;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.vo.commandVO.HeathReportVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.HealthQueryVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.HeartBeatVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
public interface WatchHeartMapper extends BaseMapper<WatchHeart> {
|
||||||
|
|
||||||
|
List<HeartBeatVO> queryVO(HealthQueryVO healthQueryVO);
|
||||||
|
|
||||||
|
List<WatchHeart> selectByEmpAndTime(@Param("empNo") String empNo, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定时间段内每天最新的心率记录
|
||||||
|
* @param startDate 开始时间
|
||||||
|
* @param endDate 结束时间
|
||||||
|
* @param empNo 员工编号
|
||||||
|
* @return 每天最新的心率记录列表
|
||||||
|
*/
|
||||||
|
List<HeathReportVO> selectLatestHeartByDateRange(@Param("empNo") String empNo, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchLocation;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.LocationQueryVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
public interface WatchLocationMapper extends BaseMapper<WatchLocation> {
|
||||||
|
|
||||||
|
List<WatchLocation> selectLoactionTrack(LocationQueryVO locationQueryVO);
|
||||||
|
|
||||||
|
List<WatchLocation> selectLoactionTrack2(LocationQueryVO locationQueryVO);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchModeLog;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-28
|
||||||
|
*/
|
||||||
|
public interface WatchModeLogMapper extends BaseMapper<WatchModeLog> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchOxy;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.vo.commandVO.HeathReportVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.BloodOxyVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.HealthQueryVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
public interface WatchOxyMapper extends BaseMapper<WatchOxy> {
|
||||||
|
|
||||||
|
List<BloodOxyVO> queryVO(HealthQueryVO healthQueryVO);
|
||||||
|
|
||||||
|
List<WatchOxy> selectByEmpAndTime(@Param("empNo") String empNo, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定时间段内每天最新的血氧记录
|
||||||
|
* @param startDate 开始时间
|
||||||
|
* @param endDate 结束时间
|
||||||
|
* @param empNo 员工编号
|
||||||
|
* @return 每天最新的血氧记录列表
|
||||||
|
*/
|
||||||
|
List<HeathReportVO> selectLatestOxyByDateRange(@Param("empNo") String empNo, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchPower;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-28
|
||||||
|
*/
|
||||||
|
public interface WatchPowerMapper extends BaseMapper<WatchPower> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchSkip;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-04-02
|
||||||
|
*/
|
||||||
|
public interface WatchSkipMapper extends BaseMapper<WatchSkip> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchSleep;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.vo.commandVO.HeathReportVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.HealthQueryVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.SleepVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表睡眠数据表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-03-18
|
||||||
|
*/
|
||||||
|
public interface WatchSleepMapper extends BaseMapper<WatchSleep> {
|
||||||
|
|
||||||
|
SleepVO queryVO(HealthQueryVO healthQueryVO);
|
||||||
|
|
||||||
|
List<WatchSleep> selectByEmpAndTime(@Param("empNo") String empNo, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定时间段内每天最新的睡眠记录
|
||||||
|
* @param startDate 开始时间
|
||||||
|
* @param endDate 结束时间
|
||||||
|
* @param empNo 员工编号
|
||||||
|
* @return 每天最新的睡眠记录列表
|
||||||
|
*/
|
||||||
|
List<HeathReportVO> selectLatestSleepByDateRange(@Param("empNo") String empNo, @Param("startDate") String startDate, @Param("endDate") String endDate);
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchSosLog;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 腕表sos报警日志表 Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-03-18
|
||||||
|
*/
|
||||||
|
public interface WatchSosLogMapper extends BaseMapper<WatchSosLog> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchSos;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.SosPhoneVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
public interface WatchSosMapper extends BaseMapper<WatchSos> {
|
||||||
|
|
||||||
|
List<SosPhoneVO> selectQueryVO(SosPhoneVO sosPhoneVo);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.smartlive.bswatch.mapper;
|
||||||
|
|
||||||
|
import com.smartlive.bswatch.entity.WatchStep;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.HealthQueryVO;
|
||||||
|
import com.smartlive.bswatch.vo.controllerVO.WatchStepVO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author lilj
|
||||||
|
* @since 2025-02-05
|
||||||
|
*/
|
||||||
|
public interface WatchStepMapper extends BaseMapper<WatchStep> {
|
||||||
|
|
||||||
|
WatchStepVO queryVO(HealthQueryVO healthQueryVO);
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user