diff --git a/pom.xml b/pom.xml index d702f67f..822e9c13 100644 --- a/pom.xml +++ b/pom.xml @@ -98,6 +98,8 @@ nacos nacos 127.0.0.1:4560 + + diff --git a/ruoyi-auth/pom.xml b/ruoyi-auth/pom.xml index 86bf0b99..a4bdd55f 100644 --- a/ruoyi-auth/pom.xml +++ b/ruoyi-auth/pom.xml @@ -10,6 +10,7 @@ ruoyi-auth + ruoyi-auth 认证授权中心 diff --git a/ruoyi-modules/dimp-wy-web/.gitattributes b/ruoyi-modules/dimp-wy-web/.gitattributes new file mode 100644 index 00000000..3b41682a --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/.gitattributes @@ -0,0 +1,2 @@ +/mvnw text eol=lf +*.cmd text eol=crlf diff --git a/ruoyi-modules/dimp-wy-web/.gitignore b/ruoyi-modules/dimp-wy-web/.gitignore new file mode 100644 index 00000000..549e00a2 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### 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/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/ruoyi-modules/dimp-wy-web/mvnw b/ruoyi-modules/dimp-wy-web/mvnw new file mode 100644 index 00000000..19529ddf --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/mvnw @@ -0,0 +1,259 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.2 +# +# Optional ENV vars +# ----------------- +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# ---------------------------------------------------------------------------- + +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x + +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac + +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi + fi + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi + fi +} + +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" + done + printf %x\\n $h +} + +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 +} + +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} + +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" +fi + +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac + +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" +fi + +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" +fi + +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 + fi +fi + +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" +fi +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +clean || : +exec_maven "$@" diff --git a/ruoyi-modules/dimp-wy-web/mvnw.cmd b/ruoyi-modules/dimp-wy-web/mvnw.cmd new file mode 100644 index 00000000..249bdf38 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/mvnw.cmd @@ -0,0 +1,149 @@ +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.2 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' +$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" +if ($env:MAVEN_USER_HOME) { + $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" +} +$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/ruoyi-modules/dimp-wy-web/pom.xml b/ruoyi-modules/dimp-wy-web/pom.xml new file mode 100644 index 00000000..12c657dc --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/pom.xml @@ -0,0 +1,214 @@ + + + 4.0.0 + + by.dimp + dimp-wy + 1.0 + + + dimp-wy-web + 1.0 + dimp-modules-web + dimp-modules-web + + + 21 + + + + + com.github.javen205 + IJPay-WxPay + 2.9.6 + + + + + + com.alibaba + easyexcel + 2.1.6 + + + + org.projectlombok + lombok + 1.18.10 + + + + junit + junit + 4.12 + + + + + joda-time + joda-time + 2.10.2 + + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + org.apache.dubbo + dubbo-spring-boot-starter + + + + org.apache.dubbo + dubbo-nacos-spring-boot-starter + + + + io.lettuce + lettuce-core + + + + org.springframework.boot + spring-boot-starter-data-redis + + + + org.mapstruct + mapstruct + + + + com.mysql + mysql-connector-j + + + + com.baomidou + mybatis-plus-spring-boot3-starter + + + + + com.baomidou + mybatis-plus-jsqlparser + + + + com.alibaba + druid-spring-boot-3-starter + + + + by.dimp + dimp-api-file + + + + by.dimp + dimp-common-core + + + + cn.dev33 + sa-token-spring-boot3-starter + + + + cn.dev33 + sa-token-redis-template + + + + + cn.dev33 + sa-token-fastjson2 + + + + org.springframework.boot + spring-boot-starter-validation + + + + + cn.hutool + hutool-all + 5.8.37 + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot.version} + + + + repackage + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + ${java.version} + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + org.projectlombok + lombok + ${lombok.version} + + + org.projectlombok + lombok-mapstruct-binding + 0.2.0 + + + + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/DimpModulesWebApplication.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/DimpModulesWebApplication.java new file mode 100644 index 00000000..d7aaf3fa --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/DimpModulesWebApplication.java @@ -0,0 +1,19 @@ +package by.dimp.web; + +import org.apache.dubbo.config.spring.context.annotation.EnableDubbo; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; + +@SpringBootApplication +@EnableDubbo +@EnableDiscoveryClient +@EnableCaching +public class DimpModulesWebApplication { + + public static void main(String[] args) { + SpringApplication.run(DimpModulesWebApplication.class, args); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/CorsConfig.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/CorsConfig.java new file mode 100644 index 00000000..e1f1c954 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/CorsConfig.java @@ -0,0 +1,26 @@ +package by.dimp.web.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class CorsConfig { + + @Bean + public WebMvcConfigurer corsConfigurer() { + return new WebMvcConfigurer() { + @Override + public void addCorsMappings(CorsRegistry registry) { + registry.addMapping("/**") // 所有路径 + .allowedOrigins("*") // 允许所有源 + .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") // 允许的方法 + .allowedHeaders("*") // 允许所有头 + .allowCredentials(false) // 是否允许凭证 + .maxAge(3600); // 预检请求缓存时间 + } + }; + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/GlobalExceptionHandler.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/GlobalExceptionHandler.java new file mode 100644 index 00000000..187cbcb5 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/GlobalExceptionHandler.java @@ -0,0 +1,61 @@ +package by.dimp.web.config; + +import by.dimp.common.core.domain.ErrorType; +import by.dimp.common.core.domain.Result; +import by.dimp.common.core.exception.BizException; +import by.dimp.common.core.exception.ObjectExistException; +import by.dimp.common.core.exception.UserNotLoginException; +import cn.dev33.satoken.exception.NotLoginException; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; + +import java.util.List; + +@RestControllerAdvice +public class GlobalExceptionHandler { + + /** + * 未登录或者授权失效 + */ + @ExceptionHandler({UserNotLoginException.class, NotLoginException.class}) + public Result handleLoginException(Exception ex) { + return Result.fail(ErrorType.AUTH_TOKEN_NOT_EXISTS); + } + + /** + * 对象已存在异常 + */ + @ExceptionHandler(ObjectExistException.class) + public Result handleException(ObjectExistException ex) { + return Result.fail(ErrorType.OBJECT_EXISTS, ex.getMessage()); + } + + @ExceptionHandler(MethodArgumentNotValidException.class) + public Result> handleValidationException(MethodArgumentNotValidException ex) { + List errors = ex.getBindingResult() + .getFieldErrors() + .stream() + .map(error -> error.getField() + ": " + error.getDefaultMessage()) + .toList(); + + return Result.fail(ErrorType.PARAM_NOT_VALID, errors); + } + + /** + * 系统业务异常 + */ + @ExceptionHandler(BizException.class) + public Result handleException(BizException ex) { + return Result.fail(ErrorType.SYSTEM_ERROR, ex.getMessage()); + } + + /** + * 最后兜底的异常 + */ + @ExceptionHandler(Exception.class) + public Result handleException(Exception ex) { + return Result.fail(ErrorType.SYSTEM_ERROR, ex.getMessage()); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/MyBatisPlusConfig.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/MyBatisPlusConfig.java new file mode 100644 index 00000000..1352619a --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/MyBatisPlusConfig.java @@ -0,0 +1,40 @@ +package by.dimp.web.config; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; +import org.apache.ibatis.reflection.MetaObject; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.time.LocalDateTime; + +@Configuration +@MapperScan("by.dimp.web.mapper") +public class MyBatisPlusConfig implements MetaObjectHandler { + + @Override + public void insertFill(MetaObject metaObject) { + this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now()); + } + + @Override + public void updateFill(MetaObject metaObject) { + this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now()); + } + + /** + * 添加分页插件 + */ + @Bean + public MybatisPlusInterceptor mybatisPlusInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + // 如果配置多个插件, 切记分页最后添加 + interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); + // 如果有多数据源可以不配具体类型, 否则都建议配上具体的 DbType + return interceptor; + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/RestTemplateConfig.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/RestTemplateConfig.java new file mode 100644 index 00000000..140bf726 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/RestTemplateConfig.java @@ -0,0 +1,14 @@ +package by.dimp.web.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.client.RestTemplate; + +@Configuration +public class RestTemplateConfig { + + @Bean + public RestTemplate restTemplate() { + return new RestTemplate(); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/SaTokenConfigure.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/SaTokenConfigure.java new file mode 100644 index 00000000..327fe1ff --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/SaTokenConfigure.java @@ -0,0 +1,19 @@ +package by.dimp.web.config; + +import cn.dev33.satoken.interceptor.SaInterceptor; +import cn.dev33.satoken.stp.StpUtil; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class SaTokenConfigure implements WebMvcConfigurer { + + @Override + public void addInterceptors(InterceptorRegistry registry) { + // 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。 + registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin())) + .addPathPatterns("/**"); +// .excludePathPatterns("/user/doLogin"); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/ThreadPoolConfig.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/ThreadPoolConfig.java new file mode 100644 index 00000000..08a61f5f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/config/ThreadPoolConfig.java @@ -0,0 +1,35 @@ +package by.dimp.web.config; + +import org.springframework.boot.web.embedded.tomcat.TomcatProtocolHandlerCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.task.AsyncTaskExecutor; +import org.springframework.core.task.support.TaskExecutorAdapter; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ThreadFactory; +import static java.util.concurrent.Executors.newThreadPerTaskExecutor; + +@Configuration +public class ThreadPoolConfig { + + /** + * 使用@Async的时候可以用虚拟现成执行 + */ + @Bean + public AsyncTaskExecutor asyncTaskExecutor(){ + ThreadFactory factory = Thread.ofVirtual().name("async-", 1).factory(); + ExecutorService executorService = newThreadPerTaskExecutor(factory); + return new TaskExecutorAdapter(executorService); + } + + /** + * tomcat处理请求的时候用虚拟线程处理 + */ + @Bean + public TomcatProtocolHandlerCustomizer protocolHandlerVirtualThreadExecutorCustomizer() { + ThreadFactory factory = Thread.ofVirtual().name("http-", 1).factory(); + ExecutorService executorService = newThreadPerTaskExecutor(factory); + return protocolHandler -> protocolHandler.setExecutor(executorService); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/AreaController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/AreaController.java new file mode 100644 index 00000000..d53c0bff --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/AreaController.java @@ -0,0 +1,128 @@ +package by.dimp.web.controller.E8.base; + +import by.dimp.common.core.domain.ErrorType; +import by.dimp.common.core.domain.Result; +import by.dimp.web.model.entity.E8.AreaInfo; +import by.dimp.web.service.E8Service.base.AreaService; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author zcxlsm + * @title: AreaController + * @date 2025/5/9 17:42 + */ +@Slf4j +@RestController +@RequestMapping("/e8/areaService") +public class AreaController { + + @Resource + private AreaService areaService; + + // 所有接口入参暂定QueryDto 后续根据业务调整 + + /** + * 查询区域信息 + * + * @param dto 传参 + * @return + */ + @PostMapping("/getAreaInfo") + public Result getAreaInfo(QueryDto dto) { + log.info("E8接口 查询区域信息 入参={}", dto.getQueryDto()); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + AreaInfo areaInfo = areaService.getAreaInfo(dto); + + if (areaInfo == null) { + return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } else { + return Result.success(areaInfo); + } + } + + /** + * 获取区域列表 + * + * @param dto 传参 + * @return + */ + @PostMapping("/getAreaList") + public Result getAreaList(QueryDto dto) { + log.info("E8接口 获取区域列表 入参={}", dto.getQueryDto()); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + IPage page = areaService.getAreaList(dto); + + if (page == null) { + return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } else { + return Result.success(page); + } + } + + /** + * 新增区域 + * + * @param dto 传参 + * @return + */ + @PostMapping("/addArea") + public Result addArea(QueryDto dto) { + log.info("E8接口 新增区域 入参={}", dto.getQueryDto()); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = areaService.addArea(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 修改区域 + * + * @param dto 传参 + * @return + */ + @PostMapping("/updateArea") + public Result updateArea(QueryDto dto) { + log.info("E8接口 修改区域 入参={}", dto.getQueryDto()); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = areaService.updateArea(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 删除区域 + * + * @param dto 传参 + * @return + */ + @PostMapping("/deleteArea") + public Result deleteArea(QueryDto dto) { + log.info("E8接口 删除区域 入参={}", dto.getQueryDto()); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = areaService.deleteArea(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/AuthGroupController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/AuthGroupController.java new file mode 100644 index 00000000..73520037 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/AuthGroupController.java @@ -0,0 +1,111 @@ +package by.dimp.web.controller.E8.base; + +import by.dimp.common.core.domain.ErrorType; +import by.dimp.common.core.domain.Result; +import by.dimp.web.model.entity.E8.AuthGroupInfo; +import by.dimp.web.service.E8Service.base.AuthGroupService; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author zcxlsm + * @title: AuthGroupController + * @date 2025/5/10 17:04 + */ +@Slf4j +@RestController +@RequestMapping("/e8/authGroupService") +public class AuthGroupController { + + @Resource + private AuthGroupService authGroupService; + + // 所有接口入参暂定QueryDto 后续根据业务调整 + + /** + * 权限组分页查询 + * + * @param dto + * @return ApiResp + * @implNote 通过接口查询权限组列表信息,支持按权限组名称查询门禁权限和梯控权限 + */ + @PostMapping("/getPageList") + public Result getPageList(QueryDto dto) { + log.info("E8接口 权限组分页查询 入参={}", dto); + if (ObjectUtils.isEmpty(dto)){ + return Result.fail(ErrorType.PARAMM_NULL); + } + + IPage pageInfo = authGroupService.getPageList(dto); + + if (pageInfo == null){ + return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + }else { + return Result.success(pageInfo); + } + } + + /** + * 添加权限组 + * + * @param dto + * @return ApiResp + * @implNote 通过接口新增权限组(门+电梯权限),仅支持单个新增 + */ + @PostMapping("/addAuthGroup") + public Result addAuthGroup(QueryDto dto) { + log.info("E8接口 添加权限组 入参={}", dto); + if (ObjectUtils.isEmpty(dto)){ + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = authGroupService.addAuthGroup(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 修改权限组 + * + * @param dto + * @return ApiResp + * @implNote 通过接口修改权限组的门/电梯权限 + */ + @PostMapping("/updateAuthGroup") + public Result updateAuthGroup(QueryDto dto) { + log.info("E8接口 修改权限组 入参={}", dto); + if (ObjectUtils.isEmpty(dto)){ + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = authGroupService.updateAuthGroup(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 根据主键ID删除权限组 + * + * @param dto + * @return ApiResp + * @implNote 通过接口删除权限组信息 + */ + @PostMapping("/deleteAuthGroup") + public Result deleteAuthGroup(QueryDto dto) { + log.info("E8接口 根据主键ID删除权限组 入参={}", dto); + if (ObjectUtils.isEmpty(dto)){ + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = authGroupService.deleteAuthGroup(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/CustomerController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/CustomerController.java new file mode 100644 index 00000000..2413bf21 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/CustomerController.java @@ -0,0 +1,130 @@ +package by.dimp.web.controller.E8.base; + +import by.dimp.common.core.domain.ErrorType; +import by.dimp.common.core.domain.Result; +import by.dimp.web.model.entity.E8.CustomerInfo; +import by.dimp.web.service.E8Service.base.CustomerService; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * @author zcxlsm + * @title: CustomerController + * @date 2025/5/9 15:49 + */ +@Slf4j +@RestController +@RequestMapping("/e8/customerService") +public class CustomerController { + + @Resource + private CustomerService customerService; + + // 所有接口入参暂定QueryDto 后续根据业务调整 + + /** + * 查询单个人员信息 + * + * @param dto 传参 + * @return ApiResp + */ + @PostMapping("/selectCustomer") + public Result selectCustomer(@RequestBody QueryDto dto) { + log.info("E8接口,查询单个人员信息,入参={}", dto.getQueryDto()); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + CustomerInfo customerInfo = customerService.selectCustomer(dto); + + if (customerInfo == null) { + return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } else { + return Result.success(customerInfo); + } + } + + /** + * 人员信息分页查询 + * + * @param dto 传参 + * @return ApiResp + */ + @PostMapping("/selectCustomerList") + public Result> selectCustomerList(@RequestBody QueryDto dto) { + log.info("E8接口,人员信息分页查询,入参={}", dto.getQueryDto()); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + IPage page = customerService.selectCustomerList(dto); + + if (page == null) { + return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } else { + return Result.success(page); + } + } + + /** + * 新增人员信息 + * + * @param dto 传参 + * @return ApiResp + */ + @PostMapping("/addCustomer") + public Result addCustomer(@RequestBody QueryDto dto) { + log.info("E8接口,新增人员信息,入参={}", dto.getQueryDto()); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = customerService.addCustomer(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 人员信息修改 + * + * @param dto 传参 + * @return ApiResp + */ + @PostMapping("/updateCustomer") + public Result updateCustomer(@RequestBody QueryDto dto) { + log.info("E8接口,人员信息修改,入参={}", dto.getQueryDto()); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = customerService.updateCustomer(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 删除人员信息 + * + * @param dto 传参 + * @return ApiResp + */ + @PostMapping("/deleteCustomer") + public Result deleteCustomer(@RequestBody QueryDto dto) { + log.info("E8接口,删除人员信息,入参={}", dto.getQueryDto()); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = customerService.deleteCustomer(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/DoorDeviceController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/DoorDeviceController.java new file mode 100644 index 00000000..be8efd81 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/DoorDeviceController.java @@ -0,0 +1,132 @@ +package by.dimp.web.controller.E8.base; + +import by.dimp.common.core.domain.ErrorType; +import by.dimp.common.core.domain.Result; +import by.dimp.web.model.entity.E8.DoorDeviceInfo; +import by.dimp.web.service.E8Service.base.DoorDeviceService; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author zcxlsm + * @title: DoorDeviceController + * @date 2025/5/10 17:13 + */ +@Slf4j +@RestController +@RequestMapping("/e8/doorDeviceService") +public class DoorDeviceController { + + @Resource + private DoorDeviceService doorDeviceService; + + // 所有接口入参暂定QueryDto 后续根据业务调整 + + /** + * 查询门禁信息 + * + * @param dto 入参 + * @return Result + */ + @PostMapping("/selectDoorDevice") + public Result selectDoorDevice(@RequestBody QueryDto dto) { + log.info("E8接口 查询门禁信息 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + DoorDeviceInfo doorDeviceInfo = doorDeviceService.selectDoorDevice(dto); + + if (doorDeviceInfo == null) { + return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } else { + return Result.success(doorDeviceInfo); + } + } + + + /** + * 门禁信息分页查询 + * + * @param dto 入参 + * @return Result + */ + @PostMapping("/selectDoorDeviceList") + public Result selectDoorDeviceList(@RequestBody QueryDto dto) { + log.info("E8接口 门禁信息分页查询 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + IPage doorDeviceInfoIPage = doorDeviceService.selectDoorDeviceList(dto); + + if (doorDeviceInfoIPage == null) { + return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } else { + return Result.success(doorDeviceInfoIPage); + } + } + + /** + * 新增门禁信息 + * + * @param dto 入参 + * @return Boolean + */ + @PostMapping("/addDoorDevice") + public Result addDoorDevice(@RequestBody QueryDto dto) { + log.info("E8接口 新增门禁信息 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = doorDeviceService.addDoorDevice(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 门禁信息修改 + * + * @param dto 入参 + * @return Boolean + */ + @PostMapping("/updateDoorDevice") + public Result updateDoorDevice(@RequestBody QueryDto dto) { + log.info("E8接口 门禁信息修改 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = doorDeviceService.updateDoorDevice(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 删除门禁信息 + * + * @param dto 入参 + * @return Boolean + */ + @PostMapping("/deleteDoorDevice") + public Result deleteDoorDevice(@RequestBody QueryDto dto) { + log.info("E8接口 删除门禁信息 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = doorDeviceService.deleteDoorDevice(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/LiftController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/LiftController.java new file mode 100644 index 00000000..3fd68acd --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/base/LiftController.java @@ -0,0 +1,126 @@ +package by.dimp.web.controller.E8.base; + +import by.dimp.common.core.domain.ErrorType; +import by.dimp.common.core.domain.Result; +import by.dimp.web.model.entity.E8.LiftInfo; +import by.dimp.web.service.E8Service.base.LiftService; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author zcxlsm + * @title: LiftController + * @date 2025/5/10 17:56 + */ +@Slf4j +@RestController +@RequestMapping("/e8/liftService") +public class LiftController { + + @Resource + private LiftService liftService; + + // 所有接口入参暂定QueryDto 后续根据业务调整 + + /** + * 电梯信息分页查询 + * + * @param dto + * @return + */ + @PostMapping("/getPageList") + public Result getPageList(QueryDto dto) { + log.info("E8接口 电梯信息分页查询 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + IPage page = liftService.getPageList(dto); + if (page == null) { + return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } else { + return Result.success(page); + } + } + + /** + * 查询电梯楼层 + * + * @param dto + * @return + */ + @PostMapping("/getLiftFloor") + public Result getLiftFloor(QueryDto dto) { + log.info("E8接口 查询电梯楼层 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + LiftInfo liftInfo = liftService.getLiftFloor(dto); + if (liftInfo == null) { + return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } else { + return Result.success(liftInfo); + } + } + + /** + * 添加电梯 + * + * @param dto + * @return + */ + @PostMapping("/addLift") + public Result addLift(QueryDto dto) { + log.info("E8接口 添加电梯 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = liftService.addLift(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 修改电梯信息 + * + * @param dto + * @return + */ + @PostMapping("/updateLift") + public Result updateLift(QueryDto dto) { + log.info("E8接口 修改电梯信息 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = liftService.updateLift(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 删除电梯信息 + * + * @param dto + * @return + */ + @PostMapping("/deleteLift") + public Result deleteLift(QueryDto dto) { + log.info("E8接口 删除电梯信息 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = liftService.deleteLift(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/service/EntranceGuardController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/service/EntranceGuardController.java new file mode 100644 index 00000000..ad8a5e02 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/E8/service/EntranceGuardController.java @@ -0,0 +1,88 @@ +package by.dimp.web.controller.E8.service; + +import by.dimp.common.core.domain.ErrorType; +import by.dimp.common.core.domain.Result; +import by.dimp.web.model.entity.E8.AccessRecordInfo; +import by.dimp.web.model.domain.E8.general.QueryDto; +import by.dimp.web.service.E8Service.service.EntranceGuardService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +/** + * @author zcxlsm + * @title: EntranceGuardController + * @date 2025/5/11 20:35 + */ +@Slf4j +@Resource +@RequestMapping("/e8/entranceGuard") +public class EntranceGuardController { + + @Resource + private EntranceGuardService entranceGuardService; + + // 所有接口入参暂定QueryDto 后续根据业务调整 + + /** + * 远程开门 + * + * @param dto + * @return + */ + @PostMapping("/remoteOpenDoor") + public Result remoteOpenDoor(QueryDto dto) { + log.info("E8接口 远程开门 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = entranceGuardService.remoteOpenDoor(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + + /** + * 获取通行记录分页列表 + * + * @param dto + * @return + */ + @PostMapping("/getPageAccessRecordList") + public Result getPageAccessRecordList(QueryDto dto) { + log.info("E8接口 获取通行记录分页列表 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + IPage page = entranceGuardService.getPageAccessRecordList(dto); + + if (page == null) { + return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } else { + return Result.success(page); + } + } + + /** + * 人员授权 + * + * @param dto + * @return + */ + @PostMapping("/addAccessControl") + public Result addAccessControl(QueryDto dto) { + log.info("E8接口 人员授权 入参={}", dto); + if (ObjectUtils.isEmpty(dto)) { + return Result.fail(ErrorType.PARAMM_NULL); + } + + Boolean flag = entranceGuardService.addAccessControl(dto); + + return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbAttendanceStatisticsController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbAttendanceStatisticsController.java new file mode 100644 index 00000000..08be7b03 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbAttendanceStatisticsController.java @@ -0,0 +1,42 @@ +package by.dimp.web.controller.admin; + +import by.dimp.common.core.domain.Result; +import by.dimp.web.model.domain.attendanceStatistics.req.AttendanceStatisticsQueryReq; +import by.dimp.web.model.domain.attendanceStatistics.res.AttendanceStatisticsRes; +import by.dimp.web.service.admin.ITbAttendanceStatisticsService; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/report") +@Slf4j +public class TbAttendanceStatisticsController { + + + @Resource + private ITbAttendanceStatisticsService attendanceStatisticsService; + + /** + * 分页查询考勤统计数据 + */ + + @GetMapping("/pageQuery") + public Result list(@RequestBody AttendanceStatisticsQueryReq query) { + log.info("分页查询考勤统计数据,入参:{}", query); + AttendanceStatisticsRes res = attendanceStatisticsService.pageQuery(query); + return Result.success(res); + } + + /** + * 数据分析与统计报表的导出功能 + */ + @GetMapping("/export") + public Result export() { + int result = attendanceStatisticsService.export(); + return Result.success(result > 0); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbCeremonialServeController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbCeremonialServeController.java new file mode 100644 index 00000000..13c0b55f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbCeremonialServeController.java @@ -0,0 +1,79 @@ +package by.dimp.web.controller.admin; + +import by.dimp.common.core.base.BaseController; +import by.dimp.common.core.domain.Result; +import by.dimp.common.core.domain.UserInfo; +import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServePageQueryReq; +import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServeReq; +import by.dimp.web.model.domain.ceremonialServe.res.CeremonialServeRes; +import by.dimp.web.service.admin.ITbCeremonialServeService; +import com.alibaba.fastjson2.JSONObject; +import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDateTime; + +/** + * 会议礼仪服务预订 + */ +@RestController +@RequestMapping("/ceremonialService") +@Slf4j +public class TbCeremonialServeController extends BaseController { + + @Resource + private ITbCeremonialServeService ceremonialService; + + /** + * 分页查询礼仪服务的预订信息 + * @param pageQueryReq + * @return + */ + @GetMapping("/pageQuery") + public Result> getInformation(CeremonialServePageQueryReq pageQueryReq) { + log.info("查询礼仪服务基本信息,传入的查询条件为:{}", JSONObject.toJSONString(pageQueryReq)); + IPage page = ceremonialService.pageQuery(pageQueryReq); + return Result.success(page); + } + + /** + * 新增礼仪服务的预订 + * @param ceremonialServeReq + * @return + */ + @PostMapping("/addCeremonialServe") + public Result addCeremonialServe(@RequestBody CeremonialServeReq ceremonialServeReq) { + log.debug("新增礼仪服务的预订,入参{}", JSONObject.toJSONString(ceremonialService)); + UserInfo userInfo = getUserInfo(); + ceremonialServeReq.setCreateById(userInfo.getId()); + ceremonialServeReq.setCreateBy(userInfo.getUserName()); + ceremonialServeReq.setCreateTime(LocalDateTime.now()); + int result = ceremonialService.addCeremonialServe(ceremonialServeReq); + return Result.success(result > 0); + } + + /** + * 根据id删除礼仪服务的预订 + * @param id + * @return + */ + @DeleteMapping("/deleteCeremonialServe/{id}") + public Result deleteCeremonialServe(@PathVariable Integer id) { + log.debug("删除礼仪服务的预订,入参{}", id); + int result = ceremonialService.deleteCeremonialServe(id); + return Result.success(result > 0); + } + + /** + * 服务确定 + */ + @PostMapping("/confirm") + public Result confirm(@RequestBody CeremonialServeReq ceremonialServeReq){ + log.debug("服务确定,入参{}",ceremonialServeReq); + int result = ceremonialService.confirm(ceremonialServeReq); + return Result.success(result > 0); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbCleaningIndicatorsController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbCleaningIndicatorsController.java new file mode 100644 index 00000000..469a1833 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbCleaningIndicatorsController.java @@ -0,0 +1,104 @@ +package by.dimp.web.controller.admin; + +import by.dimp.common.core.base.BaseController; +import by.dimp.common.core.domain.Result; +import by.dimp.common.core.domain.UserInfo; +import by.dimp.web.model.domain.cleaningIndicators.req.SaveAndModifyCleaningIndicators; +import by.dimp.web.model.domain.cleaningIndicators.req.QueryCleaningIndicatorsReq; +import by.dimp.web.model.domain.cleaningIndicators.resp.TbCleaningIndicatorsResp; +import by.dimp.web.service.admin.ITbCleaningIndicatorsService; +import com.alibaba.fastjson2.JSONObject; +import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +/** + *

+ * 前端控制器 + *

+ * + * @author lxj + * @since 2025-04-28 + */ +@RestController +@RequestMapping("/tbCleaningIndicators") +@Slf4j +public class TbCleaningIndicatorsController extends BaseController { + @Resource + private ITbCleaningIndicatorsService iTbCleaningIndicatorsService; + + /** + * 新增保洁质量 + * + * @param req 新增保洁质量对象 + * @return 添加成功返回true + */ + @PostMapping("/addCleaningIndicators") + public Result addCleaningIndicators(@RequestBody SaveAndModifyCleaningIndicators req) { + log.info("新增保洁标准,入参={}", JSONObject.toJSONString(req)); + UserInfo userInfo = getUserInfo(); + req.setCreateEmpId(userInfo.getId() + ""); + req.setCreateEmpName(userInfo.getUserName()); + Boolean result = iTbCleaningIndicatorsService.addCleaningIndicators(req); + return Result.success(result); + } + + /** + * 修改保洁质量信息 + * + * @param req 保洁质量参数 + * @return 更新成功返回true + */ + @PostMapping("/modifyCleaningIndicators") + public Result modifyCleaningIndicators(@RequestBody SaveAndModifyCleaningIndicators req) { + log.info("修改保洁标准,入参={}", JSONObject.toJSONString(req)); + UserInfo userInfo = getUserInfo(); + req.setModifyEmpId(userInfo.getId() + ""); + req.setModifyEmpName(userInfo.getUserName()); + Boolean result = iTbCleaningIndicatorsService.modifyCleaningIndicators(req); + return Result.success(result); + } + + /** + * 删除保洁质量 + * + * @param req 保洁质量参数 + * @return 删除成功返回true + */ + @PostMapping("/deleteCleaningIndicators") + public Result deleteCleaningIndicators(@RequestBody SaveAndModifyCleaningIndicators req) { + log.info("删除保洁标准,入参={}", JSONObject.toJSONString(req)); + UserInfo userInfo = getUserInfo(); + req.setModifyEmpId(userInfo.getId() + ""); + req.setModifyEmpName(userInfo.getUserName()); + Boolean result = iTbCleaningIndicatorsService.deleteCleaningIndicators(req.getId()); + return Result.success(result); + } + + /** + * 分页查询保洁质量 + * + * @param req 查询参数 + * @return 返回保洁质量列表 + */ + @PostMapping("/queryCleaningIndicators") + public Result> queryCleaningIndicators(@RequestBody QueryCleaningIndicatorsReq req) { + log.info("查询用户,入参={}", JSONObject.toJSONString(req)); + IPage result = iTbCleaningIndicatorsService.queryCleaningIndicatorsOpForPage(req); + return Result.success(result); + } + + /** + * 根据id查询保洁质量 + * + * @param req 保洁质量请求参数 + * @return 返回保洁质量信息 + */ + @PostMapping("/queryCleaningIndicatorsById") + public Result queryCleaningQIndicatorsById(@RequestBody QueryCleaningIndicatorsReq req) { + log.info("根据id查询保洁标准,入参={}", req); + TbCleaningIndicatorsResp result = iTbCleaningIndicatorsService.queryCleaningIndicatorsById(req.getId()); + return Result.success(result); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbConferenceController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbConferenceController.java new file mode 100644 index 00000000..f17a550f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbConferenceController.java @@ -0,0 +1,103 @@ +package by.dimp.web.controller.admin; + +import by.dimp.common.core.base.BaseController; +import by.dimp.common.core.domain.Result; +import by.dimp.common.core.domain.UserInfo; +import by.dimp.web.model.entity.TbConference; +import by.dimp.web.model.domain.conference.req.ConferencePageQueryReq; +import by.dimp.web.model.domain.conference.req.ConferenceReq; +import by.dimp.web.model.domain.conference.resp.ConferenceRes; +import by.dimp.web.service.admin.ITbConferenceService; +import com.alibaba.fastjson2.JSONObject; +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDateTime; + +@RestController +@RequestMapping("/conference/basicInformation") +@Slf4j + +/** + * 会议室基本信息 + */ +public class TbConferenceController extends BaseController { + @Autowired + private ITbConferenceService conferenceService; + + /** + * 分页查询会议室基本信息 + * + * @param queryDTO + * @return + */ + @GetMapping("/pageQuery") + public Result> getInformation(ConferencePageQueryReq queryDTO) { + log.info("查询会议室基本信息,传入的查询条件为:{}", JSONObject.toJSONString(queryDTO)); + IPage page = conferenceService.pageQuery(queryDTO); + return Result.success(page); + } + + + /** + * 新增会议室基本信息 + * + * @param conferenceReq + * @return + */ + @PostMapping("/addConference") + public Result addInformation(@RequestBody ConferenceReq conferenceReq) { + log.debug("新增会议室基本信息,传入的会议室信息为:{}", JSONObject.toJSONString(conferenceReq)); + UserInfo userInfo = getUserInfo(); + conferenceReq.setCreateBy(userInfo.getUserName()); + conferenceReq.setCreateById(userInfo.getId()); + int result = conferenceService.addInformation(conferenceReq); + return Result.success(result > 0); + } + + /** + * 根据ID回显会议室基本信息 + * + * @param id + * @return + */ + @GetMapping("/getById/{id}") + public Result getInformation(@PathVariable(value = "id") Integer id) { + log.debug("根据ID回显数据,传入的ID为:{}", JSONObject.toJSONString(id)); + TbConference conference = conferenceService.getInformation(id); + return Result.success(conference); + } + + /** + * 根据ID修改会议室基本信息 + * + * @param conferenceReq + * @return + */ + @PutMapping("/updateById") + public Result updateInformation(@RequestBody ConferenceReq conferenceReq) { + UserInfo userInfo = getUserInfo(); + conferenceReq.setUpdateById(userInfo.getId()); + conferenceReq.setUpdateBy(userInfo.getUserName()); + conferenceReq.setUpdateTime(LocalDateTime.now()); + log.debug("修改会议室基本信息,传入的会议室信息为:{}", JSONObject.toJSONString(conferenceReq)); + int result = conferenceService.updateInformation(conferenceReq); + return Result.success(result > 0); + } + + /** + * 删除会议室基本信息 + * + * @param id + * @return + */ + @DeleteMapping("/deleteById/{id}") + public Result deleteInformation(@PathVariable(value = "id") Integer id) { + log.debug("删除会议室的基本信息,传入的ID为:{}", JSONObject.toJSONString(id)); + Boolean result = conferenceService.deleteInformation(id); + //todo 接口不能正确的响应,需要修改 + return Result.success(result); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbPersonnelAccessController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbPersonnelAccessController.java new file mode 100644 index 00000000..aae6152d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbPersonnelAccessController.java @@ -0,0 +1,8 @@ +package by.dimp.web.controller.admin; + +/** + * 参会人员出入管理 + * + */ +public class TbPersonnelAccessController { +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbReportController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbReportController.java new file mode 100644 index 00000000..0a32ea47 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbReportController.java @@ -0,0 +1,21 @@ +package by.dimp.web.controller.admin; + +import by.dimp.common.core.domain.Result; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/report") +@Slf4j +public class TbReportController { + + /** + * 数据分析与统计报表的读取接口 + */ + @GetMapping("/read") + public Result read() { + return null; + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbRoomBookingController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbRoomBookingController.java new file mode 100644 index 00000000..51b4b33a --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbRoomBookingController.java @@ -0,0 +1,137 @@ +package by.dimp.web.controller.admin; + +import by.dimp.common.core.domain.Result; +import by.dimp.common.core.domain.UserInfo; +import by.dimp.web.model.domain.roomBooking.req.RoomBookingPageQueryReq; +import by.dimp.web.model.domain.roomBooking.req.RoomBookingReq; +import by.dimp.web.model.domain.roomBooking.resp.RoomBookingRes; +import by.dimp.web.service.admin.ITbRoomBookingService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import by.dimp.common.core.base.BaseController; + +import java.time.LocalDateTime; + +@RestController +@RequestMapping("/roomBooking") +@Slf4j +/** + * 会议室预订 + */ +public class TbRoomBookingController extends BaseController{ + @Autowired + private ITbRoomBookingService roomBookingService; + + /** + * 未审核状态为0 + */ + private static final Integer NOTREVIEWD = 0; + + + /** + * 分页查询预订记录 + * + * @param pageQueryReq + * @return + */ + @GetMapping("/queryForPage") + public Result> queryForPage(RoomBookingPageQueryReq pageQueryReq) { + log.info("查询会议室预订记录,入参:{}", pageQueryReq); + IPage page = roomBookingService.queryForPage(pageQueryReq); + return Result.success(page); + } + + /** + * 新增预订记录 + * + * @param roomBookingReq + * @return + */ + @PostMapping("/addCeremonial") + public Result addCeremonial(@RequestBody RoomBookingReq roomBookingReq) { + log.info("新增会议室预订记录,入参:{}", roomBookingReq); + UserInfo userInfo = getUserInfo(); + //会议室创建人id + roomBookingReq.setCreateById(userInfo.getId()); + roomBookingReq.setCreateBy(userInfo.getUserName()); + roomBookingReq.setCreateTime(LocalDateTime.now()); + //默认审核状态为未审核0 + roomBookingReq.setReviewStatus(NOTREVIEWD); + + + + int result = roomBookingService.addCeremonial(roomBookingReq); + return Result.success(result > 0); + } + + /** + * 审核会议室预订 + */ + @PostMapping("/reviewCeremonial") + public Result reviewCeremonial(@RequestBody RoomBookingReq roomBookingReq) { + log.info("审核会议室预订记录,入参:{}", roomBookingReq); + UserInfo userInfo = getUserInfo(); + //审核人id + roomBookingReq.setApprover(userInfo.getUserName()); + roomBookingReq.setApproverTime(LocalDateTime.now()); + roomBookingReq.setCreateById(userInfo.getId()); + roomBookingReq.setCreateBy(userInfo.getUserName()); + roomBookingReq.setCreateTime(LocalDateTime.now()); + int result = roomBookingService.reviewCeremonial(roomBookingReq); + return Result.success(result > 0); + } + + /** + * 根据id查询会议室预订记录详情 + * + * @param id + * @return + */ + @GetMapping("/queryById/{id}") + public Result queryById(@PathVariable Integer id) { + log.info("查询会议室预订记录详情,入参:{}", id); + RoomBookingRes roomBookingRes = roomBookingService.queryById(id); + return Result.success(roomBookingRes); + } + + /** + * 删除会议室预订记录 + * + * @param id + * @return + */ + @PostMapping("/deleteCeremonial/{id}") + public Result deleteCeremonial(@PathVariable Integer id) { + log.info("删除会议室预订记录,入参:{}", id); + Boolean result = roomBookingService.deleteById(id); + return Result.success(result); + } + + /** + * 修改会议室预订记录 + */ + @PutMapping("/updateCeremonialById") + public Result updateCeremonialById(@RequestBody RoomBookingReq roomBookingReq) { + log.info("修改会议室预订记录,入参:{}", roomBookingReq); + UserInfo userInfo = getUserInfo(); + roomBookingReq.setUpdateById(userInfo.getId()); + roomBookingReq.setUpdateBy(userInfo.getUserName()); + roomBookingReq.setUpdateTime(LocalDateTime.now()); + int result = roomBookingService.updateCeremonialById(roomBookingReq); + return Result.success(result > 0); + } + + + /** + * 新增会议预定结束后的评价 + */ + @PostMapping("/addComment") + public Result addComment(@RequestBody RoomBookingReq roomBookingReq) { + log.debug("新增会议室预订后的评价{}", roomBookingReq); + int result = roomBookingService.addComment(roomBookingReq); + return Result.success(result > 0); + } +} + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbServiceClassificationController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbServiceClassificationController.java new file mode 100644 index 00000000..539419d4 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbServiceClassificationController.java @@ -0,0 +1,54 @@ +package by.dimp.web.controller.admin; + +import by.dimp.common.core.base.BaseController; +import by.dimp.common.core.domain.Result; +import by.dimp.common.core.domain.UserInfo; +import by.dimp.web.model.domain.serviceClassification.req.ServiceClassificationReq; +import by.dimp.web.model.domain.serviceClassification.req.TbServiceClassificationPageQuery; +import by.dimp.web.model.entity.TbServiceClassification; +import by.dimp.web.service.admin.ITbServiceClassificationService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDateTime; + +@RestController +@RequestMapping("/serviceClassification") +@Slf4j +/** + * 服务分类管理 + */ +public class TbServiceClassificationController extends BaseController { + @Autowired + private ITbServiceClassificationService tbServiceClassificationService; + + /** + * 分页查询所有分类 + * @param pageQuery + * @return + */ + @GetMapping("/queryForPage") + public Result> queryForPage(TbServiceClassificationPageQuery pageQuery) { + log.info("查询服务分类分页数据,入参: {}", pageQuery); + IPage page = tbServiceClassificationService.queryForPage(pageQuery); + return Result.success(page); + } + + @PostMapping("/addServiceClassification") + public Result addServiceClassification(@RequestBody ServiceClassificationReq serviceClassificationReq) { + log.info("新增服务分类,入参: {}", serviceClassificationReq); + UserInfo userInfo = getUserInfo(); + + serviceClassificationReq.setCreateById(userInfo.getId()); + serviceClassificationReq.setCreateBy(userInfo.getUserName()); + serviceClassificationReq.setCreateTime(LocalDateTime.now()); + + + int result = tbServiceClassificationService.addServiceClassification(serviceClassificationReq); + return Result.success(result > 0); + } + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbVisitorInvitationsController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbVisitorInvitationsController.java new file mode 100644 index 00000000..2647d952 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/TbVisitorInvitationsController.java @@ -0,0 +1,99 @@ +package by.dimp.web.controller.admin; + +import by.dimp.common.core.base.BaseController; +import by.dimp.common.core.domain.Result; +import by.dimp.common.core.domain.UserInfo; +import by.dimp.web.model.domain.visitorManagement.req.VisitorManagementReq; +import by.dimp.web.model.domain.visitorManagement.req.VistorManagementPageQuery; +import by.dimp.web.model.entity.TbVisitorManagement; +import by.dimp.web.service.admin.ITbVisitorInvitationsService; +import by.dimp.web.service.admin.impl.TbVisitorInvitationsServiceImpl; +import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDateTime; + +/** + * 访客邀约管理 + */ + + +@RestController +@RequestMapping("/admin/roomBooking") +@Slf4j +public class TbVisitorInvitationsController extends BaseController { + + @Resource + private ITbVisitorInvitationsService tbVisitorManagementService; + + /** + * 分页查询访客管理列表 + * @param pageQuery + * @return + * Visitor + */ + @GetMapping("/queryForInviting") + public Result> queryForPage(VistorManagementPageQuery pageQuery) { + log.info("查询访客邀约列表,入参: {}", pageQuery); + IPage page = tbVisitorManagementService.queryForPage(pageQuery); + return Result.success(page); + } + + /** + * 分页查询待审核访客列表 + * @param pageQuery + * @return + */ + @GetMapping("/queryForWaiting") + public Result> queryForWaitingPage(VistorManagementPageQuery pageQuery) { + log.info("查询访客管理列表,入参: {}", pageQuery); + IPage page = tbVisitorManagementService.queryForWaitingPage(pageQuery); + return Result.success(page); + } + + /** + * 新增邀约访客 + * @param visitorManagementReq + * @return + */ + @PostMapping("/addVisitor") + public Result addVisitor(@RequestBody VisitorManagementReq visitorManagementReq) { + log.info("新增访客,入参: {}", visitorManagementReq); + UserInfo userInfo = getUserInfo(); + visitorManagementReq.setCreateTime(LocalDateTime.now()); + visitorManagementReq.setCreateById(userInfo.getId()); + visitorManagementReq.setCreateBy(userInfo.getUserName()); + int result = tbVisitorManagementService.addVisitor(visitorManagementReq); + return Result.success(result > 0); + } + + /** + * 查看访客邀约详情 + */ + @GetMapping("/{id}") + public Result getVisitor(@PathVariable("id") Integer id) { + log.info("查看访客详情,入参: {}", id); + TbVisitorManagement visitor = tbVisitorManagementService.getVisitorById(id); + return Result.success(visitor); + } + + /** + * 审核邀约访客 + * @param visitorManagementReq + * @return + */ + @PutMapping("/auditVisitor") + public Result auditVisitor(@RequestBody VisitorManagementReq visitorManagementReq) { + log.info("审核访客,入参: {}", visitorManagementReq); + UserInfo userInfo = getUserInfo(); + visitorManagementReq.setUpdateTime(LocalDateTime.now()); + visitorManagementReq.setUpdateById(userInfo.getId()); + visitorManagementReq.setUpdateBy(userInfo.getUserName()); + int result = tbVisitorManagementService.auditVisitor(visitorManagementReq); + return Result.success(result > 0); + } + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/VideoAlarmController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/VideoAlarmController.java new file mode 100644 index 00000000..dc3b286d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/VideoAlarmController.java @@ -0,0 +1,32 @@ +package by.dimp.web.controller.admin; + + +import by.dimp.web.service.uniview.model.AlarmReportData; +import by.dimp.web.service.uniview.model.UniViewResult; +import by.dimp.web.service.uniview.service.VideoAlarmService; +import com.alibaba.fastjson2.JSONObject; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RestController; + +@Slf4j +@RestController +@RequiredArgsConstructor +public class VideoAlarmController { + + @Autowired + private VideoAlarmService videoAlarmService; + + @PostMapping("/custom/router") + public UniViewResult alarm(@RequestBody String data) { +// log.info("收到宇视告警数据:{}", data); + AlarmReportData alarmReportData = JSONObject.parseObject(data, AlarmReportData.class); + videoAlarmService.handleAlarmData(alarmReportData); + return UniViewResult.success(null); + } + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/WxPayApiContoller.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/WxPayApiContoller.java new file mode 100644 index 00000000..0d28907f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/admin/WxPayApiContoller.java @@ -0,0 +1,269 @@ +//package by.dimp.web.controller; +// +///** +// * @Author: Scoot +// * @Date: 2023/3/16 15:52 +// * @Description: 微信支付控制器 +// */ +// +//import cn.hutool.core.date.DatePattern; +//import cn.hutool.core.date.DateUtil; +//import cn.hutool.core.io.file.FileWriter; +//import cn.hutool.core.util.StrUtil; +//import cn.hutool.http.ContentType; +//import cn.hutool.http.HttpStatus; +//import cn.hutool.json.JSONArray; +//import cn.hutool.json.JSONObject; +//import cn.hutool.json.JSONUtil; +//import com.ijpay.core.IJPayHttpResponse; +//import com.ijpay.core.enums.RequestMethodEnum; +//import com.ijpay.core.kit.AesUtil; +//import com.ijpay.core.kit.HttpKit; +//import com.ijpay.core.kit.PayKit; +//import com.ijpay.core.kit.WxPayKit; +//import com.ijpay.core.utils.DateTimeZoneUtil; +//import com.ijpay.wxpay.WxPayApi; +//import com.ijpay.wxpay.enums.WxDomainEnum; +//import com.ijpay.wxpay.enums.v3.BasePayApiEnum; +//import com.ijpay.wxpay.enums.v3.OtherApiEnum; +//import com.ijpay.wxpay.model.v3.Amount; +//import com.ijpay.wxpay.model.v3.Payer; +//import com.ijpay.wxpay.model.v3.UnifiedOrderModel; +//import jakarta.servlet.http.HttpServletRequest; +//import jakarta.servlet.http.HttpServletResponse; +//import lombok.extern.slf4j.Slf4j; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.context.annotation.Scope; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RequestParam; +//import org.springframework.web.bind.annotation.ResponseBody; +//import org.springframework.web.bind.annotation.RestController; +// +//import java.io.ByteArrayInputStream; +//import java.nio.charset.StandardCharsets; +//import java.security.cert.X509Certificate; +//import java.util.HashMap; +//import java.util.Map; +// +//@Slf4j +//@RestController +//@RequestMapping("/api/wx/pay/v1") +//@Scope("prototype") +// +//public class WxPayApiContoller { +// /**微信小程序appid**/ +// @Value("${wechat.ma.appId}") +// String appid; +// +// /**微信小程序secretId**/ +// @Value("${wechat.ma.secret}") +// String secret; +// +// /**商户号**/ +// @Value("${wechat.ma.mchid}") +// String mchid; +// +// /**商户密钥**/ +// @Value("${wechat.ma.mchKey}") +// String mchKey; +// +// /**回调地址**/ +// @Value("${wechat.ma.notifyUrl}") +// String notifyUrl; +// +// /**证书地址**/ +// @Value("${wechat.ma.certPath}") +// String certPath; +// /**证书密钥地址**/ +// @Value("${wechat.ma.certKeyPath}") +// String certKeyPath; +// /**微信平台证书**/ +// @Value("${wechat.ma.platFormPath}") +// String platFormPath; +// +// /** +// * 微信支付 +// * @param openId 用户openId +// * @return +// */ +// @RequestMapping("/jsApiPay") +// @ResponseBody +// public JsonResult jsApiPay(@RequestParam(value = "openId", required = false, defaultValue = "o-_-itxuXeGW3O1cxJ7FXNmq8Wf8") String openId) { +// try { +// String timeExpire = DateTimeZoneUtil.dateToTimeZone(System.currentTimeMillis() + 1000 * 60 * 3); +// UnifiedOrderModel unifiedOrderModel = new UnifiedOrderModel() +// // APPID +// .setAppid(appid) +// // 商户号 +// .setMchid(mchid) +// .setDescription("IJPay 让支付触手可及") +// .setOut_trade_no(PayKit.generateStr()) +// .setTime_expire(timeExpire) +// .setAttach("微信系开发脚手架 https://gitee.com/javen205/TNWX") +// .setNotify_url(notifyUrl) +// .setAmount(new Amount().setTotal(1)) +// .setPayer(new Payer().setOpenid(openId)); +// +// log.info("统一下单参数 {}", JSONUtil.toJsonStr(unifiedOrderModel)); +// IJPayHttpResponse response = WxPayApi.v3( +// RequestMethodEnum.POST, +// WxDomainEnum.CHINA.toString(), +// BasePayApiEnum.JS_API_PAY.toString(), +// mchid, +// getSerialNumber(), +// null, +// certKeyPath, +// JSONUtil.toJsonStr(unifiedOrderModel) +// ); +// log.info("统一下单响应 {}", response); +// // 根据证书序列号查询对应的证书来验证签名结果 +// boolean verifySignature = WxPayKit.verifySignature(response, platFormPath); +// log.info("verifySignature: {}", verifySignature); +// if (response.getStatus() == HttpStatus.HTTP_OK && verifySignature) { +// String body = response.getBody(); +// JSONObject jsonObject = JSONUtil.parseObj(body); +// String prepayId = jsonObject.getStr("prepay_id"); +// Map map = WxPayKit.jsApiCreateSign(appid, prepayId, certKeyPath); +// log.info("唤起支付参数:{}", map); +// return JsonResult.success("获取成功",JSONUtil.toJsonStr(map)); +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } +// return JsonResult.error("唤起失败"); +// } +// +// /** +// * 微信支付回调 +// * @param request +// * @param response +// */ +// @RequestMapping(value = "/payNotify", method = {org.springframework.web.bind.annotation.RequestMethod.POST, org.springframework.web.bind.annotation.RequestMethod.GET}) +// public void payNotify(HttpServletRequest request, HttpServletResponse response) { +// Map map = new HashMap<>(12); +// try { +// String timestamp = request.getHeader("Wechatpay-Timestamp"); +// String nonce = request.getHeader("Wechatpay-Nonce"); +// String serialNo = request.getHeader("Wechatpay-Serial"); +// String signature = request.getHeader("Wechatpay-Signature"); +// +// log.info("timestamp:{} nonce:{} serialNo:{} signature:{}", timestamp, nonce, serialNo, signature); +// String result = HttpKit.readData(request); +// log.info("支付通知密文 {}", result); +// +// // 需要通过证书序列号查找对应的证书,verifyNotify 中有验证证书的序列号 +// String plainText = WxPayKit.verifyNotify(serialNo, result, signature, nonce, timestamp, +// mchKey, platFormPath); +// +// log.info("支付通知明文 {}", plainText); +// +// if (StrUtil.isNotEmpty(plainText)) { +// response.setStatus(200); +// map.put("code", "SUCCESS"); +// map.put("message", "SUCCESS"); +// } else { +// response.setStatus(500); +// map.put("code", "ERROR"); +// map.put("message", "签名错误"); +// } +// response.setHeader("Content-type", ContentType.JSON.toString()); +// response.getOutputStream().write(JSONUtil.toJsonStr(map).getBytes(StandardCharsets.UTF_8)); +// response.flushBuffer(); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// } +// private String getSerialNumber() { +// // 获取证书序列号 +// X509Certificate certificate = PayKit.getCertificate(certPath); +// if (null != certificate) { +// String serialNo = certificate.getSerialNumber().toString(16).toUpperCase(); +// // 提前两天检查证书是否有效 +// boolean isValid = PayKit.checkCertificateIsValid(certificate, mchid, -2); +// log.info("证书是否可用 {} 证书有效期为 {}", isValid, DateUtil.format(certificate.getNotAfter(), DatePattern.NORM_DATETIME_PATTERN)); +// System.out.println("serialNo:" + serialNo); +// return serialNo; +// } +// return null; +// } +// +// +// +// @RequestMapping("/get") +// @ResponseBody +// public String v3Get() { +// // 获取平台证书列表 +// try { +// IJPayHttpResponse response = WxPayApi.v3( +// RequestMethodEnum.GET, +// WxDomainEnum.CHINA.toString(), +// OtherApiEnum.GET_CERTIFICATES.toString(), +// mchid, +// getSerialNumber(), +// null, +// certKeyPath, +// "" +// ); +// String serialNumber = response.getHeader("Wechatpay-Serial"); +// String body = response.getBody(); +// int status = response.getStatus(); +// log.info("serialNumber: {}", serialNumber); +// log.info("status: {}", status); +// log.info("body: {}", body); +// int isOk = 200; +// if (status == isOk) { +// JSONObject jsonObject = JSONUtil.parseObj(body); +// JSONArray dataArray = jsonObject.getJSONArray("data"); +// // 默认认为只有一个平台证书 +// JSONObject encryptObject = dataArray.getJSONObject(0); +// JSONObject encryptCertificate = encryptObject.getJSONObject("encrypt_certificate"); +// String associatedData = encryptCertificate.getStr("associated_data"); +// String cipherText = encryptCertificate.getStr("ciphertext"); +// String nonce = encryptCertificate.getStr("nonce"); +// String serialNo = encryptObject.getStr("serial_no"); +// final String platSerialNo = savePlatformCert(associatedData, nonce, cipherText, platFormPath); +// log.info("平台证书序列号: {} serialNo: {}", platSerialNo, serialNo); +// } +// // 根据证书序列号查询对应的证书来验证签名结果 +// boolean verifySignature = WxPayKit.verifySignature(response, platFormPath); +// System.out.println("verifySignature:" + verifySignature); +// return body; +// } catch (Exception e) { +// e.printStackTrace(); +// return null; +// } +// } +// +// +// +// /** +// * 保存平台证书 +// * @param associatedData associated_data +// * @param nonce nonce +// * @param cipherText cipherText +// * @param certPath 证书保存路径 +// * @return +// */ +// private String savePlatformCert(String associatedData, String nonce, String cipherText, String certPath) { +// try { +// AesUtil aesUtil = new AesUtil(mchKey.getBytes(StandardCharsets.UTF_8)); +// // 平台证书密文解密 +// // encrypt_certificate 中的 associated_data nonce ciphertext +// String publicKey = aesUtil.decryptToString( +// associatedData.getBytes(StandardCharsets.UTF_8), +// nonce.getBytes(StandardCharsets.UTF_8), +// cipherText +// ); +// // 保存证书 +// cn.hutool.core.io.file.FileWriter writer = new FileWriter(certPath); +// writer.write(publicKey); +// // 获取平台证书序列号 +// X509Certificate certificate = PayKit.getCertificate(new ByteArrayInputStream(publicKey.getBytes())); +// return certificate.getSerialNumber().toString(16).toUpperCase(); +// } catch (Exception e) { +// e.printStackTrace(); +// return e.getMessage(); +// } +// } +// +//} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/user/TbUserVisitorInvitationsController.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/user/TbUserVisitorInvitationsController.java new file mode 100644 index 00000000..e1b1b001 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/controller/user/TbUserVisitorInvitationsController.java @@ -0,0 +1,100 @@ +package by.dimp.web.controller.user; + +import by.dimp.common.core.base.BaseController; +import by.dimp.common.core.domain.Result; +import by.dimp.common.core.domain.UserInfo; +import by.dimp.web.model.domain.visitorManagement.req.VisitorManagementReq; +import by.dimp.web.model.domain.visitorManagement.req.VistorManagementPageQuery; +import by.dimp.web.model.entity.TbVisitorManagement; +import by.dimp.web.service.admin.ITbVisitorInvitationsService; +import by.dimp.web.service.user.ITbUserVisitorInvitationsService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDateTime; + +/** + * 访客邀约管理 + */ + + +//todo 访客需要租客的完善,查询我的访客时,根据公司下的用户id查询,需要根据租客的id查询,而不是用户的id,根据用户名和手机号进行匹配 +@RestController +@RequestMapping("/roomBooking") +@Slf4j +public class TbUserVisitorInvitationsController extends BaseController { + + @Resource + private ITbUserVisitorInvitationsService tbUserVisitorManagementService; + + /** + * 分页查询用户访客管理列表 + * @param pageQuery + * @return + * Visitor + */ + @GetMapping + public Result> queryForPage(VistorManagementPageQuery pageQuery) { + log.info("查询访客管理列表,入参: {}", pageQuery); + IPage page = tbUserVisitorManagementService.queryForPage(pageQuery); + return Result.success(page); + } + + /** + * 分页查询待审核访客列表 + * @param pageQuery + * @return + */ + @GetMapping + public Result> queryForWaitingPage(VistorManagementPageQuery pageQuery) { + log.info("查询访客管理列表,入参: {}", pageQuery); + IPage page = tbUserVisitorManagementService.queryForWaitingPage(pageQuery); + return Result.success(page); + } + + /** + * 新增访客 + * @param visitorManagementReq + * @return + */ + @PostMapping("/addVisitor") + public Result addVisitor(@RequestBody VisitorManagementReq visitorManagementReq) { + log.info("新增访客,入参: {}", visitorManagementReq); + UserInfo userInfo = getUserInfo(); + visitorManagementReq.setCreateTime(LocalDateTime.now()); + visitorManagementReq.setCreateById(userInfo.getId()); + visitorManagementReq.setCreateBy(userInfo.getUserName()); + int result = tbUserVisitorManagementService.addVisitor(visitorManagementReq); + return Result.success(result > 0); + } + + /** + * 查看访客邀约详情 + */ + @GetMapping("/{id}") + public Result getVisitor(@PathVariable("id") Integer id) { + log.info("查看访客详情,入参: {}", id); + TbVisitorManagement visitor = tbUserVisitorManagementService.getVisitorById(id); + return Result.success(visitor); + } + + /** + * 审核访客 + * @param visitorManagementReq + * @return + */ + @PutMapping("/auditVisitor") + public Result auditVisitor(@RequestBody VisitorManagementReq visitorManagementReq) { + log.info("审核访客,入参: {}", visitorManagementReq); + UserInfo userInfo = getUserInfo(); + visitorManagementReq.setUpdateTime(LocalDateTime.now()); + visitorManagementReq.setUpdateById(userInfo.getId()); + visitorManagementReq.setUpdateBy(userInfo.getUserName()); + int result = tbUserVisitorManagementService.auditVisitor(visitorManagementReq); + return Result.success(result > 0); + } + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbCeremonialServeCovert.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbCeremonialServeCovert.java new file mode 100644 index 00000000..86f176f5 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbCeremonialServeCovert.java @@ -0,0 +1,17 @@ +package by.dimp.web.covert; + +import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServeReq; +import by.dimp.web.model.domain.ceremonialServe.res.CeremonialServeRes; +import by.dimp.web.model.domain.roomBooking.resp.RoomBookingRes; +import by.dimp.web.model.entity.TbCeremonialServe; +import by.dimp.web.model.entity.TbRoomBooking; +import org.mapstruct.Mapper; + +@Mapper(componentModel = "spring") +public interface TbCeremonialServeCovert { + CeremonialServeRes entityToResp(TbCeremonialServe tbCeremonialServe); + + TbCeremonialServe reqToResp(CeremonialServeReq ceremonialServeReq); + + TbCeremonialServe reqToEntity(CeremonialServeReq ceremonialServeReq); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbCleaningQualityConvert.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbCleaningQualityConvert.java new file mode 100644 index 00000000..10b7686f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbCleaningQualityConvert.java @@ -0,0 +1,18 @@ +package by.dimp.web.covert; + +import by.dimp.web.model.domain.cleaningIndicators.req.SaveAndModifyCleaningIndicators; +import by.dimp.web.model.domain.cleaningIndicators.resp.TbCleaningIndicatorsResp; +import by.dimp.web.model.entity.TbCleaningIndicators; +import org.mapstruct.Mapper; + +@Mapper(componentModel = "spring") +public interface TbCleaningQualityConvert { + TbCleaningIndicators reqToEntity(SaveAndModifyCleaningIndicators req); + + TbCleaningIndicatorsResp entityToResp(TbCleaningIndicators ls); +} + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbConferenceCovert.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbConferenceCovert.java new file mode 100644 index 00000000..96da4669 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbConferenceCovert.java @@ -0,0 +1,14 @@ +package by.dimp.web.covert; + +import by.dimp.web.model.domain.conference.req.ConferenceReq; +import by.dimp.web.model.entity.TbConference; +import by.dimp.web.model.domain.conference.resp.ConferenceRes; +import org.mapstruct.Mapper; + +@Mapper(componentModel = "spring") +public interface TbConferenceCovert { + ConferenceRes entityToResp(TbConference tbConference); + + TbConference reqToEntity(ConferenceReq conferenceReq); + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbRoomBookingConvert.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbRoomBookingConvert.java new file mode 100644 index 00000000..60fecd12 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbRoomBookingConvert.java @@ -0,0 +1,15 @@ +package by.dimp.web.covert; + +import by.dimp.web.model.entity.TbRoomBooking; +import by.dimp.web.model.domain.roomBooking.req.RoomBookingReq; +import by.dimp.web.model.domain.roomBooking.resp.RoomBookingRes; +import org.mapstruct.Mapper; + +@Mapper(componentModel = "spring") +public interface TbRoomBookingConvert { + RoomBookingRes entityToResp(TbRoomBooking tbRoomBooking); + + TbRoomBooking respToEntity(RoomBookingReq roomBookingReq); + + TbRoomBooking reqToEntity(RoomBookingReq roomBookingReq); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbServiceClassificationConvert.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbServiceClassificationConvert.java new file mode 100644 index 00000000..53561298 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbServiceClassificationConvert.java @@ -0,0 +1,13 @@ +package by.dimp.web.covert; + +import by.dimp.web.model.domain.serviceClassification.req.ServiceClassificationReq; +import by.dimp.web.model.domain.serviceClassification.resp.TbServiceClassificationRes; +import by.dimp.web.model.entity.TbServiceClassification; +import org.mapstruct.Mapper; + +@Mapper(componentModel = "spring") +public interface TbServiceClassificationConvert { + TbServiceClassificationRes entityToResp(TbServiceClassification entity); + TbServiceClassification reqToEntity (ServiceClassificationReq req); + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbVisitorManagementConvert.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbVisitorManagementConvert.java new file mode 100644 index 00000000..1188441f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/covert/TbVisitorManagementConvert.java @@ -0,0 +1,14 @@ +package by.dimp.web.covert; + +import by.dimp.web.model.domain.visitorManagement.req.VisitorManagementReq; +import by.dimp.web.model.domain.visitorManagement.resp.VisitorManagementRes; +import by.dimp.web.model.entity.TbVisitorManagement; +import org.mapstruct.Mapper; + +@Mapper(componentModel = "spring") +public interface TbVisitorManagementConvert { + + TbVisitorManagement entityToResp(TbVisitorManagement tbVisitorManagement); + + TbVisitorManagement reqToEntity(VisitorManagementReq visitorManagementReq); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbAttendanceStatisticsMapper.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbAttendanceStatisticsMapper.java new file mode 100644 index 00000000..fa0e6d6e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbAttendanceStatisticsMapper.java @@ -0,0 +1,10 @@ +package by.dimp.web.mapper.admin; + +import by.dimp.web.model.domain.attendanceStatistics.req.AttendanceStatisticsQueryReq; +import by.dimp.web.model.domain.attendanceStatistics.res.AttendanceStatisticsRes; +import org.mapstruct.Mapper; + +@Mapper +public interface TbAttendanceStatisticsMapper { + AttendanceStatisticsRes pageQuery(AttendanceStatisticsQueryReq query); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbCeremonialServeMapper.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbCeremonialServeMapper.java new file mode 100644 index 00000000..e0c5b845 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbCeremonialServeMapper.java @@ -0,0 +1,15 @@ +package by.dimp.web.mapper.admin; + +import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServePageQueryReq; +import by.dimp.web.model.entity.TbCeremonialServe; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; + + +@Mapper +public interface TbCeremonialServeMapper extends BaseMapper { + IPage selectForPage(Page rowPage, CeremonialServePageQueryReq pageQueryReq); + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbCeremonialserveRoombookingMapper.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbCeremonialserveRoombookingMapper.java new file mode 100644 index 00000000..336026c9 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbCeremonialserveRoombookingMapper.java @@ -0,0 +1,13 @@ +package by.dimp.web.mapper.admin; + +import by.dimp.web.model.entity.TbCeremonialserveRoombooking; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface TbCeremonialserveRoombookingMapper extends BaseMapper { + void insertAll(List serveIds); + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbCleaningQualityMapper.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbCleaningQualityMapper.java new file mode 100644 index 00000000..a73c0158 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbCleaningQualityMapper.java @@ -0,0 +1,18 @@ +package by.dimp.web.mapper.admin; + + +import by.dimp.web.model.domain.cleaningIndicators.req.QueryCleaningIndicatorsReq; +import by.dimp.web.model.entity.TbCleaningIndicators; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + + +@Mapper +public interface TbCleaningQualityMapper extends BaseMapper { + + IPage selectForPage(Page page, @Param("req") QueryCleaningIndicatorsReq req); +} + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbConferenceMapper.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbConferenceMapper.java new file mode 100644 index 00000000..0b246652 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbConferenceMapper.java @@ -0,0 +1,17 @@ +package by.dimp.web.mapper.admin; + +import by.dimp.web.model.entity.TbConference; +import by.dimp.web.model.domain.conference.req.ConferencePageQueryReq; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface TbConferenceMapper extends BaseMapper { + + IPage selectForPage(Page rowPage, @Param("ew") ConferencePageQueryReq queryReq); + +// int insert(ConferenceReq conferenceReq); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbRoomBookingMapper.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbRoomBookingMapper.java new file mode 100644 index 00000000..1b3146ce --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbRoomBookingMapper.java @@ -0,0 +1,14 @@ +package by.dimp.web.mapper.admin; + +import by.dimp.web.model.entity.TbRoomBooking; +import by.dimp.web.model.domain.roomBooking.req.RoomBookingPageQueryReq; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface TbRoomBookingMapper extends BaseMapper { + IPage selectForPage(Page rowPage,@Param("ew") RoomBookingPageQueryReq pageQueryReq); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbServiceClassificationMapper.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbServiceClassificationMapper.java new file mode 100644 index 00000000..988a28c2 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbServiceClassificationMapper.java @@ -0,0 +1,22 @@ +package by.dimp.web.mapper.admin; + +import by.dimp.web.model.domain.serviceClassification.req.TbServiceClassificationPageQuery; +import by.dimp.web.model.entity.TbServiceClassification; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +/** +* @author dy +* @description 针对表【tb_service_classification】的数据库操作Mapper +* @createDate 2025-06-12 16:31:28 +* @Entity by/dimp/web.domain.TbServiceClassification +*/ +public interface TbServiceClassificationMapper extends BaseMapper { + + IPage selectForPage(Page rowPage, TbServiceClassificationPageQuery pageQuery); +} + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbVisitorManagementMapper.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbVisitorManagementMapper.java new file mode 100644 index 00000000..83be7a6e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/admin/TbVisitorManagementMapper.java @@ -0,0 +1,24 @@ +package by.dimp.web.mapper.admin; +import by.dimp.web.model.domain.visitorManagement.req.VistorManagementPageQuery; +import by.dimp.web.model.entity.TbVisitorManagement; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +/** +* @author dy +* @description 针对表【tb_visitor_management】的数据库操作Mapper +* @createDate 2025-06-16 14:24:44 +* @Entity by/dimp/web.domain.TbVisitorManagement +*/ +public interface TbVisitorManagementMapper extends BaseMapper { + + + IPage selectForPage(Page rowPage, VistorManagementPageQuery pageQuery); + + IPage selectForWaitingPage(Page rowPage, VistorManagementPageQuery pageQuery); +} + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/user/TbUserVisitorManagementMapper.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/user/TbUserVisitorManagementMapper.java new file mode 100644 index 00000000..37fb096f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/mapper/user/TbUserVisitorManagementMapper.java @@ -0,0 +1,24 @@ +package by.dimp.web.mapper.user; +import by.dimp.web.model.domain.visitorManagement.req.VistorManagementPageQuery; +import by.dimp.web.model.entity.TbVisitorManagement; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +/** +* @author dy +* @description 针对表【tb_visitor_management】的数据库操作Mapper +* @createDate 2025-06-16 14:24:44 +* @Entity by/dimp/web.domain.TbVisitorManagement +*/ +public interface TbUserVisitorManagementMapper extends BaseMapper { + + + IPage selectForPage(Page rowPage, VistorManagementPageQuery pageQuery); + + IPage selectForWaitingPage(Page rowPage, VistorManagementPageQuery pageQuery); +} + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/E8/general/ApiResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/E8/general/ApiResp.java new file mode 100644 index 00000000..8268760c --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/E8/general/ApiResp.java @@ -0,0 +1,38 @@ +package by.dimp.web.model.domain.E8.general; + +import lombok.AllArgsConstructor; +import lombok.Data; + +/** + * @author zcxlsm + * @title: ApiResp + * @date 2025/5/8 17:05 + */ +@Data +@AllArgsConstructor +public class ApiResp { + /** + * success为false时返回错误信息 + */ + private String message; + + /** + * sessionId + */ + private Long sessionId; + + /** + * 返回处理结果(数据由具体接口决定) + */ + private Object result; + + /** + * true表示成功,false表示失败 + */ + private Boolean success; + + /** + * 状态码 0表示成功,1表示失败 + */ + private Integer code; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/E8/general/QueryDto.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/E8/general/QueryDto.java new file mode 100644 index 00000000..053a25e5 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/E8/general/QueryDto.java @@ -0,0 +1,26 @@ +package by.dimp.web.model.domain.E8.general; + +import lombok.Data; + +/** + * @author zcxlsm + * @title: QueryDto + * @date 2025/5/8 17:20 + */ +@Data +public class QueryDto { + /** + * 页数 + */ + private Integer pageIndex; + + /** + * 每页条数 + */ + private Integer maxResultCount; + + /** + * 请求参数 + */ + private Object queryDto; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/attendanceStatistics/req/AttendanceStatisticsQueryReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/attendanceStatistics/req/AttendanceStatisticsQueryReq.java new file mode 100644 index 00000000..4e79171e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/attendanceStatistics/req/AttendanceStatisticsQueryReq.java @@ -0,0 +1,24 @@ +package by.dimp.web.model.domain.attendanceStatistics.req; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class AttendanceStatisticsQueryReq { + + //分页参数 + private Integer page; + private Integer pageSize; + + //会议室名称 + private String roomName; + + //会议人数 + private Integer approverCount; + + //会议地点 + private String roomLocation; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/attendanceStatistics/res/AttendanceStatisticsRes.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/attendanceStatistics/res/AttendanceStatisticsRes.java new file mode 100644 index 00000000..30f6d97d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/attendanceStatistics/res/AttendanceStatisticsRes.java @@ -0,0 +1,25 @@ +package by.dimp.web.model.domain.attendanceStatistics.res; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDateTime; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class AttendanceStatisticsRes { + + //会议室名称 + private String roomName; + + //签到开始时间 + private LocalDateTime CheckInStartTime; + + //签到结束时间 + private LocalDateTime CheckInEndTime; + + //设备使用情况 + private boolean deviceUsage; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/ceremonialServe/req/CeremonialServePageQueryReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/ceremonialServe/req/CeremonialServePageQueryReq.java new file mode 100644 index 00000000..71373f19 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/ceremonialServe/req/CeremonialServePageQueryReq.java @@ -0,0 +1,18 @@ +package by.dimp.web.model.domain.ceremonialServe.req; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class CeremonialServePageQueryReq { + //页码 + private int page; + + //每页记录数 + private int pageSize; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/ceremonialServe/req/CeremonialServeReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/ceremonialServe/req/CeremonialServeReq.java new file mode 100644 index 00000000..d8919c43 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/ceremonialServe/req/CeremonialServeReq.java @@ -0,0 +1,87 @@ +package by.dimp.web.model.domain.ceremonialServe.req; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.Date; + +/** +* +* @TableName tb_ceremonial_serve +*/ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class CeremonialServeReq implements Serializable { + + /** + * id + */ + private Integer id; + /** + * 会议室id + */ + private Integer tbConferenceId; + /** + * 服务类型 + */ + @Length(max= 256,message="编码长度不能超过256") + private Integer serveType; + /** + * 服务名称 + */ + @Length(max= 256,message="编码长度不能超过256") + private String serveName; + /** + * 预订状态(0:待确认,1:已确认,2:已取消,3:已完成) + */ + private Integer serveStatus; + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 创建人 + */ + @Length(max= 32,message="编码长度不能超过32") + private String createBy; + /** + * 创建人id + */ + private Long createById; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 更新人 + */ + @Length(max= 32,message="编码长度不能超过32") + private String updateBy; + /** + * 更新人id + */ + private Integer updateById; + /** + * 确认人id + */ + private Integer confirmId; + /** + * 服务开始时间 + */ + private Date beginTime; + /** + * 服务结束时间 + */ + private Date endTime; + /** + * 数据状态(模拟删除 0:删除 1:未删除) + */ + private Integer dataStauts; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/ceremonialServe/res/CeremonialServeRes.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/ceremonialServe/res/CeremonialServeRes.java new file mode 100644 index 00000000..d1565695 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/ceremonialServe/res/CeremonialServeRes.java @@ -0,0 +1,82 @@ +package by.dimp.web.model.domain.ceremonialServe.res; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import java.time.LocalDateTime; +import java.util.Date; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class CeremonialServeRes { + + /** + * id + */ + private Integer id; + /** + * 会议室id + */ + private Integer tbConferenceId; + /** + * 服务类型 + */ + @Length(max= 256,message="编码长度不能超过256") + private String serveType; + /** + * 服务名称 + */ + @Length(max= 256,message="编码长度不能超过256") + private String serveName; + /** + * 预订状态(0:待确认,1:已确认,2:已取消,3:已完成) + */ + private Integer serveStatus; + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 创建人 + */ + @Length(max= 32,message="编码长度不能超过32") + private String createBy; + /** + * 创建人id + */ + private Integer createById; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + /** + * 更新人 + */ + @Length(max= 32,message="编码长度不能超过32") + private String updateBy; + /** + * 更新人id + */ + private Integer updateById; + /** + * 确认人id + */ + private Integer confirmId; + /** + * 服务开始时间 + */ + private LocalDateTime beginTime; + /** + * 服务结束时间 + */ + private LocalDateTime endTime; + /** + * 数据状态(模拟删除 0:删除 1:未删除) + */ + private Integer dataStauts; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/cleaningIndicators/req/QueryCleaningIndicatorsReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/cleaningIndicators/req/QueryCleaningIndicatorsReq.java new file mode 100644 index 00000000..68a78b42 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/cleaningIndicators/req/QueryCleaningIndicatorsReq.java @@ -0,0 +1,21 @@ +package by.dimp.web.model.domain.cleaningIndicators.req; + +import by.dimp.common.core.domain.Page; +import lombok.Data; + +@Data +public class QueryCleaningIndicatorsReq extends Page { + /** + * 主键id + */ + private Long id; + + /** + * 指标项名称 + */ + private String metricName; + /** + * 描述 + */ + private String description; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/cleaningIndicators/req/SaveAndModifyCleaningIndicators.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/cleaningIndicators/req/SaveAndModifyCleaningIndicators.java new file mode 100644 index 00000000..6431855f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/cleaningIndicators/req/SaveAndModifyCleaningIndicators.java @@ -0,0 +1,74 @@ +package by.dimp.web.model.domain.cleaningIndicators.req; + +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Data +public class SaveAndModifyCleaningIndicators { + /** + * 主键id + */ + private Long id; + + /** + * 指标项名称 + */ + private String metricName; + + /** + * 指标标准值 + */ + private BigDecimal standardValue; + + /** + * 指标上限 + */ + private BigDecimal upperLimit; + + /** + * 指标下限 + */ + private BigDecimal lowerLimit; + + /** + * 描述 + */ + private String description; + + /** + * 数据状态:1有效,0无效 + */ + private Integer dataState; + + /** + * 创建人 + */ + private String createEmpId; + + /** + * 创建人名称 + */ + private String createEmpName; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 修改人 + */ + private String modifyEmpId; + + /** + * 修改人名称 + */ + private String modifyEmpName; + + /** + * 修改时间 + */ + private LocalDateTime modifyTime; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/cleaningIndicators/resp/TbCleaningIndicatorsResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/cleaningIndicators/resp/TbCleaningIndicatorsResp.java new file mode 100644 index 00000000..7bf5ea93 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/cleaningIndicators/resp/TbCleaningIndicatorsResp.java @@ -0,0 +1,74 @@ +package by.dimp.web.model.domain.cleaningIndicators.resp; + +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Data +public class TbCleaningIndicatorsResp { + /** + * 主键id + */ + private Long id; + + /** + * 指标项名称 + */ + private String metricName; + + /** + * 指标标准值 + */ + private BigDecimal standardValue; + + /** + * 指标上限 + */ + private BigDecimal upperLimit; + + /** + * 指标下限 + */ + private BigDecimal lowerLimit; + + /** + * 描述 + */ + private String description; + + /** + * 数据状态:1有效,0无效 + */ + private Integer dataState; + + /** + * 创建人 + */ + private String createEmpId; + + /** + * 创建人名称 + */ + private String createEmpName; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 修改人 + */ + private String modifyEmpId; + + /** + * 修改人名称 + */ + private String modifyEmpName; + + /** + * 修改时间 + */ + private LocalDateTime modifyTime; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conference/req/ConferencePageQueryReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conference/req/ConferencePageQueryReq.java new file mode 100644 index 00000000..083afeb8 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conference/req/ConferencePageQueryReq.java @@ -0,0 +1,21 @@ +package by.dimp.web.model.domain.conference.req; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class ConferencePageQueryReq implements Serializable { + //页码 + private int page; + + //每页记录数 + private int pageSize; + + //会议室名称 + private String roomName; + + //会议室编号 + private Integer roomNo; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conference/req/ConferenceReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conference/req/ConferenceReq.java new file mode 100644 index 00000000..702e5788 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conference/req/ConferenceReq.java @@ -0,0 +1,124 @@ +package by.dimp.web.model.domain.conference.req; + +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ConferenceReq { + + /** + * id + */ + private Integer id; + /** + * 会议室名称 + */ + private String roomName; + /** + * 会议室编号 + */ + private Integer roomNo; + /** + * 会议室位置 + */ + private String roomLocation; + /** + * 会议室面积 + */ + private String roomArea; + /** + * 会议室类型 + */ + private String roomType; + /** + * 会议室容纳人数 + */ + private Integer roomNumber; + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 创建人 + */ + private String createBy; + /** + * 创建人id + */ + private Long createById; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + /** + * 更新人 + */ + private String updateBy; + /** + * 更新人id + */ + private Long updateById; + /** + * 会议室配套设施 + */ + private String roomFacilities; + /** + * 会议室价格类型(0:免费,1付费,2:面议) + */ + private Integer feeType; + /** + * 费用金额 + */ + private BigDecimal feePrice; + /** + * 数据状态(模拟删除 0:未删除 1:删除) + */ + @TableLogic + private Integer dataStatus; + /** + * 负责人 + */ + private String responsiblePerson; + /** + * 联系电话 + */ + private Integer contactNumber; + /** + * 会议室照片 + */ + private String pictures; + /** + * 会议室描述 + */ + private String description; + /** + * 是否需要审核(0:需要审核,1:不需要审核) + */ + private Integer review; + /** + * 启用状态(0:禁用,1:启用) + */ + private Integer enabledStatus; + /** + * 开放星期(1:星期一,2:星期二) + */ + private Integer openingWeek; + /** + * 开放结束时间 + */ + private LocalDateTime openingEndTime; + + /** + * 开放开始时间 + */ + private LocalDateTime openingBeginTime; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conference/resp/ConferenceRes.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conference/resp/ConferenceRes.java new file mode 100644 index 00000000..dad28026 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conference/resp/ConferenceRes.java @@ -0,0 +1,124 @@ +package by.dimp.web.model.domain.conference.resp; + +import com.baomidou.mybatisplus.annotation.TableLogic; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.Date; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ConferenceRes { + + /** + * id + */ + private Integer id; + /** + * 会议室名称 + */ + private String roomName; + /** + * 会议室编号 + */ + private Integer roomNo; + /** + * 会议室位置 + */ + private String roomLocation; + /** + * 会议室面积 + */ + private String roomArea; + /** + * 会议室类型 + */ + private String roomType; + /** + * 会议室容纳人数 + */ + private Integer roomNumber; + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 创建人 + */ + private String createBy; + /** + * 创建人id + */ + private Long createById; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + /** + * 更新人 + */ + private String updateBy; + /** + * 更新人id + */ + private Long updateById; + /** + * 会议室配套设施 + */ + private String roomFacilities; + /** + * 会议室价格类型(0:免费,1付费,2:面议) + */ + private Integer feeType; + /** + * 费用金额 + */ + private BigDecimal feePrice; + /** + * 数据状态(模拟删除 0:未删除 1:删除) + */ + @TableLogic + private Integer dataStatus; + /** + * 负责人 + */ + private String responsiblePerson; + /** + * 联系电话 + */ + private Integer contactNumber; + /** + * 会议室照片 + */ + private String pictures; + /** + * 会议室描述 + */ + private String description; + /** + * 是否需要审核(0:需要审核,1:不需要审核) + */ + private Integer review; + /** + * 启用状态(0:禁用,1:启用) + */ + private Integer enabledStatus; + /** + * 开放星期(1:星期一,2:星期二) + */ + private Integer openingWeek; + /** + * 开放结束时间 + */ + private LocalDateTime openingEndTime; + + /** + * 开放开始时间 + */ + private LocalDateTime openingBeginTime; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conferenceStatistics/ConferenceStatistics.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conferenceStatistics/ConferenceStatistics.java new file mode 100644 index 00000000..8087f0fb --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/conferenceStatistics/ConferenceStatistics.java @@ -0,0 +1,20 @@ +package by.dimp.web.model.domain.conferenceStatistics; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ConferenceStatistics { + private Integer id; + //参会人数 + private Integer approverCount; + //签到开始时间 + private Integer signInBeginTime; + + //签到结束时间 + private Integer signInEndTime; + //设备使用情况 +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/roomBooking/req/RoomBookingPageQueryReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/roomBooking/req/RoomBookingPageQueryReq.java new file mode 100644 index 00000000..918bfb73 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/roomBooking/req/RoomBookingPageQueryReq.java @@ -0,0 +1,21 @@ +package by.dimp.web.model.domain.roomBooking.req; + +import cn.hutool.core.date.DateTime; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.time.LocalDateTime; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class RoomBookingPageQueryReq implements Serializable { + private int page; + private int pageSize; + + private int roomName; + private LocalDateTime appointmentBeginTime; + private LocalDateTime appointmentEndTime; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/roomBooking/req/RoomBookingReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/roomBooking/req/RoomBookingReq.java new file mode 100644 index 00000000..d6776cdc --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/roomBooking/req/RoomBookingReq.java @@ -0,0 +1,125 @@ +package by.dimp.web.model.domain.roomBooking.req; + +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import java.time.LocalDateTime; +import java.util.Date; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class RoomBookingReq { + + /** + * id + */ + private Integer id; + /** + * 会议室id + */ + private Integer tbConferenceId; + /** + * 预约状态(0:未预定 1:使用中 2:已预订) + */ + private Integer bookingStatus; + /** + * 审核状态(0:未审核 1:通过 2:未通过) + */ + private Integer reviewStatus; + + /** + * 会议预订人 + */ + private String bookingName; + /** + * 使用单位 + */ + private String userUnit; + /** + * 会议主题 + */ + private String conferenceTheme; + /** + * 预约日期 + */ + private Date appointmentDate; + /** + * 预约开始时段 + */ + private LocalDateTime appointmentBeginTime; + /** + * 预约结束时段 + */ + private LocalDateTime appointmentEndTime; + /** + * 参会人员 + */ + private String attendeesName; + /** + * 参会人数 + */ + private Integer approverCount; + /** + * 签到开始时间 + */ + private LocalDateTime checkInStartTime; + /** + * 签到结束时间 + */ + private LocalDateTime checkInEndTime; + /** + * 审批人 + */ + private String approver; + /** + * 审批时间 + */ + private LocalDateTime approverTime; + /** + * 评价 + */ + private String evaluate; + /** + * 备注 + */ + private String remark; + /** + * 是否需要增值服务(0:需要,1:不需要) + */ + private Integer addServices; + /** + * 创建人id + */ + private Long createById; + /** + * 创建人 + */ + private String createBy; + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 更新人id + */ + private Long updateById; + /** + * 更新人 + */ + private String updateBy; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + /** + * 数据状态(模拟删除 0:未删除 1:删除) + */ + @TableLogic + private Integer dataStatus; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/roomBooking/resp/RoomBookingRes.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/roomBooking/resp/RoomBookingRes.java new file mode 100644 index 00000000..47208311 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/roomBooking/resp/RoomBookingRes.java @@ -0,0 +1,67 @@ +package by.dimp.web.model.domain.roomBooking.resp; + +import com.baomidou.mybatisplus.annotation.TableLogic; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import java.time.LocalDateTime; +import java.util.Date; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class RoomBookingRes { + + /** + * id + */ + private Integer id; + /** + * 会议室id + */ + private Integer tbConferenceId; + /** + * 会议开始使用时间 + */ + private LocalDateTime roomBeginTime; + /** + * 会议结束使用时间 + */ + private LocalDateTime roomEndTime; + /** + * 会议预订人 + */ + private String bookingName; + /** + * 使用单位 + */ + private String userUnit; + /** + * 会议主题 + */ + private String conferenceTheme; + + /** + * 会议室名称 + */ + private String roomName; + + /** + * 预约日期 + */ + private Date appointmentDate; + + + /** + * 预约开始时段 + */ + private LocalDateTime appointmentBeginTime; + /** + * 预约结束时段 + */ + private LocalDateTime appointmentEndTime; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/serviceClassification/req/ServiceClassificationReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/serviceClassification/req/ServiceClassificationReq.java new file mode 100644 index 00000000..36f3115a --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/serviceClassification/req/ServiceClassificationReq.java @@ -0,0 +1,58 @@ +package by.dimp.web.model.domain.serviceClassification.req; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.time.LocalDateTime; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class ServiceClassificationReq { + + /** + * id + */ + private Integer id; + /** + * 分类 + */ + private String type; + /** + * 分类名称 + */ + private String name; + /** + * 排序 + */ + private Integer sort; + /** + * 分类状态(0:禁用,1:启用) + */ + private Integer status; + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 创建人 + */ + private String createBy; + /** + * 创建人id + */ + private Long createById; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + /** + * 更新人 + */ + private String updateBy; + /** + * 更新人id + */ + private Integer updateById; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/serviceClassification/req/TbServiceClassificationPageQuery.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/serviceClassification/req/TbServiceClassificationPageQuery.java new file mode 100644 index 00000000..ff916ae2 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/serviceClassification/req/TbServiceClassificationPageQuery.java @@ -0,0 +1,17 @@ +package by.dimp.web.model.domain.serviceClassification.req; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class TbServiceClassificationPageQuery { + private int page; + private int pageSize; + + private String name; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/serviceClassification/resp/TbServiceClassificationRes.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/serviceClassification/resp/TbServiceClassificationRes.java new file mode 100644 index 00000000..2a25bcfb --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/serviceClassification/resp/TbServiceClassificationRes.java @@ -0,0 +1,62 @@ +package by.dimp.web.model.domain.serviceClassification.resp; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import java.util.Date; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TbServiceClassificationRes { + + /** + * id + */ + private Integer id; + /** + * 分类 + */ + @Length(max= 64,message="编码长度不能超过64") + private String type; + /** + * 分类名称 + */ + @Length(max= 64,message="编码长度不能超过64") + private String name; + /** + * 排序 + */ + private Integer sort; + /** + * 分类状态(0:禁用,1:启用) + */ + private Integer status; + /** + * 创建时间 + */ + private Date createTime; + /** + * 创建人 + */ + private String createBy; + /** + * 创建人id + */ + private Integer createById; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 更新人 + */ + private String updateBy; + /** + * 更新人id + */ + private Integer updateById; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/visitorManagement/req/VisitorManagementReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/visitorManagement/req/VisitorManagementReq.java new file mode 100644 index 00000000..4cb2004e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/visitorManagement/req/VisitorManagementReq.java @@ -0,0 +1,101 @@ +package by.dimp.web.model.domain.visitorManagement.req; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import java.time.LocalDateTime; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class VisitorManagementReq { + + /** + * id + */ + private Integer id; + /** + * 访客姓名 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String visitorName; + /** + * 访客电话 + */ + private Integer visitorPhone; + + /** + * 身份证号 + */ + private String identityCard; + /** + * 拜访事由 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String visitingReason; + + + + + /** + * 拜访开始时间 + */ + private LocalDateTime visitingBeginTime; + /** + * 拜访结束时间 + */ + private LocalDateTime visitingEndTime; + /** + * 预约车位 + */ + private Integer bookingParkingSpace; + /** + * 车牌号 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String licensePlate; + /** + * 人脸图片 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String facePictures; + + /** + * 验证码 + */ + private String verificationCode; + + /** + * 预约状态(0:待审核,1:待访问,2:已取消,3:已完成) + */ + private int serveStatus; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 创建人 + */ + @Length(max = 64, message = "编码长度不能超过64") + private String createBy; + /** + * 创建人id + */ + private Long createById; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + /** + * 更新人 + */ + @Length(max = 64, message = "编码长度不能超过64") + private String updateBy; + /** + * 更新人id + */ + private Long updateById; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/visitorManagement/req/VistorManagementPageQuery.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/visitorManagement/req/VistorManagementPageQuery.java new file mode 100644 index 00000000..274539fd --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/visitorManagement/req/VistorManagementPageQuery.java @@ -0,0 +1,48 @@ +package by.dimp.web.model.domain.visitorManagement.req; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import java.util.Date; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class VistorManagementPageQuery { + private int page; + private int pageSize; + /** + * 访客姓名 + */ + private String visitorName; + /** + * 被访人 + */ + private String interviewee; + + /** + * 被访单位 + */ + private String interviewedUnit; + + /** + * 预约状态(0:待确认,1:已确认,2:已取消,3:已完成) + */ + private int serve_status; + + /** + * 提交时间(创建时间) + */ + private Date createTime; + + /** + * 拜访开始时间 + */ + private Date visitingBeginTime; + /** + * 拜访结束时间 + */ + private Date visitingEndTime; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/visitorManagement/resp/VisitorManagementRes.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/visitorManagement/resp/VisitorManagementRes.java new file mode 100644 index 00000000..955a6ec6 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/domain/visitorManagement/resp/VisitorManagementRes.java @@ -0,0 +1,87 @@ +package by.dimp.web.model.domain.visitorManagement.resp; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import java.time.LocalDateTime; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class VisitorManagementRes { + + /** + * id + */ + private Integer id; + /** + * 访客姓名 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String visitorName; + /** + * 访客电话 + */ + private Integer visitorPhone; + /** + * 拜访事由 + */ + + /** + * 预约状态(0:待确认,1:已确认,2:已取消,3:已完成) + */ + private int serve_status; + + @Length(max = 256, message = "编码长度不能超过256") + private String visitingReason; + /** + * 拜访开始时间 + */ + private LocalDateTime visitingBeginTime; + /** + * 拜访结束时间 + */ + private LocalDateTime visitingEndTime; + /** + * 预约车位 + */ + private Integer bookingParkingSpace; + /** + * 车牌号 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String licensePlate; + /** + * 人脸图片 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String facePictures; + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 创建人 + */ + @Length(max = 64, message = "编码长度不能超过64") + private String createBy; + /** + * 创建人id + */ + private Integer createById; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + /** + * 更新人 + */ + @Length(max = 64, message = "编码长度不能超过64") + private String updateBy; + /** + * 更新人id + */ + private Integer updateById; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/AccessRecordInfo.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/AccessRecordInfo.java new file mode 100644 index 00000000..03ebcd8f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/AccessRecordInfo.java @@ -0,0 +1,243 @@ +package by.dimp.web.model.entity.E8; + +import lombok.Data; + +import java.util.Date; + +/** + * @author zcxlsm + * @title: AccessRecordInfo + * @date 2025/5/11 20:22 + */ +@Data +public class AccessRecordInfo { + /** + * 主键 + */ + private Long id; + + /** + * 记录ID + */ + private String recordId; + + /** + * 设备ID + */ + private Long deviceId; + + /** + * 设备编号 + */ + private Integer devNo; + + /** + * 设备名称 + */ + private String deviceName; + + /** + * 门ID + */ + private Long doorId; + + /** + * 门名称 + */ + private String doorName; + + /** + * 设备类型(例如:1102-车场控制机,205-辅机等) + */ + private Integer deviceType; + + /** + * 分控ID + */ + private Long deviceSubId; + + /** + * 读头ID + */ + private Long readerId; + + /** + * 读头名称 + */ + private String readerName; + + /** + * 出入口类型(0-未知,1-入口,2-出口) + */ + private Integer gatewayType; + + /** + * 区域ID + */ + private Long areaId; + + /** + * 区域名称 + */ + private String areaName; + + /** + * 客户ID + */ + private Long customerId; + + /** + * 客户编号 + */ + private String customerNo; + + /** + * 客户名称 + */ + private String customerName; + + /** + * 客户名称(备用字段) + */ + private String customerName1; + + /** + * 客户手机号 + */ + private String customerTel; + + /** + * 客户手机号(备用字段) + */ + private String customerTel1; + + /** + * 组织ID + */ + private String organIds; + + /** + * 组织全路径 + */ + private String organFullPath; + + /** + * 卡类别(例如:34-普通用户卡,35-胁迫卡等) + */ + private Integer cardType; + + /** + * 凭证编号 + */ + private String idno; + + /** + * 凭证类型(例如:10-MF1-A卡,20-个人密码等) + */ + private Integer voucherType; + + /** + * 凭证模式(0-ID卡模式,1-IC卡模式等) + */ + private Integer voucherMode; + + /** + * 图片地址 + */ + private String pictureUrl; + + /** + * 监控图片地址 + */ + private String monitorPictureUrl; + + /** + * 视频地址 + */ + private String videoUrl; + + /** + * 通行记录类型(例如:1-卡开门,2-人脸开门等) + */ + private Integer recordType; + + /** + * 是否脱机记录(0-否,1-是) + */ + private Integer offineFlag; + + /** + * 通行时间 + */ + private Date actionTime; + + /** + * 添加时间 + */ + private Date addTime; + + /** + * 扩展字段 + */ + private String extend; + + /** + * 体温 + */ + private Double temperature; + + /** + * 健康状态(0-未知,1-正常,2-异常) + */ + private Integer healthCodeStatus; + + /** + * 设备类型描述 + */ + private String deviceTypeDesc; + + /** + * 出入口类型描述 + */ + private String gatewayTypeDesc; + + /** + * 凭证类型描述 + */ + private String voucherTypeDesc; + + /** + * 凭证模式描述 + */ + private String voucherModeDesc; + + /** + * 卡类描述 + */ + private String cardTypeDesc; + + /** + * 记录类型描述 + */ + private String recordTypeDesc; + + /** + * 体温描述 + */ + private String temperatureDesc; + + /** + * 健康码状态描述 + */ + private String healthCodeStatusDesc; + + /** + * 人脸凭证地址 + */ + private String voucherUrl; + + /** + * 是否显示敏感信息(true-隐藏,false-显示) + */ + private Boolean isViewFullData; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/AreaInfo.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/AreaInfo.java new file mode 100644 index 00000000..5c7a90a7 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/AreaInfo.java @@ -0,0 +1,86 @@ +package by.dimp.web.model.entity.E8; + +import lombok.Data; + +/** + * @author zcxlsm + * @title: AreaInfo + * @date 2025/5/8 17:25 + */ +@Data +public class AreaInfo { + /** + * 区域id + */ + private Long areaId; + + /** + * 区域名称 + */ + private String areaName; + + /** + * 用户类型 0:业主 1:家属 2:租客 3:员工 4:企业主 11:职员 12:临时人员 13:户主 14:外部人员 100:其他人员 + */ + private Integer userType; + + /** + * 区域类型 0:区域 1:楼栋 2:房屋 3:门 4:楼层 + */ + private Integer areaType; + + /** + * 区域类型中文描述 + */ + private String areaTypeDesc; + + /** + * 编号 + */ + private String areaNo; + + /** + * 标志:0区域;1通道; + */ + private Integer flag; + + /** + * 门类型 0:双向门 1:入口 2:出口 3:虚拟门 + */ + private Integer doorType; + + /** + * 楼层 + */ + private Integer floor; + + /** + * 门牌序号(楼栋起始楼层) + */ + private Integer roomIndex; + + /** + * 容纳人数 + */ + private Integer capacity; + + /** + * 父Id + */ + private Long parentId; + + /** + * 备注 + */ + private String remark; + + /** + * 居民姓名 + */ + private String customerName; + + /** + * 是否脱敏 true脱敏,敏感信息加***隐藏;false完整显示 + */ + private Boolean isViewFullData; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/AuthGroupInfo.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/AuthGroupInfo.java new file mode 100644 index 00000000..7f15854e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/AuthGroupInfo.java @@ -0,0 +1,41 @@ +package by.dimp.web.model.entity.E8; + +import lombok.Data; + +import java.util.List; + +/** + * @author zcxlsm + * @title: AuthGroupInfo + * @date 2025/5/9 17:50 + */ +@Data +public class AuthGroupInfo { + + /** + * id int64 Y 门/电梯ID + * type int32 Y 类型 0:门 1:电梯 + * gatewayType int32 Y 出入口类型 0:未知 1:入口 2:出口 + * floors List N 楼层权限 + */ + + /** + * 门/电梯ID + */ + private Long id; + + /** + * 类型 0:门 1:电梯 + */ + private Integer type; + + /** + * 出入口类型 0:未知 1:入口 2:出口 + */ + private Integer gatewayType; + + /** + * 楼层权限 + */ + private List floors; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/CustomerDetailInfo.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/CustomerDetailInfo.java new file mode 100644 index 00000000..5b265b59 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/CustomerDetailInfo.java @@ -0,0 +1,136 @@ +package by.dimp.web.model.entity.E8; + +import lombok.Data; + +/** + * @author zcxlsm + * @title: CustomerDetailInfo + * @date 2025/5/8 17:24 + */ +@Data +public class CustomerDetailInfo { + /** + * 主键 + */ + private Long id; + + /** + * 创建时间 + */ + private String creationTime; + + /** + * 创建人 + */ + private String creator; + + /** + * 最后修改时间 + */ + private String lastModificationTime; + + /** + * 最后修改人 + */ + private String lastModifier; + + /** + * 删除人 + */ + private String deleter; + + /** + * 删除时间 + */ + private String deletionTime; + + /** + * 客户Id + */ + private Long customerId; + + /** + * 工号 + */ + private String workNo; + + /** + * 最高学历 + */ + private Integer education; + + /** + * 毕业学校 + */ + private String school; + + /** + * 专业 + */ + private String master; + + /** + * 政治面貌 + */ + private String politics; + + /** + * 婚姻状况 + */ + private Integer marriage; + + /** + * QQ + */ + private String qq; + + /** + * 微信 + */ + private String wechat; + + /** + * 驾驶证号 + */ + private String driverLicense; + + /** + * 驾驶证号 (脱敏) + */ + private String driverLicense1; + + /** + * 是否忽略反潜回(1:是;0:否) + */ + private Integer isIgnoreEntryBack; + + /** + * 是否忽略门时区(1:是;0:否) + */ + private Integer isIgnoreDoorSchedule; + + /** + * 是否忽略互锁(1:是;0:否) + */ + private Integer isIgnoreLock; + + /** + * 是否忽略报警(1:是;0:否) + */ + private Integer isIgnoreAlarm; + + /** + * 是否发行卡凭证(0:未录入;1:未发行;2:已发行) + */ + private Integer isIssue; + + /** + * 是否忽略人时区(1:是;0:否) + */ + private Integer isIgnorePersonSchedule; + + /** + * 是否黑名单人员(1:是;0:否) + */ + private Integer isBlacklist; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/CustomerInfo.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/CustomerInfo.java new file mode 100644 index 00000000..98ed3b67 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/CustomerInfo.java @@ -0,0 +1,161 @@ +package by.dimp.web.model.entity.E8; + +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @author zcxlsm + * @title: CustomerInfo + * @date 2025/5/8 17:23 + */ +@Data +public class CustomerInfo { + + /** + * 主键 + */ + private Long id; + + /** + * 人员编号 + */ + private String no; + + /** + * 客户姓名 + */ + private String name; + + /** + * 证件类型,0身份证,1驾驶证,2工作证,100其他 + */ + private Integer identityType; + + /** + * 证件号码 + */ + private String identityNo; + + /** + * 籍贯 + */ + private String hometown; + + /** + * 出生日期 + */ + private String birthday; + + /** + * 住址 + */ + private String address; + + /** + * 性别,0女,1男 + */ + private Integer gender; + + /** + * 职务 + */ + private String duty; + + /** + * 房间号 + */ + private String roomNo; + + /** + * 入职时间 + */ + private Date enterTime; + + /** + * 手机号码 + */ + private String mobile; + + /** + * 电子邮件 + */ + private String email; + + /** + * 紧急联系人 + */ + private String emergencyContact; + + /** + * 紧急联系人电话 + */ + private String emergencyContactPhone; + + /** + * 备注信息 + */ + private String remark; + + /** + * 区域ID(以;分隔) + */ + private String areaIds; + + /** + * 区域全路径(多个以;分割,层级以|分割) + */ + private String areaFullPath; + + /** + * 组织ID(以;分隔) + */ + private String organIds; + + /** + * 组织全路径(多个以;分割,层级以|分割) + */ + private String organFullPath; + + /** + * 车牌号码 + */ + private String carNos; + + /** + * 人员图片 + */ + private String image; + + /** + * 指纹索引,0-9,0-左手大拇指,4-左手小指,……,9-右手小指 + */ + private String fingerNo; + + /** + * 指纹信息 多个以“;”分隔 + */ + private String fingerData; + + /** + * 是否为特殊车牌 + */ + private Boolean isSpecialPlate; + + /** + * 客户关联的车辆信息列表 + */ + private List vehicleInfos; + + /** + * 客户关联的区域信息列表 + */ + private List relAreas; + + /** + * 客户详细信息 + */ + private CustomerDetailInfo detail; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/DoorDeviceInfo.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/DoorDeviceInfo.java new file mode 100644 index 00000000..65781dc5 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/DoorDeviceInfo.java @@ -0,0 +1,247 @@ +package by.dimp.web.model.entity.E8; + +import lombok.Data; + +import java.util.List; + +/** + * @author zcxlsm + * @title: DoorDeviceInfo + * @date 2025/5/8 17:56 + */ +@Data +public class DoorDeviceInfo { + + /** + * 主键 + */ + private Long id; + + /** + * 创建时间 + */ + private String creationTime; + + /** + * 创建人 + */ + private String creatorId; + + /** + * 最后修改时间 + */ + private String lastModificationTime; + + /** + * 最后修改人 + */ + private String lastModifierId; + + /** + * 是否删除 + */ + private Boolean isDeleted; + + /** + * 删除人 + */ + private String deleterId; + + /** + * 删除时间 + */ + private String deletionTime; + + /** + * 设备编号 + */ + private String no; + + /** + * 设备编号序列号 + */ + private Integer noCode; + + /** + * 设备对接平台的ID + */ + private String cloudId; + + /** + * 设备名称 + */ + private String name; + + /** + * 父设备ID + */ + private Long parentId; + + /** + * 父设备名称 + */ + private String parentName; + + /** + * 管理机IP + */ + private String masterIp; + + /** + * 设备IP + */ + private String ip; + + /** + * 设备端口 + */ + private Integer port; + + /** + * 设备MAC + */ + private String mac; + + /** + * 子网掩码 + */ + private String netMask; + + /** + * 设备网关 + */ + private String gatewayIP; + + /** + * 设备产品线类型 + * 0:车行 1:车位 2:人行 + */ + private Integer productType; + + /** + * 设备类型 + * 2201:一体式门禁 2202:分体式门禁 2203:人脸门禁 2204:梯控 2207:人脸盒子终端 + * 2208:人脸盒子面板机 2209:一体式读头 2211:梯控读头 2102:电子哨兵 + */ + private Integer type; + + /** + * 设备类型描述 + */ + private String typeDescription; + + /** + * 业务逻辑设备类 + */ + private Integer logicType; + + /** + * 设备型号 + */ + private Integer model; + + /** + * 设备型号 + */ + private String modelDescription; + + /** + * 设备型号名称 + */ + private String modelName; + + /** + * 设备序列号 + */ + private String sn; + + /** + * 设备CPUID + */ + private String cpuID; + + /** + * 设备状态 0:未认证 1:非本项目设备 2:非本项目设备 3:认证失败 4:认证成功 5:无需认证 + */ + private Integer status; + + /** + * 设备状态:0:未认证 1:非本项目设备 2:非官方设备;3:是密钥系统认证失败 4:认证成功 5 无需认证 + */ + private String statusDescription; + + /** + * 机号 + */ + private String macNo; + + /** + * 蓝牙地址 + */ + private String bluetoothAddr; + + /** + * 设备关联的区域组ID + */ + private Integer deviceGroupId; + + /** + * 设备层级 + */ + private Integer deviceLevel; + + /** + * 父级设备路径ID列表 + */ + private String parentIdPath; + + /** + * 设备是否需要系统升级 + */ + private Boolean isNeedUpgrade; + + /** + * 项目ID + */ + private Integer projectId; + + /** + * 关联门 + */ + private String relDoors; + + /** + * 出入口类型 0:未知 1:入口 2:出口 + */ + private Integer gatewayType; + + /** + * 出入口类型 + */ + private String gatewayTypeDesc; + + /** + * 备注 + */ + private String remark; + + /** + * 子设备列表 + */ + private List childList; + + /** + * 设备通讯方式 0:TCP/IP 1:RS485 + */ + private Integer commType; + + /** + * 工单号(设备搜索) + */ + private String projectNumber; + + /** + * 固件版本信息(设备搜索) + */ + private String version; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/FloorInfo.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/FloorInfo.java new file mode 100644 index 00000000..3076d58d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/FloorInfo.java @@ -0,0 +1,56 @@ +package by.dimp.web.model.entity.E8; + +import lombok.Data; + +/** + * @author zcxlsm + * @title: FloorInfo + * @date 2025/5/9 17:51 + */ +@Data +public class FloorInfo { + /** + * floorId int64 N 楼层权限标识 + * floorName string N 楼层名称 + * isFrontDoor bool N 是否前门可用 + * isBackDoor bool N 是否后门可用 + * isSelectFrontDoor bool N 是否选择前门 + * isSelectBackDoor bool N 是否选择后门 + * isCommonFloor bool N 是否公共门 + */ + + /** + * 楼层权限标识 + */ + private Long floorId; + + /** + * 楼层名称 + */ + private String floorName; + + /** + * 是否前门可用 + */ + private Boolean isFrontDoor; + + /** + * 是否后门可用 + */ + private Boolean isBackDoor; + + /** + * 是否选择前门 + */ + private Boolean isSelectFrontDoor; + + /** + * 是否选择后门 + */ + private Boolean isSelectBackDoor; + + /** + * 是否公共门 + */ + private Boolean isCommonFloor; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/LiftInfo.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/LiftInfo.java new file mode 100644 index 00000000..4e3da63e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/LiftInfo.java @@ -0,0 +1,33 @@ +package by.dimp.web.model.entity.E8; + +import lombok.Data; + +/** + * @author zcxlsm + * @title: LiftInfo + * @date 2025/5/9 11:49 + */ +@Data +public class LiftInfo { + + /** + * 主键 + */ + private Integer id; + + /** + * 名称 + */ + private String name; + + /** + * 区域ID + */ + private Integer areaId; + + /** + * 备注 + */ + private String remark; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/VehicleInfo.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/VehicleInfo.java new file mode 100644 index 00000000..7f185a29 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/E8/VehicleInfo.java @@ -0,0 +1,81 @@ +package by.dimp.web.model.entity.E8; + +import lombok.Data; + +/** + * @author zcxlsm + * @title: VehicleInfo + * @date 2025/5/8 17:26 + */ +@Data +public class VehicleInfo { + /** + * 主键 + */ + private Long id; + + /** + * 创建时间 + */ + private String creationTime; + + /** + * 创建人 + */ + private String creatorId; + + /** + * 最后修改时间 + */ + private String lastModificationTime; + + /** + * 最后修改人 + */ + private String lastModifierId; + + /** + * 是否删除 + */ + private Boolean isDeleted; + + /** + * 删除人 + */ + private String deleterId; + + /** + * 删除时间 + */ + private String deletionTime; + + /** + * 客户ID + */ + private Long customerId; + + /** + * 车牌号码 + */ + private String plateNO; + + /** + * 车牌类型 0:其他 1:蓝牌 2:黄牌 3:白牌 4:黑牌 5:绿牌 6:黄绿牌 + */ + private Integer plateColor; + + /** + * 车辆类型 0:小型车 1:大型车 2:其它 3:摩托车 + */ + private Integer type; + + /** + * 车辆状态 0:未发证 1:已发证 + */ + private Integer status; + + /** + * 车辆品牌 + */ + private String carLogo; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbCeremonialServe.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbCeremonialServe.java new file mode 100644 index 00000000..d1984ad5 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbCeremonialServe.java @@ -0,0 +1,93 @@ +package by.dimp.web.model.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** +* +* @TableName tb_ceremonial_serve +*/ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class TbCeremonialServe implements Serializable { + + /** + * id + */ + private Integer id; + /** + * 预订id + */ + private Integer roomBookId; + /** + * 服务数量 + */ + private Integer serveNum; + /** + * 服务类型 + */ + private Integer serveType; + /** + * 产品名称 + */ + private String serveName; + /** + * 预订状态(0:待确认,1:已确认,2:已取消,3:已完成) + */ + private Integer serveStatus; + /** + * 创建时间 + */ + private Date createTime; + /** + * 创建人 + */ + private String createBy; + /** + * 创建人id + */ + private Integer createById; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 更新人 + */ + private String updateBy; + /** + * 更新人id + */ + private Integer updateById; + /** + * 确认人id + */ + private Integer confirmId; + /** + * 服务开始时间 + */ + private Date beginTime; + /** + * 服务结束时间 + */ + private Date endTime; + /** + * 服务总价格 + */ + private BigDecimal servePrice; + /** + * 数据状态(模拟删除 0:删除 1:未删除) + */ + private Integer dataStauts; + /** + * 产品图片 + */ + private String serveImage; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbCeremonialserveRoombooking.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbCeremonialserveRoombooking.java new file mode 100644 index 00000000..6ba90a5d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbCeremonialserveRoombooking.java @@ -0,0 +1,36 @@ +package by.dimp.web.model.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** +* +* @TableName tb_ceremonialserve_roombooking +*/ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TbCeremonialserveRoombooking implements Serializable { + + /** + * id + */ + private Integer id; + /** + * 服务id + */ + private Integer ceremonialServeId; + /** + * 预订id + */ + private Integer roomBookingId; + /** + * 服务和预订总价格 + */ + private BigDecimal totalPrice; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbCleaningIndicators.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbCleaningIndicators.java new file mode 100644 index 00000000..07aa0d75 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbCleaningIndicators.java @@ -0,0 +1,101 @@ +package by.dimp.web.model.entity; + +import com.baomidou.mybatisplus.annotation.*; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +/** + *

+ * + *

+ * + * @author lxj + * @since 2025-04-28 + */ +@Data +@TableName("tb_cleaning_Indicators") +public class TbCleaningIndicators implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键id + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 指标项名称 + */ + @TableField("metric_name") + private String metricName; + + /** + * 指标标准值 + */ + @TableField("standard_value") + private BigDecimal standardValue; + + /** + * 指标上限 + */ + @TableField("upper_limit") + private BigDecimal upperLimit; + + /** + * 指标下限 + */ + @TableField("lower_limit") + private BigDecimal lowerLimit; + + /** + * 描述 + */ + @TableField("description") + private String description; + + /** + * 数据状态:1有效,0无效 + */ + @TableField("data_state") + @TableLogic + private Integer dataState; + + /** + * 创建人 + */ + @TableField("create_emp_id") + private String createEmpId; + + /** + * 创建人名称 + */ + @TableField("create_emp_name") + private String createEmpName; + + /** + * 创建时间 + */ + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 修改人 + */ + @TableField("modify_emp_id") + private String modifyEmpId; + + /** + * 修改人名称 + */ + @TableField("modify_emp_name") + private String modifyEmpName; + + /** + * 修改时间 + */ + @TableField("modify_time") + private LocalDateTime modifyTime; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbConference.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbConference.java new file mode 100644 index 00000000..435919e2 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbConference.java @@ -0,0 +1,126 @@ +package by.dimp.web.model.entity; + + +import com.baomidou.mybatisplus.annotation.TableLogic; +import jakarta.annotation.security.DenyAll; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +@Data +@AllArgsConstructor +@NoArgsConstructor +/** +* +* @TableName tb_conference +*/ +public class TbConference implements Serializable { + + /** + * id + */ + private Integer id; + /** + * 会议室名称 + */ + private String roomName; + /** + * 会议室编号 + */ + private Integer roomNo; + /** + * 会议室位置 + */ + private String roomLocation; + /** + * 会议室面积 + */ + private String roomArea; + /** + * 会议室类型 + */ + private String roomType; + /** + * 会议室容纳人数 + */ + private Integer roomNumber; + /** + * 创建时间 + */ + private Date createTime; + /** + * 创建人 + */ + private String createBy; + /** + * 创建人id + */ + private Integer createById; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 更新人 + */ + private String updateBy; + /** + * 更新人id + */ + private Integer updateById; + /** + * 会议室配套设施 + */ + private String roomFacilities; + /** + * 会议室价格类型(0:免费,1付费,2:面议) + */ + private Integer feeType; + /** + * 费用金额 + */ + private BigDecimal feePrice; + /** + * 数据状态(模拟删除 0:未删除 1:删除) + */ + @TableLogic + private Integer dataStatus; + /** + * 负责人 + */ + private String responsiblePerson; + /** + * 联系电话 + */ + private Integer contactNumber; + /** + * 会议室照片 + */ + private String pictures; + /** + * 会议室描述 + */ + private String description; + /** + * 是否需要审核(0:需要审核,1:不需要审核) + */ + private Integer review; + /** + * 启用状态(0:禁用,1:启用) + */ + private Integer enabledStatus; + /** + * 开放星期(1:星期一,2:星期二) + */ + private Integer openingWeek; + /** + * 开放时间 + */ + private Date openingHours; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbRoomBooking.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbRoomBooking.java new file mode 100644 index 00000000..f79395b8 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbRoomBooking.java @@ -0,0 +1,129 @@ +package by.dimp.web.model.entity; + + +import com.baomidou.mybatisplus.annotation.TableLogic; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +import java.time.LocalDateTime; +import java.util.Date; + +@Data +@NoArgsConstructor +@AllArgsConstructor +/** +* +* @TableName tb_room_booking +*/ +public class TbRoomBooking implements Serializable { + + /** + * id + */ + private Integer id; + /** + * 会议室id + */ + private Integer tbConferenceId; + /** + * 预约状态(0:未预定 1:使用中 2:已预订) + */ + private Integer bookingStatus; + /** + * 审核状态(0:未审核 1:通过 2:未通过) + */ + private Integer reviewStatus; + /** + * 会议预订人 + */ + private String bookingName; + /** + * 使用单位 + */ + private String userUnit; + /** + * 会议主题 + */ + private String conferenceTheme; + /** + * 预约日期 + */ + private Date appointmentDate; + /** + * 预约开始时段 + */ + private LocalDateTime appointmentBeginTime; + /** + * 预约结束时段 + */ + private LocalDateTime appointmentEndTime; + /** + * 参会人员 + */ + private String attendeesName; + /** + * 参会人数 + */ + private Integer approverCount; + /** + * 签到开始时间 + */ + private LocalDateTime checkInStartTime; + /** + * 签到结束时间 + */ + private LocalDateTime checkInEndTime; + /** + * 审批人 + */ + private String approver; + /** + * 审批时间 + */ + private LocalDateTime approverTime; + /** + * 评价 + */ + private String evaluate; + /** + * 备注 + */ + private String remark; + /** + * 是否需要增值服务(0:需要,1:不需要) + */ + private Integer addServices; + /** + * 创建人id + */ + private Integer createById; + /** + * 创建人 + */ + private String createBy; + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 更新人id + */ + private Integer updateById; + /** + * 更新人 + */ + private String updateBy; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + /** + * 数据状态(模拟删除 0:未删除 1:删除) + */ + @TableLogic + private Integer dataStatus; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbServiceClassification.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbServiceClassification.java new file mode 100644 index 00000000..96207ccf --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbServiceClassification.java @@ -0,0 +1,71 @@ +package by.dimp.web.model.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.Date; +import java.util.List; + +/** +* +* @TableName tb_service_classification +*/ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TbServiceClassification implements Serializable { + + /** + * id + */ + private Integer id; + /** + * 分类 + */ + @Length(max= 64,message="编码长度不能超过64") + private String type; + /** + * 分类名称 + */ + @Length(max= 64,message="编码长度不能超过64") + private String name; + /** + * 排序 + */ + private Integer sort; + /** + * 分类状态(0:禁用,1:启用) + */ + private Integer status; + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 创建人 + */ + private String createBy; + /** + * 创建人id + */ + private Integer createById; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + /** + * 更新人 + */ + private String updateBy; + /** + * 更新人id + */ + private Integer updateById; + + private List ceremonialServeList; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbVisitorManagement.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbVisitorManagement.java new file mode 100644 index 00000000..1bbf82f5 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/model/entity/TbVisitorManagement.java @@ -0,0 +1,108 @@ +package by.dimp.web.model.entity; + +import ch.qos.logback.core.joran.spi.NoAutoStart; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.hibernate.validator.constraints.Length; + +import java.io.Serializable; +import java.time.LocalDateTime; +import java.util.Date; + +/** + * @TableName tb_visitor_management + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class TbVisitorManagement implements Serializable { + + /** + * id + */ + private Integer id; + /** + * 访客姓名 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String visitorName; + /** + * 访客电话 + */ + private Integer visitorPhone; + + /** + * 身份证号 + */ + private String identityCard; + /** + * 拜访事由 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String visitingReason; + + + + + /** + * 拜访开始时间 + */ + private LocalDateTime visitingBeginTime; + /** + * 拜访结束时间 + */ + private LocalDateTime visitingEndTime; + /** + * 预约车位 + */ + private Integer bookingParkingSpace; + /** + * 车牌号 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String licensePlate; + /** + * 人脸图片 + */ + @Length(max = 256, message = "编码长度不能超过256") + private String facePictures; + + /** + * 验证码 + */ + private String verificationCode; + + /** + * 预约状态(0:待审核,1:待访问,2:已取消,3:已完成) + */ + private int serveStatus; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 创建人 + */ + @Length(max = 64, message = "编码长度不能超过64") + private String createBy; + /** + * 创建人id + */ + private Long createById; + /** + * 更新时间 + */ + private LocalDateTime updateTime; + /** + * 更新人 + */ + @Length(max = 64, message = "编码长度不能超过64") + private String updateBy; + /** + * 更新人id + */ + private Long updateById; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/AreaService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/AreaService.java new file mode 100644 index 00000000..5c53e886 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/AreaService.java @@ -0,0 +1,53 @@ +package by.dimp.web.service.E8Service.base; + +import by.dimp.web.model.entity.E8.AreaInfo; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * @author zcxlsm + * @title: AreaService + * @date 2025/5/9 15:22 + */ +public interface AreaService { + + /** + * 查询区域信息 + * + * @param dto 传参 + * @return ApiResp + */ + AreaInfo getAreaInfo(QueryDto dto); + + /** + * 获取区域列表 + * + * @param dto 传参 + * @return ApiResp + */ + IPage getAreaList(QueryDto dto); + + /** + * 新增区域 + * + * @param dto 传参 + * @return ApiResp + */ + Boolean addArea(QueryDto dto); + + /** + * 修改区域 + * + * @param dto 传参 + * @return ApiResp + */ + Boolean updateArea(QueryDto dto); + + /** + * 删除区域 + * + * @param dto 传参 + * @return ApiResp + */ + Boolean deleteArea(QueryDto dto); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/AuthGroupService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/AuthGroupService.java new file mode 100644 index 00000000..6c508fc8 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/AuthGroupService.java @@ -0,0 +1,50 @@ +package by.dimp.web.service.E8Service.base; + + +import by.dimp.web.model.entity.E8.AuthGroupInfo; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * @author zcxlsm + * @title: AuthGroupService + * @date 2025/5/9 17:48 + */ +public interface AuthGroupService { + + /** + * 权限组分页查询 + * + * @param dto + * @return ApiResp + * @implNote 通过接口查询权限组列表信息,支持按权限组名称查询门禁权限和梯控权限 + */ + IPage getPageList(QueryDto dto); + + /** + * 添加权限组 + * + * @param dto + * @return ApiResp + * @implNote 通过接口新增权限组(门+电梯权限),仅支持单个新增 + */ + Boolean addAuthGroup(QueryDto dto); + + /** + * 修改权限组 + * + * @param dto + * @return ApiResp + * @implNote 通过接口修改权限组的门/电梯权限 + */ + Boolean updateAuthGroup(QueryDto dto); + + /** + * 根据主键ID删除权限组 + * + * @param dto + * @return ApiResp + * @implNote 通过接口删除权限组信息 + */ + Boolean deleteAuthGroup(QueryDto dto); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/CustomerService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/CustomerService.java new file mode 100644 index 00000000..76b2b72d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/CustomerService.java @@ -0,0 +1,53 @@ +package by.dimp.web.service.E8Service.base; + +import by.dimp.web.model.entity.E8.CustomerInfo; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * @author zcxlsm + * @title: CustomerService + * @date 2025/5/9 14:49 + */ +public interface CustomerService { + + /** + * 查询单个人员信息 + * + * @param dto + * @return ApiResp + */ + CustomerInfo selectCustomer(QueryDto dto); + + /** + * 人员信息分页查询 + * + * @param dto + * @return ApiResp + */ + IPage selectCustomerList(QueryDto dto); + + /** + * 新增人员信息 + * + * @param dto + * @return ApiResp + */ + Boolean addCustomer(QueryDto dto); + + /** + * 人员信息修改 + * + * @param dto + * @return ApiResp + */ + Boolean updateCustomer(QueryDto dto); + + /** + * 删除人员信息 + * + * @param dto + * @return ApiResp + */ + Boolean deleteCustomer(QueryDto dto); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/DoorDeviceService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/DoorDeviceService.java new file mode 100644 index 00000000..7696ea08 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/DoorDeviceService.java @@ -0,0 +1,53 @@ +package by.dimp.web.service.E8Service.base; + +import by.dimp.web.model.entity.E8.DoorDeviceInfo; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * @author zcxlsm + * @title: DoorDeviceService + * @date 2025/5/9 18:05 + */ +public interface DoorDeviceService { + + /** + * 查询门禁信息 + * + * @param dto 入参 + * @return DoorDeviceInfo + */ + DoorDeviceInfo selectDoorDevice(QueryDto dto); + + /** + * 门禁信息分页查询 + * + * @param dto 入参 + * @return IPage + */ + IPage selectDoorDeviceList(QueryDto dto); + + /** + * 新增门禁信息 + * + * @param dto 入参 + * @return Boolean + */ + Boolean addDoorDevice(QueryDto dto); + + /** + * 门禁信息修改 + * + * @param dto 入参 + * @return Boolean + */ + Boolean updateDoorDevice(QueryDto dto); + + /** + * 删除门禁信息 + * + * @param dto 入参 + * @return Boolean + */ + Boolean deleteDoorDevice(QueryDto dto); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/LiftService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/LiftService.java new file mode 100644 index 00000000..334b8ed8 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/LiftService.java @@ -0,0 +1,53 @@ +package by.dimp.web.service.E8Service.base; + +import by.dimp.web.model.entity.E8.LiftInfo; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * @author zcxlsm + * @title: LiftService + * @date 2025/5/9 18:04 + */ +public interface LiftService { + + /** + * 电梯信息分页查询 + * + * @param dto + * @return IPage + */ + IPage getPageList(QueryDto dto); + + /** + * 查询电梯楼层 + * + * @param dto + * @return LiftInfo + */ + LiftInfo getLiftFloor(QueryDto dto); + + /** + * 添加电梯 + * + * @param dto + * @return Boolean + */ + Boolean addLift(QueryDto dto); + + /** + * 修改电梯信息 + * + * @param dto + * @return Boolean + */ + Boolean updateLift(QueryDto dto); + + /** + * 删除电梯信息 + * + * @param dto + * @return Boolean + */ + Boolean deleteLift(QueryDto dto); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/AreaServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/AreaServiceImpl.java new file mode 100644 index 00000000..18ed8e34 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/AreaServiceImpl.java @@ -0,0 +1,155 @@ +package by.dimp.web.service.E8Service.base.impl; + +import by.dimp.web.service.E8Service.base.AreaService; +import by.dimp.web.model.domain.E8.general.QueryDto; +import by.dimp.web.model.domain.E8.general.ApiResp; +import by.dimp.web.model.entity.E8.AreaInfo; +import by.dimp.web.utils.E8ApiUtils; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * @author zcxlsm + * @title: AreaServiceImpl + * @date 2025/5/9 9:27 + */ +@Service +public class AreaServiceImpl implements AreaService { + + private static final String AREA_GET_BY_ID = "/api/E8/area/{id}"; + private static final String GET_AREA_LIST = "/api/E8/area/get-area-list"; + private static final String ADD_AREA = "/api/E8/area"; + private static final String UPDATE_AREA = "/api/E8/area/{id}/update"; + private static final String DELETE_AREA = "/api/E8/area/{id}"; + + @Resource + private E8ApiUtils e8ApiUtils; + + /** + * 查询区域信息 + * + * @param dto 传参 + * @return AreaInfo + */ + @Override + public AreaInfo getAreaInfo(QueryDto dto) { + // 将查询DTO转换为AreaInfo对象,用于获取区域信息 + AreaInfo areaInfo = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), AreaInfo.class); + + // 构造获取区域信息的API路径,替换路径中的{id}为实际的区域ID + String api = AREA_GET_BY_ID.replace("{id}", areaInfo.getAreaId().toString()); + + // 调用API接口,发送GET请求获取区域信息 + ApiResp apiResp = e8ApiUtils.doGetOrDel(api, null); + + // 检查API响应是否成功 + if (!apiResp.getSuccess()) { + return null; + } + + // 将API响应结果转换为AreaInfo对象并返回 + return JSONUtil.toBean(apiResp.getResult().toString(), AreaInfo.class); + } + + /** + * 获取区域列表 + * + * @param dto 传参 + * @return IPage + */ + @Override + public IPage getAreaList(QueryDto dto) { + // 将查询DTO转换为Map对象,以便作为API请求的参数 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + + // 调用第三方API获取区域列表 + ApiResp apiResp = e8ApiUtils.doPost(params, GET_AREA_LIST); + + // 检查API响应是否成功 + if (!apiResp.getSuccess()) { + return null; + } + + // 将API响应结果转换为Map对象,以便进一步处理 + Map result = JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), Map.class); + + // 初始化Page对象,用于存储区域信息 + IPage pageInfo = new Page<>(); + // 设置总记录数 + pageInfo.setTotal(Long.parseLong(result.get("total").toString())); + // 设置区域信息列表 + pageInfo.setRecords(JSONUtil.toList(JSONUtil.toJsonStr(result.get("item")), AreaInfo.class)); + + // 返回存储区域信息的Page对象 + return pageInfo; + } + + /** + * 新增区域 + * + * @param dto 传参 + * @return Boolean + */ + @Override + public Boolean addArea(QueryDto dto) { + // 将查询DTO转换为JSON字符串,然后解析到Map对象中,以备后续API调用使用 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + + // 执行API调用,传递转换后的参数和指定的API端点,此处API端点为ADD_AREA + ApiResp apiResp = e8ApiUtils.doPost(params, ADD_AREA); + + // 返回API调用是否成功的标志 + return apiResp.getSuccess(); + } + + /** + * 修改区域 + * + * @param dto 传参 + * @return Boolean + */ + @Override + public Boolean updateArea(QueryDto dto) { + // 将查询DTO转换为AreaInfo对象,用于后续的区域信息更新 + AreaInfo areaInfo = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), AreaInfo.class); + + // 构造更新区域信息的API路径,{id}将被具体的区域ID替换 + String api = UPDATE_AREA.replace("{id}", areaInfo.getAreaId().toString()); + + // 将AreaInfo对象转换为Map,以便将其作为API请求的参数 + Map params = BeanUtil.beanToMap(areaInfo); + + // 调用API工具类的POST方法,发送更新请求,并获取API响应对象 + ApiResp apiResp = e8ApiUtils.doPost(params, api); + + // 返回API调用是否成功的标志 + return apiResp.getSuccess(); + } + + /** + * 删除区域 + * + * @param dto 传参 + * @return Boolean + */ + public Boolean deleteArea(QueryDto dto) { + // 将查询DTO转换为AreaInfo对象,用于获取区域信息 + AreaInfo areaInfo = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), AreaInfo.class); + + // 构造删除区域的API路径,替换{id}为实际的区域ID + String api = DELETE_AREA.replace("{id}", areaInfo.getAreaId().toString()); + + // 调用API工具类的删除方法,执行删除操作 + ApiResp apiResp = e8ApiUtils.doGetOrDel(api, null); + + // 返回删除操作是否成功的标志 + return apiResp.getSuccess(); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/AuthGroupServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/AuthGroupServiceImpl.java new file mode 100644 index 00000000..289ed662 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/AuthGroupServiceImpl.java @@ -0,0 +1,132 @@ +package by.dimp.web.service.E8Service.base.impl; + +import by.dimp.web.model.entity.E8.AuthGroupInfo; +import by.dimp.web.service.E8Service.base.AuthGroupService; +import by.dimp.web.model.domain.E8.general.QueryDto; +import by.dimp.web.model.domain.E8.general.ApiResp; +import by.dimp.web.utils.E8ApiUtils; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author zcxlsm + * @title: AuthGroupServiceImpl + * @date 2025/5/8 17:34 + */ +@Service +public class AuthGroupServiceImpl implements AuthGroupService { + + private static final String GET_PAGE_LIST = "/api/E8Door/man-auth-group/get-page-list"; + private static final String AUTH_GROUP_ADD = "/api/E8Door/man-auth-group"; + private static final String AUTH_GROUP_UPDATE = "/api/E8Door/man-auth-group/{id}/update"; + private static final String AUTH_GROUP_DELETE = "/api/E8Door/man-auth-group/{id}"; + + @Resource + private E8ApiUtils e8ApiUtils; + + /** + * 权限组分页查询 + * + * @param dto 入参 + * @return ApiResp + * @implNote 通过接口查询权限组列表信息,支持按权限组名称查询门禁权限和梯控权限 + */ + @Override + public IPage getPageList(QueryDto dto) { + // 创建一个参数映射,用于存储API请求所需的参数 + Map params = new HashMap<>(); + // 将页码信息添加到参数映射中 + params.put("pageIndex", dto.getPageIndex()); + // 将最大结果数添加到参数映射中 + params.put("maxResultCount", dto.getMaxResultCount()); + // 将查询DTO转换为JSON字符串,再转换为Map对象,并添加到参数映射中 + params.put("queryDto", JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class)); + + // 调用API工具类的POST方法,传入参数和API路径,获取API响应对象 + ApiResp apiResp = e8ApiUtils.doPost(params, GET_PAGE_LIST); + // 如果API响应不成功,则返回null + if (!apiResp.getSuccess()) { + return null; + } + + // 将API响应的结果转换为JSON字符串,再转换为Map对象,以便于后续处理 + Map result = JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), Map.class); + + // 创建一个分页信息对象,传入页码和最大结果数 + IPage pageInfo = new Page<>(dto.getPageIndex(), dto.getMaxResultCount()); + // 设置总记录数 + pageInfo.setTotal(Long.parseLong(result.get("total").toString())); + // 将结果中的项转换为JSON字符串,再转换为AuthGroupInfo对象列表,并设置到分页信息中 + pageInfo.setRecords(JSONUtil.toList(JSONUtil.toJsonStr(result.get("item")), AuthGroupInfo.class)); + + // 返回分页信息对象 + return pageInfo; + } + + /** + * 添加权限组 + * + * @param dto 入参 + * @return ApiResp + * @implNote 通过接口新增权限组(门+电梯权限),仅支持单个新增 + */ + @Override + public Boolean addAuthGroup(QueryDto dto) { + // 将查询对象转换为JSON字符串,然后解析到一个Map对象中,以便作为API请求的参数 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + + // 调用第三方API进行授权组添加操作 + ApiResp apiResp = e8ApiUtils.doPost(params, AUTH_GROUP_ADD); + + // 返回操作是否成功的标识 + return apiResp.getSuccess(); + + } + + /** + * 修改权限组 + * + * @param dto 入参 + * @return ApiResp + * @implNote 通过接口修改权限组的门/电梯权限 + */ + @Override + public Boolean updateAuthGroup(QueryDto dto) { + // 将查询对象转换为Map类型参数,以便于后续API调用 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + // 构造更新授权组的URL,其中{id}将被参数中的id值替换 + String url = AUTH_GROUP_UPDATE.replace("{id}", params.get("id").toString()); + // 发起API调用,传递参数和构造好的URL,并获取API响应对象 + ApiResp apiResp = e8ApiUtils.doPost(params, url); + // 返回API调用是否成功的标志 + return apiResp.getSuccess(); + + } + + /** + * 根据主键ID删除权限组 + * + * @param dto 入参 + * @return ApiResp + * @implNote 通过接口删除权限组信息 + */ + @Override + public Boolean deleteAuthGroup(QueryDto dto) { + // 将查询对象转换为Map类型参数,以便于后续操作 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + // 构造删除授权组的URL,其中{id}将被参数中的id值替换 + String url = AUTH_GROUP_DELETE.replace("{id}", params.get("id").toString()); + // 调用API进行删除操作,传入构造的URL和null作为第二个参数(因为此操作不需要额外参数) + ApiResp apiResp = e8ApiUtils.doGetOrDel(url, null); + // 返回API调用是否成功的标志 + return apiResp.getSuccess(); + + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/CustomerServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/CustomerServiceImpl.java new file mode 100644 index 00000000..9730b144 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/CustomerServiceImpl.java @@ -0,0 +1,154 @@ +package by.dimp.web.service.E8Service.base.impl; + +import by.dimp.web.service.E8Service.base.CustomerService; +import by.dimp.web.model.domain.E8.general.QueryDto; +import by.dimp.web.model.domain.E8.general.ApiResp; +import by.dimp.web.model.entity.E8.CustomerInfo; +import by.dimp.web.utils.E8ApiUtils; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author zcxlsm + * @title: CustomerServiceImpl + * @date 2025/5/8 17:31 + */ +@Service +public class CustomerServiceImpl implements CustomerService { + private final static String CUSTOMER_GET_PAGE_LIST = "/api/E8/customer/get-page-list"; + private final static String CUSTOMER_GET_FIRST_OR_DEFAULT = "/api/E8/customer/get-first-or-default"; + private final static String CUSTOMER_CREATE = "/api/E8/customer"; + private final static String CUSTOMER_UPDATE = "/api/E8/customer/{id}/update"; + private final static String CUSTOMER_DELETE = "/api/E8/customer/{id}"; + + @Resource + private E8ApiUtils e8ApiUtils; + + /** + * 查询单个人员信息 + * + * @param dto 传参 + * @return CustomerInfo + */ + @Override + public CustomerInfo selectCustomer(QueryDto dto) { + // 将查询DTO转换为Map参数,以便进行API请求 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + + // 调用API接口获取客户信息 + ApiResp apiResp = e8ApiUtils.doPost(params, CUSTOMER_GET_FIRST_OR_DEFAULT); + + // 检查API响应是否成功 + if (!apiResp.getSuccess()) { + // 如果API调用失败,返回null + return null; + } + + // 将API响应结果转换为CustomerInfo对象并返回 + return JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), CustomerInfo.class); + } + + /** + * 人员信息分页查询 + * + * @param dto 传参 + * @return IPage + */ + @Override + public IPage selectCustomerList(QueryDto dto) { + // 创建参数映射,用于存储HTTP请求的参数 + Map params = new HashMap<>(); + // 添加分页参数:当前页码和最大结果数量 + params.put("pageIndex", dto.getPageIndex()); + params.put("maxResultCount", dto.getMaxResultCount()); + // 将查询条件对象转换为JSON字符串,并再次转换为Map对象,然后添加到参数映射中 + params.put("queryDto", JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class)); + + // 调用API工具类的POST方法,发送请求到第三方API,并获取响应结果 + ApiResp apiResp = e8ApiUtils.doPost(params, CUSTOMER_GET_PAGE_LIST); + // 如果API响应不成功,返回null + if (!apiResp.getSuccess()) { + return null; + } + + // 将API响应结果转换为Map对象,以便于后续处理 + Map result = JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), Map.class); + // 创建一个分页对象,用于存储客户信息列表和分页数据 + IPage pageInfo = new Page<>(dto.getPageIndex(), dto.getMaxResultCount()); + // 设置总记录数 + pageInfo.setTotal(Long.parseLong(result.get("total").toString())); + // 将API响应结果中的客户信息列表转换为CustomerInfo对象列表,并设置到分页对象中 + pageInfo.setRecords(JSONUtil.toList(JSONUtil.toJsonStr(result.get("item")), CustomerInfo.class)); + + // 返回分页对象 + return pageInfo; + } + + /** + * 新增人员信息 + * + * @param dto 传参 + * @return Boolean + */ + @Override + public Boolean addCustomer(QueryDto dto) { + // 将查询DTO转换为JSON字符串,然后解析到Map对象中,以便作为API请求的参数 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + + // 执行API请求,传入参数和指定的API类型(CUSTOMER_CREATE),并获取API响应对象 + ApiResp apiResp = e8ApiUtils.doPost(params, CUSTOMER_CREATE); + + // 返回API请求是否成功的标志 + return apiResp.getSuccess(); + } + + /** + * 人员信息修改 + * + * @param dto 传参 + * @return Boolean + */ + @Override + public Boolean updateCustomer(QueryDto dto) { + // 将查询DTO转换为CustomerInfo对象,以便进行后续操作 + CustomerInfo customer = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), CustomerInfo.class); + + // 构造更新客户的API路径,使用客户ID替换占位符 + String api = CUSTOMER_UPDATE.replace("{id}", customer.getId().toString()); + + // 将CustomerInfo对象转换为Map,以符合API请求参数的格式 + Map params = BeanUtil.beanToMap(customer); + + // 调用API进行客户信息更新,并返回操作是否成功的标志 + ApiResp apiResp = e8ApiUtils.doPost(params, api); + + // 返回API响应的成功标志,表示客户信息是否成功更新 + return apiResp.getSuccess(); + } + + /** + * 删除人员信息 + * + * @param dto 传参 + * @return Boolean + */ + @Override + public Boolean deleteCustomer(QueryDto dto) { + // 将查询DTO转换为CustomerInfo对象,以便获取客户信息 + CustomerInfo customer = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), CustomerInfo.class); + + // 构造删除客户的API路径,替换{id}为实际的客户ID + String api = CUSTOMER_DELETE.replace("{id}", customer.getId().toString()); + + // 调用API处理删除操作,并返回删除结果的成功状态 + ApiResp apiResp = e8ApiUtils.doGetOrDel(api, null); + return apiResp.getSuccess(); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/DoorDeviceServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/DoorDeviceServiceImpl.java new file mode 100644 index 00000000..03ecc90d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/DoorDeviceServiceImpl.java @@ -0,0 +1,155 @@ +package by.dimp.web.service.E8Service.base.impl; + +import by.dimp.web.service.E8Service.base.DoorDeviceService; +import by.dimp.web.model.domain.E8.general.QueryDto; +import by.dimp.web.model.domain.E8.general.ApiResp; +import by.dimp.web.model.entity.E8.DoorDeviceInfo; +import by.dimp.web.utils.E8ApiUtils; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author zcxlsm + * @title: DoorDeviceServiceImpl + * @date 2025/5/8 18:12 + */ +@Service +public class DoorDeviceServiceImpl implements DoorDeviceService { + + private final static String DOOR_DEVICE_GET_PAGE_LIST = "/api/E8Door/man-device-info/get-page-list"; + private final static String DOOR_DEVICE_GET_FIRST_OR_DEFAULT = "/api/E8Door/man-device-info/{id}"; + private final static String DOOR_DEVICE_CREATE = "/api/E8Door/man-device-info"; + private final static String DOOR_DEVICE_UPDATE = "/api/E8Door/man-device-info/{id}/update"; + private final static String DOOR_DEVICE_DELETE = "/api/E8Door/man-device-info/{id}"; + + @Resource + private E8ApiUtils e8ApiUtils; + + /** + * 查询门禁信息 + * + * @param dto + * @return DoorDeviceInfo + */ + @Override + public DoorDeviceInfo selectDoorDevice(QueryDto dto) { + // 将查询DTO转换为Map对象,以便作为API请求的参数 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + + // 调用第三方API获取门禁设备信息 + ApiResp apiResp = e8ApiUtils.doPost(params, DOOR_DEVICE_GET_FIRST_OR_DEFAULT); + + // 检查API响应是否成功 + if (!apiResp.getSuccess()) { + return null; + } + + // 将API响应结果转换为门禁设备信息对象并返回 + return JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), DoorDeviceInfo.class); + } + + /** + * 门禁信息分页查询 + * + * @param dto + * @return IPage + */ + @Override + public IPage selectDoorDeviceList(QueryDto dto) { + // 创建一个参数映射,用于存储API请求所需的参数 + Map params = new HashMap<>(); + // 将分页索引和最大结果数放入参数映射中 + params.put("pageIndex", dto.getPageIndex()); + params.put("maxResultCount", dto.getMaxResultCount()); + // 将查询DTO转换为JSON字符串,再转换为Map对象,然后放入参数映射中 + params.put("queryDto", JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class)); + + // 调用第三方API,获取门禁设备分页列表 + ApiResp apiResp = e8ApiUtils.doPost(params, DOOR_DEVICE_GET_PAGE_LIST); + // 如果API调用不成功,则返回null + if (!apiResp.getSuccess()) { + return null; + } + + // 将API响应结果转换为Map对象,以便后续处理 + Map result = JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), Map.class); + // 创建一个分页对象,用于存储处理后的门禁设备信息 + IPage page = new Page<>(dto.getPageIndex(), dto.getMaxResultCount()); + // 设置分页对象的总记录数 + page.setTotal(Long.parseLong(result.get("total").toString())); + // 将API响应结果中的门禁设备信息列表转换为DoorDeviceInfo对象列表,并设置到分页对象中 + page.setRecords(JSONUtil.toList(JSONUtil.toJsonStr(result.get("item")), DoorDeviceInfo.class)); + + // 返回处理后的分页对象 + return page; + } + + /** + * 新增门禁信息 + * + * @param dto + * @return Boolean + */ + @Override + public Boolean addDoorDevice(QueryDto dto) { + // 将查询DTO转换为JSON字符串,然后转为Map对象,以便作为API请求的参数 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + + // 调用第三方API进行门禁设备创建,并传入转换后的参数 + ApiResp apiResp = e8ApiUtils.doPost(params, DOOR_DEVICE_CREATE); + + // 返回API调用是否成功的标志 + return apiResp.getSuccess(); + } + + /** + * 门禁信息修改 + * + * @param dto + * @return Boolean + */ + @Override + public Boolean updateDoorDevice(QueryDto dto) { + // 将查询DTO转换为门设备信息对象 + DoorDeviceInfo doorDeviceInfo = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), DoorDeviceInfo.class); + + // 构造门设备更新API的URL + String api = DOOR_DEVICE_UPDATE.replace("{id}", doorDeviceInfo.getId().toString()); + + // 将门设备信息对象转换为键值对形式的参数 + Map params = BeanUtil.beanToMap(doorDeviceInfo); + + // 调用API进行门设备信息更新 + ApiResp apiResp = e8ApiUtils.doPost(params, api); + + // 返回API调用是否成功的结果 + return apiResp.getSuccess(); + } + + /** + * 删除门禁信息 + * + * @param dto + * @return Boolean + */ + @Override + public Boolean deleteDoorDevice(QueryDto dto) { + // 将查询DTO转换为门设备信息对象 + DoorDeviceInfo doorDeviceInfo = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), DoorDeviceInfo.class); + // 构造删除门设备的API路径,使用设备ID替换占位符 + String api = DOOR_DEVICE_DELETE.replace("{id}", doorDeviceInfo.getId().toString()); + + // 调用E8 API工具类进行HTTP DELETE请求,参数为构造的API路径和null(因为DELETE请求通常不需要请求体) + ApiResp apiResp = e8ApiUtils.doGetOrDel(api, null); + + // 返回API响应的成功标志 + return apiResp.getSuccess(); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/LiftServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/LiftServiceImpl.java new file mode 100644 index 00000000..83334280 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/base/impl/LiftServiceImpl.java @@ -0,0 +1,158 @@ +package by.dimp.web.service.E8Service.base.impl; + +import by.dimp.web.service.E8Service.base.LiftService; +import by.dimp.web.model.domain.E8.general.ApiResp; +import by.dimp.web.model.domain.E8.general.QueryDto; +import by.dimp.web.model.entity.E8.LiftInfo; +import by.dimp.web.utils.E8ApiUtils; +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author zcxlsm + * @title: LiftServiceImpl + * @date 2025/5/9 11:52 + */ +@Service +public class LiftServiceImpl implements LiftService { + + private static final String GET_PAGE_LIST = "/api/E8Door/man-elevator-management/get-page-list"; + private static final String GET_LIFT_FLOOR = "/api/E8Door/man-elevator-management/{id}/get-man-elevator-floors"; + private static final String LIFT_ADD = "/api/E8Door/man-elevator-management"; + private static final String LIFT_UPDATE = "/api/E8Door/man-elevator-management/{id}/update"; + private static final String LIFT_DELETE = "/api/E8Door/man-elevator-management/{id}"; + + @Resource + private E8ApiUtils e8ApiUtils; + + /** + * 电梯信息分页查询 + * + * @param dto + * @return IPage + */ + @Override + public IPage getPageList(QueryDto dto) { + // 创建一个参数映射,用于存储API请求所需的参数 + Map params = new HashMap<>(); + // 将分页索引和最大结果数放入参数映射中 + params.put("pageIndex", dto.getPageIndex()); + params.put("maxResultCount", dto.getMaxResultCount()); + // 将查询DTO转换为LiftInfo对象,并将其添加到参数映射中 + params.put("queryDto", JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), LiftInfo.class)); + + // 调用E8 API工具类的POST方法,传入参数和API路径,获取API响应 + ApiResp apiResp = e8ApiUtils.doPost(params, GET_PAGE_LIST); + // 如果API响应不成功,则返回null + if(!apiResp.getSuccess()){ + return null; + } + + // 将API响应的结果转换为一个Map对象 + Map result = JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), Map.class); + // 创建一个分页对象,传入分页索引和最大结果数 + IPage page = new Page<>(dto.getPageIndex(), dto.getMaxResultCount()); + // 设置分页对象的总记录数 + page.setTotal(Long.parseLong(result.get("total").toString())); + // 将结果中的项转换为LiftInfo列表,并设置为分页对象的记录 + page.setRecords(JSONUtil.toList(JSONUtil.toJsonStr(result.get("item")), LiftInfo.class)); + + // 返回填充了数据的分页对象 + return page; + } + + /** + * 查询电梯楼层 + * + * @param dto + * @return LiftInfo + */ + @Override + public LiftInfo getLiftFloor(QueryDto dto) { + // 将查询DTO转换为LiftInfo对象,以便后续使用 + LiftInfo liftInfo = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), LiftInfo.class); + // 构造请求URL,其中{id}将被liftInfo的ID替换 + String url = GET_LIFT_FLOOR.replace("{id}", liftInfo.getId().toString()); + + // 调用API接口,获取电梯信息 + ApiResp apiResp = e8ApiUtils.doPost(null, url); + // 如果API调用不成功,则返回null + if(!apiResp.getSuccess()){ + return null; + } + + // 将API响应结果转换为LiftInfo对象,并返回 + return JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), LiftInfo.class); + } + + /** + * 添加电梯 + * + * @param dto + * @return Boolean + */ + @Override + public Boolean addLift(QueryDto dto) { + // 将查询DTO转换为JSON字符串,然后转为Map对象,以便作为API请求的参数 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + + // 调用第三方API进行电梯添加操作,并获取API响应结果 + ApiResp apiResp = e8ApiUtils.doPost(params, LIFT_ADD); + + // 返回API操作是否成功的标志 + return apiResp.getSuccess(); + } + + /** + * 修改电梯信息 + * + * @param dto + * @return Boolean + */ + @Override + public Boolean updateLift(QueryDto dto) { + // 将DTO中的查询对象转换为LiftInfo对象 + LiftInfo liftInfo = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), LiftInfo.class); + + // 根据LiftInfo对象中的ID生成请求URL + String url = LIFT_UPDATE.replace("{id}", liftInfo.getId().toString()); + + // 将LiftInfo对象转换为Map类型,以便于API请求参数的处理 + Map params = BeanUtil.beanToMap(liftInfo); + + // 调用E8 API进行POST请求,并返回API响应对象 + ApiResp apiResp = e8ApiUtils.doPost(params, url); + + // 返回API调用是否成功的标志 + return apiResp.getSuccess(); + } + + /** + * 删除电梯信息 + * + * @param dto + * @return Boolean + */ + @Override + public Boolean deleteLift(QueryDto dto) { + // 将DTO中的查询信息转换为LiftInfo对象,以便获取具体的电梯信息 + LiftInfo liftInfo = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), LiftInfo.class); + + // 构造删除电梯的API请求URL,使用LiftInfo对象中的ID替换模板中的{id}占位符 + String url = LIFT_DELETE.replace("{id}", liftInfo.getId().toString()); + + // 调用e8ApiUtils工具类执行DELETE请求,并获取API响应结果 + ApiResp apiResp = e8ApiUtils.doGetOrDel(url, null); + + // 返回API响应中的成功标志,表示删除操作是否成功 + return apiResp.getSuccess(); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/service/EntranceGuardService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/service/EntranceGuardService.java new file mode 100644 index 00000000..5f50bdc9 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/service/EntranceGuardService.java @@ -0,0 +1,45 @@ +package by.dimp.web.service.E8Service.service; + +import by.dimp.web.model.entity.E8.AccessRecordInfo; +import by.dimp.web.model.domain.E8.general.QueryDto; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + * @author zcxlsm + * @title: EntranceGuardService + * @date 2025/5/9 18:06 + */ +public interface EntranceGuardService { + + /** + * 远程开门 + * + * @param dto + * @return Boolean + */ + Boolean remoteOpenDoor(QueryDto dto); + + /** + * 获取通行记录分页列表 + * + * @param dto + * @return IPage + */ + IPage getPageAccessRecordList(QueryDto dto); + + /** + * 人员授权 + * + * @param dto + * @return Boolean + */ + Boolean addAccessControl(QueryDto dto); + +// /** +// * 获取人员权限分页列表 +// * +// * @param dto +// * @return ApiResp +// */ +// IPage getPageAccessControl(QueryDto dto); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/service/impl/EntranceGuardServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/service/impl/EntranceGuardServiceImpl.java new file mode 100644 index 00000000..ce3a1acf --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/E8Service/service/impl/EntranceGuardServiceImpl.java @@ -0,0 +1,130 @@ +package by.dimp.web.service.E8Service.service.impl; + +import by.dimp.web.model.entity.E8.AccessRecordInfo; +import by.dimp.web.model.domain.E8.general.QueryDto; +import by.dimp.web.model.domain.E8.general.ApiResp; +import by.dimp.web.service.E8Service.service.EntranceGuardService; +import by.dimp.web.utils.E8ApiUtils; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author zcxlsm + * @title: EntranceGuardServiceImpl + * @date 2025/5/8 17:43 + */ +@Service +public class EntranceGuardServiceImpl implements EntranceGuardService { + + // 远程开门 + private static final String REMOTE_OPEN_DOOR = "/api/E8Door/man-device-info/device-control"; + + // 获取通行记录分页列表 + private static final String GET_PAGE_ACCESS_RECORD_PAGE_LIST = "/api/E8Door/man-pass-record/get-page-list"; + + // 人员授权 + private static final String PERSON_AUTHORIZATION = "/api/E8Door/man-auth-info/auth-info-by-type"; + + // 获取人员权限分页列表 + private static final String GET_PAGE_PERSON_AUTHORIZATION_PAGE_LIST = "/api/E8Door/man-person-device-finally/get-page-list"; + + @Resource + private E8ApiUtils e8ApiUtils; + + /** + * 远程开门 + * + * @param dto + * @return Boolean + */ + @Override + public Boolean remoteOpenDoor(QueryDto dto) { + // 将查询DTO转换为JSON字符串,然后解析为Map对象,以便作为API请求的参数 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + + // 调用第三方API进行开门操作,传入处理后的参数和指定的API端点 + ApiResp apiResp = e8ApiUtils.doPost(params, REMOTE_OPEN_DOOR); + + // 返回API调用是否成功的结果 + return apiResp.getSuccess(); + + } + + /** + * 获取通行记录分页列表 + * + * @param dto + * @return IPage + */ + @Override + public IPage getPageAccessRecordList(QueryDto dto) { + // 创建一个参数映射,用于存储API请求的参数 + Map params = new HashMap<>(); + // 将分页索引和最大结果数放入参数映射中 + params.put("pageIndex", dto.getPageIndex()); + params.put("maxResultCount", dto.getMaxResultCount()); + // 将查询DTO转换为JSON字符串,再转换为Map对象,然后放入参数映射中 + params.put("queryDto", JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class)); + + // 调用API工具类的POST方法,传入参数和API路径,获取API响应对象 + ApiResp apiResp = e8ApiUtils.doPost(params, GET_PAGE_ACCESS_RECORD_PAGE_LIST); + // 如果API响应不成功,则返回null + if (!apiResp.getSuccess()) { + return null; + } + + // 将API响应的结果转换为JSON字符串,再转换为Map对象 + Map result = JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), Map.class); + // 创建一个分页对象,传入分页索引和最大结果数 + IPage page = new Page<>(dto.getPageIndex(), dto.getMaxResultCount()); + // 从结果映射中获取总记录数,转换为长整型后设置到分页对象中 + page.setTotal(Long.parseLong(result.get("total").toString())); + // 从结果映射中获取项目列表,转换为访问记录信息列表后设置到分页对象中 + page.setRecords(JSONUtil.toList(JSONUtil.toJsonStr(result.get("item")), AccessRecordInfo.class)); + + // 返回填充了数据的分页对象 + return page; + } + + /** + * 人员授权 + * + * @param dto + * @return ApiResp + */ + @Override + public Boolean addAccessControl(QueryDto dto) { + // 将查询DTO转换为JSON字符串,然后解析到Map中,以便作为API请求的参数 + Map params = JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class); + + // 执行API请求并获取响应结果 + ApiResp apiResp = e8ApiUtils.doPost(params, PERSON_AUTHORIZATION); + + // 返回API请求是否成功的标志 + return apiResp.getSuccess(); + } + +// /** +// * 获取人员权限分页列表 +// * +// * @param dto +// * @return ApiResp +// */ +// public ApiResp getPageAccessControl(QueryDto dto) { +// Map params = new HashMap<>(); +// params.put("pageIndex", dto.getPageIndex()); +// params.put("maxResultCount", dto.getMaxResultCount()); +// params.put("queryDto", JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), Map.class)); +// +// ApiResp apiResp = e8ApiUtils.doPost(params, GET_PAGE_PERSON_AUTHORIZATION_PAGE_LIST); +// +// return e8ApiUtils.doPost(params, GET_PAGE_PERSON_AUTHORIZATION_PAGE_LIST); +// } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbAttendanceStatisticsService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbAttendanceStatisticsService.java new file mode 100644 index 00000000..129abe0b --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbAttendanceStatisticsService.java @@ -0,0 +1,11 @@ +package by.dimp.web.service.admin; + +import by.dimp.web.model.domain.attendanceStatistics.req.AttendanceStatisticsQueryReq; +import by.dimp.web.model.domain.attendanceStatistics.res.AttendanceStatisticsRes; + +public interface ITbAttendanceStatisticsService { + AttendanceStatisticsRes pageQuery(AttendanceStatisticsQueryReq query); + + int export(); + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbCeremonialServeService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbCeremonialServeService.java new file mode 100644 index 00000000..940d0ec0 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbCeremonialServeService.java @@ -0,0 +1,36 @@ +package by.dimp.web.service.admin; + +import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServePageQueryReq; +import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServeReq; +import by.dimp.web.model.domain.ceremonialServe.res.CeremonialServeRes; +import com.baomidou.mybatisplus.core.metadata.IPage; + +public interface ITbCeremonialServeService { + /** + * 分页查询会议服务的预订信息 + * @param pageQueryReq + * @return + */ + IPage pageQuery(CeremonialServePageQueryReq pageQueryReq); + + /** + * 新增会议服务的预订信息 + * @param ceremonialServeReq + * @return + */ + int addCeremonialServe(CeremonialServeReq ceremonialServeReq); + + /** + * 删除会议服务的预订信息 + * @param id + * @return + */ + int deleteCeremonialServe(Integer id); + + /** + * 服务预订信息的确认 + * @param ceremonialServeReq + * @return + */ + int confirm(CeremonialServeReq ceremonialServeReq); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbCleaningIndicatorsService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbCleaningIndicatorsService.java new file mode 100644 index 00000000..9ce4667a --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbCleaningIndicatorsService.java @@ -0,0 +1,48 @@ +package by.dimp.web.service.admin; + + +import by.dimp.web.model.domain.cleaningIndicators.req.QueryCleaningIndicatorsReq; +import by.dimp.web.model.domain.cleaningIndicators.req.SaveAndModifyCleaningIndicators; +import by.dimp.web.model.domain.cleaningIndicators.resp.TbCleaningIndicatorsResp; +import com.baomidou.mybatisplus.core.metadata.IPage; + +/** + *

+ * 服务类 + *

+ * + * @author lxj + * @since 2025-04-28 + */ +public interface ITbCleaningIndicatorsService { + /** + * 新增保洁质量 + * @param req 新增保洁质量对象 + * @return 添加成功返回true + */ + Boolean addCleaningIndicators(SaveAndModifyCleaningIndicators req); + /** + * 修改保洁质量信息 + * @param req 保洁质量参数 + * @return 更新成功返回true + */ + Boolean modifyCleaningIndicators(SaveAndModifyCleaningIndicators req); + /** + * 删除保洁质量 + * @param id 主键编号 + * @return 删除成功返回true + */ + Boolean deleteCleaningIndicators(Long id); + /** + * 分页查询保洁质量 + * @param req 查询参数 + * @return 返回保洁质量列表 + */ + IPage queryCleaningIndicatorsOpForPage(QueryCleaningIndicatorsReq req); + /** + * 根据id查询保洁质量 + * @param id 保洁质量id + * @return 返回保洁质量信息 + */ + TbCleaningIndicatorsResp queryCleaningIndicatorsById(Long id); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbConferenceService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbConferenceService.java new file mode 100644 index 00000000..a160ef8b --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbConferenceService.java @@ -0,0 +1,41 @@ +package by.dimp.web.service.admin; + +import by.dimp.web.model.entity.TbConference; +import by.dimp.web.model.domain.conference.req.ConferenceReq; +import by.dimp.web.model.domain.conference.req.ConferencePageQueryReq; +import com.baomidou.mybatisplus.core.metadata.IPage; + +public interface ITbConferenceService { + /** + * 分页查询会议信息 + * @param queryDTO + * @return + */ + IPage pageQuery(ConferencePageQueryReq queryDTO); + + /** + * 添加会议信息 + * @param conferenceReq + */ + int addInformation(ConferenceReq conferenceReq); + + /** + * 删除会议信息 + * + * @param id + */ + Boolean deleteInformation(Integer id); + + /** + * 根据ID获取会议信息 + * @param id + * @return + */ + TbConference getInformation(Integer id); + + /** + * 根据ID更新会议信息 + * @param conferenceReq + */ + int updateInformation(ConferenceReq conferenceReq); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbRoomBookingService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbRoomBookingService.java new file mode 100644 index 00000000..3f0085ef --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbRoomBookingService.java @@ -0,0 +1,60 @@ +package by.dimp.web.service.admin; + +import by.dimp.web.model.domain.roomBooking.resp.RoomBookingRes; +import by.dimp.web.model.entity.TbRoomBooking; +import by.dimp.web.model.domain.roomBooking.req.RoomBookingPageQueryReq; +import by.dimp.web.model.domain.roomBooking.req.RoomBookingReq; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface ITbRoomBookingService extends IService { + /** + * 分页查询会议室预定 + * @param pageQueryReq + * @return + */ + IPage queryForPage(RoomBookingPageQueryReq pageQueryReq); + + /** + * 添加会议室预定 + * @param roomBookingReq + * @return + */ + int addCeremonial(RoomBookingReq roomBookingReq); + + /** + * 修改会议室预定 + * @param roomBookingReq + * @return + */ + int reviewCeremonial(RoomBookingReq roomBookingReq); + + /** + * 删除会议室预定 + * @param id + * @return + */ + Boolean deleteById(Integer id); + + /** + * 修改会议室预定 + * @param roomBookingReq + * @return + */ + int updateCeremonialById(RoomBookingReq roomBookingReq); + + /** + * 根据id查询会议室预定详情 + * @param id + * @return + */ + RoomBookingRes queryById(Integer id); + + /** + * 添加评论 + * @param roomBookingReq + * @return + */ + int addComment(RoomBookingReq roomBookingReq); + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbServiceClassificationService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbServiceClassificationService.java new file mode 100644 index 00000000..a76eb991 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbServiceClassificationService.java @@ -0,0 +1,23 @@ +package by.dimp.web.service.admin; +import by.dimp.web.model.domain.serviceClassification.req.ServiceClassificationReq; +import by.dimp.web.model.domain.serviceClassification.req.TbServiceClassificationPageQuery; +import by.dimp.web.model.entity.TbServiceClassification; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author dy +* @description 针对表【tb_service_classification】的数据库操作Service +* @createDate 2025-06-12 16:31:28 +*/ +public interface ITbServiceClassificationService extends IService { + + /** + * 分页查询 + * @param pageQuery + * @return + */ + IPage queryForPage(TbServiceClassificationPageQuery pageQuery); + + int addServiceClassification(ServiceClassificationReq serviceClassificationReq); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbVisitorInvitationsService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbVisitorInvitationsService.java new file mode 100644 index 00000000..ca6b4e2e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/ITbVisitorInvitationsService.java @@ -0,0 +1,44 @@ +package by.dimp.web.service.admin; +import by.dimp.web.model.domain.visitorManagement.req.VisitorManagementReq; +import by.dimp.web.model.domain.visitorManagement.req.VistorManagementPageQuery; +import by.dimp.web.model.entity.TbVisitorManagement; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author dy +* @description 针对表【tb_visitor_management】的数据库操作Service +* @createDate 2025-06-16 14:24:44 +*/ +public interface ITbVisitorInvitationsService extends IService { + + /** + * 分页查询访客管理列表 + * @param pageQuery + * @return + */ + IPage queryForPage(VistorManagementPageQuery pageQuery); + + + /** + * 分页查询待审核访客列表 + * @param pageQuery + * @return + */ + IPage queryForWaitingPage(VistorManagementPageQuery pageQuery); + /** + * 新增访客 + * @param visitorManagementReq + * @return + */ + int addVisitor(VisitorManagementReq visitorManagementReq); + + /** + * 审核访客 + * @param visitorManagementReq + * @return + */ + int auditVisitor(VisitorManagementReq visitorManagementReq); + + TbVisitorManagement getVisitorById(Integer id); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbAttendanceStatisticsServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbAttendanceStatisticsServiceImpl.java new file mode 100644 index 00000000..5ff97c0d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbAttendanceStatisticsServiceImpl.java @@ -0,0 +1,28 @@ +package by.dimp.web.service.admin.impl; + +import by.dimp.web.mapper.admin.TbAttendanceStatisticsMapper; +import by.dimp.web.model.domain.attendanceStatistics.req.AttendanceStatisticsQueryReq; +import by.dimp.web.model.domain.attendanceStatistics.res.AttendanceStatisticsRes; +import by.dimp.web.service.admin.ITbAttendanceStatisticsService; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +@Service +public class TbAttendanceStatisticsServiceImpl implements ITbAttendanceStatisticsService { + + @Resource + private TbAttendanceStatisticsMapper attendanceStatisticsMapper; + + @Override + public AttendanceStatisticsRes pageQuery(AttendanceStatisticsQueryReq query) { + AttendanceStatisticsRes res = attendanceStatisticsMapper.pageQuery(query); + return res; + } + + + + @Override + public int export() { + return 0; + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbCeremonialServeServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbCeremonialServeServiceImpl.java new file mode 100644 index 00000000..48dfb3d4 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbCeremonialServeServiceImpl.java @@ -0,0 +1,91 @@ +package by.dimp.web.service.admin.impl; + +import by.dimp.common.core.exception.BizException; +import by.dimp.web.covert.TbCeremonialServeCovert; +import by.dimp.web.mapper.admin.TbCeremonialServeMapper; +import by.dimp.web.mapper.admin.TbCeremonialserveRoombookingMapper; +import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServePageQueryReq; +import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServeReq; +import by.dimp.web.model.domain.ceremonialServe.res.CeremonialServeRes; +import by.dimp.web.model.entity.TbCeremonialServe; +import by.dimp.web.model.entity.TbCeremonialserveRoombooking; +import by.dimp.web.service.admin.ITbCeremonialServeService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.reactive.TransactionalOperator; + +@Service +public class TbCeremonialServeServiceImpl extends ServiceImpl implements ITbCeremonialServeService { + @Resource + private TbCeremonialServeMapper ceremonialServeMapper; + + + @Resource + private TbCeremonialServeCovert tbCeremonialServeCovert; + + @Resource + private TbCeremonialserveRoombookingMapper ceremonialserveRoombookingMapper; + + + private Integer TOBECONFIRMED = 0;//待确认 + private Integer CONFIRMED = 1;//已确认 + private Integer CANCLED = 2;//已取消 + private Integer FINISHED = 3;//已完成 + @Autowired + private TransactionalOperator transactionalOperator; + + @Override + public IPage pageQuery(CeremonialServePageQueryReq pageQueryReq) { + //分页参数 + Page rowPage = new Page(pageQueryReq.getPage(), pageQueryReq.getPageSize()); + //查询条件 + IPage pageInfo = ceremonialServeMapper.selectForPage(rowPage, pageQueryReq); + //组装返回数据 + return pageInfo.convert(tbCeremonialServeCovert::entityToResp); + } + + @Transactional + @Override + public int addCeremonialServe(CeremonialServeReq ceremonialServeReq) { + TbCeremonialServe tbCeremonialServe = tbCeremonialServeCovert.reqToEntity(ceremonialServeReq); + +// TbCeremonialServe tbCeremonialServe = new TbCeremonialServe(); +// BeanUtils.copyProperties(ceremonialServeReq, tbCeremonialServe); +// tbCeremonialServe.setServeType(ceremonialServeReq.getServeType()); +// tbCeremonialServe.setServeName(ceremonialServeReq.getServeName()); + tbCeremonialServe.setServeStatus(TOBECONFIRMED); + int result = ceremonialServeMapper.insert(tbCeremonialServe); + //向中间表插入数据 + TbCeremonialserveRoombooking tbCeremonialserveRoombooking = new TbCeremonialserveRoombooking(); + ceremonialserveRoombookingMapper.insert(tbCeremonialserveRoombooking); + + return result; + } + + + @Override + public int deleteCeremonialServe(Integer id) { + // 待确认状态下才能删除 + int serveStatus = ceremonialServeMapper.selectById(id).getServeStatus(); + if (serveStatus == CONFIRMED && serveStatus == CANCLED && serveStatus == FINISHED) { + throw new BizException("不能删除已确认、已取消、已完成的记录"); + } + int result = ceremonialServeMapper.deleteById(id); + return result; + } + + @Override + public int confirm(CeremonialServeReq ceremonialServeReq) { + TbCeremonialServe tbCeremonialServe = tbCeremonialServeCovert.reqToEntity(ceremonialServeReq); +// TbCeremonialServe tbCeremonialServe = new TbCeremonialServe(); +// tbCeremonialServe.setId(id); +// tbCeremonialServe.setServeStatus(serveStatus); + int result = ceremonialServeMapper.updateById(tbCeremonialServe); + return result; + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbCleaningQualityServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbCleaningQualityServiceImpl.java new file mode 100644 index 00000000..28740d4b --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbCleaningQualityServiceImpl.java @@ -0,0 +1,69 @@ +package by.dimp.web.service.admin.impl; + + +import by.dimp.web.covert.TbCleaningQualityConvert; +import by.dimp.web.mapper.admin.TbCleaningQualityMapper; +import by.dimp.web.model.domain.cleaningIndicators.req.QueryCleaningIndicatorsReq; +import by.dimp.web.model.domain.cleaningIndicators.req.SaveAndModifyCleaningIndicators; +import by.dimp.web.model.domain.cleaningIndicators.resp.TbCleaningIndicatorsResp; +import by.dimp.web.model.entity.TbCleaningIndicators; +import by.dimp.web.service.admin.ITbCleaningIndicatorsService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author lxj + * @since 2025-04-28 + */ +@Service +public class TbCleaningQualityServiceImpl implements ITbCleaningIndicatorsService { + @Resource + private TbCleaningQualityMapper tbCleaningQualityMapper; + @Resource + private TbCleaningQualityConvert tbCleaningQualityConvert; + + @Override + public Boolean addCleaningIndicators(SaveAndModifyCleaningIndicators req) { + TbCleaningIndicators tbCleaningIndicators = tbCleaningQualityConvert.reqToEntity(req); + return tbCleaningQualityMapper.insert(tbCleaningIndicators) > 0; + } + + @Override + public Boolean modifyCleaningIndicators(SaveAndModifyCleaningIndicators req) { + TbCleaningIndicators tbCleaningIndicators = tbCleaningQualityConvert.reqToEntity(req); + return tbCleaningQualityMapper.updateById(tbCleaningIndicators) > 0; + } + + @Override + public Boolean deleteCleaningIndicators(Long id) { + return tbCleaningQualityMapper.deleteById(id) > 0; + } + + @Override + public IPage queryCleaningIndicatorsOpForPage(QueryCleaningIndicatorsReq req) { + //1.设置分页 + Page page = new Page<>(req.getPageNum(), req.getPageSize()); + //2.查询数据 + IPage pageInfo = tbCleaningQualityMapper.selectForPage(page, req); + // 组装数据返回 + return pageInfo.convert(tbCleaningQualityConvert::entityToResp); + } + + @Override + public TbCleaningIndicatorsResp queryCleaningIndicatorsById(Long id) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(TbCleaningIndicators::getId, id).eq(TbCleaningIndicators::getDataState, 1); + TbCleaningIndicators tbCleaningIndicators = tbCleaningQualityMapper.selectOne(queryWrapper); + if(tbCleaningIndicators !=null){ + return tbCleaningQualityConvert.entityToResp(tbCleaningIndicators); + } + return null; + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbConferenceServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbConferenceServiceImpl.java new file mode 100644 index 00000000..9ed4cd27 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbConferenceServiceImpl.java @@ -0,0 +1,101 @@ +package by.dimp.web.service.admin.impl; + +import by.dimp.common.core.domain.ErrorType; +import by.dimp.common.core.exception.ObjectExistException; +import by.dimp.web.covert.TbConferenceCovert; +import by.dimp.web.mapper.admin.TbConferenceMapper; +import by.dimp.web.model.domain.conference.req.ConferencePageQueryReq; +import by.dimp.web.model.domain.conference.req.ConferenceReq; +import by.dimp.web.model.entity.TbConference; +import by.dimp.web.service.admin.ITbConferenceService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import org.apache.commons.lang3.BooleanUtils; +import org.springframework.stereotype.Service; + +@Service +public class TbConferenceServiceImpl extends ServiceImpl implements ITbConferenceService { + @Resource + private TbConferenceMapper conferenceMapper; + @Resource + private TbConferenceCovert tbConferenceCovert; + + @Override + public IPage pageQuery(ConferencePageQueryReq queryReq) { + //分页参数 + Page rowPage = new Page(queryReq.getPage(), queryReq.getPageSize()); + //查询条件 + IPage pageInfo = conferenceMapper.selectForPage(rowPage, queryReq); + //组装返回数据 + return pageInfo.convert(tbConferenceCovert::entityToResp); + } + + @Override + public int addInformation(ConferenceReq conferenceReq) { + //从数据库中查询会议室是否已经存在 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(TbConference::getRoomName, conferenceReq.getRoomName()) + .eq(TbConference::getRoomNo, conferenceReq.getRoomNo()); + TbConference tbConference = conferenceMapper.selectOne(lambdaQueryWrapper); + //判断会议室是否已经存在,存在则抛出异常 + if (tbConference != null) { + throw new ObjectExistException(ErrorType.OBJECT_EXISTS,"会议室已存在或会议编号已经存在!"); + } +// TbConference conference = new TbConference(); +// BeanUtils.copyProperties(conferenceReq, conference); +// conference.setRoomName(conferenceReq.getRoomName()); +// conference.setRoomNo(conferenceReq.getRoomNo()); +// conference.setRoomLocation(conferenceReq.getRoomLocation()); +// conference.setRoomNumber(conferenceReq.getRoomNumber()); +// conference.setRoomArea(conferenceReq.getRoomArea()); +// conference.setCreateTime(LocalDateTime.now()); +// conference.setBookingStatus(conferenceReq.getBookingStatus()); +// conference.setRoomFacilities(conferenceReq.getRoomFacilities()); +// //新增会议室信息 +// int result = conferenceMapper.insert(conference); +// +// return result; + + TbConference tbConference1 = tbConferenceCovert.reqToEntity(conferenceReq); + if (tbConference1.getFeeType() == 1){ + tbConference1.setFeePrice(conferenceReq.getFeePrice()); + } + return conferenceMapper.insert(tbConference1); + + } + + @Override + public Boolean deleteInformation(Integer id) { + int result = conferenceMapper.deleteById(id); + return BooleanUtils.toBoolean(result); + } + + @Override + public TbConference getInformation(Integer id) { + return this.getById(id); + } + + @Override + public int updateInformation(ConferenceReq conferenceReq) { +// TbConference conference = new TbConference(); +// BeanUtils.copyProperties(conferenceReq, conference); +// conference.setId(conferenceReq.getId()); +// conference.setRoomName(conferenceReq.getRoomName()); +// conference.setRoomNo(conferenceReq.getRoomNo()); +// conference.setRoomLocation(conferenceReq.getRoomLocation()); +// conference.setRoomArea(conferenceReq.getRoomArea()); +// conference.setRoomNumber(conferenceReq.getRoomNumber()); +//// conference.setBookingStatus(conferenceReq.getBookingStatus()); +// conference.setRoomFacilities(conferenceReq.getRoomFacilities()); + + TbConference tbConference = tbConferenceCovert.reqToEntity(conferenceReq); + return conferenceMapper.updateById(tbConference); + +// //更新会议室信息 +// int result = conferenceMapper.updateById(conference); +// return result; + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbRoomBookingServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbRoomBookingServiceImpl.java new file mode 100644 index 00000000..db623807 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbRoomBookingServiceImpl.java @@ -0,0 +1,125 @@ +package by.dimp.web.service.admin.impl; + +import by.dimp.common.core.domain.ErrorType; +import by.dimp.common.core.exception.ObjectExistException; +import by.dimp.web.covert.TbRoomBookingConvert; +import by.dimp.web.model.domain.roomBooking.resp.RoomBookingRes; +import by.dimp.web.model.entity.TbRoomBooking; +import by.dimp.web.model.domain.roomBooking.req.RoomBookingPageQueryReq; +import by.dimp.web.model.domain.roomBooking.req.RoomBookingReq; +import by.dimp.web.mapper.admin.TbRoomBookingMapper; +import by.dimp.web.service.admin.ITbRoomBookingService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class TbRoomBookingServiceImpl extends ServiceImpl implements ITbRoomBookingService { + @Resource + private TbRoomBookingMapper roomBookingMapper; + + @Resource + private TbRoomBookingConvert tbRoomBookingConvert; + + private Integer ISDELETE = 0; + @Autowired + private TbRoomBookingMapper tbRoomBookingMapper; + + @Override + public IPage queryForPage(RoomBookingPageQueryReq pageQueryReq) { + + //分页参数 + Page rowPage = new Page(pageQueryReq.getPage(), pageQueryReq.getPageSize()); + //查询条件 + IPage pageInfo = roomBookingMapper.selectForPage(rowPage, pageQueryReq); + //组装返回数据 + return pageInfo.convert(tbRoomBookingConvert::entityToResp); + } + + @Override + public int addCeremonial(RoomBookingReq roomBookingReq) { + //判断会议室是否已经被预定或者是否在使用中 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(TbRoomBooking::getTbConferenceId, roomBookingReq.getTbConferenceId()) +// .between(TbRoomBooking::getAppointmentBeginTime,roomBookingReq.getAppointmentBeginTime(),roomBookingReq.getAppointmentEndTime()); + .eq(TbRoomBooking::getTbConferenceId, roomBookingReq.getTbConferenceId()) + //判断前端传过来的预约开始时间小于数据库大于数据库的预约结束时间 + .lt(TbRoomBooking::getAppointmentEndTime, roomBookingReq.getAppointmentBeginTime()) + .gt(TbRoomBooking::getAppointmentBeginTime, roomBookingReq.getAppointmentEndTime()); + Long count = roomBookingMapper.selectCount(wrapper); + if (count > 0) { + throw new ObjectExistException(ErrorType.OBJECT_EXISTS, "会议室已被预定"); + } + //没有被预订或者使用中,则新增预订记录 + TbRoomBooking tbRoomBooking = tbRoomBookingConvert.respToEntity(roomBookingReq); + +// TbRoomBooking tbRoomBooking = new TbRoomBooking(); +// BeanUtils.copyProperties(roomBookingReq, tbRoomBooking); +// tbRoomBooking.setTbConferenceId(roomBookingReq.getTbConferenceId()); +// tbRoomBooking.setBookingStatus(roomBookingReq.getBookingStatus()); +// tbRoomBooking.setRoomBeginTime(roomBookingReq.getRoomBeginTime()); +// tbRoomBooking.setRoomEndTime(roomBookingReq.getRoomEndTime()); + + return roomBookingMapper.insert(tbRoomBooking); + } + + @Override + public int reviewCeremonial(RoomBookingReq roomBookingReq) { + TbRoomBooking tbRoomBooking = tbRoomBookingConvert.reqToEntity(roomBookingReq); +// TbRoomBooking tbRoomBooking = new TbRoomBooking(); +// BeanUtils.copyProperties(roomBookingReq, tbRoomBooking); +// tbRoomBooking.setId(roomBookingReq.getId()); +// tbRoomBooking.setReviewStatus(roomBookingReq.getReviewStatus()); + int result = roomBookingMapper.updateById(tbRoomBooking); + return result; + } + + @Override + public Boolean deleteById(Integer id) { + + int result = roomBookingMapper.deleteById(id); + return result > 0; + } + + @Override + public int updateCeremonialById(RoomBookingReq roomBookingReq) { + TbRoomBooking tbRoomBooking = tbRoomBookingConvert.reqToEntity(roomBookingReq); +// TbRoomBooking tbRoomBooking = new TbRoomBooking(); +// BeanUtils.copyProperties(roomBookingReq, tbRoomBooking); +// tbRoomBooking.setId(roomBookingReq.getId()); +// tbRoomBooking.setAttendeesName(roomBookingReq.getAttendeesName()); +// tbRoomBooking.setApproverCount(roomBookingReq.getApproverCount()); + int result = roomBookingMapper.updateById(tbRoomBooking); + return result; + } + + @Override + public RoomBookingRes queryById(Integer id) { + TbRoomBooking tbRoomBooking = roomBookingMapper.selectById(id); + RoomBookingRes roomBookingRes = new RoomBookingRes(); + BeanUtils.copyProperties(tbRoomBooking, roomBookingRes); + return roomBookingRes; + } + + @Override + public int addComment(RoomBookingReq roomBookingReq) { + //判断会议是否已经结束 + TbRoomBooking tbRoomBooking = roomBookingMapper.selectById(roomBookingReq.getId()); + if (tbRoomBooking.getBookingStatus() == 2) { + //会议已结束,可以评论 + BeanUtils.copyProperties(roomBookingReq, tbRoomBooking); + tbRoomBooking.setEvaluate(roomBookingReq.getEvaluate()); + int result = tbRoomBookingMapper.updateById(tbRoomBooking); + + return result; + } + //新增评论记录 +// TbRoomBooking tbRoomBooking = new TbRoomBooking(); + return 0; + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbServiceClassificationServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbServiceClassificationServiceImpl.java new file mode 100644 index 00000000..d67c026f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbServiceClassificationServiceImpl.java @@ -0,0 +1,56 @@ +package by.dimp.web.service.admin.impl; + +import by.dimp.common.core.exception.BizException; +import by.dimp.web.covert.TbServiceClassificationConvert; +import by.dimp.web.mapper.admin.TbServiceClassificationMapper; +import by.dimp.web.model.domain.serviceClassification.req.ServiceClassificationReq; +import by.dimp.web.model.domain.serviceClassification.req.TbServiceClassificationPageQuery; +import by.dimp.web.model.entity.TbServiceClassification; +import by.dimp.web.service.admin.ITbServiceClassificationService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +/** + * @author dy + * @description 针对表【tb_service_classification】的数据库操作Service实现 + * @createDate 2025-06-12 16:31:28 + */ +@Service +public class TbServiceClassificationServiceImpl extends ServiceImpl + implements ITbServiceClassificationService { + + @Resource + private TbServiceClassificationMapper tbServiceClassificationMapper; + + @Resource + private TbServiceClassificationConvert tbServiceClassificationConvert; + + @Override + public IPage queryForPage(TbServiceClassificationPageQuery pageQuery) { + Page rowPage = new Page(pageQuery.getPage(), pageQuery.getPageSize()); + IPage pageInfo = tbServiceClassificationMapper.selectForPage(rowPage, pageQuery); + return pageInfo.convert(tbServiceClassificationConvert::entityToResp); + } + + @Override + public int addServiceClassification(ServiceClassificationReq serviceClassificationReq) { + //使用MybatisPlus查询新增数据在数据库中是否已经存在 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(TbServiceClassification::getName, serviceClassificationReq.getName()); + Long count = tbServiceClassificationMapper.selectCount(queryWrapper); + if (count > 0) { + throw new BizException("该分类名称已存在,请检查!"); + } + TbServiceClassification tbServiceClassification = tbServiceClassificationConvert.reqToEntity(serviceClassificationReq); + + return tbServiceClassificationMapper.insert(tbServiceClassification); + } +} + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbVisitorInvitationsServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbVisitorInvitationsServiceImpl.java new file mode 100644 index 00000000..024f4c70 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/admin/impl/TbVisitorInvitationsServiceImpl.java @@ -0,0 +1,81 @@ +package by.dimp.web.service.admin.impl; + +import by.dimp.common.core.domain.UserInfo; +import by.dimp.web.covert.TbVisitorManagementConvert; +import by.dimp.web.mapper.admin.TbVisitorManagementMapper; +import by.dimp.web.model.domain.visitorManagement.req.VisitorManagementReq; +import by.dimp.web.model.domain.visitorManagement.req.VistorManagementPageQuery; +import by.dimp.web.model.entity.TbVisitorManagement; +import by.dimp.web.service.admin.ITbVisitorInvitationsService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +/** +* @author dy +* @description 针对表【tb_visitor_management】的数据库操作Service实现 +* @createDate 2025-06-16 14:24:44 +*/ +@Service +public class TbVisitorInvitationsServiceImpl extends ServiceImpl + implements ITbVisitorInvitationsService { + + private static final Integer STATUS_WAIT = 0;//待审核 + private static final Integer STATUS_PASS = 1;//待访问 + + private static final Integer Y = 0; + private static final Integer N = 1; + + + @Resource + private TbVisitorManagementConvert tbVisitorManagementConvert; + + @Resource + private TbVisitorManagementMapper tbVisitorManagementMapper; + + @Override + public IPage queryForPage(VistorManagementPageQuery pageQuery) { + Page rowPage = new Page<>(pageQuery.getPage(), pageQuery.getPageSize()); + IPage pageInfo = tbVisitorManagementMapper.selectForPage(rowPage, pageQuery); + return pageInfo.convert(tbVisitorManagementConvert::entityToResp); + } + + @Override + public IPage queryForWaitingPage(VistorManagementPageQuery pageQuery) { + Page rowPage = new Page<>(pageQuery.getPage(), pageQuery.getPageSize()); + IPage pageInfo = tbVisitorManagementMapper.selectForWaitingPage(rowPage, pageQuery); + return pageInfo.convert(tbVisitorManagementConvert::entityToResp); + } + + @Override + public int addVisitor(VisitorManagementReq visitorManagementReq) { + TbVisitorManagement tbVisitorManagement = tbVisitorManagementConvert.reqToEntity(visitorManagementReq); + //新增时设置预约状态为待确认 + visitorManagementReq.setServeStatus(STATUS_PASS); + //判断是否需要预约车位 0:预约 1:不预约 + if (visitorManagementReq.getBookingParkingSpace() == Y){ + //预约车位填写车牌号 + tbVisitorManagement.setLicensePlate(visitorManagementReq.getLicensePlate()); + } + + return tbVisitorManagementMapper.insert(tbVisitorManagement); + } + + @Override + public int auditVisitor(VisitorManagementReq visitorManagementReq) { + TbVisitorManagement tbVisitorManagement = tbVisitorManagementConvert.reqToEntity(visitorManagementReq); + return tbVisitorManagementMapper.updateById(tbVisitorManagement); + } + + @Override + public TbVisitorManagement getVisitorById(Integer id) { + + return this.getById(id); + } +} + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/UniViewConstants.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/UniViewConstants.java new file mode 100644 index 00000000..ca88cd38 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/UniViewConstants.java @@ -0,0 +1,27 @@ +package by.dimp.web.service.uniview; + +public class UniViewConstants { + + /** + * 请求头Authorization 字段前缀 + */ + public static final String UNIVIEW_HTTP_PROTOCOL = "http://"; + + + /** + * 请求头Authorization 字段前缀 + */ + public static final String UNIVIEW_AUTH_PREFIX = "Digest "; + + /** + * 宇视请求返回401,鉴权信息字段 + */ + public static final String UNIVIEW_AUTH_FAIL_PRFIX = "WWW-Authenticate"; + + /** + * Authorization 放入设备鉴权信息字段 + */ + public static final String UNIVIEW_REQUEST_AUTH_KEY = "Authorization"; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/UniViewSecurityAlarmApi.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/UniViewSecurityAlarmApi.java new file mode 100644 index 00000000..fd0c318d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/UniViewSecurityAlarmApi.java @@ -0,0 +1,56 @@ +package by.dimp.web.service.uniview; + + +import by.dimp.web.service.uniview.model.DeviceInfo; +import by.dimp.web.service.uniview.model.person.PersonAddReq; +import by.dimp.web.service.uniview.model.person.PersonAddResp; +import by.dimp.web.service.uniview.model.personlib.FindPersonLibResult; +import by.dimp.web.service.uniview.model.personlib.UnViewLib; +import by.dimp.web.service.uniview.service.PersonLibService; +import by.dimp.web.service.uniview.service.PersonService; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * 宇视安防报警API + * + * @author lxj + */ +@Slf4j +@Service +public class UniViewSecurityAlarmApi { + + @Resource + private PersonLibService personLibService; + @Resource + private PersonService personService; + + /** + * 新增人员库 + */ + public UnViewLib personLibAdd(String libName, DeviceInfo deviceInfo) { + return personLibService.add(libName, deviceInfo); + } + /** + * 删除人员库 + */ + public Boolean personLibDel(DeviceInfo deviceInfo, Integer... libIds) { + return personLibService.del(deviceInfo, libIds); + } + + public Boolean personLibUpdate(DeviceInfo deviceInfo, Integer libId, String libName) { + return personLibService.update(deviceInfo, libId, libName); + } + + public FindPersonLibResult personLibFindPage(DeviceInfo deviceInfo, String libName, Integer current, Integer size) { + return personLibService.find(deviceInfo, libName, current, size); + } + + public PersonAddResp imageAdd(DeviceInfo deviceInfo, PersonAddReq req){ + return personService.add(deviceInfo, req); + } + + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/AlarmReportData.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/AlarmReportData.java new file mode 100644 index 00000000..3d7d19f9 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/AlarmReportData.java @@ -0,0 +1,169 @@ +package by.dimp.web.service.uniview.model; + +import lombok.Data; +import lombok.Getter; +import lombok.Setter; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Data +public class AlarmReportData { + + /** + * 上报内容 + * 1:行为分析告警数据 + * 2:告警恢复数据 + * 3:人脸抓拍数据 + * 4:人脸比对数据 + * 5:行为比对数据 + * 6:保活数据 + * 7:点位变更数据 + */ + private Integer type; + + private String event_id; + + /** + * 有无比对结果 1 有 0 无 + */ + private Integer has_result; + + + private DeviceInfo device_info; + + private ChannelInfo channel_info; + + private Behaviour behaviour; + + /** + * 人脸抓拍数据 + */ + private Face face; + + /** + * 人脸比对结果(为空代 + * 表比对失败) + */ + private List compare_results; + + @Setter + @Getter + public static class Behaviour { + private String algo_model; + private String image_base64; + private String image_path; + private Integer capture_time; + private Integer in_num; + private Integer out_num; + /** + * 区域统计人数 + */ + private Integer area_num; + private String video_uuid; + private String video_url; + + /** + * 目标信息 + */ + private List capture_info; + + @Override + public String toString() { + return "Behaviour{" + + "algo_model='" + algo_model + '\'' + +// ", image_base64='" + image_base64 + '\'' + + ", image_path='" + image_path + '\'' + + ", capture_time=" + capture_time + + ", in_num=" + in_num + + ", out_num=" + out_num + + ", area_num=" + area_num + + ", video_uuid='" + video_uuid + '\'' + + ", video_url='" + video_url + '\'' + + ", capture_info=" + capture_info + + '}'; + } + } + + @Data + public static class CompareResult { + private Integer target_id; + private Integer lib_id; + private String lib_name; + private Integer person_id; + private String person_name; + private Integer sex; + private String email; + private String tel; + private Integer certificate_type; + private String certificate_no; + private String image_path; + private String image_base64; + private String similarity; + } + + @Data + public static class Face { + private Integer capture_time; + private String point_x; + private String point_y; + private String orig_image_path; + private String crop_image_path; + /** + * r人脸抓拍大图base64 + */ + private String orig_image_base64; + /** + * 人脸抓拍小图base64 + */ + private String crop_image_base64; + + } + + @Data + public static class CaptureInfo { + private Integer target_id; + private String point_x; + private String point_y; + private Integer object_type; + private String plate_no; + } + + + @Data + public static class ChannelInfo { + /** + * 上报模式: + * 0:点位信息 + * 1:添加点位 + * 2:修改点位 + * 3:删除点位 + * 4:点位状态变化 + */ + private Integer mode; + + private String ipc_sn; + + private String ipc_addr; + + private Integer channel_id; + + private String channel_name; + + private Integer status; + + private String custom_code; + + } + + + @Data + public static class DeviceInfo { + private Integer device_code; + private String device_name; + private String device_sn; + private String custom_code; + } + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/AuthData.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/AuthData.java new file mode 100644 index 00000000..b4d0740e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/AuthData.java @@ -0,0 +1,35 @@ +package by.dimp.web.service.uniview.model; + + +import lombok.Data; + +@Data +public class AuthData { + + /** + * 摘要加密算法,首次请求时由设备返回 + */ + String algorithm; + + /** + * 保护质量,首次请求时由设备返回 + */ + String qop; + + /** + * 摘要加密字段,首次请求时由设备返回 + */ + String realm; + + /** + * 随机字符串,每当返回 401 时就会生成一个新的值, + * 原值失效,客户端需使用此值生成新的摘要信息 + */ + String nonce; + + /** + * 指示上个请求中的 nonce 是否过期,由设备返回 + */ + String stale; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/DeviceInfo.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/DeviceInfo.java new file mode 100644 index 00000000..0909102e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/DeviceInfo.java @@ -0,0 +1,18 @@ +package by.dimp.web.service.uniview.model; + +import lombok.Data; +import lombok.experimental.Accessors; + +@Accessors(chain = true) +@Data +public class DeviceInfo { + + private String account; + + private String password; + + private String deviceIp; + + private Integer port; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/RequestAuthData.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/RequestAuthData.java new file mode 100644 index 00000000..ae38c69d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/RequestAuthData.java @@ -0,0 +1,38 @@ +package by.dimp.web.service.uniview.model; + + +import lombok.Data; + +@Data +public class RequestAuthData extends AuthData { + + /** + * 鉴权用户名,由设备分配 + */ + private String username; + + /** + * 当前请求的 URI + */ + private String uri; + + /** + * nonce 计数器,防止重放攻击,由请求方生成 + */ + private String nc; + + /** + * 唯一字符串,用于提供额外防护,由请求方生成 + */ + private String cnonce; + + /** + * 摘要信息,用于验证身份,由请求方生成 + */ + private String response; + + + + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/UniViewAuthProperties.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/UniViewAuthProperties.java new file mode 100644 index 00000000..c0b43e2d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/UniViewAuthProperties.java @@ -0,0 +1,19 @@ +package by.dimp.web.service.uniview.model; + +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +@Setter +@Getter +@Configuration +@ConfigurationProperties(prefix = "uniview.auth") +public class UniViewAuthProperties { + + private String account; + + private String password; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/UniViewResult.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/UniViewResult.java new file mode 100644 index 00000000..7a3c9b9e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/UniViewResult.java @@ -0,0 +1,48 @@ +package by.dimp.web.service.uniview.model; + +import lombok.Data; + +/** + * 宇视返回结果封装 + * + * @param + */ + +@Data +public class UniViewResult { + + private Integer code; + + private String msg; + + private Integer status_code; + + private T data; + + public boolean success() { + return code.equals(0); + } + + public boolean unAuth() { + return code.equals(401); + } + + + public static UniViewResult success(T data) { + UniViewResult result = new UniViewResult<>(); + result.setCode(0); + result.setStatus_code(0); + result.setMsg("Succeed"); + return result; + } + + + public T result() { + if (success()) { + return data; + } else { + return null; + } + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/enums/AlarmModelEnum.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/enums/AlarmModelEnum.java new file mode 100644 index 00000000..5009ff38 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/enums/AlarmModelEnum.java @@ -0,0 +1,79 @@ +package by.dimp.web.service.uniview.model.enums; + +/** + * [ + * "FieldDetectorObjectsInside", // 区域入侵报警 + * "SafetyHelmetAlarm", // 未戴安全帽报警 + * "WorkClothesAlarm", // 未穿工服报警 + * "TelephoningAlarm", // 打电话报警 + * "NoMaskAlarm", // 未戴口罩报警 + * "FallOverAlarm", // 跌倒报警 + * "OffDutyDetectionAlarm", // 离岗报警 + * "SmokingAlarm", // 吸烟报警 + * "ReflectiveClothesDetectionAlarm", // 未穿反光服报警 + * "FireDetection", // 明火报警 + * "FumesAlarmBegin", // 烟雾报警 + * "CrowdDensityCriticalAlarm", //人员数量超限报警 + * "AbnormalParkingDetection", //车辆违停占用报警 + * "DisorderStackingDetection", // 物料乱堆放报警 + * "BareSoilCoverDetection", // 裸土未覆盖 + * "SafetyHarnessDetection", // 未穿安全背带报警 + * "UnwashedVehicleDetection" // 车辆未清洗报警 + * ] + */ +public enum AlarmModelEnum { + FieldDetectorObjectsInside(10, 1014, "区域入侵报警"), + SafetyHelmetAlarm(10, 1015, "未戴安全帽报警"), + WorkClothesAlarm(10, 1016, "未穿工服报警"), + TelephoningAlarm(10, 1017, "打电话报警"), + NoMaskAlarm(10, 1013, "未戴口罩报警"), + FallOverAlarm(10, 1018, "跌倒报警"), + OffDutyDetectionAlarm(10, 1019, "离岗报警"), + SmokingAlarm(10, 1020, "吸烟报警"), + ReflectiveClothesDetectionAlarm(10, 1021, "未穿反光服报警"), + FireDetection(10, 1022, "明火报警"), + FumesAlarmBegin(10, 1023, "烟雾报警"), + CrowdDensityCriticalAlarm(10, 1024, "人员数量超限报警"), + AbnormalParkingDetection(10, 1025, "车辆违停占用报警"), + DisorderStackingDetection(10, 1026, "物料乱堆放报警"), + BareSoilCoverDetection(10, 1027, "裸土未覆盖"), + SafetyHarnessDetection(10, 1028, "未穿安全背带报警"), + UnwashedVehicleDetection(10, 1029, "车辆未清洗报警"), + + UnKnow(-1, -1, "未知类型"); + + + private final Integer bigType; + + private final Integer smallType; + + private final String desc; + + AlarmModelEnum(Integer bigType, Integer smallType, String desc) { + this.bigType = bigType; + this.smallType = smallType; + this.desc = desc; + } + + public static AlarmModelEnum getAlarmModel(String alarmModel) { + for (AlarmModelEnum value : AlarmModelEnum.values()) { + if (value.name().equals(alarmModel)) { + return value; + } + } + return UnKnow; + } + + + public Integer getBigType() { + return bigType; + } + + public Integer getSmallType() { + return smallType; + } + + public String getDesc() { + return desc; + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/enums/AlarmTypeEnum.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/enums/AlarmTypeEnum.java new file mode 100644 index 00000000..a89f7091 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/enums/AlarmTypeEnum.java @@ -0,0 +1,42 @@ +package by.dimp.web.service.uniview.model.enums; + +import java.util.Objects; + +public enum AlarmTypeEnum { + + BehaviorAnalysis(1, "行为分析告警数据"), + AlarmRecovery(2, "告警恢复数据"), + FacialCapture(3, "人脸抓拍数据"), + FacialComparison(4, "人脸比对数据"), + BehavioralComparison(5, "行为比对数据"), + HeartBerth(6, "保活数据"), + PointChange(7, "点位变更数据"), + ; + + private final Integer type; + + private final String desc; + + AlarmTypeEnum(Integer type, String desc) { + this.type = type; + this.desc = desc; + } + + public static AlarmTypeEnum getAlarmType(Integer type) { + AlarmTypeEnum[] values = AlarmTypeEnum.values(); + for (AlarmTypeEnum value : values) { + if (Objects.equals(type, value.getType())) { + return value; + } + } + return null; + } + + public Integer getType() { + return type; + } + + public String getDesc() { + return desc; + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/enums/UniViewApiEnum.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/enums/UniViewApiEnum.java new file mode 100644 index 00000000..421fef55 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/enums/UniViewApiEnum.java @@ -0,0 +1,132 @@ +package by.dimp.web.service.uniview.model.enums; + +import org.springframework.http.HttpMethod; + +/** + * 宇视请求枚举 + */ +public enum UniViewApiEnum { + /** + * 新增人像库 + */ + PERSONLIB_ADD("/api/v2/personlib/add", HttpMethod.POST), + + PERSONLIB_DEL("/api/v2/personlib/delete", HttpMethod.POST), + + PERSONLIB_UPDATE("/api/v2/personlib/update", HttpMethod.POST), + + PERSONLIB_FIND("/api/v2/personlib/list", HttpMethod.POST), + + /** + * 新增人像 + */ + PERSON_ADD("/api/v2/person/add", HttpMethod.POST), + /** + * 批量新增人像 + */ + PERSON_BATCH_ADD("/api/v2/person/import", HttpMethod.POST), + /** + * 批量删除 + */ + PERSON_BATCH_DEL("/api/v2/person/delete", HttpMethod.POST), + /** + * 修改人像信息 + */ + PERSON_UPDATE("/api/v2/person/update", HttpMethod.POST), + + /** + * 查询人像信息 + */ + PERSON_FIND("/api/v2/person/list", HttpMethod.POST), + + + /** + * 获取 rsa 公钥 + */ + POINT_RAS("/api/v2/rsa/publickey", HttpMethod.POST), + + /** + * 通过 onvif 获取设备码流信息 + */ + POINT_DEVICE_INFO("/api/v2/channel/device/info", HttpMethod.POST), + /** + * 新增点位 + */ + POINT_ADD("/api/v2/channel/add", HttpMethod.POST), + /** + * 删除点位 + */ + POINT_DEL("/api/v2/channel/delete", HttpMethod.POST), + /** + * 修改点位信息 + */ + POINT_UPDATE("/api/v2/channel/update", HttpMethod.POST), + /** + * 获取点位列表 + */ + POINT_FIND("/api/v2/channel/list", HttpMethod.POST), + /** + * 批量新增点位 + */ + POINT_BATCH_ADD("/api/v2/channel/import", HttpMethod.POST), + + /** + * 跟新布防时间 + */ + POINT_CONTROL_TIME_UPDATE("/api/v2/control/time/update", HttpMethod.POST), + + /** + * 查询布防时间 + */ + POINT_CONTROL_TIME_FIND("/api/v2/control/time/get", HttpMethod.POST), + + /** + * 工服库相关 + */ + WORK_CLOTHES_LIB_ADD("/api/v2/workclotheslib/add", HttpMethod.POST), + WORK_CLOTHES_LIB_UPDATE("/api/v2/workclotheslib/update", HttpMethod.POST), + WORK_CLOTHES_LIB_DELETE("/api/v2/workclotheslib/delete", HttpMethod.POST), + WORK_CLOTHES_LIB_FIND("/api/v2/workclotheslib/list", HttpMethod.POST), + + /** + * 工服管理相关 + */ + WORK_CLOTHES_ADD("/api/v2/workclothes/add", HttpMethod.POST), + WORK_CLOTHES_BATCH_ADD("/api/v2/workclothes/batchadd", HttpMethod.POST), + WORK_CLOTHES_DELETE("/api/v2/workclothes/delete", HttpMethod.POST), + WORK_CLOTHES_FIND("/api/v2/workclothes/list", HttpMethod.POST), + /*---------------------------------------------------- 数据检索 -------------------------------------------------------------*/ + SEARCH_BEHAVIOR("/api/v2/search/behavior", HttpMethod.POST), // 行为分析检索 + SEARCH_FACECAP("/api/v2/search/facecap", HttpMethod.POST), // 人脸检索 + SEARCH_BEHAVIORMATCH("/api/v2/search/behaviormatch", HttpMethod.POST), // 行为比对检索 + SEARCH_FACEMATCH("/api/v2/search/facematch", HttpMethod.POST), // 人脸检索 + ; + + /** + * 请求uri + */ + private final String uri; + + /** + * 请求方法类型 + */ + private final HttpMethod method; + + /** + * 资源路径描述 + */ + + UniViewApiEnum(String uri, HttpMethod method) { + this.uri = uri; + this.method = method; + } + + public String getUri() { + return uri; + } + + public HttpMethod getMethod() { + return method; + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonAddReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonAddReq.java new file mode 100644 index 00000000..6f083d4f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonAddReq.java @@ -0,0 +1,60 @@ +package by.dimp.web.service.uniview.model.person; + +import lombok.Data; + +/** + * 添加人像库请求参数封装 + */ +@Data +public class PersonAddReq { + + /** + * 人像名称 + * 必填 + */ + private String person_name; + + /** + * 人像的base64图片 + * 必填 + */ + private String image_base64; + + /** + * 人像库id + * 必填 + */ + private Integer lib_id; + + /** + * 性别 + */ + private String sex; + + /** + * 邮件 + */ + private String email; + + /** + * 联系方式 + */ + private String tel; + + /** + * 证件类型 + * 1:身份证 2:护照 3:行驶证 99:其它 + */ + private String certificate_type; + + /** + * 证件号码 + */ + private String certificate_no; + + /** + * 出生日期 + */ + private String birth_date; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonAddResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonAddResp.java new file mode 100644 index 00000000..fafc3674 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonAddResp.java @@ -0,0 +1,13 @@ +package by.dimp.web.service.uniview.model.person; + +import lombok.Data; + +/** + * 添加人像库请求参数封装 + */ +@Data +public class PersonAddResp { + + private Integer person_id; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonBatchAddReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonBatchAddReq.java new file mode 100644 index 00000000..e49beffe --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonBatchAddReq.java @@ -0,0 +1,15 @@ +package by.dimp.web.service.uniview.model.person; + +import lombok.Data; + +import java.util.List; + +@Data +public class PersonBatchAddReq { + + /** + * 批量添加人像信息 + */ + private List person_list; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonBatchAddResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonBatchAddResp.java new file mode 100644 index 00000000..37530410 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonBatchAddResp.java @@ -0,0 +1,12 @@ +package by.dimp.web.service.uniview.model.person; + +import lombok.Data; + +import java.util.List; + +@Data +public class PersonBatchAddResp { + + private List fail_list; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonFindReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonFindReq.java new file mode 100644 index 00000000..cdcfc5dc --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonFindReq.java @@ -0,0 +1,55 @@ +package by.dimp.web.service.uniview.model.person; + +import lombok.Data; + +/** + * 添加人像库请求参数封装 + */ +@Data +public class PersonFindReq { + + /** + * 人员库 id + * 必填 + */ + private Integer lib_id; + + /** + * 当前页码 + * 必填 + */ + private Integer page = 1; + + /** + * 每页条数 + * 必填 + */ + private Integer pagesize = 10; + + /** + * 姓名(支持模糊查询) + */ + private String person_name; + + /** + * 性别 + * 999:全部 + * 1:男 + * 2:女 + * 99:未说明 + */ + private Integer sex = 999; + + /** + * 证件号 + */ + private String certificate_no; + + /** + * 建模状态 999:全部; + * 1:未建模 2:建模中;3:建模成功;4:建模失败 + */ + private Integer model_status = 999; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonFindResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonFindResp.java new file mode 100644 index 00000000..e319dd33 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonFindResp.java @@ -0,0 +1,84 @@ +package by.dimp.web.service.uniview.model.person; + +import lombok.Data; + +import java.util.List; + +@Data +public class PersonFindResp { + + /** + * 查询数据 + */ + private List data; + + /** + * 数据总数 + */ + private Integer total; + + + @Data + public static class PersonFind_Data { + /** + * 人员 id + */ + private Integer person_id; + + /** + * 姓名 + */ + private String person_name; + + /** + * 性别 1:男 2:女 99:未说明 + */ + private Integer sex; + + /** + * 邮箱 + */ + private String email; + + /** + * 联系方式 + */ + private String tel; + + /** + * 建模状态 1:未建模 2:建模中;3:建模成功;4:建模失败 + */ + private Integer modeling_type; + + /** + * 证件类型 1:身份证 2:护照 3:行驶证 99:其它 + */ + private Integer certificate_type; + + /** + * 证件号码 + */ + private String certificate_no; + + /** + * 图片路径 + */ + private String image_path; + + /** + *人员库 id + */ + private Integer lib_id; + + /** + * 出生日期 + */ + private String birth_date; + + /** + * 创建时间 + */ + private Integer create_time; + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonUpdateReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonUpdateReq.java new file mode 100644 index 00000000..3acfd5f9 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/person/PersonUpdateReq.java @@ -0,0 +1,57 @@ +package by.dimp.web.service.uniview.model.person; + +import lombok.Data; + +/** + * 添加人像库请求参数封装 + */ +@Data +public class PersonUpdateReq { + + /** + * 人员 id + * 必填 + */ + private String person_id; + + /** + * 名称 + */ + private String person_name; + + /** + * 性别 + */ + private Integer sex; + + /** + * 邮箱 + */ + private String email; + + /** + * 联系方式 + */ + private String tel; + + /** + * 证件类型 1:身份证 2:护照 3:行驶证 99:其它 + */ + private Integer certificate_type; + + /** + * 证件号码 + */ + private Integer certificate_no; + + /** + * 人脸照片 base64 + */ + private String image_base64; + + /** + * 出生日期 + */ + private String birth_date; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/personlib/FindPersonLibResult.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/personlib/FindPersonLibResult.java new file mode 100644 index 00000000..70ad1ae4 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/personlib/FindPersonLibResult.java @@ -0,0 +1,24 @@ +package by.dimp.web.service.uniview.model.personlib; + + +import lombok.Data; + +import java.util.List; + +@Data +public class FindPersonLibResult { + + private Integer total; + private List list; + + @Data + public static class PersonLib { + + private Integer lib_id; + private String lib_name; + + } + +} + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/personlib/UnViewLib.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/personlib/UnViewLib.java new file mode 100644 index 00000000..56b26c4d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/personlib/UnViewLib.java @@ -0,0 +1,10 @@ +package by.dimp.web.service.uniview.model.personlib; + +import lombok.Data; + +@Data +public class UnViewLib { + + private Integer lib_id; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/ControlTime.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/ControlTime.java new file mode 100644 index 00000000..c7add768 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/ControlTime.java @@ -0,0 +1,25 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +import java.util.List; + +@Data +public class ControlTime { + + private List monday; + + private List tuesday; + + private List wednesday; + + private List thursday; + + private List friday; + + private List saturday; + + private List sunday; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/GetOnvifReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/GetOnvifReq.java new file mode 100644 index 00000000..d853e039 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/GetOnvifReq.java @@ -0,0 +1,15 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +@Data +public class GetOnvifReq { + + private String ip; + + private Integer port; + + private String username; + + private String pwd; +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/GetOnvifResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/GetOnvifResp.java new file mode 100644 index 00000000..60a40d50 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/GetOnvifResp.java @@ -0,0 +1,85 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +import java.util.List; + +@Data +public class GetOnvifResp { + + /** + * 厂商 + */ + private String manufacturer; + + /** + * 型号 + */ + private String model; + + /** + * 固件版本 + */ + private String firmware_version; + + /** + * 序列号 + */ + private String serial_number; + + /** + * 硬件 id + */ + private String hardware_id; + + /** + * 码流列表 + */ + private List video; + + @Data + private class GetOnvif_Video { + + /** + * 码流 id + */ + private Integer id; + + /** + * rtsp 地址 + */ + private String rtsp; + + /** + * 码率 + */ + private String bitrate; + + /** + * 编码格式 + */ + private String encoding; + + /** + *帧率 + */ + private String fps; + + /** + * 画面组 + */ + private String gop; + + /** + * 质量 + */ + private String quality; + + /** + * 分辨率 + */ + private String ratio; + + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/GetPublickeyResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/GetPublickeyResp.java new file mode 100644 index 00000000..ec731bb0 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/GetPublickeyResp.java @@ -0,0 +1,10 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +@Data +public class GetPublickeyResp { + + private String public_key; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointAddReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointAddReq.java new file mode 100644 index 00000000..d3a041b7 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointAddReq.java @@ -0,0 +1,64 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +@Data +public class PointAddReq { + + /** + * 视频协议 1:onvif 2:rtsp + */ + private Integer type; + + /** + * 传输协议(AIBOX 需要,一体机不需要) 1: tcp 2: udp + */ + private Integer transport_type; + + /** + * 点位名称 + */ + private String channel_name; + + /** + * rtsp 地址(当视频协议为rtsp 时,该字段必填) + */ + private String rtsp; + + /** + * 相机 ip(onvif 添加流时必填) + */ + private String ip; + + /** + * 相机端口(onvif 添加流时必填) + */ + private Integer port; + + /** + * 相机用户名 + */ + private String username; + + /** + * 相机密码(RSA 加密) + */ + private String pwd; + + /** + * onvif 设备码流添加方式:1:主码流 2:自定义码流 + */ + private Integer video_type; + + /** + * 码流 id:当选择自定义码流时,该字段必填,值为获取设备码流信息接口返回的码流 id + */ + private Integer video_id; + + /** + * 自定义编码 + */ + private String custom_code; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointAddResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointAddResp.java new file mode 100644 index 00000000..b25aa76c --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointAddResp.java @@ -0,0 +1,11 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +@Data +public class PointAddResp { + + private Integer channel_id; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointBatchAddReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointBatchAddReq.java new file mode 100644 index 00000000..ae11cfa1 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointBatchAddReq.java @@ -0,0 +1,13 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +import java.util.List; + +@Data +public class PointBatchAddReq { + + private List channel_list; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointBatchAddResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointBatchAddResp.java new file mode 100644 index 00000000..1311f64d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointBatchAddResp.java @@ -0,0 +1,15 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +import java.util.List; + +@Data +public class PointBatchAddResp { + + /** + * 失败的点位名称列表 + */ + private List fail_list; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointControlTimeUpdateReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointControlTimeUpdateReq.java new file mode 100644 index 00000000..72580eb5 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointControlTimeUpdateReq.java @@ -0,0 +1,24 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +@Data +public class PointControlTimeUpdateReq { + + /** + * 点位 id + */ + private String channel_id; + + /** + * 算法类型 + */ + private String algo_model; + + /** + * 布防时间 + */ + private ControlTime control_time; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointFindReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointFindReq.java new file mode 100644 index 00000000..17700da6 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointFindReq.java @@ -0,0 +1,14 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +@Data +public class PointFindReq { + + private String channel_name; + + private Integer page; + + private Integer pagesize; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointFindResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointFindResp.java new file mode 100644 index 00000000..f9e6205d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointFindResp.java @@ -0,0 +1,80 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +import java.util.List; + +@Data +public class PointFindResp { + + private Integer total; + + private List channel_list; + + @Data + public static class PointFind_List{ + /** + * 点位 id + */ + private Integer channel_id; + /** + * 自定义编码 + */ + private String custom_code; + /** + * 点位名称 + */ + private String channel_name; + /** + * 视频流协议 1:onvif 2:rtsp + */ + private Integer type; + /** + * 传输协议(AIBOX 需 + * 要,一体机不需要) 1: tcp 2: udp + */ + private Integer transport_type; + + /** + * 点位 ip + */ + private String ip; + + /** + * 点位端口 + */ + private Integer port; + + /** + * 相机序列号 + */ + private String serial_number; + + /** + * 型号 + */ + private String model; + + /** + * 厂商 + */ + private String manufacturer; + + /** + * 1:在线;2:离线 + */ + private Integer status; + + /** + * rtsp 地址 + */ + private String rtsp; + + /** + * flv 地址(一体机返回) + */ + private String flv; + } + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointUpdateReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointUpdateReq.java new file mode 100644 index 00000000..731bd51c --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/PointUpdateReq.java @@ -0,0 +1,16 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@EqualsAndHashCode(callSuper = true) +@Data +public class PointUpdateReq extends PointAddReq { + + /** + * 点位 id + */ + private Integer channel_id; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/TimeSlot.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/TimeSlot.java new file mode 100644 index 00000000..c2939da3 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/point/TimeSlot.java @@ -0,0 +1,18 @@ +package by.dimp.web.service.uniview.model.point; + +import lombok.Data; + +@Data +public class TimeSlot { + + /** + * 开始时间,例如 00:00 + */ + private String start; + + /** + * 结束时间,例如:04:00 + */ + private String end; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/search/SearchBehaviorReq.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/search/SearchBehaviorReq.java new file mode 100644 index 00000000..67f9c5af --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/search/SearchBehaviorReq.java @@ -0,0 +1,55 @@ +package by.dimp.web.service.uniview.model.search; + +import lombok.Data; +import java.util.List; + +@Data +public class SearchBehaviorReq { + + /** + * 页码数 + */ + private Integer page; + + /** + * 每页数据量 + */ + private Integer pagesize; + + /** + * 通道 id + */ + private List channel_id; + + /** + * 算法类型,送空查全部 + */ + private List algo_model; + + /** + * 开始时间,10 位时间戳(秒级) + */ + private Integer start_time; + + /** + * 结束时间,10 位时间戳(秒级) + */ + private Integer end_time; + + /** + * 是否有比对:1 全部,2 有比对 不传查全部 + */ + private Integer compare_flag; + + /** + * 目标类型 区域入侵告警查询条件 1 行人 2 + * 机动车 3 非机动车 + */ + private Integer object_type; + + /** + * 车牌号 + */ + private String plate_no; + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/search/SearchBehaviorResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/search/SearchBehaviorResp.java new file mode 100644 index 00000000..0f309df2 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/search/SearchBehaviorResp.java @@ -0,0 +1,59 @@ +package by.dimp.web.service.uniview.model.search; + +import lombok.Data; + +import java.util.List; + +@Data +public class SearchBehaviorResp { + + private Integer total; + + private List list; + + @Data + public static class ListData { + + private Integer alarm_id; + + private String big_picture_url; + + private String BigImageData; + + private String algo_model; + + private Integer capture_time; + + private Integer channel_id; + + private String channel_name; + + private String video_url; + + private List object_list; + + private List compare_list; + } + + @Data + public static class ObjectList { + private Integer plate_no; + } + + @Data + public static class CompareData { + + private Integer base_image_id; + + private String base_image_url; + + private String name; + + private String certificate_no; + + private Integer similarity; + + private Integer match_type; + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/workclothes/BatchAddWorkClothesResp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/workclothes/BatchAddWorkClothesResp.java new file mode 100644 index 00000000..503c4d01 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/workclothes/BatchAddWorkClothesResp.java @@ -0,0 +1,23 @@ +package by.dimp.web.service.uniview.model.workclothes; + +import lombok.Data; + +import java.util.List; + +@Data +public class BatchAddWorkClothesResp { + + private List workclothes_id; + + private List fail_list; + + @Data + public static class BatchAddWorkClothes_FailData { + + private Integer index; + + private String reason; + + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/workclothes/FindWorkClothesResult.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/workclothes/FindWorkClothesResult.java new file mode 100644 index 00000000..d085e952 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/workclothes/FindWorkClothesResult.java @@ -0,0 +1,30 @@ +package by.dimp.web.service.uniview.model.workclothes; + +import lombok.Data; + +import java.util.List; + +@Data +public class FindWorkClothesResult { + + private Integer total; + + private List workclothes_list; + + @Data + public static class WorkClothes_Data { + + private Integer lib_id; + + private Integer workclothes_id; + + private String image_path; + + private Integer create_time; + + private Integer model_status; + + } + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/workclotheslib/WorkClothesLibResult.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/workclotheslib/WorkClothesLibResult.java new file mode 100644 index 00000000..187ed7f8 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/model/workclotheslib/WorkClothesLibResult.java @@ -0,0 +1,27 @@ +package by.dimp.web.service.uniview.model.workclotheslib; + +import lombok.Data; + +import java.util.List; + +@Data +public class WorkClothesLibResult { + + private Integer total; + + private List data; + + @Data + public static class WorkClothesLib_Data { + + private Integer lib_id; + + private String lib_name; + + private Integer create_time; + + + } + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DataReportService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DataReportService.java new file mode 100644 index 00000000..efcd2619 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DataReportService.java @@ -0,0 +1,9 @@ +package by.dimp.web.service.uniview.service; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +@Slf4j +@Component +public class DataReportService { +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DataSearchService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DataSearchService.java new file mode 100644 index 00000000..cb54b668 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DataSearchService.java @@ -0,0 +1,30 @@ +package by.dimp.web.service.uniview.service; + +import by.dimp.web.service.uniview.model.DeviceInfo; +import by.dimp.web.service.uniview.model.UniViewResult; +import by.dimp.web.service.uniview.model.enums.UniViewApiEnum; +import by.dimp.web.service.uniview.model.search.SearchBehaviorReq; +import by.dimp.web.service.uniview.model.search.SearchBehaviorResp; +import by.dimp.web.service.uniview.utils.UniViewHttp; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + + +@Slf4j +@Service +public class DataSearchService { + + @Resource + private UniViewHttp uniViewHttp; +// private TbEqpService eqpService; + + + + + public SearchBehaviorResp searchBehavior(SearchBehaviorReq req, DeviceInfo deviceInfo) { + UniViewResult request = uniViewHttp.request(deviceInfo, UniViewApiEnum.SEARCH_BEHAVIOR, req, SearchBehaviorResp.class); + return request.getData(); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DeviceConfigService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DeviceConfigService.java new file mode 100644 index 00000000..946ff6d9 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DeviceConfigService.java @@ -0,0 +1,9 @@ +package by.dimp.web.service.uniview.service; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +@Slf4j +@Component +public class DeviceConfigService { +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DeviceService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DeviceService.java new file mode 100644 index 00000000..966cdc31 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/DeviceService.java @@ -0,0 +1,9 @@ +package by.dimp.web.service.uniview.service; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +@Slf4j +@Component +public class DeviceService { +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/FaceCaptureService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/FaceCaptureService.java new file mode 100644 index 00000000..72397a99 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/FaceCaptureService.java @@ -0,0 +1,17 @@ +package by.dimp.web.service.uniview.service; + +import by.dimp.web.service.uniview.utils.UniViewHttp; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Component; + +/** + * 人脸抓怕检索 + */ +@Component +public class FaceCaptureService { + + @Resource + private UniViewHttp univiewHttp; + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/PersonLibService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/PersonLibService.java new file mode 100644 index 00000000..6017961d --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/PersonLibService.java @@ -0,0 +1,97 @@ +package by.dimp.web.service.uniview.service; + +import by.dimp.web.service.uniview.model.DeviceInfo; +import by.dimp.web.service.uniview.model.UniViewResult; +import by.dimp.web.service.uniview.model.enums.UniViewApiEnum; +import by.dimp.web.service.uniview.model.personlib.FindPersonLibResult; +import by.dimp.web.service.uniview.model.personlib.UnViewLib; +import by.dimp.web.service.uniview.utils.UniViewHttp; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONObject; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * 人员库操作服务 + * + * @author lxj + */ +@Slf4j +@Component +public class PersonLibService { + + @Resource + private UniViewHttp univiewHttp; + + /** + * 宇视设备新增人像库,并且返回人像库id,如果请求失败,返回null + */ + public UnViewLib add(String libName, DeviceInfo deviceInfo) { + Map params = new HashMap<>(1); + params.put("lib_name", libName); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.PERSONLIB_ADD, params, UnViewLib.class); + return request.getData(); + } + + /** + * 删除人员库 + */ + public boolean del(DeviceInfo deviceInfo, Integer... libIds) { + if (libIds.length == 0) { + log.info("libIds 不能为空"); + return false; + } + JSONObject params = new JSONObject(); + params.put("lib_id", Arrays.asList(libIds)); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.PERSONLIB_DEL, params, Integer.class); + return request.success(); + } + + /** + * 修改设备人像库信息 + * + * @param deviceInfo 设备信息 + * @param libId 人像库id + * @param LibName 人像库名称 + * @return 返回是否修改成 + */ + public boolean update(DeviceInfo deviceInfo, Integer libId, String LibName) { + JSONObject params = new JSONObject(); + params.put("lib_id", libId); + params.put("lib_name", LibName); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.PERSONLIB_UPDATE, params, Integer.class); + return request.success(); + } + + /** + * 查询设备人像库信息 + * + * @param deviceInfo 设备信息 + * @param libName 人像库名称(支持模糊查询) + * @param current 查询当前页数 + * @param size 查询条数 + * @return 返回查询结果 + */ + public FindPersonLibResult find(DeviceInfo deviceInfo, String libName, Integer current, Integer size) { + JSONObject params = new JSONObject(); + if (StrUtil.isNotBlank(libName)) { + params.put("lib_name", libName); + } + if (current == null) { + current = 1; + } + if (size == null) { + size = 10; + } + params.put("page", current); + params.put("pagesize", size); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.PERSONLIB_FIND, params, FindPersonLibResult.class); + return request.getData(); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/PersonService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/PersonService.java new file mode 100644 index 00000000..f2c7617f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/PersonService.java @@ -0,0 +1,53 @@ +package by.dimp.web.service.uniview.service; + + +import by.dimp.web.service.uniview.model.DeviceInfo; +import by.dimp.web.service.uniview.model.UniViewResult; +import by.dimp.web.service.uniview.model.enums.UniViewApiEnum; +import by.dimp.web.service.uniview.model.person.*; +import by.dimp.web.service.uniview.utils.UniViewHttp; +import cn.hutool.json.JSONObject; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Component; + +/** + * 人像管理api + * + * @author lxj + */ +@Component +public class PersonService { + + @Resource + private UniViewHttp univiewHttp; + + + public PersonAddResp add(DeviceInfo deviceInfo, PersonAddReq personAddReq) { + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.PERSON_ADD, personAddReq, PersonAddResp.class); + return request.result(); + } + + public PersonBatchAddResp batchAdd(DeviceInfo deviceInfo, PersonBatchAddReq personBatchAddReq) { + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.PERSON_BATCH_ADD, personBatchAddReq, PersonBatchAddResp.class); + return request.result(); + } + + public Boolean batchDel(DeviceInfo deviceInfo, Integer[] personIds) { + JSONObject params = new JSONObject(); + params.put("person_id_list", personIds); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.PERSON_BATCH_DEL, params, String.class); + return request.success(); + } + + public Boolean update(DeviceInfo deviceInfo, PersonUpdateReq req) { + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.PERSON_UPDATE, req, String.class); + return request.success(); + } + + + public PersonFindResp find(DeviceInfo deviceInfo, PersonFindReq req) { + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.PERSON_FIND, req, PersonFindResp.class); + return request.result(); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/PointManagerService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/PointManagerService.java new file mode 100644 index 00000000..67003c9f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/PointManagerService.java @@ -0,0 +1,131 @@ +package by.dimp.web.service.uniview.service; + +import by.dimp.web.service.uniview.model.DeviceInfo; +import by.dimp.web.service.uniview.model.UniViewResult; +import by.dimp.web.service.uniview.model.enums.UniViewApiEnum; +import by.dimp.web.service.uniview.model.point.*; +import by.dimp.web.service.uniview.utils.UniViewHttp; +import com.alibaba.fastjson2.JSONObject; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 点位管理api + * + * @author lxj + */ +@Component +public class PointManagerService { + + @Resource + private UniViewHttp univiewHttp; + + /** + * 获取 rsa 公钥 + * + * @param deviceInfo 设备信息 + * @return GetPublickeyResp 获取公钥响应 + */ + public GetPublickeyResp getPublickey(DeviceInfo deviceInfo) { + GetPublickeyResp getPublickeyResp = new GetPublickeyResp(); + getPublickeyResp.setPublic_key(""); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.POINT_RAS, null, GetPublickeyResp.class); + return request.result(); + } + + /** + * 获取码流信息 + */ + public GetOnvifResp getOnvif(DeviceInfo deviceInfo, GetOnvifReq req) { + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.POINT_RAS, req, GetOnvifResp.class); + return request.result(); + } + + /** + * 新增点位 + * + * @param deviceInfo 设备信息 + * @param req 点位新增请求 + * @return 点位新增响应 + */ + public PointAddResp pointAdd(DeviceInfo deviceInfo, PointAddReq req) { + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.POINT_ADD, req, PointAddResp.class); + return request.result(); + } + + /** + * 删除设备中的点位信息 + * + * @param deviceInfo 设备信息 + * @param channelIds 点位ID列表 + * @return 删除结果 + */ + public Boolean pointDel(DeviceInfo deviceInfo, List channelIds) { + JSONObject params = new JSONObject(); + params.put("channel_id_list", channelIds); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.POINT_DEL, params, String.class); + return request.success(); + } + + /** + * 更新设备中的点位信息 + * + * @param deviceInfo 设备信息 + * @param req 点位更新请求 + * @return 更新结果 + */ + public Boolean pointUpdate(DeviceInfo deviceInfo, PointUpdateReq req) { + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.POINT_UPDATE, req, String.class); + return request.success(); + } + + /** + * 根据设备信息和点位查找请求来查找点位信息 + * + * @param deviceInfo 设备信息 + * @param req 点位查找请求 + * @return 点位查找响应 + */ + public PointFindResp pointFind(DeviceInfo deviceInfo, PointFindReq req) { + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.POINT_FIND, req, PointFindResp.class); + return request.result(); + } + + /** + * 批量添加点位信息到设备中 + * + * @param deviceInfo 设备信息 + * @param req 批量添加点位请求 + * @return 批量添加点位响应 + */ + public PointBatchAddResp batchAdd(DeviceInfo deviceInfo, PointBatchAddReq req) { + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.POINT_BATCH_ADD, req, PointBatchAddResp.class); + return request.result(); + } + + /** + * 添加/修改 设备布防时间 + */ + public Boolean pointControlTimeUpdate(DeviceInfo deviceInfo, PointControlTimeUpdateReq req) { + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.POINT_CONTROL_TIME_UPDATE, req, String.class); + return request.success(); + } + + /** + * 获取布防时间 + * + * @param deviceInfo 设备信息 + * @param channel_id 通道 id + * @param algo_model 算法类型 + * @return 返回查询结果 + */ + public ControlTime findControlTime(DeviceInfo deviceInfo, Integer channel_id, Integer algo_model) { + JSONObject params = new JSONObject(); + params.put("channel_id", channel_id); + params.put("algo_model", algo_model); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.POINT_CONTROL_TIME_FIND, params, ControlTime.class); + return request.result(); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/VideoAlarmService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/VideoAlarmService.java new file mode 100644 index 00000000..6d94b8eb --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/VideoAlarmService.java @@ -0,0 +1,183 @@ +package by.dimp.web.service.uniview.service; + +import by.dimp.web.service.uniview.model.AlarmReportData; +import by.dimp.web.service.uniview.model.enums.AlarmModelEnum; +import by.dimp.web.service.uniview.model.enums.AlarmTypeEnum; +import cn.hutool.core.date.DateUtil; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; + +/** + * 宇视人体设备告警数据处理 + * + * @author lxj + */ +@Slf4j +@Service +public class VideoAlarmService { + + // @Resource +// private IFileUploadServer fileUploadServer; + +// private TsWorkOrderService workOrderService; +// @Resource +// private TbEqpService eqpService; + + public void handleAlarmData(AlarmReportData alarmReportData) { + Integer type = alarmReportData.getType(); + AlarmTypeEnum alarmType = AlarmTypeEnum.getAlarmType(type); + if (alarmType == null) { + log.info("未知的数据上报类型。"); + return; + } + switch (alarmType) { + case BehaviorAnalysis: { + handleBehaviorAnalysis(alarmReportData); + break; + } + case AlarmRecovery: { + handleAlarmRecovery(alarmReportData); + break; + } + case FacialCapture: { + handleFacialCapture(alarmReportData); + break; + } + case FacialComparison: { + handleFacialComparison(alarmReportData); + break; + } + case BehavioralComparison: { + handleBehavioralComparison(alarmReportData); + break; + } + case HeartBerth: { + handleHeartBerth(alarmReportData); + break; + } + case PointChange: { + handlePointChange(alarmReportData); + break; + } + } + } + + /** + * 设备心跳上报 + * + * @param alarmReportData 上报数据 + */ + private void handleHeartBerth(AlarmReportData alarmReportData) { + // 处理心跳数据 + log.info("设备心跳数据上报,data={}", alarmReportData); + } + + /** + * 行为分析告警数据上报 + * + * @param alarmReportData 告警数据 + */ + private void handleBehaviorAnalysis(AlarmReportData alarmReportData) { + log.info("行为告警数据上报,data={}", alarmReportData); + // 处理图片 +// SaveAndModifyTsWorkOrderReq tsWorkOrderReq = new SaveAndModifyTsWorkOrderReq(); +// String alarmId = String.valueOf(alarmReportData.getEvent_id()); +// tsWorkOrderReq.setRecordId(alarmId); +// String nextId = SequenceUtil.getNextId(SequenceTypeEnum.WORK_ID); +// tsWorkOrderReq.setWorkNo(nextId); +// tsWorkOrderReq.setWorkName("系统告警"); +// AlarmModelEnum alarmModelEnum = AlarmModelEnum.getAlarmModel(alarmReportData.getBehaviour().getAlgo_model()); +// tsWorkOrderReq.setWorkBigType(alarmModelEnum.getBigType()); +// tsWorkOrderReq.setWorkType(alarmModelEnum.getSmallType()); +// tsWorkOrderReq.setUrgentType(1); +// tsWorkOrderReq.setOrderId(alarmId); +// tsWorkOrderReq.setCustName("系统"); +// tsWorkOrderReq.setCustPhone("-1"); +// tsWorkOrderReq.setCustAddress("-1"); +// tsWorkOrderReq.setWorkReporName("系统"); +// tsWorkOrderReq.setWorkReporPhone("-1"); +// tsWorkOrderReq.setWorkRemark("设备告警自动上报"); +// tsWorkOrderReq.setServBeginTime(DateUtil.date()); +// tsWorkOrderReq.setServEndTime(DateUtil.offsetDay(DateUtil.date(), 10)); +// tsWorkOrderReq.setOrgId(10012L); + // 根据ip反查设备信息 + String deviceIp = alarmReportData.getDevice_info().getDevice_name(); + + // 生成图片访问地址 + String imagePath = "http://" + deviceIp + alarmReportData.getBehaviour().getImage_path(); +// PictureInfoDTO pictureInfoDTO = new PictureInfoDTO(); +// pictureInfoDTO.setName("告警图片"); +// pictureInfoDTO.setUrl(imagePath); +// tsWorkOrderReq.setWorkImgPath(Collections.singletonList(pictureInfoDTO)); +// tsWorkOrderReq.setRemark("系统自动生成"); +// String channelId = String.valueOf(alarmReportData.getChannel_info().getChannel_id()); +// tsWorkOrderReq.setCreateEmpId(channelId); +// tsWorkOrderReq.setCreateEmpName("系统自动上报"); +// tsWorkOrderReq.setCreateTime(new Date()); +// EqpModel byEqpIp = eqpService.findByEqpIp(deviceIp); +// if (byEqpIp == null) { +// log.error("未知的宇视分析设备"); +// return; +// } +// tsWorkOrderReq.setPlNo(byEqpIp.getEqpIp()); +// tsWorkOrderReq.setPlName(byEqpIp.getEqpName()); +// tsWorkOrderReq.setBerthNo(byEqpIp.getEqpIp()); +// tsWorkOrderReq.setCarNumber(alarmReportData.getBehaviour().getAlgo_model()); +// tsWorkOrderReq.setWorkOrderProcessList(new ArrayList<>(0)); +// BizResult result = workOrderService.saveTsWorkOrder(tsWorkOrderReq); +// if (result.isSuccess()) { +// log.info("事件写入表成功."); +// } + } + + /** + * 告警恢复数据上报 + * + * @param alarmReportData 告警数据 + */ + private void handleAlarmRecovery(AlarmReportData alarmReportData) { + + } + + /** + * 人脸抓拍上报 + * + * @param alarmReportData 告警数据 + */ + private void handleFacialCapture(AlarmReportData alarmReportData) { + + } + + /** + * 人脸比对数据上报 + * + * @param alarmReportData 告警数据 + */ + private void handleFacialComparison(AlarmReportData alarmReportData) { + + } + + /** + * 行为比对数据上报 + * + * @param alarmReportData 告警数据 + */ + private void handleBehavioralComparison(AlarmReportData alarmReportData) { + + } + + /** + * 点位变更数据上报 + * + * @param alarmReportData 告警数据 + */ + private void handlePointChange(AlarmReportData alarmReportData) { + + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/WorkClothesLibService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/WorkClothesLibService.java new file mode 100644 index 00000000..95545488 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/WorkClothesLibService.java @@ -0,0 +1,62 @@ +package by.dimp.web.service.uniview.service; + + +import by.dimp.web.service.uniview.model.DeviceInfo; +import by.dimp.web.service.uniview.model.UniViewResult; +import by.dimp.web.service.uniview.model.enums.UniViewApiEnum; +import by.dimp.web.service.uniview.model.workclotheslib.WorkClothesLibResult; +import by.dimp.web.service.uniview.utils.UniViewHttp; +import com.alibaba.fastjson2.JSONObject; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +@Slf4j +@Component +public class WorkClothesLibService { + + @Resource + private UniViewHttp univiewHttp; + + public Integer addWorkClothesLib(DeviceInfo deviceInfo, String libName) { + JSONObject params = new JSONObject(); + params.put("lib_name", libName); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.WORK_CLOTHES_LIB_ADD, params, Integer.class); + return request.result(); + } + + /** + * 修改工服库信息, 根据id修改名称 + */ + public Boolean updateWorkClothesLib(DeviceInfo deviceInfo, Integer libId, String libName) { + JSONObject params = new JSONObject(); + params.put("lib_id", libId); + params.put("lib_name", libName); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.WORK_CLOTHES_LIB_UPDATE, params, String.class); + return request.success(); + } + + /** + * 根据工服库id删除工服库 + */ + public Boolean deleteWorkClothesLib(DeviceInfo deviceInfo, Integer libId) { + JSONObject params = new JSONObject(); + params.put("lib_id", libId); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.WORK_CLOTHES_LIB_DELETE, params, String.class); + return request.success(); + } + + /** + * 工服库名称模糊分页查询 + */ + public WorkClothesLibResult findWorkClothesLib(DeviceInfo deviceInfo, String libName, Integer page, Integer pageSize) { + JSONObject params = new JSONObject(); + params.put("lib_name", libName); + params.put("page", page); + params.put("pagesize", pageSize); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.WORK_CLOTHES_LIB_FIND, params, WorkClothesLibResult.class); + return request.result(); + } + + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/WorkClothesService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/WorkClothesService.java new file mode 100644 index 00000000..1ee53781 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/service/WorkClothesService.java @@ -0,0 +1,81 @@ +package by.dimp.web.service.uniview.service; + +import by.dimp.web.service.uniview.model.DeviceInfo; +import by.dimp.web.service.uniview.model.UniViewResult; +import by.dimp.web.service.uniview.model.enums.UniViewApiEnum; +import by.dimp.web.service.uniview.model.workclothes.BatchAddWorkClothesResp; +import by.dimp.web.service.uniview.model.workclothes.FindWorkClothesResult; +import by.dimp.web.service.uniview.utils.UniViewHttp; +import com.alibaba.fastjson2.JSONObject; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Slf4j +@Component +public class WorkClothesService { + + @Resource + private UniViewHttp univiewHttp; + + /** + * 新增工服-单个 + * + * @param deviceInfo 增加工服的设备 + * @param libId 新增工服的库id + * @param imageBase64 工服图片base64 + * @return 返回工服的人员id + */ + public Integer add(DeviceInfo deviceInfo, Integer libId, String imageBase64) { + JSONObject params = new JSONObject(); + params.put("lib_id", libId); + params.put("image_base64", imageBase64); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.WORK_CLOTHES_ADD, params, Integer.class); + return request.result(); + } + + + /** + * 批量新增工服,一次最多添加50条 + * + * @return 返回成功以及失败的市局 + */ + public BatchAddWorkClothesResp batchAdd(DeviceInfo deviceInfo, Integer libId, List imageBase64s) { + JSONObject params = new JSONObject(); + params.put("lib_id", libId); + params.put("image_base64", imageBase64s); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.WORK_CLOTHES_BATCH_ADD, params, BatchAddWorkClothesResp.class); + return request.result(); + } + + + public Boolean delete(DeviceInfo deviceInfo, Integer libId, List workClothesIds) { + JSONObject params = new JSONObject(); + params.put("lib_id", libId); + params.put("workclothes_id_list", workClothesIds); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.WORK_CLOTHES_DELETE, params, String.class); + return request.success(); + } + + /** + * 分页查询工服 + * + * @param deviceInfo 设备 + * @param libId 设备id + * @param page 分页查询页码 + * @param size 分页查询size + * @param status 建模状态 999:全部;1:未建模 2:建模中;3:建模成功;4:建模失败 + */ + public FindWorkClothesResult find(DeviceInfo deviceInfo, Integer libId, Integer page, Integer size, Integer status) { + JSONObject params = new JSONObject(); + params.put("lib_id", libId); + params.put("page", page); + params.put("pagesize", size); + params.put("model_status", status); + UniViewResult request = univiewHttp.request(deviceInfo, UniViewApiEnum.WORK_CLOTHES_FIND, params, FindWorkClothesResult.class); + return request.result(); + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/utils/UniViewHttp.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/utils/UniViewHttp.java new file mode 100644 index 00000000..98f814ad --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/uniview/utils/UniViewHttp.java @@ -0,0 +1,205 @@ +package by.dimp.web.service.uniview.utils; + + +import by.dimp.web.service.uniview.model.AuthData; +import by.dimp.web.service.uniview.model.DeviceInfo; +import by.dimp.web.service.uniview.model.UniViewResult; +import by.dimp.web.service.uniview.model.enums.UniViewApiEnum; +import cn.hutool.core.util.IdUtil; +import cn.hutool.crypto.SecureUtil; +import cn.hutool.http.HttpStatus; +import com.alibaba.fastjson2.JSONObject; +import com.alibaba.fastjson2.TypeReference; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Component; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestTemplate; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static by.dimp.web.service.uniview.UniViewConstants.*; + + +/** + * 宇视HTTP处理 + */ +@Slf4j +@Component +public class UniViewHttp { + + @Autowired + private RestTemplate restTemplate; + + /** + * 用于缓存宇视设备鉴权信息的map + * key:设备ip + * value:设备的鉴权信息 + */ + private static final Map CACHE_AUTH_MAP = new HashMap<>(16); + + public UniViewResult request(DeviceInfo deviceInfo, UniViewApiEnum api, Object data, Class cls) { + UniViewResult result = r(deviceInfo, api, data, cls); + if (result.success()) { + log.info("宇视设备请求成功,result: {}", result); + return result; + } else if (result.unAuth()) { + // 鉴权失败则再次请求 + return r(deviceInfo, api, data, cls); + } else { + // 如果请求失败,尝试再次请求,如果依然失败则放弃 + return r(deviceInfo, api, data, cls); + } + } + + /** + * 发起宇视平台请求 + *

由于宇视所有请求均为POST,所以请求的时候不做区分

+ * + * @param deviceInfo 请求到达的设备信息 + * @param api 请求资源信息 + * @param data 请求数据 + * @param cls 返回数据类型 + * @param 返回数据裂隙 + * @return 返回响应数据 + */ + private UniViewResult r(DeviceInfo deviceInfo, UniViewApiEnum api, Object data, Class cls) { + // 生成请求完整路径 + String requestUrl = UNIVIEW_HTTP_PROTOCOL + deviceInfo.getDeviceIp() + ":" + deviceInfo.getPort() + api.getUri(); + // 获取鉴权信息 + AuthData authData = CACHE_AUTH_MAP.get(deviceInfo.getDeviceIp()); + // 如果存在鉴权信息,依据文档生成鉴权信息 + String authorization = null; + if (authData != null) { + authorization = createAuthData(deviceInfo, api, authData); + } + + + try { + // 设置请求头 + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + if (authorization != null) { + headers.add(UNIVIEW_REQUEST_AUTH_KEY, authorization); + } + HttpEntity requestEntity = null; + if (data == null) { + requestEntity = new HttpEntity<>(null, headers); + } + if (data instanceof JSONObject) { + JSONObject obj = (JSONObject) data; + requestEntity = new HttpEntity<>(obj.toJSONString(), headers); + } else { + requestEntity = new HttpEntity<>(JSONObject.toJSONString(data), headers); + } + ResponseEntity exchange = restTemplate.exchange(requestUrl, api.getMethod(), requestEntity, String.class); + int statusCode = exchange.getStatusCodeValue(); + String body = exchange.getBody(); + + if (HttpStatus.HTTP_UNAUTHORIZED == statusCode) { + // 处理401请求参数,并且返回鉴权信息 + handleAuthData(exchange.getHeaders(), deviceInfo); + AuthData authData1 = CACHE_AUTH_MAP.get(deviceInfo.getDeviceIp()); + log.info("宇视设备请求返回401, 开始处理鉴权数据,authData1 = {}", authData1); + return JSONObject.parseObject(body, new TypeReference>(cls) { + }); + } + UniViewResult result = JSONObject.parseObject(body, new TypeReference>(cls) { + }); + log.info("宇视设备请求返回完成,result={}", result); + return result; + } catch (Exception e) { + log.info("发起宇视设备请求失败,msg:{}", e.getMessage()); + if(e instanceof HttpClientErrorException){ + HttpClientErrorException exception = (HttpClientErrorException) e; + if (exception.getRawStatusCode() == 401) { + HttpHeaders responseHeaders = exception.getResponseHeaders(); + handleAuthData(responseHeaders, deviceInfo); + AuthData authData1 = CACHE_AUTH_MAP.get(deviceInfo.getDeviceIp()); + log.info("宇视设备请求返回401, 开始处理鉴权数据,authData1 = {}", authData1); + } + + } + + + UniViewResult uniViewResult = new UniViewResult<>(); + uniViewResult.setCode(-1); + uniViewResult.setMsg("发起请求异常,msg=" + e.getMessage()); + uniViewResult.setStatus_code(-1); + return uniViewResult; + } + } + + + private static String createAuthData(DeviceInfo deviceInfo, UniViewApiEnum api, AuthData authData) { + // r1 原始字符串 + String OriginalR1 = deviceInfo.getAccount() + ":" + authData.getRealm() + ":" + deviceInfo.getPassword(); + // 进行md5加密 + String md5R1 = SecureUtil.md5(OriginalR1); + // 生成r1 +// String r1 = HexUtil.encodeHexStr(md5R1); + // r2原始字符串 + String OriginalR2 = api.getMethod().name() + ":" + api.getUri(); + // 进行md5加密 + String md5R2 = SecureUtil.md5(OriginalR2); + // 生成r1 +// String r2 = HexUtil.encodeHexStr(md5R2); + + // response 原始字符串 + String cnonce = IdUtil.fastSimpleUUID(); + String nc = "00000002"; + String OriginalResponse = md5R1 + ":" + authData.getNonce() + ":" + nc + ":" + cnonce + ":" + authData.getQop() + ":" + md5R2; + // 进行md5加密 + String md5Response = SecureUtil.md5(OriginalResponse); + // 生成r1 +// String response = HexUtil.encodeHexStr(md5Response); + + return UNIVIEW_AUTH_PREFIX + "username=\"" + deviceInfo.getAccount() + "\"," + + "realm=\"" + authData.getRealm() + "\"," + + "nonce=\"" + authData.getNonce() + "\"," + + "uri=\"" + api.getUri() + "\"," + + "algorithm=\"" + authData.getAlgorithm() + "\"," + + "qop=\"" + authData.getQop() + "\"," + + "nc=\"" + nc + "\"," + + "cnonce=\"" + cnonce + "\"," + + "response=\"" + md5Response + "\""; + } + + /** + * 解析响应体参数,并缓存到鉴权map里 + * + */ + private void handleAuthData(HttpHeaders responseHeaders, DeviceInfo deviceInfo) { + List headers = responseHeaders.get(UNIVIEW_AUTH_FAIL_PRFIX); + headers.forEach(header -> { + log.info("获取到宇视设备返回的响应体参数: data: {}", header); + if (header.startsWith(UNIVIEW_AUTH_PREFIX)) { + header = header.replace(UNIVIEW_AUTH_PREFIX, ""); + } + String[] s = header.split(","); + if (s.length > 0) { + Map m = new HashMap<>(); + for (String str : s) { + String[] split = str.split("="); + String s1 = split[1].replaceAll("\"", ""); + m.put(split[0], s1); + } + AuthData authData = new AuthData(); + authData.setAlgorithm(m.get("algorithm")); + authData.setQop(m.get("qop")); + authData.setRealm(m.get("realm")); + authData.setNonce(m.get("nonce")); + authData.setStale(m.get("stale")); + CACHE_AUTH_MAP.put(deviceInfo.getDeviceIp(), authData); + log.info("生成鉴权信息成功, authData={}", authData); + } + }); + } +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/user/ITbUserVisitorInvitationsService.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/user/ITbUserVisitorInvitationsService.java new file mode 100644 index 00000000..6ea141d5 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/user/ITbUserVisitorInvitationsService.java @@ -0,0 +1,44 @@ +package by.dimp.web.service.user; +import by.dimp.web.model.domain.visitorManagement.req.VisitorManagementReq; +import by.dimp.web.model.domain.visitorManagement.req.VistorManagementPageQuery; +import by.dimp.web.model.entity.TbVisitorManagement; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.service.IService; + +/** +* @author dy +* @description 针对表【tb_visitor_management】的数据库操作Service +* @createDate 2025-06-16 14:24:44 +*/ +public interface ITbUserVisitorInvitationsService extends IService { + + /** + * 分页查询访客管理列表 + * @param pageQuery + * @return + */ + IPage queryForPage(VistorManagementPageQuery pageQuery); + + + /** + * 分页查询待审核访客列表 + * @param pageQuery + * @return + */ + IPage queryForWaitingPage(VistorManagementPageQuery pageQuery); + /** + * 新增访客 + * @param visitorManagementReq + * @return + */ + int addVisitor(VisitorManagementReq visitorManagementReq); + + /** + * 审核访客 + * @param visitorManagementReq + * @return + */ + int auditVisitor(VisitorManagementReq visitorManagementReq); + + TbVisitorManagement getVisitorById(Integer id); +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/user/impl/TbUserVisitorInvitationsServiceImpl.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/user/impl/TbUserVisitorInvitationsServiceImpl.java new file mode 100644 index 00000000..3b6d2aeb --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/service/user/impl/TbUserVisitorInvitationsServiceImpl.java @@ -0,0 +1,83 @@ +package by.dimp.web.service.user.impl; + +import by.dimp.common.core.domain.UserInfo; +import by.dimp.web.covert.TbVisitorManagementConvert; +import by.dimp.web.mapper.admin.TbVisitorManagementMapper; +import by.dimp.web.mapper.user.TbUserVisitorManagementMapper; +import by.dimp.web.model.domain.visitorManagement.req.VisitorManagementReq; +import by.dimp.web.model.domain.visitorManagement.req.VistorManagementPageQuery; +import by.dimp.web.model.entity.TbVisitorManagement; +import by.dimp.web.service.admin.ITbVisitorInvitationsService; +import by.dimp.web.service.user.ITbUserVisitorInvitationsService; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import jakarta.annotation.Resource; +import org.springframework.stereotype.Service; + +/** +* @author dy +* @description 针对表【tb_visitor_management】的数据库操作Service实现 +* @createDate 2025-06-16 14:24:44 +*/ +@Service +public class TbUserVisitorInvitationsServiceImpl extends ServiceImpl + implements ITbUserVisitorInvitationsService { + + private static final Integer STATUS_WAIT = 0;//待审核 + private static final Integer STATUS_PASS = 1;//待访问 + + private static final Integer Y = 0; + private static final Integer N = 1; + + + @Resource + private TbVisitorManagementConvert tbVisitorManagementConvert; + + @Resource + private TbUserVisitorManagementMapper tbUserVisitorManagementMapper; + + @Override + public IPage queryForPage(VistorManagementPageQuery pageQuery) { + Page rowPage = new Page<>(pageQuery.getPage(), pageQuery.getPageSize()); + IPage pageInfo = tbUserVisitorManagementMapper.selectForPage(rowPage, pageQuery); + return pageInfo.convert(tbVisitorManagementConvert::entityToResp); + } + + @Override + public IPage queryForWaitingPage(VistorManagementPageQuery pageQuery) { + Page rowPage = new Page<>(pageQuery.getPage(), pageQuery.getPageSize()); + IPage pageInfo = tbUserVisitorManagementMapper.selectForWaitingPage(rowPage, pageQuery); + return pageInfo.convert(tbVisitorManagementConvert::entityToResp); + } + + @Override + public int addVisitor(VisitorManagementReq visitorManagementReq) { + TbVisitorManagement tbVisitorManagement = tbVisitorManagementConvert.reqToEntity(visitorManagementReq); + //新增时设置预约状态为待确认 + visitorManagementReq.setServeStatus(STATUS_PASS); + //判断是否需要预约车位 0:预约 1:不预约 + if (visitorManagementReq.getBookingParkingSpace() == Y){ + //预约车位填写车牌号 + tbVisitorManagement.setLicensePlate(visitorManagementReq.getLicensePlate()); + } + + return tbUserVisitorManagementMapper.insert(tbVisitorManagement); + } + + @Override + public int auditVisitor(VisitorManagementReq visitorManagementReq) { + TbVisitorManagement tbVisitorManagement = tbVisitorManagementConvert.reqToEntity(visitorManagementReq); + return tbUserVisitorManagementMapper.updateById(tbVisitorManagement); + } + + @Override + public TbVisitorManagement getVisitorById(Integer id) { + + return this.getById(id); + } +} + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/util/EasyExcleStyleUtil.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/util/EasyExcleStyleUtil.java new file mode 100644 index 00000000..ab51992a --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/util/EasyExcleStyleUtil.java @@ -0,0 +1,75 @@ +package by.dimp.web.util; + +import com.alibaba.excel.write.metadata.style.WriteCellStyle; +import com.alibaba.excel.write.metadata.style.WriteFont; +import com.alibaba.excel.write.style.HorizontalCellStyleStrategy; +import jakarta.servlet.http.HttpServletResponse; +import org.apache.poi.ss.usermodel.*; + +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; + +public class EasyExcleStyleUtil { + + /** + * 设置excle 标题头及单元格样式 + * @Auther: wangfs + * @param + * @return + */ + public static HorizontalCellStyleStrategy excleStyleSet(){ + // 头的策略 + WriteCellStyle headWriteCellStyle = new WriteCellStyle(); + // 背景设置为浅蓝色 + headWriteCellStyle.setFillForegroundColor(IndexedColors.PALE_BLUE.getIndex()); + WriteFont headWriteFont = new WriteFont(); + headWriteFont.setFontHeightInPoints((short)12); + headWriteCellStyle.setWriteFont(headWriteFont); + //设置边框样式 + headWriteCellStyle.setBorderLeft(BorderStyle.THIN); + headWriteCellStyle.setBorderTop(BorderStyle.THIN); + headWriteCellStyle.setBorderRight(BorderStyle.THIN); + headWriteCellStyle.setBorderBottom(BorderStyle.THIN); + + + // 内容的策略 + WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); + // 这里需要指定 FillPatternType 为FillPatternType.SOLID_FOREGROUND 不然无法显示背景颜色.头默认了 FillPatternType所以可以不指定 + contentWriteCellStyle.setFillPatternType(FillPatternType.THIN_BACKWARD_DIAG); + contentWriteCellStyle.setFillForegroundColor(IndexedColors.WHITE.getIndex()); + WriteFont contentWriteFont = new WriteFont(); + // 字体大小 + contentWriteFont.setFontHeightInPoints((short)12); + //设置 垂直居中 + contentWriteCellStyle.setVerticalAlignment(VerticalAlignment.CENTER); + // 水平对齐 + contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); + // 垂直对齐 + //设置边框样式 + contentWriteCellStyle.setBorderLeft(BorderStyle.THIN); + contentWriteCellStyle.setBorderTop(BorderStyle.THIN); + contentWriteCellStyle.setBorderRight(BorderStyle.THIN); + contentWriteCellStyle.setBorderBottom(BorderStyle.THIN); + contentWriteCellStyle.setHidden(false); + // 这个策略是 头是头的样式 内容是内容的样式 其他的策略可以自己实现 + return new HorizontalCellStyleStrategy(headWriteCellStyle, contentWriteCellStyle); + } + + /** + * 设置exlce文件名称 + * @Auther: wangfs + * @param response + */ + public static void setExcleFileName(String fileName, HttpServletResponse response){ + try { + String excleFileName = URLEncoder.encode(fileName, "UTF-8"); + response.addHeader("Content-Disposition", "attachment;filename=" + excleFileName + ".xlsx"); + response.setContentType("application/vnd.ms-excel;charset=utf-8"); + response.setCharacterEncoding("utf-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/utils/E8ApiUtils.java b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/utils/E8ApiUtils.java new file mode 100644 index 00000000..16c4e920 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/java/by/dimp/web/utils/E8ApiUtils.java @@ -0,0 +1,223 @@ +package by.dimp.web.utils; + +import by.dimp.web.model.domain.E8.general.ApiResp; +import cn.hutool.crypto.digest.DigestUtil; +import cn.hutool.http.HttpResponse; +import cn.hutool.http.HttpUtil; +import cn.hutool.json.JSONUtil; +import org.springframework.context.annotation.Configuration; + +import java.text.SimpleDateFormat; +import java.util.Base64; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @author zcxlsm + * @title: E8ApiUtils + * @date 2025/5/8 16:56 + */ +@Configuration +public class E8ApiUtils { + + private static final String BASE_URL = "http://192.168.12.51:50014"; + private static final String SECRET_KEY = "ABCDabcd1234"; + private static final String KEY = "E8"; + + /** + * 发起Post请求 + * + * @param params 请求入参 + * @param api 请求接口 + * @return 请求结果 + */ + public ApiResp doPost(Map params, String api) { + // 时间戳 + String timestamp = Long.toString(System.currentTimeMillis()); + // sign签名 + String sign = getPostSign(params, api, timestamp); + // url + String url = BASE_URL + api; + + // 将params转换为JSON字符串 + String jsonBody = JSONUtil.toJsonStr(params); + + // 对请求体进行Base64加密 + String base64Body = Base64.getEncoder().encodeToString(jsonBody.getBytes()); + + // 发送请求获取响应 + HttpResponse response = HttpUtil.createPost(url) + .header("Content-Type", "application/json") + .header("key", KEY) + .header("timestamp", timestamp) + .header("sign", sign) + .body(base64Body) // 使用Base64加密后的body + .execute(); + + return handleResponse(response); + } + + /** + * 发起Get/Delete请求 + * + * @param api 请求接口 + * @param paramStr 请求入参 + * @return 请求结果 + */ + public ApiResp doGetOrDel(String api, String paramStr) { + // 时间戳 + String timestamp = Long.toString(System.currentTimeMillis()); + // sign签名 + String sign = getGetSign(api, timestamp); + // url + String url = BASE_URL + api; + + // 发送请求获取响应 + HttpResponse response = HttpUtil.createGet(url) + .header("key", KEY) + .header("sign", sign) + .header("timestamp", timestamp) + .header("paramstr", paramStr).execute(); + + return handleResponse(response); + } + + /** + * 处理请求响应 + * + * @param response 响应 + * @return ApiResp + */ + public ApiResp handleResponse(HttpResponse response) { + ApiResp resp; + if (response.isOk()) { + String result = response.body(); + resp = JSONUtil.toBean(result, ApiResp.class); + } else { + resp = new ApiResp("请求失败", 0L, null, false, 0); + } + return resp; + } + + /** + * 获取Post接口签名Sign + * + * @param params 请求入参 + * @param api 请求接口 + * @param timestamp 时间戳 + * @return Post接口签名sign + */ + public String getPostSign(Map params, String api, String timestamp) { + String url = BASE_URL + api; + // one&two + String paramsUrl = buildUrlWithParams(url, params) + "×tamp=" + timestamp; + // three + String upperUrl = paramsUrl.toUpperCase(); + // four + String secretUrl = upperUrl + SECRET_KEY; + // five(同时剔除问号) + String md5Url = DigestUtil.md5Hex(secretUrl.replace("?", "")); + // six + String finalUrl = md5Url.toUpperCase(); + + return finalUrl; + } + + /** + * 获取Get接口签名Sign + * + * @param api 请求接口 + * @param timestamp 时间戳 + * @return get/Delete接口签名sign + */ + public String getGetSign(String api, String timestamp) { + // one + String url = BASE_URL + api + timestamp; + String upperUrl = url.toUpperCase(); + // two + String secretUrl = upperUrl + SECRET_KEY; + // three + String md5Url = DigestUtil.md5Hex(secretUrl); + // four + String finalUrl = md5Url.toUpperCase(); + + return finalUrl; + } + + /** + * Post请求url拼接参数 + * + * @param url 请求链接 + * @param params 请求入参 + * @return 拼接参数后的url + */ + public String buildUrlWithParams(String url, Map params) { + if (params == null || params.isEmpty()) { + return url; + } + + // 过滤出指定类型的参数 + Map filteredParameters = new LinkedHashMap<>(); + for (Map.Entry entry : params.entrySet()) { + Object value = entry.getValue(); + if (isSupportedType(value)) { + filteredParameters.put(entry.getKey(), value); + } + } + + if (filteredParameters.isEmpty()) { + return url; + } + + // 使用 Stream API 对 filteredParameters 按 key 升序排序 + Map sortedParameters = filteredParameters.entrySet() + .stream() + .sorted(Map.Entry.comparingByKey()) + .collect(Collectors.toMap( + Map.Entry::getKey, + Map.Entry::getValue, + (oldValue, newValue) -> oldValue, // 处理键冲突的情况 + LinkedHashMap::new // 保持插入顺序 + )); + + StringBuilder sb = new StringBuilder(url); + if (!url.contains("?")) { + sb.append("?"); + } else { + // 如果 URL 中已有查询参数,确保拼接时参数之间用 & 分隔 + sb.append("&"); + } + + for (Map.Entry entry : sortedParameters.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + + // 将日期格式化为字符串 + if (value instanceof Date) { + value = new SimpleDateFormat("yyyy-MM-dd").format(value); + } + + sb.append(key) + .append("=") + .append(value.toString()) + .append("&"); + } + + // 去掉最后的多余 & 符号 + sb.setLength(sb.length() - 1); + + return sb.toString(); + } + + /** + * 判断类型是否符合 + * + * @return Boolean + */ + public Boolean isSupportedType(Object value) { + return value instanceof Integer || value instanceof String || value instanceof Long || value instanceof Date; + } + +} diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/application.yaml b/ruoyi-modules/dimp-wy-web/src/main/resources/application.yaml new file mode 100644 index 00000000..7411fb7b --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/application.yaml @@ -0,0 +1,25 @@ +server: + servlet: + context-path: /web + port: 9820 + +spring: + application: + name: dimp-modules-web + profiles: + active: dev + cloud: + nacos: + discovery: + server-addr: 192.168.110.207:8848 + namespace: 7870b314-0a74-4232-9358-16a882136739 + config: + server-addr: ${spring.cloud.nacos.discovery.server-addr} + namespace: ${spring.cloud.nacos.discovery.namespace} + group: DEFAULT_GROUP # 分组名 + file-extension: yaml # 配置文件格式 + refresh-enabled: true # 启用自动刷新 + config: + import: + - optional:nacos:${spring.application.name}-${spring.profiles.active} + - optional:nacos:satoken-${spring.profiles.active} diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/logback-spring.xml b/ruoyi-modules/dimp-wy-web/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..000efe21 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/logback-spring.xml @@ -0,0 +1,36 @@ + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + UTF-8 + + + + + + logs/dimp-modules-web.log + + logs/dimp-modules-web.%d{yyyy-MM-dd}.%i.log.gz + 512MB + 60 + 20GB + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + UTF-8 + + + + + + + + + + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbAttendanceStatisticsMapper.xml b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbAttendanceStatisticsMapper.xml new file mode 100644 index 00000000..c330d986 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbAttendanceStatisticsMapper.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbCeremonialServeMapper.xml b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbCeremonialServeMapper.xml new file mode 100644 index 00000000..6063cd48 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbCeremonialServeMapper.xml @@ -0,0 +1,16 @@ + + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbCeremonialserveRoomBookingMapper.xml b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbCeremonialserveRoomBookingMapper.xml new file mode 100644 index 00000000..fa12ecb1 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbCeremonialserveRoomBookingMapper.xml @@ -0,0 +1,16 @@ + + + + + + + + + insert into tb_ceremonialserve_roombooking (id,ceremonial_serve_id,room_booking_id,total_price) values + + (#{ceremonialServe.id},#{ceremonialServe.ceremonialServeId},#{ceremonialServe.roomBookingId},#{ceremonialServe.totalPrice}) + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbCleaningQualityMapper.xml b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbCleaningQualityMapper.xml new file mode 100644 index 00000000..a5c17390 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbCleaningQualityMapper.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbConferenceMapper.xml b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbConferenceMapper.xml new file mode 100644 index 00000000..5b68c172 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbConferenceMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbRoomBookingMapper.xml b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbRoomBookingMapper.xml new file mode 100644 index 00000000..c0fedeb8 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbRoomBookingMapper.xml @@ -0,0 +1,63 @@ + + + + + + and (c.room_name like #{ew.keyword} or c.room_no like #{ew.keyword}) + + + + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbServiceClassificationMapper.xml b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbServiceClassificationMapper.xml new file mode 100644 index 00000000..367c293f --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbServiceClassificationMapper.xml @@ -0,0 +1,15 @@ + + + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbVisitorManagementMapper.xml b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbVisitorManagementMapper.xml new file mode 100644 index 00000000..ab11e47e --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/admin/TbVisitorManagementMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/user/TbUserVisitorManagementMapper.xml b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/user/TbUserVisitorManagementMapper.xml new file mode 100644 index 00000000..d0eb75ef --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/main/resources/mapper/user/TbUserVisitorManagementMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + diff --git a/ruoyi-modules/dimp-wy-web/src/test/java/by/dimp/web/DimpModulesWebApplicationTests.java b/ruoyi-modules/dimp-wy-web/src/test/java/by/dimp/web/DimpModulesWebApplicationTests.java new file mode 100644 index 00000000..4dd5f8a0 --- /dev/null +++ b/ruoyi-modules/dimp-wy-web/src/test/java/by/dimp/web/DimpModulesWebApplicationTests.java @@ -0,0 +1,13 @@ +package by.dimp.web; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class DimpModulesWebApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties index 45424935..470d4aaa 100644 --- a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties +++ b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties @@ -40,9 +40,9 @@ spring.sql.init.platform=mysql db.num=1 ### Connect URL of DB: -db.url.0=jdbc:mysql://127.0.0.1:3306/cloudconfig?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true +db.url.0=jdbc:mysql://127.0.0.1:3306/dimp?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true db.user.0=root -db.password.0=root +db.password.0=1234 ### the maximum retry times for push nacos.config.push.maxRetryTime=50 diff --git a/ruoyi-visual/ruoyi-seata-server/pom.xml b/ruoyi-visual/ruoyi-seata-server/pom.xml index cff7c244..a0625ef4 100644 --- a/ruoyi-visual/ruoyi-seata-server/pom.xml +++ b/ruoyi-visual/ruoyi-seata-server/pom.xml @@ -36,10 +36,16 @@ 3.8.0 1.9.13 3.6.1 + + 1.8 + UTF-8 + UTF-8 + UTF-8 + org.springframework diff --git a/script/config/nacos/datasource.yml b/script/config/nacos/datasource.yml index bcf6b984..15210e86 100644 --- a/script/config/nacos/datasource.yml +++ b/script/config/nacos/datasource.yml @@ -4,19 +4,19 @@ datasource: # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能 url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true username: root - password: password + password: 1234 gen: url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true username: root - password: password + password: 1234 job: url: jdbc:mysql://localhost:3306/ry-job?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true username: root - password: password + password: 1234 workflow: url: jdbc:mysql://localhost:3306/ry-workflow?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true username: root - password: password + password: 1234 # system-oracle: # url: jdbc:oracle:thin:@//localhost:1521/XE # username: ROOT diff --git a/script/config/nacos/seata-server.properties b/script/config/nacos/seata-server.properties index 8ad7dade..f1087154 100644 --- a/script/config/nacos/seata-server.properties +++ b/script/config/nacos/seata-server.properties @@ -19,7 +19,7 @@ store.db.dbType=mysql store.db.driverClassName=com.mysql.cj.jdbc.Driver store.db.url=jdbc:mysql://127.0.0.1:3306/ry-seata?useUnicode=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true store.db.user=root -store.db.password=root +store.db.password=1234 store.db.minConn=5 store.db.maxConn=30 store.db.globalTable=global_table