Compare commits
86 Commits
37f7231022
...
master
Author | SHA1 | Date | |
---|---|---|---|
27111d6f87 | |||
22587804c5 | |||
5bd5146105 | |||
68f56278a5 | |||
9e2a28914e | |||
289dbe69d6 | |||
2105a7640d | |||
642052ebd3 | |||
36c9e0d386 | |||
c49ed5cea5 | |||
6f0dc85929 | |||
bb0299c323 | |||
b8f3bab4c1 | |||
6c806ce639 | |||
18b3ef6318 | |||
b284577437 | |||
5f2e367acc | |||
f053a7011c | |||
72a1c46c21 | |||
1e6c1143da | |||
3dd86a12bf | |||
6e62f0de5a | |||
c452fbc650 | |||
58b235d078 | |||
31d41e971c | |||
a8486953bc | |||
9c77ac0ccf | |||
a995d08f6f | |||
7690f14c0d | |||
f11ae30b77 | |||
b757013382 | |||
1ddf362e05 | |||
ae243ec0a2 | |||
89e75ebc62 | |||
e86b8716d5 | |||
9f33ffdd1f | |||
e78392efdc | |||
12ea3d9293 | |||
c72df130a1 | |||
34d9d84456 | |||
2e7a107e93 | |||
28481a3a4a | |||
dbe430c3b1 | |||
15338c123b | |||
3a6b7aaec4 | |||
1fa0f9cffb | |||
9dd6f697a6 | |||
8bfcc19fe7 | |||
fc748f6f94 | |||
c2b9050fd6 | |||
5f43e1b56e | |||
4ec6479321 | |||
f0aea24726 | |||
c4a2d5fda0 | |||
1ce56cbc88 | |||
88fe4a48f9 | |||
2b986e074d | |||
c222bd7605 | |||
d6cda043fb | |||
b74dd02f87 | |||
49130281bb | |||
c698abfa11 | |||
3fcc427813 | |||
8182257f4e | |||
11656812b2 | |||
1c9f149b39 | |||
1b58d4bcc2 | |||
3678e13693 | |||
24e6545e01 | |||
641cfceb9f | |||
fd01a3a3d6 | |||
2f3a995359 | |||
ed25c2b5fb | |||
2a362c3264 | |||
62703e1fe4 | |||
266c46fe16 | |||
b0afd5f4aa | |||
5ef4df2d6f | |||
9cf2698ec8 | |||
daf1d0a14c | |||
480e505396 | |||
9d463735c6 | |||
7e3f433e16 | |||
bee89dd24a | |||
561aa12be6 | |||
2c815028fb |
33
.gitignore
vendored
Normal file
33
.gitignore
vendored
Normal file
@ -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/
|
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
BIN
.mvn/wrapper/maven-wrapper.jar
vendored
Normal file
Binary file not shown.
2
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
2
.mvn/wrapper/maven-wrapper.properties
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip
|
||||||
|
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
|
316
mvnw
vendored
Normal file
316
mvnw
vendored
Normal file
@ -0,0 +1,316 @@
|
|||||||
|
#!/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
|
||||||
|
#
|
||||||
|
# https://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.
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Maven Start Up Batch script
|
||||||
|
#
|
||||||
|
# Required ENV vars:
|
||||||
|
# ------------------
|
||||||
|
# JAVA_HOME - location of a JDK home dir
|
||||||
|
#
|
||||||
|
# Optional ENV vars
|
||||||
|
# -----------------
|
||||||
|
# M2_HOME - location of maven2's installed home dir
|
||||||
|
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
# e.g. to debug Maven itself, use
|
||||||
|
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
||||||
|
|
||||||
|
if [ -f /usr/local/etc/mavenrc ] ; then
|
||||||
|
. /usr/local/etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/mavenrc ] ; then
|
||||||
|
. /etc/mavenrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$HOME/.mavenrc" ] ; then
|
||||||
|
. "$HOME/.mavenrc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
|
cygwin=false;
|
||||||
|
darwin=false;
|
||||||
|
mingw=false
|
||||||
|
case "`uname`" in
|
||||||
|
CYGWIN*) cygwin=true ;;
|
||||||
|
MINGW*) mingw=true;;
|
||||||
|
Darwin*) darwin=true
|
||||||
|
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
|
||||||
|
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
if [ -x "/usr/libexec/java_home" ]; then
|
||||||
|
export JAVA_HOME="`/usr/libexec/java_home`"
|
||||||
|
else
|
||||||
|
export JAVA_HOME="/Library/Java/Home"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
if [ -r /etc/gentoo-release ] ; then
|
||||||
|
JAVA_HOME=`java-config --jre-home`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$M2_HOME" ] ; then
|
||||||
|
## resolve links - $0 may be a link to maven's home
|
||||||
|
PRG="$0"
|
||||||
|
|
||||||
|
# need this for relative symlinks
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG="`dirname "$PRG"`/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
saveddir=`pwd`
|
||||||
|
|
||||||
|
M2_HOME=`dirname "$PRG"`/..
|
||||||
|
|
||||||
|
# make it fully qualified
|
||||||
|
M2_HOME=`cd "$M2_HOME" && pwd`
|
||||||
|
|
||||||
|
cd "$saveddir"
|
||||||
|
# echo Using m2 at $M2_HOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $cygwin ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --unix "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Mingw, ensure paths are in UNIX format before anything is touched
|
||||||
|
if $mingw ; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ]; then
|
||||||
|
javaExecutable="`which javac`"
|
||||||
|
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
||||||
|
# readlink(1) is not available as standard on Solaris 10.
|
||||||
|
readLink=`which readlink`
|
||||||
|
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
||||||
|
if $darwin ; then
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
|
||||||
|
else
|
||||||
|
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
||||||
|
fi
|
||||||
|
javaHome="`dirname \"$javaExecutable\"`"
|
||||||
|
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
||||||
|
JAVA_HOME="$javaHome"
|
||||||
|
export JAVA_HOME
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVACMD" ] ; then
|
||||||
|
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"
|
||||||
|
else
|
||||||
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD="`\\unset -f command; \\command -v java`"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
echo "Error: JAVA_HOME is not defined correctly." >&2
|
||||||
|
echo " We cannot execute $JAVACMD" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$JAVA_HOME" ] ; then
|
||||||
|
echo "Warning: JAVA_HOME environment variable is not set."
|
||||||
|
fi
|
||||||
|
|
||||||
|
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
||||||
|
|
||||||
|
# traverses directory structure from process work directory to filesystem root
|
||||||
|
# first directory with .mvn subdirectory is considered project base directory
|
||||||
|
find_maven_basedir() {
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "Path not specified to find_maven_basedir"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
basedir="$1"
|
||||||
|
wdir="$1"
|
||||||
|
while [ "$wdir" != '/' ] ; do
|
||||||
|
if [ -d "$wdir"/.mvn ] ; then
|
||||||
|
basedir=$wdir
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
|
||||||
|
if [ -d "${wdir}" ]; then
|
||||||
|
wdir=`cd "$wdir/.."; pwd`
|
||||||
|
fi
|
||||||
|
# end of workaround
|
||||||
|
done
|
||||||
|
echo "${basedir}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# concatenates all lines of a file
|
||||||
|
concat_lines() {
|
||||||
|
if [ -f "$1" ]; then
|
||||||
|
echo "$(tr -s '\n' ' ' < "$1")"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
BASE_DIR=`find_maven_basedir "$(pwd)"`
|
||||||
|
if [ -z "$BASE_DIR" ]; then
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
# This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
##########################################################################################
|
||||||
|
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found .mvn/wrapper/maven-wrapper.jar"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
|
||||||
|
fi
|
||||||
|
if [ -n "$MVNW_REPOURL" ]; then
|
||||||
|
jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
else
|
||||||
|
jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
fi
|
||||||
|
while IFS="=" read key value; do
|
||||||
|
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
|
||||||
|
esac
|
||||||
|
done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Downloading from: $jarUrl"
|
||||||
|
fi
|
||||||
|
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
|
||||||
|
if $cygwin; then
|
||||||
|
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v wget > /dev/null; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found wget ... using wget"
|
||||||
|
fi
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||||
|
else
|
||||||
|
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
|
||||||
|
fi
|
||||||
|
elif command -v curl > /dev/null; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Found curl ... using curl"
|
||||||
|
fi
|
||||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
|
||||||
|
curl -o "$wrapperJarPath" "$jarUrl" -f
|
||||||
|
else
|
||||||
|
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
|
||||||
|
fi
|
||||||
|
|
||||||
|
else
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo "Falling back to using Java to download"
|
||||||
|
fi
|
||||||
|
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
|
||||||
|
# For Cygwin, switch paths to Windows format before running javac
|
||||||
|
if $cygwin; then
|
||||||
|
javaClass=`cygpath --path --windows "$javaClass"`
|
||||||
|
fi
|
||||||
|
if [ -e "$javaClass" ]; then
|
||||||
|
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo " - Compiling MavenWrapperDownloader.java ..."
|
||||||
|
fi
|
||||||
|
# Compiling the Java class
|
||||||
|
("$JAVA_HOME/bin/javac" "$javaClass")
|
||||||
|
fi
|
||||||
|
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
|
||||||
|
# Running the downloader
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo " - Running MavenWrapperDownloader.java ..."
|
||||||
|
fi
|
||||||
|
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
##########################################################################################
|
||||||
|
# End of extension
|
||||||
|
##########################################################################################
|
||||||
|
|
||||||
|
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
|
||||||
|
if [ "$MVNW_VERBOSE" = true ]; then
|
||||||
|
echo $MAVEN_PROJECTBASEDIR
|
||||||
|
fi
|
||||||
|
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin; then
|
||||||
|
[ -n "$M2_HOME" ] &&
|
||||||
|
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
||||||
|
[ -n "$JAVA_HOME" ] &&
|
||||||
|
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||||
|
[ -n "$CLASSPATH" ] &&
|
||||||
|
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||||
|
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
|
||||||
|
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
# work with both Windows and non-Windows executions.
|
||||||
|
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
|
||||||
|
export MAVEN_CMD_LINE_ARGS
|
||||||
|
|
||||||
|
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
exec "$JAVACMD" \
|
||||||
|
$MAVEN_OPTS \
|
||||||
|
$MAVEN_DEBUG_OPTS \
|
||||||
|
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
|
||||||
|
"-Dmaven.home=${M2_HOME}" \
|
||||||
|
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
|
||||||
|
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
|
188
mvnw.cmd
vendored
Normal file
188
mvnw.cmd
vendored
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
@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 https://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 Maven Start Up Batch script
|
||||||
|
@REM
|
||||||
|
@REM Required ENV vars:
|
||||||
|
@REM JAVA_HOME - location of a JDK home dir
|
||||||
|
@REM
|
||||||
|
@REM Optional ENV vars
|
||||||
|
@REM M2_HOME - location of maven2's installed home dir
|
||||||
|
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
|
||||||
|
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
|
||||||
|
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
|
||||||
|
@REM e.g. to debug Maven itself, use
|
||||||
|
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
||||||
|
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
|
||||||
|
@REM ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
||||||
|
@echo off
|
||||||
|
@REM set title of command window
|
||||||
|
title %0
|
||||||
|
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
|
||||||
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
||||||
|
|
||||||
|
@REM set %HOME% to equivalent of $HOME
|
||||||
|
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
||||||
|
|
||||||
|
@REM Execute a user defined script before this one
|
||||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
||||||
|
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
|
||||||
|
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
|
||||||
|
:skipRcPre
|
||||||
|
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
set ERROR_CODE=0
|
||||||
|
|
||||||
|
@REM To isolate internal variables from possible post scripts, we use another setlocal
|
||||||
|
@setlocal
|
||||||
|
|
||||||
|
@REM ==== START VALIDATION ====
|
||||||
|
if not "%JAVA_HOME%" == "" goto OkJHome
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME not found in your environment. >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
:OkJHome
|
||||||
|
if exist "%JAVA_HOME%\bin\java.exe" goto init
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
||||||
|
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
||||||
|
echo location of your Java installation. >&2
|
||||||
|
echo.
|
||||||
|
goto error
|
||||||
|
|
||||||
|
@REM ==== END VALIDATION ====
|
||||||
|
|
||||||
|
:init
|
||||||
|
|
||||||
|
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
|
||||||
|
@REM Fallback to current working directory if not found.
|
||||||
|
|
||||||
|
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
|
||||||
|
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
|
||||||
|
|
||||||
|
set EXEC_DIR=%CD%
|
||||||
|
set WDIR=%EXEC_DIR%
|
||||||
|
:findBaseDir
|
||||||
|
IF EXIST "%WDIR%"\.mvn goto baseDirFound
|
||||||
|
cd ..
|
||||||
|
IF "%WDIR%"=="%CD%" goto baseDirNotFound
|
||||||
|
set WDIR=%CD%
|
||||||
|
goto findBaseDir
|
||||||
|
|
||||||
|
:baseDirFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%WDIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
goto endDetectBaseDir
|
||||||
|
|
||||||
|
:baseDirNotFound
|
||||||
|
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
|
||||||
|
cd "%EXEC_DIR%"
|
||||||
|
|
||||||
|
:endDetectBaseDir
|
||||||
|
|
||||||
|
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
|
||||||
|
|
||||||
|
@setlocal EnableExtensions EnableDelayedExpansion
|
||||||
|
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
|
||||||
|
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
|
||||||
|
|
||||||
|
:endReadAdditionalConfig
|
||||||
|
|
||||||
|
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
||||||
|
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
|
||||||
|
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
|
||||||
|
|
||||||
|
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
|
||||||
|
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
|
||||||
|
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
|
||||||
|
)
|
||||||
|
|
||||||
|
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
|
||||||
|
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
|
||||||
|
if exist %WRAPPER_JAR% (
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Found %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
if not "%MVNW_REPOURL%" == "" (
|
||||||
|
SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
|
||||||
|
)
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Couldn't find %WRAPPER_JAR%, downloading it ...
|
||||||
|
echo Downloading from: %DOWNLOAD_URL%
|
||||||
|
)
|
||||||
|
|
||||||
|
powershell -Command "&{"^
|
||||||
|
"$webclient = new-object System.Net.WebClient;"^
|
||||||
|
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
|
||||||
|
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
|
||||||
|
"}"^
|
||||||
|
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
|
||||||
|
"}"
|
||||||
|
if "%MVNW_VERBOSE%" == "true" (
|
||||||
|
echo Finished downloading %WRAPPER_JAR%
|
||||||
|
)
|
||||||
|
)
|
||||||
|
@REM End of extension
|
||||||
|
|
||||||
|
@REM Provide a "standardized" way to retrieve the CLI args that will
|
||||||
|
@REM work with both Windows and non-Windows executions.
|
||||||
|
set MAVEN_CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
|
%MAVEN_JAVA_EXE% ^
|
||||||
|
%JVM_CONFIG_MAVEN_PROPS% ^
|
||||||
|
%MAVEN_OPTS% ^
|
||||||
|
%MAVEN_DEBUG_OPTS% ^
|
||||||
|
-classpath %WRAPPER_JAR% ^
|
||||||
|
"-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
|
||||||
|
%WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
|
||||||
|
if ERRORLEVEL 1 goto error
|
||||||
|
goto end
|
||||||
|
|
||||||
|
:error
|
||||||
|
set ERROR_CODE=1
|
||||||
|
|
||||||
|
:end
|
||||||
|
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
||||||
|
|
||||||
|
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
|
||||||
|
@REM check for post script, once with legacy .bat ending and once with .cmd ending
|
||||||
|
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
|
||||||
|
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
|
||||||
|
:skipRcPost
|
||||||
|
|
||||||
|
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
|
||||||
|
if "%MAVEN_BATCH_PAUSE%"=="on" pause
|
||||||
|
|
||||||
|
if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
|
||||||
|
|
||||||
|
cmd /C exit /B %ERROR_CODE%
|
171
pom.xml
Normal file
171
pom.xml
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.6.2</version>
|
||||||
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
|
</parent>
|
||||||
|
<groupId>com.xkrs</groupId>
|
||||||
|
<artifactId>WordAndExcel</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>WordAndExcel</name>
|
||||||
|
<description>Demo project for Spring Boot</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<yauaa.version>5.19</yauaa.version>
|
||||||
|
<hibernate-validator.version>6.1.5.Final</hibernate-validator.version>
|
||||||
|
<hibernate-spatial.version>5.4.20.Final</hibernate-spatial.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
<maven.compiler.source>11</maven.compiler.source>
|
||||||
|
<maven.compiler.target>11</maven.compiler.target>
|
||||||
|
<fastjson.version>1.2.76</fastjson.version>
|
||||||
|
<springfox-swagger-ui.version>2.10.5</springfox-swagger-ui.version>
|
||||||
|
<springfox-swagger2.version>2.10.5</springfox-swagger2.version>
|
||||||
|
<httpclient.version>4.5.2</httpclient.version>
|
||||||
|
<hutool-all.version>4.4.3</hutool-all.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-aop</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-webflux</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-logging</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-pool2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
</dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId> mysql</groupId>
|
||||||
|
<artifactId> mysql-connector-java</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>nl.basjes.parse.useragent</groupId>
|
||||||
|
<artifactId>yauaa</artifactId>
|
||||||
|
<version>${yauaa.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate.validator</groupId>
|
||||||
|
<artifactId>hibernate-validator</artifactId>
|
||||||
|
<version>${hibernate-validator.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hibernate</groupId>
|
||||||
|
<artifactId>hibernate-spatial</artifactId>
|
||||||
|
<version>${hibernate-spatial.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>fastjson</artifactId>
|
||||||
|
<version>${fastjson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--swagger的依赖-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
|
<version>${springfox-swagger-ui.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger2</artifactId>
|
||||||
|
<version>${springfox-swagger2.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.json-lib</groupId>
|
||||||
|
<artifactId>json-lib</artifactId>
|
||||||
|
<version>2.4</version>
|
||||||
|
<classifier>jdk15</classifier>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
<version>${httpclient.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>${hutool-all.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>com.alibaba</groupId>
|
||||||
|
<artifactId>easyexcel</artifactId>
|
||||||
|
<version>2.2.0-beta1</version>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.sf.jxls</groupId>
|
||||||
|
<artifactId>jxls-core</artifactId>
|
||||||
|
<version>1.0.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.apache.tomcat/servlet-api -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.tomcat</groupId>
|
||||||
|
<artifactId>servlet-api</artifactId>
|
||||||
|
<version>6.0.35</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
</project>
|
14
src/main/java/com/xkrs/WordAndExcelApplication.java
Normal file
14
src/main/java/com/xkrs/WordAndExcelApplication.java
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
package com.xkrs;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
public class WordAndExcelApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
SpringApplication.run(WordAndExcelApplication.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
23
src/main/java/com/xkrs/config/CorsConfig.java
Normal file
23
src/main/java/com/xkrs/config/CorsConfig.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package com.xkrs.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 系统跨域配置
|
||||||
|
* @author tajochen
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class CorsConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CorsInterceptor corsInterceptor;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
|
registry.addInterceptor(corsInterceptor);
|
||||||
|
}
|
||||||
|
}
|
29
src/main/java/com/xkrs/config/CorsInterceptor.java
Normal file
29
src/main/java/com/xkrs/config/CorsInterceptor.java
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package com.xkrs.config;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跨域处理
|
||||||
|
* @author tajochen
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class CorsInterceptor implements HandlerInterceptor {
|
||||||
|
|
||||||
|
@Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
|
||||||
|
|
||||||
|
//添加跨域CORS
|
||||||
|
response.setHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
response.setHeader("Access-Control-Allow-Credentials", "false");
|
||||||
|
response.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");
|
||||||
|
response.setHeader("Access-Control-Allow-Headers", "Content-Type , Authorization," +
|
||||||
|
"Accept,Origin,X-Requested-With");
|
||||||
|
response.setHeader("Access-Control-Max-Age", "216000");
|
||||||
|
response.setHeader("Content-Type","application/json;charset=UTF-8");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
37
src/main/java/com/xkrs/config/MvcConfig.java
Normal file
37
src/main/java/com/xkrs/config/MvcConfig.java
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
package com.xkrs.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.scheduling.TaskScheduler;
|
||||||
|
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||||
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WebMVC配置
|
||||||
|
* @author Tajochen
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class MvcConfig implements WebMvcConfigurer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 放行跨域请求
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
|
registry.addMapping("/**")
|
||||||
|
.allowedOrigins("*")
|
||||||
|
.allowedMethods("*")
|
||||||
|
.allowedHeaders("*");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时任务线程池更改,防止多个任务并行
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
public TaskScheduler taskScheduler() {
|
||||||
|
final ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
|
||||||
|
scheduler.setPoolSize(5);
|
||||||
|
return scheduler;
|
||||||
|
}
|
||||||
|
}
|
50
src/main/java/com/xkrs/controller/CraftItemController.java
Normal file
50
src/main/java/com/xkrs/controller/CraftItemController.java
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package com.xkrs.controller;
|
||||||
|
|
||||||
|
import com.xkrs.model.qo.CraftItemQoDelete;
|
||||||
|
import com.xkrs.model.qo.CraftItemQoInsert;
|
||||||
|
import com.xkrs.model.qo.CraftItemQoUpdate;
|
||||||
|
import com.xkrs.service.CraftItemService;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class CraftItemController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CraftItemService craftItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加工艺项目
|
||||||
|
*/
|
||||||
|
@PostMapping("/insertCraftItem")
|
||||||
|
public String insertCraftItem(@RequestBody CraftItemQoInsert insertQo) {
|
||||||
|
return craftItemService.insertCraftItem(insertQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除工艺项目
|
||||||
|
*/
|
||||||
|
@PostMapping("/deleteCraftItem")
|
||||||
|
public String deleteCraftItem(@RequestBody CraftItemQoDelete deleteQo) {
|
||||||
|
return craftItemService.deleteCraftItem(deleteQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新工艺项目名称
|
||||||
|
*/
|
||||||
|
@PostMapping("/updateCraftItem")
|
||||||
|
public String updateCraftItem(@RequestBody CraftItemQoUpdate updateQo) {
|
||||||
|
return craftItemService.updateCraftItem(updateQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工艺项目
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryCraftItem")
|
||||||
|
public String queryCraftItem(@RequestParam(required = false, value = "no") String no, @RequestParam(required = false, value = "name") String name) {
|
||||||
|
return craftItemService.queryCraftItem(no, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
64
src/main/java/com/xkrs/controller/FileController.java
Normal file
64
src/main/java/com/xkrs/controller/FileController.java
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
package com.xkrs.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: XinYi Song
|
||||||
|
* @Date: 2022/1/20 16:01
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
public class FileController {
|
||||||
|
|
||||||
|
// @Resource
|
||||||
|
// private FileService fileService;
|
||||||
|
//
|
||||||
|
// @Resource
|
||||||
|
// private FileDao fileDao;
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 上传模板信息
|
||||||
|
// *
|
||||||
|
// * @param fileQo
|
||||||
|
// * @param fileExcel
|
||||||
|
// * @return
|
||||||
|
// * @throws IOException
|
||||||
|
// */
|
||||||
|
// @PostMapping("/insertFileExcel")
|
||||||
|
// public String insertFileExcel(FileQo fileQo, @RequestParam("fileExcel") MultipartFile fileExcel) throws IOException {
|
||||||
|
// return fileService.insertFileExcel(fileQo, fileExcel);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 修改上传的模板信息
|
||||||
|
// *
|
||||||
|
// * @param fileQo
|
||||||
|
// * @param fileExcel
|
||||||
|
// * @return
|
||||||
|
// * @throws IOException
|
||||||
|
// */
|
||||||
|
// @PostMapping("/updateFileUploadPath")
|
||||||
|
// @Transactional(rollbackOn = Exception.class)
|
||||||
|
// public String updateFileUploadPath(FileQo fileQo, @RequestParam("fileExcel") MultipartFile fileExcel) throws IOException {
|
||||||
|
// String lotNo = fileQo.getLotNo();
|
||||||
|
// String machineNo = fileQo.getMachineNo();
|
||||||
|
// String materialNo = fileQo.getMaterialNo();
|
||||||
|
// String modelNo = fileQo.getModelNo();
|
||||||
|
// String machineTypeNo = fileQo.getMachineTypeNo();
|
||||||
|
// String craftItemName = fileQo.getCraftItemName();
|
||||||
|
// Locale locale = LocaleContextHolder.getLocale();
|
||||||
|
// String file = ExcelUploadUtil.memoryFile(fileExcel, 1);
|
||||||
|
// fileDao.updateFileUploadPath(lotNo, machineNo, materialNo, modelNo, machineTypeNo, craftItemName, file);
|
||||||
|
// return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功!", locale);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 导出excel
|
||||||
|
// *
|
||||||
|
// * @param fileQo
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @PostMapping("/exportExcel")
|
||||||
|
// public String exportExcel(@RequestBody FileQo fileQo) throws IOException, InvalidFormatException {
|
||||||
|
// return fileService.exportExcel(fileQo);
|
||||||
|
// }
|
||||||
|
}
|
50
src/main/java/com/xkrs/controller/QcItemController.java
Normal file
50
src/main/java/com/xkrs/controller/QcItemController.java
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package com.xkrs.controller;
|
||||||
|
|
||||||
|
import com.xkrs.model.qo.QcItemQoDelete;
|
||||||
|
import com.xkrs.model.qo.QcItemQoInsert;
|
||||||
|
import com.xkrs.model.qo.QcItemQoUpdate;
|
||||||
|
import com.xkrs.service.QcItemService;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class QcItemController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QcItemService qcItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加检验项目
|
||||||
|
*/
|
||||||
|
@PostMapping("/insertQcItem")
|
||||||
|
public String insertQcItem(@RequestBody QcItemQoInsert insertQo) {
|
||||||
|
return qcItemService.insertQcItem(insertQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验项目
|
||||||
|
*/
|
||||||
|
@PostMapping("/deleteQcItem")
|
||||||
|
public String deleteQcItem(@RequestBody QcItemQoDelete deleteQo) {
|
||||||
|
return qcItemService.deleteQcItem(deleteQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验项目名称
|
||||||
|
*/
|
||||||
|
@PostMapping("/updateQcItem")
|
||||||
|
public String updateQcItem(@RequestBody QcItemQoUpdate updateQo) {
|
||||||
|
return qcItemService.updateQcItem(updateQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验项目
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryQcItem")
|
||||||
|
public String queryQcItem(@RequestParam(required = false, value = "no") String no, @RequestParam(required = false, value = "name") String name) {
|
||||||
|
return qcItemService.queryQcItem(no, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
66
src/main/java/com/xkrs/controller/QcSourceController.java
Normal file
66
src/main/java/com/xkrs/controller/QcSourceController.java
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
package com.xkrs.controller;
|
||||||
|
|
||||||
|
import com.xkrs.model.qo.ExportSourceExcelQo;
|
||||||
|
import com.xkrs.model.qo.QcSourceQoDelete;
|
||||||
|
import com.xkrs.model.qo.QcSourceQoInsert;
|
||||||
|
import com.xkrs.service.QcSourceService;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class QcSourceController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QcSourceService qcSourceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加检验数据(用于在Json中接收字符串数据)
|
||||||
|
*/
|
||||||
|
@PostMapping("/insertQcSource")
|
||||||
|
public String insertQcSource(@RequestBody QcSourceQoInsert insertQo, @RequestParam(required = false, value = "picture") MultipartFile picture) {
|
||||||
|
return qcSourceService.insertQcSource(insertQo, picture);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加检验数据(用于在form-data中接收图片文件)
|
||||||
|
*/
|
||||||
|
@PostMapping("/insertQcSourceOnlyPicture")
|
||||||
|
public String insertQcSourceOnlyPicture(QcSourceQoInsert insertQo, @RequestParam(value = "picture") MultipartFile picture) {
|
||||||
|
return qcSourceService.insertQcSource(insertQo, picture);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/deleteQcSource")
|
||||||
|
public String deleteQcSource(@RequestBody QcSourceQoDelete deleteQo) {
|
||||||
|
return qcSourceService.deleteQcSource(deleteQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验数据
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryQcSource")
|
||||||
|
public String queryQcSource(@RequestParam(required = false, value = "batchNo") String batchNo, @RequestParam(required = false, value = "machineNo") String machineNo, @RequestParam(required = false, value = "materialNo") String materialNo, @RequestParam(required = false, value = "mouldNo") String mouldNo, @RequestParam(required = false, value = "varietyNo") String varietyNo, @RequestParam(required = false, value = "craftItemNo") String craftItemNo) {
|
||||||
|
return qcSourceService.queryQcSource(batchNo, machineNo, materialNo, mouldNo, varietyNo, craftItemNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出Excel表格
|
||||||
|
*/
|
||||||
|
@PostMapping("/exportExcel")
|
||||||
|
public String exportExcel(@RequestBody ExportSourceExcelQo exportSourceExcelQo) throws Exception {
|
||||||
|
return qcSourceService.exportExcel(exportSourceExcelQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化创建时间历史数据
|
||||||
|
*/
|
||||||
|
@GetMapping("/formatCreateTime")
|
||||||
|
public String formatCreateTime() {
|
||||||
|
return qcSourceService.formatCreateTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
75
src/main/java/com/xkrs/controller/QcSpecController.java
Normal file
75
src/main/java/com/xkrs/controller/QcSpecController.java
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
package com.xkrs.controller;
|
||||||
|
|
||||||
|
import com.xkrs.model.qo.ExportSpecExcelQo;
|
||||||
|
import com.xkrs.model.qo.QcSpecQoDelete;
|
||||||
|
import com.xkrs.model.qo.QcSpecQoInsert;
|
||||||
|
import com.xkrs.model.qo.QcSpecQoUpdate;
|
||||||
|
import com.xkrs.service.QcSpecService;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class QcSpecController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QcSpecService qcSpecService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加检验规格
|
||||||
|
*/
|
||||||
|
@PostMapping("/insertQcSpec")
|
||||||
|
public String insertQcSpec(@RequestBody QcSpecQoInsert insertQo) {
|
||||||
|
return qcSpecService.insertQcSpec(insertQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验规格
|
||||||
|
*/
|
||||||
|
@PostMapping("/deleteQcSpec")
|
||||||
|
public String deleteQcSpec(@RequestBody QcSpecQoDelete deleteQo) {
|
||||||
|
return qcSpecService.deleteQcSpec(deleteQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验规格
|
||||||
|
*/
|
||||||
|
@PostMapping("/updateQcSpec")
|
||||||
|
public String updateQcSpec(@RequestBody QcSpecQoUpdate updateQo) {
|
||||||
|
return qcSpecService.updateQcSpec(updateQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验规格
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryQcSpec")
|
||||||
|
public String queryQcSpec(@RequestParam(required = false, value = "varietyNo") String varietyNo, @RequestParam(required = false, value = "craftItemNo") String craftItemNo, @RequestParam(required = false, value = "qcItemNo") String qcItemNo) {
|
||||||
|
return qcSpecService.queryQcSpec(varietyNo, craftItemNo, qcItemNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入检验规格
|
||||||
|
*/
|
||||||
|
@PostMapping("/importSpecExcel")
|
||||||
|
public String importSpecExcel(@RequestParam(value = "specExcel") MultipartFile specExcel) {
|
||||||
|
return qcSpecService.importSpecExcel(specExcel);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出检验规格
|
||||||
|
*/
|
||||||
|
@PostMapping("/exportSpecExcel")
|
||||||
|
public String exportSpecExcel(@RequestBody ExportSpecExcelQo exportSpecExcelQo) throws Exception {
|
||||||
|
return qcSpecService.exportSpecExcel(exportSpecExcelQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出空白检验规格
|
||||||
|
*/
|
||||||
|
@PostMapping("/exportEmptySpecExcel")
|
||||||
|
public String exportEmptySpecExcel(@RequestBody ExportSpecExcelQo exportSpecExcelQo) throws Exception {
|
||||||
|
return qcSpecService.exportEmptySpecExcel(exportSpecExcelQo);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
38
src/main/java/com/xkrs/dao/CraftItemDao.java
Normal file
38
src/main/java/com/xkrs/dao/CraftItemDao.java
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
package com.xkrs.dao;
|
||||||
|
|
||||||
|
import com.xkrs.model.entity.CraftItemEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺项目Dao
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public interface CraftItemDao extends JpaRepository<CraftItemEntity, Integer>, JpaSpecificationExecutor<CraftItemEntity> {
|
||||||
|
|
||||||
|
Optional<CraftItemEntity> findByCraftItemNo(String craftItemNo);
|
||||||
|
|
||||||
|
Optional<CraftItemEntity> findByCraftItemName(String craftItemName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新工艺项目名称
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Modifying(clearAutomatically = true)
|
||||||
|
@Query(value = "UPDATE craft_item SET update_time = ?2, craft_item_name = ?3 WHERE id = ?1", nativeQuery = true)
|
||||||
|
void updateNameById(Integer id, String updateTime, String name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工艺项目
|
||||||
|
*/
|
||||||
|
@Query(value = "SELECT id AS id, craft_item_no AS no, craft_item_name AS name FROM craft_item WHERE craft_item_no LIKE %?1% AND craft_item_name LIKE %?2% ORDER BY create_time ASC", nativeQuery = true)
|
||||||
|
List<Map<String, Object>> queryCraftItem(String no, String name);
|
||||||
|
}
|
64
src/main/java/com/xkrs/dao/FileDao.java
Normal file
64
src/main/java/com/xkrs/dao/FileDao.java
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
package com.xkrs.dao;
|
||||||
|
|
||||||
|
import com.xkrs.model.entity.FileEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: XinYi Song
|
||||||
|
* @Date: 2022/1/20 15:23
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public interface FileDao extends JpaRepository<FileEntity, Long>, JpaSpecificationExecutor<FileEntity> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询文件信息
|
||||||
|
*
|
||||||
|
* @param lotNo 批次号
|
||||||
|
* @param machineNo 机器号
|
||||||
|
* @param materialNo 物料号
|
||||||
|
* @param modelNo 模具号
|
||||||
|
* @param machineTypeNo 机种号
|
||||||
|
* @param craftItemName 工艺项目名称
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Query(value = "SELECT * FROM qc_inspection_file WHERE lot_no = ? AND machine_no = ? AND material_no = ? AND model_no = ? AND machine_type_no = ? AND craft_item_name = ? ", nativeQuery = true)
|
||||||
|
Optional<FileEntity> selectFile(String lotNo, String machineNo, String materialNo, String modelNo, String machineTypeNo, String craftItemName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改模板上传信息
|
||||||
|
*
|
||||||
|
* @param lotNo 批次号
|
||||||
|
* @param machineNo 机器号
|
||||||
|
* @param materialNo 物料号
|
||||||
|
* @param modelNo 模具号
|
||||||
|
* @param machineTypeNo 机种号
|
||||||
|
* @param craftItemName 工艺项目名称
|
||||||
|
* @param fileUploadPath 模板路径
|
||||||
|
*/
|
||||||
|
@Modifying(clearAutomatically = true)
|
||||||
|
@Query(value = "UPDATE qc_inspection_file SET file_upload_path = ?7 WHERE lot_no = ?1 AND machine_no = ?2 AND material_no = ?3 AND model_no = ?4 AND machine_type_no = ?5 AND craft_item_name = ?6 ", nativeQuery = true)
|
||||||
|
void updateFileUploadPath(String lotNo, String machineNo, String materialNo, String modelNo, String machineTypeNo, String craftItemName, String fileUploadPath);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改文件下载信息
|
||||||
|
*
|
||||||
|
* @param lotNo 批次号
|
||||||
|
* @param machineNo 机器号
|
||||||
|
* @param materialNo 物料号
|
||||||
|
* @param modelNo 模具号
|
||||||
|
* @param machineTypeNo 机种号
|
||||||
|
* @param craftItemName 工艺项目名称
|
||||||
|
* @param fileDownloadPath 文件下载路径
|
||||||
|
*/
|
||||||
|
@Modifying(clearAutomatically = true)
|
||||||
|
@Query(value = "UPDATE qc_inspection_file SET file_download_path = ?7 WHERE lot_no = ?1 AND machine_no = ?2 AND material_no = ?3 AND model_no = ?4 AND machine_type_no = ?5 AND craft_item_name = ?6 ", nativeQuery = true)
|
||||||
|
void updateFileDownloadPath(String lotNo, String machineNo, String materialNo, String modelNo, String machineTypeNo, String craftItemName, String fileDownloadPath);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
36
src/main/java/com/xkrs/dao/QcItemDao.java
Normal file
36
src/main/java/com/xkrs/dao/QcItemDao.java
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
package com.xkrs.dao;
|
||||||
|
|
||||||
|
import com.xkrs.model.entity.QcItemEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验项目Dao
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public interface QcItemDao extends JpaRepository<QcItemEntity, Integer>, JpaSpecificationExecutor<QcItemEntity> {
|
||||||
|
|
||||||
|
Optional<QcItemEntity> findByQcItemNo(String qcItemNo);
|
||||||
|
|
||||||
|
Optional<QcItemEntity> findByQcItemName(String qcItemName);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验项目名称
|
||||||
|
*/
|
||||||
|
@Modifying(clearAutomatically = true)
|
||||||
|
@Query(value = "UPDATE qc_item SET update_time = ?2, qc_item_name = ?3 WHERE id = ?1", nativeQuery = true)
|
||||||
|
void updateNameById(Integer id, String updateTime, String name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验项目
|
||||||
|
*/
|
||||||
|
@Query(value = "SELECT id AS id, qc_item_no AS no, qc_item_name AS name, qc_item_type AS type FROM qc_item WHERE qc_item_no LIKE %?1% AND qc_item_name LIKE %?2% ORDER BY create_time ASC", nativeQuery = true)
|
||||||
|
List<Map<String, Object>> queryQcItem(String no, String name);
|
||||||
|
}
|
26
src/main/java/com/xkrs/dao/QcSourceDao.java
Normal file
26
src/main/java/com/xkrs/dao/QcSourceDao.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package com.xkrs.dao;
|
||||||
|
|
||||||
|
import com.xkrs.model.entity.QcSourceEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验数据Dao
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public interface QcSourceDao extends JpaRepository<QcSourceEntity, Integer>, JpaSpecificationExecutor<QcSourceEntity> {
|
||||||
|
|
||||||
|
@Query(value = "SELECT * FROM qc_source WHERE batch_no LIKE %?1% AND machine_no LIKE %?2% AND material_no LIKE %?3% AND mould_no LIKE %?4% AND variety_no LIKE %?5% AND craft_item_no LIKE %?6% ORDER BY create_time DESC", nativeQuery = true)
|
||||||
|
List<QcSourceEntity> queryQcSource(String batchNo, String machineNo, String materialNo, String mouldNo, String varietyNo, String craftItemNo);
|
||||||
|
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Modifying(clearAutomatically = true)
|
||||||
|
@Query(value = "UPDATE qc_source SET create_time_format = ?2 WHERE id = ?1", nativeQuery = true)
|
||||||
|
void formatCreateTime(Integer id, String formatCreateTime);
|
||||||
|
}
|
48
src/main/java/com/xkrs/dao/QcSpecDao.java
Normal file
48
src/main/java/com/xkrs/dao/QcSpecDao.java
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
package com.xkrs.dao;
|
||||||
|
|
||||||
|
import com.xkrs.model.entity.QcSpecEntity;
|
||||||
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface QcSpecDao extends JpaRepository<QcSpecEntity, Integer>, JpaSpecificationExecutor<QcSpecEntity> {
|
||||||
|
|
||||||
|
@Query(value = "SELECT * FROM qc_spec WHERE variety_no = ?1 AND craft_item_no = ?2 AND qc_item_no = ?3 ORDER BY create_time ASC", nativeQuery = true)
|
||||||
|
Optional<QcSpecEntity> findExistsQcSpec(String varietyNo, String craftItemNo, String qcItemNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验规格(Integer id)
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Modifying(clearAutomatically = true)
|
||||||
|
@Query(value = "UPDATE qc_spec SET update_time = ?2, max = ?3, mean = ?4, min = ?5, unit = ?6, method = ?7, standard = ?8, remark = ?9 WHERE id = ?1", nativeQuery = true)
|
||||||
|
void updateQcSpecById(Integer id, String updateTime, String max, String mean, String min, String unit, String method, String standard, String remark);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验规格(String varietyNo, String craftItemNo, String qcItemNo)
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Modifying(clearAutomatically = true)
|
||||||
|
@Query(value = "UPDATE qc_spec SET update_time = ?4, max = ?5, mean = ?6, min = ?7, unit = ?8, method = ?9, standard = ?10, remark = ?11 WHERE variety_no = ?1 AND craft_item_no = ?2 AND qc_item_no = ?3", nativeQuery = true)
|
||||||
|
void updateQcSpecByVCQ(String varietyNo, String craftItemNo, String qcItemNo, String updateTime, String max, String mean, String min, String unit, String method, String standard, String remark);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验规格
|
||||||
|
*/
|
||||||
|
@Query(value = "SELECT id, variety_no AS varietyNo, craft_item_no AS craftItemNo, qc_item_no AS qcItemNo, max, mean, min, unit, method, standard, remark FROM qc_spec WHERE variety_no LIKE %?1% AND qc_item_no LIKE %?2% ORDER BY create_time ASC", nativeQuery = true)
|
||||||
|
List<Map<String, Object>> queryQcSpec(String varietyNo, String qcItemNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验规格
|
||||||
|
*/
|
||||||
|
@Query(value = "SELECT id, variety_no AS varietyNo, craft_item_no AS craftItemNo, qc_item_no AS qcItemNo, max, mean, min, unit, method, standard, remark FROM qc_spec WHERE variety_no LIKE %?1% AND craft_item_no = ?2 AND qc_item_no LIKE %?3% ORDER BY create_time ASC", nativeQuery = true)
|
||||||
|
List<Map<String, Object>> queryQcSpec(String varietyNo, String craftItemNo, String qcItemNo);
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.xkrs.encapsulation;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 输出信息对象
|
||||||
|
*
|
||||||
|
* @param <T>
|
||||||
|
* @author tajochen
|
||||||
|
*/
|
||||||
|
public class EncapsulationObejct<T> implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态码
|
||||||
|
*/
|
||||||
|
int status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提示信息
|
||||||
|
*/
|
||||||
|
String msg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据
|
||||||
|
*/
|
||||||
|
T data;
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public T getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(T data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "EncapsulationObejct{" + "status=" + status + ", msg='" + msg + '\'' + ", data=" + data + '}';
|
||||||
|
}
|
||||||
|
}
|
100
src/main/java/com/xkrs/encapsulation/OutputEncapsulation.java
Normal file
100
src/main/java/com/xkrs/encapsulation/OutputEncapsulation.java
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
package com.xkrs.encapsulation;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||||
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.context.MessageSource;
|
||||||
|
import org.springframework.context.support.ResourceBundleMessageSource;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.validation.FieldError;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 输出信息封装
|
||||||
|
*
|
||||||
|
* @author tajochen
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class OutputEncapsulation {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(OutputEncapsulation.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取多国语言文件
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static MessageSource messageSource() {
|
||||||
|
Properties properties = new Properties();
|
||||||
|
// 使用ClassLoader加载properties配置文件生成对应的输入流
|
||||||
|
InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("application.properties");
|
||||||
|
// 使用properties对象加载输入流
|
||||||
|
try {
|
||||||
|
properties.load(in);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
|
||||||
|
messageSource.setBasename("i18n/messages");
|
||||||
|
messageSource.setDefaultEncoding("UTF-8");
|
||||||
|
return messageSource;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封装输出数据
|
||||||
|
*
|
||||||
|
* @param promptMessageEnum
|
||||||
|
* @param obj
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String outputEncapsulationObject(PromptMessageEnum promptMessageEnum, Object obj, Locale locale) {
|
||||||
|
|
||||||
|
EncapsulationObejct encapsulationObejct = new EncapsulationObejct();
|
||||||
|
encapsulationObejct.setStatus(promptMessageEnum.getCode());
|
||||||
|
encapsulationObejct.setMsg(messageSource().getMessage(promptMessageEnum.getText(), null, locale));
|
||||||
|
encapsulationObejct.setData(obj);
|
||||||
|
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
// 忽略无法转换的对象
|
||||||
|
objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
|
||||||
|
// 忽略json字符串中不识别的属性
|
||||||
|
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
// 解决jackson无法反序列化LocalDateTime的问题,引入jsr310标准
|
||||||
|
JavaTimeModule javaTimeModule = new JavaTimeModule();
|
||||||
|
objectMapper.registerModule(javaTimeModule);
|
||||||
|
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||||
|
String strByEo = "";
|
||||||
|
try {
|
||||||
|
strByEo = objectMapper.writeValueAsString(encapsulationObejct);
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.warn(e.toString());
|
||||||
|
}
|
||||||
|
return strByEo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 输出请求值检验错误信息
|
||||||
|
*
|
||||||
|
* @param fieldErrors
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String outputEncapsulationErrorList(List<FieldError> fieldErrors, Locale locale) {
|
||||||
|
List<String> errorMsg = new ArrayList<>();
|
||||||
|
for (FieldError fieldError : fieldErrors) {
|
||||||
|
String errMessage = fieldError.getDefaultMessage().subSequence(1, fieldError.getDefaultMessage().length() - 1).toString();
|
||||||
|
errorMsg.add(messageSource().getMessage(errMessage, null, locale));
|
||||||
|
}
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.PARAM_ILLEGAL, errorMsg, locale);
|
||||||
|
}
|
||||||
|
}
|
65
src/main/java/com/xkrs/encapsulation/PromptMessageEnum.java
Normal file
65
src/main/java/com/xkrs/encapsulation/PromptMessageEnum.java
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
package com.xkrs.encapsulation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提示信息枚举
|
||||||
|
* @author tajochen
|
||||||
|
*/
|
||||||
|
public enum PromptMessageEnum{
|
||||||
|
|
||||||
|
// 执行成功
|
||||||
|
SUCCESS(0, "sys.message.success"),
|
||||||
|
|
||||||
|
|
||||||
|
// 用户权限错误或非法操作: 1001-1999
|
||||||
|
USER_NOT_LOGGED(1001, "sys.message.user.not_logged_in"),
|
||||||
|
USER_LOGIN_ERROR(1002, "sys.message.user.login_error"),
|
||||||
|
USER_ACCOUNT_FORBIDDEN(1003, "sys.message.user.account_forbidden"),
|
||||||
|
USER_ACCOUNT_NOT_ACTIVATED(1004, "sys.message.user.account_not_activated"),
|
||||||
|
USER_HAS_OVERTIME(1005, "sys.message.user.overtime"),
|
||||||
|
USER_NO_PERMISSION(1006,"sys.message.user.no_permission"),
|
||||||
|
USER_ALREADY_LOGGED(1007, "sys.message.user.already_logged"),
|
||||||
|
|
||||||
|
// 请求参数错误或非法:2001-2999
|
||||||
|
PARAM_NULL(2001, "sys.message.param.null"),
|
||||||
|
PARAM_ILLEGAL(2002, "sys.message.param.illegal"),
|
||||||
|
|
||||||
|
// 数据返回错误:3001-3999
|
||||||
|
DATA_NONE(3001, "sys.message.data.none"),
|
||||||
|
|
||||||
|
DATA_WRONG(3002, "sys.message.data.wrong"),
|
||||||
|
DATA_EXIT(3003,"sys.message.exit"),
|
||||||
|
|
||||||
|
// 操作失败:4001-4999
|
||||||
|
PROCESS_FAIL(4001,"sys.message.process.fail"),
|
||||||
|
PROCESS_OVERTIME(4002,"sys.message.process.overtime"),
|
||||||
|
FILE_EXISTS(4003,"sys.message.file.exists"),
|
||||||
|
FILE_WRITE_ERROR(4004,"sys.message.file.write.error"),
|
||||||
|
FILE_READ_ERROR(4005,"sys.message.file.read.error"),
|
||||||
|
|
||||||
|
// 系统内部错误或异常:5001-5999
|
||||||
|
SYSTEM_INNER_ERROR(5001,"sys.message.system.inner_error"),
|
||||||
|
SYSTEM_ABNORMAL(5002,"sys.message.system.abnormal"),
|
||||||
|
SYSTEM_BUSY(5003,"sys.message.system.busy"),
|
||||||
|
SYSTEM_MAINTAIN(5004,"sys.message.system.maintain"),
|
||||||
|
|
||||||
|
// 数据库错误:6001-6999
|
||||||
|
DATABASE_ERROR(6001,"sys.message.database.error");
|
||||||
|
|
||||||
|
private int code;
|
||||||
|
|
||||||
|
private String text;
|
||||||
|
|
||||||
|
private PromptMessageEnum(int code,String text) {
|
||||||
|
this.code = code;
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getText() {
|
||||||
|
return this.text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return this.code;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
51
src/main/java/com/xkrs/model/bean/ReadSpecHeadBean.java
Normal file
51
src/main/java/com/xkrs/model/bean/ReadSpecHeadBean.java
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
package com.xkrs.model.bean;
|
||||||
|
|
||||||
|
public class ReadSpecHeadBean {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否成功
|
||||||
|
*/
|
||||||
|
private boolean success;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 错误消息
|
||||||
|
*/
|
||||||
|
private String errorMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表头的有效列数
|
||||||
|
*/
|
||||||
|
private long headCount;
|
||||||
|
|
||||||
|
public ReadSpecHeadBean() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSuccess() {
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSuccess(boolean success) {
|
||||||
|
this.success = success;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getErrorMessage() {
|
||||||
|
return errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setErrorMessage(String errorMessage) {
|
||||||
|
this.errorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getHeadCount() {
|
||||||
|
return headCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeadCount(long headCount) {
|
||||||
|
this.headCount = headCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ReadSpecHeadBean{" + "success=" + success + ", errorMessage='" + errorMessage + '\'' + ", headCount=" + headCount + '}';
|
||||||
|
}
|
||||||
|
}
|
58
src/main/java/com/xkrs/model/bean/XSSFCellDataBean.java
Normal file
58
src/main/java/com/xkrs/model/bean/XSSFCellDataBean.java
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
package com.xkrs.model.bean;
|
||||||
|
|
||||||
|
public class XSSFCellDataBean {
|
||||||
|
|
||||||
|
public static final int VALUE_TYPE_STRING = 1;
|
||||||
|
public static final int VALUE_TYPE_DOUBLE = 2;
|
||||||
|
|
||||||
|
private int valueType;
|
||||||
|
private String stringValue;
|
||||||
|
private double doubleValue;
|
||||||
|
|
||||||
|
public XSSFCellDataBean(String source) {
|
||||||
|
double tempDoubleValue = -100_000D;
|
||||||
|
try {
|
||||||
|
tempDoubleValue = Double.parseDouble(source);
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
if (tempDoubleValue < -99_000D) {
|
||||||
|
valueType = VALUE_TYPE_STRING;
|
||||||
|
stringValue = source;
|
||||||
|
} else {
|
||||||
|
valueType = VALUE_TYPE_DOUBLE;
|
||||||
|
doubleValue = tempDoubleValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getValueType() {
|
||||||
|
return valueType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public XSSFCellDataBean setValueType(int valueType) {
|
||||||
|
this.valueType = valueType;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStringValue() {
|
||||||
|
return stringValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public XSSFCellDataBean setStringValue(String stringValue) {
|
||||||
|
this.stringValue = stringValue;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getDoubleValue() {
|
||||||
|
return doubleValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public XSSFCellDataBean setDoubleValue(double doubleValue) {
|
||||||
|
this.doubleValue = doubleValue;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "XSSFCellDataBean{" + "valueType=" + valueType + ", stringValue='" + stringValue + '\'' + ", doubleValue=" + doubleValue + '}';
|
||||||
|
}
|
||||||
|
}
|
91
src/main/java/com/xkrs/model/entity/CraftItemEntity.java
Normal file
91
src/main/java/com/xkrs/model/entity/CraftItemEntity.java
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
package com.xkrs.model.entity;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺项目
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "craft_item")
|
||||||
|
public class CraftItemEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "craft_item_seq_gen")
|
||||||
|
@SequenceGenerator(name = "craft_item_seq_gen", sequenceName = "craft_item_id_seq", allocationSize = 1)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String craftItemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String craftItemName;
|
||||||
|
|
||||||
|
public CraftItemEntity() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(String updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCraftItemNo() {
|
||||||
|
return craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCraftItemNo(String craftItemNo) {
|
||||||
|
this.craftItemNo = craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCraftItemName() {
|
||||||
|
return craftItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCraftItemName(String craftItemName) {
|
||||||
|
this.craftItemName = craftItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "CraftItemEntity{" + "id=" + id + ", createTime='" + createTime + '\'' + ", updateTime='" + updateTime + '\'' + ", craftItemNo='" + craftItemNo + '\'' + ", craftItemName='" + craftItemName + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
148
src/main/java/com/xkrs/model/entity/FileEntity.java
Normal file
148
src/main/java/com/xkrs/model/entity/FileEntity.java
Normal file
@ -0,0 +1,148 @@
|
|||||||
|
package com.xkrs.model.entity;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: XinYi Song
|
||||||
|
* @Date: 2022/1/20 15:01
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "qc_inspection_file")
|
||||||
|
public class FileEntity {
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "qc_inspection_file_seq_gen")
|
||||||
|
@SequenceGenerator(name = "qc_inspection_file_seq_gen", sequenceName = "qc_inspection_file_id_seq", allocationSize = 1)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String lotNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机器号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String machineNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String materialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模具号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String modelNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机种号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String machineTypeNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺项目名称
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String craftItemName;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传模板的路径
|
||||||
|
*/
|
||||||
|
@Column(length = 2048, columnDefinition = "varchar(2048)")
|
||||||
|
private String fileUploadPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下载路径
|
||||||
|
*/
|
||||||
|
@Column(length = 2048, columnDefinition = "varchar(2048)")
|
||||||
|
private String fileDownloadPath;
|
||||||
|
|
||||||
|
public FileEntity() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLotNo() {
|
||||||
|
return lotNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLotNo(String lotNo) {
|
||||||
|
this.lotNo = lotNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMachineNo() {
|
||||||
|
return machineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMachineNo(String machineNo) {
|
||||||
|
this.machineNo = machineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialNo() {
|
||||||
|
return materialNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterialNo(String materialNo) {
|
||||||
|
this.materialNo = materialNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModelNo() {
|
||||||
|
return modelNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModelNo(String modelNo) {
|
||||||
|
this.modelNo = modelNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMachineTypeNo() {
|
||||||
|
return machineTypeNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMachineTypeNo(String machineTypeNo) {
|
||||||
|
this.machineTypeNo = machineTypeNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCraftItemName() {
|
||||||
|
return craftItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCraftItemName(String craftItemName) {
|
||||||
|
this.craftItemName = craftItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileUploadPath() {
|
||||||
|
return fileUploadPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileUploadPath(String fileUploadPath) {
|
||||||
|
this.fileUploadPath = fileUploadPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFileDownloadPath() {
|
||||||
|
return fileDownloadPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileDownloadPath(String fileDownloadPath) {
|
||||||
|
this.fileDownloadPath = fileDownloadPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "FileEntity{" + "id=" + id + ", lotNo='" + lotNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", modelNo='" + modelNo + '\'' + ", machineTypeNo='" + machineTypeNo + '\'' + ", craftItemName='" + craftItemName + '\'' + ", fileUploadPath='" + fileUploadPath + '\'' + ", fileDownloadPath='" + fileDownloadPath + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
107
src/main/java/com/xkrs/model/entity/QcItemEntity.java
Normal file
107
src/main/java/com/xkrs/model/entity/QcItemEntity.java
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
package com.xkrs.model.entity;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验项目
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "qc_item")
|
||||||
|
public class QcItemEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "qc_item_seq_gen")
|
||||||
|
@SequenceGenerator(name = "qc_item_seq_gen", sequenceName = "qc_item_id_seq", allocationSize = 1)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String qcItemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String qcItemName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
* "0":文本格式
|
||||||
|
* "1":图片格式
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String qcItemType;
|
||||||
|
|
||||||
|
public QcItemEntity() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(String updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQcItemNo() {
|
||||||
|
return qcItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQcItemNo(String qcItemNo) {
|
||||||
|
this.qcItemNo = qcItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQcItemName() {
|
||||||
|
return qcItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQcItemName(String qcItemName) {
|
||||||
|
this.qcItemName = qcItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQcItemType() {
|
||||||
|
return qcItemType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQcItemType(String qcItemType) {
|
||||||
|
this.qcItemType = qcItemType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcItemEntity{" + "id=" + id + ", createTime='" + createTime + '\'' + ", updateTime='" + updateTime + '\'' + ", qcItemNo='" + qcItemNo + '\'' + ", qcItemName='" + qcItemName + '\'' + ", qcItemType='" + qcItemType + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
187
src/main/java/com/xkrs/model/entity/QcSourceEntity.java
Normal file
187
src/main/java/com/xkrs/model/entity/QcSourceEntity.java
Normal file
@ -0,0 +1,187 @@
|
|||||||
|
package com.xkrs.model.entity;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验数据
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "qc_source")
|
||||||
|
public class QcSourceEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "qc_source_seq_gen")
|
||||||
|
@SequenceGenerator(name = "qc_source_seq_gen", sequenceName = "qc_source_id_seq", allocationSize = 1)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化创建时间
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String createTimeFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String batchNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机器号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String machineNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String materialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模具号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String mouldNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机种号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String varietyNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺项目编号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String craftItemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验项目编号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String qcItemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数值
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String qcValue;
|
||||||
|
|
||||||
|
public QcSourceEntity() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTimeFormat() {
|
||||||
|
return createTimeFormat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTimeFormat(String createTimeFormat) {
|
||||||
|
this.createTimeFormat = createTimeFormat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBatchNo() {
|
||||||
|
return batchNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBatchNo(String batchNo) {
|
||||||
|
this.batchNo = batchNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMachineNo() {
|
||||||
|
return machineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMachineNo(String machineNo) {
|
||||||
|
this.machineNo = machineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialNo() {
|
||||||
|
return materialNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterialNo(String materialNo) {
|
||||||
|
this.materialNo = materialNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMouldNo() {
|
||||||
|
return mouldNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMouldNo(String mouldNo) {
|
||||||
|
this.mouldNo = mouldNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVarietyNo() {
|
||||||
|
return varietyNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVarietyNo(String varietyNo) {
|
||||||
|
this.varietyNo = varietyNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCraftItemNo() {
|
||||||
|
return craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCraftItemNo(String craftItemNo) {
|
||||||
|
this.craftItemNo = craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQcItemNo() {
|
||||||
|
return qcItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQcItemNo(String qcItemNo) {
|
||||||
|
this.qcItemNo = qcItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQcValue() {
|
||||||
|
return qcValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQcValue(String qcValue) {
|
||||||
|
this.qcValue = qcValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcSourceEntity{" +
|
||||||
|
"id=" + id +
|
||||||
|
", createTime='" + createTime + '\'' +
|
||||||
|
", createTimeFormat='" + createTimeFormat + '\'' +
|
||||||
|
", batchNo='" + batchNo + '\'' +
|
||||||
|
", machineNo='" + machineNo + '\'' +
|
||||||
|
", materialNo='" + materialNo + '\'' +
|
||||||
|
", mouldNo='" + mouldNo + '\'' +
|
||||||
|
", varietyNo='" + varietyNo + '\'' +
|
||||||
|
", craftItemNo='" + craftItemNo + '\'' +
|
||||||
|
", qcItemNo='" + qcItemNo + '\'' +
|
||||||
|
", qcValue='" + qcValue + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
203
src/main/java/com/xkrs/model/entity/QcSpecEntity.java
Normal file
203
src/main/java/com/xkrs/model/entity/QcSpecEntity.java
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
package com.xkrs.model.entity;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验规格
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "qc_spec")
|
||||||
|
public class QcSpecEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "qc_spec_seq_gen")
|
||||||
|
@SequenceGenerator(name = "qc_spec_seq_gen", sequenceName = "qc_spec_id_seq", allocationSize = 1)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机种号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String varietyNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺项目编号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String craftItemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验项目编号
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String qcItemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最大值
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String max;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平均值
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String mean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最小值
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String min;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验方法
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验标准
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String standard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@Column(length = 85, columnDefinition = "varchar(85)")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
public QcSpecEntity() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(String createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(String updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVarietyNo() {
|
||||||
|
return varietyNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVarietyNo(String varietyNo) {
|
||||||
|
this.varietyNo = varietyNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCraftItemNo() {
|
||||||
|
return craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCraftItemNo(String craftItemNo) {
|
||||||
|
this.craftItemNo = craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQcItemNo() {
|
||||||
|
return qcItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQcItemNo(String qcItemNo) {
|
||||||
|
this.qcItemNo = qcItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMax() {
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMax(String max) {
|
||||||
|
this.max = max;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMean() {
|
||||||
|
return mean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMean(String mean) {
|
||||||
|
this.mean = mean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMin() {
|
||||||
|
return min;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMin(String min) {
|
||||||
|
this.min = min;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnit() {
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(String unit) {
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMethod() {
|
||||||
|
return method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMethod(String method) {
|
||||||
|
this.method = method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStandard() {
|
||||||
|
return standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStandard(String standard) {
|
||||||
|
this.standard = standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcSpecEntity{" + "id=" + id + ", createTime='" + createTime + '\'' + ", updateTime='" + updateTime + '\'' + ", varietyNo='" + varietyNo + '\'' + ", craftItemNo='" + craftItemNo + '\'' + ", qcItemNo='" + qcItemNo + '\'' + ", max='" + max + '\'' + ", mean='" + mean + '\'' + ", min='" + min + '\'' + ", unit='" + unit + '\'' + ", method='" + method + '\'' + ", standard='" + standard + '\'' + ", remark='" + remark + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
33
src/main/java/com/xkrs/model/qo/CraftItemQoDelete.java
Normal file
33
src/main/java/com/xkrs/model/qo/CraftItemQoDelete.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.CraftItemQoDeleteVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除工艺项目接收类
|
||||||
|
*/
|
||||||
|
public class CraftItemQoDelete {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{CraftItemEntity.id.blank}", groups = {CraftItemQoDeleteVa.class})
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
public CraftItemQoDelete() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "CraftItemQoDelete{" + "id=" + id + '}';
|
||||||
|
}
|
||||||
|
}
|
47
src/main/java/com/xkrs/model/qo/CraftItemQoInsert.java
Normal file
47
src/main/java/com/xkrs/model/qo/CraftItemQoInsert.java
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.CraftItemQoInsertVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增工艺项目接收类
|
||||||
|
*/
|
||||||
|
public class CraftItemQoInsert {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{CraftItemEntity.no.blank}", groups = {CraftItemQoInsertVa.class})
|
||||||
|
private String no;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{CraftItemEntity.name.blank}", groups = {CraftItemQoInsertVa.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public CraftItemQoInsert() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNo() {
|
||||||
|
return no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNo(String no) {
|
||||||
|
this.no = no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "CraftItemQoInsert{" + "no='" + no + '\'' + ", name='" + name + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
44
src/main/java/com/xkrs/model/qo/CraftItemQoUpdate.java
Normal file
44
src/main/java/com/xkrs/model/qo/CraftItemQoUpdate.java
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.CraftItemQoUpdateVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
public class CraftItemQoUpdate {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{CraftItemEntity.id.blank}", groups = {CraftItemQoUpdateVa.class})
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{CraftItemEntity.name.blank}", groups = {CraftItemQoUpdateVa.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public CraftItemQoUpdate() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "CraftItemQoUpdate{" + "id=" + id + ", name='" + name + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
108
src/main/java/com/xkrs/model/qo/ExportSourceExcelQo.java
Normal file
108
src/main/java/com/xkrs/model/qo/ExportSourceExcelQo.java
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.ExportSourceExcelQoVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
public class ExportSourceExcelQo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IP端口
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSourceEntity.host.blank}", groups = {ExportSourceExcelQoVa.class})
|
||||||
|
private String host;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
private String batchNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机器号
|
||||||
|
*/
|
||||||
|
private String machineNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料号
|
||||||
|
*/
|
||||||
|
private String materialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模具号
|
||||||
|
*/
|
||||||
|
private String mouldNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机种号
|
||||||
|
*/
|
||||||
|
private String varietyNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺项目编号
|
||||||
|
*/
|
||||||
|
private String craftItemNo;
|
||||||
|
|
||||||
|
public ExportSourceExcelQo() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHost() {
|
||||||
|
return host;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHost(String host) {
|
||||||
|
this.host = host;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBatchNo() {
|
||||||
|
return batchNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBatchNo(String batchNo) {
|
||||||
|
this.batchNo = batchNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMachineNo() {
|
||||||
|
return machineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMachineNo(String machineNo) {
|
||||||
|
this.machineNo = machineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialNo() {
|
||||||
|
return materialNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterialNo(String materialNo) {
|
||||||
|
this.materialNo = materialNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMouldNo() {
|
||||||
|
return mouldNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMouldNo(String mouldNo) {
|
||||||
|
this.mouldNo = mouldNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVarietyNo() {
|
||||||
|
return varietyNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVarietyNo(String varietyNo) {
|
||||||
|
this.varietyNo = varietyNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCraftItemNo() {
|
||||||
|
return craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCraftItemNo(String craftItemNo) {
|
||||||
|
this.craftItemNo = craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ExportExcelQo{" + "host='" + host + '\'' + ", batchNo='" + batchNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", mouldNo='" + mouldNo + '\'' + ", varietyNo='" + varietyNo + '\'' + ", craftItemNo='" + craftItemNo + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
30
src/main/java/com/xkrs/model/qo/ExportSpecExcelQo.java
Normal file
30
src/main/java/com/xkrs/model/qo/ExportSpecExcelQo.java
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.ExportSpecExcelQoVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
public class ExportSpecExcelQo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IP端口
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSpecEntity.host.blank}", groups = {ExportSpecExcelQoVa.class})
|
||||||
|
private String host;
|
||||||
|
|
||||||
|
public ExportSpecExcelQo() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHost() {
|
||||||
|
return host;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHost(String host) {
|
||||||
|
this.host = host;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ExportSpecExcelQo{" + "host='" + host + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
99
src/main/java/com/xkrs/model/qo/FileQo.java
Normal file
99
src/main/java/com/xkrs/model/qo/FileQo.java
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.FileQoInsert;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: XinYi Song
|
||||||
|
* @Date: 2022/1/20 15:26
|
||||||
|
*/
|
||||||
|
public class FileQo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{FileEntity.lotNo.blank}", groups = {FileQoInsert.class})
|
||||||
|
private String lotNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机器号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{FileEntity.machineNo.blank}", groups = {FileQoInsert.class})
|
||||||
|
private String machineNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{FileEntity.materialNo.blank}", groups = {FileQoInsert.class})
|
||||||
|
private String materialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模具号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{FileEntity.modelNo.blank}", groups = {FileQoInsert.class})
|
||||||
|
private String modelNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机种号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{FileEntity.machineTypeNo.blank}", groups = {FileQoInsert.class})
|
||||||
|
private String machineTypeNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺项目名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{FileEntity.craftItemName.blank}", groups = {FileQoInsert.class})
|
||||||
|
private String craftItemName;
|
||||||
|
|
||||||
|
public FileQo() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLotNo() {
|
||||||
|
return lotNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLotNo(String lotNo) {
|
||||||
|
this.lotNo = lotNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMachineNo() {
|
||||||
|
return machineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMachineNo(String machineNo) {
|
||||||
|
this.machineNo = machineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialNo() {
|
||||||
|
return materialNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterialNo(String materialNo) {
|
||||||
|
this.materialNo = materialNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getModelNo() {
|
||||||
|
return modelNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModelNo(String modelNo) {
|
||||||
|
this.modelNo = modelNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMachineTypeNo() {
|
||||||
|
return machineTypeNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMachineTypeNo(String machineTypeNo) {
|
||||||
|
this.machineTypeNo = machineTypeNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCraftItemName() {
|
||||||
|
return craftItemName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCraftItemName(String craftItemName) {
|
||||||
|
this.craftItemName = craftItemName;
|
||||||
|
}
|
||||||
|
}
|
33
src/main/java/com/xkrs/model/qo/QcItemQoDelete.java
Normal file
33
src/main/java/com/xkrs/model/qo/QcItemQoDelete.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.QcItemQoDeleteVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验项目接收类
|
||||||
|
*/
|
||||||
|
public class QcItemQoDelete {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcItemEntity.id.blank}", groups = {QcItemQoDeleteVa.class})
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
public QcItemQoDelete() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcItemQoDelete{" + "id=" + id + '}';
|
||||||
|
}
|
||||||
|
}
|
61
src/main/java/com/xkrs/model/qo/QcItemQoInsert.java
Normal file
61
src/main/java/com/xkrs/model/qo/QcItemQoInsert.java
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.QcItemQoInsertVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增检验项目接收类
|
||||||
|
*/
|
||||||
|
public class QcItemQoInsert {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcItemEntity.no.blank}", groups = {QcItemQoInsertVa.class})
|
||||||
|
private String no;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcItemEntity.name.blank}", groups = {QcItemQoInsertVa.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcItemEntity.type.blank}", groups = {QcItemQoInsertVa.class})
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
public QcItemQoInsert() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNo() {
|
||||||
|
return no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNo(String no) {
|
||||||
|
this.no = no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcItemQoInsert{" + "no='" + no + '\'' + ", name='" + name + '\'' + ", type='" + type + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
47
src/main/java/com/xkrs/model/qo/QcItemQoUpdate.java
Normal file
47
src/main/java/com/xkrs/model/qo/QcItemQoUpdate.java
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.QcItemQoUpdateVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验项目接收类
|
||||||
|
*/
|
||||||
|
public class QcItemQoUpdate {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcItemEntity.id.blank}", groups = {QcItemQoUpdateVa.class})
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcItemEntity.name.blank}", groups = {QcItemQoUpdateVa.class})
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public QcItemQoUpdate() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcItemQoUpdate{" + "id=" + id + ", name='" + name + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
33
src/main/java/com/xkrs/model/qo/QcSourceQoDelete.java
Normal file
33
src/main/java/com/xkrs/model/qo/QcSourceQoDelete.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.QcSourceQoDeleteVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验数据接收类
|
||||||
|
*/
|
||||||
|
public class QcSourceQoDelete {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSourceEntity.id.blank}", groups = {QcSourceQoDeleteVa.class})
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
public QcSourceQoDelete() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcSourceQoDelete{" + "id=" + id + '}';
|
||||||
|
}
|
||||||
|
}
|
130
src/main/java/com/xkrs/model/qo/QcSourceQoInsert.java
Normal file
130
src/main/java/com/xkrs/model/qo/QcSourceQoInsert.java
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.QcSourceQoInsertVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增检验数据接收类
|
||||||
|
*/
|
||||||
|
public class QcSourceQoInsert {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSourceEntity.batchNo.blank}", groups = {QcSourceQoInsertVa.class})
|
||||||
|
private String batchNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机器号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSourceEntity.machineNo.blank}", groups = {QcSourceQoInsertVa.class})
|
||||||
|
private String machineNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSourceEntity.materialNo.blank}", groups = {QcSourceQoInsertVa.class})
|
||||||
|
private String materialNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模具号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSourceEntity.mouldNo.blank}", groups = {QcSourceQoInsertVa.class})
|
||||||
|
private String mouldNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机种号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSourceEntity.varietyNo.blank}", groups = {QcSourceQoInsertVa.class})
|
||||||
|
private String varietyNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺项目编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSourceEntity.craftItemNo.blank}", groups = {QcSourceQoInsertVa.class})
|
||||||
|
private String craftItemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验项目编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSourceEntity.qcItemNo.blank}", groups = {QcSourceQoInsertVa.class})
|
||||||
|
private String qcItemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数值
|
||||||
|
*/
|
||||||
|
private String qcValue;
|
||||||
|
|
||||||
|
public QcSourceQoInsert() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBatchNo() {
|
||||||
|
return batchNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBatchNo(String batchNo) {
|
||||||
|
this.batchNo = batchNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMachineNo() {
|
||||||
|
return machineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMachineNo(String machineNo) {
|
||||||
|
this.machineNo = machineNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterialNo() {
|
||||||
|
return materialNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterialNo(String materialNo) {
|
||||||
|
this.materialNo = materialNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMouldNo() {
|
||||||
|
return mouldNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMouldNo(String mouldNo) {
|
||||||
|
this.mouldNo = mouldNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVarietyNo() {
|
||||||
|
return varietyNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVarietyNo(String varietyNo) {
|
||||||
|
this.varietyNo = varietyNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCraftItemNo() {
|
||||||
|
return craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCraftItemNo(String craftItemNo) {
|
||||||
|
this.craftItemNo = craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQcItemNo() {
|
||||||
|
return qcItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQcItemNo(String qcItemNo) {
|
||||||
|
this.qcItemNo = qcItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQcValue() {
|
||||||
|
return qcValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQcValue(String qcValue) {
|
||||||
|
this.qcValue = qcValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcSourceQoInsert{" + "batchNo='" + batchNo + '\'' + ", machineNo='" + machineNo + '\'' + ", materialNo='" + materialNo + '\'' + ", mouldNo='" + mouldNo + '\'' + ", varietyNo='" + varietyNo + '\'' + ", craftItemNo='" + craftItemNo + '\'' + ", qcItemNo='" + qcItemNo + '\'' + ", qcValue='" + qcValue + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
33
src/main/java/com/xkrs/model/qo/QcSpecQoDelete.java
Normal file
33
src/main/java/com/xkrs/model/qo/QcSpecQoDelete.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.QcSpecQoDeleteVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验规格接收类
|
||||||
|
*/
|
||||||
|
public class QcSpecQoDelete {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSpecEntity.id.blank}", groups = {QcSpecQoDeleteVa.class})
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
public QcSpecQoDelete() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcSpecQoDelete{" + "id=" + id + '}';
|
||||||
|
}
|
||||||
|
}
|
152
src/main/java/com/xkrs/model/qo/QcSpecQoInsert.java
Normal file
152
src/main/java/com/xkrs/model/qo/QcSpecQoInsert.java
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.QcSpecQoInsertVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增检验规格接收类
|
||||||
|
*/
|
||||||
|
public class QcSpecQoInsert {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机种号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSpecEntity.varietyNo.blank}", groups = {QcSpecQoInsertVa.class})
|
||||||
|
private String varietyNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺项目编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSpecEntity.craftItemNo.blank}", groups = {QcSpecQoInsertVa.class})
|
||||||
|
private String craftItemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验项目编号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSpecEntity.qcItemNo.blank}", groups = {QcSpecQoInsertVa.class})
|
||||||
|
private String qcItemNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最大值
|
||||||
|
*/
|
||||||
|
private String max;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平均值
|
||||||
|
*/
|
||||||
|
private String mean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最小值
|
||||||
|
*/
|
||||||
|
private String min;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验方法
|
||||||
|
*/
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验标准
|
||||||
|
*/
|
||||||
|
private String standard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
public QcSpecQoInsert() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVarietyNo() {
|
||||||
|
return varietyNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVarietyNo(String varietyNo) {
|
||||||
|
this.varietyNo = varietyNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCraftItemNo() {
|
||||||
|
return craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCraftItemNo(String craftItemNo) {
|
||||||
|
this.craftItemNo = craftItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getQcItemNo() {
|
||||||
|
return qcItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQcItemNo(String qcItemNo) {
|
||||||
|
this.qcItemNo = qcItemNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMax() {
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMax(String max) {
|
||||||
|
this.max = max;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMean() {
|
||||||
|
return mean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMean(String mean) {
|
||||||
|
this.mean = mean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMin() {
|
||||||
|
return min;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMin(String min) {
|
||||||
|
this.min = min;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnit() {
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(String unit) {
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMethod() {
|
||||||
|
return method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMethod(String method) {
|
||||||
|
this.method = method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStandard() {
|
||||||
|
return standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStandard(String standard) {
|
||||||
|
this.standard = standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcSpecQoInsert{" + "varietyNo='" + varietyNo + '\'' + ", craftItemNo='" + craftItemNo + '\'' + ", qcItemNo='" + qcItemNo + '\'' + ", max='" + max + '\'' + ", mean='" + mean + '\'' + ", min='" + min + '\'' + ", unit='" + unit + '\'' + ", method='" + method + '\'' + ", standard='" + standard + '\'' + ", remark='" + remark + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
124
src/main/java/com/xkrs/model/qo/QcSpecQoUpdate.java
Normal file
124
src/main/java/com/xkrs/model/qo/QcSpecQoUpdate.java
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
package com.xkrs.model.qo;
|
||||||
|
|
||||||
|
import com.xkrs.model.va.QcSpecQoUpdateVa;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验规格接收类
|
||||||
|
*/
|
||||||
|
public class QcSpecQoUpdate {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "{QcSpecEntity.id.blank}", groups = {QcSpecQoUpdateVa.class})
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最大值
|
||||||
|
*/
|
||||||
|
private String max;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 平均值
|
||||||
|
*/
|
||||||
|
private String mean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最小值
|
||||||
|
*/
|
||||||
|
private String min;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单位
|
||||||
|
*/
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验方法
|
||||||
|
*/
|
||||||
|
private String method;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验标准
|
||||||
|
*/
|
||||||
|
private String standard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
public QcSpecQoUpdate() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMax() {
|
||||||
|
return max;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMax(String max) {
|
||||||
|
this.max = max;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMean() {
|
||||||
|
return mean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMean(String mean) {
|
||||||
|
this.mean = mean;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMin() {
|
||||||
|
return min;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMin(String min) {
|
||||||
|
this.min = min;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUnit() {
|
||||||
|
return unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnit(String unit) {
|
||||||
|
this.unit = unit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMethod() {
|
||||||
|
return method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMethod(String method) {
|
||||||
|
this.method = method;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStandard() {
|
||||||
|
return standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStandard(String standard) {
|
||||||
|
this.standard = standard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "QcSpecQoUpdate{" + "id=" + id + ", max='" + max + '\'' + ", mean='" + mean + '\'' + ", min='" + min + '\'' + ", unit='" + unit + '\'' + ", method='" + method + '\'' + ", standard='" + standard + '\'' + ", remark='" + remark + '\'' + '}';
|
||||||
|
}
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/CraftItemQoDeleteVa.java
Normal file
4
src/main/java/com/xkrs/model/va/CraftItemQoDeleteVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface CraftItemQoDeleteVa {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/CraftItemQoInsertVa.java
Normal file
4
src/main/java/com/xkrs/model/va/CraftItemQoInsertVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface CraftItemQoInsertVa {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/CraftItemQoUpdateVa.java
Normal file
4
src/main/java/com/xkrs/model/va/CraftItemQoUpdateVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface CraftItemQoUpdateVa {
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface ExportSourceExcelQoVa {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/ExportSpecExcelQoVa.java
Normal file
4
src/main/java/com/xkrs/model/va/ExportSpecExcelQoVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface ExportSpecExcelQoVa {
|
||||||
|
}
|
8
src/main/java/com/xkrs/model/va/FileQoInsert.java
Normal file
8
src/main/java/com/xkrs/model/va/FileQoInsert.java
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: XinYi Song
|
||||||
|
* @Date: 2022/1/20 15:26
|
||||||
|
*/
|
||||||
|
public interface FileQoInsert {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/QcItemQoDeleteVa.java
Normal file
4
src/main/java/com/xkrs/model/va/QcItemQoDeleteVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface QcItemQoDeleteVa {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/QcItemQoInsertVa.java
Normal file
4
src/main/java/com/xkrs/model/va/QcItemQoInsertVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface QcItemQoInsertVa {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/QcItemQoUpdateVa.java
Normal file
4
src/main/java/com/xkrs/model/va/QcItemQoUpdateVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface QcItemQoUpdateVa {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/QcSourceQoDeleteVa.java
Normal file
4
src/main/java/com/xkrs/model/va/QcSourceQoDeleteVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface QcSourceQoDeleteVa {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/QcSourceQoInsertVa.java
Normal file
4
src/main/java/com/xkrs/model/va/QcSourceQoInsertVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface QcSourceQoInsertVa {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/QcSpecQoDeleteVa.java
Normal file
4
src/main/java/com/xkrs/model/va/QcSpecQoDeleteVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface QcSpecQoDeleteVa {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/QcSpecQoInsertVa.java
Normal file
4
src/main/java/com/xkrs/model/va/QcSpecQoInsertVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface QcSpecQoInsertVa {
|
||||||
|
}
|
4
src/main/java/com/xkrs/model/va/QcSpecQoUpdateVa.java
Normal file
4
src/main/java/com/xkrs/model/va/QcSpecQoUpdateVa.java
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
package com.xkrs.model.va;
|
||||||
|
|
||||||
|
public interface QcSpecQoUpdateVa {
|
||||||
|
}
|
29
src/main/java/com/xkrs/service/CraftItemService.java
Normal file
29
src/main/java/com/xkrs/service/CraftItemService.java
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package com.xkrs.service;
|
||||||
|
|
||||||
|
import com.xkrs.model.qo.CraftItemQoDelete;
|
||||||
|
import com.xkrs.model.qo.CraftItemQoInsert;
|
||||||
|
import com.xkrs.model.qo.CraftItemQoUpdate;
|
||||||
|
|
||||||
|
public interface CraftItemService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加工艺项目
|
||||||
|
*/
|
||||||
|
String insertCraftItem(CraftItemQoInsert insertQo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除工艺项目
|
||||||
|
*/
|
||||||
|
String deleteCraftItem(CraftItemQoDelete deleteQo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新工艺项目名称
|
||||||
|
*/
|
||||||
|
String updateCraftItem(CraftItemQoUpdate updateQo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工艺项目
|
||||||
|
*/
|
||||||
|
String queryCraftItem(String no, String name);
|
||||||
|
|
||||||
|
}
|
30
src/main/java/com/xkrs/service/FileService.java
Normal file
30
src/main/java/com/xkrs/service/FileService.java
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
package com.xkrs.service;
|
||||||
|
|
||||||
|
import com.xkrs.model.qo.FileQo;
|
||||||
|
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: XinYi Song
|
||||||
|
* @Date: 2022/1/20 15:24
|
||||||
|
*/
|
||||||
|
public interface FileService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加模板信息
|
||||||
|
*
|
||||||
|
* @param fileQo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String insertFileExcel(FileQo fileQo, MultipartFile fileExcel) throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param fileQo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String exportExcel(FileQo fileQo) throws IOException, InvalidFormatException;
|
||||||
|
}
|
29
src/main/java/com/xkrs/service/QcItemService.java
Normal file
29
src/main/java/com/xkrs/service/QcItemService.java
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
package com.xkrs.service;
|
||||||
|
|
||||||
|
import com.xkrs.model.qo.QcItemQoDelete;
|
||||||
|
import com.xkrs.model.qo.QcItemQoInsert;
|
||||||
|
import com.xkrs.model.qo.QcItemQoUpdate;
|
||||||
|
|
||||||
|
public interface QcItemService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加检验项目
|
||||||
|
*/
|
||||||
|
String insertQcItem(QcItemQoInsert insertQo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验项目
|
||||||
|
*/
|
||||||
|
String deleteQcItem(QcItemQoDelete deleteQo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验项目名称
|
||||||
|
*/
|
||||||
|
String updateQcItem(QcItemQoUpdate updateQo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验项目
|
||||||
|
*/
|
||||||
|
String queryQcItem(String no, String name);
|
||||||
|
|
||||||
|
}
|
34
src/main/java/com/xkrs/service/QcSourceService.java
Normal file
34
src/main/java/com/xkrs/service/QcSourceService.java
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
package com.xkrs.service;
|
||||||
|
|
||||||
|
import com.xkrs.model.qo.ExportSourceExcelQo;
|
||||||
|
import com.xkrs.model.qo.QcSourceQoDelete;
|
||||||
|
import com.xkrs.model.qo.QcSourceQoInsert;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
public interface QcSourceService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加检验数据
|
||||||
|
*/
|
||||||
|
String insertQcSource(QcSourceQoInsert insertQo, MultipartFile picture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验数据
|
||||||
|
*/
|
||||||
|
String deleteQcSource(QcSourceQoDelete deleteQo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验数据
|
||||||
|
*/
|
||||||
|
String queryQcSource(String batchNo, String machineNo, String materialNo, String mouldNo, String varietyNo, String craftItemNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出Excel表格
|
||||||
|
*/
|
||||||
|
String exportExcel(ExportSourceExcelQo exportSourceExcelQo) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化创建时间历史数据
|
||||||
|
*/
|
||||||
|
String formatCreateTime();
|
||||||
|
}
|
47
src/main/java/com/xkrs/service/QcSpecService.java
Normal file
47
src/main/java/com/xkrs/service/QcSpecService.java
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
package com.xkrs.service;
|
||||||
|
|
||||||
|
import com.xkrs.model.qo.ExportSpecExcelQo;
|
||||||
|
import com.xkrs.model.qo.QcSpecQoDelete;
|
||||||
|
import com.xkrs.model.qo.QcSpecQoInsert;
|
||||||
|
import com.xkrs.model.qo.QcSpecQoUpdate;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
public interface QcSpecService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加检验规格
|
||||||
|
*/
|
||||||
|
String insertQcSpec(QcSpecQoInsert insertQo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验规格
|
||||||
|
*/
|
||||||
|
String deleteQcSpec(QcSpecQoDelete deleteQo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验规格
|
||||||
|
*/
|
||||||
|
String updateQcSpec(QcSpecQoUpdate updateQo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验规格
|
||||||
|
*/
|
||||||
|
String queryQcSpec(String varietyNo, String craftItemNo, String qcItemNo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入检验规格
|
||||||
|
*/
|
||||||
|
String importSpecExcel(MultipartFile specExcel);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出检验规格
|
||||||
|
*/
|
||||||
|
String exportSpecExcel(ExportSpecExcelQo exportSpecExcelQo) throws Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出空白检验规格
|
||||||
|
*/
|
||||||
|
String exportEmptySpecExcel(ExportSpecExcelQo exportSpecExcelQo) throws Exception;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,91 @@
|
|||||||
|
package com.xkrs.service.impl;
|
||||||
|
|
||||||
|
import com.xkrs.dao.CraftItemDao;
|
||||||
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
|
import com.xkrs.model.entity.CraftItemEntity;
|
||||||
|
import com.xkrs.model.qo.CraftItemQoDelete;
|
||||||
|
import com.xkrs.model.qo.CraftItemQoInsert;
|
||||||
|
import com.xkrs.model.qo.CraftItemQoUpdate;
|
||||||
|
import com.xkrs.service.CraftItemService;
|
||||||
|
import com.xkrs.util.LocalDateUtils;
|
||||||
|
import com.xkrs.util.LocalStringUtils;
|
||||||
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import static com.xkrs.encapsulation.OutputEncapsulation.outputEncapsulationObject;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class CraftItemServiceImpl implements CraftItemService {
|
||||||
|
|
||||||
|
private Locale locale = LocaleContextHolder.getLocale();
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CraftItemDao craftItemDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加工艺项目
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String insertCraftItem(CraftItemQoInsert insertQo) {
|
||||||
|
String no = insertQo.getNo();
|
||||||
|
String name = insertQo.getName();
|
||||||
|
Optional<CraftItemEntity> entityByNo = craftItemDao.findByCraftItemNo(no);
|
||||||
|
if (entityByNo.isPresent()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_EXIT, "该工艺项目已存在,请勿重复添加!", locale);
|
||||||
|
}
|
||||||
|
CraftItemEntity entity = new CraftItemEntity();
|
||||||
|
entity.setCreateTime(LocalDateUtils.getCurrentSecond());
|
||||||
|
entity.setUpdateTime("");
|
||||||
|
entity.setCraftItemNo(LocalStringUtils.formatEmptyValue(no));
|
||||||
|
entity.setCraftItemName(LocalStringUtils.formatEmptyValue(name));
|
||||||
|
craftItemDao.save(entity);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除工艺项目
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String deleteCraftItem(CraftItemQoDelete deleteQo) {
|
||||||
|
Integer id = deleteQo.getId();
|
||||||
|
Optional<CraftItemEntity> entityById = craftItemDao.findById(id);
|
||||||
|
if (entityById.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该工艺项目,请先添加工艺项目!", locale);
|
||||||
|
}
|
||||||
|
craftItemDao.deleteById(id);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "删除成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新工艺项目名称
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String updateCraftItem(CraftItemQoUpdate updateQo) {
|
||||||
|
Integer id = updateQo.getId();
|
||||||
|
String name = updateQo.getName();
|
||||||
|
Optional<CraftItemEntity> entityById = craftItemDao.findById(id);
|
||||||
|
if (entityById.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该工艺项目,请先添加工艺项目!", locale);
|
||||||
|
}
|
||||||
|
craftItemDao.updateNameById(id, LocalDateUtils.getCurrentSecond(), LocalStringUtils.formatEmptyValue(name));
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "更新成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询工艺项目
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String queryCraftItem(String no, String name) {
|
||||||
|
List<Map<String, Object>> resultList = craftItemDao.queryCraftItem(LocalStringUtils.formatEmptyValue(no), LocalStringUtils.formatEmptyValue(name));
|
||||||
|
if (resultList == null || resultList.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该工艺项目的信息!", locale);
|
||||||
|
}
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, resultList, locale);
|
||||||
|
}
|
||||||
|
}
|
100
src/main/java/com/xkrs/service/impl/FileServiceImpl.java
Normal file
100
src/main/java/com/xkrs/service/impl/FileServiceImpl.java
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
package com.xkrs.service.impl;
|
||||||
|
|
||||||
|
import com.xkrs.dao.FileDao;
|
||||||
|
import com.xkrs.dao.QcSourceDao;
|
||||||
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
|
import com.xkrs.model.qo.FileQo;
|
||||||
|
import com.xkrs.service.FileService;
|
||||||
|
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||||
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import static com.xkrs.encapsulation.OutputEncapsulation.outputEncapsulationObject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: XinYi Song
|
||||||
|
* @Date: 2022/1/20 15:24
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class FileServiceImpl implements FileService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private FileDao fileDao;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QcSourceDao qcSourceDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加模板信息
|
||||||
|
*
|
||||||
|
* @param fileQo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String insertFileExcel(FileQo fileQo, MultipartFile fileExcel) throws IOException {
|
||||||
|
// String lotNo = fileQo.getLotNo();
|
||||||
|
// String machineNo = fileQo.getMachineNo();
|
||||||
|
// String materialNo = fileQo.getMaterialNo();
|
||||||
|
// String modelNo = fileQo.getModelNo();
|
||||||
|
// String machineTypeNo = fileQo.getMachineTypeNo();
|
||||||
|
// String craftItemName = fileQo.getCraftItemName();
|
||||||
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
|
// Optional<FileEntity> fileEntity = fileDao.selectFile(lotNo, machineNo, materialNo, modelNo, machineTypeNo, craftItemName);
|
||||||
|
// if (fileEntity.isPresent()) {
|
||||||
|
// return outputEncapsulationObject(PromptMessageEnum.DATA_EXIT, "已存在该产品的模板!", locale);
|
||||||
|
// }
|
||||||
|
// if (fileExcel == null) {
|
||||||
|
// return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "模板不能为空!", locale);
|
||||||
|
// }
|
||||||
|
// String file = ExcelUploadUtil.memoryFile(fileExcel, 1);
|
||||||
|
// FileEntity fileEntity1 = new FileEntity();
|
||||||
|
// fileEntity1.setLotNo(fileQo.getLotNo());
|
||||||
|
// fileEntity1.setMachineNo(fileQo.getMachineNo());
|
||||||
|
// fileEntity1.setMaterialNo(fileQo.getMaterialNo());
|
||||||
|
// fileEntity1.setModelNo(fileQo.getModelNo());
|
||||||
|
// fileEntity1.setMachineTypeNo(fileQo.getMachineTypeNo());
|
||||||
|
// fileEntity1.setFileUploadPath(file);
|
||||||
|
// fileDao.save(fileEntity1);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param fileQo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Override
|
||||||
|
public String exportExcel(FileQo fileQo) throws IOException, InvalidFormatException {
|
||||||
|
// String lotNo = fileQo.getLotNo();
|
||||||
|
// String machineNo = fileQo.getMachineNo();
|
||||||
|
// String materialNo = fileQo.getMaterialNo();
|
||||||
|
// String modelNo = fileQo.getModelNo();
|
||||||
|
// String machineTypeNo = fileQo.getMachineTypeNo();
|
||||||
|
// String craftItemName = fileQo.getCraftItemName();
|
||||||
|
Locale locale = LocaleContextHolder.getLocale();
|
||||||
|
// Optional<FileEntity> fileEntity = fileDao.selectFile(lotNo, machineNo, materialNo, modelNo, machineTypeNo, craftItemName);
|
||||||
|
// if (fileEntity.isEmpty()) {
|
||||||
|
// return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的模板,请添加!", locale);
|
||||||
|
// }
|
||||||
|
// String fileUploadPath = fileEntity.get().getFileUploadPath();
|
||||||
|
// List<Map<String, Object>> resultList = qcSourceDao.queryQcSource(lotNo, machineNo, materialNo, modelNo, machineTypeNo, "");
|
||||||
|
// if (resultList == null || resultList.size() == 0) {
|
||||||
|
// return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该产品的信息!", locale);
|
||||||
|
// }
|
||||||
|
// Map<String, String> map = new HashMap<>();
|
||||||
|
// for (Map<String, Object> result : resultList) {
|
||||||
|
// map.put((String) result.get("qcItemNo"), (String) result.get("qcValue"));
|
||||||
|
// }
|
||||||
|
// String fill = ExportExcel.exportToProveExcel(map, fileUploadPath);
|
||||||
|
// fileDao.updateFileDownloadPath(lotNo, machineNo, materialNo, modelNo, machineTypeNo, craftItemName, fill);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "导出成功", locale);
|
||||||
|
}
|
||||||
|
}
|
96
src/main/java/com/xkrs/service/impl/QcItemServiceImpl.java
Normal file
96
src/main/java/com/xkrs/service/impl/QcItemServiceImpl.java
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
package com.xkrs.service.impl;
|
||||||
|
|
||||||
|
import com.xkrs.dao.QcItemDao;
|
||||||
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
|
import com.xkrs.model.entity.QcItemEntity;
|
||||||
|
import com.xkrs.model.qo.QcItemQoDelete;
|
||||||
|
import com.xkrs.model.qo.QcItemQoInsert;
|
||||||
|
import com.xkrs.model.qo.QcItemQoUpdate;
|
||||||
|
import com.xkrs.service.QcItemService;
|
||||||
|
import com.xkrs.util.LocalDateUtils;
|
||||||
|
import com.xkrs.util.LocalStringUtils;
|
||||||
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import static com.xkrs.encapsulation.OutputEncapsulation.outputEncapsulationObject;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class QcItemServiceImpl implements QcItemService {
|
||||||
|
|
||||||
|
private Locale locale = LocaleContextHolder.getLocale();
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QcItemDao qcItemDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加检验项目
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String insertQcItem(QcItemQoInsert insertQo) {
|
||||||
|
String no = insertQo.getNo();
|
||||||
|
String name = insertQo.getName();
|
||||||
|
String type = insertQo.getType();
|
||||||
|
Optional<QcItemEntity> entityByNo = qcItemDao.findByQcItemNo(no);
|
||||||
|
if (entityByNo.isPresent()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_EXIT, "该检验项目已存在,请勿重复添加!", locale);
|
||||||
|
}
|
||||||
|
QcItemEntity entity = new QcItemEntity();
|
||||||
|
entity.setCreateTime(LocalDateUtils.getCurrentSecond());
|
||||||
|
entity.setUpdateTime("");
|
||||||
|
entity.setQcItemNo(LocalStringUtils.formatEmptyValue(no));
|
||||||
|
entity.setQcItemName(LocalStringUtils.formatEmptyValue(name));
|
||||||
|
entity.setQcItemType(LocalStringUtils.formatEmptyValue(type));
|
||||||
|
qcItemDao.save(entity);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验项目
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Override
|
||||||
|
public String deleteQcItem(QcItemQoDelete deleteQo) {
|
||||||
|
Integer id = deleteQo.getId();
|
||||||
|
Optional<QcItemEntity> entityById = qcItemDao.findById(id);
|
||||||
|
if (entityById.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验项目,请先添加检验项目!", locale);
|
||||||
|
}
|
||||||
|
qcItemDao.deleteById(id);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "删除成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验项目名称
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Override
|
||||||
|
public String updateQcItem(QcItemQoUpdate updateQo) {
|
||||||
|
Integer id = updateQo.getId();
|
||||||
|
String name = updateQo.getName();
|
||||||
|
Optional<QcItemEntity> entityById = qcItemDao.findById(id);
|
||||||
|
if (entityById.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验项目,请先添加检验项目!", locale);
|
||||||
|
}
|
||||||
|
qcItemDao.updateNameById(id, LocalDateUtils.getCurrentSecond(), LocalStringUtils.formatEmptyValue(name));
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "更新成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验项目
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String queryQcItem(String no, String name) {
|
||||||
|
List<Map<String, Object>> resultList = qcItemDao.queryQcItem(LocalStringUtils.formatEmptyValue(no), LocalStringUtils.formatEmptyValue(name));
|
||||||
|
if (resultList == null || resultList.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该检验项目的信息!", locale);
|
||||||
|
}
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, resultList, locale);
|
||||||
|
}
|
||||||
|
}
|
610
src/main/java/com/xkrs/service/impl/QcSourceServiceImpl.java
Normal file
610
src/main/java/com/xkrs/service/impl/QcSourceServiceImpl.java
Normal file
@ -0,0 +1,610 @@
|
|||||||
|
package com.xkrs.service.impl;
|
||||||
|
|
||||||
|
import com.xkrs.dao.CraftItemDao;
|
||||||
|
import com.xkrs.dao.QcItemDao;
|
||||||
|
import com.xkrs.dao.QcSourceDao;
|
||||||
|
import com.xkrs.dao.QcSpecDao;
|
||||||
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
|
import com.xkrs.model.bean.XSSFCellDataBean;
|
||||||
|
import com.xkrs.model.entity.CraftItemEntity;
|
||||||
|
import com.xkrs.model.entity.QcItemEntity;
|
||||||
|
import com.xkrs.model.entity.QcSourceEntity;
|
||||||
|
import com.xkrs.model.entity.QcSpecEntity;
|
||||||
|
import com.xkrs.model.qo.ExportSourceExcelQo;
|
||||||
|
import com.xkrs.model.qo.QcSourceQoDelete;
|
||||||
|
import com.xkrs.model.qo.QcSourceQoInsert;
|
||||||
|
import com.xkrs.service.QcSourceService;
|
||||||
|
import com.xkrs.util.*;
|
||||||
|
import org.apache.http.util.TextUtils;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||||
|
import org.apache.poi.hssf.util.HSSFColor;
|
||||||
|
import org.apache.poi.ss.usermodel.CellStyle;
|
||||||
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
|
import org.apache.poi.xssf.usermodel.*;
|
||||||
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import static com.xkrs.encapsulation.OutputEncapsulation.outputEncapsulationObject;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class QcSourceServiceImpl implements QcSourceService {
|
||||||
|
|
||||||
|
private Locale locale = LocaleContextHolder.getLocale();
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CraftItemDao craftItemDao;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QcItemDao qcItemDao;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QcSourceDao qcSourceDao;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QcSpecDao qcSpecDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel样式一(表头顺序)
|
||||||
|
* 批次号 机器号 物料号 模具号 机种号
|
||||||
|
*/
|
||||||
|
List<String> EXCEL_HEAD_STYLE_ONE_NO = Arrays.asList("batchNo", "machineNo", "materialNo", "mouldNo", "varietyNo", "craftItemNo", "createTime", "index");
|
||||||
|
List<String> EXCEL_HEAD_STYLE_ONE_NAME = Arrays.asList("批次", "机器", "物料", "模具", "机种", "工艺项目", "上传时间", "过程抽检批次");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加检验数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String insertQcSource(QcSourceQoInsert insertQo, MultipartFile picture) {
|
||||||
|
String batchNo = insertQo.getBatchNo();
|
||||||
|
String machineNo = insertQo.getMachineNo();
|
||||||
|
String materialNo = insertQo.getMaterialNo();
|
||||||
|
String mouldNo = insertQo.getMouldNo();
|
||||||
|
String varietyNo = insertQo.getVarietyNo();
|
||||||
|
String craftItemNo = insertQo.getCraftItemNo();
|
||||||
|
String qcItemNo = insertQo.getQcItemNo();
|
||||||
|
String qcValue = insertQo.getQcValue();
|
||||||
|
Optional<CraftItemEntity> craftItemByNo = craftItemDao.findByCraftItemNo(craftItemNo);
|
||||||
|
if (craftItemByNo.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该工艺项目,请先添加工艺项目!", locale);
|
||||||
|
}
|
||||||
|
Optional<QcItemEntity> qcItemByNo = qcItemDao.findByQcItemNo(qcItemNo);
|
||||||
|
if (qcItemByNo.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验项目,请先添加检验项目!", locale);
|
||||||
|
}
|
||||||
|
if (Constant.QC_ITEM_TYPE_STRING.equals(qcItemByNo.get().getQcItemType())) {
|
||||||
|
System.out.println("添加检验数据(文本类型)" + insertQo.toString());
|
||||||
|
QcSourceEntity entity = new QcSourceEntity();
|
||||||
|
String currentSecond = LocalDateUtils.getCurrentSecond();
|
||||||
|
entity.setCreateTime(currentSecond);
|
||||||
|
entity.setCreateTimeFormat(LocalDateUtils.formatCurrentSecond(currentSecond));
|
||||||
|
entity.setBatchNo(LocalStringUtils.formatEmptyValue(batchNo));
|
||||||
|
entity.setMachineNo(LocalStringUtils.formatEmptyValue(machineNo));
|
||||||
|
entity.setMaterialNo(LocalStringUtils.formatEmptyValue(materialNo));
|
||||||
|
entity.setMouldNo(LocalStringUtils.formatEmptyValue(mouldNo));
|
||||||
|
entity.setVarietyNo(LocalStringUtils.formatEmptyValue(varietyNo));
|
||||||
|
entity.setCraftItemNo(LocalStringUtils.formatEmptyValue(craftItemNo));
|
||||||
|
entity.setQcItemNo(LocalStringUtils.formatEmptyValue(qcItemNo));
|
||||||
|
if (TextUtils.isEmpty(qcValue)) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "添加失败,测量值(qcValue)字段不能为空!", locale);
|
||||||
|
}
|
||||||
|
entity.setQcValue(LocalStringUtils.formatEmptyValue(qcValue));
|
||||||
|
qcSourceDao.save(entity);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
||||||
|
}
|
||||||
|
if (Constant.QC_ITEM_TYPE_PICTURE.equals(qcItemByNo.get().getQcItemType())) {
|
||||||
|
System.out.println("添加检验数据(图片类型)" + insertQo.toString());
|
||||||
|
if (picture == null) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "上传图片不能为空!", locale);
|
||||||
|
}
|
||||||
|
String picturePath;
|
||||||
|
try {
|
||||||
|
picturePath = ExcelUploadUtil.memoryFile(picture, 2);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "上传图片失败!", locale);
|
||||||
|
}
|
||||||
|
QcSourceEntity entity = new QcSourceEntity();
|
||||||
|
String currentSecond = LocalDateUtils.getCurrentSecond();
|
||||||
|
entity.setCreateTime(currentSecond);
|
||||||
|
entity.setCreateTimeFormat(LocalDateUtils.formatCurrentSecond(currentSecond));
|
||||||
|
entity.setBatchNo(LocalStringUtils.formatEmptyValue(batchNo));
|
||||||
|
entity.setMachineNo(LocalStringUtils.formatEmptyValue(machineNo));
|
||||||
|
entity.setMaterialNo(LocalStringUtils.formatEmptyValue(materialNo));
|
||||||
|
entity.setMouldNo(LocalStringUtils.formatEmptyValue(mouldNo));
|
||||||
|
entity.setVarietyNo(LocalStringUtils.formatEmptyValue(varietyNo));
|
||||||
|
entity.setCraftItemNo(LocalStringUtils.formatEmptyValue(craftItemNo));
|
||||||
|
entity.setQcItemNo(LocalStringUtils.formatEmptyValue(qcItemNo));
|
||||||
|
entity.setQcValue(LocalStringUtils.formatEmptyValue(picturePath));
|
||||||
|
qcSourceDao.save(entity);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
||||||
|
}
|
||||||
|
System.out.println("添加检验数据(未知类型)" + insertQo.toString());
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "添加失败!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验数据
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Override
|
||||||
|
public String deleteQcSource(QcSourceQoDelete deleteQo) {
|
||||||
|
Integer id = deleteQo.getId();
|
||||||
|
Optional<QcSourceEntity> entityById = qcSourceDao.findById(id);
|
||||||
|
if (entityById.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验数据,请先添加检验数据!", locale);
|
||||||
|
}
|
||||||
|
qcSourceDao.deleteById(id);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "删除成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String queryQcSource(String batchNo, String machineNo, String materialNo, String mouldNo, String varietyNo, String craftItemNo) {
|
||||||
|
long startTimeMillis = System.currentTimeMillis();
|
||||||
|
List<CraftItemEntity> craftItemList = craftItemDao.findAll();
|
||||||
|
if (craftItemList.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "未添加工艺项目,请先添加工艺项目!", locale);
|
||||||
|
}
|
||||||
|
List<QcItemEntity> qcItemList = qcItemDao.findAll();
|
||||||
|
if (qcItemList.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "未添加检验项目,请先添加检验项目!", locale);
|
||||||
|
}
|
||||||
|
String finalBatchNo = LocalStringUtils.formatEmptyValue(batchNo).trim();
|
||||||
|
String finalMachineNo = LocalStringUtils.formatEmptyValue(machineNo).trim();
|
||||||
|
String finalMaterialNo = LocalStringUtils.formatEmptyValue(materialNo).trim();
|
||||||
|
String finalMouldNo = LocalStringUtils.formatEmptyValue(mouldNo).trim();
|
||||||
|
String finalVarietyNo = LocalStringUtils.formatEmptyValue(varietyNo).trim();
|
||||||
|
String finalCraftItemNo = LocalStringUtils.formatEmptyValue(craftItemNo).trim();
|
||||||
|
//检验数据结果集
|
||||||
|
List<QcSourceEntity> sourceList = qcSourceDao.queryQcSource(finalBatchNo, finalMachineNo, finalMaterialNo, finalMouldNo, finalVarietyNo, finalCraftItemNo);
|
||||||
|
//检验规格
|
||||||
|
List<QcSpecEntity> qcSpecList = qcSpecDao.findAll();
|
||||||
|
List<Map<String, Object>> resultList = generateResultList(sourceList, qcSpecList);
|
||||||
|
System.out.println("查询检验数据耗时:" + formatDuring(System.currentTimeMillis() - startTimeMillis));
|
||||||
|
if (resultList.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该检验数据的信息!", locale);
|
||||||
|
}
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, resultList, locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成返回结果
|
||||||
|
*
|
||||||
|
* @param sourceList 检验数据结果集
|
||||||
|
* @param qcSpecList 检验规格结果集
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private List<Map<String, Object>> generateResultList(List<QcSourceEntity> sourceList, List<QcSpecEntity> qcSpecList) {
|
||||||
|
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||||
|
if (sourceList == null || sourceList.isEmpty()) {
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
long startTimeMillis = System.currentTimeMillis();
|
||||||
|
//这个for循环完成后:一维结果集被格式化为二维结果集,每一行的上传时间是本行所有数据的最早时间
|
||||||
|
for (QcSourceEntity sourceEntity : sourceList) {
|
||||||
|
String batchNo = LocalStringUtils.formatEmptyValue(sourceEntity.getBatchNo());
|
||||||
|
String machineNo = LocalStringUtils.formatEmptyValue(sourceEntity.getMachineNo());
|
||||||
|
String materialNo = LocalStringUtils.formatEmptyValue(sourceEntity.getMaterialNo());
|
||||||
|
String mouldNo = LocalStringUtils.formatEmptyValue(sourceEntity.getMouldNo());
|
||||||
|
String varietyNo = LocalStringUtils.formatEmptyValue(sourceEntity.getVarietyNo());
|
||||||
|
String craftItemNo = LocalStringUtils.formatEmptyValue(sourceEntity.getCraftItemNo());
|
||||||
|
String createTime = LocalStringUtils.formatEmptyValue(sourceEntity.getCreateTime());
|
||||||
|
String qcItemNo = LocalStringUtils.formatEmptyValue(sourceEntity.getQcItemNo());
|
||||||
|
String qcValue = LocalStringUtils.formatEmptyValue(sourceEntity.getQcValue());
|
||||||
|
String formatValue = getFormatValue(qcSpecList, varietyNo, craftItemNo, qcItemNo, qcValue);
|
||||||
|
Map<String, Object> emptyRoom = findEmptyRoom(resultList, qcItemNo, batchNo, machineNo, materialNo, mouldNo, varietyNo, craftItemNo);
|
||||||
|
if (emptyRoom == null) {
|
||||||
|
Map<String, Object> newRoom = new HashMap<>();
|
||||||
|
newRoom.put(EXCEL_HEAD_STYLE_ONE_NO.get(0), batchNo);
|
||||||
|
newRoom.put(EXCEL_HEAD_STYLE_ONE_NO.get(1), machineNo);
|
||||||
|
newRoom.put(EXCEL_HEAD_STYLE_ONE_NO.get(2), materialNo);
|
||||||
|
newRoom.put(EXCEL_HEAD_STYLE_ONE_NO.get(3), mouldNo);
|
||||||
|
newRoom.put(EXCEL_HEAD_STYLE_ONE_NO.get(4), varietyNo);
|
||||||
|
newRoom.put(EXCEL_HEAD_STYLE_ONE_NO.get(5), craftItemNo);
|
||||||
|
newRoom.put(EXCEL_HEAD_STYLE_ONE_NO.get(6), createTime);//新行的上传时间使用第一个数据的上传时间
|
||||||
|
newRoom.put(qcItemNo, formatValue);
|
||||||
|
resultList.add(newRoom);
|
||||||
|
} else {
|
||||||
|
emptyRoom.put(qcItemNo, formatValue);
|
||||||
|
long oldTime = Long.parseLong((String) emptyRoom.get(EXCEL_HEAD_STYLE_ONE_NO.get(6)));
|
||||||
|
if (Long.parseLong(createTime) < oldTime) {//已存在行的上传时间用更早的时间替换更晚的时间
|
||||||
|
emptyRoom.put(EXCEL_HEAD_STYLE_ONE_NO.get(6), createTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//这个for循环完成后:二维结果集每一行的上传时间是本分组所有数据的最早时间
|
||||||
|
for (Map<String, Object> result : resultList) {
|
||||||
|
String createTime = (String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(6));
|
||||||
|
List<Long> createTimeTagList = getCreateTimeTagList(resultList, result);
|
||||||
|
int createTimeTagIndex = getCreateTimeTagIndex(createTimeTagList, Long.parseLong(createTime));
|
||||||
|
result.put(EXCEL_HEAD_STYLE_ONE_NO.get(6), String.valueOf(createTimeTagList.get(createTimeTagIndex)));
|
||||||
|
result.put(EXCEL_HEAD_STYLE_ONE_NO.get(7), "第" + (createTimeTagIndex + 1) + "批");
|
||||||
|
}
|
||||||
|
System.out.println("generateResultList耗时:" + formatDuring(System.currentTimeMillis() - startTimeMillis));
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取上传时间节点索引
|
||||||
|
*
|
||||||
|
* @param createTimeTagList 上传时间节点集合
|
||||||
|
* @param createTimeLong 当前行上传时间(其实也是当前行所有数据的最早上传时间)
|
||||||
|
* @return 上传时间节点索引
|
||||||
|
*/
|
||||||
|
private int getCreateTimeTagIndex(List<Long> createTimeTagList, long createTimeLong) {
|
||||||
|
for (int i = 0; i < createTimeTagList.size(); i++) {
|
||||||
|
long dur = createTimeLong - createTimeTagList.get(i);
|
||||||
|
if (dur >= 0 && dur <= Constant.QC_TIME_INTERVAL) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
throw new RuntimeException("获取上传时间节点索引时发生异常");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取上传时间节点集合
|
||||||
|
*
|
||||||
|
* @param resultList 二维结果集
|
||||||
|
* @param currentResult 当前行
|
||||||
|
* @return 当前行所在分组的时间节点集合
|
||||||
|
*/
|
||||||
|
private List<Long> getCreateTimeTagList(List<Map<String, Object>> resultList, Map<String, Object> currentResult) {
|
||||||
|
String currentBatchNo = (String) currentResult.get(EXCEL_HEAD_STYLE_ONE_NO.get(0));
|
||||||
|
String currentMachineNo = (String) currentResult.get(EXCEL_HEAD_STYLE_ONE_NO.get(1));
|
||||||
|
String currentMaterialNo = (String) currentResult.get(EXCEL_HEAD_STYLE_ONE_NO.get(2));
|
||||||
|
String currentMouldNo = (String) currentResult.get(EXCEL_HEAD_STYLE_ONE_NO.get(3));
|
||||||
|
String currentVarietyNo = (String) currentResult.get(EXCEL_HEAD_STYLE_ONE_NO.get(4));
|
||||||
|
String currentCraftItemNo = (String) currentResult.get(EXCEL_HEAD_STYLE_ONE_NO.get(5));
|
||||||
|
List<Long> createTimeList = new ArrayList<>();
|
||||||
|
//这个for循环的作用是在二维结果集中过滤出和当前行数据属于同一分组的所有行上传时间集合
|
||||||
|
for (Map<String, Object> result : resultList) {
|
||||||
|
String batchNo = (String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(0));
|
||||||
|
String machineNo = (String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(1));
|
||||||
|
String materialNo = (String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(2));
|
||||||
|
String mouldNo = (String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(3));
|
||||||
|
String varietyNo = (String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(4));
|
||||||
|
String craftItemNo = (String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(5));
|
||||||
|
String createTime = (String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(6));
|
||||||
|
if (batchNo.equals(currentBatchNo) && machineNo.equals(currentMachineNo) && materialNo.equals(currentMaterialNo) && mouldNo.equals(currentMouldNo) && varietyNo.equals(currentVarietyNo) && craftItemNo.equals(currentCraftItemNo)) {
|
||||||
|
createTimeList.add(Long.parseLong(createTime));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//对上传时间集合进行排序
|
||||||
|
createTimeList.sort(Long::compareTo);
|
||||||
|
//根据上传时间集合和时间间隔生成上传时间节点集合
|
||||||
|
List<Long> createTimeTagList = new ArrayList<>();//时间节点列表
|
||||||
|
for (int i = 0; i < createTimeList.size(); i++) {
|
||||||
|
Long createTime = createTimeList.get(i);
|
||||||
|
if (createTimeTagList.isEmpty()) {
|
||||||
|
createTimeTagList.add(createTime);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Long newCreateTimeTag = createTimeTagList.get(createTimeTagList.size() - 1);//最新的时间节点
|
||||||
|
if (createTime >= newCreateTimeTag + Constant.QC_TIME_INTERVAL) {
|
||||||
|
createTimeTagList.add(createTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return createTimeTagList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取添加了 ##H 或 ##L 后缀的测量值(如果可能的话)
|
||||||
|
*/
|
||||||
|
private String getFormatValue(List<QcSpecEntity> qcSpecList, String varietyNo, String craftItemNo, String qcItemNo, String qcValue) {
|
||||||
|
if (qcSpecList == null || qcSpecList.isEmpty()) {
|
||||||
|
return qcValue;
|
||||||
|
}
|
||||||
|
for (int i = 0; i < qcSpecList.size(); i++) {
|
||||||
|
QcSpecEntity qcSpec = qcSpecList.get(i);
|
||||||
|
if (varietyNo.equals(qcSpec.getVarietyNo()) && craftItemNo.equals(qcSpec.getCraftItemNo()) && qcItemNo.equals(qcSpec.getQcItemNo())) {
|
||||||
|
double valueMax = stringToDouble(qcSpec.getMax());
|
||||||
|
double valueMin = stringToDouble(qcSpec.getMin());
|
||||||
|
double value = stringToDouble(qcValue);
|
||||||
|
if (valueMax > -99_000D && value > -99_000D && value >= valueMax) {
|
||||||
|
return qcValue + "##H";
|
||||||
|
}
|
||||||
|
if (valueMin > -99_000D && value > -99_000D && value <= valueMin) {
|
||||||
|
return qcValue + "##L";
|
||||||
|
}
|
||||||
|
return qcValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return qcValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化字符串为Double
|
||||||
|
*/
|
||||||
|
private Double stringToDouble(String stringValue) {
|
||||||
|
try {
|
||||||
|
return Double.parseDouble(stringValue);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// e.printStackTrace();
|
||||||
|
// return -100_000D;
|
||||||
|
}
|
||||||
|
return -100_000D;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 尝试找到一个qcItemNo有空位置的Map
|
||||||
|
*/
|
||||||
|
private Map<String, Object> findEmptyRoom(List<Map<String, Object>> mapList, String qcItemNo, String batchNo, String machineNo, String materialNo, String mouldNo, String varietyNo, String craftItemNo) {
|
||||||
|
if (mapList == null || mapList.isEmpty() || TextUtils.isEmpty(qcItemNo)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (Map<String, Object> room : mapList) {
|
||||||
|
if (room.get(EXCEL_HEAD_STYLE_ONE_NO.get(0)).equals(batchNo) && room.get(EXCEL_HEAD_STYLE_ONE_NO.get(1)).equals(machineNo) && room.get(EXCEL_HEAD_STYLE_ONE_NO.get(2)).equals(materialNo) && room.get(EXCEL_HEAD_STYLE_ONE_NO.get(3)).equals(mouldNo) && room.get(EXCEL_HEAD_STYLE_ONE_NO.get(4)).equals(varietyNo) && room.get(EXCEL_HEAD_STYLE_ONE_NO.get(5)).equals(craftItemNo)) {
|
||||||
|
if (!room.containsKey(qcItemNo)) {
|
||||||
|
return room;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出Excel表格
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String exportExcel(ExportSourceExcelQo exportSourceExcelQo) throws Exception {
|
||||||
|
String host = LocalStringUtils.formatEmptyValue(exportSourceExcelQo.getHost()).trim();
|
||||||
|
String finalBatchNo = LocalStringUtils.formatEmptyValue(exportSourceExcelQo.getBatchNo()).trim();
|
||||||
|
String finalMachineNo = LocalStringUtils.formatEmptyValue(exportSourceExcelQo.getMachineNo()).trim();
|
||||||
|
String finalMaterialNo = LocalStringUtils.formatEmptyValue(exportSourceExcelQo.getMaterialNo()).trim();
|
||||||
|
String finalMouldNo = LocalStringUtils.formatEmptyValue(exportSourceExcelQo.getMouldNo()).trim();
|
||||||
|
String finalVarietyNo = LocalStringUtils.formatEmptyValue(exportSourceExcelQo.getVarietyNo()).trim();
|
||||||
|
String finalCraftItemNo = LocalStringUtils.formatEmptyValue(exportSourceExcelQo.getCraftItemNo()).trim();
|
||||||
|
List<CraftItemEntity> craftItemList = craftItemDao.findAll();
|
||||||
|
if (craftItemList.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "未添加工艺项目,请先添加工艺项目!", locale);
|
||||||
|
}
|
||||||
|
List<QcItemEntity> qcItemList = qcItemDao.findAll();
|
||||||
|
if (qcItemList.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "未添加检验项目,请先添加检验项目!", locale);
|
||||||
|
}
|
||||||
|
List<QcSourceEntity> sourceList = qcSourceDao.queryQcSource(finalBatchNo, finalMachineNo, finalMaterialNo, finalMouldNo, finalVarietyNo, finalCraftItemNo);
|
||||||
|
List<QcSpecEntity> qcSpecList = qcSpecDao.findAll();
|
||||||
|
List<Map<String, Object>> resultList = generateResultList(sourceList, qcSpecList);
|
||||||
|
String finalHost = host.endsWith("/") ? host : host + "/";
|
||||||
|
List<List<String>> formattedResultList = formatResultList(finalHost, resultList, qcItemList);
|
||||||
|
if (formattedResultList.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该检验数据的信息!", locale);
|
||||||
|
}
|
||||||
|
String excelPath = doExportExcel(formattedResultList);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, finalHost + excelPath, locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化结果集数据
|
||||||
|
*/
|
||||||
|
private List<List<String>> formatResultList(String host, List<Map<String, Object>> resultList, List<QcItemEntity> qcItemList) {
|
||||||
|
List<List<String>> formatResultList = new ArrayList<>();
|
||||||
|
if (resultList == null || resultList.isEmpty()) {
|
||||||
|
return formatResultList;
|
||||||
|
}
|
||||||
|
boolean needProcessBatch = needProcessBatch(resultList);
|
||||||
|
List<String> headList = new ArrayList<>();
|
||||||
|
for (int i = 0; i < EXCEL_HEAD_STYLE_ONE_NAME.size(); i++) {
|
||||||
|
if (i == 7) {
|
||||||
|
if (needProcessBatch) {
|
||||||
|
headList.add(EXCEL_HEAD_STYLE_ONE_NAME.get(i));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
headList.add(EXCEL_HEAD_STYLE_ONE_NAME.get(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (QcItemEntity qcItemEntity : qcItemList) {
|
||||||
|
headList.add(qcItemEntity.getQcItemName());
|
||||||
|
}
|
||||||
|
formatResultList.add(headList);
|
||||||
|
for (Map<String, Object> result : resultList) {
|
||||||
|
List<String> dataList = new ArrayList<>();
|
||||||
|
dataList.add((String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(0)));
|
||||||
|
dataList.add((String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(1)));
|
||||||
|
dataList.add((String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(2)));
|
||||||
|
dataList.add((String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(3)));
|
||||||
|
dataList.add((String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(4)));
|
||||||
|
dataList.add((String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(5)));
|
||||||
|
dataList.add(LocalDateUtils.exportFormatCurrentSecond((String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(6))));
|
||||||
|
if (needProcessBatch) {
|
||||||
|
if (isProcessBatch(result)) {
|
||||||
|
dataList.add((String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(7)));
|
||||||
|
} else {
|
||||||
|
dataList.add("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (QcItemEntity entity : qcItemList) {
|
||||||
|
String value = (String) result.getOrDefault(entity.getQcItemNo(), "");
|
||||||
|
if (Constant.QC_ITEM_TYPE_STRING.equals(entity.getQcItemType())) {
|
||||||
|
dataList.add(value);
|
||||||
|
} else if (Constant.QC_ITEM_TYPE_PICTURE.equals(entity.getQcItemType())) {
|
||||||
|
if (value.startsWith("picture")) {
|
||||||
|
dataList.add(host + value);
|
||||||
|
} else {
|
||||||
|
dataList.add(value);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dataList.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
formatResultList.add(dataList);
|
||||||
|
}
|
||||||
|
return formatResultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 这个表格是否需要过程抽检批次这个表头
|
||||||
|
* 只要存在一条项目工艺编号为U001的数据,就需要这个表头
|
||||||
|
*/
|
||||||
|
private boolean needProcessBatch(List<Map<String, Object>> resultList) {
|
||||||
|
for (Map<String, Object> result : resultList) {
|
||||||
|
if ("U001".equals((String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(5)))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表格中的本行记录是否是成型过程工检数据
|
||||||
|
* 如果项目工艺编号为U001,那就是
|
||||||
|
*/
|
||||||
|
private boolean isProcessBatch(Map<String, Object> result) {
|
||||||
|
if ("U001".equals((String) result.get(EXCEL_HEAD_STYLE_ONE_NO.get(5)))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将格式化后的结果集数据导出为Excel文件
|
||||||
|
*/
|
||||||
|
private String doExportExcel(List<List<String>> dataListList) throws Exception {
|
||||||
|
//创建XSSFWorkbook对象(excel的文档对象)
|
||||||
|
XSSFWorkbook workbook = new XSSFWorkbook();
|
||||||
|
//建立新的sheet对象(excel的表单)
|
||||||
|
XSSFSheet sheet = workbook.createSheet("检验数据表");
|
||||||
|
for (int i = 0; i < dataListList.get(0).size(); i++) {
|
||||||
|
if (i <= 7) {
|
||||||
|
sheet.setColumnWidth(i, 22 * 256);
|
||||||
|
} else {
|
||||||
|
sheet.setColumnWidth(i, 14 * 256);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
XSSFCellStyle headCellStyle = workbook.createCellStyle();
|
||||||
|
headCellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
||||||
|
headCellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
||||||
|
XSSFFont headFont = workbook.createFont();
|
||||||
|
headFont.setColor(HSSFColor.BLACK.index);
|
||||||
|
headCellStyle.setFont(headFont);
|
||||||
|
headCellStyle.setFillForegroundColor(new XSSFColor(new Color(156, 195, 230)));//设置背景色
|
||||||
|
headCellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);//填充模式
|
||||||
|
|
||||||
|
XSSFCellStyle highCellStyle = workbook.createCellStyle();
|
||||||
|
highCellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
||||||
|
highCellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
||||||
|
XSSFFont highFont = workbook.createFont();
|
||||||
|
highFont.setColor(HSSFColor.RED.index);
|
||||||
|
highCellStyle.setFont(highFont);
|
||||||
|
|
||||||
|
XSSFCellStyle lowCellStyle = workbook.createCellStyle();
|
||||||
|
lowCellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
||||||
|
lowCellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
||||||
|
XSSFFont lowFont = workbook.createFont();
|
||||||
|
lowFont.setColor(HSSFColor.BLUE.index);
|
||||||
|
lowCellStyle.setFont(lowFont);
|
||||||
|
|
||||||
|
XSSFCellStyle normalCellStyle = workbook.createCellStyle();
|
||||||
|
normalCellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
||||||
|
normalCellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
||||||
|
XSSFFont normalFont = workbook.createFont();
|
||||||
|
normalFont.setColor(HSSFColor.BLACK.index);
|
||||||
|
normalCellStyle.setFont(normalFont);
|
||||||
|
|
||||||
|
//在sheet里创建第一行,参数为行索引(excel的行),可以是0~65535之间的任何一个
|
||||||
|
XSSFRow titleRow = sheet.createRow(0);
|
||||||
|
//创建单元格(excel的单元格,参数为列索引,可以是0~255之间的任何一个
|
||||||
|
XSSFCell titleCell = titleRow.createCell(0);
|
||||||
|
//设置单元格内容
|
||||||
|
titleCell.setCellValue("检验数据导出表");
|
||||||
|
titleCell.setCellStyle(normalCellStyle);
|
||||||
|
//合并单元格CellRangeAddress构造参数依次表示起始行,截至行,起始列, 截至列
|
||||||
|
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, dataListList.get(0).size() - 1));
|
||||||
|
int startRowNum = 1;
|
||||||
|
for (int i = 0; i < dataListList.size(); i++) {
|
||||||
|
List<String> dataList = dataListList.get(i);
|
||||||
|
if (dataList != null && dataList.size() > 0) {
|
||||||
|
XSSFRow row = sheet.createRow(i + startRowNum);
|
||||||
|
for (int j = 0; j < dataList.size(); j++) {
|
||||||
|
XSSFCell cell = row.createCell(j);
|
||||||
|
String sourceValue = dataList.get(j);
|
||||||
|
if (i == 0) {
|
||||||
|
cell.setCellValue(sourceValue);
|
||||||
|
cell.setCellStyle(headCellStyle);
|
||||||
|
} else if (j <= 5) {
|
||||||
|
cell.setCellValue(sourceValue);
|
||||||
|
cell.setCellStyle(normalCellStyle);
|
||||||
|
} else if (sourceValue.contains("##H")) {
|
||||||
|
cell.setCellValue(LocalDoubleUtils.keepThreeDecimal(sourceValue.split("##")[0]));
|
||||||
|
cell.setCellStyle(highCellStyle);
|
||||||
|
} else if (sourceValue.contains("##L")) {
|
||||||
|
cell.setCellValue(LocalDoubleUtils.keepThreeDecimal(sourceValue.split("##")[0]));
|
||||||
|
cell.setCellStyle(lowCellStyle);
|
||||||
|
} else {
|
||||||
|
XSSFCellDataBean cellDataBean = new XSSFCellDataBean(sourceValue);
|
||||||
|
if (XSSFCellDataBean.VALUE_TYPE_STRING == cellDataBean.getValueType()) {
|
||||||
|
cell.setCellValue(cellDataBean.getStringValue());
|
||||||
|
} else if (XSSFCellDataBean.VALUE_TYPE_DOUBLE == cellDataBean.getValueType()) {
|
||||||
|
cell.setCellValue(LocalDoubleUtils.keepThreeDecimal(cellDataBean.getDoubleValue()));
|
||||||
|
}
|
||||||
|
cell.setCellStyle(normalCellStyle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//输出Excel文件
|
||||||
|
File dirFile = new File("/home/sxy/server/industrial_measurement/excel/");
|
||||||
|
// File dirFile = new File("/Users/liuchengqian/Desktop/DaJiang/");
|
||||||
|
if (!dirFile.exists()) {
|
||||||
|
dirFile.mkdirs();
|
||||||
|
}
|
||||||
|
String excelFileName = System.currentTimeMillis() + ".xlsx";
|
||||||
|
FileOutputStream output = new FileOutputStream(new File(dirFile, excelFileName));
|
||||||
|
workbook.write(output);
|
||||||
|
output.flush();
|
||||||
|
return "excel/" + excelFileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化创建时间历史数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String formatCreateTime() {
|
||||||
|
System.out.println("开始格式化创建时间历史数据");
|
||||||
|
List<QcSourceEntity> sourceEntityList = qcSourceDao.findAll();
|
||||||
|
long startTimeMillis = System.currentTimeMillis();
|
||||||
|
int listSize = sourceEntityList.size();
|
||||||
|
for (int i = 0; i < listSize; i++) {
|
||||||
|
QcSourceEntity sourceEntity = sourceEntityList.get(i);
|
||||||
|
String createTime = sourceEntity.getCreateTime();
|
||||||
|
String formatCurrentSecond = LocalDateUtils.formatCurrentSecond(createTime);
|
||||||
|
qcSourceDao.formatCreateTime(sourceEntity.getId(), formatCurrentSecond);
|
||||||
|
if (i % 10 == 0) {
|
||||||
|
long spendTimeMillis = System.currentTimeMillis() - startTimeMillis;
|
||||||
|
double remainTimeMillis = (listSize - i) * spendTimeMillis * 1D / i;
|
||||||
|
System.out.println("已完成(" + i + "/" + listSize + "),用时" + formatDuring(spendTimeMillis) + ",剩余" + formatDuring((long) remainTimeMillis));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "格式化创建时间历史数据成功", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String formatDuring(long mss) {
|
||||||
|
long days = mss / (1000 * 60 * 60 * 24);
|
||||||
|
long hours = (mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60);
|
||||||
|
long minutes = (mss % (1000 * 60 * 60)) / (1000 * 60);
|
||||||
|
long seconds = (mss % (1000 * 60)) / 1000;
|
||||||
|
if (days <= 0 && hours <= 0 && minutes <= 0) {
|
||||||
|
return seconds + " 秒 ";
|
||||||
|
}
|
||||||
|
if (days <= 0 && hours <= 0) {
|
||||||
|
return minutes + " 分钟 " + seconds + " 秒 ";
|
||||||
|
}
|
||||||
|
if (days <= 0) {
|
||||||
|
return hours + " 小时 " + minutes + " 分钟 " + seconds + " 秒 ";
|
||||||
|
}
|
||||||
|
return days + " 天 " + hours + " 小时 " + minutes + " 分钟 " + seconds + " 秒 ";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
494
src/main/java/com/xkrs/service/impl/QcSpecServiceImpl.java
Normal file
494
src/main/java/com/xkrs/service/impl/QcSpecServiceImpl.java
Normal file
@ -0,0 +1,494 @@
|
|||||||
|
package com.xkrs.service.impl;
|
||||||
|
|
||||||
|
import com.xkrs.dao.CraftItemDao;
|
||||||
|
import com.xkrs.dao.QcItemDao;
|
||||||
|
import com.xkrs.dao.QcSpecDao;
|
||||||
|
import com.xkrs.encapsulation.PromptMessageEnum;
|
||||||
|
import com.xkrs.model.bean.ReadSpecHeadBean;
|
||||||
|
import com.xkrs.model.bean.XSSFCellDataBean;
|
||||||
|
import com.xkrs.model.entity.CraftItemEntity;
|
||||||
|
import com.xkrs.model.entity.QcItemEntity;
|
||||||
|
import com.xkrs.model.entity.QcSpecEntity;
|
||||||
|
import com.xkrs.model.qo.ExportSpecExcelQo;
|
||||||
|
import com.xkrs.model.qo.QcSpecQoDelete;
|
||||||
|
import com.xkrs.model.qo.QcSpecQoInsert;
|
||||||
|
import com.xkrs.model.qo.QcSpecQoUpdate;
|
||||||
|
import com.xkrs.service.QcSpecService;
|
||||||
|
import com.xkrs.util.LocalDateUtils;
|
||||||
|
import com.xkrs.util.LocalDoubleUtils;
|
||||||
|
import com.xkrs.util.LocalStringUtils;
|
||||||
|
import org.apache.http.util.TextUtils;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
|
||||||
|
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||||
|
import org.apache.poi.hssf.util.HSSFColor;
|
||||||
|
import org.apache.poi.ss.usermodel.Cell;
|
||||||
|
import org.apache.poi.ss.usermodel.CellStyle;
|
||||||
|
import org.apache.poi.ss.usermodel.Row;
|
||||||
|
import org.apache.poi.xssf.usermodel.*;
|
||||||
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
|
import org.springframework.data.domain.Sort;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.transaction.Transactional;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import static com.xkrs.encapsulation.OutputEncapsulation.outputEncapsulationObject;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class QcSpecServiceImpl implements QcSpecService {
|
||||||
|
|
||||||
|
private Locale locale = LocaleContextHolder.getLocale();
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CraftItemDao craftItemDao;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QcItemDao qcItemDao;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private QcSpecDao qcSpecDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加检验规格
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String insertQcSpec(QcSpecQoInsert insertQo) {
|
||||||
|
|
||||||
|
String varietyNo = insertQo.getVarietyNo();
|
||||||
|
String craftItemNo = insertQo.getCraftItemNo();
|
||||||
|
String qcItemNo = insertQo.getQcItemNo();
|
||||||
|
String max = insertQo.getMax();
|
||||||
|
String mean = insertQo.getMean();
|
||||||
|
String min = insertQo.getMin();
|
||||||
|
String unit = insertQo.getUnit();
|
||||||
|
String method = insertQo.getMethod();
|
||||||
|
String standard = insertQo.getStandard();
|
||||||
|
String remark = insertQo.getRemark();
|
||||||
|
|
||||||
|
Optional<CraftItemEntity> craftItemByNo = craftItemDao.findByCraftItemNo(craftItemNo);
|
||||||
|
if (craftItemByNo.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该工艺项目,请先添加工艺项目!", locale);
|
||||||
|
}
|
||||||
|
Optional<QcItemEntity> qcItemByNo = qcItemDao.findByQcItemNo(qcItemNo);
|
||||||
|
if (qcItemByNo.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验项目,请先添加检验项目!", locale);
|
||||||
|
}
|
||||||
|
Optional<QcSpecEntity> existsQcSpecOptional = qcSpecDao.findExistsQcSpec(varietyNo, craftItemNo, qcItemNo);
|
||||||
|
if (existsQcSpecOptional.isPresent()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_EXIT, "该检验规格已存在,请勿重复添加!", locale);
|
||||||
|
}
|
||||||
|
QcSpecEntity entity = new QcSpecEntity();
|
||||||
|
entity.setCreateTime(LocalDateUtils.getCurrentSecond());
|
||||||
|
entity.setUpdateTime("");
|
||||||
|
entity.setVarietyNo(LocalStringUtils.formatEmptyValue(varietyNo));
|
||||||
|
entity.setCraftItemNo(LocalStringUtils.formatEmptyValue(craftItemNo));
|
||||||
|
entity.setQcItemNo(LocalStringUtils.formatEmptyValue(qcItemNo));
|
||||||
|
entity.setMax(LocalStringUtils.formatEmptyValue(max));
|
||||||
|
entity.setMean(LocalStringUtils.formatEmptyValue(mean));
|
||||||
|
entity.setMin(LocalStringUtils.formatEmptyValue(min));
|
||||||
|
entity.setUnit(LocalStringUtils.formatEmptyValue(unit));
|
||||||
|
entity.setMethod(LocalStringUtils.formatEmptyValue(method));
|
||||||
|
entity.setStandard(LocalStringUtils.formatEmptyValue(standard));
|
||||||
|
entity.setRemark(LocalStringUtils.formatEmptyValue(remark));
|
||||||
|
qcSpecDao.save(entity);
|
||||||
|
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "添加成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除检验规格
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackOn = Exception.class)
|
||||||
|
@Override
|
||||||
|
public String deleteQcSpec(QcSpecQoDelete deleteQo) {
|
||||||
|
Integer id = deleteQo.getId();
|
||||||
|
Optional<QcSpecEntity> entityById = qcSpecDao.findById(id);
|
||||||
|
if (entityById.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验规格,请先添加检验规格!", locale);
|
||||||
|
}
|
||||||
|
qcSpecDao.deleteById(id);
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "删除成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新检验规格
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String updateQcSpec(QcSpecQoUpdate updateQo) {
|
||||||
|
|
||||||
|
Integer id = updateQo.getId();
|
||||||
|
String max = updateQo.getMax();
|
||||||
|
String mean = updateQo.getMean();
|
||||||
|
String min = updateQo.getMin();
|
||||||
|
String unit = updateQo.getUnit();
|
||||||
|
String method = updateQo.getMethod();
|
||||||
|
String standard = updateQo.getStandard();
|
||||||
|
String remark = updateQo.getRemark();
|
||||||
|
|
||||||
|
Optional<QcSpecEntity> entityById = qcSpecDao.findById(id);
|
||||||
|
if (entityById.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "不存在该检验规格,请先添加检验规格!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
qcSpecDao.updateQcSpecById(id, LocalDateUtils.getCurrentSecond(), LocalStringUtils.formatEmptyValue(max), LocalStringUtils.formatEmptyValue(mean), LocalStringUtils.formatEmptyValue(min), LocalStringUtils.formatEmptyValue(unit), LocalStringUtils.formatEmptyValue(method), LocalStringUtils.formatEmptyValue(standard), LocalStringUtils.formatEmptyValue(remark));
|
||||||
|
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询检验规格
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String queryQcSpec(String varietyNo, String craftItemNo, String qcItemNo) {
|
||||||
|
String finalVarietyNo = LocalStringUtils.formatEmptyValue(varietyNo).trim();
|
||||||
|
String finalQcItemNo = LocalStringUtils.formatEmptyValue(qcItemNo).trim();
|
||||||
|
List<Map<String, Object>> resultList;
|
||||||
|
if (TextUtils.isEmpty(craftItemNo)) {
|
||||||
|
resultList = qcSpecDao.queryQcSpec(finalVarietyNo, finalQcItemNo);
|
||||||
|
} else {
|
||||||
|
resultList = qcSpecDao.queryQcSpec(finalVarietyNo, craftItemNo.trim(), finalQcItemNo);
|
||||||
|
}
|
||||||
|
if (resultList == null || resultList.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时没有该检验规格的信息!", locale);
|
||||||
|
}
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, resultList, locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导入检验规格
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String importSpecExcel(MultipartFile specExcel) {
|
||||||
|
try {
|
||||||
|
//1、读取检验规格数据表文件
|
||||||
|
XSSFWorkbook workbook = new XSSFWorkbook(specExcel.getInputStream());
|
||||||
|
//2、获取工作表对象
|
||||||
|
XSSFSheet sheet = workbook.getSheetAt(0);
|
||||||
|
//3、获取行的迭代器
|
||||||
|
Iterator<Row> iterator = sheet.iterator();
|
||||||
|
long rowNum = 0;
|
||||||
|
long colNum = -1;
|
||||||
|
//4、表格数据容器
|
||||||
|
List<List<String>> sheetDataList = new ArrayList<>();
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
Row row = iterator.next();
|
||||||
|
if (rowNum == 0) {
|
||||||
|
ReadSpecHeadBean readResult = readSpecHead(row);
|
||||||
|
if (readResult.isSuccess()) {
|
||||||
|
colNum = readResult.getHeadCount();
|
||||||
|
rowNum++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, readResult.getErrorMessage(), locale);
|
||||||
|
}
|
||||||
|
List<String> rowDataList = new ArrayList<>();
|
||||||
|
for (int i = 0; i < colNum; i++) {
|
||||||
|
String value = getValue(row.getCell(i));
|
||||||
|
if (i == 0) {//机种号数据直接添加
|
||||||
|
if (TextUtils.isEmpty(value)) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "第" + rowNum + "行机种号为空,请先编辑机种号!", locale);
|
||||||
|
}
|
||||||
|
rowDataList.add(value);
|
||||||
|
} else if (i == 1) {//工艺项目数据要添加对应的编号
|
||||||
|
Optional<CraftItemEntity> craftItemOptional = craftItemDao.findByCraftItemName(value);
|
||||||
|
if (craftItemOptional.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "第" + rowNum + "行工艺项目(" + value + ")不存在,请先添加工艺项目!", locale);
|
||||||
|
}
|
||||||
|
rowDataList.add(craftItemOptional.get().getCraftItemNo());
|
||||||
|
} else if (i == 2) {//检验项目数据要添加对应的编号
|
||||||
|
Optional<QcItemEntity> qcItemOptional = qcItemDao.findByQcItemName(value);
|
||||||
|
if (qcItemOptional.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "第" + rowNum + "行检验项目(" + value + ")不存在,请先添加检验项目!", locale);
|
||||||
|
}
|
||||||
|
rowDataList.add(qcItemOptional.get().getQcItemNo());
|
||||||
|
} else {//其他数据直接添加
|
||||||
|
rowDataList.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sheetDataList.add(rowDataList);
|
||||||
|
rowNum++;
|
||||||
|
}
|
||||||
|
//5、表格数据自重复检查
|
||||||
|
for (int i = 0; i < sheetDataList.size(); i++) {
|
||||||
|
List<String> rowDataList = sheetDataList.get(i);
|
||||||
|
List<Integer> appearIndexList = checkAppearIndex(sheetDataList, rowDataList.get(0), rowDataList.get(1), rowDataList.get(2));
|
||||||
|
if (appearIndexList.size() == 0) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "系统错误!", locale);
|
||||||
|
}
|
||||||
|
if (appearIndexList.size() > 1) {
|
||||||
|
StringBuilder response = new StringBuilder();
|
||||||
|
response.append("检验规格表中:机种号、工艺项目、检验项目三项存在全部相同项,行数:");
|
||||||
|
for (Integer appearIndex : appearIndexList) {
|
||||||
|
response.append("第").append(appearIndex + 2).append("行、");
|
||||||
|
}
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, response.toString(), locale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//6、表格的数据已经全部读取完成,并且自检通过,接下来遍历入库即可
|
||||||
|
int insertCount = 0;
|
||||||
|
int updateCount = 0;
|
||||||
|
for (List<String> rowDataList : sheetDataList) {
|
||||||
|
String varietyNo = rowDataList.get(0);
|
||||||
|
String craftItemNo = rowDataList.get(1);
|
||||||
|
String qcItemNo = rowDataList.get(2);
|
||||||
|
String max = rowDataList.get(3);
|
||||||
|
String min = rowDataList.get(4);
|
||||||
|
String method = rowDataList.get(5);
|
||||||
|
Optional<QcSpecEntity> existsQcSpecOptional = qcSpecDao.findExistsQcSpec(varietyNo, craftItemNo, qcItemNo);
|
||||||
|
if (existsQcSpecOptional.isPresent()) {
|
||||||
|
qcSpecDao.updateQcSpecByVCQ(LocalStringUtils.formatEmptyValue(varietyNo), LocalStringUtils.formatEmptyValue(craftItemNo), LocalStringUtils.formatEmptyValue(qcItemNo), LocalDateUtils.getCurrentSecond(), LocalStringUtils.formatEmptyValue(max), "", LocalStringUtils.formatEmptyValue(min), "", LocalStringUtils.formatEmptyValue(method), "", "");
|
||||||
|
updateCount++;
|
||||||
|
} else {
|
||||||
|
QcSpecEntity entity = new QcSpecEntity();
|
||||||
|
entity.setCreateTime(LocalDateUtils.getCurrentSecond());
|
||||||
|
entity.setUpdateTime("");
|
||||||
|
entity.setVarietyNo(LocalStringUtils.formatEmptyValue(varietyNo));
|
||||||
|
entity.setCraftItemNo(LocalStringUtils.formatEmptyValue(craftItemNo));
|
||||||
|
entity.setQcItemNo(LocalStringUtils.formatEmptyValue(qcItemNo));
|
||||||
|
entity.setMax(LocalStringUtils.formatEmptyValue(max));
|
||||||
|
entity.setMean("");
|
||||||
|
entity.setMin(LocalStringUtils.formatEmptyValue(min));
|
||||||
|
entity.setUnit("");
|
||||||
|
entity.setMethod(LocalStringUtils.formatEmptyValue(method));
|
||||||
|
entity.setStandard("");
|
||||||
|
entity.setRemark("");
|
||||||
|
qcSpecDao.save(entity);
|
||||||
|
insertCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
StringBuilder response = new StringBuilder();
|
||||||
|
response.append("导入成功");
|
||||||
|
if (insertCount > 0) {
|
||||||
|
response.append(",新增").append(insertCount).append("条检验规格");
|
||||||
|
}
|
||||||
|
if (updateCount > 0) {
|
||||||
|
response.append(",更新").append(updateCount).append("条检验规格");
|
||||||
|
}
|
||||||
|
response.append("。");
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, response.toString(), locale);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "请上传正确的Microsoft Excel 2007/2010 Workbook(*.xlsx)文件!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Integer> checkAppearIndex(List<List<String>> sheetDataList, String varietyNo, String craftItemNo, String qcItemNo) {
|
||||||
|
List<Integer> appearIndexList = new ArrayList<>();
|
||||||
|
for (int i = 0; i < sheetDataList.size(); i++) {
|
||||||
|
List<String> rowDataList = sheetDataList.get(i);
|
||||||
|
if (rowDataList.get(0).equals(varietyNo) && rowDataList.get(1).equals(craftItemNo) && rowDataList.get(2).equals(qcItemNo)) {
|
||||||
|
appearIndexList.add(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return appearIndexList;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> QC_SPEC_HEAD = Arrays.asList("机种号", "工艺项目", "检验项目", "最大值", "最小值", "检验方法", "最大值(管理值)", "最小值(管理值)");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取表头数据
|
||||||
|
*/
|
||||||
|
private ReadSpecHeadBean readSpecHead(Row headRow) {
|
||||||
|
ReadSpecHeadBean readResult = new ReadSpecHeadBean();
|
||||||
|
for (int i = 0; i < 6; i++) {
|
||||||
|
if (!QC_SPEC_HEAD.get(i).equals(getValue(headRow.getCell(i)))) {
|
||||||
|
readResult.setSuccess(false);
|
||||||
|
readResult.setHeadCount(0);
|
||||||
|
readResult.setErrorMessage("表头第" + (i + 1) + "列应该是:" + QC_SPEC_HEAD.get(i));
|
||||||
|
return readResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
readResult.setSuccess(true);
|
||||||
|
readResult.setHeadCount(6);
|
||||||
|
readResult.setErrorMessage("");
|
||||||
|
return readResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单元格内的数据,并进行格式转换
|
||||||
|
*/
|
||||||
|
private String getValue(Cell cell) {
|
||||||
|
if (cell == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
if (Cell.CELL_TYPE_STRING == cell.getCellType()) {
|
||||||
|
return cell.getStringCellValue();
|
||||||
|
}
|
||||||
|
if (Cell.CELL_TYPE_BOOLEAN == cell.getCellType()) {
|
||||||
|
return String.valueOf(cell.getBooleanCellValue());
|
||||||
|
}
|
||||||
|
if (Cell.CELL_TYPE_NUMERIC == cell.getCellType()) {//数值和日期均是此类型,需进一步判断
|
||||||
|
if (HSSFDateUtil.isCellDateFormatted(cell)) {
|
||||||
|
//是日期类型
|
||||||
|
return String.valueOf(cell.getDateCellValue().getTime());
|
||||||
|
} else {
|
||||||
|
//是数值类型
|
||||||
|
return String.valueOf(cell.getNumericCellValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出检验规格
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String exportSpecExcel(ExportSpecExcelQo exportSpecExcelQo) throws Exception {
|
||||||
|
|
||||||
|
List<QcSpecEntity> qcSpecList = qcSpecDao.findAll(Sort.by(Sort.Direction.ASC, "createTime"));
|
||||||
|
if (qcSpecList.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "无检验规格数据可导出,请先添加检验规格!", locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<List<String>> dataListList = new ArrayList<>();
|
||||||
|
dataListList.add(QC_SPEC_HEAD);
|
||||||
|
for (QcSpecEntity qcSpecEntity : qcSpecList) {
|
||||||
|
List<String> dataList = new ArrayList<>();
|
||||||
|
dataList.add(qcSpecEntity.getVarietyNo());
|
||||||
|
Optional<CraftItemEntity> craftItemOptional = craftItemDao.findByCraftItemNo(qcSpecEntity.getCraftItemNo());
|
||||||
|
if (craftItemOptional.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "检验规格数据导出失败(code=01)!", locale);
|
||||||
|
}
|
||||||
|
dataList.add(craftItemOptional.get().getCraftItemName());
|
||||||
|
Optional<QcItemEntity> qcItemOptional = qcItemDao.findByQcItemNo(qcSpecEntity.getQcItemNo());
|
||||||
|
if (qcItemOptional.isEmpty()) {
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "检验规格数据导出失败(code=02)!", locale);
|
||||||
|
}
|
||||||
|
dataList.add(qcItemOptional.get().getQcItemName());
|
||||||
|
dataList.add(qcSpecEntity.getMax());
|
||||||
|
dataList.add(qcSpecEntity.getMin());
|
||||||
|
dataList.add(qcSpecEntity.getMethod());
|
||||||
|
dataListList.add(dataList);
|
||||||
|
}
|
||||||
|
|
||||||
|
//创建XSSFWorkbook对象(excel的文档对象)
|
||||||
|
XSSFWorkbook workbook = new XSSFWorkbook();
|
||||||
|
//建立新的sheet对象(excel的表单)
|
||||||
|
XSSFSheet sheet = workbook.createSheet("检验规格表");
|
||||||
|
for (int i = 0; i < dataListList.get(0).size(); i++) {
|
||||||
|
sheet.setColumnWidth(i, 24 * 256);
|
||||||
|
}
|
||||||
|
|
||||||
|
XSSFCellStyle headCellStyle = workbook.createCellStyle();
|
||||||
|
headCellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
||||||
|
headCellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
||||||
|
XSSFFont headFont = workbook.createFont();
|
||||||
|
headFont.setColor(HSSFColor.BLACK.index);
|
||||||
|
headCellStyle.setFont(headFont);
|
||||||
|
headCellStyle.setFillForegroundColor(new XSSFColor(new Color(156, 195, 230)));//设置背景色
|
||||||
|
headCellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);//填充模式
|
||||||
|
|
||||||
|
XSSFCellStyle normalCellStyle = workbook.createCellStyle();
|
||||||
|
normalCellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
||||||
|
normalCellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
||||||
|
XSSFFont normalFont = workbook.createFont();
|
||||||
|
normalFont.setColor(HSSFColor.BLACK.index);
|
||||||
|
normalCellStyle.setFont(normalFont);
|
||||||
|
|
||||||
|
int startRowNum = 0;
|
||||||
|
for (int i = 0; i < dataListList.size(); i++) {
|
||||||
|
List<String> dataList = dataListList.get(i);
|
||||||
|
if (dataList != null && dataList.size() > 0) {
|
||||||
|
XSSFRow row = sheet.createRow(i + startRowNum);
|
||||||
|
for (int j = 0; j < dataList.size(); j++) {
|
||||||
|
XSSFCell cell = row.createCell(j);
|
||||||
|
String sourceValue = dataList.get(j);
|
||||||
|
if (i == 0) {
|
||||||
|
cell.setCellValue(sourceValue);
|
||||||
|
cell.setCellStyle(headCellStyle);
|
||||||
|
} else if (j <= 2) {
|
||||||
|
cell.setCellValue(sourceValue);
|
||||||
|
cell.setCellStyle(normalCellStyle);
|
||||||
|
} else {
|
||||||
|
XSSFCellDataBean cellDataBean = new XSSFCellDataBean(sourceValue);
|
||||||
|
if (XSSFCellDataBean.VALUE_TYPE_STRING == cellDataBean.getValueType()) {
|
||||||
|
cell.setCellValue(cellDataBean.getStringValue());
|
||||||
|
} else if (XSSFCellDataBean.VALUE_TYPE_DOUBLE == cellDataBean.getValueType()) {
|
||||||
|
cell.setCellValue(LocalDoubleUtils.keepThreeDecimal(cellDataBean.getDoubleValue()));
|
||||||
|
}
|
||||||
|
cell.setCellStyle(normalCellStyle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//输出Excel文件
|
||||||
|
File dirFile = new File("/home/sxy/server/industrial_measurement/excel/");
|
||||||
|
// File dirFile = new File("/Users/liuchengqian/Desktop/DaJiang/");
|
||||||
|
if (!dirFile.exists()) {
|
||||||
|
dirFile.mkdirs();
|
||||||
|
}
|
||||||
|
String excelFileName = System.currentTimeMillis() + ".xlsx";
|
||||||
|
FileOutputStream output = new FileOutputStream(new File(dirFile, excelFileName));
|
||||||
|
workbook.write(output);
|
||||||
|
output.flush();
|
||||||
|
|
||||||
|
String host = exportSpecExcelQo.getHost();
|
||||||
|
String finalHost = host.endsWith("/") ? host : host + "/";
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, finalHost + "excel/" + excelFileName, locale);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean formatData(String data) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出空白检验规格
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String exportEmptySpecExcel(ExportSpecExcelQo exportSpecExcelQo) throws Exception {
|
||||||
|
|
||||||
|
List<List<String>> dataListList = new ArrayList<>();
|
||||||
|
dataListList.add(QC_SPEC_HEAD);
|
||||||
|
|
||||||
|
XSSFWorkbook workbook = new XSSFWorkbook();
|
||||||
|
//建立新的sheet对象(excel的表单)
|
||||||
|
XSSFSheet sheet = workbook.createSheet("检验规格表");
|
||||||
|
for (int i = 0; i < dataListList.get(0).size(); i++) {
|
||||||
|
sheet.setColumnWidth(i, 24 * 256);
|
||||||
|
}
|
||||||
|
|
||||||
|
XSSFCellStyle headCellStyle = workbook.createCellStyle();
|
||||||
|
headCellStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);
|
||||||
|
headCellStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);
|
||||||
|
XSSFFont headFont = workbook.createFont();
|
||||||
|
headFont.setColor(HSSFColor.BLACK.index);
|
||||||
|
headCellStyle.setFont(headFont);
|
||||||
|
headCellStyle.setFillForegroundColor(new XSSFColor(new Color(156, 195, 230)));//设置背景色
|
||||||
|
headCellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);//填充模式
|
||||||
|
|
||||||
|
int startRowNum = 0;
|
||||||
|
List<String> dataList = dataListList.get(0);
|
||||||
|
if (dataList != null && dataList.size() > 0) {
|
||||||
|
XSSFRow row = sheet.createRow(startRowNum);
|
||||||
|
for (int j = 0; j < dataList.size(); j++) {
|
||||||
|
XSSFCell cell = row.createCell(j);
|
||||||
|
cell.setCellStyle(headCellStyle);
|
||||||
|
String data = dataList.get(j);
|
||||||
|
cell.setCellValue(data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//输出Excel文件
|
||||||
|
File dirFile = new File("/home/sxy/server/industrial_measurement/excel/");
|
||||||
|
// File dirFile = new File("/Users/liuchengqian/Desktop/DaJiang/");
|
||||||
|
if (!dirFile.exists()) {
|
||||||
|
dirFile.mkdirs();
|
||||||
|
}
|
||||||
|
String excelFileName = System.currentTimeMillis() + ".xlsx";
|
||||||
|
FileOutputStream output = new FileOutputStream(new File(dirFile, excelFileName));
|
||||||
|
workbook.write(output);
|
||||||
|
output.flush();
|
||||||
|
|
||||||
|
String host = exportSpecExcelQo.getHost();
|
||||||
|
String finalHost = host.endsWith("/") ? host : host + "/";
|
||||||
|
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, finalHost + "excel/" + excelFileName, locale);
|
||||||
|
}
|
||||||
|
}
|
20
src/main/java/com/xkrs/util/Constant.java
Normal file
20
src/main/java/com/xkrs/util/Constant.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package com.xkrs.util;
|
||||||
|
|
||||||
|
public interface Constant {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验项目类型:文本
|
||||||
|
*/
|
||||||
|
String QC_ITEM_TYPE_STRING = "0";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验项目类型:图片
|
||||||
|
*/
|
||||||
|
String QC_ITEM_TYPE_PICTURE = "1";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检验数据时间分组间隔
|
||||||
|
*/
|
||||||
|
long QC_TIME_INTERVAL = 3600;
|
||||||
|
|
||||||
|
}
|
181
src/main/java/com/xkrs/util/ExcelUploadUtil.java
Normal file
181
src/main/java/com/xkrs/util/ExcelUploadUtil.java
Normal file
@ -0,0 +1,181 @@
|
|||||||
|
package com.xkrs.util;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author XinYi Song
|
||||||
|
*/
|
||||||
|
public class ExcelUploadUtil {
|
||||||
|
|
||||||
|
public static Logger log = LoggerFactory.getLogger(ExcelUploadUtil.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传单张图片
|
||||||
|
*
|
||||||
|
* @param fileInput
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public static String memoryFile(MultipartFile fileInput, int subDirType) throws IOException {
|
||||||
|
String subDir = subDirType == 1 ? "excel/" : "picture/";
|
||||||
|
//获取原始文件名
|
||||||
|
String originalFilename = fileInput.getOriginalFilename();
|
||||||
|
if (originalFilename != null && !"".equals(originalFilename)) {
|
||||||
|
//找到 . 的位置
|
||||||
|
int index = originalFilename.lastIndexOf(".");
|
||||||
|
//根据 . 的位置进行分割,拿到文件后缀名
|
||||||
|
String suffix = originalFilename.substring(index);
|
||||||
|
//uuid生成新的文件名
|
||||||
|
String newName = UUID.randomUUID().toString() + suffix;
|
||||||
|
// File file = new File("/Users/liuchengqian/Desktop/DaJiang/" + subDir);
|
||||||
|
File file = new File("/home/sxy/server/industrial_measurement/" + subDir);
|
||||||
|
if (!file.exists()) {
|
||||||
|
file.mkdirs();
|
||||||
|
}
|
||||||
|
// String path = "/Users/liuchengqian/Desktop/DaJiang/" + subDir + newName;
|
||||||
|
String path = "/home/sxy/server/industrial_measurement/" + subDir + newName;
|
||||||
|
//实现上传
|
||||||
|
fileInput.transferTo(new File(path));
|
||||||
|
// return path;
|
||||||
|
return subDir + newName;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 以文件形式,批量上传图片
|
||||||
|
* @param files
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
/*public static List<FireTaskPhoto> uploadImage(MultipartFile[] files, String fireCode) throws IOException {
|
||||||
|
//String uploadPath = "http://139.199.98.175:2099/forestTaskImage/";
|
||||||
|
String uploadPath = "http://118.24.27.47:2088/";
|
||||||
|
String newName = "";
|
||||||
|
String oldName = "";
|
||||||
|
List<FireTaskPhoto> fireTaskPhotos = new ArrayList<>();
|
||||||
|
for(MultipartFile file : files){
|
||||||
|
//获取file图片名称
|
||||||
|
oldName = file.getOriginalFilename();
|
||||||
|
//找到 . 的位置
|
||||||
|
int index = oldName.lastIndexOf(".");
|
||||||
|
//根据 . 的位置进行分割,拿到文件后缀名
|
||||||
|
String suffix = oldName.substring(index);
|
||||||
|
//uuid生成新的文件名
|
||||||
|
newName = UUID.randomUUID().toString() + suffix;
|
||||||
|
//将图片保存到本地/usr/etc/images/Folder
|
||||||
|
File file1 = new File("/home/sxy/server/fire_point/firePointImage/");
|
||||||
|
//File file1 = new File("E:/file/work/image/");
|
||||||
|
if (!file1.exists()) {
|
||||||
|
file1.mkdirs();
|
||||||
|
}
|
||||||
|
String path = "/home/sxy/server/fire_point/firePointImage/" + newName;
|
||||||
|
//String path = "E:/file/work/image/" + newName;
|
||||||
|
String uploadPaths = "/firePointImage/" + newName;
|
||||||
|
//实现上传
|
||||||
|
file.transferTo(new File(path));
|
||||||
|
FireTaskPhoto fireTaskPhoto = new FireTaskPhoto();
|
||||||
|
fireTaskPhoto.setPhotoFireCode(fireCode);
|
||||||
|
fireTaskPhoto.setTaskPhoto(uploadPaths);
|
||||||
|
|
||||||
|
fireTaskPhotos.add(fireTaskPhoto);
|
||||||
|
}
|
||||||
|
return fireTaskPhotos;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除本地或服务器储存的图片
|
||||||
|
*/
|
||||||
|
public static String delFile(String path, int subDirType) {
|
||||||
|
String subDir = subDirType == 1 ? "excel/" : "picture/";
|
||||||
|
int lastIndexOf = path.lastIndexOf("/");
|
||||||
|
String fileName = path.substring(lastIndexOf + 1);
|
||||||
|
String filePath = "/Users/liuchengqian/Desktop/DaJiang/" + subDir + fileName;
|
||||||
|
// String filePath = "/home/sxy/server/industrial_measurement/" + subDir + fileName;
|
||||||
|
File file = new File(filePath);
|
||||||
|
if (file.exists()) {
|
||||||
|
if (file.delete()) {
|
||||||
|
return "删除成功!";
|
||||||
|
}
|
||||||
|
return "删除失败!";
|
||||||
|
}
|
||||||
|
return "文件不存在";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过图片路径解析 ,上传保存
|
||||||
|
*
|
||||||
|
* @param listImgSrc
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static List downloadImage(List<String> listImgSrc) {
|
||||||
|
try {
|
||||||
|
List list = new ArrayList();
|
||||||
|
//开始时间
|
||||||
|
Date beginDate = new Date();
|
||||||
|
for (String url : listImgSrc) {
|
||||||
|
//开始时间
|
||||||
|
Date beginDate2 = new Date();
|
||||||
|
String imageName = url.substring(url.lastIndexOf("/") + 1, url.length());
|
||||||
|
URL uri = new URL(url);
|
||||||
|
InputStream in = uri.openStream();
|
||||||
|
//String pathUpload = "E:/img/" + imageName;
|
||||||
|
String pathUpload = "/home/web/wf-fire-service/wfimage/" + imageName;
|
||||||
|
FileOutputStream fo = new FileOutputStream(new File(pathUpload));
|
||||||
|
byte[] buf = new byte[1024];
|
||||||
|
int length = 0;
|
||||||
|
log.info("-------开始下载:" + url);
|
||||||
|
while ((length = in.read(buf, 0, buf.length)) != -1) {
|
||||||
|
fo.write(buf, 0, length);
|
||||||
|
}
|
||||||
|
in.close();
|
||||||
|
fo.close();
|
||||||
|
list.add(imageName);
|
||||||
|
log.info(imageName + "------下载完成");
|
||||||
|
//结束时间
|
||||||
|
Date overDate2 = new Date();
|
||||||
|
double time = overDate2.getTime() - beginDate2.getTime();
|
||||||
|
log.info("-----耗时:" + time / 1000 + "s");
|
||||||
|
}
|
||||||
|
Date overDate = new Date();
|
||||||
|
double time = overDate.getTime() - beginDate.getTime();
|
||||||
|
log.info("======总耗时:" + time / 1000 + "s");
|
||||||
|
return list;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("++++++下载失败");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除本地文件夹图片
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
*/
|
||||||
|
public static void deleteImage(String url) {
|
||||||
|
File file = new File(url);
|
||||||
|
//判断file是否是文件目录 若是返回TRUE
|
||||||
|
if (file.isDirectory()) {
|
||||||
|
//name存储file文件夹中的文件名
|
||||||
|
String[] name = file.list();
|
||||||
|
for (int i = 0; i < name.length; i++) {
|
||||||
|
//此时就可得到文件夹中的文件
|
||||||
|
File f = new File(url, name[i]);
|
||||||
|
//删除文件
|
||||||
|
f.delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
27
src/main/java/com/xkrs/util/ExportExcel.java
Normal file
27
src/main/java/com/xkrs/util/ExportExcel.java
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package com.xkrs.util;
|
||||||
|
|
||||||
|
import net.sf.jxls.transformer.XLSTransformer;
|
||||||
|
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: XinYi Song
|
||||||
|
* @Date: 2022/1/17 8:56
|
||||||
|
*/
|
||||||
|
public class ExportExcel {
|
||||||
|
|
||||||
|
public static String exportToProveExcel(Map<String, String> dataMap, String srcFilePath) throws IOException, InvalidFormatException {
|
||||||
|
String s = System.currentTimeMillis() + ".xlsx";
|
||||||
|
//String path = "E:/shop/"+s;
|
||||||
|
String path = "/home/sxy/server/industrial_measurement/excel/" + s;
|
||||||
|
// 开始转换。利用 transformer 转到Excel
|
||||||
|
XLSTransformer transformer = new XLSTransformer();
|
||||||
|
// 参数:srcFilePath:模板源文件 cMap:需要导出的数据 destFile.getAbsolutePath():下载的目标文件
|
||||||
|
transformer.transformXLS(srcFilePath, dataMap, path);
|
||||||
|
//return "http://192.168.2.139/"+s;
|
||||||
|
return "http://118.24.27.47:2088/excel/" + s;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
35
src/main/java/com/xkrs/util/LocalDateUtils.java
Normal file
35
src/main/java/com/xkrs/util/LocalDateUtils.java
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
package com.xkrs.util;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class LocalDateUtils {
|
||||||
|
|
||||||
|
private LocalDateUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getCurrentSecond() {
|
||||||
|
return String.valueOf(new Date().getTime() / 1000L);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回给前端用的日期格式化
|
||||||
|
*
|
||||||
|
* @param second 秒时间戳
|
||||||
|
*/
|
||||||
|
public static String formatCurrentSecond(String second) {
|
||||||
|
long timeMillis = Long.parseLong(second + "000");
|
||||||
|
return DateUtil.format(new Date(timeMillis), "yyyy-MM-dd HH:mm:ss");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出表格用的日期格式化
|
||||||
|
*
|
||||||
|
* @param second 秒时间戳
|
||||||
|
*/
|
||||||
|
public static String exportFormatCurrentSecond(String second) {
|
||||||
|
long timeMillis = Long.parseLong(second + "000");
|
||||||
|
return DateUtil.format(new Date(timeMillis), "yyyy-MM-dd HH");
|
||||||
|
}
|
||||||
|
}
|
20
src/main/java/com/xkrs/util/LocalDoubleUtils.java
Normal file
20
src/main/java/com/xkrs/util/LocalDoubleUtils.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package com.xkrs.util;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
|
||||||
|
public class LocalDoubleUtils {
|
||||||
|
|
||||||
|
private static final DecimalFormat decimalFormat = new DecimalFormat("0.000");
|
||||||
|
|
||||||
|
private LocalDoubleUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String keepThreeDecimal(String value) {
|
||||||
|
return keepThreeDecimal(Double.parseDouble(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String keepThreeDecimal(double value) {
|
||||||
|
return decimalFormat.format(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
12
src/main/java/com/xkrs/util/LocalStringUtils.java
Normal file
12
src/main/java/com/xkrs/util/LocalStringUtils.java
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package com.xkrs.util;
|
||||||
|
|
||||||
|
public class LocalStringUtils {
|
||||||
|
|
||||||
|
private LocalStringUtils() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String formatEmptyValue(String value) {
|
||||||
|
return value == null ? "" : value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
38
src/main/java/com/xkrs/util/TestFileUtil.java
Normal file
38
src/main/java/com/xkrs/util/TestFileUtil.java
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
package com.xkrs.util;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: XinYi Song
|
||||||
|
* @Date: 2022/1/17 9:29
|
||||||
|
*/
|
||||||
|
public class TestFileUtil {
|
||||||
|
public static InputStream getResourcesFileInputStream(String fileName) {
|
||||||
|
return Thread.currentThread().getContextClassLoader().getResourceAsStream("" + fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getPath() {
|
||||||
|
return TestFileUtil.class.getResource("/").getPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static File createNewFile(String pathName) {
|
||||||
|
File file = new File(getPath() + pathName);
|
||||||
|
if (file.exists()) {
|
||||||
|
file.delete();
|
||||||
|
} else {
|
||||||
|
if (!file.getParentFile().exists()) {
|
||||||
|
file.getParentFile().mkdirs();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static File readFile(String pathName) {
|
||||||
|
return new File(getPath() + pathName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static File readUserHomeFile(String pathName) {
|
||||||
|
return new File(System.getProperty("user.home") + File.separator + pathName);
|
||||||
|
}
|
||||||
|
}
|
54
src/main/resources/application.properties
Normal file
54
src/main/resources/application.properties
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
server.port = 6810
|
||||||
|
|
||||||
|
## 数据源配置
|
||||||
|
#spring.datasource.url = jdbc:postgresql://localhost:5432/data_model
|
||||||
|
#spring.datasource.userName = postgres
|
||||||
|
#spring.datasource.password = 123456
|
||||||
|
#spring.datasource.driverClassName = org.postgresql.Driver
|
||||||
|
|
||||||
|
spring.datasource.url = jdbc:mysql://118.24.27.47:3306/data_model?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
|
||||||
|
spring.datasource.userName = sxy
|
||||||
|
spring.datasource.password = sxy123
|
||||||
|
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
|
||||||
|
|
||||||
|
server.tomcat.uri-encoding=UTF-8
|
||||||
|
|
||||||
|
# jackson 配置
|
||||||
|
spring.jackson.serialization.write-date-keys-as-timestamps=false
|
||||||
|
|
||||||
|
## Hikari连接池设置
|
||||||
|
spring.datasource.hikari.auto-commit = true
|
||||||
|
spring.datasource.hikari.maximum-pool-size = 100
|
||||||
|
spring.datasource.hikari.idle-timeout = 10000
|
||||||
|
spring.datasource.hikari.minimum-idle = 5
|
||||||
|
spring.datasource.hikari.validation-timeout = 3000
|
||||||
|
|
||||||
|
## Spring Data JPA 配置
|
||||||
|
spring.jpa.database = mysql
|
||||||
|
spring.jpa.database-platform = org.hibernate.dialect.MySQL5InnoDBDialect
|
||||||
|
spring.jpa.show-sql = false
|
||||||
|
# 指定 ddl mode (none, validate, create, create-drop, update)
|
||||||
|
spring.jpa.hibernate.ddl-auto = update
|
||||||
|
# 命名策略
|
||||||
|
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
|
||||||
|
#spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQL95Dialect
|
||||||
|
#spring.jpa.properties.hibernate.dialect = org.hibernate.spatial.dialect.postgis.PostgisDialect
|
||||||
|
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
|
||||||
|
|
||||||
|
## Devtools配置
|
||||||
|
spring.devtools.livereload.enabled = true
|
||||||
|
|
||||||
|
## 多国语言配置
|
||||||
|
spring.messages.basename = i18n/messages
|
||||||
|
spring.messages.encoding = UTF-8
|
||||||
|
|
||||||
|
# 上传文件配置
|
||||||
|
spring.servlet.multipart.enabled=true
|
||||||
|
# 最大文件大小
|
||||||
|
spring.servlet.multipart.max-file-size = 100MB
|
||||||
|
# 最大请求大小
|
||||||
|
spring.servlet.multipart.max-request-size = 100MB
|
||||||
|
|
||||||
|
spring.main.allow-bean-definition-overriding = true
|
||||||
|
|
||||||
|
|
162
src/main/resources/i18n/messages.properties
Normal file
162
src/main/resources/i18n/messages.properties
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
sys.message.success = 成功
|
||||||
|
sys.message.null = 暂时还没有数据
|
||||||
|
sys.message.exit = 已存在相关内容,请勿重复操作
|
||||||
|
sys.message.user.not_logged_in = 用户未登录
|
||||||
|
sys.message.user.login_error = 用户登陆失败
|
||||||
|
sys.message.user.account_forbidden = 用户已被禁止
|
||||||
|
sys.message.user.account_not_activated = 用户未激活
|
||||||
|
sys.message.user.overtime = 用户登录超时
|
||||||
|
sys.message.user.no_permission = 用户权限不足
|
||||||
|
sys.message.user.already_logged = 用户已经登录
|
||||||
|
sys.message.param.null = 参数为空
|
||||||
|
sys.message.param.illegal = 参数非法
|
||||||
|
sys.message.data.none = 数据为空
|
||||||
|
sys.message.data.wrong = 数据错误
|
||||||
|
sys.message.process.fail = 处理失败
|
||||||
|
sys.message.process.overtime = 处理超时
|
||||||
|
sys.message.system.inner_error = 系统内部错误
|
||||||
|
sys.message.system.abnormal = 系统异常
|
||||||
|
sys.message.system.busy = 系统正忙,请稍后
|
||||||
|
sys.message.system.maintain = 系统维护中
|
||||||
|
sys.message.database.error = 数据库错误
|
||||||
|
sys.message.file.exists = 文件已存在
|
||||||
|
sys.message.file.write.error = 文件写入失败
|
||||||
|
sys.message.file.read.error = 文件读取失败
|
||||||
|
|
||||||
|
SysUser.id.blank = 用户id不能为空
|
||||||
|
SysUser.userName.blank = 用户名不能为空
|
||||||
|
SysUser.userName.length.illegal = 用户名长度不合法
|
||||||
|
SysUser.userName.format.illegal = 用户名格式不合法
|
||||||
|
SysUser.nickName.length.illegal = 用户昵称长度不合法
|
||||||
|
SysUser.userCode.length.illegal = 用户编码长度不合法
|
||||||
|
SysUser.userCode.format.illegal = 用户编码含有非法字符
|
||||||
|
SysUser.password.blank = 用户密码不能为空
|
||||||
|
SysUser.password.length.illegal = 用户密码长度不合法
|
||||||
|
SysUser.password.format.illegal = 用户密码格式不合法
|
||||||
|
SysUser.sex.num.null = 用户性别数字不能为空
|
||||||
|
SysUser.sex.num.illegal = 用户性别数字不合法
|
||||||
|
SysUser.telephone.format.illegal = 用户手机号码不合法
|
||||||
|
SysUser.email.length.illegal = 用户邮箱长度不合法
|
||||||
|
SysUser.email.format.illegal = 用户邮箱格式不合法
|
||||||
|
SysUser.admCode.illegal = 用户行政区划代码不合法
|
||||||
|
SysUser.address.length.illegal = 用户详细地址长度不合法
|
||||||
|
SysUser.birthday.format.illegal = 用户出生日期必须是 yyyy-MM-dd
|
||||||
|
SysUser.personalSignature.length.illegal = 用户个性签名长度非法
|
||||||
|
SysUser.portraitId.illegal = 用户头像id非法
|
||||||
|
SysUser.statusCode.null = 用户当前状态编码为空
|
||||||
|
SysUser.statusCode.illegal = 用户当前状态编码非法
|
||||||
|
SysUser.deleteFlag.null = 用户删除标记不能是空
|
||||||
|
|
||||||
|
TrajectoryRecord.id.null = id 不能为空
|
||||||
|
TrajectoryRecord.startTimeTs.null = startTimeTs 不能为空
|
||||||
|
|
||||||
|
SatelliteFirePoint.id.null = id 不能为空
|
||||||
|
SatelliteFirePoint.fireCode.null = fireCode 不能为空
|
||||||
|
SatelliteFirePoint.fireCode.length.illegal = fireCode 长度过长
|
||||||
|
SatelliteFirePoint.countyCode.null = countyCode 不能为空
|
||||||
|
SatelliteFirePoint.countyCode.length.illegal = countyCode 长度过长
|
||||||
|
SatelliteFirePoint.countyName.null = countyName 不能为空
|
||||||
|
SatelliteFirePoint.countyName.length.illegal = countyName 长度过长
|
||||||
|
SatelliteFirePoint.satelliteType.null = satelliteType 不能为空
|
||||||
|
SatelliteFirePoint.fireStatus.null = fireStatus 不能为空
|
||||||
|
SatelliteFirePoint.verifyStatus.null = verifyStatus 不能为空
|
||||||
|
SatelliteFirePoint.satelliteTimeTs.null = satelliteTimeTs 不能为空
|
||||||
|
|
||||||
|
PictureFirePoint.id.null = id 不能为空
|
||||||
|
PictureFirePoint.fireCode.null = fireCode 不能为空
|
||||||
|
PictureFirePoint.fireCode.length.illegal = fireCode 长度过长
|
||||||
|
PictureFirePoint.pictureName.length.illegal = pictureName 长度过长
|
||||||
|
PictureFirePoint.picturePath.null = picturePath 不能为空
|
||||||
|
PictureFirePoint.picturePath.length.illegal = picturePath 长度过长
|
||||||
|
PictureFirePoint.memo.length.illegal = memo 长度过长
|
||||||
|
PictureFirePoint.size.length.illegal = size 长度过长
|
||||||
|
PictureFirePoint.md5.null = md5 不能为空
|
||||||
|
PictureFirePoint.md5.length.illegal = md5 长度过长
|
||||||
|
PictureFirePoint.shootTimeTs.null = shootTimeTs 不能为空
|
||||||
|
|
||||||
|
PersonInvestigator.id.null = id 不能为空
|
||||||
|
PersonInvestigator.name.null = name 不能为空
|
||||||
|
PersonInvestigator.name.length.illegal = name 长度过长
|
||||||
|
PersonInvestigator.code.length.illegal = code 长度过长
|
||||||
|
PersonInvestigator.telephone.null = telephone 不能为空
|
||||||
|
PersonInvestigator.telephone.format.illegal = telephone 格式非法
|
||||||
|
PersonInvestigator.sex.null = sex 不能为空
|
||||||
|
PersonInvestigator.sex.format.illegal = sex 格式非法
|
||||||
|
PersonInvestigator.idCard.length.illegal = idCard 长度过长
|
||||||
|
PersonInvestigator.memo.length.illegal = memo 长度过长
|
||||||
|
PersonInvestigator.linkUserName.null = linkUserName 不能为空
|
||||||
|
PersonInvestigator.linkUserName.format.illegal = linkUserName 格式非法
|
||||||
|
PersonInvestigator.password.null = password 不能为空
|
||||||
|
PersonInvestigator.password.format.illegal = password 格式非法
|
||||||
|
InvestigateFirePoint.verifyTimeTs.null = verifyTimeTs 不能为空
|
||||||
|
|
||||||
|
InvestigateFirePoint.id.null = id 不能为空
|
||||||
|
InvestigateFirePoint.fireCode.null = fireCode 不能为空
|
||||||
|
InvestigateFirePoint.fireCode.length.illegal = fireCode 长度过长
|
||||||
|
InvestigateFirePoint.countyCode.null = countyCode 不能为空
|
||||||
|
InvestigateFirePoint.countyCode.length.illegal = countyCode 长度过长
|
||||||
|
InvestigateFirePoint.countyName.null = countyName 不能为空
|
||||||
|
InvestigateFirePoint.countyName.length.illegal = countyName 长度过长
|
||||||
|
InvestigateFirePoint.address.null = address 不能为空
|
||||||
|
InvestigateFirePoint.fireArea.null = fireArea 不能为空
|
||||||
|
InvestigateFirePoint.verifyType.null = verifyType 不能为空
|
||||||
|
InvestigateFirePoint.satelliteType.null = satelliteType 不能为空
|
||||||
|
InvestigateFirePoint.satelliteType.length.illegal = satelliteType 长度过长
|
||||||
|
|
||||||
|
FileDocument.id.null = id 不能为空
|
||||||
|
FileDocument.name.null = name 不能为空
|
||||||
|
FileDocument.name.length.illegal = name 长度过长
|
||||||
|
FileDocument.category.length.illegal = category 长度过长
|
||||||
|
FileDocument.filePath.null = filePath 不能为空
|
||||||
|
FileDocument.filePath.length.illegal = filePath 长度过长
|
||||||
|
FileDocument.size.length.illegal = size 长度过长
|
||||||
|
FileDocument.md5.null = md5 不能为空
|
||||||
|
FileDocument.md5.length.illegal = md5 长度过长
|
||||||
|
FileDocument.memo.length.illegal = memo 长度过长
|
||||||
|
FileDocument.checkingToken.length.illegal = checkingToken 长度过长
|
||||||
|
|
||||||
|
AppFile.id.null = id 不能为空
|
||||||
|
AppFile.name.null = name 不能为空
|
||||||
|
AppFile.name.length.illegal = name 长度过长
|
||||||
|
AppFile.appPath.null = appPath 不能为空
|
||||||
|
AppFile.appPath.length.illegal = appPath 长度过长
|
||||||
|
AppFile.versionNumber.null = versionNumber 不能为空
|
||||||
|
AppFile.versionNumber.length.illegal = versionNumber 长度过长
|
||||||
|
AppFile.versionNumber.format.illegal = versionNumber 格式不合法
|
||||||
|
AppFile.size.null = size 不能为空
|
||||||
|
AppFile.size.length.illegal = size 长度过长
|
||||||
|
AppFile.md5.null = md5 不能为空
|
||||||
|
AppFile.md5.length.illegal = md5 长度过长
|
||||||
|
AppFile.memo.length.illegal = memo 长度过长
|
||||||
|
|
||||||
|
RealFirePoint.id.null = id 不能为空
|
||||||
|
RealFirePoint.fireCode.null = fireCode 不能为空
|
||||||
|
RealFirePoint.fireCode.length.illegal = fireCode 不合法
|
||||||
|
RealFirePoint.countyCode.null = countyCode 不能为空
|
||||||
|
RealFirePoint.countyCode.length.illegal = countyCode 不合法
|
||||||
|
RealFirePoint.countyName.null = countyName 不能为空
|
||||||
|
RealFirePoint.countyName.length.illegal = countyName 不合法
|
||||||
|
RealFirePoint.address.null = address 不能为空
|
||||||
|
RealFirePoint.address.length.illegal = address 不合法
|
||||||
|
RealFirePoint.fireArea.null = fireArea 不能为空
|
||||||
|
RealFirePoint.verifyTimeTs.null = verifyTimeTs 不能为空
|
||||||
|
RealFirePoint.verifyType.null = verifyType 不能为空
|
||||||
|
|
||||||
|
InvestigationTeam.id.null = id 不能为空
|
||||||
|
InvestigationTeam.teamName.null = teamName 不能为空
|
||||||
|
InvestigationTeam.teamName.length.illegal = teamName 长度过长
|
||||||
|
InvestigationTeam.memo.length.illegal = memo 长度过长
|
||||||
|
InvestigationTeam.userName.null = userName 不能为空
|
||||||
|
InvestigationTeam.userName.length.illegal = userName 长度过长
|
||||||
|
InvestigationTeam.userRealName.null = userRealName 不能为空
|
||||||
|
InvestigationTeam.userRealName.length.illegal = userRealName 长度过长
|
||||||
|
|
||||||
|
RelTeamInvestigator.id.null = id 不能为空
|
||||||
|
RelTeamInvestigator.teamCode.null = teamCode 不能为空
|
||||||
|
RelTeamInvestigator.teamCode.length.illegal = teamCode 长度过长
|
||||||
|
RelTeamInvestigator.userName.null = userName 不能为空
|
||||||
|
RelTeamInvestigator.userName.length.illegal = userName 长度过长
|
||||||
|
RelTeamInvestigator.teamDeputy.null = teamDeputy 不能为空
|
||||||
|
RelTeamInvestigator.memo.length.illegal = memo 长度过长
|
||||||
|
RelTeamInvestigator.userRealName.null = userRealName 不能为空
|
||||||
|
RelTeamInvestigator.userRealName.length.illegal = userRealName 长度过长
|
162
src/main/resources/i18n/messages_en_US.properties
Normal file
162
src/main/resources/i18n/messages_en_US.properties
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
sys.message.success = success
|
||||||
|
sys.message.null = null
|
||||||
|
sys.message.exit = data already exists
|
||||||
|
sys.message.user.not_logged_in = user not logged in
|
||||||
|
sys.message.user.login_error = user login failed
|
||||||
|
sys.message.user.account_forbidden = this account is forbidden
|
||||||
|
sys.message.user.account_not_activated = this account not activated
|
||||||
|
sys.message.user.overtime = user login timeout
|
||||||
|
sys.message.user.no_permission = user permission denied
|
||||||
|
sys.message.user.already_logged = user already logged
|
||||||
|
sys.message.param.null = parameter is null
|
||||||
|
sys.message.param.illegal = parameter is illegal
|
||||||
|
sys.message.data.none = data is none
|
||||||
|
sys.message.data.wrong = data is wrong
|
||||||
|
sys.message.process.fail = process fail
|
||||||
|
sys.message.process.overtime = process overtime
|
||||||
|
sys.message.system.inner_error = system inner error
|
||||||
|
sys.message.system.abnormal = system abnormal
|
||||||
|
sys.message.system.busy = system is busy
|
||||||
|
sys.message.system.maintain = system maintenance
|
||||||
|
sys.message.database.error = database error
|
||||||
|
sys.message.file.exists = file exists
|
||||||
|
sys.message.file.write.error = file write error
|
||||||
|
sys.message.file.read.error = file read error
|
||||||
|
|
||||||
|
SysUser.id.blank = user id can't be blank
|
||||||
|
SysUser.userName.blank = user name can't be blank
|
||||||
|
SysUser.userName.length.illegal = user name length illegal
|
||||||
|
SysUser.userName.format.illegal = user name format illegal
|
||||||
|
SysUser.nickName.length.illegal = user nickname length illegal
|
||||||
|
SysUser.userCode.length.illegal = user code length illegal
|
||||||
|
SysUser.userCode.format.illegal = user code cantains illegal character
|
||||||
|
SysUser.password.blank = user password can't be blank
|
||||||
|
SysUser.password.length.illegal = user password length illegal
|
||||||
|
SysUser.password.format.illegal = user password format illegal
|
||||||
|
SysUser.sex.num.null = user sex num can't be blank
|
||||||
|
SysUser.sex.num.illegal = user sex num illegal
|
||||||
|
SysUser.telephone.format.illegal = user telephone format illegal
|
||||||
|
SysUser.email.length.illegal = user email length illegal
|
||||||
|
SysUser.email.format.illegal = user email format illegal
|
||||||
|
SysUser.admCode.illegal = user administrative area code illegal
|
||||||
|
SysUser.address.length.illegal = user address length illegal
|
||||||
|
SysUser.birthday.format.illegal = user birthday must be yyyy-MM-dd
|
||||||
|
SysUser.personalSignature.length.illegal = user personal signature length illegal
|
||||||
|
SysUser.portraitId.illegal = user portrait id illegal
|
||||||
|
SysUser.statusCode.null = user current status code can't be blank
|
||||||
|
SysUser.statusCode.illegal = user current status code illegal
|
||||||
|
SysUser.deleteFlag.null = user delete flag can't be null
|
||||||
|
|
||||||
|
TrajectoryRecord.id.null = id can't be null
|
||||||
|
TrajectoryRecord.startTimeTs.null = startTimeTs can't be null
|
||||||
|
|
||||||
|
SatelliteFirePoint.id.null = id can't be blank
|
||||||
|
SatelliteFirePoint.fireCode.null = fireCode can't be blank
|
||||||
|
SatelliteFirePoint.fireCode.length.illegal = fireCode length illegal
|
||||||
|
SatelliteFirePoint.countyCode.null = countyCode can't be blank
|
||||||
|
SatelliteFirePoint.countyCode.length.illegal = countyCode length illegal
|
||||||
|
SatelliteFirePoint.countyName.null = countyName can't be blank
|
||||||
|
SatelliteFirePoint.countyName.length.illegal = countyName length illegal
|
||||||
|
SatelliteFirePoint.satelliteType.null = satelliteType can't be blank
|
||||||
|
SatelliteFirePoint.fireStatus.null = fireStatus can't be blank
|
||||||
|
SatelliteFirePoint.verifyStatus.null = verifyStatus can't be blank
|
||||||
|
SatelliteFirePoint.satelliteTimeTs.null = satelliteTimeTs can't be blank
|
||||||
|
|
||||||
|
PictureFirePoint.id.null = id can't be blank
|
||||||
|
PictureFirePoint.fireCode.null = fireCode can't be blank
|
||||||
|
PictureFirePoint.fireCode.length.illegal = fireCode length illegal
|
||||||
|
PictureFirePoint.pictureName.length.illegal = pictureName length illegal
|
||||||
|
PictureFirePoint.picturePath.null = picturePath can't be blank
|
||||||
|
PictureFirePoint.picturePath.length.illegal = picturePath length illegal
|
||||||
|
PictureFirePoint.memo.length.illegal = memo length illegal
|
||||||
|
PictureFirePoint.size.length.illegal = size length illegal
|
||||||
|
PictureFirePoint.md5.null = md5 can't be blank
|
||||||
|
PictureFirePoint.md5.length.illegal = md5 length illegal
|
||||||
|
PictureFirePoint.shootTimeTs.null = shootTimeTs can't be blank
|
||||||
|
|
||||||
|
PersonInvestigator.id.null = id can't be blank
|
||||||
|
PersonInvestigator.name.null = name can't be blank
|
||||||
|
PersonInvestigator.name.length.illegal = name length illegal
|
||||||
|
PersonInvestigator.code.length.illegal = code length illegal
|
||||||
|
PersonInvestigator.telephone.null = telephone can't be blank
|
||||||
|
PersonInvestigator.telephone.format.illegal = telephone format illegal
|
||||||
|
PersonInvestigator.sex.null = sex format can't be blank
|
||||||
|
PersonInvestigator.sex.format.illegal = sex format illegal
|
||||||
|
PersonInvestigator.idCard.length.illegal = idCard length illegal
|
||||||
|
PersonInvestigator.memo.length.illegal = memo length illegal
|
||||||
|
PersonInvestigator.linkUserName.null = linkUserName can't be blank
|
||||||
|
PersonInvestigator.linkUserName.format.illegal = linkUserName format illegal
|
||||||
|
PersonInvestigator.password.null = password can't be blank
|
||||||
|
PersonInvestigator.password.format.illegal = password format
|
||||||
|
InvestigateFirePoint.verifyTimeTs.null = verifyTimeTs can't be blank
|
||||||
|
|
||||||
|
InvestigateFirePoint.id.null = id can't be blank
|
||||||
|
InvestigateFirePoint.fireCode.null = fireCode can't be blank
|
||||||
|
InvestigateFirePoint.fireCode.length.illegal = fireCode length illegal
|
||||||
|
InvestigateFirePoint.countyCode.null = countyCode can't be blank
|
||||||
|
InvestigateFirePoint.countyCode.length.illegal = countyCode length illegal
|
||||||
|
InvestigateFirePoint.countyName.null = countyName can't be blank
|
||||||
|
InvestigateFirePoint.countyName.length.illegal = countyName length illegal
|
||||||
|
InvestigateFirePoint.address.null = address can't be blank
|
||||||
|
InvestigateFirePoint.fireArea.null = fireArea can't be blank
|
||||||
|
InvestigateFirePoint.verifyType.null = verifyType can't be blank
|
||||||
|
InvestigateFirePoint.satelliteType.null = satelliteType can't be blank
|
||||||
|
InvestigateFirePoint.satelliteType.length.illegal = satelliteType length illegal
|
||||||
|
|
||||||
|
FileDocument.id.null = id can't be blank
|
||||||
|
FileDocument.name.null = name can't be blank
|
||||||
|
FileDocument.name.length.illegal = name length illegal
|
||||||
|
FileDocument.category.length.illegal = category length illegal
|
||||||
|
FileDocument.filePath.null = filePath can't be blank
|
||||||
|
FileDocument.filePath.length.illegal = filePath length illegal
|
||||||
|
FileDocument.size.length.illegal = size length illegal
|
||||||
|
FileDocument.md5.null = md5 can't be blank
|
||||||
|
FileDocument.md5.length.illegal = md5 length illegal
|
||||||
|
FileDocument.memo.length.illegal = memo length illegal
|
||||||
|
FileDocument.checkingToken.length.illegal = checkingToken length illegal
|
||||||
|
|
||||||
|
AppFile.id.null = id can't be blank
|
||||||
|
AppFile.name.null = name can't be blank
|
||||||
|
AppFile.name.length.illegal = name length illegal
|
||||||
|
AppFile.appPath.null = appPath can't be blank
|
||||||
|
AppFile.appPath.length.illegal = appPath length illegal
|
||||||
|
AppFile.versionNumber.null = versionNumber can't be blank
|
||||||
|
AppFile.versionNumber.length.illegal = versionNumber length illegal
|
||||||
|
AppFile.versionNumber.format.illegal = versionNumber illegal
|
||||||
|
AppFile.size.null = size can't be blank
|
||||||
|
AppFile.size.length.illegal = size length illegal
|
||||||
|
AppFile.md5.null = md5 can't be blank
|
||||||
|
AppFile.md5.length.illegal = md5 length illegal
|
||||||
|
AppFile.memo.length.illegal = memo length illegal
|
||||||
|
|
||||||
|
RealFirePoint.id.null = id can't be blank
|
||||||
|
RealFirePoint.fireCode.null = fireCode can't be blank
|
||||||
|
RealFirePoint.fireCode.length.illegal = fireCode illegal
|
||||||
|
RealFirePoint.countyCode.null = countyCode can't be blank
|
||||||
|
RealFirePoint.countyCode.length.illegal = countyCode
|
||||||
|
RealFirePoint.countyName.null = countyName can't be blank
|
||||||
|
RealFirePoint.countyName.length.illegal = countyName illegal
|
||||||
|
RealFirePoint.address.null = address can't be blank
|
||||||
|
RealFirePoint.address.length.illegal = address illegal
|
||||||
|
RealFirePoint.fireArea.null = fireArea can't be blank
|
||||||
|
RealFirePoint.verifyTimeTs.null = verifyTimeTs can't be blank
|
||||||
|
RealFirePoint.verifyType.null = verifyType can't be blank
|
||||||
|
|
||||||
|
InvestigationTeam.id.null = id can't be blank
|
||||||
|
InvestigationTeam.teamName.null = teamName can't be blank
|
||||||
|
InvestigationTeam.teamName.length.illegal = teamName length illegal
|
||||||
|
InvestigationTeam.memo.length.illegal = memo length illegal
|
||||||
|
InvestigationTeam.userName.null = userName can't be blank
|
||||||
|
InvestigationTeam.userName.length.illegal = userName length illegal
|
||||||
|
InvestigationTeam.userRealName.null = userRealName can't be blank
|
||||||
|
InvestigationTeam.userRealName.length.illegal = userRealName length illegal
|
||||||
|
|
||||||
|
RelTeamInvestigator.id.null = id can't be blank
|
||||||
|
RelTeamInvestigator.teamCode.null = teamCode can't be blank
|
||||||
|
RelTeamInvestigator.teamCode.length.illegal = teamCode length illegal
|
||||||
|
RelTeamInvestigator.userName.null = userName can't be blank
|
||||||
|
RelTeamInvestigator.userName.length.illegal = userName length illegal
|
||||||
|
RelTeamInvestigator.teamDeputy.null = teamDeputy can't be blank
|
||||||
|
RelTeamInvestigator.memo.length.illegal = memo length illegal
|
||||||
|
RelTeamInvestigator.userRealName.null = userRealName can't be blank
|
||||||
|
RelTeamInvestigator.userRealName.length.illegal = userRealName length illegal
|
162
src/main/resources/i18n/messages_zh_CN.properties
Normal file
162
src/main/resources/i18n/messages_zh_CN.properties
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
sys.message.success = 成功
|
||||||
|
sys.message.null = 暂时还没有数据
|
||||||
|
sys.message.exit = 已存在相关内容,请勿重复操作
|
||||||
|
sys.message.user.not_logged_in = 用户未登录
|
||||||
|
sys.message.user.login_error = 用户登陆失败
|
||||||
|
sys.message.user.account_forbidden = 用户已被禁止
|
||||||
|
sys.message.user.account_not_activated = 用户未激活
|
||||||
|
sys.message.user.overtime = 用户登录超时
|
||||||
|
sys.message.user.no_permission = 用户权限不足
|
||||||
|
sys.message.user.already_logged = 用户已经登录
|
||||||
|
sys.message.param.null = 参数为空
|
||||||
|
sys.message.param.illegal = 参数非法
|
||||||
|
sys.message.data.none = 数据为空
|
||||||
|
sys.message.data.wrong = 数据错误
|
||||||
|
sys.message.process.fail = 处理失败
|
||||||
|
sys.message.process.overtime = 处理超时
|
||||||
|
sys.message.system.inner_error = 系统内部错误
|
||||||
|
sys.message.system.abnormal = 系统异常
|
||||||
|
sys.message.system.busy = 系统正忙,请稍后
|
||||||
|
sys.message.system.maintain = 系统维护中
|
||||||
|
sys.message.database.error = 数据库错误
|
||||||
|
sys.message.file.exists = 文件已存在
|
||||||
|
sys.message.file.write.error = 文件写入失败
|
||||||
|
sys.message.file.read.error = 文件读取失败
|
||||||
|
|
||||||
|
SysUser.id.blank = 用户id不能为空
|
||||||
|
SysUser.userName.blank = 用户名不能为空
|
||||||
|
SysUser.userName.length.illegal = 用户名长度不合法
|
||||||
|
SysUser.userName.format.illegal = 用户名格式不合法
|
||||||
|
SysUser.nickName.length.illegal = 用户昵称长度不合法
|
||||||
|
SysUser.userCode.length.illegal = 用户编码长度不合法
|
||||||
|
SysUser.userCode.format.illegal = 用户编码含有非法字符
|
||||||
|
SysUser.password.blank = 用户密码不能为空
|
||||||
|
SysUser.password.length.illegal = 用户密码长度不合法
|
||||||
|
SysUser.password.format.illegal = 用户密码格式不合法
|
||||||
|
SysUser.sex.num.null = 用户性别数字不能为空
|
||||||
|
SysUser.sex.num.illegal = 用户性别数字不合法
|
||||||
|
SysUser.telephone.format.illegal = 用户手机号码不合法
|
||||||
|
SysUser.email.length.illegal = 用户邮箱长度不合法
|
||||||
|
SysUser.email.format.illegal = 用户邮箱格式不合法
|
||||||
|
SysUser.admCode.illegal = 用户行政区划代码不合法
|
||||||
|
SysUser.address.length.illegal = 用户详细地址长度不合法
|
||||||
|
SysUser.birthday.format.illegal = 用户出生日期必须是 yyyy-MM-dd
|
||||||
|
SysUser.personalSignature.length.illegal = 用户个性签名长度非法
|
||||||
|
SysUser.portraitId.illegal = 用户头像id非法
|
||||||
|
SysUser.statusCode.null = 用户当前状态编码为空
|
||||||
|
SysUser.statusCode.illegal = 用户当前状态编码非法
|
||||||
|
SysUser.deleteFlag.null = 用户删除标记不能是空
|
||||||
|
|
||||||
|
TrajectoryRecord.id.null = id 不能为空
|
||||||
|
TrajectoryRecord.startTimeTs.null = startTimeTs 不能为空
|
||||||
|
|
||||||
|
SatelliteFirePoint.id.null = id 不能为空
|
||||||
|
SatelliteFirePoint.fireCode.null = fireCode 不能为空
|
||||||
|
SatelliteFirePoint.fireCode.length.illegal = fireCode 长度过长
|
||||||
|
SatelliteFirePoint.countyCode.null = countyCode 不能为空
|
||||||
|
SatelliteFirePoint.countyCode.length.illegal = countyCode 长度过长
|
||||||
|
SatelliteFirePoint.countyName.null = countyName 不能为空
|
||||||
|
SatelliteFirePoint.countyName.length.illegal = countyName 长度过长
|
||||||
|
SatelliteFirePoint.satelliteType.null = satelliteType 不能为空
|
||||||
|
SatelliteFirePoint.fireStatus.null = fireStatus 不能为空
|
||||||
|
SatelliteFirePoint.verifyStatus.null = verifyStatus 不能为空
|
||||||
|
SatelliteFirePoint.satelliteTimeTs.null = satelliteTimeTs 不能为空
|
||||||
|
|
||||||
|
PictureFirePoint.id.null = id 不能为空
|
||||||
|
PictureFirePoint.fireCode.null = fireCode 不能为空
|
||||||
|
PictureFirePoint.fireCode.length.illegal = fireCode 长度过长
|
||||||
|
PictureFirePoint.pictureName.length.illegal = pictureName 长度过长
|
||||||
|
PictureFirePoint.picturePath.null = picturePath 不能为空
|
||||||
|
PictureFirePoint.picturePath.length.illegal = picturePath 长度过长
|
||||||
|
PictureFirePoint.memo.length.illegal = memo 长度过长
|
||||||
|
PictureFirePoint.size.length.illegal = size 长度过长
|
||||||
|
PictureFirePoint.md5.null = md5 不能为空
|
||||||
|
PictureFirePoint.md5.length.illegal = md5 长度过长
|
||||||
|
PictureFirePoint.shootTimeTs.null = shootTimeTs 不能为空
|
||||||
|
|
||||||
|
PersonInvestigator.id.null = id 不能为空
|
||||||
|
PersonInvestigator.name.null = name 不能为空
|
||||||
|
PersonInvestigator.name.length.illegal = name 长度过长
|
||||||
|
PersonInvestigator.code.length.illegal = code 长度过长
|
||||||
|
PersonInvestigator.telephone.null = telephone 不能为空
|
||||||
|
PersonInvestigator.telephone.format.illegal = telephone 格式非法
|
||||||
|
PersonInvestigator.sex.null = sex 不能为空
|
||||||
|
PersonInvestigator.sex.format.illegal = sex 格式非法
|
||||||
|
PersonInvestigator.idCard.length.illegal = idCard 长度过长
|
||||||
|
PersonInvestigator.memo.length.illegal = memo 长度过长
|
||||||
|
PersonInvestigator.linkUserName.null = linkUserName 不能为空
|
||||||
|
PersonInvestigator.linkUserName.format.illegal = linkUserName 格式非法
|
||||||
|
PersonInvestigator.password.null = password 不能为空
|
||||||
|
PersonInvestigator.password.format.illegal = password 格式非法
|
||||||
|
InvestigateFirePoint.verifyTimeTs.null = verifyTimeTs 不能为空
|
||||||
|
|
||||||
|
InvestigateFirePoint.id.null = id 不能为空
|
||||||
|
InvestigateFirePoint.fireCode.null = fireCode 不能为空
|
||||||
|
InvestigateFirePoint.fireCode.length.illegal = fireCode 长度过长
|
||||||
|
InvestigateFirePoint.countyCode.null = countyCode 不能为空
|
||||||
|
InvestigateFirePoint.countyCode.length.illegal = countyCode 长度过长
|
||||||
|
InvestigateFirePoint.countyName.null = countyName 不能为空
|
||||||
|
InvestigateFirePoint.countyName.length.illegal = countyName 长度过长
|
||||||
|
InvestigateFirePoint.address.null = address 不能为空
|
||||||
|
InvestigateFirePoint.fireArea.null = fireArea 不能为空
|
||||||
|
InvestigateFirePoint.verifyType.null = verifyType 不能为空
|
||||||
|
InvestigateFirePoint.satelliteType.null = satelliteType 不能为空
|
||||||
|
InvestigateFirePoint.satelliteType.length.illegal = satelliteType 长度过长
|
||||||
|
|
||||||
|
FileDocument.id.null = id 不能为空
|
||||||
|
FileDocument.name.null = name 不能为空
|
||||||
|
FileDocument.name.length.illegal = name 长度过长
|
||||||
|
FileDocument.category.length.illegal = category 长度过长
|
||||||
|
FileDocument.filePath.null = filePath 不能为空
|
||||||
|
FileDocument.filePath.length.illegal = filePath 长度过长
|
||||||
|
FileDocument.size.length.illegal = size 长度过长
|
||||||
|
FileDocument.md5.null = md5 不能为空
|
||||||
|
FileDocument.md5.length.illegal = md5 长度过长
|
||||||
|
FileDocument.memo.length.illegal = memo 长度过长
|
||||||
|
FileDocument.checkingToken.length.illegal = checkingToken 长度过长
|
||||||
|
|
||||||
|
AppFile.id.null = id 不能为空
|
||||||
|
AppFile.name.null = name 不能为空
|
||||||
|
AppFile.name.length.illegal = name 长度过长
|
||||||
|
AppFile.appPath.null = appPath 不能为空
|
||||||
|
AppFile.appPath.length.illegal = appPath 长度过长
|
||||||
|
AppFile.versionNumber.null = versionNumber 不能为空
|
||||||
|
AppFile.versionNumber.length.illegal = versionNumber 长度过长
|
||||||
|
AppFile.versionNumber.format.illegal = versionNumber 格式不合法
|
||||||
|
AppFile.size.null = size 不能为空
|
||||||
|
AppFile.size.length.illegal = size 长度过长
|
||||||
|
AppFile.md5.null = md5 不能为空
|
||||||
|
AppFile.md5.length.illegal = md5 长度过长
|
||||||
|
AppFile.memo.length.illegal = memo 长度过长
|
||||||
|
|
||||||
|
RealFirePoint.id.null = id 不能为空
|
||||||
|
RealFirePoint.fireCode.null = fireCode 不能为空
|
||||||
|
RealFirePoint.fireCode.length.illegal = fireCode 不合法
|
||||||
|
RealFirePoint.countyCode.null = countyCode 不能为空
|
||||||
|
RealFirePoint.countyCode.length.illegal = countyCode 不合法
|
||||||
|
RealFirePoint.countyName.null = countyName 不能为空
|
||||||
|
RealFirePoint.countyName.length.illegal = countyName 不合法
|
||||||
|
RealFirePoint.address.null = address 不能为空
|
||||||
|
RealFirePoint.address.length.illegal = address 不合法
|
||||||
|
RealFirePoint.fireArea.null = fireArea 不能为空
|
||||||
|
RealFirePoint.verifyTimeTs.null = verifyTimeTs 不能为空
|
||||||
|
RealFirePoint.verifyType.null = verifyType 不能为空
|
||||||
|
|
||||||
|
InvestigationTeam.id.null = id 不能为空
|
||||||
|
InvestigationTeam.teamName.null = teamName 不能为空
|
||||||
|
InvestigationTeam.teamName.length.illegal = teamName 长度过长
|
||||||
|
InvestigationTeam.memo.length.illegal = memo 长度过长
|
||||||
|
InvestigationTeam.userName.null = userName 不能为空
|
||||||
|
InvestigationTeam.userName.length.illegal = userName 长度过长
|
||||||
|
InvestigationTeam.userRealName.null = userRealName 不能为空
|
||||||
|
InvestigationTeam.userRealName.length.illegal = userRealName 长度过长
|
||||||
|
|
||||||
|
RelTeamInvestigator.id.null = id 不能为空
|
||||||
|
RelTeamInvestigator.teamCode.null = teamCode 不能为空
|
||||||
|
RelTeamInvestigator.teamCode.length.illegal = teamCode 长度过长
|
||||||
|
RelTeamInvestigator.userName.null = userName 不能为空
|
||||||
|
RelTeamInvestigator.userName.length.illegal = userName 长度过长
|
||||||
|
RelTeamInvestigator.teamDeputy.null = teamDeputy 不能为空
|
||||||
|
RelTeamInvestigator.memo.length.illegal = memo 长度过长
|
||||||
|
RelTeamInvestigator.userRealName.null = userRealName 不能为空
|
||||||
|
RelTeamInvestigator.userRealName.length.illegal = userRealName 长度过长
|
BIN
src/main/resources/templates/a.xlsx
Normal file
BIN
src/main/resources/templates/a.xlsx
Normal file
Binary file not shown.
BIN
src/main/resources/templates/test.xlsx
Normal file
BIN
src/main/resources/templates/test.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user