commit fb2f916b4989a147feaffaaa1f04a6cec06046bc Author: Yxq <2290299376@qq.com> Date: Sun Mar 16 00:14:48 2025 +0800 2025/3/15珀金斯wms后端 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dad8f2d --- /dev/null +++ b/.gitignore @@ -0,0 +1,36 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ +/log + +### 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/ +.log + +### VS Code ### +.vscode/ +log diff --git a/mvnw b/mvnw new file mode 100644 index 0000000..8a8fb22 --- /dev/null +++ b/mvnw @@ -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 "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..1d8ab01 --- /dev/null +++ b/mvnw.cmd @@ -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% diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3b60a1d --- /dev/null +++ b/pom.xml @@ -0,0 +1,190 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.0.2 + + + com + WMS + 1.0 + WMS + WMS + + 17 + + + + org.springframework.boot + spring-boot-starter-web + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 3.0.0 + + + + + + + + + + + com.microsoft.sqlserver + mssql-jdbc + 11.2.0.jre17 + + + + + + + + + + + + + + + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.boot + spring-boot-starter-validation + + + + + org.apache.commons + commons-lang3 + + + + + com.fasterxml.jackson.core + jackson-databind + + + + + com.alibaba + fastjson + 2.0.21 + + + + + org.apache.httpcomponents + httpclient + 4.5.13 + + + + + com.google.guava + guava + 31.1-jre + + + + com.github.pagehelper + pagehelper + 5.3.0 + + + com.github.jsqlparser + jsqlparser + 4.4 + + + + + org.apache.httpcomponents + httpmime + 4.5.14 + + + + org.apache.poi + poi-ooxml + 5.2.3 + + + org.apache.poi + poi + 5.2.3 + + + org.projectlombok + lombok + + + cn.hutool + hutool-all + 5.8.25 + + + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + 1.0.1 + + + + com.auth0 + java-jwt + 4.4.0 + + + + io.springfox + springfox-swagger2 + 2.9.2 + + + io.springfox + springfox-swagger-ui + 2.9.2 + + + org.apache.tomcat.embed + tomcat-embed-core + 10.1.25 + + + com.alibaba + easyexcel + 4.0.1 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + + 16 + 16 + + + + + + diff --git a/sql/dbo.sql b/sql/dbo.sql new file mode 100644 index 0000000..abbd477 --- /dev/null +++ b/sql/dbo.sql @@ -0,0 +1,5008 @@ +/* + Navicat Premium Data Transfer + + Source Server : SQL server + Source Server Type : SQL Server + Source Server Version : 16001000 + Source Host : localhost:1433 + Source Catalog : wms_bojinsi_wuxi + Source Schema : dbo + + Target Server Type : SQL Server + Target Server Version : 16001000 + File Encoding : 65001 + + Date: 21/02/2025 09:13:53 +*/ + + +-- ---------------------------- +-- Table structure for tbl_app_goods +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_goods]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_goods] +GO + +CREATE TABLE [dbo].[tbl_app_goods] ( + [goods_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [goods_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [goods_unit] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [item_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [item_type] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [inv_category] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [life_days] int NULL, + [organization_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [organization_code] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [last_update_time] datetime NULL, + [last_update_user] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_goods] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_goods +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_goods] ([goods_id], [goods_name], [goods_unit], [item_id], [item_type], [inv_category], [life_days], [organization_id], [organization_code], [last_update_time], [last_update_user]) VALUES (N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + + +-- ---------------------------- +-- Table structure for tbl_app_kate_orders +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_kate_orders]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_kate_orders] +GO + +CREATE TABLE [dbo].[tbl_app_kate_orders] ( + [order_id] varchar(64) COLLATE Chinese_PRC_CI_AS NOT NULL, + [work_order] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [goods_id] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [item] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [description] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [s_loc] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [type] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [origin_status] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [supply_area] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [sort_string] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [requirement_quantity] decimal(12,4) NULL, + [goods_unit] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [order_status] int NULL, + [lack_quantity] decimal(12,4) NULL, + [picked_quantity] decimal(12,4) NULL, + [user_name] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [finish_time] datetime NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_kate_orders] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_kate_orders +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_location +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_location]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_location] +GO + +CREATE TABLE [dbo].[tbl_app_location] ( + [location_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [area_id] int NULL, + [tunnel_id] int NULL, + [equipment_id] int NULL, + [location_type] int NULL, + [queue] int NULL, + [line] int NULL, + [layer] int NULL, + [depth] int NULL, + [is_lock] int NULL, + [location_status] int NULL, + [vehicle_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [ware_area] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_location] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_location +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-01-C-2', N'1', N'1', N'1', N'0', N'1', N'1', N'3', N'2', N'0', N'1', N'1111', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-01-C-4', N'1', N'1', N'1', N'0', N'1', N'1', N'3', N'1', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-01-D-2', N'1', N'1', N'1', N'0', N'1', N'1', N'4', N'2', N'0', N'0', N'6611561', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-01-D-4', N'1', N'1', N'1', N'0', N'1', N'1', N'4', N'1', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-02-C-2', N'1', N'1', N'1', N'0', N'2', N'1', N'3', N'2', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-02-C-4', N'1', N'1', N'1', N'0', N'2', N'1', N'3', N'1', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-02-D-2', N'1', N'1', N'1', N'0', N'2', N'1', N'4', N'2', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-02-D-4', N'1', N'1', N'1', N'0', N'2', N'1', N'4', N'1', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-A-1', N'1', N'1', N'1', N'0', N'1', N'2', N'1', N'2', N'0', N'0', N'6611561', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-A-2', N'1', N'1', N'1', N'0', N'1', N'3', N'1', N'2', N'0', N'0', N'D12345678', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-A-3', N'1', N'1', N'1', N'0', N'1', N'2', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-A-4', N'1', N'1', N'1', N'0', N'1', N'3', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-B-1', N'1', N'1', N'1', N'0', N'1', N'2', N'2', N'2', N'0', N'0', N'6611561', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-B-2', N'1', N'1', N'1', N'0', N'1', N'3', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-B-3', N'1', N'1', N'1', N'0', N'1', N'2', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-B-4', N'1', N'1', N'1', N'0', N'1', N'3', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-C-1', N'1', N'1', N'1', N'0', N'1', N'2', N'3', N'2', N'0', N'0', N'6611561', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-C-2', N'1', N'1', N'1', N'0', N'1', N'3', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-C-3', N'1', N'1', N'1', N'0', N'1', N'2', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-C-4', N'1', N'1', N'1', N'0', N'1', N'3', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-D-1', N'1', N'1', N'1', N'0', N'1', N'2', N'4', N'2', N'0', N'0', N'6611561', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-D-2', N'1', N'1', N'1', N'0', N'1', N'3', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-D-3', N'1', N'1', N'1', N'0', N'1', N'2', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-03-D-4', N'1', N'1', N'1', N'0', N'1', N'3', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-A-1', N'1', N'1', N'1', N'0', N'2', N'2', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-A-2', N'1', N'1', N'1', N'0', N'2', N'3', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-A-3', N'1', N'1', N'1', N'0', N'2', N'2', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-A-4', N'1', N'1', N'1', N'0', N'2', N'3', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-B-1', N'1', N'1', N'1', N'0', N'2', N'2', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-B-2', N'1', N'1', N'1', N'0', N'2', N'3', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-B-3', N'1', N'1', N'1', N'0', N'2', N'2', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-B-4', N'1', N'1', N'1', N'0', N'2', N'3', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-C-1', N'1', N'1', N'1', N'0', N'2', N'2', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-C-2', N'1', N'1', N'1', N'0', N'2', N'3', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-C-3', N'1', N'1', N'1', N'0', N'2', N'2', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-C-4', N'1', N'1', N'1', N'0', N'2', N'3', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-D-1', N'1', N'1', N'1', N'0', N'2', N'2', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-D-2', N'1', N'1', N'1', N'0', N'2', N'3', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-D-3', N'1', N'1', N'1', N'0', N'2', N'2', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-04-D-4', N'1', N'1', N'1', N'0', N'2', N'3', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-A-1', N'1', N'1', N'1', N'0', N'1', N'4', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-A-2', N'1', N'1', N'1', N'0', N'1', N'5', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-A-3', N'1', N'1', N'1', N'0', N'1', N'4', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-A-4', N'1', N'1', N'1', N'0', N'1', N'5', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-B-1', N'1', N'1', N'1', N'0', N'1', N'4', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-B-2', N'1', N'1', N'1', N'0', N'1', N'5', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-B-3', N'1', N'1', N'1', N'0', N'1', N'4', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-B-4', N'1', N'1', N'1', N'0', N'1', N'5', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-C-1', N'1', N'1', N'1', N'0', N'1', N'4', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-C-2', N'1', N'1', N'1', N'0', N'1', N'5', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-C-3', N'1', N'1', N'1', N'0', N'1', N'4', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-C-4', N'1', N'1', N'1', N'0', N'1', N'5', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-D-1', N'1', N'1', N'1', N'0', N'1', N'4', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-D-2', N'1', N'1', N'1', N'0', N'1', N'5', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-D-3', N'1', N'1', N'1', N'0', N'1', N'4', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-05-D-4', N'1', N'1', N'1', N'0', N'1', N'5', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-A-1', N'1', N'1', N'1', N'0', N'2', N'4', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-A-2', N'1', N'1', N'1', N'0', N'2', N'5', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-A-3', N'1', N'1', N'1', N'0', N'2', N'4', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-A-4', N'1', N'1', N'1', N'0', N'2', N'5', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-B-1', N'1', N'1', N'1', N'0', N'2', N'4', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-B-2', N'1', N'1', N'1', N'0', N'2', N'5', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-B-3', N'1', N'1', N'1', N'0', N'2', N'4', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-B-4', N'1', N'1', N'1', N'0', N'2', N'5', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-C-1', N'1', N'1', N'1', N'0', N'2', N'4', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-C-2', N'1', N'1', N'1', N'0', N'2', N'5', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-C-3', N'1', N'1', N'1', N'0', N'2', N'4', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-C-4', N'1', N'1', N'1', N'0', N'2', N'5', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-D-1', N'1', N'1', N'1', N'0', N'2', N'4', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-D-2', N'1', N'1', N'1', N'0', N'2', N'5', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-D-3', N'1', N'1', N'1', N'0', N'2', N'4', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-06-D-4', N'1', N'1', N'1', N'0', N'2', N'5', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-A-1', N'1', N'1', N'1', N'0', N'1', N'6', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-A-2', N'1', N'1', N'1', N'0', N'1', N'7', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-A-3', N'1', N'1', N'1', N'0', N'1', N'6', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-A-4', N'1', N'1', N'1', N'0', N'1', N'7', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-B-1', N'1', N'1', N'1', N'0', N'1', N'6', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-B-2', N'1', N'1', N'1', N'0', N'1', N'7', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-B-3', N'1', N'1', N'1', N'0', N'1', N'6', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-B-4', N'1', N'1', N'1', N'0', N'1', N'7', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-C-1', N'1', N'1', N'1', N'0', N'1', N'6', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-C-2', N'1', N'1', N'1', N'0', N'1', N'7', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-C-3', N'1', N'1', N'1', N'0', N'1', N'6', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-C-4', N'1', N'1', N'1', N'0', N'1', N'7', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-D-1', N'1', N'1', N'1', N'0', N'1', N'6', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-D-2', N'1', N'1', N'1', N'0', N'1', N'7', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-D-3', N'1', N'1', N'1', N'0', N'1', N'6', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-07-D-4', N'1', N'1', N'1', N'0', N'1', N'7', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-A-1', N'1', N'1', N'1', N'0', N'2', N'6', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-A-2', N'1', N'1', N'1', N'0', N'2', N'7', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-A-3', N'1', N'1', N'1', N'0', N'2', N'6', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-A-4', N'1', N'1', N'1', N'0', N'2', N'7', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-B-1', N'1', N'1', N'1', N'0', N'2', N'6', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-B-2', N'1', N'1', N'1', N'0', N'2', N'7', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-B-3', N'1', N'1', N'1', N'0', N'2', N'6', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-B-4', N'1', N'1', N'1', N'0', N'2', N'7', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-C-1', N'1', N'1', N'1', N'0', N'2', N'6', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-C-2', N'1', N'1', N'1', N'0', N'2', N'7', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-C-3', N'1', N'1', N'1', N'0', N'2', N'6', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-C-4', N'1', N'1', N'1', N'0', N'2', N'7', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-D-1', N'1', N'1', N'1', N'0', N'2', N'6', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-D-2', N'1', N'1', N'1', N'0', N'2', N'7', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-D-3', N'1', N'1', N'1', N'0', N'2', N'6', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-08-D-4', N'1', N'1', N'1', N'0', N'2', N'7', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-A-1', N'1', N'1', N'1', N'0', N'1', N'8', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-A-2', N'1', N'1', N'1', N'0', N'1', N'9', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-A-3', N'1', N'1', N'1', N'0', N'1', N'8', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-A-4', N'1', N'1', N'1', N'0', N'1', N'9', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-B-1', N'1', N'1', N'1', N'0', N'1', N'8', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-B-2', N'1', N'1', N'1', N'0', N'1', N'9', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-B-3', N'1', N'1', N'1', N'0', N'1', N'8', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-B-4', N'1', N'1', N'1', N'0', N'1', N'9', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-C-1', N'1', N'1', N'1', N'0', N'1', N'8', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-C-2', N'1', N'1', N'1', N'0', N'1', N'9', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-C-3', N'1', N'1', N'1', N'0', N'1', N'8', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-C-4', N'1', N'1', N'1', N'0', N'1', N'9', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-D-1', N'1', N'1', N'1', N'0', N'1', N'8', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-D-2', N'1', N'1', N'1', N'0', N'1', N'9', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-D-3', N'1', N'1', N'1', N'0', N'1', N'8', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-09-D-4', N'1', N'1', N'1', N'0', N'1', N'9', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-A-1', N'1', N'1', N'1', N'0', N'2', N'8', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-A-2', N'1', N'1', N'1', N'0', N'2', N'9', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-A-3', N'1', N'1', N'1', N'0', N'2', N'8', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-A-4', N'1', N'1', N'1', N'0', N'2', N'9', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-B-1', N'1', N'1', N'1', N'0', N'2', N'8', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-B-2', N'1', N'1', N'1', N'0', N'2', N'9', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-B-3', N'1', N'1', N'1', N'0', N'2', N'8', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-B-4', N'1', N'1', N'1', N'0', N'2', N'9', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-C-1', N'1', N'1', N'1', N'0', N'2', N'8', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-C-2', N'1', N'1', N'1', N'0', N'2', N'9', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-C-3', N'1', N'1', N'1', N'0', N'2', N'8', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-C-4', N'1', N'1', N'1', N'0', N'2', N'9', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-D-1', N'1', N'1', N'1', N'0', N'2', N'8', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-D-2', N'1', N'1', N'1', N'0', N'2', N'9', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-D-3', N'1', N'1', N'1', N'0', N'2', N'8', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-10-D-4', N'1', N'1', N'1', N'0', N'2', N'9', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-A-1', N'1', N'1', N'1', N'0', N'1', N'10', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-A-2', N'1', N'1', N'1', N'0', N'1', N'11', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-A-3', N'1', N'1', N'1', N'0', N'1', N'10', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-A-4', N'1', N'1', N'1', N'0', N'1', N'11', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-B-1', N'1', N'1', N'1', N'0', N'1', N'10', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-B-2', N'1', N'1', N'1', N'0', N'1', N'11', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-B-3', N'1', N'1', N'1', N'0', N'1', N'10', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-B-4', N'1', N'1', N'1', N'0', N'1', N'11', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-C-1', N'1', N'1', N'1', N'0', N'1', N'10', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-C-2', N'1', N'1', N'1', N'0', N'1', N'11', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-C-3', N'1', N'1', N'1', N'0', N'1', N'10', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-C-4', N'1', N'1', N'1', N'0', N'1', N'11', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-D-1', N'1', N'1', N'1', N'0', N'1', N'10', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-D-2', N'1', N'1', N'1', N'0', N'1', N'11', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-D-3', N'1', N'1', N'1', N'0', N'1', N'10', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-11-D-4', N'1', N'1', N'1', N'0', N'1', N'11', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-A-1', N'1', N'1', N'1', N'0', N'2', N'10', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-A-2', N'1', N'1', N'1', N'0', N'2', N'11', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-A-3', N'1', N'1', N'1', N'0', N'2', N'10', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-A-4', N'1', N'1', N'1', N'0', N'2', N'11', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-B-1', N'1', N'1', N'1', N'0', N'2', N'10', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-B-2', N'1', N'1', N'1', N'0', N'2', N'11', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-B-3', N'1', N'1', N'1', N'0', N'2', N'10', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-B-4', N'1', N'1', N'1', N'0', N'2', N'11', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-C-1', N'1', N'1', N'1', N'0', N'2', N'10', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-C-2', N'1', N'1', N'1', N'0', N'2', N'11', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-C-3', N'1', N'1', N'1', N'0', N'2', N'10', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-C-4', N'1', N'1', N'1', N'0', N'2', N'11', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-D-1', N'1', N'1', N'1', N'0', N'2', N'10', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-D-2', N'1', N'1', N'1', N'0', N'2', N'11', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-D-3', N'1', N'1', N'1', N'0', N'2', N'10', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-12-D-4', N'1', N'1', N'1', N'0', N'2', N'11', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-A-1', N'1', N'1', N'1', N'0', N'1', N'12', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-A-2', N'1', N'1', N'1', N'0', N'1', N'13', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-A-3', N'1', N'1', N'1', N'0', N'1', N'12', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-A-4', N'1', N'1', N'1', N'0', N'1', N'13', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-B-1', N'1', N'1', N'1', N'0', N'1', N'12', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-B-2', N'1', N'1', N'1', N'0', N'1', N'13', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-B-3', N'1', N'1', N'1', N'0', N'1', N'12', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-B-4', N'1', N'1', N'1', N'0', N'1', N'13', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-C-1', N'1', N'1', N'1', N'0', N'1', N'12', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-C-2', N'1', N'1', N'1', N'0', N'1', N'13', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-C-3', N'1', N'1', N'1', N'0', N'1', N'12', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-C-4', N'1', N'1', N'1', N'0', N'1', N'13', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-D-1', N'1', N'1', N'1', N'0', N'1', N'12', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-D-2', N'1', N'1', N'1', N'0', N'1', N'13', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-D-3', N'1', N'1', N'1', N'0', N'1', N'12', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-13-D-4', N'1', N'1', N'1', N'0', N'1', N'13', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-A-1', N'1', N'1', N'1', N'0', N'2', N'12', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-A-2', N'1', N'1', N'1', N'0', N'2', N'13', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-A-3', N'1', N'1', N'1', N'0', N'2', N'12', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-A-4', N'1', N'1', N'1', N'0', N'2', N'13', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-B-1', N'1', N'1', N'1', N'0', N'2', N'12', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-B-2', N'1', N'1', N'1', N'0', N'2', N'13', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-B-3', N'1', N'1', N'1', N'0', N'2', N'12', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-B-4', N'1', N'1', N'1', N'0', N'2', N'13', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-C-1', N'1', N'1', N'1', N'0', N'2', N'12', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-C-2', N'1', N'1', N'1', N'0', N'2', N'13', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-C-3', N'1', N'1', N'1', N'0', N'2', N'12', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-C-4', N'1', N'1', N'1', N'0', N'2', N'13', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-D-1', N'1', N'1', N'1', N'0', N'2', N'12', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-D-2', N'1', N'1', N'1', N'0', N'2', N'13', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-D-3', N'1', N'1', N'1', N'0', N'2', N'12', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-14-D-4', N'1', N'1', N'1', N'0', N'2', N'13', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-A-1', N'1', N'1', N'1', N'0', N'1', N'14', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-A-2', N'1', N'1', N'1', N'0', N'1', N'15', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-A-3', N'1', N'1', N'1', N'0', N'1', N'14', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-A-4', N'1', N'1', N'1', N'0', N'1', N'15', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-B-1', N'1', N'1', N'1', N'0', N'1', N'14', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-B-2', N'1', N'1', N'1', N'0', N'1', N'15', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-B-3', N'1', N'1', N'1', N'0', N'1', N'14', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-B-4', N'1', N'1', N'1', N'0', N'1', N'15', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-C-1', N'1', N'1', N'1', N'0', N'1', N'14', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-C-2', N'1', N'1', N'1', N'0', N'1', N'15', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-C-3', N'1', N'1', N'1', N'0', N'1', N'14', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-C-4', N'1', N'1', N'1', N'0', N'1', N'15', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-D-1', N'1', N'1', N'1', N'0', N'1', N'14', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-D-2', N'1', N'1', N'1', N'0', N'1', N'15', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-D-3', N'1', N'1', N'1', N'0', N'1', N'14', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-15-D-4', N'1', N'1', N'1', N'0', N'1', N'15', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-A-1', N'1', N'1', N'1', N'0', N'2', N'14', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-A-2', N'1', N'1', N'1', N'0', N'2', N'15', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-A-3', N'1', N'1', N'1', N'0', N'2', N'14', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-A-4', N'1', N'1', N'1', N'0', N'2', N'15', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-B-1', N'1', N'1', N'1', N'0', N'2', N'14', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-B-2', N'1', N'1', N'1', N'0', N'2', N'15', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-B-3', N'1', N'1', N'1', N'0', N'2', N'14', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-B-4', N'1', N'1', N'1', N'0', N'2', N'15', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-C-1', N'1', N'1', N'1', N'0', N'2', N'14', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-C-2', N'1', N'1', N'1', N'0', N'2', N'15', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-C-3', N'1', N'1', N'1', N'0', N'2', N'14', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-C-4', N'1', N'1', N'1', N'0', N'2', N'15', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-D-1', N'1', N'1', N'1', N'0', N'2', N'14', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-D-2', N'1', N'1', N'1', N'0', N'2', N'15', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-D-3', N'1', N'1', N'1', N'0', N'2', N'14', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-16-D-4', N'1', N'1', N'1', N'0', N'2', N'15', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-A-1', N'1', N'1', N'1', N'0', N'1', N'16', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-A-2', N'1', N'1', N'1', N'0', N'1', N'17', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-A-3', N'1', N'1', N'1', N'0', N'1', N'16', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-A-4', N'1', N'1', N'1', N'0', N'1', N'17', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-B-1', N'1', N'1', N'1', N'0', N'1', N'16', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-B-2', N'1', N'1', N'1', N'0', N'1', N'17', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-B-3', N'1', N'1', N'1', N'0', N'1', N'16', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-B-4', N'1', N'1', N'1', N'0', N'1', N'17', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-C-1', N'1', N'1', N'1', N'0', N'1', N'16', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-C-2', N'1', N'1', N'1', N'0', N'1', N'17', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-C-3', N'1', N'1', N'1', N'0', N'1', N'16', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-C-4', N'1', N'1', N'1', N'0', N'1', N'17', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-D-1', N'1', N'1', N'1', N'0', N'1', N'16', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-D-2', N'1', N'1', N'1', N'0', N'1', N'17', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-D-3', N'1', N'1', N'1', N'0', N'1', N'16', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-17-D-4', N'1', N'1', N'1', N'0', N'1', N'17', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-A-1', N'1', N'1', N'1', N'0', N'2', N'16', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-A-2', N'1', N'1', N'1', N'0', N'2', N'17', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-A-3', N'1', N'1', N'1', N'0', N'2', N'16', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-A-4', N'1', N'1', N'1', N'0', N'2', N'17', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-B-1', N'1', N'1', N'1', N'0', N'2', N'16', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-B-2', N'1', N'1', N'1', N'0', N'2', N'17', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-B-3', N'1', N'1', N'1', N'0', N'2', N'16', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-B-4', N'1', N'1', N'1', N'0', N'2', N'17', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-C-1', N'1', N'1', N'1', N'0', N'2', N'16', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-C-2', N'1', N'1', N'1', N'0', N'2', N'17', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-C-3', N'1', N'1', N'1', N'0', N'2', N'16', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-C-4', N'1', N'1', N'1', N'0', N'2', N'17', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-D-1', N'1', N'1', N'1', N'0', N'2', N'16', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-D-2', N'1', N'1', N'1', N'0', N'2', N'17', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-D-3', N'1', N'1', N'1', N'0', N'2', N'16', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-18-D-4', N'1', N'1', N'1', N'0', N'2', N'17', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-A-1', N'1', N'1', N'1', N'0', N'1', N'18', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-A-2', N'1', N'1', N'1', N'0', N'1', N'19', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-A-3', N'1', N'1', N'1', N'0', N'1', N'18', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-A-4', N'1', N'1', N'1', N'0', N'1', N'19', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-B-1', N'1', N'1', N'1', N'0', N'1', N'18', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-B-2', N'1', N'1', N'1', N'0', N'1', N'19', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-B-3', N'1', N'1', N'1', N'0', N'1', N'18', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-B-4', N'1', N'1', N'1', N'0', N'1', N'19', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-C-1', N'1', N'1', N'1', N'0', N'1', N'18', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-C-2', N'1', N'1', N'1', N'0', N'1', N'19', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-C-3', N'1', N'1', N'1', N'0', N'1', N'18', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-C-4', N'1', N'1', N'1', N'0', N'1', N'19', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-D-1', N'1', N'1', N'1', N'0', N'1', N'18', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-D-2', N'1', N'1', N'1', N'0', N'1', N'19', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-D-3', N'1', N'1', N'1', N'0', N'1', N'18', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-19-D-4', N'1', N'1', N'1', N'0', N'1', N'19', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-A-1', N'1', N'1', N'1', N'0', N'2', N'18', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-A-2', N'1', N'1', N'1', N'0', N'2', N'19', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-A-3', N'1', N'1', N'1', N'0', N'2', N'18', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-A-4', N'1', N'1', N'1', N'0', N'2', N'19', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-B-1', N'1', N'1', N'1', N'0', N'2', N'18', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-B-2', N'1', N'1', N'1', N'0', N'2', N'19', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-B-3', N'1', N'1', N'1', N'0', N'2', N'18', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-B-4', N'1', N'1', N'1', N'0', N'2', N'19', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-C-1', N'1', N'1', N'1', N'0', N'2', N'18', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-C-2', N'1', N'1', N'1', N'0', N'2', N'19', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-C-3', N'1', N'1', N'1', N'0', N'2', N'18', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-C-4', N'1', N'1', N'1', N'0', N'2', N'19', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-D-1', N'1', N'1', N'1', N'0', N'2', N'18', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-D-2', N'1', N'1', N'1', N'0', N'2', N'19', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-D-3', N'1', N'1', N'1', N'0', N'2', N'18', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-20-D-4', N'1', N'1', N'1', N'0', N'2', N'19', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-A-1', N'1', N'1', N'1', N'0', N'1', N'20', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-A-2', N'1', N'1', N'1', N'0', N'1', N'21', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-A-3', N'1', N'1', N'1', N'0', N'1', N'20', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-A-4', N'1', N'1', N'1', N'0', N'1', N'21', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-B-1', N'1', N'1', N'1', N'0', N'1', N'20', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-B-2', N'1', N'1', N'1', N'0', N'1', N'21', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-B-3', N'1', N'1', N'1', N'0', N'1', N'20', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-B-4', N'1', N'1', N'1', N'0', N'1', N'21', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-C-1', N'1', N'1', N'1', N'0', N'1', N'20', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-C-2', N'1', N'1', N'1', N'0', N'1', N'21', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-C-3', N'1', N'1', N'1', N'0', N'1', N'20', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-C-4', N'1', N'1', N'1', N'0', N'1', N'21', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-D-1', N'1', N'1', N'1', N'0', N'1', N'20', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-D-2', N'1', N'1', N'1', N'0', N'1', N'21', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-D-3', N'1', N'1', N'1', N'0', N'1', N'20', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-21-D-4', N'1', N'1', N'1', N'0', N'1', N'21', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-A-1', N'1', N'1', N'1', N'0', N'2', N'20', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-A-2', N'1', N'1', N'1', N'0', N'2', N'21', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-A-3', N'1', N'1', N'1', N'0', N'2', N'20', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-A-4', N'1', N'1', N'1', N'0', N'2', N'21', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-B-1', N'1', N'1', N'1', N'0', N'2', N'20', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-B-2', N'1', N'1', N'1', N'0', N'2', N'21', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-B-3', N'1', N'1', N'1', N'0', N'2', N'20', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-B-4', N'1', N'1', N'1', N'0', N'2', N'21', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-C-1', N'1', N'1', N'1', N'0', N'2', N'20', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-C-2', N'1', N'1', N'1', N'0', N'2', N'21', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-C-3', N'1', N'1', N'1', N'0', N'2', N'20', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-C-4', N'1', N'1', N'1', N'0', N'2', N'21', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-D-1', N'1', N'1', N'1', N'0', N'2', N'20', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-D-2', N'1', N'1', N'1', N'0', N'2', N'21', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-D-3', N'1', N'1', N'1', N'0', N'2', N'20', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-22-D-4', N'1', N'1', N'1', N'0', N'2', N'21', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-A-1', N'1', N'1', N'1', N'0', N'1', N'22', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-A-2', N'1', N'1', N'1', N'0', N'1', N'23', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-A-3', N'1', N'1', N'1', N'0', N'1', N'22', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-A-4', N'1', N'1', N'1', N'0', N'1', N'23', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-B-1', N'1', N'1', N'1', N'0', N'1', N'22', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-B-2', N'1', N'1', N'1', N'0', N'1', N'23', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-B-3', N'1', N'1', N'1', N'0', N'1', N'22', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-B-4', N'1', N'1', N'1', N'0', N'1', N'23', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-C-1', N'1', N'1', N'1', N'0', N'1', N'22', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-C-2', N'1', N'1', N'1', N'0', N'1', N'23', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-C-3', N'1', N'1', N'1', N'0', N'1', N'22', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-C-4', N'1', N'1', N'1', N'0', N'1', N'23', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-D-1', N'1', N'1', N'1', N'0', N'1', N'22', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-D-2', N'1', N'1', N'1', N'0', N'1', N'23', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-D-3', N'1', N'1', N'1', N'0', N'1', N'22', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-23-D-4', N'1', N'1', N'1', N'0', N'1', N'23', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-A-1', N'1', N'1', N'1', N'0', N'2', N'22', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-A-2', N'1', N'1', N'1', N'0', N'2', N'23', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-A-3', N'1', N'1', N'1', N'0', N'2', N'22', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-A-4', N'1', N'1', N'1', N'0', N'2', N'23', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-B-1', N'1', N'1', N'1', N'0', N'2', N'22', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-B-2', N'1', N'1', N'1', N'0', N'2', N'23', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-B-3', N'1', N'1', N'1', N'0', N'2', N'22', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-B-4', N'1', N'1', N'1', N'0', N'2', N'23', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-C-1', N'1', N'1', N'1', N'0', N'2', N'22', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-C-2', N'1', N'1', N'1', N'0', N'2', N'23', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-C-3', N'1', N'1', N'1', N'0', N'2', N'22', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-C-4', N'1', N'1', N'1', N'0', N'2', N'23', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-D-1', N'1', N'1', N'1', N'0', N'2', N'22', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-D-2', N'1', N'1', N'1', N'0', N'2', N'23', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-D-3', N'1', N'1', N'1', N'0', N'2', N'22', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-24-D-4', N'1', N'1', N'1', N'0', N'2', N'23', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-A-1', N'1', N'1', N'1', N'0', N'1', N'24', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-A-2', N'1', N'1', N'1', N'0', N'1', N'25', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-A-3', N'1', N'1', N'1', N'0', N'1', N'24', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-A-4', N'1', N'1', N'1', N'0', N'1', N'25', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-B-1', N'1', N'1', N'1', N'0', N'1', N'24', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-B-2', N'1', N'1', N'1', N'0', N'1', N'25', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-B-3', N'1', N'1', N'1', N'0', N'1', N'24', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-B-4', N'1', N'1', N'1', N'0', N'1', N'25', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-C-1', N'1', N'1', N'1', N'0', N'1', N'24', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-C-2', N'1', N'1', N'1', N'0', N'1', N'25', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-C-3', N'1', N'1', N'1', N'0', N'1', N'24', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-C-4', N'1', N'1', N'1', N'0', N'1', N'25', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-D-1', N'1', N'1', N'1', N'0', N'1', N'24', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-D-2', N'1', N'1', N'1', N'0', N'1', N'25', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-D-3', N'1', N'1', N'1', N'0', N'1', N'24', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-25-D-4', N'1', N'1', N'1', N'0', N'1', N'25', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-A-1', N'1', N'1', N'1', N'0', N'2', N'24', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-A-2', N'1', N'1', N'1', N'0', N'2', N'25', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-A-3', N'1', N'1', N'1', N'0', N'2', N'24', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-A-4', N'1', N'1', N'1', N'0', N'2', N'25', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-B-1', N'1', N'1', N'1', N'0', N'2', N'24', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-B-2', N'1', N'1', N'1', N'0', N'2', N'25', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-B-3', N'1', N'1', N'1', N'0', N'2', N'24', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-B-4', N'1', N'1', N'1', N'0', N'2', N'25', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-C-1', N'1', N'1', N'1', N'0', N'2', N'24', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-C-2', N'1', N'1', N'1', N'0', N'2', N'25', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-C-3', N'1', N'1', N'1', N'0', N'2', N'24', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-C-4', N'1', N'1', N'1', N'0', N'2', N'25', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-D-1', N'1', N'1', N'1', N'0', N'2', N'24', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-D-2', N'1', N'1', N'1', N'0', N'2', N'25', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-D-3', N'1', N'1', N'1', N'0', N'2', N'24', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-26-D-4', N'1', N'1', N'1', N'0', N'2', N'25', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-A-1', N'1', N'1', N'1', N'0', N'1', N'26', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-A-2', N'1', N'1', N'1', N'0', N'1', N'27', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-A-3', N'1', N'1', N'1', N'0', N'1', N'26', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-A-4', N'1', N'1', N'1', N'0', N'1', N'27', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-B-1', N'1', N'1', N'1', N'0', N'1', N'26', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-B-2', N'1', N'1', N'1', N'0', N'1', N'27', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-B-3', N'1', N'1', N'1', N'0', N'1', N'26', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-B-4', N'1', N'1', N'1', N'0', N'1', N'27', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-C-1', N'1', N'1', N'1', N'0', N'1', N'26', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-C-2', N'1', N'1', N'1', N'0', N'1', N'27', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-C-3', N'1', N'1', N'1', N'0', N'1', N'26', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-C-4', N'1', N'1', N'1', N'0', N'1', N'27', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-D-1', N'1', N'1', N'1', N'0', N'1', N'26', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-D-2', N'1', N'1', N'1', N'0', N'1', N'27', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-D-3', N'1', N'1', N'1', N'0', N'1', N'26', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-27-D-4', N'1', N'1', N'1', N'0', N'1', N'27', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-A-1', N'1', N'1', N'1', N'0', N'2', N'26', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-A-2', N'1', N'1', N'1', N'0', N'2', N'27', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-A-3', N'1', N'1', N'1', N'0', N'2', N'26', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-A-4', N'1', N'1', N'1', N'0', N'2', N'27', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-B-1', N'1', N'1', N'1', N'0', N'2', N'26', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-B-2', N'1', N'1', N'1', N'0', N'2', N'27', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-B-3', N'1', N'1', N'1', N'0', N'2', N'26', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-B-4', N'1', N'1', N'1', N'0', N'2', N'27', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-C-1', N'1', N'1', N'1', N'0', N'2', N'26', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-C-2', N'1', N'1', N'1', N'0', N'2', N'27', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-C-3', N'1', N'1', N'1', N'0', N'2', N'26', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-C-4', N'1', N'1', N'1', N'0', N'2', N'27', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-D-1', N'1', N'1', N'1', N'0', N'2', N'26', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-D-2', N'1', N'1', N'1', N'0', N'2', N'27', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-D-3', N'1', N'1', N'1', N'0', N'2', N'26', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-01-28-D-4', N'1', N'1', N'1', N'0', N'2', N'27', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-01-C-2', N'1', N'2', N'1', N'0', N'3', N'1', N'3', N'2', N'0', N'1', N'1001', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-01-C-4', N'1', N'2', N'1', N'0', N'3', N'1', N'3', N'1', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-01-D-2', N'1', N'2', N'1', N'0', N'3', N'1', N'4', N'2', N'0', N'1', N'1111', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-01-D-4', N'1', N'2', N'1', N'0', N'3', N'1', N'4', N'1', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-02-C-2', N'1', N'2', N'1', N'0', N'4', N'1', N'3', N'2', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-02-C-4', N'1', N'2', N'1', N'0', N'4', N'1', N'3', N'1', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-02-D-2', N'1', N'2', N'1', N'0', N'4', N'1', N'4', N'2', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-02-D-4', N'1', N'2', N'1', N'0', N'4', N'1', N'4', N'1', N'0', N'0', N'旁边的(暂时用于标记)', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-A-1', N'1', N'2', N'1', N'0', N'3', N'2', N'1', N'2', N'0', N'1', N'1111', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-A-2', N'1', N'2', N'1', N'0', N'3', N'3', N'1', N'2', N'0', N'1', N'1111', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-A-3', N'1', N'2', N'1', N'0', N'3', N'2', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-A-4', N'1', N'2', N'1', N'0', N'3', N'3', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-B-1', N'1', N'2', N'1', N'0', N'3', N'2', N'2', N'2', N'0', N'1', N'1001', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-B-2', N'1', N'2', N'1', N'0', N'3', N'3', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-B-3', N'1', N'2', N'1', N'0', N'3', N'2', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-B-4', N'1', N'2', N'1', N'0', N'3', N'3', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-C-1', N'1', N'2', N'1', N'0', N'3', N'2', N'3', N'2', N'0', N'1', N'1111', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-C-2', N'1', N'2', N'1', N'0', N'3', N'3', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-C-3', N'1', N'2', N'1', N'0', N'3', N'2', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-C-4', N'1', N'2', N'1', N'0', N'3', N'3', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-D-1', N'1', N'2', N'1', N'0', N'3', N'2', N'4', N'2', N'0', N'1', N'1111', N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-D-2', N'1', N'2', N'1', N'0', N'3', N'3', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-D-3', N'1', N'2', N'1', N'0', N'3', N'2', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-03-D-4', N'1', N'2', N'1', N'0', N'3', N'3', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-A-1', N'1', N'2', N'1', N'0', N'4', N'2', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-A-2', N'1', N'2', N'1', N'0', N'4', N'3', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-A-3', N'1', N'2', N'1', N'0', N'4', N'2', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-A-4', N'1', N'2', N'1', N'0', N'4', N'3', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-B-1', N'1', N'2', N'1', N'0', N'4', N'2', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-B-2', N'1', N'2', N'1', N'0', N'4', N'3', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-B-3', N'1', N'2', N'1', N'0', N'4', N'2', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-B-4', N'1', N'2', N'1', N'0', N'4', N'3', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-C-1', N'1', N'2', N'1', N'0', N'4', N'2', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-C-2', N'1', N'2', N'1', N'0', N'4', N'3', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-C-3', N'1', N'2', N'1', N'0', N'4', N'2', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-C-4', N'1', N'2', N'1', N'0', N'4', N'3', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-D-1', N'1', N'2', N'1', N'0', N'4', N'2', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-D-2', N'1', N'2', N'1', N'0', N'4', N'3', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-D-3', N'1', N'2', N'1', N'0', N'4', N'2', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-04-D-4', N'1', N'2', N'1', N'0', N'4', N'3', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-A-1', N'1', N'2', N'1', N'0', N'3', N'4', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-A-2', N'1', N'2', N'1', N'0', N'3', N'5', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-A-3', N'1', N'2', N'1', N'0', N'3', N'4', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-A-4', N'1', N'2', N'1', N'0', N'3', N'5', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-B-1', N'1', N'2', N'1', N'0', N'3', N'4', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-B-2', N'1', N'2', N'1', N'0', N'3', N'5', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-B-3', N'1', N'2', N'1', N'0', N'3', N'4', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-B-4', N'1', N'2', N'1', N'0', N'3', N'5', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-C-1', N'1', N'2', N'1', N'0', N'3', N'4', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-C-2', N'1', N'2', N'1', N'0', N'3', N'5', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-C-3', N'1', N'2', N'1', N'0', N'3', N'4', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-C-4', N'1', N'2', N'1', N'0', N'3', N'5', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-D-1', N'1', N'2', N'1', N'0', N'3', N'4', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-D-2', N'1', N'2', N'1', N'0', N'3', N'5', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-D-3', N'1', N'2', N'1', N'0', N'3', N'4', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-05-D-4', N'1', N'2', N'1', N'0', N'3', N'5', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-A-1', N'1', N'2', N'1', N'0', N'4', N'4', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-A-2', N'1', N'2', N'1', N'0', N'4', N'5', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-A-3', N'1', N'2', N'1', N'0', N'4', N'4', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-A-4', N'1', N'2', N'1', N'0', N'4', N'5', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-B-1', N'1', N'2', N'1', N'0', N'4', N'4', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-B-2', N'1', N'2', N'1', N'0', N'4', N'5', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-B-3', N'1', N'2', N'1', N'0', N'4', N'4', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-B-4', N'1', N'2', N'1', N'0', N'4', N'5', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-C-1', N'1', N'2', N'1', N'0', N'4', N'4', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-C-2', N'1', N'2', N'1', N'0', N'4', N'5', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-C-3', N'1', N'2', N'1', N'0', N'4', N'4', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-C-4', N'1', N'2', N'1', N'0', N'4', N'5', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-D-1', N'1', N'2', N'1', N'0', N'4', N'4', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-D-2', N'1', N'2', N'1', N'0', N'4', N'5', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-D-3', N'1', N'2', N'1', N'0', N'4', N'4', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-06-D-4', N'1', N'2', N'1', N'0', N'4', N'5', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-A-1', N'1', N'2', N'1', N'0', N'3', N'6', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-A-2', N'1', N'2', N'1', N'0', N'3', N'7', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-A-3', N'1', N'2', N'1', N'0', N'3', N'6', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-A-4', N'1', N'2', N'1', N'0', N'3', N'7', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-B-1', N'1', N'2', N'1', N'0', N'3', N'6', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-B-2', N'1', N'2', N'1', N'0', N'3', N'7', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-B-3', N'1', N'2', N'1', N'0', N'3', N'6', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-B-4', N'1', N'2', N'1', N'0', N'3', N'7', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-C-1', N'1', N'2', N'1', N'0', N'3', N'6', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-C-2', N'1', N'2', N'1', N'0', N'3', N'7', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-C-3', N'1', N'2', N'1', N'0', N'3', N'6', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-C-4', N'1', N'2', N'1', N'0', N'3', N'7', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-D-1', N'1', N'2', N'1', N'0', N'3', N'6', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-D-2', N'1', N'2', N'1', N'0', N'3', N'7', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-D-3', N'1', N'2', N'1', N'0', N'3', N'6', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-07-D-4', N'1', N'2', N'1', N'0', N'3', N'7', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-A-1', N'1', N'2', N'1', N'0', N'4', N'6', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-A-2', N'1', N'2', N'1', N'0', N'4', N'7', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-A-3', N'1', N'2', N'1', N'0', N'4', N'6', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-A-4', N'1', N'2', N'1', N'0', N'4', N'7', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-B-1', N'1', N'2', N'1', N'0', N'4', N'6', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-B-2', N'1', N'2', N'1', N'0', N'4', N'7', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-B-3', N'1', N'2', N'1', N'0', N'4', N'6', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-B-4', N'1', N'2', N'1', N'0', N'4', N'7', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-C-1', N'1', N'2', N'1', N'0', N'4', N'6', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-C-2', N'1', N'2', N'1', N'0', N'4', N'7', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-C-3', N'1', N'2', N'1', N'0', N'4', N'6', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-C-4', N'1', N'2', N'1', N'0', N'4', N'7', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-D-1', N'1', N'2', N'1', N'0', N'4', N'6', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-D-2', N'1', N'2', N'1', N'0', N'4', N'7', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-D-3', N'1', N'2', N'1', N'0', N'4', N'6', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-08-D-4', N'1', N'2', N'1', N'0', N'4', N'7', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-A-1', N'1', N'2', N'1', N'0', N'3', N'8', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-A-2', N'1', N'2', N'1', N'0', N'3', N'9', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-A-3', N'1', N'2', N'1', N'0', N'3', N'8', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-A-4', N'1', N'2', N'1', N'0', N'3', N'9', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-B-1', N'1', N'2', N'1', N'0', N'3', N'8', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-B-2', N'1', N'2', N'1', N'0', N'3', N'9', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-B-3', N'1', N'2', N'1', N'0', N'3', N'8', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-B-4', N'1', N'2', N'1', N'0', N'3', N'9', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-C-1', N'1', N'2', N'1', N'0', N'3', N'8', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-C-2', N'1', N'2', N'1', N'0', N'3', N'9', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-C-3', N'1', N'2', N'1', N'0', N'3', N'8', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-C-4', N'1', N'2', N'1', N'0', N'3', N'9', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-D-1', N'1', N'2', N'1', N'0', N'3', N'8', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-D-2', N'1', N'2', N'1', N'0', N'3', N'9', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-D-3', N'1', N'2', N'1', N'0', N'3', N'8', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-09-D-4', N'1', N'2', N'1', N'0', N'3', N'9', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-A-1', N'1', N'2', N'1', N'0', N'4', N'8', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-A-2', N'1', N'2', N'1', N'0', N'4', N'9', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-A-3', N'1', N'2', N'1', N'0', N'4', N'8', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-A-4', N'1', N'2', N'1', N'0', N'4', N'9', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-B-1', N'1', N'2', N'1', N'0', N'4', N'8', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-B-2', N'1', N'2', N'1', N'0', N'4', N'9', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-B-3', N'1', N'2', N'1', N'0', N'4', N'8', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-B-4', N'1', N'2', N'1', N'0', N'4', N'9', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-C-1', N'1', N'2', N'1', N'0', N'4', N'8', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-C-2', N'1', N'2', N'1', N'0', N'4', N'9', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-C-3', N'1', N'2', N'1', N'0', N'4', N'8', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-C-4', N'1', N'2', N'1', N'0', N'4', N'9', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-D-1', N'1', N'2', N'1', N'0', N'4', N'8', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-D-2', N'1', N'2', N'1', N'0', N'4', N'9', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-D-3', N'1', N'2', N'1', N'0', N'4', N'8', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-10-D-4', N'1', N'2', N'1', N'0', N'4', N'9', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-A-1', N'1', N'2', N'1', N'0', N'3', N'10', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-A-2', N'1', N'2', N'1', N'0', N'3', N'11', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-A-3', N'1', N'2', N'1', N'0', N'3', N'10', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-A-4', N'1', N'2', N'1', N'0', N'3', N'11', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-B-1', N'1', N'2', N'1', N'0', N'3', N'10', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-B-2', N'1', N'2', N'1', N'0', N'3', N'11', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-B-3', N'1', N'2', N'1', N'0', N'3', N'10', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-B-4', N'1', N'2', N'1', N'0', N'3', N'11', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-C-1', N'1', N'2', N'1', N'0', N'3', N'10', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-C-2', N'1', N'2', N'1', N'0', N'3', N'11', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-C-3', N'1', N'2', N'1', N'0', N'3', N'10', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-C-4', N'1', N'2', N'1', N'0', N'3', N'11', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-D-1', N'1', N'2', N'1', N'0', N'3', N'10', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-D-2', N'1', N'2', N'1', N'0', N'3', N'11', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-D-3', N'1', N'2', N'1', N'0', N'3', N'10', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-11-D-4', N'1', N'2', N'1', N'0', N'3', N'11', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-A-1', N'1', N'2', N'1', N'0', N'4', N'10', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-A-2', N'1', N'2', N'1', N'0', N'4', N'11', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-A-3', N'1', N'2', N'1', N'0', N'4', N'10', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-A-4', N'1', N'2', N'1', N'0', N'4', N'11', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-B-1', N'1', N'2', N'1', N'0', N'4', N'10', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-B-2', N'1', N'2', N'1', N'0', N'4', N'11', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-B-3', N'1', N'2', N'1', N'0', N'4', N'10', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-B-4', N'1', N'2', N'1', N'0', N'4', N'11', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-C-1', N'1', N'2', N'1', N'0', N'4', N'10', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-C-2', N'1', N'2', N'1', N'0', N'4', N'11', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-C-3', N'1', N'2', N'1', N'0', N'4', N'10', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-C-4', N'1', N'2', N'1', N'0', N'4', N'11', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-D-1', N'1', N'2', N'1', N'0', N'4', N'10', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-D-2', N'1', N'2', N'1', N'0', N'4', N'11', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-D-3', N'1', N'2', N'1', N'0', N'4', N'10', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-12-D-4', N'1', N'2', N'1', N'0', N'4', N'11', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-A-1', N'1', N'2', N'1', N'0', N'3', N'12', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-A-2', N'1', N'2', N'1', N'0', N'3', N'13', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-A-3', N'1', N'2', N'1', N'0', N'3', N'12', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-A-4', N'1', N'2', N'1', N'0', N'3', N'13', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-B-1', N'1', N'2', N'1', N'0', N'3', N'12', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-B-2', N'1', N'2', N'1', N'0', N'3', N'13', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-B-3', N'1', N'2', N'1', N'0', N'3', N'12', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-B-4', N'1', N'2', N'1', N'0', N'3', N'13', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-C-1', N'1', N'2', N'1', N'0', N'3', N'12', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-C-2', N'1', N'2', N'1', N'0', N'3', N'13', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-C-3', N'1', N'2', N'1', N'0', N'3', N'12', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-C-4', N'1', N'2', N'1', N'0', N'3', N'13', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-D-1', N'1', N'2', N'1', N'0', N'3', N'12', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-D-2', N'1', N'2', N'1', N'0', N'3', N'13', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-D-3', N'1', N'2', N'1', N'0', N'3', N'12', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-13-D-4', N'1', N'2', N'1', N'0', N'3', N'13', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-A-1', N'1', N'2', N'1', N'0', N'4', N'12', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-A-2', N'1', N'2', N'1', N'0', N'4', N'13', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-A-3', N'1', N'2', N'1', N'0', N'4', N'12', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-A-4', N'1', N'2', N'1', N'0', N'4', N'13', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-B-1', N'1', N'2', N'1', N'0', N'4', N'12', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-B-2', N'1', N'2', N'1', N'0', N'4', N'13', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-B-3', N'1', N'2', N'1', N'0', N'4', N'12', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-B-4', N'1', N'2', N'1', N'0', N'4', N'13', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-C-1', N'1', N'2', N'1', N'0', N'4', N'12', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-C-2', N'1', N'2', N'1', N'0', N'4', N'13', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-C-3', N'1', N'2', N'1', N'0', N'4', N'12', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-C-4', N'1', N'2', N'1', N'0', N'4', N'13', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-D-1', N'1', N'2', N'1', N'0', N'4', N'12', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-D-2', N'1', N'2', N'1', N'0', N'4', N'13', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-D-3', N'1', N'2', N'1', N'0', N'4', N'12', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-14-D-4', N'1', N'2', N'1', N'0', N'4', N'13', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-A-1', N'1', N'2', N'1', N'0', N'3', N'14', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-A-2', N'1', N'2', N'1', N'0', N'3', N'15', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-A-3', N'1', N'2', N'1', N'0', N'3', N'14', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-A-4', N'1', N'2', N'1', N'0', N'3', N'15', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-B-1', N'1', N'2', N'1', N'0', N'3', N'14', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-B-2', N'1', N'2', N'1', N'0', N'3', N'15', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-B-3', N'1', N'2', N'1', N'0', N'3', N'14', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-B-4', N'1', N'2', N'1', N'0', N'3', N'15', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-C-1', N'1', N'2', N'1', N'0', N'3', N'14', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-C-2', N'1', N'2', N'1', N'0', N'3', N'15', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-C-3', N'1', N'2', N'1', N'0', N'3', N'14', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-C-4', N'1', N'2', N'1', N'0', N'3', N'15', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-D-1', N'1', N'2', N'1', N'0', N'3', N'14', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-D-2', N'1', N'2', N'1', N'0', N'3', N'15', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-D-3', N'1', N'2', N'1', N'0', N'3', N'14', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-15-D-4', N'1', N'2', N'1', N'0', N'3', N'15', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-A-1', N'1', N'2', N'1', N'0', N'4', N'14', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-A-2', N'1', N'2', N'1', N'0', N'4', N'15', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-A-3', N'1', N'2', N'1', N'0', N'4', N'14', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-A-4', N'1', N'2', N'1', N'0', N'4', N'15', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-B-1', N'1', N'2', N'1', N'0', N'4', N'14', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-B-2', N'1', N'2', N'1', N'0', N'4', N'15', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-B-3', N'1', N'2', N'1', N'0', N'4', N'14', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-B-4', N'1', N'2', N'1', N'0', N'4', N'15', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-C-1', N'1', N'2', N'1', N'0', N'4', N'14', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-C-2', N'1', N'2', N'1', N'0', N'4', N'15', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-C-3', N'1', N'2', N'1', N'0', N'4', N'14', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-C-4', N'1', N'2', N'1', N'0', N'4', N'15', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-D-1', N'1', N'2', N'1', N'0', N'4', N'14', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-D-2', N'1', N'2', N'1', N'0', N'4', N'15', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-D-3', N'1', N'2', N'1', N'0', N'4', N'14', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-16-D-4', N'1', N'2', N'1', N'0', N'4', N'15', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-A-1', N'1', N'2', N'1', N'0', N'3', N'16', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-A-2', N'1', N'2', N'1', N'0', N'3', N'17', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-A-3', N'1', N'2', N'1', N'0', N'3', N'16', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-A-4', N'1', N'2', N'1', N'0', N'3', N'17', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-B-1', N'1', N'2', N'1', N'0', N'3', N'16', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-B-2', N'1', N'2', N'1', N'0', N'3', N'17', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-B-3', N'1', N'2', N'1', N'0', N'3', N'16', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-B-4', N'1', N'2', N'1', N'0', N'3', N'17', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-C-1', N'1', N'2', N'1', N'0', N'3', N'16', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-C-2', N'1', N'2', N'1', N'0', N'3', N'17', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-C-3', N'1', N'2', N'1', N'0', N'3', N'16', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-C-4', N'1', N'2', N'1', N'0', N'3', N'17', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-D-1', N'1', N'2', N'1', N'0', N'3', N'16', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-D-2', N'1', N'2', N'1', N'0', N'3', N'17', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-D-3', N'1', N'2', N'1', N'0', N'3', N'16', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-17-D-4', N'1', N'2', N'1', N'0', N'3', N'17', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-A-1', N'1', N'2', N'1', N'0', N'4', N'16', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-A-2', N'1', N'2', N'1', N'0', N'4', N'17', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-A-3', N'1', N'2', N'1', N'0', N'4', N'16', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-A-4', N'1', N'2', N'1', N'0', N'4', N'17', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-B-1', N'1', N'2', N'1', N'0', N'4', N'16', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-B-2', N'1', N'2', N'1', N'0', N'4', N'17', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-B-3', N'1', N'2', N'1', N'0', N'4', N'16', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-B-4', N'1', N'2', N'1', N'0', N'4', N'17', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-C-1', N'1', N'2', N'1', N'0', N'4', N'16', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-C-2', N'1', N'2', N'1', N'0', N'4', N'17', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-C-3', N'1', N'2', N'1', N'0', N'4', N'16', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-C-4', N'1', N'2', N'1', N'0', N'4', N'17', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-D-1', N'1', N'2', N'1', N'0', N'4', N'16', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-D-2', N'1', N'2', N'1', N'0', N'4', N'17', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-D-3', N'1', N'2', N'1', N'0', N'4', N'16', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-18-D-4', N'1', N'2', N'1', N'0', N'4', N'17', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-A-1', N'1', N'2', N'1', N'0', N'3', N'18', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-A-2', N'1', N'2', N'1', N'0', N'3', N'19', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-A-3', N'1', N'2', N'1', N'0', N'3', N'18', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-A-4', N'1', N'2', N'1', N'0', N'3', N'19', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-B-1', N'1', N'2', N'1', N'0', N'3', N'18', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-B-2', N'1', N'2', N'1', N'0', N'3', N'19', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-B-3', N'1', N'2', N'1', N'0', N'3', N'18', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-B-4', N'1', N'2', N'1', N'0', N'3', N'19', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-C-1', N'1', N'2', N'1', N'0', N'3', N'18', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-C-2', N'1', N'2', N'1', N'0', N'3', N'19', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-C-3', N'1', N'2', N'1', N'0', N'3', N'18', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-C-4', N'1', N'2', N'1', N'0', N'3', N'19', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-D-1', N'1', N'2', N'1', N'0', N'3', N'18', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-D-2', N'1', N'2', N'1', N'0', N'3', N'19', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-D-3', N'1', N'2', N'1', N'0', N'3', N'18', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-19-D-4', N'1', N'2', N'1', N'0', N'3', N'19', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-A-1', N'1', N'2', N'1', N'0', N'4', N'18', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-A-2', N'1', N'2', N'1', N'0', N'4', N'19', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-A-3', N'1', N'2', N'1', N'0', N'4', N'18', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-A-4', N'1', N'2', N'1', N'0', N'4', N'19', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-B-1', N'1', N'2', N'1', N'0', N'4', N'18', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-B-2', N'1', N'2', N'1', N'0', N'4', N'19', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-B-3', N'1', N'2', N'1', N'0', N'4', N'18', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-B-4', N'1', N'2', N'1', N'0', N'4', N'19', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-C-1', N'1', N'2', N'1', N'0', N'4', N'18', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-C-2', N'1', N'2', N'1', N'0', N'4', N'19', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-C-3', N'1', N'2', N'1', N'0', N'4', N'18', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-C-4', N'1', N'2', N'1', N'0', N'4', N'19', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-D-1', N'1', N'2', N'1', N'0', N'4', N'18', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-D-2', N'1', N'2', N'1', N'0', N'4', N'19', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-D-3', N'1', N'2', N'1', N'0', N'4', N'18', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-20-D-4', N'1', N'2', N'1', N'0', N'4', N'19', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-A-1', N'1', N'2', N'1', N'0', N'3', N'20', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-A-2', N'1', N'2', N'1', N'0', N'3', N'21', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-A-3', N'1', N'2', N'1', N'0', N'3', N'20', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-A-4', N'1', N'2', N'1', N'0', N'3', N'21', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-B-1', N'1', N'2', N'1', N'0', N'3', N'20', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-B-2', N'1', N'2', N'1', N'0', N'3', N'21', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-B-3', N'1', N'2', N'1', N'0', N'3', N'20', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-B-4', N'1', N'2', N'1', N'0', N'3', N'21', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-C-1', N'1', N'2', N'1', N'0', N'3', N'20', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-C-2', N'1', N'2', N'1', N'0', N'3', N'21', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-C-3', N'1', N'2', N'1', N'0', N'3', N'20', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-C-4', N'1', N'2', N'1', N'0', N'3', N'21', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-D-1', N'1', N'2', N'1', N'0', N'3', N'20', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-D-2', N'1', N'2', N'1', N'0', N'3', N'21', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-D-3', N'1', N'2', N'1', N'0', N'3', N'20', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-21-D-4', N'1', N'2', N'1', N'0', N'3', N'21', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-A-1', N'1', N'2', N'1', N'0', N'4', N'20', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-A-2', N'1', N'2', N'1', N'0', N'4', N'21', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-A-3', N'1', N'2', N'1', N'0', N'4', N'20', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-A-4', N'1', N'2', N'1', N'0', N'4', N'21', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-B-1', N'1', N'2', N'1', N'0', N'4', N'20', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-B-2', N'1', N'2', N'1', N'0', N'4', N'21', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-B-3', N'1', N'2', N'1', N'0', N'4', N'20', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-B-4', N'1', N'2', N'1', N'0', N'4', N'21', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-C-1', N'1', N'2', N'1', N'0', N'4', N'20', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-C-2', N'1', N'2', N'1', N'0', N'4', N'21', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-C-3', N'1', N'2', N'1', N'0', N'4', N'20', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-C-4', N'1', N'2', N'1', N'0', N'4', N'21', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-D-1', N'1', N'2', N'1', N'0', N'4', N'20', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-D-2', N'1', N'2', N'1', N'0', N'4', N'21', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-D-3', N'1', N'2', N'1', N'0', N'4', N'20', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-22-D-4', N'1', N'2', N'1', N'0', N'4', N'21', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-A-1', N'1', N'2', N'1', N'0', N'3', N'22', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-A-2', N'1', N'2', N'1', N'0', N'3', N'23', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-A-3', N'1', N'2', N'1', N'0', N'3', N'22', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-A-4', N'1', N'2', N'1', N'0', N'3', N'23', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-B-1', N'1', N'2', N'1', N'0', N'3', N'22', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-B-2', N'1', N'2', N'1', N'0', N'3', N'23', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-B-3', N'1', N'2', N'1', N'0', N'3', N'22', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-B-4', N'1', N'2', N'1', N'0', N'3', N'23', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-C-1', N'1', N'2', N'1', N'0', N'3', N'22', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-C-2', N'1', N'2', N'1', N'0', N'3', N'23', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-C-3', N'1', N'2', N'1', N'0', N'3', N'22', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-C-4', N'1', N'2', N'1', N'0', N'3', N'23', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-D-1', N'1', N'2', N'1', N'0', N'3', N'22', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-D-2', N'1', N'2', N'1', N'0', N'3', N'23', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-D-3', N'1', N'2', N'1', N'0', N'3', N'22', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-23-D-4', N'1', N'2', N'1', N'0', N'3', N'23', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-A-1', N'1', N'2', N'1', N'0', N'4', N'22', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-A-2', N'1', N'2', N'1', N'0', N'4', N'23', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-A-3', N'1', N'2', N'1', N'0', N'4', N'22', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-A-4', N'1', N'2', N'1', N'0', N'4', N'23', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-B-1', N'1', N'2', N'1', N'0', N'4', N'22', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-B-2', N'1', N'2', N'1', N'0', N'4', N'23', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-B-3', N'1', N'2', N'1', N'0', N'4', N'22', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-B-4', N'1', N'2', N'1', N'0', N'4', N'23', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-C-1', N'1', N'2', N'1', N'0', N'4', N'22', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-C-2', N'1', N'2', N'1', N'0', N'4', N'23', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-C-3', N'1', N'2', N'1', N'0', N'4', N'22', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-C-4', N'1', N'2', N'1', N'0', N'4', N'23', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-D-1', N'1', N'2', N'1', N'0', N'4', N'22', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-D-2', N'1', N'2', N'1', N'0', N'4', N'23', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-D-3', N'1', N'2', N'1', N'0', N'4', N'22', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-24-D-4', N'1', N'2', N'1', N'0', N'4', N'23', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-A-1', N'1', N'2', N'1', N'0', N'3', N'24', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-A-2', N'1', N'2', N'1', N'0', N'3', N'25', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-A-3', N'1', N'2', N'1', N'0', N'3', N'24', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-A-4', N'1', N'2', N'1', N'0', N'3', N'25', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-B-1', N'1', N'2', N'1', N'0', N'3', N'24', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-B-2', N'1', N'2', N'1', N'0', N'3', N'25', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-B-3', N'1', N'2', N'1', N'0', N'3', N'24', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-B-4', N'1', N'2', N'1', N'0', N'3', N'25', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-C-1', N'1', N'2', N'1', N'0', N'3', N'24', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-C-2', N'1', N'2', N'1', N'0', N'3', N'25', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-C-3', N'1', N'2', N'1', N'0', N'3', N'24', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-C-4', N'1', N'2', N'1', N'0', N'3', N'25', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-D-1', N'1', N'2', N'1', N'0', N'3', N'24', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-D-2', N'1', N'2', N'1', N'0', N'3', N'25', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-D-3', N'1', N'2', N'1', N'0', N'3', N'24', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-25-D-4', N'1', N'2', N'1', N'0', N'3', N'25', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-A-1', N'1', N'2', N'1', N'0', N'4', N'24', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-A-2', N'1', N'2', N'1', N'0', N'4', N'25', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-A-3', N'1', N'2', N'1', N'0', N'4', N'24', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-A-4', N'1', N'2', N'1', N'0', N'4', N'25', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-B-1', N'1', N'2', N'1', N'0', N'4', N'24', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-B-2', N'1', N'2', N'1', N'0', N'4', N'25', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-B-3', N'1', N'2', N'1', N'0', N'4', N'24', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-B-4', N'1', N'2', N'1', N'0', N'4', N'25', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-C-1', N'1', N'2', N'1', N'0', N'4', N'24', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-C-2', N'1', N'2', N'1', N'0', N'4', N'25', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-C-3', N'1', N'2', N'1', N'0', N'4', N'24', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-C-4', N'1', N'2', N'1', N'0', N'4', N'25', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-D-1', N'1', N'2', N'1', N'0', N'4', N'24', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-D-2', N'1', N'2', N'1', N'0', N'4', N'25', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-D-3', N'1', N'2', N'1', N'0', N'4', N'24', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-26-D-4', N'1', N'2', N'1', N'0', N'4', N'25', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-A-1', N'1', N'2', N'1', N'0', N'3', N'26', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-A-2', N'1', N'2', N'1', N'0', N'3', N'27', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-A-3', N'1', N'2', N'1', N'0', N'3', N'26', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-A-4', N'1', N'2', N'1', N'0', N'3', N'27', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-B-1', N'1', N'2', N'1', N'0', N'3', N'26', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-B-2', N'1', N'2', N'1', N'0', N'3', N'27', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-B-3', N'1', N'2', N'1', N'0', N'3', N'26', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-B-4', N'1', N'2', N'1', N'0', N'3', N'27', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-C-1', N'1', N'2', N'1', N'0', N'3', N'26', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-C-2', N'1', N'2', N'1', N'0', N'3', N'27', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-C-3', N'1', N'2', N'1', N'0', N'3', N'26', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-C-4', N'1', N'2', N'1', N'0', N'3', N'27', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-D-1', N'1', N'2', N'1', N'0', N'3', N'26', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-D-2', N'1', N'2', N'1', N'0', N'3', N'27', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-D-3', N'1', N'2', N'1', N'0', N'3', N'26', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-27-D-4', N'1', N'2', N'1', N'0', N'3', N'27', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-A-1', N'1', N'2', N'1', N'0', N'4', N'26', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-A-2', N'1', N'2', N'1', N'0', N'4', N'27', N'1', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-A-3', N'1', N'2', N'1', N'0', N'4', N'26', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-A-4', N'1', N'2', N'1', N'0', N'4', N'27', N'1', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-B-1', N'1', N'2', N'1', N'0', N'4', N'26', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-B-2', N'1', N'2', N'1', N'0', N'4', N'27', N'2', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-B-3', N'1', N'2', N'1', N'0', N'4', N'26', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-B-4', N'1', N'2', N'1', N'0', N'4', N'27', N'2', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-C-1', N'1', N'2', N'1', N'0', N'4', N'26', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-C-2', N'1', N'2', N'1', N'0', N'4', N'27', N'3', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-C-3', N'1', N'2', N'1', N'0', N'4', N'26', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-C-4', N'1', N'2', N'1', N'0', N'4', N'27', N'3', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-D-1', N'1', N'2', N'1', N'0', N'4', N'26', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-D-2', N'1', N'2', N'1', N'0', N'4', N'27', N'4', N'2', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-D-3', N'1', N'2', N'1', N'0', N'4', N'26', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-02-28-D-4', N'1', N'2', N'1', N'0', N'4', N'27', N'4', N'1', N'0', N'0', NULL, N'A') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-01-C-2', N'1', N'3', N'1', N'0', N'5', N'1', N'3', N'2', N'0', N'0', N'66115261', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-01-C-4', N'1', N'3', N'1', N'0', N'5', N'1', N'3', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-01-D-2', N'1', N'3', N'1', N'0', N'5', N'1', N'4', N'2', N'0', N'0', N'T0000001', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-01-D-4', N'1', N'3', N'1', N'0', N'5', N'1', N'4', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-02-C-2', N'1', N'3', N'1', N'0', N'6', N'1', N'3', N'2', N'0', N'0', N'旁边的(暂时用于标记)', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-02-C-4', N'1', N'3', N'1', N'0', N'6', N'1', N'3', N'1', N'0', N'0', N'旁边的(暂时用于标记)', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-02-D-2', N'1', N'3', N'1', N'0', N'6', N'1', N'4', N'2', N'0', N'0', N'旁边的(暂时用于标记)', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-02-D-4', N'1', N'3', N'1', N'0', N'6', N'1', N'4', N'1', N'0', N'0', N'旁边的(暂时用于标记)', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-A-1', N'1', N'3', N'1', N'0', N'5', N'2', N'1', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-A-2', N'1', N'3', N'1', N'0', N'5', N'3', N'1', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-A-3', N'1', N'3', N'1', N'0', N'5', N'2', N'1', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-A-4', N'1', N'3', N'1', N'0', N'5', N'3', N'1', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-B-1', N'1', N'3', N'1', N'0', N'5', N'2', N'2', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-B-2', N'1', N'3', N'1', N'0', N'5', N'3', N'2', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-B-3', N'1', N'3', N'1', N'0', N'5', N'2', N'2', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-B-4', N'1', N'3', N'1', N'0', N'5', N'3', N'2', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-C-1', N'1', N'3', N'1', N'0', N'5', N'2', N'3', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-C-2', N'1', N'3', N'1', N'0', N'5', N'3', N'3', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-C-3', N'1', N'3', N'1', N'0', N'5', N'2', N'3', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-C-4', N'1', N'3', N'1', N'0', N'5', N'3', N'3', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-D-1', N'1', N'3', N'1', N'0', N'5', N'2', N'4', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-D-2', N'1', N'3', N'1', N'0', N'5', N'3', N'4', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-D-3', N'1', N'3', N'1', N'0', N'5', N'2', N'4', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-03-D-4', N'1', N'3', N'1', N'0', N'5', N'3', N'4', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-A-1', N'1', N'3', N'1', N'0', N'6', N'2', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-A-2', N'1', N'3', N'1', N'0', N'6', N'3', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-A-3', N'1', N'3', N'1', N'0', N'6', N'2', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-A-4', N'1', N'3', N'1', N'0', N'6', N'3', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-B-1', N'1', N'3', N'1', N'0', N'6', N'2', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-B-2', N'1', N'3', N'1', N'0', N'6', N'3', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-B-3', N'1', N'3', N'1', N'0', N'6', N'2', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-B-4', N'1', N'3', N'1', N'0', N'6', N'3', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-C-1', N'1', N'3', N'1', N'0', N'6', N'2', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-C-2', N'1', N'3', N'1', N'0', N'6', N'3', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-C-3', N'1', N'3', N'1', N'0', N'6', N'2', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-C-4', N'1', N'3', N'1', N'0', N'6', N'3', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-D-1', N'1', N'3', N'1', N'0', N'6', N'2', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-D-2', N'1', N'3', N'1', N'0', N'6', N'3', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-D-3', N'1', N'3', N'1', N'0', N'6', N'2', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-04-D-4', N'1', N'3', N'1', N'0', N'6', N'3', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-A-1', N'1', N'3', N'1', N'0', N'5', N'4', N'1', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-A-2', N'1', N'3', N'1', N'0', N'5', N'5', N'1', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-A-3', N'1', N'3', N'1', N'0', N'5', N'4', N'1', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-A-4', N'1', N'3', N'1', N'0', N'5', N'5', N'1', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-B-1', N'1', N'3', N'1', N'0', N'5', N'4', N'2', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-B-2', N'1', N'3', N'1', N'0', N'5', N'5', N'2', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-B-3', N'1', N'3', N'1', N'0', N'5', N'4', N'2', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-B-4', N'1', N'3', N'1', N'0', N'5', N'5', N'2', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-C-1', N'1', N'3', N'1', N'0', N'5', N'4', N'3', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-C-2', N'1', N'3', N'1', N'0', N'5', N'5', N'3', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-C-3', N'1', N'3', N'1', N'0', N'5', N'4', N'3', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-C-4', N'1', N'3', N'1', N'0', N'5', N'5', N'3', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-D-1', N'1', N'3', N'1', N'0', N'5', N'4', N'4', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-D-2', N'1', N'3', N'1', N'0', N'5', N'5', N'4', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-D-3', N'1', N'3', N'1', N'0', N'5', N'4', N'4', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-05-D-4', N'1', N'3', N'1', N'0', N'5', N'5', N'4', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-A-1', N'1', N'3', N'1', N'0', N'6', N'4', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-A-2', N'1', N'3', N'1', N'0', N'6', N'5', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-A-3', N'1', N'3', N'1', N'0', N'6', N'4', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-A-4', N'1', N'3', N'1', N'0', N'6', N'5', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-B-1', N'1', N'3', N'1', N'0', N'6', N'4', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-B-2', N'1', N'3', N'1', N'0', N'6', N'5', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-B-3', N'1', N'3', N'1', N'0', N'6', N'4', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-B-4', N'1', N'3', N'1', N'0', N'6', N'5', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-C-1', N'1', N'3', N'1', N'0', N'6', N'4', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-C-2', N'1', N'3', N'1', N'0', N'6', N'5', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-C-3', N'1', N'3', N'1', N'0', N'6', N'4', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-C-4', N'1', N'3', N'1', N'0', N'6', N'5', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-D-1', N'1', N'3', N'1', N'0', N'6', N'4', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-D-2', N'1', N'3', N'1', N'0', N'6', N'5', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-D-3', N'1', N'3', N'1', N'0', N'6', N'4', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-06-D-4', N'1', N'3', N'1', N'0', N'6', N'5', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-A-1', N'1', N'3', N'1', N'0', N'5', N'6', N'1', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-A-2', N'1', N'3', N'1', N'0', N'5', N'7', N'1', N'2', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-A-3', N'1', N'3', N'1', N'0', N'5', N'6', N'1', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-A-4', N'1', N'3', N'1', N'0', N'5', N'7', N'1', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-B-1', N'1', N'3', N'1', N'0', N'5', N'6', N'2', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-B-2', N'1', N'3', N'1', N'0', N'5', N'7', N'2', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-B-3', N'1', N'3', N'1', N'0', N'5', N'6', N'2', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-B-4', N'1', N'3', N'1', N'0', N'5', N'7', N'2', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-C-1', N'1', N'3', N'1', N'0', N'5', N'6', N'3', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-C-2', N'1', N'3', N'1', N'0', N'5', N'7', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-C-3', N'1', N'3', N'1', N'0', N'5', N'6', N'3', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-C-4', N'1', N'3', N'1', N'0', N'5', N'7', N'3', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-D-1', N'1', N'3', N'1', N'0', N'5', N'6', N'4', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-D-2', N'1', N'3', N'1', N'0', N'5', N'7', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-D-3', N'1', N'3', N'1', N'0', N'5', N'6', N'4', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-07-D-4', N'1', N'3', N'1', N'0', N'5', N'7', N'4', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-A-1', N'1', N'3', N'1', N'0', N'6', N'6', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-A-2', N'1', N'3', N'1', N'0', N'6', N'7', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-A-3', N'1', N'3', N'1', N'0', N'6', N'6', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-A-4', N'1', N'3', N'1', N'0', N'6', N'7', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-B-1', N'1', N'3', N'1', N'0', N'6', N'6', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-B-2', N'1', N'3', N'1', N'0', N'6', N'7', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-B-3', N'1', N'3', N'1', N'0', N'6', N'6', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-B-4', N'1', N'3', N'1', N'0', N'6', N'7', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-C-1', N'1', N'3', N'1', N'0', N'6', N'6', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-C-2', N'1', N'3', N'1', N'0', N'6', N'7', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-C-3', N'1', N'3', N'1', N'0', N'6', N'6', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-C-4', N'1', N'3', N'1', N'0', N'6', N'7', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-D-1', N'1', N'3', N'1', N'0', N'6', N'6', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-D-2', N'1', N'3', N'1', N'0', N'6', N'7', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-D-3', N'1', N'3', N'1', N'0', N'6', N'6', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-08-D-4', N'1', N'3', N'1', N'0', N'6', N'7', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-A-1', N'1', N'3', N'1', N'0', N'5', N'8', N'1', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-A-2', N'1', N'3', N'1', N'0', N'5', N'9', N'1', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-A-3', N'1', N'3', N'1', N'0', N'5', N'8', N'1', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-A-4', N'1', N'3', N'1', N'0', N'5', N'9', N'1', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-B-1', N'1', N'3', N'1', N'0', N'5', N'8', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-B-2', N'1', N'3', N'1', N'0', N'5', N'9', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-B-3', N'1', N'3', N'1', N'0', N'5', N'8', N'2', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-B-4', N'1', N'3', N'1', N'0', N'5', N'9', N'2', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-C-1', N'1', N'3', N'1', N'0', N'5', N'8', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-C-2', N'1', N'3', N'1', N'0', N'5', N'9', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-C-3', N'1', N'3', N'1', N'0', N'5', N'8', N'3', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-C-4', N'1', N'3', N'1', N'0', N'5', N'9', N'3', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-D-1', N'1', N'3', N'1', N'0', N'5', N'8', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-D-2', N'1', N'3', N'1', N'0', N'5', N'9', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-D-3', N'1', N'3', N'1', N'0', N'5', N'8', N'4', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-09-D-4', N'1', N'3', N'1', N'0', N'5', N'9', N'4', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-A-1', N'1', N'3', N'1', N'0', N'6', N'8', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-A-2', N'1', N'3', N'1', N'0', N'6', N'9', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-A-3', N'1', N'3', N'1', N'0', N'6', N'8', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-A-4', N'1', N'3', N'1', N'0', N'6', N'9', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-B-1', N'1', N'3', N'1', N'0', N'6', N'8', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-B-2', N'1', N'3', N'1', N'0', N'6', N'9', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-B-3', N'1', N'3', N'1', N'0', N'6', N'8', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-B-4', N'1', N'3', N'1', N'0', N'6', N'9', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-C-1', N'1', N'3', N'1', N'0', N'6', N'8', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-C-2', N'1', N'3', N'1', N'0', N'6', N'9', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-C-3', N'1', N'3', N'1', N'0', N'6', N'8', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-C-4', N'1', N'3', N'1', N'0', N'6', N'9', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-D-1', N'1', N'3', N'1', N'0', N'6', N'8', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-D-2', N'1', N'3', N'1', N'0', N'6', N'9', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-D-3', N'1', N'3', N'1', N'0', N'6', N'8', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-10-D-4', N'1', N'3', N'1', N'0', N'6', N'9', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-A-1', N'1', N'3', N'1', N'0', N'5', N'10', N'1', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-A-2', N'1', N'3', N'1', N'0', N'5', N'11', N'1', N'2', N'0', N'0', N'D100000021', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-A-3', N'1', N'3', N'1', N'0', N'5', N'10', N'1', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-A-4', N'1', N'3', N'1', N'0', N'5', N'11', N'1', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-B-1', N'1', N'3', N'1', N'0', N'5', N'10', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-B-2', N'1', N'3', N'1', N'0', N'5', N'11', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-B-3', N'1', N'3', N'1', N'0', N'5', N'10', N'2', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-B-4', N'1', N'3', N'1', N'0', N'5', N'11', N'2', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-C-1', N'1', N'3', N'1', N'0', N'5', N'10', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-C-2', N'1', N'3', N'1', N'0', N'5', N'11', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-C-3', N'1', N'3', N'1', N'0', N'5', N'10', N'3', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-C-4', N'1', N'3', N'1', N'0', N'5', N'11', N'3', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-D-1', N'1', N'3', N'1', N'0', N'5', N'10', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-D-2', N'1', N'3', N'1', N'0', N'5', N'11', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-D-3', N'1', N'3', N'1', N'0', N'5', N'10', N'4', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-11-D-4', N'1', N'3', N'1', N'0', N'5', N'11', N'4', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-A-1', N'1', N'3', N'1', N'0', N'6', N'10', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-A-2', N'1', N'3', N'1', N'0', N'6', N'11', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-A-3', N'1', N'3', N'1', N'0', N'6', N'10', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-A-4', N'1', N'3', N'1', N'0', N'6', N'11', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-B-1', N'1', N'3', N'1', N'0', N'6', N'10', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-B-2', N'1', N'3', N'1', N'0', N'6', N'11', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-B-3', N'1', N'3', N'1', N'0', N'6', N'10', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-B-4', N'1', N'3', N'1', N'0', N'6', N'11', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-C-1', N'1', N'3', N'1', N'0', N'6', N'10', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-C-2', N'1', N'3', N'1', N'0', N'6', N'11', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-C-3', N'1', N'3', N'1', N'0', N'6', N'10', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-C-4', N'1', N'3', N'1', N'0', N'6', N'11', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-D-1', N'1', N'3', N'1', N'0', N'6', N'10', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-D-2', N'1', N'3', N'1', N'0', N'6', N'11', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-D-3', N'1', N'3', N'1', N'0', N'6', N'10', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-12-D-4', N'1', N'3', N'1', N'0', N'6', N'11', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-A-1', N'1', N'3', N'1', N'0', N'5', N'12', N'1', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-A-2', N'1', N'3', N'1', N'0', N'5', N'13', N'1', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-A-3', N'1', N'3', N'1', N'0', N'5', N'12', N'1', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-A-4', N'1', N'3', N'1', N'0', N'5', N'13', N'1', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-B-1', N'1', N'3', N'1', N'0', N'5', N'12', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-B-2', N'1', N'3', N'1', N'0', N'5', N'13', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-B-3', N'1', N'3', N'1', N'0', N'5', N'12', N'2', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-B-4', N'1', N'3', N'1', N'0', N'5', N'13', N'2', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-C-1', N'1', N'3', N'1', N'0', N'5', N'12', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-C-2', N'1', N'3', N'1', N'0', N'5', N'13', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-C-3', N'1', N'3', N'1', N'0', N'5', N'12', N'3', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-C-4', N'1', N'3', N'1', N'0', N'5', N'13', N'3', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-D-1', N'1', N'3', N'1', N'0', N'5', N'12', N'4', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-D-2', N'1', N'3', N'1', N'0', N'5', N'13', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-D-3', N'1', N'3', N'1', N'0', N'5', N'12', N'4', N'1', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-13-D-4', N'1', N'3', N'1', N'0', N'5', N'13', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-A-1', N'1', N'3', N'1', N'0', N'6', N'12', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-A-2', N'1', N'3', N'1', N'0', N'6', N'13', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-A-3', N'1', N'3', N'1', N'0', N'6', N'12', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-A-4', N'1', N'3', N'1', N'0', N'6', N'13', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-B-1', N'1', N'3', N'1', N'0', N'6', N'12', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-B-2', N'1', N'3', N'1', N'0', N'6', N'13', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-B-3', N'1', N'3', N'1', N'0', N'6', N'12', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-B-4', N'1', N'3', N'1', N'0', N'6', N'13', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-C-1', N'1', N'3', N'1', N'0', N'6', N'12', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-C-2', N'1', N'3', N'1', N'0', N'6', N'13', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-C-3', N'1', N'3', N'1', N'0', N'6', N'12', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-C-4', N'1', N'3', N'1', N'0', N'6', N'13', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-D-1', N'1', N'3', N'1', N'0', N'6', N'12', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-D-2', N'1', N'3', N'1', N'0', N'6', N'13', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-D-3', N'1', N'3', N'1', N'0', N'6', N'12', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-14-D-4', N'1', N'3', N'1', N'0', N'6', N'13', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-A-1', N'1', N'3', N'1', N'0', N'5', N'14', N'1', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-A-2', N'1', N'3', N'1', N'0', N'5', N'15', N'1', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-A-3', N'1', N'3', N'1', N'0', N'5', N'14', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-A-4', N'1', N'3', N'1', N'0', N'5', N'15', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-B-1', N'1', N'3', N'1', N'0', N'5', N'14', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-B-2', N'1', N'3', N'1', N'0', N'5', N'15', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-B-3', N'1', N'3', N'1', N'0', N'5', N'14', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-B-4', N'1', N'3', N'1', N'0', N'5', N'15', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-C-1', N'1', N'3', N'1', N'0', N'5', N'14', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-C-2', N'1', N'3', N'1', N'0', N'5', N'15', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-C-3', N'1', N'3', N'1', N'0', N'5', N'14', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-C-4', N'1', N'3', N'1', N'0', N'5', N'15', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-D-1', N'1', N'3', N'1', N'0', N'5', N'14', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-D-2', N'1', N'3', N'1', N'0', N'5', N'15', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-D-3', N'1', N'3', N'1', N'0', N'5', N'14', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-15-D-4', N'1', N'3', N'1', N'0', N'5', N'15', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-A-1', N'1', N'3', N'1', N'0', N'6', N'14', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-A-2', N'1', N'3', N'1', N'0', N'6', N'15', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-A-3', N'1', N'3', N'1', N'0', N'6', N'14', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-A-4', N'1', N'3', N'1', N'0', N'6', N'15', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-B-1', N'1', N'3', N'1', N'0', N'6', N'14', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-B-2', N'1', N'3', N'1', N'0', N'6', N'15', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-B-3', N'1', N'3', N'1', N'0', N'6', N'14', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-B-4', N'1', N'3', N'1', N'0', N'6', N'15', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-C-1', N'1', N'3', N'1', N'0', N'6', N'14', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-C-2', N'1', N'3', N'1', N'0', N'6', N'15', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-C-3', N'1', N'3', N'1', N'0', N'6', N'14', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-C-4', N'1', N'3', N'1', N'0', N'6', N'15', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-D-1', N'1', N'3', N'1', N'0', N'6', N'14', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-D-2', N'1', N'3', N'1', N'0', N'6', N'15', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-D-3', N'1', N'3', N'1', N'0', N'6', N'14', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-16-D-4', N'1', N'3', N'1', N'0', N'6', N'15', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-A-1', N'1', N'3', N'1', N'0', N'5', N'16', N'1', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-A-2', N'1', N'3', N'1', N'0', N'5', N'17', N'1', N'2', N'0', N'0', N'K12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-A-3', N'1', N'3', N'1', N'0', N'5', N'16', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-A-4', N'1', N'3', N'1', N'0', N'5', N'17', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-B-1', N'1', N'3', N'1', N'0', N'5', N'16', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-B-2', N'1', N'3', N'1', N'0', N'5', N'17', N'2', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-B-3', N'1', N'3', N'1', N'0', N'5', N'16', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-B-4', N'1', N'3', N'1', N'0', N'5', N'17', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-C-1', N'1', N'3', N'1', N'0', N'5', N'16', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-C-2', N'1', N'3', N'1', N'0', N'5', N'17', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-C-3', N'1', N'3', N'1', N'0', N'5', N'16', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-C-4', N'1', N'3', N'1', N'0', N'5', N'17', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-D-1', N'1', N'3', N'1', N'0', N'5', N'16', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-D-2', N'1', N'3', N'1', N'0', N'5', N'17', N'4', N'2', N'0', N'0', N'D12345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-D-3', N'1', N'3', N'1', N'0', N'5', N'16', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-17-D-4', N'1', N'3', N'1', N'0', N'5', N'17', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-A-1', N'1', N'3', N'1', N'0', N'6', N'16', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-A-2', N'1', N'3', N'1', N'0', N'6', N'17', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-A-3', N'1', N'3', N'1', N'0', N'6', N'16', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-A-4', N'1', N'3', N'1', N'0', N'6', N'17', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-B-1', N'1', N'3', N'1', N'0', N'6', N'16', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-B-2', N'1', N'3', N'1', N'0', N'6', N'17', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-B-3', N'1', N'3', N'1', N'0', N'6', N'16', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-B-4', N'1', N'3', N'1', N'0', N'6', N'17', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-C-1', N'1', N'3', N'1', N'0', N'6', N'16', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-C-2', N'1', N'3', N'1', N'0', N'6', N'17', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-C-3', N'1', N'3', N'1', N'0', N'6', N'16', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-C-4', N'1', N'3', N'1', N'0', N'6', N'17', N'3', N'1', N'0', N'0', N'', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-D-1', N'1', N'3', N'1', N'0', N'6', N'16', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-D-2', N'1', N'3', N'1', N'0', N'6', N'17', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-D-3', N'1', N'3', N'1', N'0', N'6', N'16', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-18-D-4', N'1', N'3', N'1', N'0', N'6', N'17', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-A-1', N'1', N'3', N'1', N'0', N'5', N'18', N'1', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-A-2', N'1', N'3', N'1', N'0', N'5', N'19', N'1', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-A-3', N'1', N'3', N'1', N'0', N'5', N'18', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-A-4', N'1', N'3', N'1', N'0', N'5', N'19', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-B-1', N'1', N'3', N'1', N'0', N'5', N'18', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-B-2', N'1', N'3', N'1', N'0', N'5', N'19', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-B-3', N'1', N'3', N'1', N'0', N'5', N'18', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-B-4', N'1', N'3', N'1', N'0', N'5', N'19', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-C-1', N'1', N'3', N'1', N'0', N'5', N'18', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-C-2', N'1', N'3', N'1', N'0', N'5', N'19', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-C-3', N'1', N'3', N'1', N'0', N'5', N'18', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-C-4', N'1', N'3', N'1', N'0', N'5', N'19', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-D-1', N'1', N'3', N'1', N'0', N'5', N'18', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-D-2', N'1', N'3', N'1', N'0', N'5', N'19', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-D-3', N'1', N'3', N'1', N'0', N'5', N'18', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-19-D-4', N'1', N'3', N'1', N'0', N'5', N'19', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-A-1', N'1', N'3', N'1', N'0', N'6', N'18', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-A-2', N'1', N'3', N'1', N'0', N'6', N'19', N'1', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-A-3', N'1', N'3', N'1', N'0', N'6', N'18', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-A-4', N'1', N'3', N'1', N'0', N'6', N'19', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-B-1', N'1', N'3', N'1', N'0', N'6', N'18', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-B-2', N'1', N'3', N'1', N'0', N'6', N'19', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-B-3', N'1', N'3', N'1', N'0', N'6', N'18', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-B-4', N'1', N'3', N'1', N'0', N'6', N'19', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-C-1', N'1', N'3', N'1', N'0', N'6', N'18', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-C-2', N'1', N'3', N'1', N'0', N'6', N'19', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-C-3', N'1', N'3', N'1', N'0', N'6', N'18', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-C-4', N'1', N'3', N'1', N'0', N'6', N'19', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-D-1', N'1', N'3', N'1', N'0', N'6', N'18', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-D-2', N'1', N'3', N'1', N'0', N'6', N'19', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-D-3', N'1', N'3', N'1', N'0', N'6', N'18', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-20-D-4', N'1', N'3', N'1', N'0', N'6', N'19', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-A-1', N'1', N'3', N'1', N'0', N'5', N'20', N'1', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-A-2', N'1', N'3', N'1', N'0', N'5', N'21', N'1', N'2', N'0', N'1', N'KJYS', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-A-3', N'1', N'3', N'1', N'0', N'5', N'20', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-A-4', N'1', N'3', N'1', N'0', N'5', N'21', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-B-1', N'1', N'3', N'1', N'0', N'5', N'20', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-B-2', N'1', N'3', N'1', N'0', N'5', N'21', N'2', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-B-3', N'1', N'3', N'1', N'0', N'5', N'20', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-B-4', N'1', N'3', N'1', N'0', N'5', N'21', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-C-1', N'1', N'3', N'1', N'0', N'5', N'20', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-C-2', N'1', N'3', N'1', N'0', N'5', N'21', N'3', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-C-3', N'1', N'3', N'1', N'0', N'5', N'20', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-C-4', N'1', N'3', N'1', N'0', N'5', N'21', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-D-1', N'1', N'3', N'1', N'0', N'5', N'20', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-D-2', N'1', N'3', N'1', N'0', N'5', N'21', N'4', N'2', N'0', N'0', N'2345678', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-D-3', N'1', N'3', N'1', N'0', N'5', N'20', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-21-D-4', N'1', N'3', N'1', N'0', N'5', N'21', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-A-1', N'1', N'3', N'1', N'0', N'6', N'20', N'1', N'2', N'1', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-A-2', N'1', N'3', N'1', N'0', N'6', N'21', N'1', N'2', N'1', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-A-3', N'1', N'3', N'1', N'0', N'6', N'20', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-A-4', N'1', N'3', N'1', N'0', N'6', N'21', N'1', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-B-1', N'1', N'3', N'1', N'0', N'6', N'20', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-B-2', N'1', N'3', N'1', N'0', N'6', N'21', N'2', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-B-3', N'1', N'3', N'1', N'0', N'6', N'20', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-B-4', N'1', N'3', N'1', N'0', N'6', N'21', N'2', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-C-1', N'1', N'3', N'1', N'0', N'6', N'20', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-C-2', N'1', N'3', N'1', N'0', N'6', N'21', N'3', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-C-3', N'1', N'3', N'1', N'0', N'6', N'20', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-C-4', N'1', N'3', N'1', N'0', N'6', N'21', N'3', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-D-1', N'1', N'3', N'1', N'0', N'6', N'20', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-D-2', N'1', N'3', N'1', N'0', N'6', N'21', N'4', N'2', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-D-3', N'1', N'3', N'1', N'0', N'6', N'20', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-22-D-4', N'1', N'3', N'1', N'0', N'6', N'21', N'4', N'1', N'0', N'0', NULL, N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-23-C-1', N'1', N'3', N'1', N'0', N'5', N'22', N'3', N'2', N'0', N'1', N'KJYS', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-23-C-3', N'1', N'3', N'1', N'0', N'5', N'22', N'3', N'1', N'0', N'1', N'KJYS', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-23-D-1', N'1', N'3', N'1', N'0', N'5', N'22', N'4', N'2', N'0', N'1', N'KJYS', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-23-D-3', N'1', N'3', N'1', N'0', N'5', N'22', N'4', N'1', N'0', N'1', N'KJYS', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-24-C-1', N'1', N'3', N'1', N'0', N'6', N'22', N'3', N'2', N'0', N'1', N'KJYS', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-24-C-3', N'1', N'3', N'1', N'0', N'6', N'22', N'3', N'1', N'0', N'1', N'KJYS', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-24-D-1', N'1', N'3', N'1', N'0', N'6', N'22', N'4', N'2', N'0', N'1', N'KJYS', N'B') +GO + +INSERT INTO [dbo].[tbl_app_location] ([location_id], [area_id], [tunnel_id], [equipment_id], [location_type], [queue], [line], [layer], [depth], [is_lock], [location_status], [vehicle_id], [ware_area]) VALUES (N'A-03-24-D-3', N'1', N'3', N'1', N'0', N'6', N'22', N'4', N'1', N'0', N'1', N'KJYS', N'B') +GO + + +-- ---------------------------- +-- Table structure for tbl_app_order_check +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_order_check]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_order_check] +GO + +CREATE TABLE [dbo].[tbl_app_order_check] ( + [record_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [check_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [warehouse] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [status] int NOT NULL, + [create_time] datetime NOT NULL, + [complete_time] datetime NULL, + [remark] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_order_check] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_order_check +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_order_check] ([record_id], [check_id], [warehouse], [status], [create_time], [complete_time], [remark]) VALUES (N'75f8b75b-b704-471a-85a6-fd07e8746077', N'E', N'珀金斯立体库', N'0', N'2024-11-18 13:57:19.967', NULL, N'tb101') +GO + +INSERT INTO [dbo].[tbl_app_order_check] ([record_id], [check_id], [warehouse], [status], [create_time], [complete_time], [remark]) VALUES (N'84bc6632-e1a8-4b3a-bbbc-045e6bd63c91', N'E', N'珀金斯立体库', N'0', N'2025-02-15 00:00:00.000', NULL, N'1') +GO + +INSERT INTO [dbo].[tbl_app_order_check] ([record_id], [check_id], [warehouse], [status], [create_time], [complete_time], [remark]) VALUES (N'96793306-0cfc-4cc4-a4d9-41ce0575ee84', N'F', N'珀金斯立体库', N'0', N'2024-11-18 00:00:00.000', NULL, N'A-03-09-C-02') +GO + +INSERT INTO [dbo].[tbl_app_order_check] ([record_id], [check_id], [warehouse], [status], [create_time], [complete_time], [remark]) VALUES (N'9b6a6f89-a5c5-425e-a7c7-4203c667335b', N'E', N'珀金斯立体库', N'0', N'2024-11-18 00:00:00.000', NULL, N'1') +GO + +INSERT INTO [dbo].[tbl_app_order_check] ([record_id], [check_id], [warehouse], [status], [create_time], [complete_time], [remark]) VALUES (N'a4fd3add-4653-4276-9c20-bb4228e86508', N'F', N'珀金斯立体库', N'0', N'2024-11-18 14:02:14.827', NULL, N'1212') +GO + +INSERT INTO [dbo].[tbl_app_order_check] ([record_id], [check_id], [warehouse], [status], [create_time], [complete_time], [remark]) VALUES (N'bbfe2b8f-80cc-48b1-b8c5-be507a0538ea', N'F', N'珀金斯立体库', N'0', N'2024-11-18 14:01:39.840', NULL, N'1212') +GO + +INSERT INTO [dbo].[tbl_app_order_check] ([record_id], [check_id], [warehouse], [status], [create_time], [complete_time], [remark]) VALUES (N'cdb5d7b4-76d1-4437-8bc2-22e2f57104c1', N'E', N'珀金斯立体库', N'0', N'2024-12-15 00:00:00.000', NULL, N'PK_GV85134R') +GO + +INSERT INTO [dbo].[tbl_app_order_check] ([record_id], [check_id], [warehouse], [status], [create_time], [complete_time], [remark]) VALUES (N'ee498296-ed32-43cb-ae5f-b02780b54c4f', N'E', N'珀金斯立体库', N'0', N'2024-11-18 00:00:00.000', NULL, N'宝开') +GO + + +-- ---------------------------- +-- Table structure for tbl_app_order_in +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_order_in]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_order_in] +GO + +CREATE TABLE [dbo].[tbl_app_order_in] ( + [row_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [guid] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [in_type] int NOT NULL, + [batch_no] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [vehicle_no] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [goods_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [goods_num] decimal(18) NOT NULL, + [ware_house] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [order_status] int NOT NULL, + [create_time] datetime NOT NULL, + [create_person] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [update_time] datetime NOT NULL, + [remark] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [model] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [enginen] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [productionDate] date NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_order_in] SET (LOCK_ESCALATION = TABLE) +GO + +EXEC sp_addextendedproperty +'MS_Description', N'序列号', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_order_in', +'COLUMN', N'batch_no' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'载具号', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_order_in', +'COLUMN', N'vehicle_no' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'机型', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_order_in', +'COLUMN', N'model' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'发动机号', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_order_in', +'COLUMN', N'enginen' +GO + + +-- ---------------------------- +-- Records of tbl_app_order_in +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_order_in] ([row_id], [guid], [in_type], [batch_no], [vehicle_no], [goods_id], [goods_num], [ware_house], [order_status], [create_time], [create_person], [update_time], [remark], [model], [enginen], [productionDate]) VALUES (N'fcc5c0d9-efde-4ec6-81d5-d124ec53f89e', N'2495b901-c0f5-4a37-8c02-06fdf7badfa1', N'1', NULL, N'1001', N'111111', N'1', N'珀金斯立体库', N'0', N'2025-02-20 00:00:00.000', N'管理员', N'2025-02-20 15:21:18.253', NULL, NULL, NULL, N'2021-12-12') +GO + + +-- ---------------------------- +-- Table structure for tbl_app_order_out +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_order_out]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_order_out] +GO + +CREATE TABLE [dbo].[tbl_app_order_out] ( + [record_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [order_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [warehouse_origin] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [warehouse_destination] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [order_type] int NOT NULL, + [delivery_time] datetime NULL, + [row_no] int NULL, + [goods_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [goods_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [goods_num] int NOT NULL, + [unit] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [status] int NOT NULL, + [create_time] datetime NOT NULL, + [remark] varchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [row_id] varchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_order_out] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_order_out +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_order_out] ([record_id], [order_id], [warehouse_origin], [warehouse_destination], [order_type], [delivery_time], [row_no], [goods_id], [goods_name], [goods_num], [unit], [status], [create_time], [remark], [row_id]) VALUES (N'0b7ee60c-157a-4f9e-9cfd-544647fe133c', N'9b024111-d01c-4f83-a8bb-92549baab3d4', N'珀金斯立体库', N'', N'1', NULL, NULL, N'F4L00856', NULL, N'1', N'', N'76', N'2025-02-14 13:49:35.077', N'普通出库', N'15769767-026b-4236-83e0-787e2a4886c5') +GO + +INSERT INTO [dbo].[tbl_app_order_out] ([record_id], [order_id], [warehouse_origin], [warehouse_destination], [order_type], [delivery_time], [row_no], [goods_id], [goods_name], [goods_num], [unit], [status], [create_time], [remark], [row_id]) VALUES (N'9fd1c0c8-8db7-439e-96d0-7b2a0063bbf3', N'e7e51f4c-e1f0-4e29-89b0-c30c39b80fea', N'珀金斯立体库', N'', N'2', NULL, NULL, N'J2J50507', NULL, N'1', N'', N'76', N'2025-02-14 13:45:52.270', N'普通出库', N'161a3df6-7d73-4d9e-970b-d05dfe173473') +GO + +INSERT INTO [dbo].[tbl_app_order_out] ([record_id], [order_id], [warehouse_origin], [warehouse_destination], [order_type], [delivery_time], [row_no], [goods_id], [goods_name], [goods_num], [unit], [status], [create_time], [remark], [row_id]) VALUES (N'1790bd8c-353a-4fc7-9709-f11da0657e8c', N'fa070ccc-f5c2-4253-9a22-b93b97fcfe49', N'珀金斯立体库', N'', N'1', NULL, NULL, N'J2J50505', NULL, N'1', N'', N'100', N'2025-02-14 13:49:35.090', N'普通出库', N'2012b970-c111-414b-a3a7-40764a71c9da') +GO + +INSERT INTO [dbo].[tbl_app_order_out] ([record_id], [order_id], [warehouse_origin], [warehouse_destination], [order_type], [delivery_time], [row_no], [goods_id], [goods_name], [goods_num], [unit], [status], [create_time], [remark], [row_id]) VALUES (N'ab88ec17-3632-438a-8141-a79bb7bc8557', N'982d7bae-e562-41ae-9d45-0044d7f4b14f', N'珀金斯立体库', N'', N'3', NULL, NULL, N'J2J51110', NULL, N'1', N'', N'100', N'2025-02-14 13:49:35.083', N'普通出库', N'259f141d-fcbe-4c34-9de0-15d8cafd9b5f') +GO + +INSERT INTO [dbo].[tbl_app_order_out] ([record_id], [order_id], [warehouse_origin], [warehouse_destination], [order_type], [delivery_time], [row_no], [goods_id], [goods_name], [goods_num], [unit], [status], [create_time], [remark], [row_id]) VALUES (N'28465006-a89a-4c2c-9468-29381a7c9750', N'22c6936b-64f1-491d-b160-19134dc9eb8e', N'珀金斯立体库', N'', N'2', NULL, NULL, N'12121', NULL, N'1212', N'', N'76', N'2025-02-20 15:57:51.430', N'普通出库', N'585bd50c-24d5-4660-9ad0-abe3b4abfb3d') +GO + +INSERT INTO [dbo].[tbl_app_order_out] ([record_id], [order_id], [warehouse_origin], [warehouse_destination], [order_type], [delivery_time], [row_no], [goods_id], [goods_name], [goods_num], [unit], [status], [create_time], [remark], [row_id]) VALUES (N'b76dfddb-5730-4c2a-b148-f0245976683e', N'5f9eaec7-d7b1-406b-b6f9-940a30055c88', N'珀金斯立体库', N'', N'2', NULL, NULL, N'122222222222', NULL, N'1', N'', N'76', N'2025-02-20 15:58:04.690', N'普通出库', N'7791ff47-65a4-4f90-b9ba-e3d849b0a2b2') +GO + + +-- ---------------------------- +-- Table structure for tbl_app_order_out_bak +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_order_out_bak]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_order_out_bak] +GO + +CREATE TABLE [dbo].[tbl_app_order_out_bak] ( + [row_id] varchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [record_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [order_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [warehouse_origin] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [warehouse_destination] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [order_type] int NOT NULL, + [delivery_time] datetime NULL, + [row_no] int NULL, + [goods_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [goods_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [goods_num] int NOT NULL, + [unit] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [status] int NOT NULL, + [create_time] datetime NOT NULL, + [remark] varchar(50) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_order_out_bak] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_order_out_bak +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_order_out_bak] ([row_id], [record_id], [order_id], [warehouse_origin], [warehouse_destination], [order_type], [delivery_time], [row_no], [goods_id], [goods_name], [goods_num], [unit], [status], [create_time], [remark]) VALUES (N'5ab04f55-6111-4c34-90bc-ec27c4334876', N'ff3325d7-3245-49b7-9374-96bba7135b1d', N'2bf320ad-6221-4b95-8754-6c388b5dc8c4', N'珀金斯立体库', N'', N'1', NULL, NULL, N'J2J51116', NULL, N'1', N'', N'0', N'2025-01-08 12:28:28.227', N'普通出库') +GO + + +-- ---------------------------- +-- Table structure for tbl_app_part_info +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_part_info]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_part_info] +GO + +CREATE TABLE [dbo].[tbl_app_part_info] ( + [Material] nvarchar(150) COLLATE Chinese_PRC_CI_AS NOT NULL, + [ItemDesc] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Category] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [CategoryRemark] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Unload_Place] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Kitting_Point] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Property] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Vendor_ID] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Data_Owner] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Part_Weight] float(53) NULL, + [Storage_Location] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Storage_Type] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Storage_Bin] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Vendor_Name_EN] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Vendor_Country] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [UpdateDate] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [SLED] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL, + [Vendor_Name_CN] nvarchar(150) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_part_info] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_part_info +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_part_info] ([Material], [ItemDesc], [Category], [CategoryRemark], [Unload_Place], [Kitting_Point], [Property], [Vendor_ID], [Data_Owner], [Part_Weight], [Storage_Location], [Storage_Type], [Storage_Bin], [Vendor_Name_EN], [Vendor_Country], [UpdateDate], [SLED], [Vendor_Name_CN]) VALUES (N'1', N'发动机', N'', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_part_info] ([Material], [ItemDesc], [Category], [CategoryRemark], [Unload_Place], [Kitting_Point], [Property], [Vendor_ID], [Data_Owner], [Part_Weight], [Storage_Location], [Storage_Type], [Storage_Bin], [Vendor_Name_EN], [Vendor_Country], [UpdateDate], [SLED], [Vendor_Name_CN]) VALUES (N'2', N'发动机', N'', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_part_info] ([Material], [ItemDesc], [Category], [CategoryRemark], [Unload_Place], [Kitting_Point], [Property], [Vendor_ID], [Data_Owner], [Part_Weight], [Storage_Location], [Storage_Type], [Storage_Bin], [Vendor_Name_EN], [Vendor_Country], [UpdateDate], [SLED], [Vendor_Name_CN]) VALUES (N'1ef4d', N'发动机', N'', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_part_info] ([Material], [ItemDesc], [Category], [CategoryRemark], [Unload_Place], [Kitting_Point], [Property], [Vendor_ID], [Data_Owner], [Part_Weight], [Storage_Location], [Storage_Type], [Storage_Bin], [Vendor_Name_EN], [Vendor_Country], [UpdateDate], [SLED], [Vendor_Name_CN]) VALUES (N'e668d', N'发动机', N'', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_part_info] ([Material], [ItemDesc], [Category], [CategoryRemark], [Unload_Place], [Kitting_Point], [Property], [Vendor_ID], [Data_Owner], [Part_Weight], [Storage_Location], [Storage_Type], [Storage_Bin], [Vendor_Name_EN], [Vendor_Country], [UpdateDate], [SLED], [Vendor_Name_CN]) VALUES (N'111', N'发动机', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_part_info] ([Material], [ItemDesc], [Category], [CategoryRemark], [Unload_Place], [Kitting_Point], [Property], [Vendor_ID], [Data_Owner], [Part_Weight], [Storage_Location], [Storage_Type], [Storage_Bin], [Vendor_Name_EN], [Vendor_Country], [UpdateDate], [SLED], [Vendor_Name_CN]) VALUES (N'111111', N'原材料', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + + +-- ---------------------------- +-- Table structure for tbl_app_stand +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_stand]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_stand] +GO + +CREATE TABLE [dbo].[tbl_app_stand] ( + [stand_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [allow_in] int NULL, + [allow_out] int NULL, + [task_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [is_lock] int NULL, + [stand_status] int NULL, + [equipment_id] int NULL, + [area_id] int NULL, + [stand_type] int NULL, + [stand_ip] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_stand] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_stand +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_stand] ([stand_id], [allow_in], [allow_out], [task_id], [is_lock], [stand_status], [equipment_id], [area_id], [stand_type], [stand_ip]) VALUES (N'1', N'0', N'0', NULL, N'0', N'0', N'1', N'1', N'3', NULL) +GO + +INSERT INTO [dbo].[tbl_app_stand] ([stand_id], [allow_in], [allow_out], [task_id], [is_lock], [stand_status], [equipment_id], [area_id], [stand_type], [stand_ip]) VALUES (N'101', N'0', N'1', NULL, N'0', N'0', N'1', N'1', N'1', NULL) +GO + +INSERT INTO [dbo].[tbl_app_stand] ([stand_id], [allow_in], [allow_out], [task_id], [is_lock], [stand_status], [equipment_id], [area_id], [stand_type], [stand_ip]) VALUES (N'111', N'1', N'0', NULL, N'0', N'0', N'1', N'1', N'1', NULL) +GO + +INSERT INTO [dbo].[tbl_app_stand] ([stand_id], [allow_in], [allow_out], [task_id], [is_lock], [stand_status], [equipment_id], [area_id], [stand_type], [stand_ip]) VALUES (N'2001', N'0', N'0', NULL, N'0', N'0', N'0', N'1', N'2', N'127.0.0.1') +GO + + +-- ---------------------------- +-- Table structure for tbl_app_stock +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_stock]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_stock] +GO + +CREATE TABLE [dbo].[tbl_app_stock] ( + [stock_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [warehouse_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [location_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [vehicle_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [goods_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [goods_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [batch_no] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [available_num] int NULL, + [real_num] int NULL, + [provider_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [provider_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [production_date] datetime NULL, + [expiration_date] datetime NULL, + [stock_status] int NULL, + [goods_status] int NULL, + [create_time] datetime NULL, + [last_update_time] datetime NULL, + [last_update_user] datetime NULL, + [remark] text COLLATE Chinese_PRC_CI_AS NULL, + [is_inventory] int NULL, + [inventory_task_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [current_location] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [remain_num] int NULL, + [shelf_life] float(53) NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_stock] SET (LOCK_ESCALATION = TABLE) +GO + +EXEC sp_addextendedproperty +'MS_Description', N'发动机序列号', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_stock', +'COLUMN', N'batch_no' +GO + + +-- ---------------------------- +-- Records of tbl_app_stock +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_stock] ([stock_id], [warehouse_name], [location_id], [vehicle_id], [goods_id], [goods_name], [batch_no], [available_num], [real_num], [provider_id], [provider_name], [production_date], [expiration_date], [stock_status], [goods_status], [create_time], [last_update_time], [last_update_user], [remark], [is_inventory], [inventory_task_id], [current_location], [remain_num], [shelf_life]) VALUES (N'202502201542432131740037363213', N'珀金斯立体库', N'A-02-03-A-2', N'1111', N'111111', NULL, N'原材料', N'12', N'12', N'', N'小', N'2023-12-12 00:00:00.000', NULL, N'0', NULL, N'2025-02-20 15:42:43.213', NULL, N'1900-01-01 00:00:00.000', N'原材料', NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_stock] ([stock_id], [warehouse_name], [location_id], [vehicle_id], [goods_id], [goods_name], [batch_no], [available_num], [real_num], [provider_id], [provider_name], [production_date], [expiration_date], [stock_status], [goods_status], [create_time], [last_update_time], [last_update_user], [remark], [is_inventory], [inventory_task_id], [current_location], [remain_num], [shelf_life]) VALUES (N'202502201542432161740037363216', N'珀金斯立体库', N'A-02-03-A-2', N'1111', N'111111', NULL, N'原材料', N'200', N'200', N'', N'小', N'2025-02-11 00:00:00.000', NULL, N'0', NULL, N'2025-02-20 15:42:43.217', NULL, N'1900-01-01 00:00:00.000', N'原材料', NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_stock] ([stock_id], [warehouse_name], [location_id], [vehicle_id], [goods_id], [goods_name], [batch_no], [available_num], [real_num], [provider_id], [provider_name], [production_date], [expiration_date], [stock_status], [goods_status], [create_time], [last_update_time], [last_update_user], [remark], [is_inventory], [inventory_task_id], [current_location], [remain_num], [shelf_life]) VALUES (N'202502201542432191740037363219', N'珀金斯立体库', N'A-02-03-A-2', N'1111', N'111111', NULL, N'原材料', N'100', N'100', N'', N'小', N'2020-12-12 00:00:00.000', NULL, N'0', NULL, N'2025-02-20 15:42:43.220', NULL, N'1900-01-01 00:00:00.000', N'原材料', NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_stock] ([stock_id], [warehouse_name], [location_id], [vehicle_id], [goods_id], [goods_name], [batch_no], [available_num], [real_num], [provider_id], [provider_name], [production_date], [expiration_date], [stock_status], [goods_status], [create_time], [last_update_time], [last_update_user], [remark], [is_inventory], [inventory_task_id], [current_location], [remain_num], [shelf_life]) VALUES (N'202502201542432221740037363222', N'珀金斯立体库', N'A-02-03-A-2', N'1111', N'111111', NULL, N'原材料', N'200', N'200', N'', N'小', N'2021-02-02 00:00:00.000', NULL, N'0', NULL, N'2025-02-20 15:42:43.223', NULL, N'1900-01-01 00:00:00.000', N'原材料', NULL, NULL, NULL, NULL, NULL) +GO + + +-- ---------------------------- +-- Table structure for tbl_app_task +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_task]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_task] +GO + +CREATE TABLE [dbo].[tbl_app_task] ( + [task_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [task_type] int NOT NULL, + [task_status] int NOT NULL, + [task_group] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [origin] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [destination] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [pick_stand] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [weight] float(53) NULL, + [vehicle_no] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [vehicle_size] int NULL, + [create_time] datetime NULL, + [user_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [goods_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [goods_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [operate_num] int NULL, + [total_num] int NULL, + [etag_location] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [task_priority] int NULL, + [production_date] date NULL, + [expiration_date] datetime NULL, + [kate_task_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [remark1] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_task] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_task +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_task_bak +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_task_bak]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_task_bak] +GO + +CREATE TABLE [dbo].[tbl_app_task_bak] ( + [task_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [task_type] int NOT NULL, + [task_status] int NOT NULL, + [task_group] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [origin] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [destination] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [pick_stand] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [weight] float(53) NULL, + [vehicle_no] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [vehicle_size] int NULL, + [create_time] datetime NULL, + [user_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [goods_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [goods_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [operate_num] int NULL, + [total_num] int NULL, + [etag_location] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [task_priority] int NULL, + [production_date] datetime NULL, + [expiration_date] datetime NULL, + [kate_task_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [finish_time] datetime NULL, + [remark1] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_task_bak] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_task_bak +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'033fc9af-adce-4f04-8b2b-4f15f2af49a6', N'1', N'100', NULL, N'201', N'A-03-11-D-4', NULL, NULL, N'D12345678', NULL, N'2024-12-16 09:50:33.803', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'04c122b4-e43e-4858-8f10-0b4130f3a395', N'1', N'100', NULL, N'201', N'A-03-18-C-4', NULL, NULL, N'K12345678', NULL, N'2024-12-12 14:37:16.640', NULL, N'J7L104825813492', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'053dfb59-2d50-440c-8030-2058f4816c5b', N'1', N'100', NULL, N'201', N'A-03-18-C-4', NULL, NULL, N'K12345678', NULL, N'2024-12-13 09:07:00.990', NULL, N'5813492J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'0a0d18f5-10b2-4f27-a964-884e2ac7f85b', N'1', N'100', NULL, N'201', N'A-03-05-B-1', NULL, NULL, N'K12345678', NULL, N'2024-12-15 15:18:59.897', NULL, N'PK125616121', NULL, N'30', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'0a7835ff-1dad-4665-bbe6-eb7a1995e55a', N'1', N'100', NULL, N'201', N'A-03-01-D-4', NULL, NULL, N'K12345678', NULL, N'2024-12-15 09:38:26.890', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1', N'1', N'1', N'1', N'1', N'1', NULL, NULL, N'1', NULL, NULL, NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'106ad5bc-4abc-472f-886a-7476fbb4ec9d', N'1', N'100', NULL, N'201', N'A-03-07-A-2', NULL, NULL, N'D12345678', NULL, N'2024-12-16 10:52:28.267', NULL, N'5813492', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'111b3cd2-bf28-4016-9274-e6d455729a93', N'1', N'100', NULL, N'201', N'A-01-01-C-2', NULL, NULL, N'1111', NULL, N'2025-02-20 15:33:01.213', NULL, N'YJRK0001', NULL, N'100', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'12', N'1', N'100', NULL, N'1', N'2', NULL, NULL, N'21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1733971707453', N'2', N'100', NULL, N'A-03-01-C-4', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-12 10:48:27.453', NULL, N'_GV85134RGV85134R071232K', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1733978288779', N'2', N'100', NULL, N'A-03-01-C-4', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-12 12:38:08.780', NULL, N'5813492J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1733979624730', N'2', N'100', NULL, N'A-03-01-C-4', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-12 13:00:24.730', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1733983638109', N'2', N'100', NULL, N'A-03-01-C-4', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-12 14:07:18.110', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1733984145431', N'2', N'100', NULL, N'A-03-01-C-4', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-12 14:15:45.430', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1733984664225', N'2', N'100', NULL, N'A-03-18-C-4', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-12 14:24:24.227', NULL, N'J7L104825813492', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1733987240989', N'2', N'100', NULL, N'A-03-18-C-4', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-12 15:07:20.990', NULL, N'J7L104825813492', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734051658066', N'2', N'100', NULL, N'A-03-18-C-4', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-13 09:00:58.067', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734052344673', N'2', N'100', NULL, N'A-03-18-C-4', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-13 09:12:24.673', NULL, N'5813492J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734054488239', N'2', N'100', NULL, N'A-03-05-B-1', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-13 09:48:08.240', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734144033794', N'2', N'100', NULL, N'A-03-03-B-1', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-14 10:40:33.793', NULL, N'J7L104825813492', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734153351371', N'2', N'100', NULL, N'A-03-01-D-2', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-14 13:15:51.370', NULL, N'J7L104821515', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734224670342', N'2', N'100', NULL, N'A-03-23-C-1', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-15 09:04:30.343', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734225490712', N'2', N'100', NULL, N'A-03-01-D-4', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-15 09:18:10.713', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734226871455', N'2', N'100', NULL, N'A-03-01-D-4', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-15 09:41:11.457', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734227397657', N'2', N'100', NULL, N'A-03-01-D-4', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-15 09:49:57.657', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734227771492', N'2', N'100', NULL, N'A-03-01-D-4', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-15 09:56:11.493', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734229335036', N'2', N'100', NULL, N'A-03-03-C-2', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-15 10:22:15.037', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'17342293350444545', N'2', N'100', NULL, N'A-03-03-B-2', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-15 10:22:15.043', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734230957914', N'2', N'100', NULL, N'A-03-03-B-2', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-15 10:49:17.913', NULL, N'PK_12561612130', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734230957921', N'2', N'100', NULL, N'A-03-03-C-2', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-15 10:49:17.920', NULL, N'5813492', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734238880923', N'2', N'100', NULL, N'A-03-03-B-2', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-15 13:01:20.923', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734244582310', N'2', N'100', NULL, N'A-03-03-B-2', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-15 14:36:22.310', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734245586919', N'2', N'100', NULL, N'A-03-03-C-2', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-15 14:53:06.920', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734248560280', N'2', N'100', NULL, N'A-03-05-B-1', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-15 15:42:40.280', NULL, N'PK125616121', NULL, N'3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734248560284', N'2', N'100', NULL, N'A-03-05-C-2', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-15 15:42:40.283', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734312685370', N'2', N'100', NULL, N'A-03-11-D-4', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-16 09:31:25.370', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734313303002', N'2', N'100', NULL, N'A-03-11-D-4', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-16 09:41:43.003', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734314467629', N'2', N'100', NULL, N'A-03-11-D-4', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-16 10:01:07.630', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734316377043', N'2', N'100', NULL, N'A-03-11-D-4', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-16 10:32:57.043', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734316534680', N'2', N'100', NULL, N'A-03-11-D-4', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-16 10:35:34.680', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734316940925', N'2', N'100', NULL, N'A-03-07-C-1', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-16 10:42:20.927', NULL, N'GV85134R071232K', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734317156486', N'2', N'100', NULL, N'A-03-07-D-1', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-16 10:45:56.487', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734317428846', N'2', N'100', NULL, N'A-03-07-C-1', N'241', NULL, NULL, N'K12345678', NULL, N'2024-12-16 10:50:28.847', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1734317756994', N'2', N'100', NULL, N'A-03-07-A-2', N'241', NULL, NULL, N'D12345678', NULL, N'2024-12-16 10:55:56.993', NULL, N'5813492', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'1ecec789-59b2-4e73-983c-d48e5699252b', N'1', N'100', NULL, N'201', N'A-03-07-C-1', NULL, NULL, N'K12345678', NULL, N'2024-12-16 10:38:39.867', NULL, N'GV85134R071232K', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'2', N'1', N'1', N'1', N'2', N'1', N'2', N'1', N'21', N'1', NULL, NULL, N'2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'2980bcd9-9019-489a-9aeb-275b33756b2d', N'1', N'100', NULL, N'201', N'A-03-07-B-2', NULL, NULL, N'K12345678', NULL, N'2024-12-16 10:54:50.990', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'2ad0a79d-d8d1-4464-a1ca-09251c01e535', N'1', N'100', NULL, N'201', N'A-03-01-D-4', NULL, NULL, N'D12345678', NULL, N'2024-12-15 09:51:41.723', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'2d590c56-8211-4309-92d5-dd0e2751ac5b', N'1', N'100', NULL, N'201', N'A-03-05-B-1', NULL, NULL, N'D12345678', NULL, N'2024-12-13 09:21:14.137', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'2eb38c16-92a8-4b77-bf3e-8bdae96e036f', N'1', N'100', NULL, N'201', N'A-03-07-C-1', NULL, NULL, N'K12345678', NULL, N'2024-12-16 10:46:54.877', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'3', N'2', N'0', N'1', N'10', N'12', N'12', N'12', N'12', N'2', N'1900-01-01 00:00:00.000', NULL, N'12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'3a48d734-8592-4583-9032-eef8cae35301', N'1', N'100', NULL, N'201', N'A-03-01-D-4', NULL, NULL, N'D12345678', NULL, N'2024-12-14 11:06:36.077', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'42b05bb2-2475-4c08-957b-a0c3995bd656', N'1', N'100', NULL, N'201', N'A-02-03-A-2', NULL, NULL, N'1111', NULL, N'2025-02-20 15:41:43.017', NULL, N'YJRK0001', NULL, N'100', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'4cf4d0ab-9754-4946-9701-301f86e16482', N'1', N'100', NULL, N'201', N'A-03-11-D-4', NULL, NULL, N'K12345678', NULL, N'2024-12-16 10:29:25.247', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'4cfc8b60-601b-45fd-8be6-f4cc593d23e5', N'1', N'100', NULL, N'201', N'A-03-03-B-1', NULL, NULL, N'D12345678', NULL, N'2024-12-14 10:29:01.710', NULL, N'J7L104825813492', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'4f4df04c-210d-433e-9e60-879ed0713bf0', N'1', N'100', NULL, N'201', N'A-03-07-D-1', NULL, NULL, N'D12345678', NULL, N'2024-12-16 10:42:17.077', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'67b1b842-3ae4-44b6-be15-32ce543b92d9', N'1', N'100', NULL, N'201', N'A-03-01-D-4', NULL, NULL, N'D12345678', NULL, N'2024-12-15 09:17:38.337', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'8e891b7b-cb94-4b25-98ef-526cb01239e4', N'1', N'100', NULL, N'201', N'A-03-03-B-2', NULL, NULL, N'K12345678', NULL, N'2024-12-15 10:15:47.340', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'917a0033-b161-412d-ba14-f93d8ea87ed9', N'1', N'100', NULL, N'201', N'A-03-11-D-4', NULL, NULL, N'K12345678', NULL, N'2024-12-16 09:37:11.740', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'951196d3-bbb1-469d-942a-c7946ce063a0', N'1', N'100', NULL, N'201', N'A-03-11-D-4', NULL, NULL, N'D12345678', NULL, N'2024-12-16 09:25:44.613', NULL, N'PKGV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'96b8b46a-a5c3-4524-bcac-ec9856fa203d', N'1', N'100', NULL, N'228', N'A-02-01-C-2', NULL, NULL, N'1001', NULL, N'2025-02-20 14:38:09.057', NULL, N'123123123', N'111', N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'9a491ff5-b406-4e00-9670-7a69ec738ce7', N'1', N'100', NULL, N'101', N'A-03-23-D-3', NULL, NULL, N'KJYS', NULL, N'2025-02-13 09:32:35.740', NULL, N'YJRK0001', NULL, N'100', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'a22a6be9-0d7a-4690-8060-5cfa90b78a46', N'1', N'100', NULL, N'201', N'A-03-03-C-2', NULL, NULL, N'K12345678', NULL, N'2024-12-15 10:44:50.830', NULL, N'5813492', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'a27d8e28-1f46-43b0-b001-a3ddf11fb24b', N'1', N'100', NULL, N'101', N'A-03-24-D-3', NULL, NULL, N'KJYS', NULL, N'2025-02-13 09:33:45.150', NULL, N'YJRK0001', NULL, N'100', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'a3ed7bd1-e90f-4ed7-a2ca-d29d767f59a5', N'1', N'100', NULL, N'201', N'A-03-03-C-2', NULL, NULL, N'D12345678', NULL, N'2024-12-15 14:36:24.103', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'a5d6b746-22b2-429e-93c0-24564da13aaa', N'1', N'100', NULL, N'201', N'A-03-18-C-4', NULL, NULL, N'D12345678', NULL, N'2024-12-12 14:20:07.047', NULL, N'J7L104825813492', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'a8d8b929-86e5-4871-9781-4fd7e1dac955', N'1', N'100', NULL, N'201', N'A-03-01-C-4', NULL, NULL, N'D12345678', NULL, N'2024-12-12 14:03:31.723', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'ab2933ba-e4ec-44df-8f38-2d16d37d43b2', N'1', N'100', NULL, N'201', N'A-03-03-B-2', NULL, NULL, N'K12345678', NULL, N'2024-12-15 14:32:47.493', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'ac407aa5-d50b-4a25-ace4-9b41edadbaa4', N'1', N'100', NULL, N'201', N'A-03-03-B-1', NULL, NULL, N'K12345678', NULL, N'2024-12-12 13:31:07.020', NULL, N'5813492J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'aea45185-f542-4c60-9471-945400a2e791', N'1', N'100', NULL, N'201', N'A-03-01-D-4', NULL, NULL, N'K12345678', NULL, N'2024-12-15 09:03:05.353', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'b4e30a91-eac2-4c95-b10d-cad499a1ec1d', N'1', N'100', NULL, N'201', N'A-03-17-A-2', NULL, NULL, N'K12345678', NULL, N'2024-12-12 12:28:08.877', NULL, N'5813492J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'b5e9e36d-9048-4bee-afb7-c4fb25520660', N'1', N'100', NULL, N'201', N'A-03-03-B-2', NULL, NULL, N'D12345678', NULL, N'2024-12-15 10:43:13.927', NULL, N'PK_12561612130', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'b9d94792-2f39-49cd-9cd5-c5da1f0b8be5', N'1', N'100', NULL, N'201', N'A-03-17-B-2', NULL, NULL, N'D12345678', NULL, N'2024-12-12 12:53:35.443', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'c2ebafea-9313-4377-b4a4-49fdc9231c81', N'1', N'100', NULL, N'201', N'A-03-05-C-2', NULL, NULL, N'D12345678', NULL, N'2024-12-15 15:36:44.170', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'd1f5e5b1-5ad1-4c99-a49b-7434f7891f87', N'1', N'100', NULL, N'201', N'A-03-01-C-4', NULL, NULL, N'K12345678', NULL, N'2024-12-12 14:11:33.260', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'd2ca4641-83c0-416d-b675-ee33851c2c3b', N'1', N'100', NULL, N'201', N'A-03-11-D-4', NULL, NULL, N'D12345678', NULL, N'2024-12-16 10:30:40.240', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'd492ee53-b6f2-481e-b1eb-e8e699f569fe', N'1', N'100', NULL, N'201', N'A-03-18-C-4', NULL, NULL, N'D12345678', NULL, N'2024-12-12 15:09:03.620', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'e827f3cc-8dfa-4c47-9e37-6afbcb8847ef', N'1', N'100', NULL, N'201', N'A-03-01-D-2', NULL, NULL, N'K12345678', NULL, N'2024-12-14 10:48:54.427', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'e8d6a6dc-c31f-4380-a8b7-f91e47a0dbba', N'1', N'100', NULL, N'201', N'A-03-03-B-2', NULL, NULL, N'D12345678', NULL, N'2024-12-15 12:57:26.667', NULL, N'PK_GV85134R', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'f37304e7-9e72-4e65-9f95-1bfddb7fa0b1', N'1', N'100', NULL, N'201', N'A-03-13-A-1', NULL, NULL, N'D12345678', NULL, N'2024-12-12 09:04:16.793', NULL, N'_GV85134RGV85134R071232K', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + +INSERT INTO [dbo].[tbl_app_task_bak] ([task_id], [task_type], [task_status], [task_group], [origin], [destination], [pick_stand], [weight], [vehicle_no], [vehicle_size], [create_time], [user_name], [goods_id], [goods_name], [operate_num], [total_num], [etag_location], [task_priority], [production_date], [expiration_date], [kate_task_id], [finish_time], [remark1]) VALUES (N'f6b1183f-5905-4e64-b149-152e948788fc', N'1', N'100', NULL, N'201', N'A-03-03-C-2', NULL, NULL, N'D12345678', NULL, N'2024-12-15 10:17:29.540', NULL, N'J7L10482', NULL, N'1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) +GO + + +-- ---------------------------- +-- Table structure for tbl_app_upload_record +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_upload_record]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_upload_record] +GO + +CREATE TABLE [dbo].[tbl_app_upload_record] ( + [upload_id] int NOT NULL, + [file_id] int NULL, + [file_name] varchar(255) COLLATE Chinese_PRC_CI_AS NULL, + [file_description] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [file_type] varchar(255) COLLATE Chinese_PRC_CI_AS NULL, + [upload_time] datetime NULL, + [upload_user] varchar(64) COLLATE Chinese_PRC_CI_AS NULL, + [file_hash] varchar(1024) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_upload_record] SET (LOCK_ESCALATION = TABLE) +GO + +EXEC sp_addextendedproperty +'MS_Description', N'上传id', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_upload_record', +'COLUMN', N'upload_id' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'文件id', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_upload_record', +'COLUMN', N'file_id' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'文件名', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_upload_record', +'COLUMN', N'file_name' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'文件描述', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_upload_record', +'COLUMN', N'file_description' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'文件类型', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_upload_record', +'COLUMN', N'file_type' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'上传时间', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_upload_record', +'COLUMN', N'upload_time' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'上传人员', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_upload_record', +'COLUMN', N'upload_user' +GO + +EXEC sp_addextendedproperty +'MS_Description', N'hash value of the file', +'SCHEMA', N'dbo', +'TABLE', N'tbl_app_upload_record', +'COLUMN', N'file_hash' +GO + + +-- ---------------------------- +-- Records of tbl_app_upload_record +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_vehicle +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_vehicle]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_vehicle] +GO + +CREATE TABLE [dbo].[tbl_app_vehicle] ( + [vehicle_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [vehicle_status] int NULL, + [current_location] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [is_empty] int NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_vehicle] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_vehicle +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_vehicle] ([vehicle_id], [vehicle_status], [current_location], [is_empty]) VALUES (N'1', N'0', N'11', N'1') +GO + + +-- ---------------------------- +-- Table structure for tbl_app_vehicle_list +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_app_vehicle_list]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_app_vehicle_list] +GO + +CREATE TABLE [dbo].[tbl_app_vehicle_list] ( + [vehicle_id] varchar(55) COLLATE Chinese_PRC_CI_AS NOT NULL +) +GO + +ALTER TABLE [dbo].[tbl_app_vehicle_list] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_app_vehicle_list +-- ---------------------------- +INSERT INTO [dbo].[tbl_app_vehicle_list] ([vehicle_id]) VALUES (N'1001') +GO + +INSERT INTO [dbo].[tbl_app_vehicle_list] ([vehicle_id]) VALUES (N'1111') +GO + + +-- ---------------------------- +-- Table structure for tbl_sys_config +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_sys_config]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_sys_config] +GO + +CREATE TABLE [dbo].[tbl_sys_config] ( + [config_id] int NOT NULL, + [config_key] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [config_value] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [config_type] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [config_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_sys_config] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_sys_config +-- ---------------------------- +INSERT INTO [dbo].[tbl_sys_config] ([config_id], [config_key], [config_value], [config_type], [config_name]) VALUES (N'100', N'100', N'2', N'', N'一号入库口,2入') +GO + + +-- ---------------------------- +-- Table structure for tbl_sys_log +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_sys_log]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_sys_log] +GO + +CREATE TABLE [dbo].[tbl_sys_log] ( + [log_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [log_title] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [log_method] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL, + [log_request] nvarchar(1024) COLLATE Chinese_PRC_CI_AS NULL, + [log_response] nvarchar(1024) COLLATE Chinese_PRC_CI_AS NULL, + [log_ip] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL, + [log_time] datetime NULL, + [log_user] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_sys_log] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_sys_log +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_sys_menu +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_sys_menu]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_sys_menu] +GO + +CREATE TABLE [dbo].[tbl_sys_menu] ( + [menu_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [label_name] nvarchar(255) COLLATE Chinese_PRC_CI_AS NOT NULL, + [icon_value] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL, + [path] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL, + [parent_id] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_sys_menu] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_sys_menu +-- ---------------------------- +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'1', N'操作', N'Operation', N'', N'0') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'11', N'原材料入库修改', NULL, N'/goodsIn', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'12', N'出库(按序列号/物料号)', NULL, N'/goodsOut', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'121', N'出库(按库位)', NULL, N'/goodsOutByInFile', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'13', N'盘点', NULL, N'/inventory', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'2', N'数据中心', N'Histogram', N'', N'0') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'21', N'库存信息', NULL, N'/stock', N'2') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'22', N'物料清单', NULL, N'/goods', N'2') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'23', N'入库记录', NULL, N'/inTaskRecord', N'2') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'24', N'出库记录', NULL, N'/outTaskRecord', N'2') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'241', N'盘点记录', NULL, N'/inventoryRecord', N'2') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'25', N'任务监控', NULL, N'/taskMonitor', N'2') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'26', N'库位监控', NULL, N'/location', N'2') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'27', N'母托盘监控', NULL, N'/vehicle', N'2') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'3', N'系统', N'Setting', NULL, N'0') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'31', N'用户', NULL, N'/user', N'3') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'32', N'角色', NULL, N'/role', N'3') +GO + +INSERT INTO [dbo].[tbl_sys_menu] ([menu_id], [label_name], [icon_value], [path], [parent_id]) VALUES (N'33', N'修改密码', NULL, N'/updatePassword', N'3') +GO + + +-- ---------------------------- +-- Table structure for tbl_sys_permission +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_sys_permission]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_sys_permission] +GO + +CREATE TABLE [dbo].[tbl_sys_permission] ( + [permission_id] int NOT NULL, + [menu_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [role_id] int NULL +) +GO + +ALTER TABLE [dbo].[tbl_sys_permission] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_sys_permission +-- ---------------------------- +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'1', N'1', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'2', N'11', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'3', N'12', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'4', N'13', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'5', N'2', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'6', N'21', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'7', N'22', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'8', N'23', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'9', N'24', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'10', N'241', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'11', N'25', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'12', N'26', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'13', N'27', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'14', N'3', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'15', N'31', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'16', N'32', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'17', N'121', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'18', N'33', N'1') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'19', N'21', N'3') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'20', N'22', N'3') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'21', N'23', N'3') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'22', N'24', N'3') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'23', N'241', N'3') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'24', N'25', N'3') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'25', N'26', N'3') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'26', N'31', N'3') +GO + +INSERT INTO [dbo].[tbl_sys_permission] ([permission_id], [menu_id], [role_id]) VALUES (N'27', N'32', N'3') +GO + + +-- ---------------------------- +-- Table structure for tbl_sys_role +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_sys_role]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_sys_role] +GO + +CREATE TABLE [dbo].[tbl_sys_role] ( + [role_id] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [role_name] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_sys_role] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_sys_role +-- ---------------------------- +INSERT INTO [dbo].[tbl_sys_role] ([role_id], [role_name]) VALUES (N'1', N'管理员') +GO + +INSERT INTO [dbo].[tbl_sys_role] ([role_id], [role_name]) VALUES (N'2', N'普通用户') +GO + +INSERT INTO [dbo].[tbl_sys_role] ([role_id], [role_name]) VALUES (N'3', N'1') +GO + + +-- ---------------------------- +-- Table structure for tbl_sys_settings +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_sys_settings]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_sys_settings] +GO + +CREATE TABLE [dbo].[tbl_sys_settings] ( + [setting_id] int NOT NULL, + [setting_key] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [setting_value] nvarchar(1024) COLLATE Chinese_PRC_CI_AS NOT NULL, + [setting_type] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL, + [setting_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL +) +GO + +ALTER TABLE [dbo].[tbl_sys_settings] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_sys_settings +-- ---------------------------- +INSERT INTO [dbo].[tbl_sys_settings] ([setting_id], [setting_key], [setting_value], [setting_type], [setting_name]) VALUES (N'1', N'id', N'100000', N'1', N'唯一ID池') +GO + + +-- ---------------------------- +-- Table structure for tbl_sys_user +-- ---------------------------- +IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_sys_user]') AND type IN ('U')) + DROP TABLE [dbo].[tbl_sys_user] +GO + +CREATE TABLE [dbo].[tbl_sys_user] ( + [user_id] int NOT NULL, + [user_name] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [role_id] int NULL, + [login_account] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [login_password] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL, + [add_time] datetime NULL, + [update_time] datetime NULL, + [add_user] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL +) +GO + +ALTER TABLE [dbo].[tbl_sys_user] SET (LOCK_ESCALATION = TABLE) +GO + + +-- ---------------------------- +-- Records of tbl_sys_user +-- ---------------------------- +INSERT INTO [dbo].[tbl_sys_user] ([user_id], [user_name], [role_id], [login_account], [login_password], [add_time], [update_time], [add_user]) VALUES (N'1', N'管理员', N'1', N'admin', N'812C0C84E2970FA98456DDC5B0B59594', N'2023-03-23 11:17:06.000', N'2023-03-23 11:17:10.000', N'系统') +GO + +INSERT INTO [dbo].[tbl_sys_user] ([user_id], [user_name], [role_id], [login_account], [login_password], [add_time], [update_time], [add_user]) VALUES (N'2', N'用户', N'1', N'user', N'8F0E8370109158FF61228BA8CE9C04E8', N'2025-01-09 10:38:04.000', N'2025-01-09 10:38:06.000', N'系统') +GO + +INSERT INTO [dbo].[tbl_sys_user] ([user_id], [user_name], [role_id], [login_account], [login_password], [add_time], [update_time], [add_user]) VALUES (N'3', N'杨学谦', N'1', N'YXQ1215', N'D718776EF3616BE9CD866A9463E28E3C', N'2025-01-17 13:35:47.573', N'2025-01-17 13:35:47.573', N'系统') +GO + +INSERT INTO [dbo].[tbl_sys_user] ([user_id], [user_name], [role_id], [login_account], [login_password], [add_time], [update_time], [add_user]) VALUES (N'4', N'杨学谦', N'2', N'157', N'94786AC6B70C7358B54A1BF1F594D94A', N'2025-02-18 12:06:40.397', N'2025-02-18 12:06:40.397', N'系统') +GO + +INSERT INTO [dbo].[tbl_sys_user] ([user_id], [user_name], [role_id], [login_account], [login_password], [add_time], [update_time], [add_user]) VALUES (N'5', N'1', N'3', N'9', N'2C5588DC52A55F785F9B51114BD66D42', N'2025-02-19 10:42:02.323', N'2025-02-19 10:42:02.323', N'系统') +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_goods +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_goods] ADD CONSTRAINT [PK_tbl_app_goods] PRIMARY KEY CLUSTERED ([goods_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_kate_orders +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_kate_orders] ADD CONSTRAINT [PK__tbl_app___465962291D045FD5] PRIMARY KEY CLUSTERED ([order_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_location +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_location] ADD CONSTRAINT [PK_tbl_app_location] PRIMARY KEY CLUSTERED ([location_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_order_check +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_order_check] ADD CONSTRAINT [PK_tbl_app_order_check] PRIMARY KEY CLUSTERED ([record_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_order_in +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_order_in] ADD CONSTRAINT [PK_tbl_app_order_in] PRIMARY KEY CLUSTERED ([row_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_order_out +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_order_out] ADD CONSTRAINT [PK__tbl_app___6965AB576F7FB903] PRIMARY KEY CLUSTERED ([row_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_order_out_bak +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_order_out_bak] ADD CONSTRAINT [PK__tbl_app___6965AB57FF8BF9CE] PRIMARY KEY CLUSTERED ([row_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_stand +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_stand] ADD CONSTRAINT [PK_tbl_app_stand] PRIMARY KEY CLUSTERED ([stand_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_stock +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_stock] ADD CONSTRAINT [PK_tbl_app_stock] PRIMARY KEY CLUSTERED ([stock_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_task +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_task] ADD CONSTRAINT [PK_tbl_app_task] PRIMARY KEY CLUSTERED ([task_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_task_bak +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_task_bak] ADD CONSTRAINT [PK_tbl_app_task_bak] PRIMARY KEY CLUSTERED ([task_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_upload_record +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_upload_record] ADD CONSTRAINT [PK__tbl_app___A13DEF5804AA0377] PRIMARY KEY CLUSTERED ([upload_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_vehicle +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_vehicle] ADD CONSTRAINT [PK_tbl_app_vehicle] PRIMARY KEY CLUSTERED ([vehicle_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_app_vehicle_list +-- ---------------------------- +ALTER TABLE [dbo].[tbl_app_vehicle_list] ADD CONSTRAINT [PK__tbl_app___F2947BC1A187D00E] PRIMARY KEY CLUSTERED ([vehicle_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_sys_config +-- ---------------------------- +ALTER TABLE [dbo].[tbl_sys_config] ADD CONSTRAINT [PK_tbl_sys_config] PRIMARY KEY CLUSTERED ([config_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_sys_menu +-- ---------------------------- +ALTER TABLE [dbo].[tbl_sys_menu] ADD CONSTRAINT [PK_tbl_sys_menu] PRIMARY KEY CLUSTERED ([menu_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_sys_permission +-- ---------------------------- +ALTER TABLE [dbo].[tbl_sys_permission] ADD CONSTRAINT [PK_tbl_sys_permission] PRIMARY KEY CLUSTERED ([permission_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_sys_role +-- ---------------------------- +ALTER TABLE [dbo].[tbl_sys_role] ADD CONSTRAINT [PK_tbl_sys_role] PRIMARY KEY CLUSTERED ([role_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_sys_settings +-- ---------------------------- +ALTER TABLE [dbo].[tbl_sys_settings] ADD CONSTRAINT [PK_tbl_sys_settings] PRIMARY KEY CLUSTERED ([setting_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + + +-- ---------------------------- +-- Primary Key structure for table tbl_sys_user +-- ---------------------------- +ALTER TABLE [dbo].[tbl_sys_user] ADD CONSTRAINT [PK_tbl_sys_user] PRIMARY KEY CLUSTERED ([user_id]) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +ON [PRIMARY] +GO + diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 0000000..6382671 --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: com.wuxiShenNan_W8.WmsTestversionApplication + diff --git a/src/main/java/com/wms/.DS_Store b/src/main/java/com/wms/.DS_Store new file mode 100644 index 0000000..7dcefba Binary files /dev/null and b/src/main/java/com/wms/.DS_Store differ diff --git a/src/main/java/com/wms/WmsApplication.java b/src/main/java/com/wms/WmsApplication.java new file mode 100644 index 0000000..dbf14ac --- /dev/null +++ b/src/main/java/com/wms/WmsApplication.java @@ -0,0 +1,24 @@ +package com.wms; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableScheduling; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +@SpringBootApplication +@EnableScheduling +@EnableTransactionManagement +@MapperScan("com.wms.mapper") +public class WmsApplication { + + /** + * 主函数,程序的入口 + * + * @param args 命令行参数,以字符串数组形式传入 + */ + public static void main(String[] args) { + SpringApplication.run(WmsApplication.class, args); + } + +} diff --git a/src/main/java/com/wms/bussiness/JobComponent.java b/src/main/java/com/wms/bussiness/JobComponent.java new file mode 100644 index 0000000..d077986 --- /dev/null +++ b/src/main/java/com/wms/bussiness/JobComponent.java @@ -0,0 +1,544 @@ +package com.wms.bussiness; + +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; +import com.wms.constants.enums.*; +import com.wms.controller.BaseController; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.container.ContainerApiLocalResponse; +import com.wms.entity.app.container.CreateInstoreTaskRequest; +import com.wms.entity.app.container.SendContainerTaskRequest; +import com.wms.entity.app.wcs.WcsTask; +import com.wms.entity.table.*; +import com.wms.mapper.LocationMapper; +import com.wms.mapper.StockMapper; +import com.wms.mapper.TaskMapper; +import com.wms.service.*; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import com.wms.utils.storage.LocationUtils; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import java.util.*; + +/** + * 定期任务类 + */ +@Component +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class JobComponent extends BaseController { + /** + * 任务服务 + */ + private final TaskService taskService; + + /** + * 任务 Mapper + */ + private final TaskMapper taskMapper; + + /** + * 载具/料箱 服务 + */ + private final VehicleService vehicleService; + /** + * 库位服务 + */ + private final LocationService locationService; + + /** + * 库位 Mapper + */ + private final LocationMapper locationMapper; + + /** + * 库位操作类 + */ + private final LocationUtils locationUtils; + + /** + * 站台服务 + */ + private final StandService standService; + /** + * 配置服务 + */ + private final ConfigService configService; + /** + * 库存服务 + */ + private final StockService stockService; + private final TaskRecordService taskRecordService; + private final StockMapper stockMapper; + + + // + //@Scheduled(fixedDelay = 1000) + public void sendTasksToWcs() { + try { + // 查找待下发的任务 + Task taskForQuery = new Task(); + taskForQuery.setTaskStatus(WmsTaskStatus.NEW.getCode()); + List tasks = taskService.selTasks(taskForQuery); + if(tasks == null) { + logger.error("定时器下发任务发生异常,数据库查询任务列表失败"); + return; + } + for(Task task : tasks){ + if(task.getTaskType().equals(TaskType.IN.getCode())) { + sendTasksInToWcs(task); + return; + } + if(task.getTaskType().equals(TaskType.OUT.getCode()) || task.getTaskType().equals(TaskType.INVENTORY.getCode())){ + sendTasksOutToWcs(task); + return; + } + if(task.getTaskType().equals(TaskType.MOVE.getCode())){ + sendTasksMoveToWcs(task); + return; + } + } + }catch (Exception exception){ + logger.error("定时器下发任务发生异常:{}", exception.toString()); + } + } + + /** + * 发送入库任务给WCS + * @param task 任务 + */ + private void sendTasksInToWcs(Task task) { + try { + List thisLocations = locationService.selLocations(new Location(task.getDestination())); + if(thisLocations == null) { + logger.warn("下发入库任务查询库位详细信息失败,数据库网络连接异常,任务号:{}", task.getTaskId()); + return; + } + if(thisLocations.isEmpty()) { + logger.warn("下发入库任务查询库位详细信息异常,不存在详细信息,该库位可能不存在,任务号:{}", task.getTaskId()); + Task taskForUpdate = new Task(); + taskForUpdate.setTaskId(task.getTaskId()); + taskForUpdate.setTaskStatus(WmsTaskStatus.EXCEPTION.getCode()); + taskForUpdate.setRemark1("该库位不存在"); + taskService.executeTask(taskForUpdate); + return; + } + List request = new ArrayList<>(); + // 创建发送的任务 + WcsTask tempTask = new WcsTask(); + tempTask.setTaskId(task.getTaskId()); + tempTask.setTaskType(TaskType.IN.getCode()); + tempTask.setOrigin(task.getOrigin()); + tempTask.setDestination(task.getDestination()); + tempTask.setVehicleNo(task.getVehicleNo()); + tempTask.setVehicleSize(1); + tempTask.setWeight(task.getWeight() == null ? 0 : task.getWeight()); + tempTask.setPriority(task.getTaskPriority()); + request.add(tempTask); + // 发送任务 + ResponseEntity result = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(UrlEnums.URL_WMS_TO_WCS_SEND_TASK.getValue(), JSON.toJSONString(request)), ResponseEntity.class); + if (result != null && Objects.equals(ResponseCode.OK.getCode(), result.getCode())) { + logger.info("下发立库入库任务成功,任务ID:{},任务信息:{}", tempTask.getTaskId(), JSON.toJSONString(request)); + Task taskForUpdate = new Task(); + taskForUpdate.setTaskId(task.getTaskId()); + taskForUpdate.setTaskStatus(WmsTaskStatus.WAIT.getCode()); + taskService.executeTask(taskForUpdate); + return; + } + logger.info("下发立库入库任务失败,任务ID:{},信息:{}", tempTask.getTaskId(), JSON.toJSONString(result)); + }catch (Exception exception){ + logger.error("下发入库任务发生异常:{}", exception.toString()); + } + } + + /** + * 发送出库任务给WCS + * @param task 任务 + */ + private void sendTasksOutToWcs(Task task) { + /* 检查该库位前一个深度是否存在库存,若存在库存则生成一个移库任务,此任务暂不下发 */ + List thisLocations = locationService.selLocations(new Location(task.getOrigin())); + if(thisLocations == null) { + logger.warn("下发出库任务查询库位详细信息失败,数据库网络连接异常,库位号:{}", task.getOrigin()); + return; + } + if(thisLocations.isEmpty()) { + logger.warn("下发出库任务查询库位详细信息异常,不存在详细信息,该库位可能不存在,任务号:{}", task.getTaskId()); + Task taskForUpdate = new Task(); + taskForUpdate.setTaskId(task.getTaskId()); + taskForUpdate.setTaskStatus(WmsTaskStatus.EXCEPTION.getCode()); + taskForUpdate.setRemark1("该库位不存在"); + taskService.executeTask(taskForUpdate); + return; + } + Location thisLocation = thisLocations.get(0); // 找出当前库位详细信息 + int depth = thisLocation.getDepth(); + while (depth > 1) { + depth--; + /* 检查该库位有没有任务,若有则退出函数,若没有则检查有没有库存,若没有库存则继续,若有库存则生成一个移库任务,生成之后退出函数 */ + Location beforLocationsQuery = new Location(); + beforLocationsQuery.setAreaId(thisLocation.getAreaId()); + beforLocationsQuery.setQueue(thisLocation.getQueue()); + beforLocationsQuery.setLine(thisLocation.getLine()); + beforLocationsQuery.setLayer(thisLocation.getLayer()); + beforLocationsQuery.setDepth(depth); + //需要检查三巷道,如果是小托盘需要倒序,大托盘就正序 + List beforLocations =locationService.selDescLocations(beforLocationsQuery); + if(thisLocation.getTunnelId() == 3){ + //终点104的是大托盘,241的是小托盘 + if (Objects.equals(task.getDestination(), "104")){ + beforLocations = locationService.selLocations(beforLocationsQuery); + } + } + //List beforLocations = beforLocationsForWrite; + if(beforLocations == null) { + logger.warn("下发出库任务查询库位详细信息失败,数据库网络连接异常,任务号:{}", task.getTaskId()); + return; + } + if(beforLocations.isEmpty()) { + return; + } + Location beforLocation = beforLocations.get(0); // 前一个库位 + List notCompleteTasks = taskMapper.haveNotCompleteTask(beforLocation.getLocationId()); + if(notCompleteTasks == null) { + return; + } + if(!notCompleteTasks.isEmpty()) { + return; // 存在未完成的任务,退出函数 + } + // 检查前一个位置是否有库存 + Stock stockQuery = new Stock(); + stockQuery.setLocationId(beforLocation.getLocationId()); + List stocks = stockService.selStocks(stockQuery); + if(stocks == null) { + return; + } + if(stocks.isEmpty()) { + continue; // 没有库存,继续 + } + /* 生成一个移库任务 */ + /* 查找一个空库位 */ + Location emptyLocation = new Location(); + emptyLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + emptyLocation.setAreaId(beforLocation.getAreaId()); + //需要判断,大小托盘查找库位需要做区分 + List emptyLocations; + if (beforLocation.getTunnelId() == 3){ + emptyLocations = locationMapper.selLocationsByDesc(emptyLocation); + }else { + emptyLocations = locationMapper.selLocations(emptyLocation); + } + + if(emptyLocations == null) { + return; + } + if(emptyLocations.isEmpty()){ + return; // 移库没有可用库位 + } + Location emptyLocationItem = locationUtils.checkCanUse(emptyLocations); // 取得新库位 + if(emptyLocationItem == null) { + return; // 没有可用库位或者m库位存在干涉 + } + // 锁定旧库位库存 + stockMapper.updateStockStatusWithLocationId(beforLocation.getLocationId(), StockStatus.LOCK.getCode()); + // 锁定新库位 + Location locationForUpdate = new Location(); + locationForUpdate.setLocationId(emptyLocationItem.getLocationId()); + locationForUpdate.setLocationStatus(LocationStatus.OCCUPY.getCode()); + locationMapper.modifyLocation(locationForUpdate); + // 构造移库任务 + Task moveTask = new Task(); + moveTask.setTaskId(UUID.randomUUID().toString()); + moveTask.setTaskGroup(task.getTaskGroup()); + moveTask.setTaskType(TaskType.MOVE.getCode()); + moveTask.setOrigin(beforLocation.getLocationId()); + moveTask.setDestination(emptyLocationItem.getLocationId()); + moveTask.setVehicleNo(stocks.get(0).getVehicleId()); + moveTask.setVehicleSize(0); + moveTask.setWeight(0.0); + moveTask.setTaskPriority(9); + moveTask.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskService.addTask(moveTask); + return; + } + // 宝开立库 + List request = new ArrayList<>(); + // 创建发送的任务 + WcsTask tempTask = new WcsTask(); + tempTask.setTaskId(task.getTaskId()); + tempTask.setTaskType(task.getTaskType()); + tempTask.setOrigin(task.getOrigin()); + tempTask.setDestination(task.getDestination()); + tempTask.setVehicleNo(task.getVehicleNo()); + tempTask.setVehicleSize(1); + tempTask.setWeight(task.getWeight() == null ? 0 : task.getWeight()); + tempTask.setPriority(task.getTaskPriority()); + request.add(tempTask); + // 发送任务 + ResponseEntity result = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(UrlEnums.URL_WMS_TO_WCS_SEND_TASK.getValue(), JSON.toJSONString(request)), ResponseEntity.class); + if (result != null && Objects.equals(ResponseCode.OK.getCode(), result.getCode())) { + logger.info("下发立库出库任务成功,任务ID:{}", tempTask.getTaskId()); + Task taskForUpdate = new Task(); + taskForUpdate.setTaskId(task.getTaskId()); + taskForUpdate.setTaskStatus(WmsTaskStatus.WAIT.getCode()); + taskService.executeTask(taskForUpdate); + return; + } + if (result != null) { + logger.info("下发立库出库任务失败,任务ID:{},信息:{},result结果:{}", tempTask.getTaskId(), JSON.toJSONString(result),result.getCode()); + } + + } + + /** + * 发送移库任务给WCS + * @param task 任务 + */ + private void sendTasksMoveToWcs(Task task) { + /* 检查该库位前一个深度是否存在库存,若存在库存则生成一个移库任务,此任务暂不下发 */ + List thisLocations = locationService.selLocations(new Location(task.getOrigin())); + if(thisLocations == null) { + logger.warn("下发移库任务查询库位详细信息失败,数据库网络连接异常,任务号:{}", task.getTaskId()); + return; + } + if(thisLocations.isEmpty()) { + logger.warn("下发移库任务查询库位详细信息异常,不存在详细信息,该库位可能不存在,任务号:{}", task.getTaskId()); + Task taskForUpdate = new Task(); + taskForUpdate.setTaskId(task.getTaskId()); + taskForUpdate.setTaskStatus(WmsTaskStatus.EXCEPTION.getCode()); + taskForUpdate.setRemark1("该库位不存在"); + taskService.executeTask(taskForUpdate); + return; + } + Location thisLocation = thisLocations.get(0); // 找出当前库位详细信息 + int depth = thisLocation.getDepth(); + while (depth > 1) { + depth--; + /* 检查该库位有没有任务,若有则退出函数,若没有则检查有没有库存,若没有库存则继续,若有库存则生成一个移库任务,生成之后退出函数 */ + Location beforLocationsQuery = new Location(); + beforLocationsQuery.setAreaId(thisLocation.getAreaId()); + beforLocationsQuery.setQueue(thisLocation.getQueue()); + beforLocationsQuery.setLine(thisLocation.getLine()); + beforLocationsQuery.setLayer(thisLocation.getLayer()); + beforLocationsQuery.setDepth(depth); + List beforLocations = locationService.selLocations(beforLocationsQuery); + if(beforLocations == null) { + logger.warn("下发移库任务查询库位详细信息失败,数据库网络连接异常,任务号:{}", task.getTaskId()); + return; + } + if(beforLocations.isEmpty()) { + return; + } + Location beforLocation = beforLocations.get(0); // 前一个库位 + List notCompleteTasks = taskMapper.haveNotCompleteTask(beforLocation.getLocationId()); + if(notCompleteTasks == null) { + return; + } + for(Task notCompleteTask : notCompleteTasks) { + String taskId = notCompleteTask.getTaskId(); + if(!taskId.equals(task.getTaskId())) { + return; + } + } + // 检查是否有库存、 + Stock stockQuery = new Stock(); + stockQuery.setLocationId(beforLocation.getLocationId()); + List stocks = stockService.selStocks(stockQuery); + if(stocks == null) { + return; + } + if(stocks.isEmpty()) { + continue; // 没有库存,继续 + } + /* 生成一个移库任务 */ + /* 查找一个空库位 */ + Location emptyLocation = new Location(); + emptyLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + emptyLocation.setAreaId(beforLocation.getAreaId()); + List emptyLocations = locationMapper.selLocations(emptyLocation); + if(emptyLocations == null) { + return; + } + if(emptyLocations.isEmpty()){ + return; // 移库没有可用库位 + } + Location emptyLocationItem = locationUtils.checkCanUse(emptyLocations); // 取得新库位 + if(emptyLocationItem == null) { + return; // 没有可用库位或者m库位存在干涉 + } + // 锁定旧库位库存 + stockMapper.updateStockStatusWithLocationId(beforLocation.getLocationId(), StockStatus.LOCK.getCode()); + // 锁定新库位 + Location locationForUpdate = new Location(); + locationForUpdate.setLocationId(emptyLocationItem.getLocationId()); + locationForUpdate.setLocationStatus(LocationStatus.OCCUPY.getCode()); + locationMapper.modifyLocation(locationForUpdate); + // 构造移库任务 + Task moveTask = new Task(); + moveTask.setTaskId(UUID.randomUUID().toString()); + moveTask.setTaskGroup(task.getTaskGroup()); + moveTask.setTaskType(TaskType.MOVE.getCode()); + moveTask.setOrigin(beforLocation.getLocationId()); + moveTask.setDestination(emptyLocationItem.getLocationId()); + moveTask.setVehicleNo(stocks.get(0).getVehicleId()); + moveTask.setVehicleSize(0); + moveTask.setWeight(0.0); + moveTask.setTaskPriority(9); + moveTask.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskService.addTask(moveTask); + return; + } + if(thisLocation.getAreaId() == 1) { // 宝开立库 + List request = new ArrayList<>(); + // 创建发送的任务 + WcsTask tempTask = new WcsTask(); + tempTask.setTaskId(task.getTaskId()); + tempTask.setTaskType(TaskType.MOVE.getCode()); + tempTask.setOrigin(task.getOrigin()); + tempTask.setDestination(task.getDestination()); + tempTask.setVehicleNo(task.getVehicleNo()); + tempTask.setVehicleSize(1); + tempTask.setWeight(task.getWeight() == null ? 0 : task.getWeight()); + tempTask.setPriority(task.getTaskPriority()); + request.add(tempTask); + // 发送任务 + ResponseEntity result = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(UrlEnums.URL_WMS_TO_WCS_SEND_TASK.getValue(), JSON.toJSONString(request)), ResponseEntity.class); + if (result != null && Objects.equals(ResponseCode.OK.getCode(), result.getCode())) { + logger.info("下发立库移库任务成功,任务ID:{}", tempTask.getTaskId()); + Task taskForUpdate = new Task(); + taskForUpdate.setTaskId(task.getTaskId()); + taskForUpdate.setTaskStatus(WmsTaskStatus.WAIT.getCode()); + taskService.executeTask(taskForUpdate); + return; + } + logger.info("下发立库移库任务失败,任务ID:{},信息:{}", tempTask.getTaskId(), JSON.toJSONString(result)); + } + } + + + + + /** + * 每隔一秒检索一遍任务列表,同时向WCS下发任务 + */ +// @Scheduled(fixedDelay = 1000) + public void executeTasks() { + try { + // 检索任务列表,查询状态为等待状态的任务 + Task taskForQuery = new Task(); + taskForQuery.setTaskStatus(WmsTaskStatus.NEW.getCode()); + List tasks = taskService.selTasks(taskForQuery); + // 相同任务组的任务只发一次 + List taskGroupIds = new LinkedList<>(); + List request = new ArrayList<>(); + if (!tasks.isEmpty()) {// 存在等待中的任务 + for (Task task : tasks) { + if (taskGroupIds.contains(task.getTaskGroup())) {// 该taskGroup的任务已经发送过 + task.setTaskStatus(WmsTaskStatus.WAIT.getCode()); + continue; + } + // 创建发送的任务 + WcsTask tempTask = new WcsTask(); + tempTask.setTaskId(task.getTaskGroup()); + if (TaskType.OUT.getCode().equals(task.getTaskType()) || TaskType.INVENTORY.getCode().equals(task.getTaskType())) { + tempTask.setTaskType(TaskType.OUT.getCode()); + } else { + tempTask.setTaskType(TaskType.IN.getCode()); + } + tempTask.setOrigin(task.getOrigin()); + tempTask.setDestination(task.getDestination()); + tempTask.setVehicleNo(task.getVehicleNo()); + tempTask.setVehicleSize(1); + tempTask.setWeight(task.getWeight() == null ? 0 : task.getWeight()); + tempTask.setPriority(task.getTaskPriority()); + request.add(tempTask); + + taskGroupIds.add(task.getTaskGroup()); + task.setTaskStatus(WmsTaskStatus.WAIT.getCode()); + } + if (request.isEmpty()) { + return; + } + // 发送任务 + ResponseEntity result = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(UrlEnums.URL_WMS_TO_WCS_SEND_TASK.getValue(), JSON.toJSONString(request)), ResponseEntity.class); + if (result != null && Objects.equals(ResponseCode.OK.getCode(), result.getCode())) { + // 更新任务列表 + for (Task task : tasks) { + // 更新任务 + taskService.executeTask(task); + } + } + } + } catch (Exception exception) { + logger.error("发生异常:{}", exception.getMessage()); + } + } + + /** + * 定期检查设备状态 + * 5秒钟 + */ +// @Scheduled(fixedDelay = 5000) + public void checkEquipmentStatus() { + + } + + /** + * 每天查询一次是否有过期的库存 + * 每天晚上8点执行一次 + */ +// @Scheduled(cron = "0 0 20 * * ?") + public void detectOutOfDateStock() { + logger.info("执行定时任务:查询过期库存"); + List outOfDateStocks = stockService.selStockOutOfDate(); + if (!outOfDateStocks.isEmpty()) { + logger.info("过期库存数量不为0,准备更新过期库存"); + for (Stock outOfDateStock : outOfDateStocks) { + try { + outOfDateStock.setGoodsStatus(GoodsStatus.OVERDUE.getCode()); + stockService.modifyStock(outOfDateStock); + logger.info("过期库存更新成功"); + } catch (Exception e) { + logger.error("过期库存更新异常:{}", e.getMessage()); + } + } + } + } + + /** + * 每天查询一次是否有入库后长期未使用的库存 + * 每天晚上9点执行一次 + */ +// @Scheduled(cron = "0 0 21 * * ?") + public void detectStockLongTimeNoUse() { + logger.info("执行定时任务:查询是否有入库后长期未使用的库存"); + List stocksLongTimeNoUse = stockService.selStockLongTimeNoUse(7); + if (!stocksLongTimeNoUse.isEmpty()) { + logger.info("有入库后长期未使用的库存, 准备更新库存状态"); + for (Stock stockLongTimeNoUse : stocksLongTimeNoUse) { + try { + stockLongTimeNoUse.setGoodsStatus(GoodsStatus.SCRAP.getCode()); + stockService.modifyStock(stockLongTimeNoUse); + logger.info("长时间未使用库存状态更新成功"); + } catch (Exception e) { + logger.error("长时间未使用库存状态更新异常:{}", e.getMessage()); + } + } + } + } + + /** + * 每天查询一次是否有过期记录 + * 每天晚上10点执行一次 + */ + //@Scheduled(cron = "0 0 22 * * ?") + public void deleteOutOfDateData() { + logger.info("执行定时任务:删除过期数据"); + taskRecordService.deleteTaskRecordRegularly(); + } + + +} \ No newline at end of file diff --git a/src/main/java/com/wms/bussiness/TaskOperation.java b/src/main/java/com/wms/bussiness/TaskOperation.java new file mode 100644 index 0000000..758bf3f --- /dev/null +++ b/src/main/java/com/wms/bussiness/TaskOperation.java @@ -0,0 +1,791 @@ +package com.wms.bussiness; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.*; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.mes.*; +import com.wms.entity.app.wcs.WmsReceiveTaskResultEntity; +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.table.*; +import com.wms.mapper.*; +import com.wms.service.PartInfoService; +import com.wms.utils.HttpUtils; +import com.wms.utils.WmsUtils; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.formula.functions.Now; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.bind.annotation.RequestBody; + +import javax.swing.plaf.synth.Region; +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; + + +/** + * 对任务的操作 + */ +@Slf4j +@Component +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class TaskOperation { + + /** + * 库存 Mapper + */ + private final StockMapper stockMapper; + + /** + * 任务表操作类 + */ + private final TaskMapper taskMapper; + + /** + * 库位表操作类 + */ + private final LocationMapper locationMapper; + + /** + * 零件 + */ + private final PartInfoService partInfoService; + private final OrderOutMapper orderOutMapper; + private final TaskRecordMapper taskRecordMapper; + private final VehicleMapper vehicleMapper; + private final OledInMapper oledInMapper; + /** + * 订单入库 + */ + private final com.wms.mapper.AppOrderInMapper appOrderInMapper; + + + //region 完成任务 + /** + * 完成任务 + * @param task 要完成的任务 + * @return 操作结果 + */ + public boolean completeTask(Task task) { + if(task == null) { + return false; + } + TaskType taskType = TaskType.getTaskType(task.getTaskType()); + if(taskType == null) { + return false; + } + /* 根据任务类型判断 */ + return switch (taskType) { + case IN -> completeInTask(task); + case OUT -> completeOutTask(task); + case INVENTORY -> completeInventoryTask(task); + case MOVE -> completeMoveTask(task); + }; + } + + /** + * 完成入库任务 + * @param task 要完成的入库任务 + * @return 结果 + */ + private boolean completeInTask(Task task) { + /* 找出任务,完成该任务;找出该任务终点,更新库存为OK */ + // 完成任务 + Task completeTask = new Task(); + completeTask.setTaskId(task.getTaskId()); + completeTask.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + completeTask.setFinishTime(new Date()); + taskMapper.executeTask(completeTask); // 完成任务 + //占掉新库位,生成的时候会占,这里重复操作保护 + Location occupyLocation = new Location(); + occupyLocation.setLocationId(task.getDestination()); + occupyLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + occupyLocation.setVehicleId(task.getVehicleNo()); + locationMapper.modifyLocation(occupyLocation); // 更新库位 + //判断是否为空托入库,是的话就写入载具表,不写入库存表 + if (Objects.equals(task.getRemark1(), "空托垛入库")){ + Vehicle vehicleForUse = new Vehicle(); + vehicleForUse.setVehicleStatus(0); + vehicleForUse.setCurrentLocation(task.getDestination()); + if (Objects.equals(task.getPickStand(), "大")){ + vehicleForUse.setIsEmpty(1); + }else{ + vehicleForUse.setIsEmpty(0); + } + //1代表是大托盘,0代表是小托盘 + vehicleForUse.setVehicleId(task.getVehicleNo()); + int a = vehicleMapper.addVehicle(vehicleForUse); + if (a > 0){ + log.info("空托入库更新载具表成功!"); + }else {log.info("空托入库更新载具表失败!");} + //写进库存 + Stock addStock = new Stock(); + addStock.setStockId(WmsUtils.generateUUIDString()); + addStock.setWarehouseName("珀金斯立体库"); + addStock.setLocationId(task.getDestination()); + addStock.setVehicleId(task.getVehicleNo()); + addStock.setGoodsId(task.getGoodsId());//物料号,序列号 + addStock.setGoodsName(task.getGoodsName());//机型 + //机型,序列号,物料号,数量,入库日期 + addStock.setBatchNo("空托垛"); + addStock.setAvailableNum(task.getOperateNum());//数量 + addStock.setRealNum(task.getOperateNum()); + addStock.setProviderId(""); + addStock.setProviderName(task.getPickStand());//判断大小托盘 + //addStock.setProductionDate(null); + addStock.setExpirationDate(null); + addStock.setStockStatus(0); + addStock.setGoodsStatus(null); + addStock.setCreateTime(new Date());//入库日期 + addStock.setLastUpdateTime(null); + addStock.setLastUpdateUser(""); + addStock.setRemark(task.getRemark1()); + addStock.setProductionDate(task.getProductionDate()); + // 整箱入库直接更新库存 + int aA = stockMapper.addStock(addStock); + if (aA == 0){//表示添加库存失败 + log.info("空托垛入库完成更新库存失败,任务:{},原因:添加库存失败", task.toLoggerString()); + for (int i = 0; i < 5; i++) { + int b =stockMapper.addStock(addStock); + if (b != 0){ + log.info("空托垛入库更新库存重试成功,托盘号:{}", task.getVehicleNo()); + break; + } + } + }else { + log.info("空托垛入库完成更新库存成功,托盘号:{}", task.getVehicleNo()); + } + } else if (Objects.equals(task.getGoodsId(), "YJRK0001")) { + //代表是原材料并箱入库 + List appOrderInList = appOrderInMapper.selectWithVehicle(task.getVehicleNo()); + for (AppOrderIn appOrderIn : appOrderInList) { + //写进库存 + Stock stock = new Stock(); + stock.setStockId(WmsUtils.generateUUIDString()); + stock.setWarehouseName("珀金斯立体库"); + stock.setLocationId(task.getDestination()); + stock.setVehicleId(task.getVehicleNo()); + stock.setGoodsId(appOrderIn.getGoodsId());//物料号,序列号 + //stock.setGoodsName(task.getGoodsName());//机型 + //机型,序列号,物料号,数量,入库日期 + stock.setBatchNo(task.getUserName()); + stock.setAvailableNum(appOrderIn.getGoodsNum().intValue());//数量 + stock.setRealNum(appOrderIn.getGoodsNum().intValue()); + stock.setProviderId(""); + stock.setProviderName(task.getPickStand());//判断大小托盘 + //addStock.setProductionDate(null); + stock.setExpirationDate(null); + stock.setStockStatus(0); + stock.setGoodsStatus(null); + stock.setCreateTime(new Date());//入库日期 + stock.setLastUpdateTime(null); + stock.setLastUpdateUser(""); + stock.setRemark(task.getRemark1()); + stock.setProductionDate(appOrderIn.getProductionDate()); + if (stockMapper.addStock(stock) > 0){ + log.info("原材料入库更新库存重试成功,托盘号:{}", task.getVehicleNo()); + }else { + log.info("原材料入库更新库存重试失败,托盘号:{}", task.getVehicleNo()); + } + } + //删除入库单 + if (appOrderInMapper.deleteByVehicleNo(task.getVehicleNo()) > 0){ + log.info("原材料入库删除入库单成功,托盘号:{}", task.getVehicleNo()); + } + } else if (Objects.equals(task.getOrigin(), "104")) { + if(stockMapper.updateStockStatusWithLocationId(task.getDestination(), 0) > 0){ + log.info("更新库存成功,托盘号:{}", task.getVehicleNo()); + } + log.error("更新库存失败,托盘号:{}", task.getVehicleNo()); + } else { + //写进库存 + Stock addStock = new Stock(); + addStock.setStockId(WmsUtils.generateUUIDString()); + addStock.setWarehouseName("珀金斯立体库"); + addStock.setLocationId(task.getDestination()); + addStock.setVehicleId(task.getVehicleNo()); + addStock.setGoodsId(task.getGoodsId());//物料号,序列号 + addStock.setGoodsName(task.getGoodsName());//机型 + //机型,序列号,物料号,数量,入库日期 + addStock.setBatchNo(task.getUserName()); + addStock.setAvailableNum(task.getOperateNum());//数量 + addStock.setRealNum(task.getOperateNum()); + addStock.setProviderId(""); + addStock.setProviderName(task.getPickStand());//判断大小托盘 + //addStock.setProductionDate(null); + addStock.setExpirationDate(null); + addStock.setStockStatus(0); + addStock.setGoodsStatus(null); + addStock.setCreateTime(new Date());//入库日期 + addStock.setLastUpdateTime(null); + addStock.setLastUpdateUser(""); + addStock.setRemark(task.getRemark1()); + addStock.setProductionDate(task.getProductionDate()); + // 整箱入库直接更新库存 + int a = stockMapper.addStock(addStock); + if (a == 0){//表示添加库存失败 + log.info("入库完成更新库存失败,任务:{},原因:添加库存失败", task.toLoggerString()); + for (int i = 0; i < 5; i++) { + int b =stockMapper.addStock(addStock); + if (b != 0){ + log.info("入库更新库存重试成功,托盘号:{}", task.getVehicleNo()); + break; + } + } + }else { + log.info("入库完成更新库存成功,托盘号:{}", task.getVehicleNo()); + } + } + + //开始将入库记录备份进task备份表 + Task taskRecordBack = new Task(); + taskRecordBack.setTaskId(task.getTaskId()); + taskRecordBack.setTaskType(1); + taskRecordBack.setGoodsName(task.getGoodsName()); + taskRecordBack.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + taskRecordBack.setOrigin(task.getOrigin()); + taskRecordBack.setDestination(task.getDestination()); + taskRecordBack.setVehicleNo(task.getVehicleNo()); + taskRecordBack.setCreateTime(task.getCreateTime()); + taskRecordBack.setGoodsId(task.getGoodsId()); + taskRecordBack.setOperateNum(task.getOperateNum()); + taskRecordBack.setFinishTime(new Date()); + int x = taskRecordMapper.addTask(taskRecordBack); + if (x == 0){ + log.info("入库更新任务备份表失败,任务:{},", task.toLoggerString()); + for (int i = 0; i < 5; i++) { + int d = taskRecordMapper.addTask(taskRecordBack); + if (d != 0){ + log.info("入库更新任务备份表重试成功,托盘号:{}", task.getVehicleNo()); + break; + } + } + }else { + log.info("入库更新任务备份表成功,托盘号:{}", task.getVehicleNo()); + } + //入库完成删除Task表 + int abx = taskMapper.deleteTask(task.getTaskId()); + if (abx == 0){ + log.info("入库删除任务表失败,任务:托盘号:{}", task.getVehicleNo()); + for (int i = 0; i < 5; i++) { + int c = taskMapper.deleteTask(task.getTaskId()); + if (c != 0){ + log.info("入库删除任务表重试成功,托盘号:{}", task.getVehicleNo()); + break; + } + } + }else { + log.info("入库删除任务表成功"); + } + //入库完成删除oled显示内容 + if(oledInMapper.deleteByVehicleNo(task.getVehicleNo())>0){ + log.info("入库删除oled显示内容成功,托盘号:{}", task.getVehicleNo()); + }else { + log.info("入库删除oled显示内容失败,托盘号:{}", task.getVehicleNo()); + } + return true; + } + + + /** + * 完成出库任务 + * @param task 要完成的出库任务 + * @return 执行结果 + */ + private boolean completeOutTask(Task task) { + /* 找出任务,完成该任务;找出该任务终点,删除库存;释放库位 */ + // 完成任务 + Task completeTask = new Task(); + completeTask.setTaskId(task.getTaskId()); + completeTask.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + completeTask.setFinishTime(new Date()); + taskMapper.executeTask(completeTask); // 完成任务 + // 释放库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(task.getOrigin()); + updateLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + updateLocation.setVehicleId(""); + locationMapper.modifyLocation(updateLocation); // 更新库位为空 + +// // 根据起点拉取库位库存,剩下数量不为零的数据搬运到入库单 生成回库任务,删除该库位所有库存 +// List stocks = stockMapper.selStocksByLocationId(task.getOrigin()); +// if (stocks == null || stocks.isEmpty()){ +// log.error("拉取库存失败,任务:{},原因:没有找到库存数据", task.toLoggerString()); +// return false; +// } +// for (Stock stock : stocks){ +// if (stock.getAvailableNum() > 0){ +// AppOrderIn appOrderIn = new AppOrderIn(); +// appOrderIn.setRowId(WmsUtils.generateUUIDString()); +// appOrderIn.setGuid(stock.getStockId()); +// appOrderIn.setInType(1); +// appOrderIn.setBatchNo(stock.getBatchNo()); +// appOrderIn.setVehicleNo(task.getVehicleNo()); +// appOrderIn.setGoodsId(stock.getGoodsId()); +// appOrderIn.setGoodsNum(BigDecimal.valueOf(stock.getAvailableNum())); +// appOrderIn.setWareHouse(stock.getWarehouseName()); +// if (stock.getVehicleId() != null && !stock.getVehicleId().isEmpty()){ +// appOrderIn.setOrderStatus(2); +// }else { +// appOrderIn.setOrderStatus(0); +// } +// appOrderIn.setCreateTime(LocalDate.now()); +// appOrderIn.setUpdateTime(LocalDateTime.now()); +// appOrderIn.setCreatePerson("BACK"); +// appOrderIn.setRemark("回库"); +// int isSuessInsert = appOrderInMapper.insert(appOrderIn); +// if(isSuessInsert > 0){ +// log.info("回库任务生成成功,任务:{}", task.toLoggerString()); +// }else{ +// log.error("回库任务生成失败,任务:{}", task.toLoggerString()); +// } +// } +// } + //空托出库删除载具表 + if (Objects.equals(task.getRemark1(), "空托垛出库")){ + Vehicle vehicle = new Vehicle(); + vehicle.setCurrentLocation(task.getOrigin()); + vehicleMapper.deleteVehicleByLocation(vehicle); + log.info("空托垛出库删除载具单成功"); + } + + //开始将chu库记录备份进task备份表 + + Task taskRecordBack = new Task(); + taskRecordBack.setTaskId(task.getTaskId()); + taskRecordBack.setTaskType(2); + taskRecordBack.setGoodsName(task.getGoodsName()); + taskRecordBack.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + taskRecordBack.setOrigin(task.getOrigin()); + taskRecordBack.setDestination(task.getDestination()); + taskRecordBack.setVehicleNo(task.getVehicleNo()); + taskRecordBack.setCreateTime(task.getCreateTime()); + taskRecordBack.setGoodsId(task.getGoodsId()); + taskRecordBack.setOperateNum(task.getOperateNum()); + taskRecordBack.setFinishTime(new Date()); + taskRecordBack.setTaskPriority(task.getTaskPriority()); + int x = taskRecordMapper.addTask(taskRecordBack); + if (x == 0){ + log.info("出库更新任务备份表失败,任务:{},", task.toLoggerString()); + for (int i = 0; i < 5; i++) { + int d = taskRecordMapper.addTask(taskRecordBack); + if (d != 0){ + log.info("出库更新任务备份表重试成功,任务:{}", task.toLoggerString()); + break; + } + } + }else { + log.info("出库更新任务备份表成功,任务:{}", task.toLoggerString()); + } + //删除task表数据 + int deleteResultForTask = taskMapper.deleteTask(task.getTaskId()); + if (deleteResultForTask == 0){ + for (int i = 0; i < 5; i++) { + int d = taskMapper.deleteTask(task.getTaskId()); + if (d != 0){ + log.info("出库完成删除Task成功"); + break; + } + } + log.info("出库完成删除Task失败,重新"); + }else { + log.info("出库完成删除Task成功,任务:{}", task.toLoggerString()); + } + if(!Objects.equals(task.getRemark1(), "空托垛出库") && !Objects.equals(task.getTaskGroup(), "PYPK")){ + // 删除手动出库的出库单 + List outList = orderOutMapper.queryWithRowId(task.getTaskGroup()); + if (outList == null || outList.isEmpty()){ + log.info("出库的出库单不存在,任务:{}", task.toLoggerString()); + return false; + } + if (outList.get(0).getOrderType() == 2){ + orderOutMapper.deleteOrderOut(task.getTaskGroup()); + log.info("手动出库的出库单删除成功,任务:{}", task.toLoggerString()); + }else{ + //更改出库单状态为完成 + OrderOut orderOutUpdateStatus = new OrderOut(); + orderOutUpdateStatus.setRowId(task.getTaskGroup()); + orderOutUpdateStatus.setStatus(OrderOutStatusEnum.FINISHED.getCode()); + int a = orderOutMapper.update(orderOutUpdateStatus); + if (a > 0){ + log.info("更新出库单状态成功"); + }else { + log.info("更新出库单状态失败"); + } + } + // 删除当前载具号的所有库存,出库单更新状 + int updateStock = stockMapper.deleteStockWithLocationId(task.getOrigin()); + if(updateStock > 0){ + log.info("出库完成删除库存成功,任务:{}", task.toLoggerString()); + return true; + } + }else{ + // 删除当前载具号的所有库存,出库单更新状 + int updateStock = stockMapper.deleteStockWithLocationId(task.getOrigin()); + if(updateStock > 0){ + log.info("空托出库完成删除库存成功,任务:{}", task.toLoggerString()); + }else{ + log.info("空托出库完成删除库存失败,任务:{}", task.toLoggerString()); + } + log.info("空托垛出库完成,任务:{}", task.toLoggerString()); + return true; + } + + return false; + } + + /** + * 完成盘点任务 + * @param task 任务 + * @return 完成结果 + */ + private boolean completeInventoryTask(Task task) { + /* 找出任务,完成该任务;找出该任务终点,删除库存;释放库位 */ + // 完成任务 + Task completeTask = new Task(); + completeTask.setTaskId(task.getTaskId()); + completeTask.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + completeTask.setFinishTime(new Date()); + taskMapper.executeTask(completeTask); // 完成任务 + // 释放库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(task.getOrigin()); + updateLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + updateLocation.setVehicleId(""); + locationMapper.modifyLocation(updateLocation); // 更新库位为空 + // 根据起点拉取库位库存,剩下数量不为零的数据搬运到入库单 生成回库任务,删除该库位所有库存 + List stocks = stockMapper.selStocksByLocationId(task.getOrigin()); + if (stocks == null || stocks.isEmpty()){ + log.error("完成盘点出库拉取库存失败,任务:{},原因:没有找到库存数据", task.toLoggerString()); + return false; + } +// Stock stock = stocks.get(0); + if (Objects.equals(stocks.get(0).getRemark(), "原材料")){ +// //生成盘点回库单 +// if(Objects.equals(task.getDestination(), "104")){ +// //说明是大托盘回库,自动生成入库单并绑定母托,使用原材料页面查看然后可以生成任务。 +// List appOrderInList = new ArrayList<>(); +// for(Stock stock : stocks){ +// AppOrderIn appOrderIn = new AppOrderIn(); +// appOrderIn.setRowId(WmsUtils.generateUUIDString()); +// appOrderIn.setGuid(task.getTaskId());//用来存盘点出库的taskid,在完成盘点回库后一起删除 +// appOrderIn.setInType(1); +// appOrderIn.setBatchNo(stock.getBatchNo()); +// appOrderIn.setVehicleNo(task.getVehicleNo()); +// appOrderIn.setGoodsId(stock.getGoodsId()); +// appOrderIn.setGoodsNum(BigDecimal.valueOf(stock.getAvailableNum())); +// appOrderIn.setWareHouse(stock.getWarehouseName()); +// appOrderIn.setOrderStatus(0); +// appOrderIn.setCreateTime(LocalDate.now()); +// appOrderIn.setUpdateTime(LocalDateTime.now()); +// appOrderIn.setProductionDate(stock.getProductionDate()); +// appOrderIn.setCreatePerson("BACK"); +// appOrderIn.setRemark("通道三盘点回库"); +// appOrderInList.add(appOrderIn); +// } +// if(appOrderInMapper.insertList(appOrderInList) > 0){ +// log.info("盘点回库任务生成成功,任务:{}", task.toLoggerString()); +// } +// log.info("盘点回库任务生成失败,任务:{}", task.toLoggerString()); +// } +// // 如果是大托盘回库生成一条状态为666的回库任务,当用户确认时将状态改成待下发 + if (Objects.equals(task.getDestination(), "104")){ + // 更新库位表,占掉库位 + Location updateLocationForBack = new Location(); + updateLocationForBack.setLocationId(task.getOrigin()); + updateLocationForBack.setLocationStatus(LocationStatus.OCCUPY.getCode()); + updateLocationForBack.setVehicleId(task.getVehicleNo()); + locationMapper.modifyLocation(updateLocationForBack); // 占掉库位 + // 添加入库任务 + Task taskByLitterMaterial = new Task(); + taskByLitterMaterial.setTaskId(UUID.randomUUID().toString()); + taskByLitterMaterial.setTaskType(TaskType.IN.getCode()); + taskByLitterMaterial.setTaskStatus(666); + taskByLitterMaterial.setTaskGroup(UUID.randomUUID().toString()); + taskByLitterMaterial.setOrigin("104"); + taskByLitterMaterial.setDestination(task.getOrigin()); + taskByLitterMaterial.setPickStand("大"); + taskByLitterMaterial.setWeight(0.0); + taskByLitterMaterial.setVehicleNo(task.getVehicleNo()); + taskByLitterMaterial.setCreateTime(task.getCreateTime()); + taskByLitterMaterial.setUserName("原材料"); + taskByLitterMaterial.setGoodsId(task.getGoodsId());//后面要将codeMessage拆成物料码和数量 + taskByLitterMaterial.setOperateNum(task.getOperateNum()); + taskByLitterMaterial.setTotalNum(task.getTotalNum()); + taskByLitterMaterial.setTaskPriority(1); + taskByLitterMaterial.setProductionDate(task.getProductionDate()); + taskByLitterMaterial.setRemark1("原材料"); + //开始向任务表中添加任务 + int addTask = taskMapper.addTask(taskByLitterMaterial); + if (addTask > 0){ + log.info("盘点出库完成添加入库任务成功,任务:{}", task.toLoggerString()); + }else { + log.error("盘点出库完成添加入库任务失败,任务:{}", task.toLoggerString()); + } + } + } + // 备份Task表 + Task taskRecordBack = new Task(); + taskRecordBack.setTaskId(task.getTaskId()); + taskRecordBack.setTaskType(3); + taskRecordBack.setGoodsName(task.getGoodsName()); + taskRecordBack.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + taskRecordBack.setOrigin(task.getOrigin()); + taskRecordBack.setDestination(task.getDestination()); + taskRecordBack.setVehicleNo(task.getVehicleNo()); + taskRecordBack.setCreateTime(task.getCreateTime()); + taskRecordBack.setGoodsId(task.getGoodsId()); + taskRecordBack.setOperateNum(task.getOperateNum()); + taskRecordBack.setFinishTime(new Date()); + taskRecordBack.setTaskPriority(task.getTaskPriority()); + int x = taskRecordMapper.addTask(taskRecordBack); + if (x == 0){ + log.info("盘点更新任务备份表失败,任务:{},", task.toLoggerString()); + for (int i = 0; i < 5; i++) { + int d = taskRecordMapper.addTask(taskRecordBack); + if (d != 0){ + log.info("盘点更新任务备份表重试成功,任务:{}", task.toLoggerString()); + break; + } + } + }else { + log.info("盘点更新任务备份表成功,任务:{}", task.toLoggerString()); + } + // 删除task + int a = taskMapper.deleteTask(task.getTaskId()); + if (a>0){ + log.info("盘点出库,删除盘点出库任务成功"); + }else { + log.info("盘点出库,删除盘点出库任务失败,即将重试"); + taskMapper.deleteTask(task.getTaskId()); + } + // 把库存状态更新成666 + if (Objects.equals(task.getDestination(), "104")){ + if(stockMapper.updateStockStatusWithLocationId(task.getOrigin(), 666) > 0){ + log.info("三通道盘点出库将库存更新为特殊状态成功,托盘号:{}", task.getVehicleNo()); + return true; + }else{ + log.info("三通道盘点出库将库存更新为特殊状态失败,托盘号:{}", task.getVehicleNo()); + } + }else{ + if(stockMapper.deleteStockWithLocationId(task.getOrigin()) > 0){ + log.info("一、二通道盘点出库删除库存成功,托盘号:{}", task.getVehicleNo()); + return true; + } + log.info("一、二通道盘点出库删除库存失败,托盘号:{}", task.getVehicleNo()); + } + return false; + } + /** + * 完成移库任务 + * @param task 任务 + * @return 完成结果 + */ + private boolean completeMoveTask(Task task) { + /* 找出任务,更新任务为完成;释放原库位;更新库存到新库位 */ + // 完成任务 + Task completeTask = new Task(); + completeTask.setTaskId(task.getTaskId()); + completeTask.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + completeTask.setFinishTime(new Date()); + taskMapper.executeTask(completeTask); // 完成任务 + // 释放原库位 + // 释放库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(task.getOrigin()); + updateLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + updateLocation.setVehicleId(""); + locationMapper.modifyLocation(updateLocation); // 更新库位为空 + // 占掉新库位,生成的时候会占,这里重复操作保护 + Location occupyLocation = new Location(); + occupyLocation.setLocationId(task.getDestination()); + occupyLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + occupyLocation.setVehicleId(task.getVehicleNo()); + locationMapper.modifyLocation(occupyLocation); // 更新库位 + + // 空托需要更新载具表 + if (Objects.equals(task.getVehicleNo(), "D99999999")){ + int updateVehicle = vehicleMapper.updateLocation(task.getOrigin(), task.getDestination()); + if (updateVehicle > 0){ + log.info("空托更新载具表成功,任务:{}", task.toLoggerString()); + }else { + log.error("空托更新载具表失败,任务:{}", task.toLoggerString()); + } + } + + // 更新库位 + int updatedLocation = stockMapper.updateLocationAndStatus(task.getOrigin(), task.getDestination(), StockStatus.OK.getCode()); + if(updatedLocation > 0){ + log.info("移库库位更新成功,任务:{}", task.toLoggerString()); + return true; + } + return false; + } + + //endregion + + + + //region 取消任务 + + /** + * 取消任务 + * @param task 要完成的任务 + * @return 操作结果 + */ + public boolean cancelTask(Task task) { + if(task == null) { + return false; + } + TaskType taskType = TaskType.getTaskType(task.getTaskType()); + if(taskType == null) { + return false; + } + /* 根据任务类型判断 */ + return switch (taskType) { + case IN -> cancelInTask(task); + case OUT -> cancelOutTask(task); + case INVENTORY -> cancelInventoryTask(task); + case MOVE -> cancelMoveTask(task); + }; + } + + /** + * 取消入库任务 + * @param task 要取消的入库任务 + * @return 结果 + */ + private boolean cancelInTask(Task task) { + /* 找出任务,取消该任务;找出该任务终点,更新库存为OK */ + // 取消任务 + Task completeTask = new Task(); + completeTask.setTaskId(task.getTaskId()); + completeTask.setTaskStatus(WmsTaskStatus.CANCEL.getCode()); + completeTask.setFinishTime(new Date()); + taskMapper.executeTask(completeTask); // 取消任务 + // 备份 + //开始将chu库记录备份进task备份表 + Task taskRecordBack = new Task(); + taskRecordBack.setTaskId(task.getTaskId()); + taskRecordBack.setTaskType(1); + taskRecordBack.setTaskStatus(WmsTaskStatus.CANCEL.getCode()); + taskRecordBack.setOrigin(task.getOrigin()); + taskRecordBack.setDestination(task.getDestination()); + taskRecordBack.setVehicleNo(task.getVehicleNo()); + taskRecordBack.setCreateTime(task.getCreateTime()); + taskRecordBack.setGoodsId(task.getGoodsId()); + taskRecordBack.setOperateNum(task.getOperateNum()); + taskRecordBack.setFinishTime(task.getFinishTime()); + int x = taskRecordMapper.addTask(taskRecordBack); + if (x == 0){ + log.info("入库取消更新任务备份表失败,任务:{},", task.toLoggerString()); + for (int i = 0; i < 5; i++) { + int d = taskRecordMapper.addTask(taskRecordBack); + if (d != 0){ + log.info("入库取消更新任务备份表重试成功,任务:{}", task.toLoggerString()); + break; + } + } + }else { + log.info("入库取消更新任务备份表成功,任务:{}", task.toLoggerString()); + } + // 删除任务 + taskMapper.deleteTask(task.getTaskId()); + // 释放库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(task.getDestination()); + updateLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + updateLocation.setVehicleId(""); + locationMapper.modifyLocation(updateLocation); // 更新库位为空 + // 更新库存为 ok ??????? + int updateStock = stockMapper.updateStockStatusWithLocationId(task.getDestination(), StockStatus.OK.getCode()); + if(updateStock > 0){ + log.info("入库取消更新库存成功,任务:{}", task.toLoggerString()); + return true; + } + return false; + } + + /** + * 取消出库任务 + * @param task 要取消的出库任务 + * @return 执行结果 + */ + private boolean cancelOutTask(Task task) { + /* 找出任务,取消该任务;找出该任务终点,删除库存;释放库位 */ + // 取消任务 + Task completeTask = new Task(); + completeTask.setTaskId(task.getTaskId()); + completeTask.setTaskStatus(WmsTaskStatus.CANCEL.getCode()); + completeTask.setFinishTime(new Date()); + taskMapper.executeTask(completeTask); // 取消任务 + // 更新库存为 ok + int updateStock = stockMapper.updateStockStatusWithLocationId(task.getDestination(), StockStatus.OK.getCode()); + if(updateStock > 0){ + log.info("出库取消更新库存成功,任务:{}", task.toLoggerString()); + return true; + } + return false; + } + + /** + * 取消盘点任务 + * @param task 任务 + * @return 取消结果 + */ + private boolean cancelInventoryTask(Task task) { + /* 找出任务,取消该任务;找出该任务终点,删除库存;释放库位 */ + // 取消任务 + Task completeTask = new Task(); + completeTask.setTaskId(task.getTaskId()); + completeTask.setTaskStatus(WmsTaskStatus.CANCEL.getCode()); + completeTask.setFinishTime(new Date()); + taskMapper.executeTask(completeTask); // 取消任务 + // 更新库存为 ok + int updateStock = stockMapper.updateStockStatusWithLocationId(task.getDestination(), StockStatus.OK.getCode()); + if(updateStock > 0){ + log.info("盘点出库取消更新库存成功,任务:{}", task.toLoggerString()); + return true; + } + return false; + } + + /** + * 取消移库任务 + * @param task 任务 + * @return 取消结果 + */ + private boolean cancelMoveTask(Task task) { + /* 找出任务,更新任务为取消;释放新库位;更新库存为OK */ + // 取消任务 + Task completeTask = new Task(); + completeTask.setTaskId(task.getTaskId()); + completeTask.setTaskStatus(WmsTaskStatus.CANCEL.getCode()); + completeTask.setFinishTime(new Date()); + taskMapper.executeTask(completeTask); // 取消任务 + // 释放库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(task.getDestination()); + updateLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + updateLocation.setVehicleId(""); + locationMapper.modifyLocation(updateLocation); // 更新库位为空 + // 更新库位 + int updatedLocation = stockMapper.updateStockStatusWithLocationId(task.getOrigin(), StockStatus.OK.getCode()); + if(updatedLocation > 0){ + log.info("移库取消库位状态更新成功,任务:{}", task.toLoggerString()); + return true; + } + return false; + } + + + //endregion + + + + +} diff --git a/src/main/java/com/wms/bussiness/TaskTimer.java b/src/main/java/com/wms/bussiness/TaskTimer.java new file mode 100644 index 0000000..3b02e83 --- /dev/null +++ b/src/main/java/com/wms/bussiness/TaskTimer.java @@ -0,0 +1,24 @@ +package com.wms.bussiness; + +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + + +/** + * 任务定时器 + */ +@Component +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class TaskTimer { + + + + + + + + + + +} diff --git a/src/main/java/com/wms/config/InitLocalConfig.java b/src/main/java/com/wms/config/InitLocalConfig.java new file mode 100644 index 0000000..fa3db62 --- /dev/null +++ b/src/main/java/com/wms/config/InitLocalConfig.java @@ -0,0 +1,57 @@ +package com.wms.config; + +//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.wms.entity.table.Config; +import com.wms.entity.table.Location; +import com.wms.service.ConfigService; +import com.wms.service.LocationService; +import lombok.RequiredArgsConstructor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.ApplicationArguments; +import org.springframework.boot.ApplicationRunner; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Component +@Order(1) +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class InitLocalConfig implements ApplicationRunner { + /** + * 配置类 + */ + private final ConfigService configService; + /** + * 库位服务 + */ + private final LocationService locationService; + + + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); + public static Map configMap = new HashMap<>(); + public static Map instantLocationMap = new HashMap<>(); + public static List localWorkDateList = new ArrayList<>(); + @Override + public void run(ApplicationArguments args) throws Exception { + logger.info("加载设置到内存中..."); + logger.info("加载配置到内存中..."); + } +// public void run(ApplicationArguments args) { +// List configs = configService.selectConfigs(""); +// if (!configs.isEmpty()) { +// for (Config config : configs) { +// configMap.put(config.getConfigKey(), config.getConfigValue()); +// logger.info("导入系统配置成功---{}:{}", config.getConfigName(), config.getConfigValue()); +// logger.info("加载配置到内存中..."); +// } +// } +// } +} diff --git a/src/main/java/com/wms/config/PageHelperConfig.java b/src/main/java/com/wms/config/PageHelperConfig.java new file mode 100644 index 0000000..ddb207a --- /dev/null +++ b/src/main/java/com/wms/config/PageHelperConfig.java @@ -0,0 +1,23 @@ +package com.wms.config; + +import com.github.pagehelper.PageHelper; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.Properties; + +@Configuration +public class PageHelperConfig { + @Bean + public PageHelper pageHelper() { + PageHelper pageHelper = new PageHelper(); + //添加配置,也可以指定文件路径 + Properties p = new Properties(); + p.setProperty("helperDialect", "sqlserver2012"); + p.setProperty("reasonable", "true"); + p.setProperty("supportMethodsArguments", "true"); + p.setProperty("params", "count=countSql"); + pageHelper.setProperties(p); + return pageHelper; + } +} diff --git a/src/main/java/com/wms/constants/WmsConstants.java b/src/main/java/com/wms/constants/WmsConstants.java new file mode 100644 index 0000000..fa742a6 --- /dev/null +++ b/src/main/java/com/wms/constants/WmsConstants.java @@ -0,0 +1,68 @@ +package com.wms.constants; + +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.Map; + +import com.google.common.collect.ImmutableMap; +import com.wms.constants.enums.WcsTaskStatus; +import com.wms.constants.enums.WmsTaskStatus; +import com.wms.entity.table.PartInfo; + +/** + * WMS系统所需的常量 + * @author 梁州 + * @date 2023/2/13 + */ +public class WmsConstants { + + public static String EMPTY_STRING = ""; + + public static BigDecimal NUMBER_ONE = BigDecimal.valueOf(1); + + public static String ROOT_MENU_ID = "0"; + + public static Map partInfoMap = new HashMap<>(); + + public static void initMap() { + // + } + + /** + * 虚拟库位设备号 + */ + public static Integer VIRTUAL_LOCATION_EQUIP_ID = 11; + + /** + * 入库库位类型:虚拟库位 + */ + public static String VIRTUAL_LOCATION_IN = "0"; + + /** + * 虚拟库位库区编码 + */ + public static int VIRTUAL_LOCATION_AREA_ID = 99; + + /** + * 空托盘编号 + */ + public static String EMPTY_STOCK_GOODS_ID = "000000000"; + /** + * 空托盘批次号 + */ + public static String EMPTY_STOCK_BATCH_NO = "EMPTY"; + + /** + * 设备号对应入库口 + */ + public static Map LOCATOR_AREA_MAP = ImmutableMap.builder() + .put(WcsTaskStatus.WAIT.getCode(), WmsTaskStatus.WAIT.getCode()) + .put(WcsTaskStatus.RUN.getCode(), WmsTaskStatus.RUN.getCode()) + .put(WcsTaskStatus.LEAVE.getCode(), WmsTaskStatus.RUN.getCode()) + .put(WcsTaskStatus.PARK.getCode(), WmsTaskStatus.RUN.getCode()) + .put(WcsTaskStatus.ARRIVE.getCode(), WmsTaskStatus.RUN.getCode()) + .put(WcsTaskStatus.FINISH.getCode(), WmsTaskStatus.FINISH.getCode()) + .put(WcsTaskStatus.CANCEL.getCode(), WmsTaskStatus.CANCEL.getCode()) + .put(WcsTaskStatus.EXCEPTION.getCode(), WmsTaskStatus.EXCEPTION.getCode()) + .build(); +} diff --git a/src/main/java/com/wms/constants/enums/ConfigMapKeyEnum.java b/src/main/java/com/wms/constants/enums/ConfigMapKeyEnum.java new file mode 100644 index 0000000..0fc5d94 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/ConfigMapKeyEnum.java @@ -0,0 +1,30 @@ +package com.wms.constants.enums; + +public enum ConfigMapKeyEnum { + MAX_WEIGHT("MAX_WEIGHT"), + URL_WCS_TASK("URL_WCS_TASK"), + URL_NEW_DESTINATION("URL_NEW_DESTINATION"), + URL_WCS_PICK_TASK("URL_WCS_PICK_TASK"), + URL_WCS_CANCEL_PICK_TASK("URL_WCS_CANCEL_PICK_TASK"), + URL_WCS_E_TASK("URL_WCS_E_TASK"), + URL_WCS_DISPOSE_VEHICLE("URL_WCS_DISPOSE_VEHICLE"), + CREATE_WORK("CREATE_WORK"), + START_WORK("START_WORK"), + SEND_TASK("SEND_TASK"), + ALLOW_EMPTY_BACK("ALLOW_EMPTY_BACK"), + SEND_PICK_OUT_TASK("SEND_PICK_OUT_TASK"), + MAX_VEHICLE_NUMS("MAX_VEHICLE_NUMS"), + MAX_WCS_ACCEPT_NUMS("MAX_WCS_ACCEPT_NUMS"), + SLOC_FILTER_STRING("SLOC_FILTER_STRING"), + URL_WCS_CHANGE_TASK("URL_WCS_CHANGE_TASK"), + LOG_DELETE_INTERVAL("LOG_DELETE_INTERVAL"), + RECORD_DELETE_INTERVAL("RECORD_DELETE_INTERVAL"), + IMPORTANT_RECORD_DELETE_INTERVAL("IMPORTANT_RECORD_DELETE_INTERVAL"); + private final String configKey; + ConfigMapKeyEnum(String configKey) { + this.configKey = configKey; + } + public String getConfigKey() { + return configKey; + } +} diff --git a/src/main/java/com/wms/constants/enums/GoodsStatus.java b/src/main/java/com/wms/constants/enums/GoodsStatus.java new file mode 100644 index 0000000..e132ec1 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/GoodsStatus.java @@ -0,0 +1,29 @@ +package com.wms.constants.enums; + +/** + * 物料状态枚举 + */ +public enum GoodsStatus { + OK(0, "合格"), + BAD(1, "不合格"), + DELAY(2, "延期"), + OVERDUE(3, "过期"), + SCRAP(5, "长时间未使用"); + + private final Integer code; + + private final String value; + + GoodsStatus(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/KateTaskStatus.java b/src/main/java/com/wms/constants/enums/KateTaskStatus.java new file mode 100644 index 0000000..9bc5846 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/KateTaskStatus.java @@ -0,0 +1,25 @@ +package com.wms.constants.enums; + +public enum KateTaskStatus { + NEW(0, "待下发"), + WAIT(1, "已下发"), + RUN(2, "执行中"), + PICKING(3, "正在拣货"), + FINISH(5, "任务完成"); + + private final Integer code; + private final String name; + + KateTaskStatus(Integer code, String name) { + this.code = code; + this.name = name; + } + + public Integer getCode() { + return code; + } + + public String getName() { + return name; + } +} diff --git a/src/main/java/com/wms/constants/enums/LocationStatus.java b/src/main/java/com/wms/constants/enums/LocationStatus.java new file mode 100644 index 0000000..e034378 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/LocationStatus.java @@ -0,0 +1,27 @@ +package com.wms.constants.enums; + +/** + * 库位状态枚举 + * /// 托盘状态和站台状态通用 + */ +public enum LocationStatus { + EMPTY(0, "空闲"), + OCCUPY(1, "占用"); + + private final Integer code; + + private final String value; + + LocationStatus(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/OrderCheckStatusEnum.java b/src/main/java/com/wms/constants/enums/OrderCheckStatusEnum.java new file mode 100644 index 0000000..086c39a --- /dev/null +++ b/src/main/java/com/wms/constants/enums/OrderCheckStatusEnum.java @@ -0,0 +1,28 @@ +package com.wms.constants.enums; + +import lombok.Getter; + +/** + * 盘点表状态枚举 + */ +@Getter +public enum OrderCheckStatusEnum { + + CREATED(0, "已创建"), + + CHECKING(1, "盘点中"), + + CHECKED(2, "已盘点"), + + CANCELED(3, "已取消"); + + + private final int code; + private final String desc; + + OrderCheckStatusEnum(int code, String desc) { + this.code = code; + this.desc = desc; + } + +} diff --git a/src/main/java/com/wms/constants/enums/OrderInStatusEnum.java b/src/main/java/com/wms/constants/enums/OrderInStatusEnum.java new file mode 100644 index 0000000..2889e62 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/OrderInStatusEnum.java @@ -0,0 +1,26 @@ +package com.wms.constants.enums; + +import lombok.Data; +import lombok.Getter; + +/** + * 订单入库状态枚举 + * + * @author 菻蔃 + */ +@Getter +public enum OrderInStatusEnum { + CREATE(0, "创建"), + IN(1, "入库中"), + BINDING(2, "已绑定"), + ; + + private final int code; + private final String desc; + + OrderInStatusEnum(int code, String desc) { + this.code = code; + this.desc = desc; + } + +} diff --git a/src/main/java/com/wms/constants/enums/OrderOutStatusEnum.java b/src/main/java/com/wms/constants/enums/OrderOutStatusEnum.java new file mode 100644 index 0000000..3dba19e --- /dev/null +++ b/src/main/java/com/wms/constants/enums/OrderOutStatusEnum.java @@ -0,0 +1,27 @@ +package com.wms.constants.enums; + +import lombok.Getter; + +/** + * 出库单状态的枚举 + */ +@Getter +public enum OrderOutStatusEnum { + + CREATED(0, "已创建"), + RUNNING(1, "执行中"), + EXPRESS(9, "执行异常"), + UNSTOCK(76, "没有库存"), + UNENOUGH(77, "库存不足"), + FINISHED(100, "已完成"); + //RUNNING(1, "执行中"); + + + private final int code; + private final String desc; + + OrderOutStatusEnum(int code, String desc) { + this.code = code; + this.desc = desc; + } +} diff --git a/src/main/java/com/wms/constants/enums/ResponseCode.java b/src/main/java/com/wms/constants/enums/ResponseCode.java new file mode 100644 index 0000000..92fc841 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/ResponseCode.java @@ -0,0 +1,27 @@ +package com.wms.constants.enums; + +/** + * 接口响应码枚举 + */ +public enum ResponseCode { + OK(0, "正常"), + WARNING(200, "警告"), + ERROR(999, "异常"); + + private final Integer code; + + private final String value; + + ResponseCode(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/StockStatus.java b/src/main/java/com/wms/constants/enums/StockStatus.java new file mode 100644 index 0000000..1916518 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/StockStatus.java @@ -0,0 +1,34 @@ +package com.wms.constants.enums; + +/** + * 库存状态枚举 + */ +public enum StockStatus { + WAIT_IN(-2, "待入库"), + IN_ING(-1, "正在入库"), + OK(0, "库存正常"), + OUT(1, "准备出库"), + MOVING(2, "正在出库"), + TRANS(3, "出库完成"), + PICKING(4, "站台拣货中"), + INVENTORY_OUT(5, "站台盘点中"), + BACKING(6, "正在回库"), + LOCK(9, "库存锁定"); + + private final Integer code; + + private final String value; + + StockStatus(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/TaskType.java b/src/main/java/com/wms/constants/enums/TaskType.java new file mode 100644 index 0000000..e46a232 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/TaskType.java @@ -0,0 +1,37 @@ +package com.wms.constants.enums; + +/** + * 任务类型枚举 + */ +public enum TaskType { + IN(1, "入库"), + OUT(2, "出库"), + INVENTORY(3, "盘点"), + MOVE(9, "移库"); + + private final Integer code; + + private final String value; + + TaskType(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } + + public static TaskType getTaskType(Integer code) { + for (TaskType taskType : TaskType.values()) { + if (taskType.getCode().equals(code)) { + return taskType; + } + } + return null; + } +} diff --git a/src/main/java/com/wms/constants/enums/UrlEnums.java b/src/main/java/com/wms/constants/enums/UrlEnums.java new file mode 100644 index 0000000..62e4651 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/UrlEnums.java @@ -0,0 +1,32 @@ +package com.wms.constants.enums; +//172.21.80.151 +public enum UrlEnums { + //URL_WMS_TO_WCS_SEND_TASK("WMS向WCS发送任务", "http://192.168.103.165:18990/api/wms/wmsTask/setStackerTask"), + URL_WMS_TO_WCS_SEND_TASK("WMS向WCS发送任务", "http://10.90.85.68:18990/api/wms/wmsTask/setStackerTask"), + URL_WMS_TO_WCS_CHANGE_TASK("WMS请求变更任务状态", "http://10.90.85.68:18990/api/Wms/WmsTask/ChangeTaskStatus"), + URL_WMS_TO_WCS_CONTAINER_TASK("WMS向四向车发送任务","http://172.21.80.150:9991/api/Wcs/PushTask"), + URL_WMS_TO_WCS_CONTAINERIN_TASK("WMS向四向车发送入库任务","http://172.21.80.150:19990/api/container/createInstoreTask"); + //URL_WMS_TO_MES_IN("扫码上架", "http://172.21.73.210:9000/Asimco/vmesserver/wms_interface/LotGround"), +// URL_WMS_TO_MES_OUT("批次出库", "http://172.21.73.210:9000/Asimco/vmesserver/wms_interface/ReceiptOut"), +// URL_WMS_TO_MES_INVENTORY("盘点执行", "http://172.21.73.210:9000/Asimco/vmesserver/wms_interface/InventoryResult"), +// URL_WMS_TO_MES_STOCK("库存", "http://172.21.73.210:9000/Asimco/vmesserver/wms_interface/WMSStorage"); + //URL_WMS_TO_MES_MOVE("批次调整", "http://172.21.73.210:9000/Asimco/vmesserver/wms_interface/LotAD"); + + + + private final String description; + private final String value; + + UrlEnums(String description, String value) { + this.description = description; + this.value = value; + } + + public String getDescription() { + return description; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/VehicleStatus.java b/src/main/java/com/wms/constants/enums/VehicleStatus.java new file mode 100644 index 0000000..7a17731 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/VehicleStatus.java @@ -0,0 +1,27 @@ +package com.wms.constants.enums; + +/** + * 载具状态 + */ +public enum VehicleStatus { + IN(1, "入库中"), + ON(2, "在库中"), + OUT(3, "出库中"); + + private final Integer code; + + private final String value; + + VehicleStatus(Integer code, String value) { + this.code = code; + this.value = value; + } + + public Integer getCode() { + return code; + } + + public String getValue() { + return value; + } +} diff --git a/src/main/java/com/wms/constants/enums/WcsTaskStatus.java b/src/main/java/com/wms/constants/enums/WcsTaskStatus.java new file mode 100644 index 0000000..5c15ec7 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/WcsTaskStatus.java @@ -0,0 +1,31 @@ +package com.wms.constants.enums; + +/** + * Wcs任务状态的枚举 + */ +public enum WcsTaskStatus { + WAIT(1, "任务排队中"), + RUN(2, "任务开始执行"), + LEAVE(3, "任务已经离开初始位置"), + PARK(4, "任务到达中间点"), + ARRIVE(5, "任务到达目的地"), + FINISH(100, "任务完成"), + CANCEL(998, "任务取消"), + EXCEPTION(999, "任务异常"); + + private final Integer code; + private final String name; + + WcsTaskStatus(Integer code, String name) { + this.code = code; + this.name = name; + } + + public Integer getCode() { + return code; + } + + public String getName() { + return name; + } +} diff --git a/src/main/java/com/wms/constants/enums/WmsTaskStatus.java b/src/main/java/com/wms/constants/enums/WmsTaskStatus.java new file mode 100644 index 0000000..1e24d71 --- /dev/null +++ b/src/main/java/com/wms/constants/enums/WmsTaskStatus.java @@ -0,0 +1,35 @@ +package com.wms.constants.enums; + +/** + * Wms任务状态的枚举 + */ +public enum WmsTaskStatus { + NEW(0, "任务新建,待下发"), + WAIT(1, "任务已下发"), + RUN(2, "任务开始执行"), + OUT_SUCCESS(3, "出库完成"), + TRANS_MOVE(4, "输送线转运中"), + ARRIVE_STAND(5, "到达拣选站台"), + PICKING(6, "正在拣货"), + BACKING(7, "正在回库"), + INVENTORY(8, "盘点中"), + FINISH(100, "任务完成"), + CANCEL(998, "任务取消"), + EXCEPTION(999, "任务异常"); + + private final Integer code; + private final String name; + + WmsTaskStatus(Integer code, String name) { + this.code = code; + this.name = name; + } + + public Integer getCode() { + return code; + } + + public String getName() { + return name; + } +} diff --git a/src/main/java/com/wms/controller/BaseController.java b/src/main/java/com/wms/controller/BaseController.java new file mode 100644 index 0000000..bfb1271 --- /dev/null +++ b/src/main/java/com/wms/controller/BaseController.java @@ -0,0 +1,8 @@ +package com.wms.controller; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class BaseController { + protected final Logger logger = LoggerFactory.getLogger(this.getClass()); +} diff --git a/src/main/java/com/wms/controller/ConfigController.java b/src/main/java/com/wms/controller/ConfigController.java new file mode 100644 index 0000000..fd87336 --- /dev/null +++ b/src/main/java/com/wms/controller/ConfigController.java @@ -0,0 +1,87 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Config; +import com.wms.service.ConfigService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; + +/** + * WMS系统配置控制类 + * @author 梁州 + * @date 2023/3/23 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/config") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class ConfigController extends BaseController{ + /** + * 系统配置服务 + */ + private final ConfigService configService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 查找所有配置 + * @return 配置 + */ + @GetMapping("/getConfigs") + @ResponseBody + public List getConfigs(){ + logger.info("查询系统配置"); + return configService.selectConfigs(""); + } + + /** + * 更新系统配置 + * + * @param config 配置 + * @return 结果 + */ + @PostMapping("/updateConfig") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateConfig(@RequestBody Config config) { + logger.info("更新系统配置,{}:{}", config.getConfigName(), config.getConfigValue()); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + configService.updateConfig(config); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("更新系统配置错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新系统配置成功!"); + return JSON.toJSONString(rsp); + } +} diff --git a/src/main/java/com/wms/controller/DisplayController.java b/src/main/java/com/wms/controller/DisplayController.java new file mode 100644 index 0000000..041866e --- /dev/null +++ b/src/main/java/com/wms/controller/DisplayController.java @@ -0,0 +1,133 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.WmsConstants; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.display.LocationData; +import com.wms.entity.app.display.LocationInfo; +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.dto.orderOut.queryOrderOutRequest; +import com.wms.entity.table.Location; +import com.wms.entity.table.OrderOut; +import com.wms.entity.table.Stock; +import com.wms.entity.table.oledIn; +import com.wms.service.IOrderOutService; +import com.wms.service.LocationService; +import com.wms.service.StockService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/api/query") +public class DisplayController extends BaseController{ + private final StockService stockService; + private final LocationService locationService; + private final HttpServletRequest servletRequest; + private final IOrderOutService orderOutService; + + /** + * 大屏查询库位信息 + * @param location 参数---库位 + * @return 结果 + */ + @GetMapping("/queryLocationInfo") + @ResponseBody + public String queryLocationInfo(@RequestParam String location) { + logger.info("接收到查询大屏库位信息请求,ip地址:{},参数:{}", HttpUtils.getIpAddr(servletRequest), location); + ResponseEntity response = new ResponseEntity(); + if (StringUtils.isEmpty(location)) { + logger.error("查询失败,参数中库位号为空"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("查询失败,参数中库位号为空"); + return JSON.toJSONString(response); + } + Location locationQuery = new Location(); + locationQuery.setLocationId(location); + List locations = locationService.selLocations(locationQuery); + if (locations.size() == 0) { + logger.error("查询失败,该库位立体库中不存在"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("查询失败,请检查库位号正确性"); + return JSON.toJSONString(response); + } + Location currentLocation = locations.get(0); + String vehicleNo = currentLocation.getVehicleId(); + if (StringUtils.isEmpty(vehicleNo)) { + // 设定 + LocationInfo returnData = new LocationInfo(); + returnData.setLocationId(location); + returnData.setVehicleNo(WmsConstants.EMPTY_STRING); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("查询成功"); + response.setReturnData(returnData); + return JSON.toJSONString(response); + } + // 查询库存 + Stock stockQuery = new Stock(); + stockQuery.setLocationId(location); + stockQuery.setVehicleId(vehicleNo); + List stocks = stockService.selStocks(stockQuery); + List locationData = new LinkedList<>(); + for (Stock tempStock : stocks) { + LocationData tempData = new LocationData(); + tempData.setGoodsId(tempStock.getGoodsId()); + tempData.setGoodsName(tempStock.getGoodsName()); + tempData.setGoodsNum(tempStock.getRealNum()); + locationData.add(tempData); + } + // 设定 + LocationInfo returnData = new LocationInfo(); + returnData.setLocationId(location); + returnData.setVehicleNo(WmsConstants.EMPTY_STRING); + returnData.setLocationData(locationData); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("查询成功"); + response.setReturnData(returnData); + return JSON.toJSONString(response); + } + + /** + * 查询所有库位 + * @return 结果 + */ + @GetMapping("/getAllLocations") + @ResponseBody + public String queryLocationInfo() { + logger.info("接收到查询大屏所有库位信息请求,ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + return JSON.toJSONString(locationService.selLocations(new Location())); + } + + /** + * 查询所有出库单 + * @return 结果 + */ + @GetMapping("/oledForOrderOut") + @ResponseBody + public ResponseEntity oledForOrderOut(queryOrderOutRequest request) { + //logger.info("接收到查询大屏所有出库单请求,ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + ResponseEntity rsp = new ResponseEntity(); + List outList = orderOutService.getAllOrderOut(request); + if (outList == null || outList.isEmpty()) { + rsp.setCode(0); + rsp.setMessage("fail"); + rsp.setReturnData(null); + } else { + rsp.setCode(200); + rsp.setMessage("success"); + rsp.setReturnData(outList); + } + return rsp; + } +} diff --git a/src/main/java/com/wms/controller/ExcelController.java b/src/main/java/com/wms/controller/ExcelController.java new file mode 100644 index 0000000..cb267e3 --- /dev/null +++ b/src/main/java/com/wms/controller/ExcelController.java @@ -0,0 +1,198 @@ +package com.wms.controller; + +import com.wms.constants.enums.*; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.vo.FileVo; +import com.wms.entity.dto.orderOut.queryOrderOutRequest; +import com.wms.entity.table.*; +import com.wms.mapper.AppOrderInMapper; +import com.wms.mapper.OrderOutMapper; +import com.wms.service.*; +import com.wms.utils.HttpUtils; +import com.wms.utils.excel.listener.UploadTestListener; +import com.wms.utils.excel.vo.*; +import com.alibaba.excel.EasyExcel; +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.ResponseCode; +import com.wms.utils.excel.ExcelUtils; +import com.wms.utils.excel.listener.UploadKateOrdersListener; +import com.wms.utils.excel.vo.KateOrdersExcelVo; + +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.*; +import java.util.stream.Collectors; + +import static com.wms.utils.HttpUtils.getIpAddr; +import static com.wms.utils.StringUtils.convertJsonString; + + +/** + * + */ +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/wms/excel") +public class ExcelController extends BaseController { + private final StockService stockService;// 库存服务 + private final PartInfoService partInfoService;// 零件服务 + private final HttpServletRequest servletRequest;// 请求服务 + private final TaskRecordService taskRecordService;// 任务记录服务 + //private final IOrderOutService orderOutService; + private final IOrderOutService orderOutService; + private final OrderOutMapper appOrderOutMapper; +// private final KateOrdersService kateOrdersService;// 工单服务 +// private final UploadRecordService uploadRecordService;// 上传服务 + + private final List uploadFileHashStringList = new ArrayList<>(); + + /** + * 导入零件信息 + * + * @param file 文件 + * @return 导入结果 + */ + @PostMapping("/uploadPartInfos") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String uploadPartInfos(@RequestPart("file") MultipartFile file) { + logger.info("接收到导入零件信息请求,ip地址:{}", getIpAddr(servletRequest)); + ResponseEntity response = new ResponseEntity(); + try { + List files = ExcelUtils.readMultipartFile(file, PartInfo.class); + // 添加进物料表 + for (PartInfo pageInfo : files) { + if (partInfoService.selPartByPartNo(pageInfo.getMaterial()) != null) {// 当前零件号的数据已经存在过 + partInfoService.modifyPart(pageInfo); + } else {// 新零件 + partInfoService.addPart(pageInfo); + } + } + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("导入excel成功"); + response.setReturnData(files); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage(e.getMessage()); + } + return JSON.toJSONString(response); + } + + /** + * 导出库存数据 + * + * @param response 请求 + */ + @GetMapping("/downloadStockExcel") + @ResponseBody + public void downloadStockExcel(HttpServletResponse response) { + List stocks = stockService.selStocks(new Stock()); + ExcelUtils.export(response, "库存报表", stocks, Stock.class); + } + + /** + * 导出入库记录 + * + * @param response 请求 + */ + @GetMapping("/downloadRukuExcel") + @ResponseBody + public void downloadRukuExcel(HttpServletResponse response) { + List ruku = taskRecordService.selTasks(new Task()); + ExcelUtils.export(response, "入库记录报表", ruku, Task.class); + } + + /** + * 导出物料信息 + * + * @param response 请求 + */ + @GetMapping("/downloadMaterialExcel") + @ResponseBody + public void downloadMaterialExcel(HttpServletResponse response) { + List Material = partInfoService.selParts(new PartInfo()); + ExcelUtils.export(response, "物料信息", Material, PartInfo.class); + } + + /** + * 导出工单模板 + * @param response 文件 + * @return 导入结果 + */ + @GetMapping("/downloadOrderOutTable") + @ResponseBody + public void downloadOrderOutTable(HttpServletResponse response) { + //List Material = partInfoService.selParts(new PartInfo()); + List Material = new ArrayList<>(); + ExcelUtils.export(response, "出库工单模板", Material, ExcelTemplateVo.class); + } + + /** + * 导出当前工单所有数据 + * @param response 文件 + * @return 导入结果 + */ + @GetMapping("/downloadOrderOutTableNow") + @ResponseBody + public void downloadOrderOutTableNow(HttpServletResponse response) { + + OrderOut orderOut = new OrderOut(); + orderOut.setOrderType(1); + List Material = appOrderOutMapper.queryWithOrderStatus(orderOut); + ExcelUtils.export(response, "出库工单模板", Material, OrderOut.class); + } + + + + /** + * 导入工单 + * + * @param file 文件 + * @return 导入结果 + */ + @PostMapping("/uploadKateOrders") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String uploadKateOrders(@RequestPart("file") MultipartFile file) { + logger.info("导入工单,请求ip:{}", getIpAddr(servletRequest)); + ResponseEntity response = new ResponseEntity(); + try { + // 先查看是否还存在未完成的工单,如果存在则不允许入库 + OrderOut orderOut = new OrderOut(); + orderOut.setOrderType(1); + List orderOutList = appOrderOutMapper.query(orderOut); + if (!orderOutList.isEmpty()){ + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("存在未完成的工单任务,请完成后重试!"); + return convertJsonString(response); + } + // 导入excel + EasyExcel.read(file.getInputStream(), ExcelTemplateVo.class, new UploadTestListener(orderOutService)).sheet(1).headRowNumber(2).doRead(); + + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("导入成功。"); + return convertJsonString(response); + } catch (Exception e) { + logger.error("导入异常:{}", convertJsonString(e)); + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("导入工单异常。"); + return convertJsonString(response); + } + } + +} \ No newline at end of file diff --git a/src/main/java/com/wms/controller/GoodsController.java b/src/main/java/com/wms/controller/GoodsController.java new file mode 100644 index 0000000..6e92173 --- /dev/null +++ b/src/main/java/com/wms/controller/GoodsController.java @@ -0,0 +1,373 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.dto.goodsRequest; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Goods; +import com.wms.entity.table.PartInfo; +import com.wms.entity.table.VechileList; +import com.wms.entity.table.Vehicle; +import com.wms.mapper.VehicleIistMapper; +import com.wms.service.GoodsService; +import com.wms.service.PartInfoService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * WMS物料控制类 + * @author 梁州 + * @date 2023/3/9 + */ +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/wms/goods") +public class GoodsController extends BaseController{ + + /** + * 物料服务 + */ + private final GoodsService goodsService; + /** + * 零件服务 + */ + private final PartInfoService partInfoService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + private final VehicleIistMapper vehicleIistMapper; + + /** + * 查找所有零件信息 + */ + @PostMapping("/getPartInfo") + @ResponseBody + public String getPartInfo(@RequestBody TableRequest tableRequest){ + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询零件数据请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); +// String[] orderByArr = {"location_id", "vehicle_id", "goods_id", "batch_no", "remain_num", "expiration_date", "create_time"}; + String orderByStr = "material asc"; + +// if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { +// orderByStr = pageRequest.getOrderBy(); +// } else { +// // 默认排序 +// orderByStr = "expiration_date desc"; +// } + + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List parts = partInfoService.selParts(tableRequest.getParam()); + PageInfo partPageInfo = new PageInfo<>(parts); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询零件信息成功!"); + tblResp.setRows(partPageInfo.getList()); + tblResp.setTotal(partPageInfo.getTotal()); + return JSON.toJSONString(tblResp); + } + + + + /** + * 查找所有母托信息 + */ + @PostMapping("/getAllVechileData") + @ResponseBody + public String getAllVechileData(@RequestBody VechileList vechileId){ + ResponseEntity rsp = new ResponseEntity(); +// VechileList vehicle = new VechileList(); +// vehicle.setVehicleId(vechileId); + List vechileLists = vehicleIistMapper.select(vechileId); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询母托信息成功!"); + rsp.setReturnData(vechileLists); + return JSON.toJSONString(rsp); + } + + + /** + * 新增母托数据 + */ + @PostMapping("/addVechile") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String addVechile(@RequestBody VechileList vechileId){ + ResponseEntity rsp = new ResponseEntity(); + List vechileLists = vehicleIistMapper.select(vechileId); + if (vechileLists.isEmpty()){ + if (vehicleIistMapper.insert(vechileId) > 0){ + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("新增母托信息成功!"); + return JSON.toJSONString(rsp); + } + } + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("该母托已存在!"); + return JSON.toJSONString(rsp); + } + + /** + * 删除零件信息 + */ + @PostMapping("/delete1") + @ResponseBody + public String deleteVehicle(@RequestBody VechileList vechileId) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + ResponseEntity rsp = new ResponseEntity(); + if(vehicleIistMapper.delete(vechileId) > 0){ + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("删除母托信息成功!"); + return JSON.toJSONString(rsp); + } + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("删除母托信息失败!"); + return JSON.toJSONString(rsp); + } + + + + + + /** + * 添加零件信息 + * + * @param + * @return 结果 + */ + @PostMapping("/addPartInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public WmsApiResponse addPartInfo(@RequestBody goodsRequest request) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + PartInfo partInfo = new PartInfo(); + partInfo.setMaterial(request.getGoodsId()); + if (!partInfoService.selParts(partInfo).isEmpty()) { + return new WmsApiResponse<>(1, "该零件已存在", null); + } + if (Objects.equals(request.getEfSelect(), "E")){ + partInfo.setItemDesc("发动机"); + }else{ + partInfo.setItemDesc("原材料"); + } + if (partInfoService.addPart(partInfo) > 0){ + return new WmsApiResponse<>(0, "添加零件成功", null); + }else{ + return new WmsApiResponse<>(1, "添加零件失败", null); + } + } + + /** + * 更新零件信息 + * + * @param partInfo 零件信息 + * @return 结果 + */ + @PostMapping("/updatePartInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updatePartInfo(@RequestBody PartInfo partInfo) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到更新零件信息请求:{}", JSON.toJSONString(partInfo)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (StringUtils.isEmpty(partInfo.getMaterial())) {// 箱号为空,不执行 + logger.error("请求零件号为空"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求零件号为空"); + return JSON.toJSONString(rsp); + } + partInfoService.modifyPart(partInfo); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新零件信息成功"); + return JSON.toJSONString(rsp); + } + + /** + * 更新物料信息 + * + * @param goods 物料 + * @return 结果 + */ + @PostMapping("/updateGoodsInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateGoodsInfo(@RequestBody Goods goods) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + goodsService.modifyGoods(goods); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("更新物料信息发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + logger.info("更新物料信息成功:{}", goods.toLoggerString()); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新物料信息成功"); + return JSON.toJSONString(rsp); + } + + @PostMapping("/queryPartInfoByPartNo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String queryPartInfoByPartNo(@RequestBody PartInfo partInfo) { + logger.info("前台查询零件数据"); + ResponseEntity rsp = new ResponseEntity(); + if (partInfo == null || StringUtils.isEmpty(partInfo.getMaterial())) { + logger.info("请求查询的参数为空"); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求查询的参数为空"); + return JSON.toJSONString(rsp); + } + try { + PartInfo partInfoNeed = partInfoService.selPartByPartNo(partInfo.getMaterial()); + if (partInfoNeed == null) { + logger.info("查询零件信息发生错误,零件号:{}", partInfo.getMaterial()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("查询的零件信息为空"); + return JSON.toJSONString(rsp); + } + rsp.setReturnData(partInfoNeed); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("查询零件信息发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + logger.info("查询零件信息成功"); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询零件信息成功"); + return JSON.toJSONString(rsp); + } + + @PostMapping("/queryPartNo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String queryPartNo(@RequestBody PartInfo partInfo) { + logger.info("前台查询零件数据"); + ResponseEntity rsp = new ResponseEntity(); + if (partInfo == null || StringUtils.isEmpty(partInfo.getMaterial())) { + logger.info("请求查询的参数为空"); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求查询的参数为空"); + return JSON.toJSONString(rsp); + } + try { + PartInfo query = new PartInfo(); + query.setMaterial(partInfo.getMaterial()); + List partInfoNeed = partInfoService.selParts(query); + if (partInfoNeed.size() == 0) { + logger.info("查询零件信息发生错误,零件号:{}", partInfo.getMaterial()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("查询的零件信息为空"); + return JSON.toJSONString(rsp); + } + rsp.setReturnData(partInfoNeed); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("查询零件信息发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + logger.info("查询零件信息成功"); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询零件信息成功"); + return JSON.toJSONString(rsp); + } + + /** + * 删除当前零件信息 + * + * @param partInfo 零件 + * @return 结果 + */ + @PostMapping("/deletePartInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String deleteVehicle(@RequestBody PartInfo partInfo) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到更新料箱信息请求:{}", JSON.toJSONString(partInfo)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (StringUtils.isEmpty(partInfo.getMaterial())) {// 零件号为空,不做处理 + logger.error("请求删除的零件号为空"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求删除的零件号为空"); + return JSON.toJSONString(rsp); + } + partInfoService.deletePartByPartNo(partInfo.getMaterial()); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("删除零件信息成功"); + return JSON.toJSONString(rsp); + } +} diff --git a/src/main/java/com/wms/controller/LocationController.java b/src/main/java/com/wms/controller/LocationController.java new file mode 100644 index 0000000..ae9269a --- /dev/null +++ b/src/main/java/com/wms/controller/LocationController.java @@ -0,0 +1,336 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.constants.enums.VehicleStatus; +import com.wms.entity.app.LayerLocation; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.RowLocation; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Location; +import com.wms.entity.table.Vehicle; +import com.wms.constants.WmsConstants; +import com.wms.constants.enums.LocationStatus; +import com.wms.service.LocationService; +import com.wms.service.VehicleService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.*; + +/** + * WMS库位控制类 + * + * @author 梁州 + * @date 2023/3/6 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/location") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class LocationController extends BaseController { + /** + * 库位服务 + */ + private final LocationService locationService; + /** + * 料箱服务 + */ + private final VehicleService vehicleService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + + /** + * 查询库位 + * + * @param location 查询参数 + * @return 结果 + */ + @PostMapping("/getLocations") + @ResponseBody + public String getLocations(@RequestBody Location location) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 查询出所有符合条件的库位 + List locations = locationService.selLocations(location); + if (locations.size() < 1) { + logger.error("查询库位发生错误:库位不存在"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("查询库位发生错误:库位不存在"); + return JSON.toJSONString(rsp); + } + List rowLocations = new LinkedList<>(); + // 查找到最大的排 + locations.sort(Comparator.comparing(Location::getQueue).reversed()); + int maxRow = locations.get(0).getQueue(); + // 按排查找库位 + for (int i = 0; i < maxRow; i++) { + int finalI = i; + List currentRowLocations = new ArrayList<>(locations.stream() + .filter(l -> l.getQueue().equals(finalI + 1)) + .toList()); + // 先查找每一层的库位 + List layerLocations = new LinkedList<>(); + // 找到这一排最大的层 + currentRowLocations.sort(Comparator.comparing(Location::getLayer).reversed()); + int maxLayer = currentRowLocations.get(0).getLayer(); + // 按照每一列查找库位 + for (int j = 0; j < maxLayer; j++) { + int finalJ = j; + List currentLayerLocations = currentRowLocations.stream() + .filter(l -> l.getLayer().equals(finalJ + 1)) + .toList(); + LayerLocation tempLayerLocation = new LayerLocation(); + tempLayerLocation.setLayer(finalJ + 1); + tempLayerLocation.setCurrentColLocations(currentLayerLocations); + layerLocations.add(tempLayerLocation); + } + RowLocation tempRowLocation = new RowLocation(); + tempRowLocation.setRow(finalI + 1); + tempRowLocation.setCurrentLayerLocations(layerLocations); + rowLocations.add(tempRowLocation); + } + logger.info("查询库位数据成功,库区:{}", location.getAreaId()); + // 设置最终数据 + rsp.setReturnData(rowLocations); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询库位成功"); + return JSON.toJSONString(rsp); + } catch (Exception e) { + logger.info("查询库位发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + /** + * 更新库位状态 + * + * @param location 库位 + * @return 结果 + */ + @PostMapping("/updateLocation") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateLocation(@RequestBody Location location) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // TODO 这里要更新料箱信息 + if (StringUtils.isNotEmpty(location.getVehicleId())) {// 载具号不为空 + // 判断是不是需要往载具表里面添加数据 + if (vehicleService.selVehicleById(location.getVehicleId()) == null) { + // 添加新载具 + Vehicle newVehicle = new Vehicle(); + newVehicle.setVehicleId(location.getVehicleId()); + newVehicle.setVehicleStatus(VehicleStatus.ON.getCode()); + newVehicle.setCurrentLocation(location.getLocationId()); + newVehicle.setIsEmpty(1); + vehicleService.addVehicle(newVehicle); + } + } + locationService.modifyLocation(location); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("更新库位状态发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新库位状态成功"); + return JSON.toJSONString(rsp); + } + + /** + * 更新库位状态 + * + * @param location 库位 + * @return 结果 + */ + @PostMapping("/getAvailableLocations") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getAvailableLocations(@RequestBody Location location) { + logger.info("查询空闲可用库位"); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + Location locationQuery = new Location(); + locationQuery.setAreaId(location.getAreaId()); + locationQuery.setLocationStatus(LocationStatus.EMPTY.getCode()); + locationQuery.setIsLock(0); + List availableLocations = locationService.selLocations(locationQuery); + rsp.setReturnData(availableLocations); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("查询可用库位错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询可用库位成功"); + return JSON.toJSONString(rsp); + } + + /** + * 查询料箱信息 + * @param tableRequest 请求 + * @return 结果 + */ + @PostMapping("/getVehicles") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getVehicles(@RequestBody TableRequest tableRequest) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询料箱请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); +// String[] orderByArr = {"task_id", "task_type", "task_status", "goods_id", "goods_name", "task_priority", "expiration_date", "create_time"}; + String orderByStr = ""; + +// if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { +// orderByStr = pageRequest.getOrderBy(); +// } else { +// // 默认排序 +// orderByStr = ""; +// } + + Vehicle vehicleQuery = new Vehicle(); + vehicleQuery.setVehicleId(tableRequest.getParam().getVehicleId()); + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List vehicles = vehicleService.selVehicles(vehicleQuery); + PageInfo vehiclePageInfo = new PageInfo<>(vehicles); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询料箱成功!"); + tblResp.setRows(vehiclePageInfo.getList()); + tblResp.setTotal(vehiclePageInfo.getTotal()); + return JSON.toJSONString(tblResp); + } + + /** + * 更新料箱信息 + * + * @param vehicle 料箱 + * @return 结果 + */ + @PostMapping("/updateVehicleInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateVehicleInfo(@RequestBody Vehicle vehicle) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到更新料箱信息请求:{}", JSON.toJSONString(vehicle)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (StringUtils.isEmpty(vehicle.getVehicleId())) {// 箱号为空,不执行 + logger.error("请求箱号为空"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求箱号为空"); + return JSON.toJSONString(rsp); + } + vehicleService.modifyVehicle(vehicle); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新料箱信息成功"); + return JSON.toJSONString(rsp); + } + + /** + * 删除当前料箱信息 + * + * @param vehicle 料箱 + * @return 结果 + */ + @PostMapping("/deleteVehicle") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String deleteVehicle(@RequestBody Vehicle vehicle) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到更新料箱信息请求:{}", JSON.toJSONString(vehicle)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (StringUtils.isEmpty(vehicle.getVehicleId())) {// 箱号为空,不执行 + logger.error("请求箱号为空"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求箱号为空"); + return JSON.toJSONString(rsp); + } + // 判断当前料箱是不是空箱,带料不允许删除 + Vehicle currentVehicle = vehicleService.selVehicleById(vehicle.getVehicleId()); + if (currentVehicle != null && currentVehicle.getIsEmpty() != 1) {// 非空箱 + logger.error("非空箱不允许删除"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("非空箱不允许删除"); + return JSON.toJSONString(rsp); + } + // 将库中表中是当前载具的信息清空 + Location locationQuery = new Location(); + locationQuery.setVehicleId(vehicle.getVehicleId()); + List locations = locationService.selLocations(locationQuery); + for (Location location : locations) { + location.setVehicleId(WmsConstants.EMPTY_STRING); + locationService.modifyLocation(location); + } + vehicleService.deleteVehicle(vehicle); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("删除料箱成功"); + return JSON.toJSONString(rsp); + } +} \ No newline at end of file diff --git a/src/main/java/com/wms/controller/OrderCheckController.java b/src/main/java/com/wms/controller/OrderCheckController.java new file mode 100644 index 0000000..3274a60 --- /dev/null +++ b/src/main/java/com/wms/controller/OrderCheckController.java @@ -0,0 +1,62 @@ +package com.wms.controller; + +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.dto.orderCheck.addOrderCheckRequest; +import com.wms.entity.dto.orderCheck.queryOrderCheckRequest; +import com.wms.entity.table.OrderCheck; +import com.wms.service.IOrderCheckService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Slf4j +@RestController +@CrossOrigin +@RequestMapping(value = "/wms/api/orderCheck") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class OrderCheckController { + + + private final IOrderCheckService orderCheckService; + + /** + * 查询订单 + */ + @PostMapping(value = "/queryOrderCheck") + public WmsApiResponse> getOrderCheck(@RequestBody queryOrderCheckRequest request) { + return orderCheckService.queryOrderCheck(request); + } + + /** + * 执行订单 + */ + @PutMapping(value = "/executeOrderCheck/{recordId}") //更新 + public WmsApiResponse executeOrderCheck(@PathVariable String recordId) { + return orderCheckService.executeOrderCheck(recordId); + } + + /** + * 删除订单 + */ + @DeleteMapping(value = "/deleteCheck/{recordId}") + public WmsApiResponse deleteOrderIn(@PathVariable String recordId) { + return orderCheckService.deleteOrderCheck(recordId); + } + + @DeleteMapping(value = "/deleteCheckAll/{remarkReturn}") + public WmsApiResponse deleteOrderInAll(@PathVariable String remarkReturn){ + return orderCheckService.deleteOrderCheckAll(remarkReturn); + } + + + /** + * 添加订单 + */ + @PostMapping(value = "/addOrderCheck") + public WmsApiResponse addOrderCheck(@RequestBody addOrderCheckRequest request) { + return orderCheckService.addOrderCheck(request); + } +} diff --git a/src/main/java/com/wms/controller/OrderInController.java b/src/main/java/com/wms/controller/OrderInController.java new file mode 100644 index 0000000..5dae35a --- /dev/null +++ b/src/main/java/com/wms/controller/OrderInController.java @@ -0,0 +1,210 @@ +package com.wms.controller; + +import com.wms.controller.others.WcsController; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.wcs.RequireInRequest; +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.common.WmsApiResponseByCheckBack; +import com.wms.entity.dto.orderIn.*; +import com.wms.entity.table.*; +import com.wms.mapper.*; +import com.wms.service.IOrderInService; +import jakarta.servlet.http.HttpSession; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; +import java.util.List; + +@Slf4j +@RestController +@CrossOrigin +@RequestMapping(value = "/wms/api/orderIn") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class OrderInController { + + private final WcsController wcsController; + private final AppOrderInMapper appOrderInMapper; + private final VehicleIistMapper vehicleIistMapper; + private final PartInfoMapper partInfoMapper; + private final IOrderInService iOrderInService; + private final TaskMapper taskMapper; + + + /** + * 查询入库单 + * @param request 请求参数 + * @return 返回结果 + */ + @PostMapping(value = "/queryOrderIn") + public WmsApiResponse> queryOrderIn(@RequestBody queryOrderInRequest request) { + return iOrderInService.queryOrderIn(request); + } + + /** + * 发动机应急申请入库 + * @param request 请求参数 + * @return 返回结果 + */ + @PostMapping(value = "/loginInBad") + public ResponseEntity loginInBad(@RequestBody loginInBad request) { + //对入库口、母托号、机型进行判断 + if (request.getEfSelect() == null || request.getEfSelect().isEmpty()){ + return new ResponseEntity(-1, "入库口不能为空,请重试!"); + } + if (request.getVehicleNo()== null || request.getVehicleNo().isEmpty()){ + return new ResponseEntity(-1, "母托号不能为空,请重试!"); + } + if (request.getModel() == null || request.getModel().isEmpty()){ + return new ResponseEntity(-1, "机型不能为空,请重试!"); + } + if (!"201".equals(request.getEfSelect()) && !"228".equals(request.getEfSelect())) { + return new ResponseEntity(-1, "入库口填写错误,请重试!"); + } + VechileList vehicle = new VechileList(); + vehicle.setVehicleId(request.getVehicleNo()); + if (vehicleIistMapper.select(vehicle) == null || vehicleIistMapper.select(vehicle).isEmpty()){ + return new ResponseEntity(-1, "该母托号在数据库中不存在!"); + } + //检查机型 + PartInfo partInfo = new PartInfo(); + partInfo.setMaterial(request.getModel()); + partInfo.setItemDesc("发动机"); + if (partInfoMapper.selPartsByEqual(partInfo) == null || partInfoMapper.selPartsByEqual(partInfo).isEmpty()){ + return new ResponseEntity(-1, "该机型在数据库中不存在!"); + } + RequireInRequest requestForUse = new RequireInRequest(); + requestForUse.setPoint(request.getEfSelect()); + requestForUse.setVehicleNo(request.getVehicleNo()); + requestForUse.setModel(request.getModel()); + requestForUse.setCodeMessage(request.getGoodsId()); + return wcsController.requestIn(requestForUse); + } + + /** + * 解析条码创建入库单 + * @param request 请求参数 + * @return 返回结果 + */ + @PostMapping(value = "/bindingVehicl") + @ResponseBody + public WmsApiResponse addOrderInByBlinging(@RequestBody downOrderInRequest request) { + String[] parts = request.goodsId.split("&"); + if (parts.length != 3){ + return new WmsApiResponse<>(-1, "条码格式错误,正确格式:物料号&数量&日期(例:PK100001&100&20250101)",null); + } + //检查原材料 + PartInfo partInfo = new PartInfo(); + partInfo.setMaterial(parts[0]); + partInfo.setItemDesc("原材料"); + if (partInfoMapper.selPartsByEqual(partInfo) == null || partInfoMapper.selPartsByEqual(partInfo).isEmpty()){ + return new WmsApiResponse<>(-1, "该原材料条码的物料号在数据库中不存在",null); + } + //检查母托盘 + VechileList vehicle = new VechileList(); + vehicle.setVehicleId(request.getVehicleNo()); + if (vehicleIistMapper.select(vehicle) == null || vehicleIistMapper.select(vehicle).isEmpty()){ + return new WmsApiResponse<>(-1, "该母托盘在数据库中不存在",null); + } + if(parts[2].length() != 8){ + return new WmsApiResponse<>(-1, "条码最后日期格式错误,正确格式例如:20250101",null); + } + return iOrderInService.addOrderInByBlinging(request, request.getUserName()); + } + + /** + * 绑定载具 + * @param request 请求参数 + * @return 返回结果 + */ + @PostMapping(value = "/bindingVehicle") + public WmsApiResponse bindingVehicle(@RequestBody bindingVehicleRequest request) { + return iOrderInService.bindingVehicle(request); + } + + /** + * 更新数量 + * @return 更新结果 + */ + @PostMapping(value = "/updateForNum") + public WmsApiResponse updateForNum(@RequestBody updateNumRequest request) { + return iOrderInService.updateForNum(request); + } + + /** + * 更新数据 + * @return 更新结果 + */ + @PostMapping(value = "/updateForInformation") + public WmsApiResponse updateForInformation(@RequestBody updateInformation request) { + return iOrderInService.updateForInformation(request); + } + + + /** + * 根据载具号查询入库单 + * @param vehicleNo 载具号 + * @return 查询结果 + */ + @GetMapping(value = "/getOrderInWithVehicleNo") + public WmsApiResponseByCheckBack> getOrderInWithVehicleNo(@RequestParam("vehicleNo") String vehicleNo) { + return iOrderInService.getOrderInWithVehicleNo(vehicleNo); + } + + /** + * 解绑载具 + * @param rowId 行号 + * @return 解绑结果 + */ + @PutMapping(value = "/unBindingVehicle/{rowId}") + public WmsApiResponse unBindingVehicle(@PathVariable String rowId) { + return iOrderInService.unBindingVehicle(rowId); + } + + /** + * 新增入库单 + * @param request 请求参数 + * @return 返回结果 + */ + @PostMapping(value = "/addOrderIn") + public WmsApiResponse addOrderIn(@RequestBody downOrderInRequest request) { + return iOrderInService.addOrderIn(request); + } + + /** + * 删除入库单 + * @param rowId 行号 + * @return 删除结果 + */ + @DeleteMapping(value = "/deleteOrderIn/{rowId}") + public WmsApiResponse deleteOrderIn(@PathVariable String rowId) { + return iOrderInService.deleteOrderIn(rowId); + } + + /** + * 将入库单转化成入库任务,要求支持单箱和并箱 + * @return 返回结果 + */ + @PostMapping(value = "/addInByTask") + public ResponseEntity addInByTask(@RequestBody goodsInByTaskRequest request) { + List check = appOrderInMapper.selectWithVehicle(request.getVehicleNo()); + if (check == null || check.isEmpty()){ + return new ResponseEntity(400, "该母托号没有任务,请先绑定"); + } + Task task = new Task(); + task.setVehicleNo(request.getVehicleNo()); + if (taskMapper.selTasks(task) == null || taskMapper.selTasks(task).isEmpty()){ + //return iOrderInService.addInByTask(request); + RequireInRequest requestForUse = new RequireInRequest(); + requestForUse.setPoint(request.getSelectByIn()); + requestForUse.setVehicleNo(request.getVehicleNo()); + requestForUse.setModel(null); + requestForUse.setCodeMessage("YJRK0001&00100&10001215"); + return wcsController.requestIn(requestForUse); + } + return new ResponseEntity(400, "该母托号已下发任务,请勿重复下发"); + } +} diff --git a/src/main/java/com/wms/controller/OrderOutController.java b/src/main/java/com/wms/controller/OrderOutController.java new file mode 100644 index 0000000..fc1f2b5 --- /dev/null +++ b/src/main/java/com/wms/controller/OrderOutController.java @@ -0,0 +1,174 @@ +package com.wms.controller; + + +import com.wms.constants.enums.OrderOutStatusEnum; +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.dto.orderOut.handOrderOutRequest; +import com.wms.entity.dto.orderOut.queryOrderOutRequest; +import com.wms.entity.table.OrderOut; +import com.wms.entity.table.Stock; +import com.wms.mapper.OrderOutMapper; +import com.wms.mapper.OrderOutRecordMapper; +import com.wms.service.IOrderOutService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Slf4j +@RestController +@CrossOrigin +@RequestMapping(value = "/wms/api/orderOut") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class OrderOutController { + + private final OrderOutMapper orderOutMapper; + private final OrderOutRecordMapper orderOutRecordMapper; + private final IOrderOutService orderOutService; + + /** + * 查询出库单 + * @param request 请求参数 + * @return 结果 + */ + @PostMapping(value = "/queryOrderOut") //刪除 + public WmsApiResponse> queryOrderOut(@RequestBody queryOrderOutRequest request) { + return orderOutService.queryOrderOut(request); + } + + /** + * 查询按库位出库的出库单 + * @param request 请求参数 + * @return 结果 + */ + @PostMapping(value = "/queryOrderOutByLocation") //刪除 + public WmsApiResponse> queryOrderOutByLocation(@RequestBody queryOrderOutRequest request) { + return orderOutService.queryOrderOutByLocation(request); + } + + /** + * 手动把出库单变成完成 + * @param rowId 请求参数 + * @return 结果 + */ + @PutMapping(value = "/handFinish/{rowId}") + public WmsApiResponse handFinish(@PathVariable String rowId) { + return orderOutService.handFinish(rowId); + } + /** + * 执行出库单 + * @param rowId 数据行号 + * @return 执行结果 + */ + @PutMapping(value = "/executeOrderOut/{rowId}") //更新 + public WmsApiResponse executeOrderOut(@PathVariable String rowId) { + return orderOutService.executeOrderOut(rowId); + } + + /** + * 生成出库任务 + * @return 执行结果 + */ + @PutMapping(value = "/downCheckTask") //更新 + public WmsApiResponse downCheckTask(@RequestBody Stock stock) { + return orderOutService.downCheckTask(stock); + } + + /** + * 按库位出库 + */ + @PutMapping(value = "/executeOrderOutByLocation/{rowId}") + public WmsApiResponse executeOrderOutByLocation(@PathVariable String rowId) { + return orderOutService.executeOrderOutByLocation(rowId); + } + + /** + * 完成出库工单 + * @return 结果 + */ + @PostMapping(value = "/finishTaskFile") + public WmsApiResponse finishTaskFile() { + //把所有订单类型为1的出库单备份一下再删除,先检查是否全部完成 + OrderOut orderOut0 = new OrderOut(); + orderOut0.setOrderType(1); + List queryResult = orderOutMapper.query(orderOut0); + + List filteredOrderOuts = queryResult.stream() + .filter(orderOut -> orderOut.getStatus() != 100) + .toList(); + + if (!filteredOrderOuts.isEmpty()){ + return new WmsApiResponse<>(1, "还有未完成的出库单,请先完成", null); + } + if (orderOutRecordMapper.insertList(queryResult) > 0){ + //删除所有订单类型为1的出库单 + orderOutMapper.deleteOrdersByType(1); + return new WmsApiResponse<>(0, "执行成功", null); + } + return new WmsApiResponse<>(1, "执行失败,备份失败", null); + } + + /** + * 母托下线 + * @return 执行结果 + */ + @PutMapping(value = "/downEmptyBox") //更新 + public WmsApiResponse downEmptyBox() { + return orderOutService.executeDownEmpty(); + } + + /** + * 一键执行所有出库单 + * @return 执行结果 + */ + @PutMapping(value = "/executeAllOrderOut/{rowId}") + public WmsApiResponse outAllOrderOut() { + List queryResult = orderOutMapper.queryAll(); + + List filteredOrderOuts = queryResult.stream() + .filter(orderOut -> (orderOut.getOrderType() == 1 || orderOut.getOrderType() == 2) && orderOut.getStatus() != 100 && orderOut.getStatus() != 1) + .toList(); + + boolean allSuccess = true; + for (OrderOut row : filteredOrderOuts) { + String rowId2 = row.getRowId(); + try { + WmsApiResponse a = orderOutService.executeOrderOut(rowId2); + log.info("执行出库单 {}: {}", rowId2, a); + } catch (Exception e) { + log.error("执行出库单 {} 失败: {}", rowId2, e.getMessage()); + allSuccess = false; + } + } + + if (allSuccess) { + return new WmsApiResponse<>(0, "执行成功", null); + } else { + return new WmsApiResponse<>(1, "部分出库单执行失败,请检查日志", null); + } + } + + + /** + * 删除出库单 + * @param rowId 数据行号 + * @return 删除结果 + */ + @DeleteMapping(value = "/deleteOrderOut/{rowId}") //刪除 + public WmsApiResponse deleteOrderOut(@PathVariable String rowId) { + return orderOutService.deleteOrderOut(rowId); + } + + + /** + * 创建手动出库单 + * @return 创建结果 + */ + @PostMapping(value = "/addOrderOut") + public WmsApiResponse createOrderOut(@RequestBody handOrderOutRequest request) { + return orderOutService.createOrderOut(request); + } + +} diff --git a/src/main/java/com/wms/controller/RecordController.java b/src/main/java/com/wms/controller/RecordController.java new file mode 100644 index 0000000..1a15a19 --- /dev/null +++ b/src/main/java/com/wms/controller/RecordController.java @@ -0,0 +1,91 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Task; +import com.wms.mapper.TaskRecordMapper; +import com.wms.service.TaskRecordService; +import com.wms.utils.HttpUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * WMS记录控制类 + * + * @author 梁州 + * @date 2023/2/14 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/record") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class RecordController extends BaseController { + /** + * 任务记录服务 + */ + private final TaskRecordService taskRecordService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + private final TaskRecordMapper taskRecordMapper; + /** + * 查询任务记录 + * + * @param tableRequest 请求 + * @return 结果 + */ + @PostMapping("/getTaskRecords") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getVehicles(@RequestBody TableRequest tableRequest) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询任务记录请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 +// PageDomain pageRequest = tableRequest.getPage(); +//// String[] orderByArr = {"task_id", "task_type", "task_status", "goods_id", "goods_name", "task_priority", "expiration_date", "create_time"}; +// String orderByStr = ""; + +// if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { +// orderByStr = pageRequest.getOrderBy(); +// } else { +// // 默认排序 +// orderByStr = ""; +// } + + Task taskRecordQuery = new Task(); + taskRecordQuery.setTaskType(tableRequest.getParam().getTaskType()); + taskRecordQuery.setGoodsId(tableRequest.getParam().getGoodsId()); + taskRecordQuery.setVehicleNo(tableRequest.getParam().getVehicleNo()); + // PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List records = taskRecordMapper.selTasks(taskRecordQuery); + PageInfo taskRecordPageInfo = new PageInfo<>(records); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询任务记录成功!"); + tblResp.setRows(taskRecordPageInfo.getList()); + tblResp.setTotal(taskRecordPageInfo.getTotal()); + return JSON.toJSONString(tblResp); + + } +} diff --git a/src/main/java/com/wms/controller/StandController.java b/src/main/java/com/wms/controller/StandController.java new file mode 100644 index 0000000..28d1455 --- /dev/null +++ b/src/main/java/com/wms/controller/StandController.java @@ -0,0 +1,133 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.Stand; +import com.wms.service.StandService; +import com.wms.utils.HttpUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 站台控制类 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/stand") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class StandController extends BaseController { + /** + * 站台服务 + */ + private final StandService standService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 查询可用站台列表 + * @return 符合条件的站台列表 + */ + @PostMapping("/getAllStands") + @ResponseBody + public List getAllStands(@RequestBody JSONObject type){ + logger.info("查询站台{}", JSON.toJSONString(type)); + int type_int = type.getIntValue("type"); + Stand query = new Stand(); + if (type_int == 1) {// 入库站台 + query.setAllowIn(1); + } else if (type_int == 2) {// 出库站台 + query.setAllowOut(1); + } else if (type_int == 3) {// 盘点站台 + query.setAllowIn(1); + query.setAllowOut(1); + } + return standService.selStands(query); + } + + /** + * 更新站台状态 + * + * @param stand 站台 + * @return 结果 + */ + @PostMapping("/updateStandInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateStandInfo(@RequestBody Stand stand) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + standService.modifyStand(stand); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("更新站台信息发生错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + logger.info("更新站台信息成功:{}", stand.toLoggerString()); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新站台信息成功"); + return JSON.toJSONString(rsp); + } + + /** + * 查找所有库存 + */ + @PostMapping("/getStands") + @ResponseBody + public String getStands(@RequestBody TableRequest tableRequest){ + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询库存请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); +// String[] orderByArr = {"location_id", "vehicle_id", "goods_id", "batch_no", "remain_num", "expiration_date", "create_time"}; + String orderByStr = ""; + +// if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { +// orderByStr = pageRequest.getOrderBy(); +// } else { +// // 默认排序 +// orderByStr = "expiration_date desc"; +// } + + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List stands = standService.selStands(tableRequest.getParam()); + PageInfo standPageInfo = new PageInfo<>(stands); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询库存成功!"); + tblResp.setRows(standPageInfo.getList()); + tblResp.setTotal(standPageInfo.getTotal()); + logger.info("查询库存成功,总数:{},当前页:{},当前页数量:{}", standPageInfo.getTotal(), standPageInfo.getPageNum(), standPageInfo.getPageSize()); + return JSON.toJSONString(tblResp); + } +} diff --git a/src/main/java/com/wms/controller/StockController.java b/src/main/java/com/wms/controller/StockController.java new file mode 100644 index 0000000..e393804 --- /dev/null +++ b/src/main/java/com/wms/controller/StockController.java @@ -0,0 +1,285 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.page.PageDomain; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.OrderOut; +import com.wms.entity.table.Stock; +import com.wms.service.StockService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import com.wms.utils.WmsUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; + +/** + * WMS库存控制类 + * @author 梁州 + * @date 2023/2/14 + */ +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/wms/stock") +public class StockController extends BaseController { + /** + * 库存服务 + */ + private final StockService stockService; + + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 查找所有库存 + */ + @PostMapping("/getAllStocks") + @ResponseBody + public String getAllStocks(@RequestBody TableRequest tableRequest){ + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询库存请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); + String[] orderByArr = {"location_id", "vehicle_id", "goods_id", "batch_no", "remain_num", "expiration_date", "create_time"}; + String orderByStr; + + if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { + orderByStr = pageRequest.getOrderBy(); + } else { + // 默认排序 + orderByStr = "expiration_date desc"; + } + + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + //List stocks = stockService.selStocksFront(tableRequest.getParam()); + List stocks = stockService.selStocksFrontTwo(tableRequest.getParam(), tableRequest.getParam2()); + PageInfo stockPageInfo = new PageInfo<>(stocks); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询库存成功!"); + tblResp.setRows(stockPageInfo.getList()); + tblResp.setTotal(stockPageInfo.getTotal()); + logger.info("查询库存成功,总数:{},当前页:{},当前页数量:{}", stockPageInfo.getTotal(), stockPageInfo.getPageNum(), stockPageInfo.getPageSize()); + return JSON.toJSONString(tblResp); + } + + /** + * 查找所有原材料 + */ + @PostMapping("/getAllStocks1") + @ResponseBody + public String getAllStocksByY(@RequestBody TableRequest tableRequest){ + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询库存请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); + String[] orderByArr = {"location_id", "vehicle_id", "goods_id", "batch_no", "remain_num", "expiration_date", "create_time"}; + String orderByStr; + + if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { + orderByStr = pageRequest.getOrderBy(); + } else { + // 默认排序 + orderByStr = "expiration_date desc"; + } + + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + //List stocks = stockService.selStocksFront(tableRequest.getParam()); + List stocks1 = stockService.selStocksFrontTwo(tableRequest.getParam(), tableRequest.getParam2()); + + // 过滤掉所有 batchNo 不是原材料的库存记录 + List stocks = stocks1.stream() + .filter(stock -> { + String batchNo = stock.getBatchNo(); + return batchNo != null && batchNo.equals("原材料"); + }) + .toList(); + + + + PageInfo stockPageInfo = new PageInfo<>(stocks); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询库存成功!"); + tblResp.setRows(stockPageInfo.getList()); + tblResp.setTotal(stockPageInfo.getTotal()); + logger.info("查询库存成功,总数:{},当前页:{},当前页数量:{}", stockPageInfo.getTotal(), stockPageInfo.getPageNum(), stockPageInfo.getPageSize()); + return JSON.toJSONString(tblResp); + } + + /** + * 批量查找符合条件的库存---按物料汇总 + */ + @PostMapping("/getAllStocksByMultiple") + @ResponseBody + public String getAllStocksByMultiple(@RequestBody String[] multiQueryEntries){ + TableResponse rsp = new TableResponse(); + if (multiQueryEntries == null){ + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求数据为空,无法处理!"); + return JSON.toJSONString(rsp); + } + List stocksByAllKeys = new ArrayList<>(); + for(String multiQueryEntry : multiQueryEntries){ + //去查询符合条件的数据并插入到一个表中 + Stock stock = new Stock(); + stock.setGoodsId(multiQueryEntry); + List stocks = stockService.selStocks(stock); + //把stocks全部添加到stocksByAllKeys中 + stocksByAllKeys.addAll(stocks); + } + PageInfo stockPageInfo = new PageInfo<>(stocksByAllKeys); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询库存成功!"); + rsp.setRows(stockPageInfo.getList()); + rsp.setTotal(stockPageInfo.getTotal()); + return JSON.toJSONString(rsp); + } + /** + * 查找所有库存---按物料汇总 + */ + @PostMapping("/getAllStocksByGoodsId") + @ResponseBody + public String getAllStocksByGoodsId(@RequestBody TableRequest tableRequest){ + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到查询库存请求:{}", JSON.toJSONString(tableRequest)); + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); + String[] orderByArr = {"location_id", "vehicle_id", "goods_id", "batch_no", "remain_num", "expiration_date", "create_time"}; + String orderByStr; + + if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { + orderByStr = pageRequest.getOrderBy(); + } else { + // 默认排序 + orderByStr = "goods_id desc"; + } + Stock stockQuery = new Stock(); + stockQuery.setGoodsId(tableRequest.getParam()); + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List stocks = stockService.selStocksByGoodsId(stockQuery); + PageInfo stockPageInfo = new PageInfo<>(stocks); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询库存成功!"); + tblResp.setRows(stockPageInfo.getList()); + tblResp.setTotal(stockPageInfo.getTotal()); + logger.info("查询库存成功,总数:{},当前页:{},当前页数量:{}", stockPageInfo.getTotal(), stockPageInfo.getPageNum(), stockPageInfo.getPageSize()); + return JSON.toJSONString(tblResp); + } + + /** + * 更新库存信息 + * + * @param stock 库存 + * @return 结果 + */ + @PostMapping("/updateStockInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateStockInfo(@RequestBody Stock stock) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到更新库存信息请求:{}", JSON.toJSONString(stock)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (StringUtils.isEmpty(stock.getStockId())) {// 库存编号为空,不允许执行 + logger.error("请求的库存编号为空,不允许修改"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求的库存编号为空,不允许修改"); + return JSON.toJSONString(rsp); + } + if (stock.getRealNum() == 0) { + stockService.deleteStock(stock.getStockId()); + } else { + stockService.modifyStock(stock); + } + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新库存信息成功"); + return JSON.toJSONString(rsp); + } + + /** + * 新增库存 + * + * @param stock 库存 + * @return 结果 + */ + @PostMapping("/addNewStock") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String addNewStock(@RequestBody Stock stock) { + logger.info("请求的ip地址:{}", HttpUtils.getIpAddr(servletRequest)); + logger.info("接收到人工添加库存:{}", JSON.toJSONString(stock)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + Stock tempStock = new Stock(); + tempStock.setStockId(WmsUtils.generateId("ST")); + + + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("添加库存信息成功"); + return JSON.toJSONString(rsp); + } +} \ No newline at end of file diff --git a/src/main/java/com/wms/controller/TaskController.java b/src/main/java/com/wms/controller/TaskController.java new file mode 100644 index 0000000..1cd5a6d --- /dev/null +++ b/src/main/java/com/wms/controller/TaskController.java @@ -0,0 +1,1354 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.wms.constants.enums.*; +import com.wms.entity.app.*; +import com.wms.entity.app.wcs.*; +import com.wms.entity.page.PageDomain; +import com.wms.mapper.StockMapper; +import com.wms.mapper.TaskMapper; +import com.wms.entity.page.TableRequest; +import com.wms.entity.page.TableResponse; +import com.wms.entity.table.*; +import com.wms.constants.WmsConstants; +import com.wms.utils.storage.LocationUtils; +import com.wms.service.*; +import com.wms.utils.HttpUtils; +import com.wms.mapper.LocationMapper; +import com.wms.utils.StringUtils; +import com.wms.utils.WmsUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.*; + +/** + * WMS任务控制类 + * + * @author 梁州 + * @date 2023/2/14 + */ +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/wms/task") +public class TaskController extends BaseController { + /** + * 任务服务 + */ + private final TaskService taskService; + /** + * 任务 Mapper + */ + private final TaskMapper taskMapper; + /** + * 库存 Mapper + */ + private final StockMapper stockMapper; + /** + * 库存服务 + */ + private final StockService stockService; + /** + * 库位操作类 + */ + private final LocationUtils locationUtils; + + /** + * 零件 + */ + private final PartInfoService partInfoService; + /** + * 库位服务 + */ + private final LocationService locationService; + /** + * 任务记录服务 + */ + private final TaskRecordService taskRecordService; + /** + * 站台服务 + */ + private final StandService standService; + /** + * 载具服务 + */ + private final VehicleService vehicleService; + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 订单入库 Mapper + */ + private final com.wms.mapper.AppOrderInMapper appOrderInMapper; + /** + * 库位 Mapper + */ + private final LocationMapper locationMapper; + /** + * 创建入库任务(人工入库) + * + * @param taskInRequestEntityList 入库任务 + * @return 结果 + */ + @PostMapping("/sendGoodsInTask") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String receiveGoodsInTask(@RequestBody List taskInRequestEntityList) { + logger.info("接收到入库任务:{},ip地址:{}", JSON.toJSONString(taskInRequestEntityList), HttpUtils.getIpAddr(servletRequest)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 根据ip获得站台信息 + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() < 1) {// 请求的地址不是站台电脑 + logger.error("请用站台电脑下发任务"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请用站台电脑下发任务"); + return JSON.toJSONString(rsp); + } + // 同一次请求为同一载具任务,为同一任务组 + String taskGroupId = WmsUtils.generateUUIDString(); + // 下一个库位 + Location nextLocation = new Location(); + // 当前载具 + String currentVehicleNo = taskInRequestEntityList.get(0).getVehicleNo(); + // 入库设备号 + int currentSelEquip = 0; + // 查询当前载具库存信息 + Vehicle vehicleQuery = new Vehicle(); + vehicleQuery.setVehicleId(currentVehicleNo); + List existVehicles = vehicleService.selVehicles(vehicleQuery); + if (existVehicles.size() > 0 && Objects.equals(existVehicles.get(0).getVehicleStatus(), VehicleStatus.ON.getCode())) { + logger.error("载具{}已经在库存中,请勿重复入库!", currentVehicleNo); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("该托盘已经在库存中,请勿重复入库!"); + return JSON.toJSONString(rsp); + } + Task taskQuery = new Task(); + taskQuery.setVehicleNo(currentVehicleNo); + List sameVehicleTasks = taskService.selTasks(taskQuery); + if (sameVehicleTasks.size() > 0) { + logger.error("载具{}存在其他任务,请勿重复入库!", currentVehicleNo); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("该载具存在其他任务,请勿重复入库!"); + return JSON.toJSONString(rsp); + } + if (existVehicles.size() > 0) { + nextLocation = locationService.selLocations(new Location(existVehicles.get(0).getCurrentLocation())).get(0); + } + for (TaskInRequestEntity taskInRequestEntity : taskInRequestEntityList) {// 循环生成入库任务 + // 生成任务 + Task task_new = new Task(); + // 保存必要的物料信息 + task_new.setTaskId(WmsUtils.generateId("RK")); + // 设置发送给WCS的任务信息 + task_new.setTaskType(TaskType.IN.getCode()); + task_new.setTaskStatus(WmsTaskStatus.NEW.getCode()); + task_new.setTaskGroup(taskGroupId); + // 查找库位时过滤掉不可用堆垛机 + Stand standQuery1 = new Stand(); + standQuery1.setStandType(3); + standQuery1.setIsLock(0); + standQuery1.setStandStatus(0); + List availableEquips = standService.selStands(standQuery1); + if (availableEquips.size() < 1) {// 没有可用堆垛机,请稍后重试 + logger.error("当前库无可用堆垛机,请稍后重试!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前库无可用堆垛机,请稍后重试!"); + return JSON.toJSONString(rsp); + } + // 找到占用库位数量最少的堆垛机 + int occupyLocationsNum = 1000000; + for (Stand availableEquip : availableEquips) { + Location locationQuery1 = new Location(); + locationQuery1.setEquipmentId(availableEquip.getEquipmentId()); + locationQuery1.setLocationStatus(LocationStatus.OCCUPY.getCode()); + List locations1 = locationService.selLocations(locationQuery1); + if (locations1.size() < occupyLocationsNum) {// 当前最小 + occupyLocationsNum = locations1.size(); + currentSelEquip = availableEquip.getEquipmentId(); + } + } + //查找到对应的入库站台 + Stand standQuery2 = new Stand(); + standQuery2.setAllowIn(1); + standQuery2.setAllowOut(0); + standQuery2.setEquipmentId(currentSelEquip); + standQuery2.setIsLock(0); + standQuery2.setStandStatus(0); + standQuery2.setStandType(1); + List availableStands = standService.selStands(standQuery2); + if (availableStands.size() < 1) { + logger.error("当前堆垛机无可用入库站台,请稍后重试!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前堆垛机无可用入库站台,请稍后重试!"); + return JSON.toJSONString(rsp); + } + task_new.setOrigin(availableStands.get(0).getStandId()); + // 查找下一个可用库位 + if (StringUtils.isEmpty(nextLocation.getLocationId())) { + List nextLocations = locationService.selNextLocation(new Location(currentSelEquip)); + if (nextLocations.size() < 1) { + logger.error("入库错误:没有可用储存位"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("入库错误:没有可用储存位"); + return JSON.toJSONString(rsp); + } + nextLocation = nextLocations.get(0); + } + nextLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + nextLocation.setVehicleId(taskInRequestEntity.getVehicleNo()); + task_new.setDestination(nextLocation.getLocationId()); + task_new.setWeight(taskInRequestEntity.getWeight() == null ? 0 : taskInRequestEntity.getWeight()); + task_new.setVehicleNo(taskInRequestEntity.getVehicleNo()); + task_new.setCreateTime(new Date()); + task_new.setUserName(taskInRequestEntity.getUserName()); + task_new.setGoodsId(taskInRequestEntity.getGoodsId()); + if (!taskInRequestEntity.getGoodsId().equals(WmsConstants.EMPTY_STOCK_GOODS_ID)) { + // 查询物料信息后设定 + PartInfo partInfo = partInfoService.selPartByPartNo(taskInRequestEntity.getGoodsId()); + task_new.setGoodsName(partInfo.getItemDesc()); + if (Double.parseDouble(partInfo.getSLED()) > 0) { + //task_new.setProductionDate(taskInRequestEntity.getProductionDate()); + task_new.setExpirationDate(WmsUtils.calculationMonth(taskInRequestEntity.getProductionDate(), (int) (12 * Double.parseDouble(partInfo.getSLED())))); + } + } + task_new.setOperateNum(taskInRequestEntity.getGoodsNum()); + task_new.setTotalNum(0); + task_new.setTaskPriority(1); + // 插入入库任务 + taskService.addTask(task_new); + } + // 锁定库位 + locationService.modifyLocation(nextLocation); + // 添加载具/更新载具 + if (existVehicles.size() == 0) { + Vehicle newVehicle = new Vehicle(); + newVehicle.setVehicleId(currentVehicleNo); + newVehicle.setVehicleStatus(VehicleStatus.IN.getCode());// 入库中 + newVehicle.setCurrentLocation(nextLocation.getLocationId()); + if (Objects.equals(taskInRequestEntityList.get(0).getIsEmpty(), "0")) { + newVehicle.setIsEmpty(1); + } else { + newVehicle.setIsEmpty(0); + } + vehicleService.addVehicle(newVehicle); + } else { + Vehicle oldVehicle = existVehicles.get(0); + oldVehicle.setVehicleStatus(VehicleStatus.IN.getCode());// + oldVehicle.setCurrentLocation(nextLocation.getLocationId()); + if (Objects.equals(taskInRequestEntityList.get(0).getIsEmpty(), "0")) { + oldVehicle.setIsEmpty(1); + } else { + oldVehicle.setIsEmpty(0); + } + vehicleService.modifyVehicle(oldVehicle); + } + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("创建入库任务成功"); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + /** + * 出库---根据零件号出库 + * @param taskOutRequest 请求 + * @return 结果 + */ + @PostMapping("/sendGoodsOutTask") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String receiveGoodsOutTask(@RequestBody TaskOutRequestEntity taskOutRequest) { + logger.info("接收到出库请求:{},ip地址:{}", JSON.toJSONString(taskOutRequest), HttpUtils.getIpAddr(servletRequest)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + StringBuilder returnMessage = new StringBuilder(); + try { + // 根据ip获得站台信息 + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() < 1) {// 请求的地址不是站台电脑 + logger.error("请用站台电脑下发任务"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请用站台电脑下发任务"); + return JSON.toJSONString(rsp); + } + // 判断物料编号和数量有没有输入 + if (taskOutRequest== null || StringUtils.isEmpty(taskOutRequest.getGoodsId()) || taskOutRequest.getNeedNum() == null || taskOutRequest.getNeedNum() == 0) { + logger.error("物料号和数量必须输入,请确认!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("物料号和数量必须输入,请确认!"); + return JSON.toJSONString(rsp); + } + // 查找库存 + Stock stockQuery = new Stock(); + stockQuery.setGoodsId(taskOutRequest.getGoodsId()); + stockQuery.setVehicleId(taskOutRequest.getVehicleNo()); + stockQuery.setStockStatus(StockStatus.OK.getCode()); + List needStocks = stockService.selStocks(stockQuery); + if (needStocks.size() == 0) {// 没有库存 + logger.error("选择的库存不存在,无法出库!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("选择的库存不存在,无法出库!"); + return JSON.toJSONString(rsp); + } + int needNum = taskOutRequest.getNeedNum(); + Location currentLocation; + for (Stock needStock : needStocks) { + if (needNum > 0 && needStock.getRemainNum() > 0) {// 还有需求数量 + Task tempTask = new Task(); + tempTask.setTaskId(WmsUtils.generateId("CK")); + tempTask.setTaskType(TaskType.OUT.getCode()); + tempTask.setTaskStatus(WmsTaskStatus.NEW.getCode()); + tempTask.setTaskGroup(WmsUtils.generateUUIDString()); + tempTask.setTaskPriority(1); + tempTask.setPickStand(stands.get(0).getStandId()); + tempTask.setVehicleNo(needStock.getVehicleId()); + tempTask.setUserName(taskOutRequest.getUserName()); + tempTask.setGoodsId(needStock.getGoodsId()); + tempTask.setGoodsName(needStock.getGoodsName()); + tempTask.setCreateTime(new Date()); + tempTask.setProductionDate(needStock.getProductionDate()); + tempTask.setExpirationDate(needStock.getExpirationDate()); + tempTask.setTotalNum(needStock.getRealNum()); + tempTask.setOrigin(needStock.getLocationId()); + //查找到对应的出库 + currentLocation = locationService.selLocations(new Location(needStock.getLocationId())).get(0); + Stand standQuery2 = new Stand(); + standQuery2.setAllowIn(0); + standQuery2.setAllowOut(1); + standQuery2.setEquipmentId(currentLocation.getEquipmentId()); + standQuery2.setIsLock(0); + standQuery2.setStandStatus(0); + standQuery2.setStandType(1); + List availableStands = standService.selStands(standQuery2); + if (availableStands.size() < 1) { + logger.error("当前库存的出库站台不可用!"); + // 返回错误信息 + returnMessage.append("当前库存所在载具").append(currentLocation.getVehicleId()).append("的出库站台不可用!\n"); + } + tempTask.setDestination(availableStands.get(0).getStandId()); + if (needNum <= needStock.getRemainNum()) {// 数量足够 + tempTask.setOperateNum(needNum); + needNum = 0; + needStock.setRemainNum(needStock.getRemainNum() - needNum); + } else { + tempTask.setOperateNum(needStock.getRemainNum()); + needNum -= needStock.getRemainNum(); + needStock.setRemainNum(0); + } + // 添加任务 + taskService.addTask(tempTask); + logger.info("添加任务成功,{}", JSON.toJSONString(tempTask)); + // 更新库存 + needStock.setStockStatus(StockStatus.OUT.getCode()); + stockService.modifyStock(needStock); + logger.info("更新库存信息成功,{}", JSON.toJSONString(needStock)); + // 更新载具信息 + Vehicle currentVehicle = vehicleService.selVehicleById(needStock.getVehicleId()); + if (currentVehicle == null) { + currentVehicle = new Vehicle(); + currentVehicle.setVehicleId(needStock.getVehicleId()); + currentVehicle.setIsEmpty(0); + currentVehicle.setCurrentLocation(needStock.getLocationId()); + currentVehicle.setVehicleStatus(VehicleStatus.OUT.getCode()); + vehicleService.addVehicle(currentVehicle); + } else { + currentVehicle.setVehicleStatus(VehicleStatus.OUT.getCode()); + vehicleService.modifyVehicle(currentVehicle); + } + logger.info("更新载具信息,{}", JSON.toJSONString(currentVehicle)); + // 将当前载具的其他库存也设置为相同状态 + Stock stockQuery2 = new Stock(); + stockQuery2.setVehicleId(needStock.getVehicleId()); + List sameVehicleStocks = stockService.selStocks(stockQuery2); + for (Stock sameVehicleStock : sameVehicleStocks) { + if (!Objects.equals(sameVehicleStock.getStockId(), needStock.getStockId())) { + sameVehicleStock.setStockStatus(StockStatus.OUT.getCode()); + stockService.modifyStock(sameVehicleStock); + } + } + logger.info("更新载具中其他库存信息,{}", needStock.getVehicleId()); + } + } + if (needNum > 0) {// 库存不足的情况下 + returnMessage.append("当前可用数量不足,已将能够出库的库存出库。\n"); + } + logger.info("下发出库任务成功"); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage(String.valueOf(returnMessage)); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("创建出库任务发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + /** + * 出库---根据料箱号出 + * @param taskOutRequest 请求 + * @return 结果 + */ + @PostMapping("/vehicleOut") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String selectVehicleOut(@RequestBody TaskOutRequestEntity taskOutRequest) { + logger.info("接收到出箱请求:{},ip地址:{}", JSON.toJSONString(taskOutRequest), HttpUtils.getIpAddr(servletRequest)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 根据ip获得站台信息 + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() < 1) {// 请求的地址不是站台电脑 + logger.error("请用站台电脑下发任务"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请用站台电脑下发任务"); + return JSON.toJSONString(rsp); + } + // 判断物料编号和数量有没有输入 + if (taskOutRequest== null || StringUtils.isEmpty(taskOutRequest.getVehicleNo())) { + logger.error("箱号必须输入,请确认!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("箱号必须输入,请确认!"); + return JSON.toJSONString(rsp); + } + Vehicle vehicle = vehicleService.selVehicleById(taskOutRequest.getVehicleNo()); + if (vehicle == null || !Objects.equals(vehicle.getVehicleStatus(), VehicleStatus.ON.getCode())) { + logger.error("当前箱子不可用,请确认!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前箱子不可用,请确认!"); + return JSON.toJSONString(rsp); + } + int needNum = taskOutRequest.getNeedNum(); + // 生成任务 + Task tempTask = new Task(); + tempTask.setVehicleNo(taskOutRequest.getVehicleNo()); + tempTask.setTaskId(WmsUtils.generateId("RKCK")); + tempTask.setTaskGroup(WmsUtils.generateUUIDString()); + tempTask.setTaskStatus(WmsTaskStatus.NEW.getCode()); + tempTask.setTaskType(TaskType.OUT.getCode()); + tempTask.setOperateNum(0); + tempTask.setCreateTime(new Date()); + tempTask.setGoodsId(WmsConstants.EMPTY_STOCK_GOODS_ID); + tempTask.setUserName(taskOutRequest.getUserName()); + tempTask.setPickStand(stands.get(0).getStandId()); + tempTask.setTaskPriority(1); + tempTask.setWeight((double) 0); + tempTask.setOrigin(vehicle.getCurrentLocation()); + //查找到对应的出库站台 + Location currentLocation = locationService.selLocations(new Location(vehicle.getCurrentLocation())).get(0); + Stand standQuery2 = new Stand(); + standQuery2.setAllowIn(0); + standQuery2.setAllowOut(1); + standQuery2.setEquipmentId(currentLocation.getEquipmentId()); + standQuery2.setIsLock(0); + standQuery2.setStandStatus(0); + standQuery2.setStandType(1); + List availableStands = standService.selStands(standQuery2); + if (availableStands.size() < 1) { + logger.error("当前箱子的出库站台不可用!"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前箱子的出库站台不可用!"); + return JSON.toJSONString(rsp); + } + tempTask.setDestination(availableStands.get(0).getStandId()); + taskService.addTask(tempTask); + logger.info("下发出箱任务成功"); + // 更新料箱状态 + vehicle.setVehicleStatus(VehicleStatus.OUT.getCode()); + vehicleService.modifyVehicle(vehicle); + logger.info("更新料箱状态成功"); + // 该箱子上的库存状态变更 + Stock stockQuery = new Stock(); + stockQuery.setVehicleId(taskOutRequest.getVehicleNo()); + List stocks = stockService.selStocks(stockQuery); + for (Stock tempStock : stocks) { + if (needNum <= 0){ + break; + } + tempStock.setStockStatus(StockStatus.OUT.getCode()); + needNum = needNum - tempStock.getRealNum(); + stockService.modifyStock(tempStock); + } +// for (Stock tempStock : stocks){ +// if (!Objects.equals(tempStock.getStockStatus(), StockStatus.OUT.getCode())){ +// //生成回库任务 +// String vehicleNo = taskOutRequest.getVehicleNo(); // 载具号 +// /* 查找一个空库位 */ +// Location emptyLocation = new Location(); +// emptyLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); +// emptyLocation.setAreaId(1); +// List emptyLocations = locationMapper.selLocations(emptyLocation); +// if(emptyLocations == null) { +// rsp.setCode(ResponseCode.ERROR.getCode()); +// rsp.setMessage("库位查找失败,网络连接异常,请稍后再试"); +// return JSON.toJSONString(rsp); +// } +// if(emptyLocations.isEmpty()){ +// rsp.setCode(ResponseCode.ERROR.getCode()); +// rsp.setMessage("没有可用库位"); +// return JSON.toJSONString(rsp); +// } +// Location emptyLocationItem = locationUtils.checkCanUse(emptyLocations); +// if(emptyLocationItem == null) { +// rsp.setCode(ResponseCode.ERROR.getCode()); +// rsp.setMessage("没有可用库位或者库位存在干涉,请稍后再试"); +// return JSON.toJSONString(rsp); +// } +// // 该空库位可用,生成一个入库任务,并将库存表更新库位 +// // 更新库位表,占掉库位 +// Location updateLocation = new Location(); +// updateLocation.setLocationId(emptyLocationItem.getLocationId()); +// updateLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); +// updateLocation.setVehicleId(taskOutRequest.getVehicleNo()); +// locationMapper.modifyLocation(updateLocation); // 占掉库位 +// // ---- 更新库存中库位 +// stockMapper.updateLocationIdWithBetchNo(taskOutRequest.getVehicleNo(), emptyLocationItem.getLocationId()); // 绑定载具和库位 +// // 更新入库单 +// appOrderInMapper.updateStatusWithVehicleNo(vehicleNo, OrderInStatusEnum.IN.getCode()); // 更新入库单为入库中 +// // 添加入库任务 +// Task task = new Task(); +// task.setTaskId(UUID.randomUUID().toString()); +// task.setTaskType(TaskType.IN.getCode()); +// task.setTaskStatus(WmsTaskStatus.NEW.getCode()); +// task.setTaskGroup(UUID.randomUUID().toString()); +// task.setOrigin(tempTask.getDestination()); +// task.setDestination(emptyLocationItem.getLocationId()); +// task.setPickStand(""); +// task.setWeight(0.0); +// task.setVehicleNo(taskOutRequest.getVehicleNo()); +// task.setCreateTime(new Date()); +// task.setUserName("wcs"); +// task.setGoodsId(vehicleNo); +// task.setGoodsName(""); +// task.setOperateNum(0); +// task.setTotalNum(0); +// task.setTaskPriority(1); +// int addTask = taskMapper.addTask(task); +// if(addTask > 0) { +// rsp.setCode(ResponseCode.ERROR.getCode()); +// rsp.setMessage("存在入库任务,申请成功!"); +// return JSON.toJSONString(rsp); +// } +// rsp.setCode(ResponseCode.ERROR.getCode()); +// rsp.setMessage("添加入库任务失败,网络连接异常,请稍后再试"); +// return JSON.toJSONString(rsp); +// } +// } + logger.info("更新库存状态成功"); + logger.info("下发出库任务成功"); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("箱号" + taskOutRequest.getVehicleNo() + "生成出库任务成功"); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("创建出库任务发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + /** + * 盘点出库 + * + * @param request 请求 + * @return 结果 + */ + @PostMapping("/sendInventoryTask") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String sendInventoryTask(@RequestBody InventoryTask request) { + // TODO 盘点优化 + logger.info("接收到盘库请求:{},ip地址:{}", JSON.toJSONString(request), HttpUtils.getIpAddr(servletRequest)); + ResponseEntity rsp = new ResponseEntity(); + try { + // 根据ip获得站台信息 + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() < 1) {// 请求的地址不是站台电脑 + logger.error("请用站台电脑下发盘库任务"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请用站台电脑下发盘库任务"); + return JSON.toJSONString(rsp); + } + // 判断零件号是否输入 + if (StringUtils.isEmpty(request.getGoodsId())) { + logger.error("未选择盘点零件"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请选择盘点零件"); + return JSON.toJSONString(rsp); + } + // 判断当前零件是否有其他任务 + Task taskQuery2 = new Task(); + taskQuery2.setGoodsId(request.getGoodsId()); + taskQuery2.setVehicleNo(request.getVehicleId()); + List sameGoodsTasks = taskService.selTasks(taskQuery2); + if (sameGoodsTasks.size() > 0) { + logger.error("当前零件存在其他任务"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前零件存在其他任务,请勿执行盘点"); + return JSON.toJSONString(rsp); + } + // 判断库存中是否有此物料 + Stock stockQuery1 = new Stock(); + stockQuery1.setGoodsId(request.getGoodsId()); + stockQuery1.setVehicleId(request.getVehicleId()); + stockQuery1.setStockStatus(StockStatus.OK.getCode()); + List detailStocks = stockService.selStocks(stockQuery1); + List summaryStocks = stockService.selStocksByGoodsId(stockQuery1); + if (detailStocks.size() == 0) {// 当前零件无库存 + logger.error("当前零件无库存"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前零件无库存"); + return JSON.toJSONString(rsp); + } + if (summaryStocks.size() == 0) { + logger.error("当前零件无库存"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("当前零件无库存"); + return JSON.toJSONString(rsp); + } + for (Stock tempDetailStock : detailStocks) { + // 根据库存生成任务 + // 生成出库任务 + Task task = new Task(); + // 任务编号 + task.setTaskId(WmsUtils.generateId("PDCK")); + //task.setTaskId(UUID); + // 任务类型 + task.setTaskType(TaskType.INVENTORY.getCode()); + // 起点 + task.setOrigin(tempDetailStock.getLocationId()); + // 查找对应库位对应的站台 + Location locationQuery = new Location(); + locationQuery.setLocationId(tempDetailStock.getLocationId()); + Location currentLocation = locationService.selLocations(locationQuery).get(0); + Stand standQuery = new Stand(); + standQuery.setEquipmentId(currentLocation.getEquipmentId()); + standQuery.setAllowIn(0); + standQuery.setAllowOut(1); + standQuery.setStandType(1); + Stand targetStand = standService.selStands(standQuery).get(0); + task.setDestination(targetStand.getStandId()); + task.setPickStand(stands.get(0).getStandId()); + // 重量 + // 查找零件数据,然后计算重量 + PartInfo partInfo = partInfoService.selPartByPartNo(tempDetailStock.getGoodsId()); + task.setWeight(partInfo.getPartWeight() * tempDetailStock.getRealNum());// 重量 + // 载具编号 + task.setVehicleNo(tempDetailStock.getVehicleId()); + // 尺寸 + task.setVehicleSize(1); + task.setCreateTime(new Date()); + // 用户名 + task.setUserName(request.getUserName()); + task.setGoodsId(tempDetailStock.getGoodsId()); + task.setGoodsName(tempDetailStock.getGoodsName()); + task.setProductionDate(tempDetailStock.getProductionDate()); + task.setExpirationDate(tempDetailStock.getExpirationDate()); + task.setOperateNum(0); + task.setTotalNum(tempDetailStock.getRealNum()); + task.setTaskPriority(2); + + tempDetailStock.setIsInventory(1); + tempDetailStock.setInventoryTaskId(task.getTaskId()); + task.setTaskStatus(WmsTaskStatus.NEW.getCode());// 新建出库任务 + task.setTaskGroup(WmsUtils.generateUUIDString());// group + taskService.addTask(task); + // 将库存设定为盘点出库状态 + tempDetailStock.setStockStatus(StockStatus.OUT.getCode()); + stockService.modifyStock(tempDetailStock); + // 将这个托盘上的其他库存都设定为盘点出库状态 + List sameVehicleStock = stockService.selStocks(new Stock(tempDetailStock.getVehicleId())); + for (Stock tempStock : sameVehicleStock) { + if (Objects.equals(tempStock.getStockId(), tempDetailStock.getStockId())) { + continue; + } + tempStock.setStockStatus(StockStatus.OUT.getCode()); + stockService.modifyStock(tempStock); + } + // 将当前的载具设置为出库中 + Vehicle currentVehicle = vehicleService.selVehicleById(tempDetailStock.getVehicleId()); + currentVehicle.setVehicleStatus(VehicleStatus.OUT.getCode()); + vehicleService.modifyVehicle(currentVehicle); + } + + logger.info("创建盘点任务成功,零件号:{}", request.getGoodsId()); + // 返回成功 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("创建盘库任务成功"); + rsp.setReturnData(summaryStocks.size() > 0 ? summaryStocks.get(0) : new Stock()); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("创建盘库任务发生异常:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + +// public String receiveTaskResult1(@RequestBody WmsReceiveTaskResultEntity wmsReceiveTaskResultEntity) { +// // 创建响应信息 +// ResponseEntity rsp = new ResponseEntity(); +// // 获取任务号 +// String taskId = wmsReceiveTaskResultEntity.getTaskId(); +// Integer result = wmsReceiveTaskResultEntity.getTaskStatus(); +// String vehicleNo = wmsReceiveTaskResultEntity.getVehicleNo(); +// // 查找对应任务 +// Task taskForQuery = new Task(); +// taskForQuery.setTaskGroup(taskId); +// List tasks = taskService.selTasks(taskForQuery); +// if (tasks.isEmpty()) { +// logger.error("任务已被删除"); +// // 返回失败 +// rsp.setCode(ResponseCode.ERROR.getCode()); +// rsp.setMessage("任务已被删除"); +// return JSON.toJSONString(rsp); +// } +// // 设定任务类型 +// Integer taskType = tasks.get(0).getTaskType(); +// if (result.compareTo(WcsTaskStatus.FINISH.getCode()) == 0) { //任务完成 +// if (!Objects.equals(taskType, TaskType.IN.getCode())){ //入库 +// //添加库存, +// } +// } +// +// } + + /** + * 接收WCS发送的任务结果 + * + * @param wmsReceiveTaskResultEntity 请求 + * @return 响应结果 + */ + @PostMapping("/sendTaskResult") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String receiveTaskResult(@RequestBody WmsReceiveTaskResultEntity wmsReceiveTaskResultEntity) { + logger.info("接收到任务反馈:{},ip地址:{}", wmsReceiveTaskResultEntity.toLoggerString(), HttpUtils.getIpAddr(servletRequest)); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 获取任务号 + String taskId = wmsReceiveTaskResultEntity.getTaskId(); + Integer result = wmsReceiveTaskResultEntity.getTaskStatus(); + String vehicleNo = wmsReceiveTaskResultEntity.getVehicleNo(); + // 查找对应任务 + Task taskForQuery = new Task(); + taskForQuery.setTaskGroup(taskId); + List tasks = taskService.selTasks(taskForQuery); + if (tasks.size() < 1) { + logger.error("任务号不正确"); + // 返回失败 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("任务号不正确"); + return JSON.toJSONString(rsp); + } + // 设定任务类型 + Integer taskType = tasks.get(0).getTaskType(); + if (result.compareTo(WcsTaskStatus.FINISH.getCode()) == 0) {// 任务完成 + // 回原库位 + if (taskType.compareTo(TaskType.IN.getCode()) == 0) {// 入库任务 + logger.info("入库任务完成,开始处理"); + // 更新载具信息 + Vehicle currentVehicle = vehicleService.selVehicleById(vehicleNo); + currentVehicle.setVehicleStatus(2);// 在库中 + currentVehicle.setCurrentLocation(wmsReceiveTaskResultEntity.getDestination()); + vehicleService.modifyVehicle(currentVehicle); + // 添加库存 + for (Task task : tasks) { + if (!Objects.equals(task.getTaskType(), TaskType.IN.getCode())) { + continue; + } + if (task.getTaskId().startsWith("HK")) {// 回库的库存 + // 查询是不是回库的库存 + Stock stockQuery1 = new Stock(); + stockQuery1.setVehicleId(vehicleNo); + stockQuery1.setGoodsId(task.getGoodsId()); + List backStocks = stockService.selStocks(stockQuery1); + for (Stock tempBackStock : backStocks) { + tempBackStock.setLocationId(task.getDestination()); + tempBackStock.setStockStatus(StockStatus.OK.getCode()); + tempBackStock.setLastUpdateTime(new Date()); + stockService.modifyStock(tempBackStock); + logger.info("更新回库库存"); + } + } else if (task.getTaskId().startsWith("RK")) {// 新增库存 + if (!task.getGoodsId().equals(WmsConstants.EMPTY_STOCK_GOODS_ID)) {// 空箱入库的情况下不生成库存 + Stock exsitStockQuery = new Stock(); + exsitStockQuery.setVehicleId(vehicleNo); + exsitStockQuery.setGoodsId(task.getGoodsId()); + List exsitStocks = stockService.selStocks(exsitStockQuery); + if (exsitStocks.size() > 0) {// 说明该箱子上已有该零件 + // 直接添加数量 + Stock exsitStock = exsitStocks.get(0); + exsitStock.setRemainNum(exsitStock.getRemainNum() + task.getOperateNum()); + exsitStock.setRealNum(exsitStock.getRealNum() + task.getOperateNum()); + exsitStock.setStockStatus(StockStatus.OK.getCode()); + exsitStock.setLocationId(task.getDestination()); + stockService.modifyStock(exsitStock); + logger.info("已有库存增加数量成功:{}", JSON.toJSONString(exsitStock)); + } else { + Stock stockTemp = new Stock(); + stockTemp.setStockId(WmsUtils.generateId("ST")); + stockTemp.setLocationId(task.getDestination()); + stockTemp.setVehicleId(vehicleNo); + stockTemp.setGoodsId(task.getGoodsId()); + // 查询物料信息后设定 + PartInfo partInfo = partInfoService.selPartByPartNo(task.getGoodsId()); + stockTemp.setGoodsName(partInfo.getItemDesc()); + if (Double.parseDouble(partInfo.getSLED()) > 0) { + stockTemp.setProductionDate(task.getProductionDate()); + stockTemp.setShelfLife(Double.parseDouble(partInfo.getSLED())); + stockTemp.setExpirationDate(task.getExpirationDate()); + } + stockTemp.setAvailableNum(task.getOperateNum()); + stockTemp.setRemainNum(task.getOperateNum()); + stockTemp.setRealNum(task.getOperateNum()); + stockTemp.setProviderId(partInfo.getVendorId()); + stockTemp.setProviderName(partInfo.getVendorNameCN()); + stockTemp.setStockStatus(StockStatus.OK.getCode()); + stockTemp.setGoodsStatus(GoodsStatus.OK.getCode()); + stockTemp.setCreateTime(new Date()); + stockTemp.setLastUpdateTime(new Date()); + stockTemp.setIsInventory(0); + stockTemp.setCurrentLocation(task.getDestination()); + logger.info("生成新库存:{}", JSON.toJSONString(stockTemp)); + stockService.addStock(stockTemp); + } + } + } + // 查看当前料箱上还有没有其他料 + logger.info("更新料箱上其他库存"); + Stock stockQuery3 = new Stock(); + stockQuery3.setVehicleId(vehicleNo); + List backStocks3 = stockService.selStocks(stockQuery3); + for (Stock tempBackStock3 : backStocks3) { + if (Objects.equals(tempBackStock3.getGoodsId(), task.getGoodsId())) { + continue; + } + if (tempBackStock3.getRealNum() <= 0) {// 无库存 + stockService.deleteStock(tempBackStock3.getStockId()); + } else { + tempBackStock3.setLocationId(task.getDestination()); + tempBackStock3.setStockStatus(StockStatus.OK.getCode()); + stockService.modifyStock(tempBackStock3); + } + } + } + // 对完成的入库任务进行处理 + for (Task task : tasks) { + // 入库任务完成,先添加任务记录,然后删除任务。 + task.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + task.setFinishTime(new Date()); + taskRecordService.addTask(task); + taskService.deleteTask(task.getTaskId()); + } + } else if (taskType.compareTo(TaskType.OUT.getCode()) == 0) {// 出库任务 + logger.info("出库任务完成,开始处理"); + // 更改载具位置为站台 + Vehicle vehicle = vehicleService.selVehicleById(vehicleNo); + vehicleService.modifyVehicle(vehicle); + // 更新库存当前位置----根据载具号查询到库存,该载具上的所有库存做统一处理。 + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(vehicleNo); + List tempStockList1 = stockService.selStocks(stockQueryParam1); + for (Stock temp : tempStockList1) { + temp.setStockStatus(StockStatus.TRANS.getCode()); + temp.setCurrentLocation(wmsReceiveTaskResultEntity.getDestination()); + temp.setLastUpdateTime(new Date()); + stockService.modifyStock(temp); + } + for (Task task : tasks) { + if (!Objects.equals(task.getTaskType(), TaskType.OUT.getCode())) { + continue; + } + if (task.getGoodsId().equals(WmsConstants.EMPTY_STOCK_GOODS_ID)) { + task.setTaskStatus(WmsTaskStatus.FINISH.getCode());// 出库完成状态 + task.setFinishTime(new Date()); + taskRecordService.addTask(task); + taskService.deleteTask(task.getTaskId()); + } else { + task.setTaskStatus(WmsTaskStatus.OUT_SUCCESS.getCode());// 出库完成状态 + taskService.executeTask(task); + } + } + } else if (taskType.compareTo(TaskType.INVENTORY.getCode()) == 0) {// 盘点任务 + logger.info("盘点任务完成,开始处理"); + // 更改载具位置为站台 + Vehicle vehicle = vehicleService.selVehicleById(vehicleNo); + vehicleService.modifyVehicle(vehicle); + // 更新库存当前位置----根据载具号查询到库存,该载具上的所有库存做统一处理。 + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(vehicleNo); + List tempStockList1 = stockService.selStocks(stockQueryParam1); + for (Stock temp : tempStockList1) { + temp.setStockStatus(StockStatus.TRANS.getCode()); + temp.setCurrentLocation(wmsReceiveTaskResultEntity.getDestination()); + temp.setLastUpdateTime(new Date()); + stockService.modifyStock(temp); + } + for (Task task : tasks) { + if (!Objects.equals(task.getTaskType(), TaskType.INVENTORY.getCode())) { + continue; + } + task.setTaskStatus(WmsTaskStatus.OUT_SUCCESS.getCode());// 出库完成状态 + taskService.executeTask(task); + } + } + } else if (result.compareTo(WcsTaskStatus.RUN.getCode()) == 0) {// 任务开始执行 + logger.info("任务开始执行"); + for (Task task : tasks) { + task.setTaskStatus(WmsTaskStatus.RUN.getCode());// 任务开始执行 + taskService.executeTask(task); + } + } else if (result.compareTo(WcsTaskStatus.EXCEPTION.getCode()) == 0) {// 任务开始执行 + logger.info("任务发生异常"); + for (Task task : tasks) { + task.setTaskStatus(WmsTaskStatus.EXCEPTION.getCode());// 任务开始执行 + taskService.executeTask(task); + } + } else if (result.compareTo(WcsTaskStatus.CANCEL.getCode()) == 0) { + if (taskType.compareTo(TaskType.IN.getCode()) == 0) {// 入库任务取消 + logger.info("入库任务取消,开始处理"); + for (Task tempInTask : tasks) { + if (tempInTask.getTaskId().startsWith("HK")) {// 回库任务,需要删除库存 + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(vehicleNo); + stockQueryParam1.setGoodsId(tempInTask.getGoodsId()); + List tempStockList1 = stockService.selStocks(stockQueryParam1); + for (Stock temp : tempStockList1) { + stockService.deleteStock(temp.getStockId()); + } + } + } + } else if (taskType.compareTo(TaskType.OUT.getCode()) == 0) {// 出库任务取消 + logger.info("出库任务取消,开始处理"); + // 更改载具位置为站台 + logger.info("更新载具为在库中"); + Vehicle vehicle = vehicleService.selVehicleById(vehicleNo); + vehicle.setVehicleStatus(VehicleStatus.ON.getCode()); + vehicleService.modifyVehicle(vehicle); + // 更新库存当前位置----根据载具号查询到库存,该载具上的所有库存做统一处理。 + logger.info("更新库存为正常状态"); + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(vehicleNo); + List tempStockList1 = stockService.selStocks(stockQueryParam1); + for (Stock temp : tempStockList1) { + temp.setStockStatus(StockStatus.OK.getCode()); + stockService.modifyStock(temp); + } + } else if (taskType.compareTo(TaskType.INVENTORY.getCode()) == 0) {// 盘点任务取消 + logger.info("盘点任务取消,开始处理"); + // 更改载具位置为站台 + logger.info("更新载具为在库中"); + Vehicle vehicle = vehicleService.selVehicleById(vehicleNo); + vehicle.setVehicleStatus(VehicleStatus.ON.getCode()); + vehicleService.modifyVehicle(vehicle); + // 更新库存当前位置----根据载具号查询到库存,该载具上的所有库存做统一处理。 + logger.info("更新库存为正常状态"); + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(vehicleNo); + List tempStockList1 = stockService.selStocks(stockQueryParam1); + for (Stock temp : tempStockList1) { + temp.setStockStatus(StockStatus.OK.getCode()); + stockService.modifyStock(temp); + } + } + // 更新任务状态 + logger.info("删除取消的任务,并添加任务记录"); + for (Task task : tasks) { + task.setTaskStatus(WmsTaskStatus.CANCEL.getCode());// 任务开始执行 + task.setFinishTime(new Date()); + taskService.deleteTask(task.getTaskId()); + taskRecordService.addTask(task); + } + } + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常"); + // 返回失败 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("发生异常,请尝试重新发送一次"); + return JSON.toJSONString(rsp); + } + logger.info("获取任务反馈处理成功"); + // 返回失败 + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("任务处理成功"); + return JSON.toJSONString(rsp); + } + + /** + * WCS向WMS上报箱子到达拣货口 + * @param pickTask 拣选任务 + * @return 结果 + */ + @PostMapping("/boxArrive") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String boxArrive(@RequestBody PickTaskResponse pickTask) { + logger.info("接收到WCS向WMS上报箱子到达拣货点:{}", JSON.toJSONString(pickTask)); + ResponseEntity response = new ResponseEntity(); + try { + // 根据载具号加拣选点位找到对应的任务----出库任务/盘点任务 + Task taskQueryParam1 = new Task(); + taskQueryParam1.setVehicleNo(pickTask.getVehicleNo()); + taskQueryParam1.setTaskStatus(WmsTaskStatus.OUT_SUCCESS.getCode()); + List tasks = taskService.selTasks(taskQueryParam1); + if (tasks.size() < 1) { + logger.error("当前反馈的箱号{}不存在可以操作的任务", pickTask.getVehicleNo()); + // 返回失败 + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("当前反馈的箱号没有对应的任务"); + return JSON.toJSONString(response); + } + // 更新当前载具的当前位置为拣选站台 + Vehicle vehicle = vehicleService.selVehicleById(pickTask.getVehicleNo()); + if (vehicle == null) { + logger.error("没查询到对应载具{}", pickTask.getVehicleNo()); + // 返回失败 + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("没查询到对应载具信息"); + return JSON.toJSONString(response); + } + vehicleService.modifyVehicle(vehicle); + // 更新库存位置 + Stock stockQueryParam1 = new Stock(); + stockQueryParam1.setVehicleId(pickTask.getVehicleNo()); + List stocks = stockService.selStocks(stockQueryParam1); + if (stocks.size() < 1) { + logger.error("载具{}没查询到对应库存", pickTask.getVehicleNo()); + // 返回失败 + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("反馈的载具没查询到对应库存"); + return JSON.toJSONString(response); + } + for (Stock tempStock : stocks) { + tempStock.setStockStatus(StockStatus.PICKING.getCode()); + tempStock.setCurrentLocation(pickTask.getPickStand()); + stockService.modifyStock(tempStock); + } + // 更新任务状态 + for (Task tempTaskForPicking : tasks) { + if (Objects.equals(tempTaskForPicking.getTaskType(), TaskType.OUT.getCode())) { + // 更新任务状态 + tempTaskForPicking.setTaskStatus(WmsTaskStatus.PICKING.getCode()); + taskService.executeTask(tempTaskForPicking); + } else if (Objects.equals(tempTaskForPicking.getTaskType(), TaskType.INVENTORY.getCode())) {// 盘点出库 + // 更新任务状态 + tempTaskForPicking.setTaskStatus(WmsTaskStatus.INVENTORY.getCode()); + taskService.executeTask(tempTaskForPicking); + } + } + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常:{}", e.getMessage()); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("发生异常"); + return JSON.toJSONString(response); + } + logger.info("处理成功"); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("成功"); + return JSON.toJSONString(response); + } + + /** + * 当前箱子请求回库 + * + * @param request 请求 + * @return 结果 + */ + @PostMapping("/finishPicking") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String finishPicking(@RequestBody FinishPickTaskRequest request) { + logger.info("确认拣货完成:{}", JSON.toJSONString(request)); + ResponseEntity response = new ResponseEntity(); + try { + if (StringUtils.isEmpty(request.getTaskId())) {// + logger.error("任务号为空"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("任务号为空"); + return JSON.toJSONString(response); + } + // 将当前任务信息更新 + Task taskQuery1 = new Task(); + taskQuery1.setTaskId(request.getTaskId()); + List tasks1 = taskService.selTasks(taskQuery1); + if (tasks1.size() < 1) { + logger.error("数据库中查询不到当前正在执行的任务:{}", request.getTaskId()); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("数据库中查询不到当前正在执行的任务"); + return JSON.toJSONString(response); + } + Task currentTask = tasks1.get(0); + currentTask.setTaskStatus(WmsTaskStatus.FINISH.getCode()); + if (request.getPickNum() != null) { + currentTask.setOperateNum(request.getPickNum()); + } + if (Objects.equals(currentTask.getTaskType(), TaskType.INVENTORY.getCode())) {// 盘点任务 + currentTask.setOperateNum(currentTask.getTotalNum() - request.getRealNum()); + } + currentTask.setFinishTime(new Date()); + taskRecordService.addTask(currentTask); + taskService.deleteTask(currentTask.getTaskId()); + // 根据这个任务的数据来更新库存 + Stock stockQuery1 = new Stock(); + stockQuery1.setVehicleId(currentTask.getVehicleNo()); + stockQuery1.setGoodsId(currentTask.getGoodsId()); + List stocks = stockService.selStocks(stockQuery1); + if (stocks.size() < 1) { + logger.error("查询不到对应库存"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("查询不到对应库存"); + return JSON.toJSONString(response); + } + Stock currentStock = stocks.get(0); + if (request.getRealNum() != null) { + currentStock.setRealNum(request.getRealNum()); + if (Objects.equals(currentTask.getTaskType(), TaskType.INVENTORY.getCode())) { + currentStock.setRemainNum(currentStock.getRealNum()); + currentStock.setAvailableNum(currentStock.getRealNum()); + } + } else { + currentStock.setRealNum(currentStock.getRealNum() - currentTask.getOperateNum()); + } + + // 判断当前任务的载具号是否还有其他任务 + Task taskQuery2 = new Task(); + taskQuery2.setVehicleNo(request.getVehicleNo()); + taskQuery2.setTaskType(TaskType.OUT.getCode()); + List sameVehicleTasks = taskService.selTasks(taskQuery2); + if (sameVehicleTasks.size() > 0) {// 存在其他任务 + logger.info("当前载具还有其他任务"); + // 库存只更新 + stockService.modifyStock(currentStock); + } else { + // 标记当前箱子入库中 + // 标记当前载具为空箱 + Vehicle currentVehicle = vehicleService.selVehicleById(currentTask.getVehicleNo()); + currentVehicle.setVehicleStatus(VehicleStatus.IN.getCode()); + vehicleService.modifyVehicle(currentVehicle); + //查找到对应的入库站台 + Stand standQuery2 = new Stand(); + standQuery2.setAllowIn(1); + standQuery2.setAllowOut(0); + standQuery2.setStandType(1); + // 判断库存是否为0 + if (currentStock.getRealNum() <= 0) {// 库存为0 + logger.info("拣货后库存为0,空箱回库"); + // 删除当前库存 + stockService.deleteStock(currentStock.getStockId()); + // 根据这个任务的数据来更新库存 + Stock stockQuery2 = new Stock(); + stockQuery2.setVehicleId(currentTask.getVehicleNo()); + List stocks2 = stockService.selStocks(stockQuery2); + // 判断当前载具上是否还有其他库存 + if (stocks2.size() == 0) {// 当前载具是空托 + // 标记当前载具为空箱 + currentVehicle.setIsEmpty(1); + vehicleService.modifyVehicle(currentVehicle); + } else {// 更新载具上其他库存为回库状态 + for (Stock tempSameVehicleStock : stocks2) { + tempSameVehicleStock.setStockStatus(StockStatus.BACKING.getCode()); + stockService.modifyStock(tempSameVehicleStock); + } + } + // 生成空托回库任务---回到原来位置 + Task emptyBackTask = new Task(); + emptyBackTask.setTaskId(WmsUtils.generateId("HK")); + emptyBackTask.setTaskType(TaskType.IN.getCode()); + emptyBackTask.setTaskStatus(WmsTaskStatus.NEW.getCode()); + emptyBackTask.setTaskGroup(WmsUtils.generateUUIDString()); + emptyBackTask.setDestination(currentStock.getLocationId()); + // 根据库位查找站台 + Location currentLocation = locationService.selLocations(new Location(currentStock.getLocationId())).get(0); + standQuery2.setEquipmentId(currentLocation.getEquipmentId()); + List availableStands = standService.selStands(standQuery2); + emptyBackTask.setOrigin(availableStands.get(0).getStandId()); + emptyBackTask.setWeight((double) 0); + emptyBackTask.setVehicleNo(currentTask.getVehicleNo()); + emptyBackTask.setVehicleSize(0); + emptyBackTask.setCreateTime(new Date()); + emptyBackTask.setUserName(currentTask.getUserName()); + emptyBackTask.setGoodsId(WmsConstants.EMPTY_STOCK_GOODS_ID); + emptyBackTask.setTaskPriority(1); + taskService.addTask(emptyBackTask); + } else { + logger.info("拣货后库存不为0,回库"); + // 更新库存 + currentStock.setRemainNum(currentStock.getRealNum()); + stockService.modifyStock(currentStock); + // 设置当前载具的其他库存也为回库中 + Stock stockQuery2 = new Stock(); + stockQuery2.setVehicleId(currentTask.getVehicleNo()); + List stocks2 = stockService.selStocks(stockQuery2); + for (Stock sameVehicleStock : stocks2) { + sameVehicleStock.setStockStatus(StockStatus.BACKING.getCode()); + stockService.modifyStock(sameVehicleStock); + } + // 生成入库任务 + Task backTask = new Task(); + backTask.setTaskId(WmsUtils.generateId("HK")); + backTask.setTaskType(TaskType.IN.getCode()); + backTask.setTaskStatus(WmsTaskStatus.NEW.getCode()); + backTask.setTaskGroup(WmsUtils.generateUUIDString()); + backTask.setDestination(currentStock.getLocationId()); + // 根据库位查找站台 + Location currentLocation = locationService.selLocations(new Location(currentStock.getLocationId())).get(0); + standQuery2.setEquipmentId(currentLocation.getEquipmentId()); + List availableStands = standService.selStands(standQuery2); + backTask.setOrigin(availableStands.get(0).getStandId()); + backTask.setWeight((double) 0); + backTask.setVehicleNo(currentTask.getVehicleNo()); + backTask.setVehicleSize(0); + backTask.setCreateTime(new Date()); + backTask.setUserName(currentTask.getUserName()); + backTask.setGoodsId(currentStock.getGoodsId()); + backTask.setGoodsName(currentStock.getGoodsName()); + backTask.setProductionDate(currentStock.getProductionDate()); + backTask.setExpirationDate(currentStock.getExpirationDate()); + backTask.setOperateNum(currentStock.getRealNum()); + backTask.setTotalNum(currentStock.getRealNum()); + backTask.setTaskPriority(1); + taskService.addTask(backTask); + } + } + + logger.info("物料回库成功"); + response.setCode(0); + response.setMessage("成功"); + return JSON.toJSONString(response); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常:{}", e.getMessage()); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("发生异常"); + return JSON.toJSONString(response); + } + } + + /** + * 查找所有任务 + */ + @PostMapping("/getTasks") + @ResponseBody + public String getTasks(@RequestBody TableRequest tableRequest) { + TableResponse tblResp = new TableResponse(); + // 解析请求数据 + if (tableRequest == null || tableRequest.getPage() == null) { + tblResp.setCode(ResponseCode.ERROR.getCode()); + tblResp.setMessage("请求数据为空,无法处理!"); + logger.error("请求数据为空,无法处理!"); + return JSON.toJSONString(tblResp); + } + // 处理分页信息 + PageDomain pageRequest = tableRequest.getPage(); + String[] orderByArr = {"task_id", "task_type", "task_status", "goods_id", "goods_name", "task_priority", "expiration_date", "create_time"}; + String orderByStr; + + if (StringUtils.isNotEmpty(pageRequest.getOrderByColumn()) && Arrays.asList(orderByArr).contains(StringUtils.toUnderScoreCase(pageRequest.getOrderByColumn()))) { + orderByStr = pageRequest.getOrderBy(); + } else { + // 默认排序 + orderByStr = ""; + } + + Task taskQuery = new Task(); + taskQuery.setTaskType(tableRequest.getParam().getTaskType()); + taskQuery.setGoodsId(tableRequest.getParam().getGoodsId()); + taskQuery.setVehicleNo(tableRequest.getParam().getVehicleNo()); + // 查找对应站台 + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() > 0 && (Objects.equals(taskQuery.getTaskType(), TaskType.OUT.getCode()) || Objects.equals(taskQuery.getTaskType(), TaskType.INVENTORY.getCode()))) { + taskQuery.setPickStand(stands.get(0).getStandId()); + } + PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize(), orderByStr); + List tasks = taskService.selTasks(taskQuery); + PageInfo taskPageInfo = new PageInfo<>(tasks); + tblResp.setCode(ResponseCode.OK.getCode()); + tblResp.setMessage("查询任务成功!"); + tblResp.setRows(taskPageInfo.getList()); + tblResp.setTotal(taskPageInfo.getTotal()); + return JSON.toJSONString(tblResp); + } + + /** + * 根据参数查询wms任务 + */ + @PostMapping("/getTaskByTask") + @ResponseBody + public String getTaskByTask(@RequestBody Task request) { + ResponseEntity response = new ResponseEntity(); + if (request == null) { + logger.error("请求参数为空"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("请求参数为空"); + return JSON.toJSONString(response); + } + List stands = standService.selStands(new Stand(2, HttpUtils.getIpAddr(servletRequest), 0)); + if (stands.size() > 0) { + request.setPickStand(stands.get(0).getStandId()); + } else { + request.setPickStand("other"); + } + List tasks = taskService.selTasks(request); + + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("成功"); + response.setReturnData(tasks.size() > 0 ? tasks.get(0) : null); + return JSON.toJSONString(response); + } +} \ No newline at end of file diff --git a/src/main/java/com/wms/controller/TaskDealController.java b/src/main/java/com/wms/controller/TaskDealController.java new file mode 100644 index 0000000..e90f422 --- /dev/null +++ b/src/main/java/com/wms/controller/TaskDealController.java @@ -0,0 +1,339 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.*; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.table.Location; +import com.wms.entity.app.wcs.WmsReceiveTaskResultEntity; +import com.wms.entity.table.Stock; +import com.wms.entity.table.Task; +import com.wms.service.LocationService; +import com.wms.service.StockService; +import com.wms.service.TaskService; +import com.wms.utils.HttpUtils; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Objects; + +/** + * 这个类处理任务反馈信息 + */ +@Controller +@CrossOrigin +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +@RequestMapping(value = "/wms/taskDeal") +public class TaskDealController extends BaseController{ + private final TaskService taskService; + private final HttpServletRequest servletRequest; + private final TaskController taskController; + private final StockService stockService; + private final LocationService locationService; + + +// /** +// * 更改任务状态 +// */ +// @PostMapping("/changeTaskStatus") +// @ResponseBody +// @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) +// public String changeTaskStatus(@RequestBody Task request) { +// logger.info("用户请求更改任务状态,用户名:{},ip地址:{}", request.getUserName(), HttpUtils.getIpAddr(servletRequest)); +// ResponseEntity rsp = new ResponseEntity(); +// try { +// if (request.getTaskStatus() == null) { +// logger.error("任务状态为空"); +// rsp.setCode(ResponseCode.ERROR.getCode()); +// rsp.setMessage("请选择任务状态"); +// return JSON.toJSONString(rsp); +// } +// // 更改后的任务状态 +// int taskStatusRequest = request.getTaskStatus(); +// // 查询任务 +// Task taskQuery = new Task(); +// taskQuery.setTaskId(request.getTaskId()); +// List tasks = taskService.selTasks(taskQuery); +// if (tasks.isEmpty()) { +// logger.error("当前任务不存在"); +// rsp.setCode(ResponseCode.ERROR.getCode()); +// rsp.setMessage("当前任务不存在"); +// return JSON.toJSONString(rsp); +// } +// Task currentTask = tasks.get(0); +// if (taskStatusRequest == 1) {// 取消任务 +// logger.info("任务取消"); +// WmsReceiveTaskResultEntity sendToWmsRequest = new WmsReceiveTaskResultEntity(); +// sendToWmsRequest.setTaskId(taskGroupId); +// sendToWmsRequest.setTaskStatus(WcsTaskStatus.CANCEL.getCode()); +// sendToWmsRequest.setVehicleNo(currentTask.getVehicleNo()); +// sendToWmsRequest.setDestination(currentTask.getDestination()); +// taskController.receiveTaskResult(sendToWmsRequest); +// wcsTaskStatusAfter = 999; +// } +// +// }catch (Exception e) { +// // 回滚事务 +// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); +// logger.error("发生异常{}", e.getMessage()); +// rsp.setCode(ResponseCode.ERROR.getCode()); +// rsp.setMessage("发生异常" + e.getMessage()); +// return JSON.toJSONString(rsp); +// } +// } + + /** + * 更改任务状态 + * + * @param request 请求参数 + * @return 结果 + */ + @PostMapping("/changeTaskStatus") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String changeTaskStatus(@RequestBody Task request) { + //logger.info("用户请求更改任务状态,用户名:{},ip地址:{}", request.getUserName(), HttpUtils.getIpAddr(servletRequest)); + logger.info("请求详细:{}", JSON.toJSONString(request)); + ResponseEntity response = new ResponseEntity(); + try { + if (request.getTaskStatus() == null) { + logger.error("请选择任务状态"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("请选择任务状态"); + return JSON.toJSONString(response); + } + // 更改后的任务状态 + int taskStatusRequest = request.getTaskStatus(); + int wcsTaskStatusAfter = 0; + // 查询任务 + Task taskQuery = new Task(); + taskQuery.setTaskId(request.getTaskId()); + List tasks = taskService.selTasks(taskQuery); + if (tasks.size() == 0) { + logger.error("当前任务不存在"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("当前任务不存在"); + return JSON.toJSONString(response); + } + Task currentTask = tasks.get(0); + String newDestination = ""; + if (Objects.equals(currentTask.getTaskType(), TaskType.IN.getCode()) && StringUtils.isNotEmpty(request.getDestination()) && !Objects.equals(request.getDestination(), currentTask.getDestination())) {// 入库任务库位变更 + if (taskStatusRequest != 0) { + logger.error("更改库位必须重置任务"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("更改库位必须重置任务"); + return JSON.toJSONString(response); + } + newDestination = request.getDestination(); + } + if (currentTask.getTaskId().startsWith("HK") && taskStatusRequest == 1) { + logger.error("回库任务不允许取消"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("回库任务不允许取消"); + return JSON.toJSONString(response); + } + String taskGroupId = currentTask.getTaskGroup(); + if (taskStatusRequest == 0) {// 重置任务 + logger.info("任务重置"); + // 将当前taskGroup的所有任务都设置为新建状态 + Task taskQuery2 = new Task(); + taskQuery2.setTaskGroup(taskGroupId); + List tasks2 = taskService.selTasks(taskQuery2); + for (Task task2 : tasks2) { + if (StringUtils.isNotEmpty(newDestination)) { + task2.setDestination(newDestination); + } + task2.setTaskStatus(WmsTaskStatus.NEW.getCode()); + task2.setUserName(request.getUserName()); + taskService.executeTask(task2); + } + // 如果更新了任务,那么该库位信息也要变更 + if (Objects.equals(currentTask.getTaskType(), TaskType.IN.getCode()) && StringUtils.isNotEmpty(newDestination)) { + Location newLocationQuery = new Location(newDestination); + List newLocations = locationService.selLocations(newLocationQuery); + for (Location newLocation : newLocations) { + newLocation.setVehicleId(currentTask.getVehicleNo()); + newLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + locationService.modifyLocation(newLocation); + break; + } + } + // WCS取消任务 + } else if (taskStatusRequest == 1) {// 取消任务 + logger.info("任务取消"); + WmsReceiveTaskResultEntity sendToWmsRequest = new WmsReceiveTaskResultEntity(); + sendToWmsRequest.setTaskId(taskGroupId); + sendToWmsRequest.setTaskStatus(WcsTaskStatus.CANCEL.getCode()); + sendToWmsRequest.setVehicleNo(currentTask.getVehicleNo()); + sendToWmsRequest.setDestination(currentTask.getDestination()); + taskController.receiveTaskResult(sendToWmsRequest); + wcsTaskStatusAfter = 999; + } else if (taskStatusRequest == 2) {// 完成任务 + logger.info("任务完成"); + WmsReceiveTaskResultEntity sendToWmsRequest = new WmsReceiveTaskResultEntity(); + sendToWmsRequest.setTaskId(taskGroupId); + sendToWmsRequest.setTaskStatus(WcsTaskStatus.FINISH.getCode()); + sendToWmsRequest.setVehicleNo(currentTask.getVehicleNo()); + sendToWmsRequest.setDestination(currentTask.getDestination()); + taskController.receiveTaskResult(sendToWmsRequest); + wcsTaskStatusAfter = 3; + } + // 向WCS反馈 + WmsReceiveTaskResultEntity sendToWcsRequest = new WmsReceiveTaskResultEntity(); + sendToWcsRequest.setTaskId(taskGroupId); + sendToWcsRequest.setTaskStatus(wcsTaskStatusAfter); + if (StringUtils.isNotEmpty(newDestination)) { + sendToWcsRequest.setDestination(newDestination); + } + ResponseEntity response1; + for (int i = 0; i < 5; i++) { + response1 = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(UrlEnums.URL_WMS_TO_WCS_CHANGE_TASK.getValue(), JSON.toJSONString(sendToWcsRequest)), ResponseEntity.class); + logger.info("向WCS反馈任务状态变更"); + if (Objects.equals(response1.getCode(), 0)) {// 发送成功,则不再发送;不成功,一共尝试发送5次 + break; + } + } + logger.info("更新任务状态成功"); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("更新任务状态成功"); + return JSON.toJSONString(response); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常{}", e.getMessage()); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("发生异常" + e.getMessage()); + return JSON.toJSONString(response); + } + } + +// /** +// * 更改任务状态 +// * +// * @param request 请求参数 +// * @return 结果 +// */ +// @PostMapping("/changeTaskStatus") +// @ResponseBody +// @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) +// public String changeTaskStatus(@RequestBody Task request) { +// logger.info("用户请求更改任务状态,用户名:{},ip地址:{}", request.getUserName(), HttpUtils.getIpAddr(servletRequest)); +// logger.info("请求详细:{}", JSON.toJSONString(request)); +// ResponseEntity response = new ResponseEntity(); +// try { +// if (request.getTaskStatus() == null) { +// logger.error("请选择任务状态"); +// response.setCode(ResponseCode.ERROR.getCode()); +// response.setMessage("请选择任务状态"); +// return JSON.toJSONString(response); +// } +// // 更改后的任务状态 +// int taskStatusRequest = request.getTaskStatus(); +// int wcsTaskStatusAfter = 0; +// // 查询任务 +// Task taskQuery = new Task(); +// taskQuery.setTaskId(request.getTaskId()); +// List tasks = taskService.selTasks(taskQuery); +// if (tasks.isEmpty()) { +// logger.error("当前任务不存在"); +// response.setCode(ResponseCode.ERROR.getCode()); +// response.setMessage("当前任务不存在"); +// return JSON.toJSONString(response); +// } +// Task currentTask = tasks.get(0); +// String taskGroupId = currentTask.getTaskGroup(); +// if (taskStatusRequest == 1) {// 取消任务 +// logger.info("任务取消"); +// WmsReceiveTaskResultEntity sendToWmsRequest = new WmsReceiveTaskResultEntity(); +// sendToWmsRequest.setTaskId(taskGroupId); +// sendToWmsRequest.setTaskStatus(WcsTaskStatus.CANCEL.getCode()); +// sendToWmsRequest.setVehicleNo(currentTask.getVehicleNo()); +// sendToWmsRequest.setDestination(currentTask.getDestination()); +// logger.info(taskController.receiveTaskResult(sendToWmsRequest)); +// wcsTaskStatusAfter = 999; +// } else if (taskStatusRequest == 2) {// 完成任务 +// logger.info("任务完成"); +// WmsReceiveTaskResultEntity sendToWmsRequest = new WmsReceiveTaskResultEntity(); +// sendToWmsRequest.setTaskId(taskGroupId); +// sendToWmsRequest.setTaskStatus(WcsTaskStatus.FINISH.getCode()); +// sendToWmsRequest.setVehicleNo(currentTask.getVehicleNo()); +// sendToWmsRequest.setDestination(currentTask.getDestination()); +// taskController.receiveTaskResult(sendToWmsRequest); +// wcsTaskStatusAfter = 3; +// } +// // 向WCS反馈 +// WmsReceiveTaskResultEntity sendToWcsRequest = new WmsReceiveTaskResultEntity(); +// sendToWcsRequest.setTaskId(taskGroupId); +// sendToWcsRequest.setTaskStatus(wcsTaskStatusAfter); +// ResponseEntity response1; +// for (int i = 0; i < 5; i++) { +// response1 = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(UrlEnums.URL_WMS_TO_WCS_CHANGE_TASK.getValue(), JSON.toJSONString(sendToWcsRequest)), ResponseEntity.class); +// logger.info("向WCS反馈任务状态变更"); +// if (Objects.equals(response1.getCode(), 0)) {// 发送成功,则不再发送;不成功,一共尝试发送5次 +// break; +// } +// } +// logger.info("更新任务状态成功"); +// response.setCode(ResponseCode.OK.getCode()); +// response.setMessage("更新任务状态成功"); +// return JSON.toJSONString(response); +// } catch (Exception e) { +// // 回滚事务 +// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); +// logger.error("发生异常{}", e.getMessage()); +// response.setCode(ResponseCode.ERROR.getCode()); +// response.setMessage("发生异常" + e.getMessage()); +// return JSON.toJSONString(response); +// } +// } + + /** + * 删除kate清单数据 + * + * @param request 请求参数 + * @return 结果 + */ + @PostMapping("/deleteAllKateTasks") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String deleteAllKateTasks(@RequestBody Task request) { + logger.info("用户请求删除配料任务清单,包括配件、合件、紧急件,用户名:{},ip地址:{}", request.getUserName(), HttpUtils.getIpAddr(servletRequest)); + ResponseEntity response = new ResponseEntity(); + try { + // 有任务正在执行时不允许删除清单 + Task taskQuery = new Task(); + taskQuery.setTaskType(TaskType.OUT.getCode()); + List tasks = taskService.selTasks(taskQuery); + if (tasks.size() > 0) { + for (Task task : tasks) { + if (StringUtils.isNotEmpty(task.getKateTaskId())) {// 卡特任务未做完 + logger.error("卡特任务未做完,不允许删除"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("卡特任务未做完,不允许删除"); + return JSON.toJSONString(response); + } + } + } + stockService.resetStock(new Stock()); + logger.info("删除任务清单成功"); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("删除任务清单成功"); + return JSON.toJSONString(response); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("发生异常{}", e.getMessage()); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("发生异常" + e.getMessage()); + return JSON.toJSONString(response); + } + } +} diff --git a/src/main/java/com/wms/controller/TestController.java b/src/main/java/com/wms/controller/TestController.java new file mode 100644 index 0000000..2dc8071 --- /dev/null +++ b/src/main/java/com/wms/controller/TestController.java @@ -0,0 +1,255 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.LocationStatus; +import com.wms.constants.enums.ResponseCode; +import com.wms.constants.enums.VehicleStatus; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.table.Location; +import com.wms.entity.table.User; +import com.wms.entity.table.Vehicle; +import com.wms.entity.test.ExcelTest; +import com.wms.mapper.VehicleMapper; +import com.wms.service.LocationService; +import com.wms.service.VehicleService; +import com.wms.utils.MyPassword; +import com.wms.utils.excel.ExcelUtils; +import jakarta.servlet.http.HttpServletResponse; +import lombok.RequiredArgsConstructor; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.util.ArrayList; +import java.util.List; + +/** + * 测试控制类 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/test") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class TestController extends BaseController { + /** + * 库位服务 + */ + private final LocationService locationService; + private final VehicleService vehicleService; + private final VehicleMapper vehicleMapper; + + + @PostMapping("/test") + @ResponseBody + public String test() { + vehicleMapper.updateLocation("1", "A-03-04-A-02"); + return "success"; + } + + @PostMapping("/genLocations") + @ResponseBody + public String genLocations() { + // 巷道1 一共2排45列12层 + for (int i = 3; i < 4; i++) {// 排 + for (int j = 4; j <= 22; j=j+2) {// 列 + for (int k = 1; k <= 4; k++) { + Location tempLocation = new Location(); + tempLocation.setLocationId("A-" + StringUtils.leftPad(String.valueOf(i), 2, "0") + "-" + StringUtils.leftPad(String.valueOf(j), 2, "0") + "-A-" + StringUtils.leftPad(String.valueOf(k), 2, "0")); + tempLocation.setAreaId(1); + tempLocation.setTunnelId(1); + tempLocation.setEquipmentId(1); + tempLocation.setLocationType(0); + tempLocation.setQueue(6); + if ((k == 1 || k == 3)){ + tempLocation.setLine(j-2); + }else { + tempLocation.setLine(j-1); + } + tempLocation.setLayer(1); + if (k == 1 || k == 2){ + tempLocation.setDepth(2); + }else { + tempLocation.setDepth(1); + } + tempLocation.setIsLock(0); + tempLocation.setLocationStatus(0); + tempLocation.setWareArea("B"); + if (locationService.selLocations(tempLocation).isEmpty()) { + locationService.addLocation(tempLocation); + } + } + } + } +// // 巷道2 +// for (int i = 3; i <= 4; i++) {// 排 +// for (int j = 3; j <= 34; j++) {// 列 +// Location tempLocation = new Location(); +// tempLocation.setLocationId(StringUtils.leftPad(String.valueOf(i), 2, "0") + StringUtils.leftPad(String.valueOf(j), 2, "0") + StringUtils.leftPad(String.valueOf(13), 2, "0")); +// tempLocation.setAreaId(1); +// tempLocation.setTunnelId(2); +// tempLocation.setEquipmentId(2); +// tempLocation.setLocationType(0); +// tempLocation.setQueue(i); +// tempLocation.setLine(j); +// tempLocation.setLayer(13); +// tempLocation.setDepth(1); +// tempLocation.setIsLock(0); +// tempLocation.setLocationStatus(0); +// locationService.addLocation(tempLocation); +// } +// } + return "success"; + } + + @PostMapping("/genETagLocations") + @ResponseBody + public String genETagLocations() { +// for (int i = 1; i <= 40; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("A" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("1"); +// eTagLocation.setStandId("2001"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("B" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("2"); +// eTagLocation.setStandId("2002"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("C" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("3"); +// eTagLocation.setStandId("2003"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("D" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("4"); +// eTagLocation.setStandId("2004"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("E" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("5"); +// eTagLocation.setStandId("2005"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("F" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("6"); +// eTagLocation.setStandId("2006"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 70; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("G" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("7"); +// eTagLocation.setStandId("2007"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } +// for (int i = 1; i <= 40; i++) { +// ETagLocation eTagLocation = new ETagLocation(); +// eTagLocation.setLocationId("H" + StringUtils.leftPad(String.valueOf(i), 2, "0")); +// eTagLocation.setAreaId("8"); +// eTagLocation.setStandId("2008"); +// eTagLocation.setSequenceNo(i); +// eTagLocationService.addETagLocation(eTagLocation); +// } + return "success"; + } + + /** + * 测试导入 + * + * @param file 文件 + * @return 导入结果 + */ + @PostMapping("/testExcelImport") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String testExcelImport(@RequestPart("file") MultipartFile file) { + ResponseEntity response = new ResponseEntity(); + try { + List tests = ExcelUtils.readMultipartFile(file, ExcelTest.class); + for (ExcelTest test : tests) { + // 更新库位 + Location locationQuery = new Location(); + locationQuery.setLocationId(test.getLocationId()); + List locations = locationService.selLocations(locationQuery); + if (locations.size() > 0) { + Location currentLocation = locations.get(0); + currentLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + currentLocation.setVehicleId("XZBK" + StringUtils.leftPad(test.getVehicleId().trim(), 4, "0")); + locationService.modifyLocation(currentLocation); + // 添加载具 + Vehicle vehicle = new Vehicle(); + vehicle.setVehicleId("XZBK" + StringUtils.leftPad(test.getVehicleId().trim(), 4, "0")); + vehicle.setCurrentLocation(test.getLocationId()); + vehicle.setVehicleStatus(VehicleStatus.ON.getCode()); + vehicle.setIsEmpty(1); + if (vehicleService.selVehicleById(test.getVehicleId()) == null) { + vehicleService.addVehicle(vehicle); + } else { + vehicleService.modifyVehicle(vehicle); + } + } + } + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("导入excel成功"); + response.setReturnData(tests); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("导入excel发生错误"); + } + logger.info(JSON.toJSONString(response)); + return JSON.toJSONString(response); + } + + /** + * 测试导出 + * + * @param response 请求 + */ + @GetMapping("/testExcelExport") + @ResponseBody + public void testExcelExport(HttpServletResponse response) { + List tests = new ArrayList<>(); + ExcelTest temp1 = new ExcelTest("010101", "XZBK0001"); + ExcelTest temp2 = new ExcelTest("020101", "XZBK0002"); + tests.add(temp1); + tests.add(temp2); + ExcelUtils.export(response, "测试导出", tests, ExcelTest.class); + } + + @PostMapping("/genPassword") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String genPassword(@RequestBody User user) { + ResponseEntity response = new ResponseEntity(); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("创建密码成功"); + response.setReturnData(MyPassword.encrypt(user.getLoginPassword())); + return JSON.toJSONString(response); + } +} diff --git a/src/main/java/com/wms/controller/UserController.java b/src/main/java/com/wms/controller/UserController.java new file mode 100644 index 0000000..298860d --- /dev/null +++ b/src/main/java/com/wms/controller/UserController.java @@ -0,0 +1,794 @@ +package com.wms.controller; + +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.ResponseCode; +import com.wms.entity.app.MenuEntity; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.UserConfigEntity; +import com.wms.entity.app.vo.RoleOption; +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.dto.user.*; +import com.wms.entity.table.*; +import com.wms.service.MenuService; +import com.wms.service.PermissionService; +import com.wms.service.RoleService; +import com.wms.service.UserService; +import com.wms.utils.MyPassword; +import com.wms.constants.WmsConstants; +import com.wms.utils.StringUtils; +import jakarta.servlet.http.HttpSession; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Controller; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; +import org.springframework.web.bind.annotation.*; + +import java.util.*; +import java.util.stream.Collectors; + +import static com.wms.utils.StringUtils.convertJsonString; + +/** + * WMS用户控制类 + * @author 梁州 + * @date 2023/2/14 + */ +@Controller +@CrossOrigin +@RequestMapping(value = "/wms/user") +@RequiredArgsConstructor +public class UserController extends BaseController { + /** + * 用户服务 + */ + private final UserService userService; + /** + * 菜单服务 + */ + private final MenuService menuService; + private final PermissionService permissionService; + private final RoleService roleService; + + //private final HttpServletRequest servletRequest; + + /** + * 带密码登录 + * @param user 用户 + * @return 结果 + */ + @PostMapping("/loginWithAuth") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String loginWithAuth(@RequestBody User user, HttpSession session) { + logger.info("WMS前端用户登录,登录账户名:{}", user.getLoginAccount()); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 查找对应用户的信息 + User userForQuery = new User(); + userForQuery.setLoginAccount(user.getLoginAccount()); + List waitForAuthUsers = userService.selectUsers(userForQuery); + if (waitForAuthUsers.size() < 1) { + logger.error("用户不存在,登录账户名:{}", user.getLoginAccount()); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("用户不存在"); + return JSON.toJSONString(rsp); + } + // 验证密码 + User waitForAuthUser = waitForAuthUsers.get(0); + if (!Objects.equals(MyPassword.encrypt(user.getLoginPassword()), waitForAuthUser.getLoginPassword())) { + logger.error("密码错误,登录账户名:{}", user.getLoginAccount()); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("密码错误"); + return JSON.toJSONString(rsp); + } + // 当前用户 + User currentUser = waitForAuthUsers.get(0); + + // 将用户名保存到会话中 + session.setAttribute("username", currentUser.getLoginAccount()); + + // 返回成功 + logger.info("登录成功,登录账户名:{}", currentUser.getLoginAccount()); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("登录成功"); + // 返回用户数据 + UserConfigEntity userConfigEntity = generateUserInfo(currentUser); + rsp.setReturnData(userConfigEntity); + + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("数据库错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage(e.getMessage()); + return JSON.toJSONString(rsp); + } + } + + + /** + * 无密码登录 + * @param user 用户 + * @return 结果 + */ + @PostMapping("/loginWithoutAuth") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String loginWithoutAuth(@RequestBody User user) { + logger.info("WMS前端用户登录,登录账户名:{}", user.getLoginAccount()); + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + // 查找对应用户的信息 + User userForQuery = new User(); + userForQuery.setLoginAccount(user.getLoginAccount()); + List waitForAuthUsers = userService.selectUsers(userForQuery); + if (waitForAuthUsers.size() < 1) { + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("用户不存在"); + return JSON.toJSONString(rsp); + } + User currentUser = waitForAuthUsers.get(0); + // 返回成功 + logger.info("登录成功,登录账户名:{}", currentUser.getLoginAccount()); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("登录成功"); + // 返回用户数据 + rsp.setReturnData(generateUserInfo(currentUser)); + return JSON.toJSONString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("数据库错误:{}", e.getMessage()); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("数据库错误"); + return JSON.toJSONString(rsp); + } + } + + + /** + * 查询所有用户 + * @return 用户信息 + * */ + @PostMapping("/getUserList") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getUserList(@RequestBody queryUserRequest request) { + ResponseEntity rsp = new ResponseEntity(); + User user = new User(); + user.setUserName(request.getUserName()); + List queryUserLists = userService.selectUsers(user); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询成功"); + rsp.setReturnData(queryUserLists); + return JSON.toJSONString(rsp); + } + + + + + /** + * 新增用户 + * @return 用户信息 + * */ + @PostMapping("/addUserInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String addUser(@RequestBody addUser request) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + if (request.getRoleId1() != 1) { + logger.error("操作人员必须是管理员级别。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员必须是管理员级别。"); + return convertJsonString(rsp); + } + //先查看是否有重复的账号名 + User userForQuery = new User(); + userForQuery.setLoginAccount(request.getLoginAccountUpdate()); + if (!userService.selectUsers(userForQuery).isEmpty()){ + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("账号名重复"); + return convertJsonString(rsp); + } + List queryUserLists = userService.selectUsers(new User());//125 + int userId = 1; + for (User user : queryUserLists){ + if (userId == user.getUserId()){ + userId = user.getUserId() + 1; + }else if (userId < user.getUserId()){ + break; + } + } + User user = new User(); + user.setUserId(userId); + user.setUserName(request.getUserNameUpdate()); + user.setRoleId(request.getRoleIdUpdate()); + user.setLoginAccount(request.getLoginAccountUpdate()); + user.setLoginPassword(MyPassword.encrypt(request.getLoginPasswordUpdate())); + user.setAddTime(new Date()); + user.setUpdateTime(new Date()); + user.setAddUser("系统"); + int a = userService.addUsers(user); + if (a > 0){ + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("添加成功"); + return convertJsonString(rsp); + } + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("添加失败"); + return convertJsonString(rsp); + } + + + /** + * 删除用户信息 + * @return 用户信息 + * */ + @PostMapping("/deleteUserInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String deleteCurrentRow(@RequestBody updateUser request) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + if (request.getRoleId1() != 1) { + logger.error("操作人员必须是管理员级别。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员必须是管理员级别。"); + return convertJsonString(rsp); + } + if(userService.deleteUser(request.getUserIdUpdate()) > 0){ + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("删除成功"); + return convertJsonString(rsp); + } + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("删除失败"); + return convertJsonString(rsp); + } + + /** + * 修改用户信息 + * @return 用户信息 + * */ + @PostMapping("/updateUserInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateUserInfo(@RequestBody updateUser request) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + if (request.getRoleId1() != 1) { + logger.error("操作人员必须是管理员级别。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员必须是管理员级别。"); + return convertJsonString(rsp); + } + //先查看是否有重复的账号名 + User userForQuery = new User(); + userForQuery.setLoginAccount(request.getLoginAccountUpdate()); +// if (!userService.selectUsers(userForQuery).isEmpty()){ +// rsp.setCode(ResponseCode.ERROR.getCode()); +// rsp.setMessage("新的账号名已存在"); +// return convertJsonString(rsp); +// } + //更新账户信息 + userForQuery.setUserName(request.getUserNameUpdate()); + userForQuery.setUserId(request.getUserIdUpdate()); + userForQuery.setRoleId(request.getRoleIdUpdate()); + int a = userService.updateUserInfromation(userForQuery); + if (a > 0){ + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("添加成功"); + return convertJsonString(rsp); + } + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("添加失败"); + return convertJsonString(rsp); + } + + /** + * 删除用户 + * @return 用户信息 + * */ + @DeleteMapping("/deleteUser/{userId}") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public WmsApiResponse deleteUser(@PathVariable int userId) { + int a = userService.deleteUser(userId); + if (a > 0){ + return new WmsApiResponse<>(0, "删除成功", true); + } + return new WmsApiResponse<>(-1, "删除失败", false); + } + + /** + * 修改用户密码 + * @param request 修改用户密码的请求 + * @return 用户信息 + */ + @PostMapping("/changePassword") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public WmsApiResponse changePassword(@RequestBody deleteUser request) { + if (Objects.equals(request.getZhanghao(), "admin")){ + return new WmsApiResponse<>(-1, "管理员密码不允许修改", false); + } + User user = new User(); + user.setLoginAccount(request.getZhanghao()); + List userList = userService.selectUsers(user); + if (userList.isEmpty()){ + return new WmsApiResponse<>(-1, "用户不存在,请核对!", false); + } + if (Objects.equals(MyPassword.encrypt(request.getOldPW()), userList.get(0).getLoginPassword())){ + user.setLoginPassword(MyPassword.encrypt(request.getNewPW())); + int a = userService.updateUser(user); + if (a > 0){ + return new WmsApiResponse<>(0, "修改成功", true); + }else { + return new WmsApiResponse<>(-1, "修改失败", false); + } + }else { + return new WmsApiResponse<>(-1, "旧密码错误,请核对!", false); + } + } + + + /** + * 构造用户信息(菜单、按钮等权限) + * @param currentUser 当前用户 + * @return 用户信息 + */ + private UserConfigEntity generateUserInfo (User currentUser) { + UserConfigEntity userConfigEntity = new UserConfigEntity(); + try { + List menus = menuService.selMenuByRoleId(currentUser.getRoleId()); + List menuList = new LinkedList<>(); + // 查找一级菜单 + for (Menu firstMenu : menus) { + if (WmsConstants.ROOT_MENU_ID.equals(firstMenu.getParentId())) {// 查找到所有的一级子菜单 + MenuEntity tempFirstMenu = new MenuEntity(); + tempFirstMenu.setId(firstMenu.getMenuId());// ID + tempFirstMenu.setLabelName(firstMenu.getLabelName());// 菜单显示名称 + tempFirstMenu.setIconValue(firstMenu.getIconValue());// 图标 + tempFirstMenu.setPath(firstMenu.getPath());// 路径 + // 设置子菜单 + List tempFirstMenuChildren = new LinkedList<>(); + for (Menu secondMenu : menus) { + if (firstMenu.getMenuId().equals(secondMenu.getParentId())) { + MenuEntity tempSecondMenu = new MenuEntity(); + tempSecondMenu.setId(secondMenu.getMenuId());// ID + tempSecondMenu.setLabelName(secondMenu.getLabelName());// 菜单显示名称 + tempSecondMenu.setIconValue(secondMenu.getIconValue());// 图标 + tempSecondMenu.setPath(secondMenu.getPath());// 路径 + // 设置子菜单 + List tempSecondMenuChildren = new LinkedList<>(); + for (Menu thirdMenu : menus) { + if (secondMenu.getMenuId().equals(thirdMenu.getParentId())) { + MenuEntity tempThirdMenu = new MenuEntity(); + tempSecondMenu.setId(thirdMenu.getMenuId());// ID + tempSecondMenu.setLabelName(thirdMenu.getLabelName());// 菜单显示名称 + tempSecondMenu.setIconValue(thirdMenu.getIconValue());// 图标 + tempSecondMenu.setPath(thirdMenu.getPath());// 路径 + // 添加按钮 + tempSecondMenuChildren.add(tempThirdMenu); + } + } + tempSecondMenu.setChildren(tempSecondMenuChildren); + // 添加二级菜单 + tempFirstMenuChildren.add(tempSecondMenu); + } + } + tempFirstMenu.setChildren(tempFirstMenuChildren); + // 添加一级菜单 + menuList.add(tempFirstMenu); + } + } + logger.info("构造用户信息成功,当前用户:{}", currentUser.toLoggerString()); + // 设置返回信息 + userConfigEntity.setUser(currentUser); + userConfigEntity.setMenuList(menuList); + } catch (Exception e) { + logger.error("构造用户信息失败,当前用户:{}", currentUser.toLoggerString()); + } + return userConfigEntity; + } + + + /** + * 查询所有的role返回 + * @return 用户信息 + * */ + @PostMapping("/getRoleOptions") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String selectUserRole() { + List roles = roleService.selectRoles(new Role()); + List roleOptions = roles.stream().map(RoleOption::of).toList(); + ResponseEntity rsp = new ResponseEntity(); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询成功"); + rsp.setReturnData(roleOptions); + return JSON.toJSONString(rsp); + } + + + // TODO 以下代码是新增 + /** + * 获取角色列表 + * + * @param roleQuery 查询参数 + * @return 结果 + */ + @PostMapping("/getRoleList") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getRoleList(@RequestBody Role roleQuery) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (roleQuery.getRoleId() == null || roleQuery.getRoleId() != 1) { + logger.error("操作人员必须是管理员级别。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员必须是管理员级别。"); + return convertJsonString(rsp); + } + // 查询roleId低于当前查询的roleId的用户 + List roles = roleService.selectRoles(roleQuery); + // 返回成功 + logger.info("查询角色列表成功。"); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询角色列表成功。"); + // 返回用户数据 + rsp.setReturnData(roles); + return convertJsonString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("查询角色列表失败:{}", convertJsonString(e)); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("查询角色列表失败。"); + return convertJsonString(rsp); + } + } + + /** + * 获取权限列表 + * + * @param permissionQuery 查询参数 + * @return 结果 + */ + @PostMapping("/getPermissionList") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getPermissionList(@RequestBody PermissionQuery permissionQuery) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (permissionQuery.getRoleId1() == null || permissionQuery.getRoleId1() != 1) { + logger.error("操作人员必须是管理员级别。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员必须是管理员级别。"); + return convertJsonString(rsp); + } + // 获取所有的菜单信息 + List permissionList = permissionService.selectPermissionByRoleId(permissionQuery.getRoleId1()); + if (permissionList == null || permissionList.isEmpty()) { + logger.error("操作人员的角色没有权限。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员的角色没有权限。"); + return convertJsonString(rsp); + } + List menuIds = permissionList.stream().map(Permission::getMenuId).distinct().toList(); + // 查询所有的菜单 + List menuList = menuService.selMenuByMenuIds(menuIds); + // 先添加一级菜单 + List level1Menus = menuList.stream().filter(menu -> Objects.equals(menu.getParentId(), WmsConstants.ROOT_MENU_ID)).map(MenuVo::of).toList(); + // 添加二级菜单 + for (MenuVo level1Menu : level1Menus) { + level1Menu.setChildren(menuList.stream().filter(menu -> Objects.equals(menu.getParentId(), level1Menu.getId())).map(MenuVo::of).toList()); + } + PermissionVo permissionVo = new PermissionVo(); + permissionVo.setMenu(level1Menus); + // 获取待查询角色所有菜单权限 + if (permissionQuery.getRoleId2() != null) { + List permissionListOfTarget = permissionService.selectPermissionWithOutL1(permissionQuery.getRoleId2(), level1Menus.stream().map(MenuVo::getId).distinct().toList()); + permissionVo.setMenuIds(permissionListOfTarget.stream().map(Permission::getMenuId).distinct().toList()); + } else { + permissionVo.setMenuIds(new ArrayList<>()); + } + + logger.info("查询权限列表成功。"); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("查询权限列表成功。"); + // 返回用户数据 + rsp.setReturnData(permissionVo); + return convertJsonString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + // 返回其他异常 + logger.error("查询权限列表异常:{}", convertJsonString(e)); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("查询权限列表异常。"); + return convertJsonString(rsp); + } + } + + /** + * 更新角色信息 + * + * @param roleUpdateForm 更新参数 + * @return 结果 + */ + @PostMapping("/updateRoleInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String updateRoleInfo(@RequestBody RoleUpdateForm roleUpdateForm) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (roleUpdateForm.getRoleId1() == null || roleUpdateForm.getRoleId2() == null) { + logger.error("请求操作的roleId和被操作的roleId必须输入。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求操作的roleId和被操作的roleId必须输入。"); + return convertJsonString(rsp); + } + if (roleUpdateForm.getRoleId1() != 1) { + logger.error("操作人员必须是管理员级别。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员必须是管理员级别。"); + return convertJsonString(rsp); + } + // 更新角色信息 + if (StringUtils.isNotEmpty(roleUpdateForm.getRole2Name())) { + roleService.updateRole(new Role(roleUpdateForm.getRoleId2(), roleUpdateForm.getRole2Name())); + } + // 获取所有的菜单信息 + List permissionList = permissionService.selectPermissionByRoleId(roleUpdateForm.getRoleId1()); + if (permissionList == null || permissionList.isEmpty()) { + logger.error("操作人员的角色没有权限。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员的角色没有权限。"); + return convertJsonString(rsp); + } + List menuIds = permissionList.stream().map(Permission::getMenuId).distinct().toList(); + List updateMenuIds = roleUpdateForm.getMenuIds(); + for (String menuId : updateMenuIds) { + if (!menuIds.contains(menuId)) { + logger.error("设定的权限超过操作人员所拥有的权限。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("设定的权限超过操作人员所拥有的权限。"); + return convertJsonString(rsp); + } + } + // 查询所有的菜单 + List menuList = menuService.selMenuByMenuIds(updateMenuIds); + for (Menu menu : menuList) { + if (menu.getParentId() != null && !menu.getParentId().equals(WmsConstants.ROOT_MENU_ID) && !updateMenuIds.contains(menu.getParentId())) { + updateMenuIds.add(menu.getParentId()); + } + } + // 移除角色所有权限 + permissionService.removePermissonsByRoleId(roleUpdateForm.getRoleId2()); + // 添加权限 + List updatePermissionList = new ArrayList<>(); + List list = permissionService.selectAll(); + int a = 0; + for (Permission permission : list) { + if (a <= Integer.parseInt(permission.getPermissionId())) { + a = Integer.parseInt(permission.getPermissionId()) + 1; + } + } + for (int i = 0; i < updateMenuIds.size(); i++) { +// if(Objects.equals(updateMenuIds.get(i), "1") || Objects.equals(updateMenuIds.get(i), "2") || Objects.equals(updateMenuIds.get(i), "3")){ +// continue; +// } + Permission permission = new Permission(); + permission.setRoleId(roleUpdateForm.getRoleId2()); + permission.setMenuId(updateMenuIds.get(i)); + permission.setPermissionId(String.valueOf(a + i)); + updatePermissionList.add(permission); + } + if (permissionService.saveBatch(updatePermissionList) > 0) { + // 返回成功 + logger.info("更新角色信息成功。"); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("更新角色信息成功。"); + } else { + // 返回失败 + logger.error("更新角色权限失败。"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("更新角色权限失败。"); + } + return convertJsonString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("更新角色信息失败:{}", convertJsonString(e)); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("更新角色信息失败。"); + return convertJsonString(rsp); + } + } + + /** + * 添加角色信息 + * + * @param roleUpdateForm 添加参数 + * @return 结果 + */ + @PostMapping("/addRoleInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String addRoleInfo(@RequestBody RoleUpdateForm roleUpdateForm) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (roleUpdateForm.getRoleId1() == null || roleUpdateForm.getRoleId1() != 1) { + logger.error("操作人员必须是管理员级别。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员必须是管理员级别。"); + return convertJsonString(rsp); + } + // 添加角色信息 + Role role = new Role(); + role.setRoleId(roleService.selectMaxRoleId().getRoleId() + 1); + role.setRoleName(roleUpdateForm.getRole2Name()); + if (roleService.addRole(role) == 0) { + // 添加失败 + logger.error("添加角色信息失败。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("添加角色信息失败。"); + return convertJsonString(rsp); + } + // 获取所有的菜单信息 + List permissionList = permissionService.selectPermissionByRoleId(roleUpdateForm.getRoleId1()); + if (permissionList == null || permissionList.isEmpty()) { + logger.error("操作人员的角色没有权限。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员的角色没有权限。"); + return convertJsonString(rsp); + } + List menuIds = permissionList.stream().map(Permission::getMenuId).distinct().toList(); + List updateMenuIds = roleUpdateForm.getMenuIds(); + for (String menuId : updateMenuIds) { + if (!menuIds.contains(menuId)) { + logger.error("设定的权限超过操作人员所拥有的权限。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("设定的权限超过操作人员所拥有的权限。"); + return convertJsonString(rsp); + } + } + // 查询所有的菜单 + List menuList = menuService.selMenuByMenuIds(updateMenuIds); + for (Menu menu : menuList) { + if (menu.getParentId() != null && !menu.getParentId().equals(WmsConstants.ROOT_MENU_ID) && !updateMenuIds.contains(menu.getParentId())) { + updateMenuIds.add(menu.getParentId()); + } + } + // 移除角色所有权限 + permissionService.removePermissonsByRoleId(role.getRoleId()); + // 添加权限 + List updatePermissionList = new ArrayList<>(); + List list = permissionService.selectAll(); + int a = 0; + for (Permission permission : list) { + if (a <= Integer.parseInt(permission.getPermissionId())) { + a = Integer.parseInt(permission.getPermissionId()) + 1; + } + } + for (int i = 0; i < updateMenuIds.size(); i++) { +// if(Objects.equals(updateMenuIds.get(i), "1") || Objects.equals(updateMenuIds.get(i), "2") || Objects.equals(updateMenuIds.get(i), "3")){ +// continue; +// } + Permission permission = new Permission(); + permission.setRoleId(role.getRoleId()); + permission.setMenuId(updateMenuIds.get(i)); + permission.setPermissionId(String.valueOf(a + i)); + updatePermissionList.add(permission); + } +// for (String menuId : updateMenuIds) { +// // 添加权限 +// Permission permission = new Permission(); +// permission.setRoleId(role.getRoleId()); +// permission.setMenuId(menuId); +// updatePermissionList.add(permission); +// } + if (permissionService.saveBatch(updatePermissionList) > 0) { + // 返回成功 + logger.info("添加角色信息成功。"); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("添加角色信息成功。"); + } else { + // 返回失败 + logger.error("添加角色权限失败。"); + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("添加角色权限失败。"); + } + return convertJsonString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("添加角色信息失败:{}", convertJsonString(e)); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("添加角色信息失败。"); + return convertJsonString(rsp); + } + } + + /** + * 删除角色信息 + * + * @param roleUpdateForm 更新参数 + * @return 结果 + */ + @PostMapping("/deleteRoleInfo") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String deleteRoleInfo(@RequestBody RoleUpdateForm roleUpdateForm) { + // 创建响应信息 + ResponseEntity rsp = new ResponseEntity(); + try { + if (roleUpdateForm.getRoleId1() == null || roleUpdateForm.getRoleId2() == null) { + logger.error("请求操作的roleId和被操作的roleId必须输入。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("请求操作的roleId和被操作的roleId必须输入。"); + return convertJsonString(rsp); + } + if (roleUpdateForm.getRoleId1() != 1) { + logger.error("操作人员必须是管理员级别。"); + // 返回错误 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("操作人员必须是管理员级别。"); + return convertJsonString(rsp); + } + // 删除角色信息 + Role removeRole = new Role(); + removeRole.setRoleId(roleUpdateForm.getRoleId2()); + roleService.removeRole(removeRole); + // 移除角色所有权限 + permissionService.removePermissonsByRoleId(roleUpdateForm.getRoleId2()); + // 返回成功 + logger.info("删除角色信息成功。"); + rsp.setCode(ResponseCode.OK.getCode()); + rsp.setMessage("删除角色信息成功。"); + return convertJsonString(rsp); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.info("删除角色信息失败:{}", convertJsonString(e)); + // 返回其他异常 + rsp.setCode(ResponseCode.ERROR.getCode()); + rsp.setMessage("删除角色信息失败。"); + return convertJsonString(rsp); + } + } +} diff --git a/src/main/java/com/wms/controller/others/ContainerController.java b/src/main/java/com/wms/controller/others/ContainerController.java new file mode 100644 index 0000000..97339a2 --- /dev/null +++ b/src/main/java/com/wms/controller/others/ContainerController.java @@ -0,0 +1,71 @@ +package com.wms.controller.others; + +import com.alibaba.fastjson2.JSON; +import com.wms.controller.BaseController; +import com.wms.entity.app.container.ContainerApiLocalResponse; +import com.wms.entity.app.container.CreateInstoreTaskRequest; +import com.wms.entity.app.container.CreateInstoreTaskResponse; +import com.wms.entity.app.container.TaskStateNoticeRequest; +import com.wms.service.ContainerService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + + +/** + * 四向车交互 + * @author icewint + */ +@Slf4j +@RestController +@CrossOrigin +@RequestMapping(value = "/api/container") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class ContainerController extends BaseController { + + + private final ContainerService containerService; + + /** + * 接收四向车扫码入库信息 + * @param request 请求信息 + * @return 返回信息 + */ + @PostMapping("/createInstoreTask") + public CreateInstoreTaskResponse createInstoreTask(@RequestBody @Validated CreateInstoreTaskRequest request) { + try { + log.info("四向车扫码入库请求:{}", JSON.toJSONString(request)); + CreateInstoreTaskResponse instoreTask = containerService.createInstoreTask(request); + log.info("四向车扫码入库信息返回:{}", JSON.toJSONString(instoreTask)); + return instoreTask; + }catch (Exception e){ + log.info("四向车扫码入库失败,出现异常,请稍后再试"); + return new CreateInstoreTaskResponse("400", "四向车扫码入库异常,请稍后再试"); + } + + } + + + /** + * 接收四向车任务状态通知 + * @param request 请求信息 + * @return 响应信息 + */ + @PostMapping("/taskStateNotice") + public ContainerApiLocalResponse taskStateNotice(@RequestBody @Validated TaskStateNoticeRequest request){ + try { + log.info("四向车任务状态通知请求:{}", JSON.toJSONString(request)); + ContainerApiLocalResponse containerApiLocalResponse = containerService.taskStateNotice(request); + log.info("四向车任务状态通知信息返回:{}", JSON.toJSONString(containerApiLocalResponse)); + return containerApiLocalResponse; + }catch (Exception e){ + log.error("接收到任务反馈失败,出现异常"); + return new ContainerApiLocalResponse("400", "接收到任务反馈失败,请稍后再试"); + } + + } + + +} diff --git a/src/main/java/com/wms/controller/others/MesController.java b/src/main/java/com/wms/controller/others/MesController.java new file mode 100644 index 0000000..7d5b8c5 --- /dev/null +++ b/src/main/java/com/wms/controller/others/MesController.java @@ -0,0 +1,57 @@ +package com.wms.controller.others; + +import com.wms.controller.BaseController; +import com.wms.entity.app.mes.CheckNoticeRequest; +import com.wms.entity.app.mes.MesApiLocalResponse; +import com.wms.entity.app.mes.OutNoticeRequest; +import com.wms.entity.app.mes.ReceiptInRequest; +import com.wms.service.MesService; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * 和 mes 交互使用的 controller + * @author icewint + */ +@RestController +@CrossOrigin +@RequestMapping(value = "/api/mes") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class MesController extends BaseController { + + private final MesService mesService; + + /** + * mes 入库之前用此接口推送信息 IF201 + * @param request 请求信息 + * @return 返回信息 + */ + @PostMapping("/ReceiptIn") + public MesApiLocalResponse receiptIn(@RequestBody @Validated ReceiptInRequest request) { + return mesService.receiptIn(request); + } + + + /** + * mes 出库 IF205(IF203) + * @param request 请求信息 + * @return 返回信息 + */ + @PostMapping("/OutNotice") + public MesApiLocalResponse outNotice(@RequestBody @Validated OutNoticeRequest request) { + return mesService.outNotice(request); + } + + /** + * mes 盘点通知单 IF206 + * @return 返回信息 + */ + @PostMapping("/CheckNotice") + public MesApiLocalResponse checkNotice(@RequestBody @Validated CheckNoticeRequest request) { + return mesService.checkNotice(request); + } + + +} diff --git a/src/main/java/com/wms/controller/others/WcsController.java b/src/main/java/com/wms/controller/others/WcsController.java new file mode 100644 index 0000000..91cef87 --- /dev/null +++ b/src/main/java/com/wms/controller/others/WcsController.java @@ -0,0 +1,831 @@ +package com.wms.controller.others; + +import com.alibaba.fastjson2.JSON; +import com.wms.bussiness.TaskOperation; +import com.wms.constants.enums.*; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.container.ContainerApiLocalResponse; +import com.wms.entity.app.mes.MesApiLocalResponse; +import com.wms.entity.app.mes.SendMesPutInGoodsRequest; +import com.wms.entity.app.wcs.RequireInRequest; +import com.wms.entity.app.wcs.RequireOutRequest; +import com.wms.entity.app.wcs.WmsReceiveTaskResultEntity; +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.table.*; +import com.wms.mapper.*; +import com.wms.service.StockService; +import com.wms.service.TaskService; +import com.wms.utils.HttpUtils; +import com.wms.utils.storage.LocationUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; +import java.util.*; +import java.util.stream.Collectors; + +@Slf4j +@RestController +@CrossOrigin +@RequestMapping(value = "/api/wcs") +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class WcsController { + + /** + * 任务操作类 + */ + private final TaskOperation taskOperation; + + /** + * 库存 Mapper + */ + private final StockMapper stockMapper; + + /** + * 库位 Mapper + */ + private final LocationMapper locationMapper; + + /** + * 任务 Mapper + */ + private final TaskMapper taskMapper; + + + /** + * 库存服务 + */ + private final StockService stockService; + /** + * 库位操作类 + */ + private final LocationUtils locationUtils; + + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 任务服务 + */ + private final TaskService taskService; + + /** + * 订单入库 Mapper + */ + private final AppOrderInMapper appOrderInMapper; + private final VehicleIistMapper vehicleIistMapper; + private final VehicleMapper vehicleMapper; + private final ConfigMapper configMapper; + private final PartInfoMapper partInfoMapper; + private final OledInMapper oledInMapper; + /** + * 插入oled入库信息 + */ + public boolean insertOledIn(oledIn oledIn){ + return oledInMapper.insert(oledIn) > 0; + } + + + /** + * 电视机获取订单入库信息 + * @return 返回信息 + */ + @GetMapping("/oledForOrderIn") + public ResponseEntity oledForOrderIn() { + //log.info("wcs请求获取oled入库信息"); + ResponseEntity rsp = new ResponseEntity(); + List oledInList = oledInMapper.selectAll(); + if (oledInList == null || oledInList.isEmpty()) { + rsp.setCode(0); + rsp.setMessage("fail"); + rsp.setReturnData(null); + } else { + rsp.setCode(200); + rsp.setMessage("success"); + rsp.setReturnData(oledInList); + } + return rsp; + } + + /** + * 更改一号入库口出入模式 + * @param request 请求信息 + * @return 返回信息 + */ + @PostMapping("/status") + public ResponseEntity status(@RequestBody @Validated RequireOutRequest request) { + log.info("wcs请求更改一号出入口状态"); + //0为异常,既不能入也不能出,2为入库口,1为出库口 + Config config = new Config(); + config.setConfigId(100); + config.setConfigValue(request.getPoint()); + int a = configMapper.updateConfig(config); + if (a > 0){ + log.info("更新一号出入口状态成功"); + return new ResponseEntity(0, "更新状态成功"); + }else { + log.info("更新一号出入口状态失败"); + return new ResponseEntity(-1, "更新状态失败"); + } + } + /** + * 立库申请出空托垛 + * @param request 请求信息 + * @return 返回信息 + */ + @PostMapping("/requestOut") + public ResponseEntity requestOut(@RequestBody @Validated RequireOutRequest request) { + log.info("wcs呼叫空托垛出库"); + //去载具表找一个空托,下发任务,终点写point + Vehicle vehicle = new Vehicle(); + if(Objects.equals(request.getPoint(), "107")){ + vehicle.setIsEmpty(1); + }else { + vehicle.setIsEmpty(0); + } + vehicle.setVehicleId("D99999999"); + List vList = vehicleMapper.selVehiclesByEmptyOut(vehicle); + if (vList == null || vList.isEmpty()){ + return new ResponseEntity(-1, "库中没有空托垛,出库失败"); + } + //下发出库任务 + Task taskByEmptyOut = new Task(); + taskByEmptyOut.setTaskId(UUID.randomUUID().toString()); + taskByEmptyOut.setTaskType(TaskType.OUT.getCode()); + taskByEmptyOut.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskByEmptyOut.setTaskGroup(UUID.randomUUID().toString()); + taskByEmptyOut.setOrigin(vList.get(0).getCurrentLocation()); + taskByEmptyOut.setDestination(request.getPoint()); + taskByEmptyOut.setPickStand(null);//因为出库要选择不同的站台,要区分大小托盘,用这个字段来标记 + taskByEmptyOut.setWeight(0.0); + taskByEmptyOut.setVehicleNo(vList.get(0).getVehicleId()); + taskByEmptyOut.setCreateTime(new Date()); + taskByEmptyOut.setUserName(null); + taskByEmptyOut.setGoodsId(null); + taskByEmptyOut.setGoodsName(null); + taskByEmptyOut.setOperateNum(0); + taskByEmptyOut.setTotalNum(0); + taskByEmptyOut.setTaskPriority(1); + taskByEmptyOut.setRemark1("空托垛出库"); + int addTask = taskMapper.addTask(taskByEmptyOut); + if(addTask > 0) { + return new ResponseEntity(0, "请求成功"); + }else { + return new ResponseEntity(-1, "添加任务失败,网络连接异常,请稍后再试"); + } + } + + public RequireInRequest dealCodeInformation(RequireInRequest request) { + log.info("wcs请求处理二维码信息{}", request); + //新建一个oled表的信息 + oledIn oledIn = new oledIn(); + oledIn.setPoint(request.getPoint()); + oledIn.setVehicleNo(request.getVehicleNo()); + //先删除此点位所有非正常的记录 + oledInMapper.delete(oledIn); + //检查母托信息 + VechileList vehicle = new VechileList(); + vehicle.setVehicleId(request.getVehicleNo()); + if (vehicleIistMapper.selectByEqual(vehicle) == null || vehicleIistMapper.selectByEqual(vehicle).isEmpty()){ + log.error("该母托号在数据库中不存在"); + oledIn.setRemark("该母托号在数据库中不存在"); + oledIn.setStatus("1"); + insertOledIn(oledIn); + return null; + } + //查找该母托是否已有任务,有也要返回 + Task taskQuery = new Task(); + taskQuery.setVehicleNo(request.getVehicleNo()); + if (taskService.selTasks(taskQuery) != null && !taskService.selTasks(taskQuery).isEmpty()){ + log.error("该母托号已有任务"); + oledIn.setRemark("该母托号已有任务"); + oledIn.setStatus("1"); + insertOledIn(oledIn); + return null; + } + //对wcs传过来的条码信息进行解析 + PartInfo partInfo = new PartInfo(); + //原材料的情况 + if (request.getModel() == null || request.getModel().isEmpty()){//原材料 + //检查原材料 + + String str = request.getCodeMessage(); + if (str == null || !str.contains("&")) { + log.error("原材料条码格式错误"); + oledIn.setRemark("原材料条码格式错误"); + oledIn.setStatus("1"); + insertOledIn(oledIn); + return null; + } + // 使用 "&" 进行拆分 + String[] parts = str.split("&"); + if (parts.length != 3) { + log.error("原材料条码格式不符合预期"); + oledIn.setRemark("原材料条码格式不符合预期"); + oledIn.setStatus("1"); + insertOledIn(oledIn); + return null; + } + String goodsIdForUse = parts[0]; + + partInfo.setMaterial(goodsIdForUse); + partInfo.setItemDesc("原材料"); + if ((partInfoMapper.selPartsByEqual(partInfo) == null || partInfoMapper.selPartsByEqual(partInfo).isEmpty()) && !Objects.equals(partInfo.getMaterial(), "YJRK0001")){ + log.error("该原材料条码的物料号在数据库中不存在"); + oledIn.setRemark("该原材料条码的物料号在数据库中不存在"); + oledIn.setStatus("1"); + insertOledIn(oledIn); + return null; + } + oledIn.setGoodsNum(parts[1]); + oledIn.setGoodsId(goodsIdForUse); + oledIn.setRemark("正常入库"); + oledIn.setStatus("0"); + insertOledIn(oledIn); + return request; + }else{ + //发动机的情况 + partInfo.setMaterial(request.getCodeMessage()); + partInfo.setItemDesc("发动机"); + if (partInfoMapper.selPartsByEqual(partInfo) == null || partInfoMapper.selPartsByEqual(partInfo).isEmpty()){ + partInfo.setMaterial(request.getModel()); + if (partInfoMapper.selPartsByEqual(partInfo) == null || partInfoMapper.selPartsByEqual(partInfo).isEmpty()){ + log.error("该机型在数据库中不存在"); + oledIn.setRemark("该机型在数据库中不存在"); + oledIn.setStatus("1"); + insertOledIn(oledIn); + return null; + }else{ + //判断序列号在立库是否存在 + //判断入库任务和库存内,如果都没有就是对的 + Task taskQueryForGoodsId = new Task(); + taskQueryForGoodsId.setGoodsId(request.getCodeMessage()); + Stock stockQuery = new Stock(); + stockQuery.setGoodsId(request.getCodeMessage()); + List tasks = taskService.selTasks(taskQueryForGoodsId); + List stocks = stockMapper.selStocks(stockQuery); + if ((tasks == null || tasks.isEmpty()) && (stocks == null || stocks.isEmpty())) { + oledIn.setGoodsNum("1"); + oledIn.setGoodsId(request.getCodeMessage()); + oledIn.setModel(request.getModel()); + oledIn.setRemark("正常入库"); + oledIn.setStatus("0"); + insertOledIn(oledIn); + return request; + }else{ + log.error("该序列号已存在,请检查"); + oledIn.setGoodsNum("1"); + oledIn.setGoodsId(request.getCodeMessage()); + oledIn.setModel(request.getModel()); + oledIn.setRemark("该序列号已存在,请检查"); + oledIn.setStatus("1"); + insertOledIn(oledIn); + return null; + } + } + }else{ + //判断序列号在立库是否存在 + //判断入库任务和库存内,如果都没有就是对的 + Task taskQueryForGoodsId = new Task(); + taskQueryForGoodsId.setGoodsId(request.getCodeMessage()); + Stock stockQuery = new Stock(); + stockQuery.setGoodsId(request.getCodeMessage()); + List tasks = taskService.selTasks(taskQueryForGoodsId); + List stocks = stockMapper.selStocks(stockQuery); + if ((tasks == null || tasks.isEmpty()) && (stocks == null || stocks.isEmpty())) { + // 使用多重赋值交换两个属性的值 + String temp = request.getModel(); + request.setModel(request.getCodeMessage()); + request.setCodeMessage(temp); + oledIn.setGoodsNum("1"); + oledIn.setGoodsId(request.getCodeMessage()); + oledIn.setModel(request.getModel()); + oledIn.setRemark("正常入库"); + oledIn.setStatus("0"); + insertOledIn(oledIn); + return request; + }else{ + String temp = request.getModel(); + request.setModel(request.getCodeMessage()); + request.setCodeMessage(temp); + log.error("该序列号已存在,请检查"); + oledIn.setGoodsNum("1"); + oledIn.setGoodsId(request.getCodeMessage()); + oledIn.setModel(request.getModel()); + oledIn.setRemark("该序列号已存在,请检查"); + oledIn.setStatus("1"); + insertOledIn(oledIn); + return null; + } + + + + } + } + } + + /** + * 立库申请入库 + * @param request 请求信息 + * @return 返回信息 + */ + @PostMapping("/requestIn") + public ResponseEntity requestIn(@RequestBody @Validated RequireInRequest request) { + try { + log.info(String.format("%s 点位请求入库:%s",request.getPoint(), request.getVehicleNo())); + //判断,如果config中状态为0或者1则不允许入库 + List configs = configMapper.selectConfigs("100"); + Config config = configs.get(0); + if (Objects.equals(config.getConfigValue(), "0") || Objects.equals(config.getConfigValue(), "1")){ + log.info("当前一号入库口为出库和不可入模式,禁止入库!"); + return new ResponseEntity(-1, "当前一号入库口为出库和不可入模式,禁止入库!"); + } + //这里需要添加一个叠盘入库的请求,不需要判断额外条件,直接入库分配库位,记录库存即可 + if (Objects.equals(request.getVehicleNo(), "D99999999")){//表示空托垛入库,不需要分辨warearea,只需要考虑5%剩余就可以了 + //两个点位都有叠盘入库 + if(request.getPoint().equals("244")) {//小托盘叠盘 + /* 查找一个空库位 */ + //每个巷道要留出5%的空库位用于移库,424(22),424,336(17) + int[] tunnelIds = {1, 2, 3}; + int[] requiredEmptySlots = {22, 22, 17}; + int userId = 1; + for (int i = 0; i < tunnelIds.length; i++) { + try { + int tunnelId = tunnelIds[i]; + int requiredSlots = requiredEmptySlots[i]; + + Location useForKeepEmptyLocation = new Location(); + useForKeepEmptyLocation.setTunnelId(tunnelId); + useForKeepEmptyLocation.setLocationStatus(0); + + List useForKeepEmptyLocations = locationMapper.selLocations(useForKeepEmptyLocation); + int availableSlots = useForKeepEmptyLocations.size(); + + if (availableSlots >= requiredSlots) { + log.info("空托入库,巷道 {} 剩余空库位 {},满足要求。", tunnelId, availableSlots); + userId = tunnelId; + break; + } else { + log.info("空托入库,巷道 {} 剩余空库位 {},不足5%,尝试下一个巷道。", tunnelId, availableSlots); + } + if (tunnelId == 3){ + log.info("空托入库,所有巷道剩余空库位均不足5%,取消入库!"); + return new ResponseEntity(-1, String.format("没有多余空闲库位,取消入库,条码号:%s", request.getVehicleNo())); + } + } catch (Exception e) { + log.error("空托入库,查询巷道 {} 空库位时发生错误:{}", tunnelIds[i], e.getMessage()); + return new ResponseEntity(-1, "查询空库位时发生错误"); + } + } + /* 查找一个空库位 */ + Location emptyLocation = new Location(); + emptyLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + emptyLocation.setTunnelId(userId); + List emptyLocations = locationMapper.selLocationsByDesc(emptyLocation); + if(emptyLocations == null) { + return new ResponseEntity(-1, "库位查找失败,网络连接异常,请稍后再试"); + } + + Location emptyLocationItem = locationUtils.checkCanUse(emptyLocations); + if(emptyLocationItem == null) { + return new ResponseEntity(-1, "没有可用库位或者库位存在干涉,请稍后再试"); + } + // 该空库位可用,生成一个入库任务,并将库存表更新库位 + // 更新库位表,占掉库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(emptyLocationItem.getLocationId()); + updateLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + updateLocation.setVehicleId(request.getVehicleNo()); + locationMapper.modifyLocation(updateLocation); // 占掉库位 + // 添加入库任务 + Task taskByLitterEngine = new Task(); + taskByLitterEngine.setTaskId(UUID.randomUUID().toString()); + taskByLitterEngine.setTaskType(TaskType.IN.getCode()); + taskByLitterEngine.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskByLitterEngine.setTaskGroup(UUID.randomUUID().toString()); + taskByLitterEngine.setOrigin(request.getPoint()); + taskByLitterEngine.setDestination(emptyLocationItem.getLocationId()); + taskByLitterEngine.setPickStand("小");//因为出库要选择不同的站台,要区分大小托盘,用这个字段来标记 + taskByLitterEngine.setWeight(0.0); + taskByLitterEngine.setVehicleNo(request.getVehicleNo()); + taskByLitterEngine.setCreateTime(new Date()); + taskByLitterEngine.setUserName(null); + taskByLitterEngine.setGoodsId(null); + taskByLitterEngine.setGoodsName(null); + taskByLitterEngine.setOperateNum(0); + taskByLitterEngine.setTotalNum(0); + taskByLitterEngine.setTaskPriority(1); + taskByLitterEngine.setRemark1("空托垛入库"); + //开始向任务表中添加任务 + int addTask = taskMapper.addTask(taskByLitterEngine); + if(addTask > 0) { + return new ResponseEntity(0, "存在入库任务,申请成功"); + } + return new ResponseEntity(-1, "添加入库任务失败,网络连接异常,请稍后再试"); + } else if (request.getPoint().equals("107")) {//大托盘叠盘 + /* 查找一个空库位 */ + Location emptyLocation = new Location(); + emptyLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + emptyLocation.setTunnelId(3); + List emptyLocations = locationMapper.selLocationsByDesc(emptyLocation); + if(emptyLocations == null) { + return new ResponseEntity(-1, "库位查找失败,网络连接异常,请稍后再试"); + } + if (emptyLocations.size() < 17){ + return new ResponseEntity(-1, "空闲库位不足5%,取消入库"); + } + + Location emptyLocationItem = locationUtils.checkCanUse(emptyLocations); + if(emptyLocationItem == null) { + return new ResponseEntity(-1, "没有可用库位或者库位存在干涉,请稍后再试"); + } + // 该空库位可用,生成一个入库任务,并将库存表更新库位 + // 更新库位表,占掉库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(emptyLocationItem.getLocationId()); + updateLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + updateLocation.setVehicleId(request.getVehicleNo()); + locationMapper.modifyLocation(updateLocation); // 占掉库位 + // 添加入库任务 + Task taskByLitterEngine = new Task(); + taskByLitterEngine.setTaskId(UUID.randomUUID().toString()); + taskByLitterEngine.setTaskType(TaskType.IN.getCode()); + taskByLitterEngine.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskByLitterEngine.setTaskGroup(UUID.randomUUID().toString()); + taskByLitterEngine.setOrigin(request.getPoint()); + taskByLitterEngine.setDestination(emptyLocationItem.getLocationId()); + taskByLitterEngine.setPickStand("大"); + taskByLitterEngine.setWeight(0.0); + taskByLitterEngine.setVehicleNo(request.getVehicleNo()); + taskByLitterEngine.setCreateTime(new Date()); + taskByLitterEngine.setUserName(null); + taskByLitterEngine.setGoodsId(null); + taskByLitterEngine.setGoodsName(null); + taskByLitterEngine.setOperateNum(0); + taskByLitterEngine.setTotalNum(0); + taskByLitterEngine.setTaskPriority(1); + taskByLitterEngine.setRemark1("空托垛入库"); + //开始向任务表中添加任务 + int addTask = taskMapper.addTask(taskByLitterEngine); + if(addTask > 0) { + return new ResponseEntity(0, "存在入库任务,申请成功"); + } + return new ResponseEntity(-1, "添加入库任务失败,网络连接异常,请稍后再试"); + } + } + + //处理条码信息 + request = dealCodeInformation(request); + if (request == null){ + log.error("条码错误,请查看日志!"); + return new ResponseEntity(-1, "请检查任务监控中是否已存在此母托的任务,如果存在请清除。不存在请检查此任务的母托号、机型或物料号是否在数据库中"); + } + + //正常入库 + //先根据点位判断是大托盘还是小托盘 + //小托盘是201,228(存放发动机和原料),大托盘是101(仅存放原材料) + if(request.getPoint().equals("201") || request.getPoint().equals("228")) { //小托盘 + //小托盘可以存放任意库位,但是还是按照123的顺序 + /* 查找一个空库位 */ + //客户要求原材料和成品分区存放,现设定成品为A,原材料为B + //所以找到wareArea为B的空闲库位 + //每个巷道要留出5%的空库位用于移库,424(22),424,336(17) + // 随机选择1号或2号巷道 + List tunnelIds = Arrays.asList(1, 2); + Collections.shuffle(tunnelIds); // 随机打乱顺序 + //int[] requiredEmptySlots = {22, 22, 17}; + int usefullNum = 2; + List useForKeepEmptyLocations = null; + for (int tunnelId : tunnelIds) { + //int requiredSlots = requiredEmptySlots[tunnelId - 1]; + Location useForKeepEmptyLocation = new Location(); + useForKeepEmptyLocation.setTunnelId(tunnelId); + useForKeepEmptyLocation.setLocationStatus(0); + useForKeepEmptyLocations = locationMapper.selLocations(useForKeepEmptyLocation); + int availableSlots = useForKeepEmptyLocations.size(); + + if (availableSlots >= 22) { + log.info("小托盘入库,巷道 {} 剩余空库位 {},满足要求。", tunnelId, availableSlots); + break; + } else { + log.info("小托盘入库,巷道 {} 剩余空库位 {},不足5%,尝试下一个巷道。", tunnelId, availableSlots); + usefullNum = usefullNum - 1; + } + } + // 如果1号和2号都不够,则选择3号 + if (usefullNum == 0) { + int tunnelId = 3; + Location useForKeepEmptyLocation = new Location(); + useForKeepEmptyLocation.setTunnelId(tunnelId); + useForKeepEmptyLocation.setLocationStatus(0); + useForKeepEmptyLocations = locationMapper.selLocations(useForKeepEmptyLocation); + int availableSlots = useForKeepEmptyLocations.size(); + if (availableSlots >= 17) { + log.info("原材料3巷道入库,剩余空库位 {},满足要求。", availableSlots); + } else { + log.info("原材料3巷道入库,所有巷道剩余空库位均不足5%,取消入库!"); + return new ResponseEntity(-1, String.format("没有多余空闲库位,取消入库,条码号:%s", request.getVehicleNo())); + } + } + Location emptyLocationItem = locationUtils.checkCanUse(useForKeepEmptyLocations); + if(emptyLocationItem == null) { + return new ResponseEntity(-1, "没有可用库位或者库位存在干涉,请稍后再试"); + } + //先判断是发动机还是原料,有机型的是发动机,没有的是原料 + if (request.getModel() == null || request.getModel().isEmpty()){//小托盘原材料 + //将codeMessage拆分 + String str = request.getCodeMessage(); + if (str == null || !str.contains("&")) { + log.error("小托盘条码格式错误"); + return new ResponseEntity(-1, "请确认条码格式"); + } + // 使用 "&" 进行拆分 + String[] parts = str.split("&"); + if (parts.length != 3) { + log.error("小托盘条码格式不符合预期"); + return new ResponseEntity(-1, "请确认条码格式"); + } + String goodsIdForUse = parts[0]; + int goodsNumForUse; + String goodsDateForUse = parts[2]; + + try { + goodsNumForUse = Integer.parseInt(parts[1]); + } catch (NumberFormatException e) { + log.error("数量解析失败", e); + return new ResponseEntity(-1, "数量解析失败,请确认条码格式"); + } + LocalDate date; + try { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); + date = LocalDate.parse(goodsDateForUse, formatter); + } catch (DateTimeParseException e) { + log.error("日期解析失败", e); + return new ResponseEntity(-1, "日期解析失败,请确认条码格式"); + } + // 该空库位可用,生成一个入库任务,并将库存表更新库位 + // 更新库位表,占掉库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(emptyLocationItem.getLocationId()); + updateLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + updateLocation.setVehicleId(request.getVehicleNo()); + locationMapper.modifyLocation(updateLocation); // 占掉库位 + // 添加入库任务 + Task taskByLitterMaterial = new Task(); + taskByLitterMaterial.setTaskId(UUID.randomUUID().toString()); + taskByLitterMaterial.setTaskType(TaskType.IN.getCode()); + taskByLitterMaterial.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskByLitterMaterial.setTaskGroup(UUID.randomUUID().toString()); + taskByLitterMaterial.setOrigin(request.getPoint()); + taskByLitterMaterial.setDestination(emptyLocationItem.getLocationId()); + taskByLitterMaterial.setPickStand("小"); + taskByLitterMaterial.setWeight(0.0); + taskByLitterMaterial.setVehicleNo(request.getVehicleNo()); + taskByLitterMaterial.setCreateTime(new Date()); + taskByLitterMaterial.setUserName("原材料"); + taskByLitterMaterial.setGoodsId(goodsIdForUse);//后面要将codeMessage拆成物料码和数量 + taskByLitterMaterial.setOperateNum(goodsNumForUse); + taskByLitterMaterial.setTotalNum(goodsNumForUse); + taskByLitterMaterial.setTaskPriority(1); + taskByLitterMaterial.setProductionDate(date); + taskByLitterMaterial.setRemark1("原材料"); + //开始向任务表中添加任务 + int addTask = taskMapper.addTask(taskByLitterMaterial); + if(addTask > 0) { + return new ResponseEntity(0, "存在入库任务,申请成功"); + } + return new ResponseEntity(-1, "添加入库任务失败,网络连接异常,请稍后再试"); + }else{//小托盘发动机 + //wcs会发两段过来,model作为机型,message作为序列号。其中卡特和柏金斯的发动机有区别,但是应该不影响 + // 在库存中查看是否存在该发动机序列号 + Stock queryStock = new Stock(); + queryStock.setBatchNo(request.getCodeMessage()); + List selForBatchNoIsExist = stockService.selStocks(queryStock); + if (!selForBatchNoIsExist.isEmpty()){ + return new ResponseEntity(-1, "该发动机序列号已经存在,无法入库!"); + } + // 该空库位可用,生成一个入库任务,并将库存表更新库位 + // 更新库位表,占掉库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(emptyLocationItem.getLocationId()); + updateLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + updateLocation.setVehicleId(request.getVehicleNo()); + locationMapper.modifyLocation(updateLocation); // 占掉库位 + // 添加入库任务 + Task taskByLitterEngine = new Task(); + taskByLitterEngine.setTaskId(UUID.randomUUID().toString()); + taskByLitterEngine.setTaskType(TaskType.IN.getCode()); + taskByLitterEngine.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskByLitterEngine.setTaskGroup(UUID.randomUUID().toString()); + taskByLitterEngine.setOrigin(request.getPoint()); + taskByLitterEngine.setDestination(emptyLocationItem.getLocationId()); + //taskByLitterEngine.setDestination("A-03-11-D-4"); + taskByLitterEngine.setPickStand("小"); + taskByLitterEngine.setWeight(0.0); + taskByLitterEngine.setVehicleNo(request.getVehicleNo()); + taskByLitterEngine.setCreateTime(new Date()); + taskByLitterEngine.setUserName("发动机成品"); + taskByLitterEngine.setGoodsId(request.getCodeMessage());//序列号 + taskByLitterEngine.setGoodsName(request.getModel());//机型 + taskByLitterEngine.setOperateNum(1); + taskByLitterEngine.setTotalNum(1); + taskByLitterEngine.setTaskPriority(1); + taskByLitterEngine.setRemark1("成品"); + //开始向任务表中添加任务 + int addTask = taskMapper.addTask(taskByLitterEngine); + if(addTask > 0) { + return new ResponseEntity(0, "存在入库任务,申请成功"); + } + return new ResponseEntity(-1, "添加入库任务失败,网络连接异常,请稍后再试"); + } + } else if (request.getPoint().equals("101") || request.getPoint().equals("104")) {//大托盘只能用于存放原材料 + //大托盘只可以存放3巷道,且按照列倒序查找库位 + //客户要求原材料和成品分区存放,现设定成品为A,原材料为B + //所以找到wareArea为B的空闲库位 + //每个巷道要留出5%的空库位用于移库,424(22),424,336(17) + /* 查找一个空库位 */ + Location emptyLocation = new Location(); + emptyLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + emptyLocation.setTunnelId(3); + List emptyLocations = locationMapper.selLocationsByDesc(emptyLocation); + if(emptyLocations == null) { + return new ResponseEntity(-1, "库位查找失败,网络连接异常,请稍后再试"); + } + if (emptyLocations.size() < 17){ + return new ResponseEntity(-1, "空闲库位不足5%,取消入库"); + } +// List filteredLocations = emptyLocations.stream() +// .filter(location -> "B".equals(location.getWareArea())) +// .toList(); +// if(filteredLocations.isEmpty()){ +// return new ResponseEntity(-1, "没有可用库位"); +// } + Location emptyLocationItem = locationUtils.checkCanUse(emptyLocations); + if(emptyLocationItem == null) { + return new ResponseEntity(-1, "没有可用库位或者库位存在干涉,请稍后再试"); + } + //将codeMessage拆分 + String str = request.getCodeMessage(); + if (str == null || !str.contains("&")) { + log.error("条码格式错误"); + return new ResponseEntity(-1, "请确认条码格式"); + } + // 使用 "&" 进行拆分 + String[] parts = str.split("&"); + if (parts.length != 3) { + log.error("条码格式不符合预期"); + return new ResponseEntity(-1, "请确认条码格式"); + } + String goodsIdForUse = parts[0]; + int goodsNumForUse; + String goodsDateForUse = parts[2]; + + try { + goodsNumForUse = Integer.parseInt(parts[1]); + } catch (NumberFormatException e) { + log.error("数量解析失败", e); + return new ResponseEntity(-1, "数量解析失败,请确认条码格式"); + } + LocalDate date; + try { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); + date = LocalDate.parse(goodsDateForUse, formatter); + } catch (DateTimeParseException e) { + log.error("日期解析失败", e); + return new ResponseEntity(-1, "日期解析失败,请确认条码格式"); + } + // 该空库位可用,生成一个入库任务,并将库存表更新库位 + // 更新库位表,占掉库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(emptyLocationItem.getLocationId()); + updateLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + updateLocation.setVehicleId(request.getVehicleNo()); + locationMapper.modifyLocation(updateLocation); // 占掉库位 + // 添加入库任务 + Task taskByBigMaterial = new Task(); + taskByBigMaterial.setTaskId(UUID.randomUUID().toString()); + taskByBigMaterial.setTaskType(TaskType.IN.getCode()); + taskByBigMaterial.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskByBigMaterial.setTaskGroup(UUID.randomUUID().toString()); + taskByBigMaterial.setOrigin(request.getPoint()); + taskByBigMaterial.setDestination(emptyLocationItem.getLocationId()); + taskByBigMaterial.setPickStand("大"); + taskByBigMaterial.setWeight(0.0); + taskByBigMaterial.setVehicleNo(request.getVehicleNo()); + taskByBigMaterial.setCreateTime(new Date()); + taskByBigMaterial.setUserName("原材料"); + taskByBigMaterial.setGoodsId(goodsIdForUse); + taskByBigMaterial.setOperateNum(goodsNumForUse); + taskByBigMaterial.setTotalNum(goodsNumForUse); + taskByBigMaterial.setTaskPriority(1); + taskByBigMaterial.setProductionDate(date); + taskByBigMaterial.setRemark1("原材料"); + //开始向任务表中添加任务 + int addTask = taskMapper.addTask(taskByBigMaterial); + if(addTask > 0) { + return new ResponseEntity(0, "存在入库任务,申请成功"); + } + return new ResponseEntity(-1, "添加入库任务失败,网络连接异常,请稍后再试"); + } + return new ResponseEntity(999, "错误的入库点位" + request.getPoint(), null); + }catch (Exception e){ + log.info("入库申请失败,出现异常,请稍后再试"); + return new ResponseEntity(-1, "入库申请失败,网络连接异常,请稍后再试"); + } + } + + /** + * 收到 wcs 返回的任务状态 + * @param wmsReceiveTaskResultEntity wcs请求值 + * @return 返回的信息 + */ + @PostMapping("/sendTaskResult") + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public ResponseEntity receiveTaskResult(@RequestBody @Validated WmsReceiveTaskResultEntity wmsReceiveTaskResultEntity) { + try{ + log.info("接收到任务反馈1:{},ip地址:{}", wmsReceiveTaskResultEntity.toLoggerString(), HttpUtils.getIpAddr(servletRequest)); + // 获取任务号 + String taskId = wmsReceiveTaskResultEntity.getTaskId(); + Integer taskStatus = wmsReceiveTaskResultEntity.getTaskStatus(); + String vehicleNo = wmsReceiveTaskResultEntity.getVehicleNo(); + if (taskId == null){ + log.info("获取任务号失败"); + } + log.info("获取任务号成功"); + // 查找对应任务 + Task taskForQuery = new Task(); + taskForQuery.setTaskId(taskId); + List tasks = taskService.selTasks(taskForQuery); + if(tasks == null || tasks.isEmpty()) { + log.info("没有找到对应的任务"); + return new ResponseEntity(-1, "没有找到对应的任务"); + } + Task task = tasks.get(0); + if(taskStatus.equals(WmsTaskStatus.RUN.getCode())) { // 任务开始执行 + log.info("任务开始执行"); + return new ResponseEntity(0, "任务开始执行"); + } + if(taskStatus.equals(WmsTaskStatus.FINISH.getCode())) { // 任务完成 + boolean completedTask = taskOperation.completeTask(task); + if(!completedTask) { + log.info("任务完成失败"); + return new ResponseEntity(-1, "任务完成失败,请稍后再试"); + } + log.info("任务完成成功"); + return new ResponseEntity(0, "任务完成成功"); + } + if(taskStatus.equals(WmsTaskStatus.CANCEL.getCode())) { // 任务取消 + boolean cancelledTask = taskOperation.cancelTask(task); + if(!cancelledTask) { + return new ResponseEntity(-1, "任务取消失败,请稍后再试"); + } + return new ResponseEntity(0, "任务取消成功"); + } + log.info("不处理的状态"); + return new ResponseEntity(0, "不处理的状态"); + }catch (Exception e){ + log.error("接收到任务反馈失败,ip地址:{}", HttpUtils.getIpAddr(servletRequest), e); + return new ResponseEntity(-1, "接收到任务反馈失败,请稍后再试"); + } + + } +} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/com/wms/entity/.DS_Store b/src/main/java/com/wms/entity/.DS_Store new file mode 100644 index 0000000..abab42a Binary files /dev/null and b/src/main/java/com/wms/entity/.DS_Store differ diff --git a/src/main/java/com/wms/entity/BaseEntity.java b/src/main/java/com/wms/entity/BaseEntity.java new file mode 100644 index 0000000..36ab926 --- /dev/null +++ b/src/main/java/com/wms/entity/BaseEntity.java @@ -0,0 +1,9 @@ +package com.wms.entity; + +import com.alibaba.fastjson2.JSON; + +public class BaseEntity { + public String toLoggerString() { + return JSON.toJSONString(this); + } +} diff --git a/src/main/java/com/wms/entity/app/FinishPickTaskRequest.java b/src/main/java/com/wms/entity/app/FinishPickTaskRequest.java new file mode 100644 index 0000000..77377bd --- /dev/null +++ b/src/main/java/com/wms/entity/app/FinishPickTaskRequest.java @@ -0,0 +1,139 @@ +package com.wms.entity.app; + +/** + * 完成当前载具拣货任务实体类 + */ +public class FinishPickTaskRequest { + /** + * 任务id + */ + private String taskId; + /** + * 卡特任务id + */ + private String kateTaskId; + /** + * 料盒号 + */ + private String boxNo; + /** + * 零件号 + */ + private String partNo; + /** + * 需求/分配数量 + */ + private Integer needNum; + /** + * 实际库存 + */ + private Integer realNum; + /** + * 实际拣货数量 + */ + private Integer realPickNum; + /** + * 载具号 + */ + private String vehicleNo; + /** + * 出库数量 + */ + private Integer goodsNum; + /** + * 重量 + */ + private Double weight; + /** + * 拣选数量 + */ + private Integer pickNum; + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public String getKateTaskId() { + return kateTaskId; + } + + public void setKateTaskId(String kateTaskId) { + this.kateTaskId = kateTaskId; + } + + public String getBoxNo() { + return boxNo; + } + + public void setBoxNo(String boxNo) { + this.boxNo = boxNo; + } + + public String getPartNo() { + return partNo; + } + + public void setPartNo(String partNo) { + this.partNo = partNo; + } + + public Integer getNeedNum() { + return needNum; + } + + public void setNeedNum(Integer needNum) { + this.needNum = needNum; + } + + public Integer getRealNum() { + return realNum; + } + + public void setRealNum(Integer realNum) { + this.realNum = realNum; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public Integer getRealPickNum() { + return realPickNum; + } + + public void setRealPickNum(Integer realPickNum) { + this.realPickNum = realPickNum; + } + + public Integer getGoodsNum() { + return goodsNum; + } + + public void setGoodsNum(Integer goodsNum) { + this.goodsNum = goodsNum; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public Integer getPickNum() { + return pickNum; + } + + public void setPickNum(Integer pickNum) { + this.pickNum = pickNum; + } +} diff --git a/src/main/java/com/wms/entity/app/FinishVehicleAndPartRequest.java b/src/main/java/com/wms/entity/app/FinishVehicleAndPartRequest.java new file mode 100644 index 0000000..0b57214 --- /dev/null +++ b/src/main/java/com/wms/entity/app/FinishVehicleAndPartRequest.java @@ -0,0 +1,31 @@ +package com.wms.entity.app; + +/** + * 完成当前载具的当次拣货任务 + */ +public class FinishVehicleAndPartRequest { + /** + * wms任务号 + */ + private String wmsTaskId; + /** + * 实际拣货数量 + */ + private Integer realPickNum; + + public String getWmsTaskId() { + return wmsTaskId; + } + + public void setWmsTaskId(String wmsTaskId) { + this.wmsTaskId = wmsTaskId; + } + + public Integer getRealPickNum() { + return realPickNum; + } + + public void setRealPickNum(Integer realPickNum) { + this.realPickNum = realPickNum; + } +} diff --git a/src/main/java/com/wms/entity/app/InventoryTask.java b/src/main/java/com/wms/entity/app/InventoryTask.java new file mode 100644 index 0000000..bba21a6 --- /dev/null +++ b/src/main/java/com/wms/entity/app/InventoryTask.java @@ -0,0 +1,57 @@ +package com.wms.entity.app; + +import com.wms.entity.BaseEntity; + +/** + * 盘点任务信息 + */ +public class InventoryTask extends BaseEntity { + /** + * 零件号 + */ + private String goodsId; + /** + * 料箱号 + */ + private String vehicleId; + /** + * 库区id + */ + private String areaId; + /** + * 用户 + */ + private String userName; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getVehicleId() { + return vehicleId; + } + + public void setVehicleId(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getAreaId() { + return areaId; + } + + public void setAreaId(String areaId) { + this.areaId = areaId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/src/main/java/com/wms/entity/app/LayerLocation.java b/src/main/java/com/wms/entity/app/LayerLocation.java new file mode 100644 index 0000000..956a04f --- /dev/null +++ b/src/main/java/com/wms/entity/app/LayerLocation.java @@ -0,0 +1,36 @@ +package com.wms.entity.app; + +import com.wms.entity.table.Location; + +import java.util.List; + +/** + * 按层划分的库位实体类 + */ +public class LayerLocation { + /** + * 当前层 + */ + private Integer layer; + + /** + * 当前层的所有库位 + */ + private List currentColLocations; + + public Integer getLayer() { + return layer; + } + + public void setLayer(Integer layer) { + this.layer = layer; + } + + public List getCurrentColLocations() { + return currentColLocations; + } + + public void setCurrentColLocations(List currentColLocations) { + this.currentColLocations = currentColLocations; + } +} diff --git a/src/main/java/com/wms/entity/app/MenuEntity.java b/src/main/java/com/wms/entity/app/MenuEntity.java new file mode 100644 index 0000000..a779176 --- /dev/null +++ b/src/main/java/com/wms/entity/app/MenuEntity.java @@ -0,0 +1,70 @@ +package com.wms.entity.app; + +import java.util.List; + +public class MenuEntity { + /** + * 菜单Id + */ + private String id; + + /** + * 菜单名称 + */ + private String labelName; + + /** + * 图标值 + */ + private String iconValue; + + /** + * 地址 + */ + private String path; + + /** + * 子菜单 + */ + private List children; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getLabelName() { + return labelName; + } + + public void setLabelName(String labelName) { + this.labelName = labelName; + } + + public String getIconValue() { + return iconValue; + } + + public void setIconValue(String iconValue) { + this.iconValue = iconValue; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public List getChildren() { + return children; + } + + public void setChildren(List children) { + this.children = children; + } +} diff --git a/src/main/java/com/wms/entity/app/ResponseEntity.java b/src/main/java/com/wms/entity/app/ResponseEntity.java new file mode 100644 index 0000000..53053e2 --- /dev/null +++ b/src/main/java/com/wms/entity/app/ResponseEntity.java @@ -0,0 +1,62 @@ +package com.wms.entity.app; + +import com.wms.entity.BaseEntity; + +/** + * 接口响应实体类 + */ +public class ResponseEntity extends BaseEntity { + + public ResponseEntity(Integer code, String message) { + this.code = code; + this.message = message; + } + + public ResponseEntity(Integer code, String message, Object returnData) { + this.code = code; + this.message = message; + this.returnData = returnData; + } + + public ResponseEntity() { + } + + /** + * 响应代码 + */ + private Integer code; + + /** + * 错误信息 + */ + private String message; + + /** + * 返回数据(非必须) + */ + private Object returnData; + + public Integer getCode() { + return code; + } + + public void setCode(Integer code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public Object getReturnData() { + return returnData; + } + + public void setReturnData(Object returnData) { + this.returnData = returnData; + } +} diff --git a/src/main/java/com/wms/entity/app/RowLocation.java b/src/main/java/com/wms/entity/app/RowLocation.java new file mode 100644 index 0000000..d90d50a --- /dev/null +++ b/src/main/java/com/wms/entity/app/RowLocation.java @@ -0,0 +1,34 @@ +package com.wms.entity.app; + +import java.util.List; + +/** + * 排 + */ +public class RowLocation { + /** + * 当前排 + */ + private Integer row; + + /** + * 当前排的所有库位 + */ + private List currentLayerLocations; + + public Integer getRow() { + return row; + } + + public void setRow(Integer row) { + this.row = row; + } + + public List getCurrentLayerLocations() { + return currentLayerLocations; + } + + public void setCurrentLayerLocations(List currentLayerLocations) { + this.currentLayerLocations = currentLayerLocations; + } +} diff --git a/src/main/java/com/wms/entity/app/TaskInRequestEntity.java b/src/main/java/com/wms/entity/app/TaskInRequestEntity.java new file mode 100644 index 0000000..bd54e4a --- /dev/null +++ b/src/main/java/com/wms/entity/app/TaskInRequestEntity.java @@ -0,0 +1,166 @@ +package com.wms.entity.app; + +import com.wms.entity.BaseEntity; + +import java.util.Date; + +/** + * WMS接收入库任务的接口实体类 + */ +public class TaskInRequestEntity extends BaseEntity { + /** + * 物料编号 + */ + private String goodsId; + + /** + * 批次号 + */ + private String batchNo; + + /** + * 入库数量 + */ + private Integer goodsNum; + + /** + * 入库日期/生产日期 + */ + private Date productionDate; + + /** + * 托盘号 + */ + private String vehicleNo; + + /** + * 尺寸 + */ + private Integer vehicleSize; + + /** + * 重量 + */ + private Double weight; + + /** + * 起始位置 + */ + private String origin; + + /** + * 目标位置 + */ + private String destination; + + /** + * 入库库位类型:是否为虚拟库位 0:虚拟库位;1:真实库位 + */ + private String isVirtual; + + /** + * 是否空箱入库 0:空箱入库;1:带料入库 + */ + private String isEmpty; + + /** + * 用户 + */ + private String userName; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getBatchNo() { + return batchNo; + } + + public void setBatchNo(String batchNo) { + this.batchNo = batchNo; + } + + public Integer getGoodsNum() { + return goodsNum; + } + + public void setGoodsNum(Integer goodsNum) { + this.goodsNum = goodsNum; + } + + public Date getProductionDate() { + return productionDate; + } + + public void setProductionDate(Date productionDate) { + this.productionDate = productionDate; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getDestination() { + return destination; + } + + public void setDestination(String destination) { + this.destination = destination; + } + + public Integer getVehicleSize() { + return vehicleSize; + } + + public void setVehicleSize(Integer vehicleSize) { + this.vehicleSize = vehicleSize; + } + + public String getIsVirtual() { + return isVirtual; + } + + public void setIsVirtual(String isVirtual) { + this.isVirtual = isVirtual; + } + + public String getIsEmpty() { + return isEmpty; + } + + public void setIsEmpty(String isEmpty) { + this.isEmpty = isEmpty; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/src/main/java/com/wms/entity/app/TaskOutRequestEntity.java b/src/main/java/com/wms/entity/app/TaskOutRequestEntity.java new file mode 100644 index 0000000..f505193 --- /dev/null +++ b/src/main/java/com/wms/entity/app/TaskOutRequestEntity.java @@ -0,0 +1,57 @@ +package com.wms.entity.app; + +import com.wms.entity.BaseEntity; + +/** + * 前台向后台发送出库请求实体类 + */ +public class TaskOutRequestEntity extends BaseEntity { + /** + * 物料编号 + */ + private String goodsId; + /** + * 需求数量 + */ + private Integer needNum; + /** + * 载具编号 + */ + private String vehicleNo; + /** + * 用户名称 + */ + private String userName; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public Integer getNeedNum() { + return needNum; + } + + public void setNeedNum(Integer needNum) { + this.needNum = needNum; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } +} diff --git a/src/main/java/com/wms/entity/app/UserConfigEntity.java b/src/main/java/com/wms/entity/app/UserConfigEntity.java new file mode 100644 index 0000000..b09116c --- /dev/null +++ b/src/main/java/com/wms/entity/app/UserConfigEntity.java @@ -0,0 +1,34 @@ +package com.wms.entity.app; + +import com.wms.entity.table.User; +import com.wms.entity.BaseEntity; + +import java.util.List; + +public class UserConfigEntity extends BaseEntity { + /** + * 用户认证信息 + */ + private User user; + + /** + * 菜单及各种按钮信息 + */ + private List menuList; + + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + public List getMenuList() { + return menuList; + } + + public void setMenuList(List menuList) { + this.menuList = menuList; + } +} diff --git a/src/main/java/com/wms/entity/app/container/ContainerApiLocalResponse.java b/src/main/java/com/wms/entity/app/container/ContainerApiLocalResponse.java new file mode 100644 index 0000000..5ec7700 --- /dev/null +++ b/src/main/java/com/wms/entity/app/container/ContainerApiLocalResponse.java @@ -0,0 +1,42 @@ +package com.wms.entity.app.container; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * 给四向车服务的通用返回类 + */ +@Data +public class ContainerApiLocalResponse { + + public ContainerApiLocalResponse(String code, String message) { + this.code = code; + this.message = message; + } + + public ContainerApiLocalResponse(String code, String wmsTaskId, String message) { + this.code = code; + this.wmsTaskId = wmsTaskId; + this.message = message; + } + + /** + * 响应代码 + */ + @JsonProperty("code") + private String code; + + /** + * wms 任务号 + */ + @JsonProperty("wmstaskid") + private String wmsTaskId; + + /** + * 响应信息 + */ + @JsonProperty("message") + private String message; + + +} diff --git a/src/main/java/com/wms/entity/app/container/CreateInstoreTaskRequest.java b/src/main/java/com/wms/entity/app/container/CreateInstoreTaskRequest.java new file mode 100644 index 0000000..86194c7 --- /dev/null +++ b/src/main/java/com/wms/entity/app/container/CreateInstoreTaskRequest.java @@ -0,0 +1,56 @@ +package com.wms.entity.app.container; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; +import lombok.Data; + +/** + * 四向车扫码入库的请求 + */ +@Data +public class CreateInstoreTaskRequest { + + /** + * 请求号 + */ + @NotBlank(message = "请求号不允许为空") + @JsonProperty("requestid") + private String requestId; + + /** + * 密钥 + */ + @NotBlank(message = "密钥不允许为空") + @JsonProperty("key") + private String key; + + /** + * 托盘号 + */ + @NotBlank(message = "托盘号不允许为空") + @JsonProperty("palletno") + private String palletNo; + + /** + * 长 + */ + @Pattern(regexp = "^\\d+$", message = "长不允许为空或者为非数字") + @JsonProperty("height") + private String height; + + /** + * 宽 + */ + @Pattern(regexp = "^\\d+$", message = "宽不允许为空或者为非数字") + @JsonProperty("weight") + private String weight; + + /** + * 起点位置 + */ + @NotBlank(message = "起点位置不允许为空") + @JsonProperty("fromcellno") + private String fromCellNo; + +} diff --git a/src/main/java/com/wms/entity/app/container/CreateInstoreTaskResponse.java b/src/main/java/com/wms/entity/app/container/CreateInstoreTaskResponse.java new file mode 100644 index 0000000..2808b93 --- /dev/null +++ b/src/main/java/com/wms/entity/app/container/CreateInstoreTaskResponse.java @@ -0,0 +1,57 @@ +package com.wms.entity.app.container; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * 四向车扫码入库的接口的返回响应 + */ +@Data +public class CreateInstoreTaskResponse { + + public CreateInstoreTaskResponse(String code, String message) { + this.code = code; + this.message = message; + } + + public CreateInstoreTaskResponse() { + } + + /** + * 响应代码 + */ + @JsonProperty("code") + private String code; + + /** + * wms 任务号 + */ + @JsonProperty("wmstaskid") + private String wmsTaskId; + + /** + * 载具号 + */ + @JsonProperty("palletno") + private String palletNo; + + /** + * 起始位置 + */ + @JsonProperty("fromcellno") + private String fromCellNo; + + /** + * 目的位置 + */ + @JsonProperty("tocellno") + private String toCellNo; + + /** + * 信息 + */ + @JsonProperty("message") + private String message; + + +} diff --git a/src/main/java/com/wms/entity/app/container/SendContainerTaskRequest.java b/src/main/java/com/wms/entity/app/container/SendContainerTaskRequest.java new file mode 100644 index 0000000..bd1f11d --- /dev/null +++ b/src/main/java/com/wms/entity/app/container/SendContainerTaskRequest.java @@ -0,0 +1,57 @@ +package com.wms.entity.app.container; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * 发送四向车任务的请求类 + */ +@Data +public class SendContainerTaskRequest { + + /** + * 请求号 + */ + @JsonProperty("requestid") + private String requestid; + + /** + * 秘钥 + */ + @JsonProperty("key") + private String key; + + /** + * wms任务号 + */ + @JsonProperty("wmstaskid") + private String wmstaskid; + + /** + * 容器号 + */ + @JsonProperty("palletno") + private String palletno; + + /** + * 源点 + */ + @JsonProperty("fromcellno") + private String fromcellno; + + /** + * 目的点 + */ + @JsonProperty("tocellno") + private String tocellno; + + /** + * 任务类型 + */ + @JsonProperty("tasktype") + private String tasktype; + + + + +} diff --git a/src/main/java/com/wms/entity/app/container/TaskStateNoticeRequest.java b/src/main/java/com/wms/entity/app/container/TaskStateNoticeRequest.java new file mode 100644 index 0000000..8f5d818 --- /dev/null +++ b/src/main/java/com/wms/entity/app/container/TaskStateNoticeRequest.java @@ -0,0 +1,39 @@ +package com.wms.entity.app.container; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotBlank; +import lombok.Data; + +@Data +public class TaskStateNoticeRequest { + + /** + * 请求ID + */ + @NotBlank + @JsonProperty("requestid") + private String requestId; + + /** + * 密钥 + */ + @NotBlank + @JsonProperty("key") + private String key; + + /** + * wms任务号 + */ + @NotBlank + @JsonProperty("wmstaskid") + private String wmsTaskId; + + /** + * 任务状态 + */ + @NotBlank + @JsonProperty("taskstate") + private String taskState; + +} diff --git a/src/main/java/com/wms/entity/app/display/LocationData.java b/src/main/java/com/wms/entity/app/display/LocationData.java new file mode 100644 index 0000000..2c9f2b9 --- /dev/null +++ b/src/main/java/com/wms/entity/app/display/LocationData.java @@ -0,0 +1,55 @@ +package com.wms.entity.app.display; + +/** + * 大屏用数据详细类 + */ +public class LocationData { + /** + * 零件号 + */ + private String goodsId; + /** + * 零件名称 + */ + private String goodsName; + /** + * 数量 + */ + private Integer goodsNum; + /** + * 备注 + */ + private String remark; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public Integer getGoodsNum() { + return goodsNum; + } + + public void setGoodsNum(Integer goodsNum) { + this.goodsNum = goodsNum; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/src/main/java/com/wms/entity/app/display/LocationInfo.java b/src/main/java/com/wms/entity/app/display/LocationInfo.java new file mode 100644 index 0000000..10eeee1 --- /dev/null +++ b/src/main/java/com/wms/entity/app/display/LocationInfo.java @@ -0,0 +1,45 @@ +package com.wms.entity.app.display; + +import java.util.List; + +/** + * 大屏用库位信息 + */ +public class LocationInfo { + /** + * 库位编号 + */ + private String locationId; + /** + * 料箱号 + */ + private String vehicleNo; + /** + * 详细数据 + */ + private List locationData; + + public String getLocationId() { + return locationId; + } + + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public List getLocationData() { + return locationData; + } + + public void setLocationData(List locationData) { + this.locationData = locationData; + } +} diff --git a/src/main/java/com/wms/entity/app/mes/CheckNoticeRequest.java b/src/main/java/com/wms/entity/app/mes/CheckNoticeRequest.java new file mode 100644 index 0000000..bbe310e --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/CheckNoticeRequest.java @@ -0,0 +1,35 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotBlank; +import lombok.Data; + +/** + * 盘点通知单请求类 + */ +@Data +public class CheckNoticeRequest { + + /** + * 唯一识别码 + */ + @JsonProperty("guid") + @NotBlank(message = "唯一识别码不允许为空或者空字符串") + private String guid; + + /** + * 盘点单号 + */ + @JsonProperty("InventoryNo") + @NotBlank(message = "盘点单号不允许为空或者空字符串") + private String inventoryNo; + + /** + * 盘点库别 + */ + @JsonProperty("IWarehouse") + @NotBlank(message = "盘点库别不允许为空或者空字符串") + private String iWarehouse; + + +} diff --git a/src/main/java/com/wms/entity/app/mes/MesApiLocalResponse.java b/src/main/java/com/wms/entity/app/mes/MesApiLocalResponse.java new file mode 100644 index 0000000..7b3372e --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/MesApiLocalResponse.java @@ -0,0 +1,29 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * mes 接口的返回类,本地响应给 Mes 用的 + */ +@Data +public class MesApiLocalResponse { + + public MesApiLocalResponse(Integer transFlag, String errorMessage) { + this.transFlag = transFlag; + this.errorMessage = errorMessage; + } + + /** + * 响应编号:1 - 成功;0 - 失败 + */ + @JsonProperty("TransFlag") + private Integer transFlag; + + /** + * 返回的信息 + */ + @JsonProperty("ErrorMessage") + private String errorMessage; + +} diff --git a/src/main/java/com/wms/entity/app/mes/OutNoticeRequest.java b/src/main/java/com/wms/entity/app/mes/OutNoticeRequest.java new file mode 100644 index 0000000..2052d5a --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/OutNoticeRequest.java @@ -0,0 +1,68 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; +import lombok.Data; + +import java.util.List; + +/** + * Mes 出货通单请求信息 + */ +@Data +public class OutNoticeRequest { + + /** + * 唯一识别码 + */ + @NotBlank(message = "唯一识别码不允许为空或者空字符串") + @JsonProperty("guid") + private String guid; + + /** + * 出库通知单号 + */ + @NotBlank(message = "发货通知单不允许为空或者空字符串") + @JsonProperty("TransferNo") + private String transferNo; + + /** + * 源库别 + */ + @NotBlank(message = "源库别不允许为空或者空字符串") + @JsonProperty("FWarehouse") + private String fWarehouse; + + /** + * 目的库别 + */ + //@NotBlank(message = "目的库别不允许为空或者空字符串") + @JsonProperty("Twarehouse") + private String tWarehouse; + + /** + * 出库类型 + */ + @NotNull(message = "类型不允许为空") + @JsonProperty("Type") + private Integer type; + + + /** + * 计划交货日期 + */ + @NotBlank(message = "计划交货日不允许为空或者空字符串") + @JsonProperty("RDate") + private String rDate; + + /** + * 行信息 + */ + @NotEmpty(message = "行信息不允许为空") + @JsonProperty("Row") + private OutNoticeRequestRow[] row; + +} diff --git a/src/main/java/com/wms/entity/app/mes/OutNoticeRequestRow.java b/src/main/java/com/wms/entity/app/mes/OutNoticeRequestRow.java new file mode 100644 index 0000000..2f986e7 --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/OutNoticeRequestRow.java @@ -0,0 +1,47 @@ +package com.wms.entity.app.mes; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.Pattern; +import lombok.Data; + +/** + * 发货通知单行信息 + */ +@Data +public class OutNoticeRequestRow { + + /** + * 行号 + */ + @Pattern(regexp = "^\\d+$", message = "行号必须为数字") + @JsonProperty("TransferLine") + private String transferLine; + + /** + * 料号 + */ + @NotBlank(message = "料号不允许为空或者空字符串") + @JsonProperty("ItemCode") + private String itemCode; + + /** + * 数量?????? + */ + //@Pattern(regexp = "^\\\\d*(\\\\.\\\\d+)?$", message = "数量必须为数字") + //@Pattern(regexp = "^\\d+$", message = "数量必须为数字") + @JsonProperty("Qty") + private String qty; +// @Pattern(regexp = ".*", message = "数量必须为字符串") +// @JsonProperty("Qty") +// private String qty; + + + /** + * 单位 + */ + @NotBlank(message = "单位不允许为空或者空字符串") + @JsonProperty("Unit") + private String unit; +} diff --git a/src/main/java/com/wms/entity/app/mes/ReceiptInRequest.java b/src/main/java/com/wms/entity/app/mes/ReceiptInRequest.java new file mode 100644 index 0000000..14a4ca9 --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/ReceiptInRequest.java @@ -0,0 +1,71 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; +import lombok.Data; + +/** + * Mes 推送入库信息的实体 + */ +@Data +public class ReceiptInRequest { + + /** + * 唯一识别码 + */ + @JsonProperty("guid") + @NotBlank(message = "唯一识别码不允许为空或者空字符串") + private String guid; + + /** + * 入库类型 + * 1-原料入库 + * 2-半成品入库 + * 3-成品入库 + * 4-销售退货入库 + * 5-其他入库 + */ + @JsonProperty("Type") + @NotNull(message = "入库类型不允许为空") + private Integer type; + + /** + * 批次号 + */ + @JsonProperty("Losnr") + //@NotBlank(message = "批次号不允许为空") + public String losnr; + + /** + * 载具号 + */ + @JsonProperty("VehicleNo") + public String vehicleNo; + + /** + * 料号 + */ + @JsonProperty("ItemCode") + @NotBlank(message = "料号不允许为空") + public String itemCode; + + /** + * 数量 + */ + @JsonProperty("LotQty") + @NotNull(message = "数量不允许为空") + //@Pattern(regexp = "^\\d+$", message = "数量必须为数字") + //@Pattern(regexp = "^\\\\d*(\\\\.\\\\d+)?$", message = "数量必须为数字") + //@Pattern(regexp = "^\\d*(\\.\\d+)?$", message = "数量必须为有效的数字字符串") + public String lotQty; + + /** + * 库别 + */ + @JsonProperty("Warehouse") + @NotBlank(message = "库别不允许为空") + public String warehouse; + +} diff --git a/src/main/java/com/wms/entity/app/mes/SendMesGoodsInventoryRequest.java b/src/main/java/com/wms/entity/app/mes/SendMesGoodsInventoryRequest.java new file mode 100644 index 0000000..cf32d22 --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/SendMesGoodsInventoryRequest.java @@ -0,0 +1,26 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +/** + * 发送mes 盘点执行 + */ +@Data +public class SendMesGoodsInventoryRequest { + + @JsonProperty("guid") + private String guid; + + @JsonProperty("InventoryNo") + private String inventoryNo; + + @JsonProperty("Row") + private List row; + + +} + + diff --git a/src/main/java/com/wms/entity/app/mes/SendMesGoodsInventoryRow.java b/src/main/java/com/wms/entity/app/mes/SendMesGoodsInventoryRow.java new file mode 100644 index 0000000..2e90e21 --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/SendMesGoodsInventoryRow.java @@ -0,0 +1,20 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + + +@Data +public class SendMesGoodsInventoryRow { + + @JsonProperty("Losnr") + private String losnr; + + @JsonProperty("LotQty") + private String lotQty; + + @JsonProperty("Warehouse") + private String warehouse; + + +} diff --git a/src/main/java/com/wms/entity/app/mes/SendMesGoodsMoveRequest.java b/src/main/java/com/wms/entity/app/mes/SendMesGoodsMoveRequest.java new file mode 100644 index 0000000..de048c8 --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/SendMesGoodsMoveRequest.java @@ -0,0 +1,29 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * 发送mes移库完成 + */ +@Data +public class SendMesGoodsMoveRequest { + + @JsonProperty("guid") + private String guid; + + @JsonProperty("Losnr") + private String losnr; + + @JsonProperty("LotQty") + private String lotQty; + + @JsonProperty("FBinCOde") + private String fBinCode; + + @JsonProperty("TBinCode") + private String tBinCode; + + + +} diff --git a/src/main/java/com/wms/entity/app/mes/SendMesPutInGoodsRequest.java b/src/main/java/com/wms/entity/app/mes/SendMesPutInGoodsRequest.java new file mode 100644 index 0000000..cce0bc2 --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/SendMesPutInGoodsRequest.java @@ -0,0 +1,43 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * 入库发送 mes + */ +@Data +public class SendMesPutInGoodsRequest { + + /** + * 唯一号 + */ + @JsonProperty("guid") + private String guid; + + /** + * 批次号 + */ + @JsonProperty("Losnr") + private String losnr; + + /** + * 料号 + */ + @JsonProperty("ItemCode") + private String itemCode; + + /** + * 数量 + */ + @JsonProperty("LotQty") + private String lotQty; + + /** + * 库位 + */ + @JsonProperty("BinCode") + private String binCode; + + +} diff --git a/src/main/java/com/wms/entity/app/mes/SendMesPutOutGoodsRequest.java b/src/main/java/com/wms/entity/app/mes/SendMesPutOutGoodsRequest.java new file mode 100644 index 0000000..3e670b7 --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/SendMesPutOutGoodsRequest.java @@ -0,0 +1,27 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +/** + * 发送mes出库信息 + */ +@Data +public class SendMesPutOutGoodsRequest { + + @JsonProperty("guid") + private String guid; + + @JsonProperty("TransferNo") + private String transferNo; + + @JsonProperty("Type") + private int type; + + @JsonProperty("Row") + private List row; + + +} diff --git a/src/main/java/com/wms/entity/app/mes/SendMesPutOutGoodsRow.java b/src/main/java/com/wms/entity/app/mes/SendMesPutOutGoodsRow.java new file mode 100644 index 0000000..c304c9d --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/SendMesPutOutGoodsRow.java @@ -0,0 +1,31 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class SendMesPutOutGoodsRow { + + //行号 + @JsonProperty("TransferLine") + private String transferLine; + + //批次 + @JsonProperty("Losnr") + private String losnr; + + //数量 + @JsonProperty("LotQty") + private String lotQty; + + //箱号 + @JsonProperty("VehicleNo") + private String vehicleNo; + + //仓库 + @JsonProperty("Warehouse") + private String warehouse; + + + +} diff --git a/src/main/java/com/wms/entity/app/mes/SendMesStockRequest.java b/src/main/java/com/wms/entity/app/mes/SendMesStockRequest.java new file mode 100644 index 0000000..2d9397f --- /dev/null +++ b/src/main/java/com/wms/entity/app/mes/SendMesStockRequest.java @@ -0,0 +1,32 @@ +package com.wms.entity.app.mes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class SendMesStockRequest { + + @JsonProperty("guid") + private String guid; + + @JsonProperty("Warehouse") + private String Warehouse; + + @JsonProperty("ItemCode") + private String ItemCode; + + @JsonProperty("Losnr") + private String Losnr; + + @JsonProperty("LotQty") + private String LotQty; + + @JsonProperty("Unit") + private String Unit; + + @JsonProperty("BinCode") + private String BinCode; + + @JsonProperty("VehicleNo") + private String VehicleNo; +} diff --git a/src/main/java/com/wms/entity/app/vo/FileVo.java b/src/main/java/com/wms/entity/app/vo/FileVo.java new file mode 100644 index 0000000..3feaa9a --- /dev/null +++ b/src/main/java/com/wms/entity/app/vo/FileVo.java @@ -0,0 +1,23 @@ +package com.wms.entity.app.vo; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +/** + * 文件Vo + */ +@Data +public class FileVo { + @JsonProperty("fileId") + private String fileId; + @JsonProperty("name") + private String name; + @JsonProperty("type") + private String type; + @JsonProperty("size") + private String size; + @JsonProperty("hash") + private String hash; + @JsonProperty("userName") + private String userName; +} diff --git a/src/main/java/com/wms/entity/app/vo/RoleOption.java b/src/main/java/com/wms/entity/app/vo/RoleOption.java new file mode 100644 index 0000000..aeb9085 --- /dev/null +++ b/src/main/java/com/wms/entity/app/vo/RoleOption.java @@ -0,0 +1,31 @@ +package com.wms.entity.app.vo; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.wms.entity.table.Role; +import lombok.Data; + +@Data +public class RoleOption { + /** + * 标签 + */ + @JsonProperty("label") + private String label; + /** + * 值 + */ + @JsonProperty("value") + private Integer value; + + /** + * 将角色对象转化为角色选项对象 + * @param role 角色 + * @return 结果 + */ + public static RoleOption of(Role role) { + RoleOption roleOption = new RoleOption(); + roleOption.setLabel(role.getRoleName()); + roleOption.setValue(role.getRoleId()); + return roleOption; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/DisposeStandRequest.java b/src/main/java/com/wms/entity/app/wcs/DisposeStandRequest.java new file mode 100644 index 0000000..9de2ab6 --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/DisposeStandRequest.java @@ -0,0 +1,40 @@ +package com.wms.entity.app.wcs; + +public class DisposeStandRequest { + /** + * 站台 + */ + private String pickStand; + /** + * 载具号 + */ + private String vehicleNo; + /** + * 状态 + */ + private Integer status; + + public String getPickStand() { + return pickStand; + } + + public void setPickStand(String pickStand) { + this.pickStand = pickStand; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/PickTaskRequest.java b/src/main/java/com/wms/entity/app/wcs/PickTaskRequest.java new file mode 100644 index 0000000..036c48c --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/PickTaskRequest.java @@ -0,0 +1,45 @@ +package com.wms.entity.app.wcs; + +import java.util.List; + +/** + * WCS上报箱子到达接口请求 + */ +public class PickTaskRequest { + /** + * 载具号 + */ + private String vehicleNo; + /** + * 拣选站台 + */ + private List pickStand; + /** + * 备注 + */ + private String remark; + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public List getPickStand() { + return pickStand; + } + + public void setPickStand(List pickStand) { + this.pickStand = pickStand; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/PickTaskResponse.java b/src/main/java/com/wms/entity/app/wcs/PickTaskResponse.java new file mode 100644 index 0000000..6d1f449 --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/PickTaskResponse.java @@ -0,0 +1,40 @@ +package com.wms.entity.app.wcs; + +public class PickTaskResponse { + /** + * 载具号 + */ + private String vehicleNo; + /** + * 拣选站台 + */ + private String pickStand; + /** + * 备注 + */ + private String remark; + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public String getPickStand() { + return pickStand; + } + + public void setPickStand(String pickStand) { + this.pickStand = pickStand; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/RequireInRequest.java b/src/main/java/com/wms/entity/app/wcs/RequireInRequest.java new file mode 100644 index 0000000..b937693 --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/RequireInRequest.java @@ -0,0 +1,34 @@ +package com.wms.entity.app.wcs; + +import jakarta.validation.constraints.NotBlank; +import lombok.Data; + +/** + * WCS请求载具入库 实体类 + */ +@Data +public class RequireInRequest { + /** + * 点位 + */ + @NotBlank(message = "请求的点位不能为空") + private String point; + /** + * 载具编号 + */ + @NotBlank(message = "请求的载具编号不能为空") + private String vehicleNo; + /** + * 条码信息 + */ + private String codeMessage; + /** + * 机型 + */ + private String model; + /** + * 备注 + */ + private String remark; + +} diff --git a/src/main/java/com/wms/entity/app/wcs/RequireOutRequest.java b/src/main/java/com/wms/entity/app/wcs/RequireOutRequest.java new file mode 100644 index 0000000..3c47eea --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/RequireOutRequest.java @@ -0,0 +1,13 @@ +package com.wms.entity.app.wcs; + +import jakarta.validation.constraints.NotBlank; +import lombok.Data; + +@Data +public class RequireOutRequest { + /** + * 点位 + */ + @NotBlank(message = "请求的点位不能为空") + private String point; +} diff --git a/src/main/java/com/wms/entity/app/wcs/WcsGoods.java b/src/main/java/com/wms/entity/app/wcs/WcsGoods.java new file mode 100644 index 0000000..227b094 --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/WcsGoods.java @@ -0,0 +1,83 @@ +package com.wms.entity.app.wcs; + +import com.wms.entity.BaseEntity; + +import java.math.BigDecimal; + +/** + * wcs需要的物料信息 + */ +public class WcsGoods extends BaseEntity { + /** + * 物品编号 + */ + private String goodsId; + /** + * 物品名称 + */ + private String goodsName; + /** + * 物品批次 + */ + private String batch; + /** + * 物品条码 + */ + private String goodsCode; + /** + * 物品单位 + */ + private String unit; + /** + * 物品数量 + */ + private BigDecimal goodsNum; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public String getBatch() { + return batch; + } + + public void setBatch(String batch) { + this.batch = batch; + } + + public String getGoodsCode() { + return goodsCode; + } + + public void setGoodsCode(String goodsCode) { + this.goodsCode = goodsCode; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public BigDecimal getGoodsNum() { + return goodsNum; + } + + public void setGoodsNum(BigDecimal goodsNum) { + this.goodsNum = goodsNum; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/WcsTask.java b/src/main/java/com/wms/entity/app/wcs/WcsTask.java new file mode 100644 index 0000000..f3d697f --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/WcsTask.java @@ -0,0 +1,152 @@ +package com.wms.entity.app.wcs; + +import com.wms.entity.BaseEntity; + +/** + * WMS向WCS发送任务请求的实体类 + */ +public class WcsTask extends BaseEntity { + + /** + * 任务编号 + */ + private String taskId; + + /** + * 任务类型 + */ + private Integer taskType; + + /** + * 优先级 + */ + private Integer priority; + + /** + * 任务状态 + */ + private Integer taskStatus; + + /** + * 起点 + */ + private String origin; + + /** + * 任务中间点 + */ + private String midPoint; + + /** + * 终点 + */ + private String destination; + + /** + * 载具编号 + */ + private String vehicleNo; + + /** + * 载具尺寸 + */ + private Integer vehicleSize; + + /** + * 重量 + */ + private Double weight; + + /** + * 信息---一般填异常信息 + */ + private String message; + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public Integer getTaskType() { + return taskType; + } + + public void setTaskType(Integer taskType) { + this.taskType = taskType; + } + + public Integer getPriority() { + return priority; + } + + public void setPriority(Integer priority) { + this.priority = priority; + } + + public Integer getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(Integer taskStatus) { + this.taskStatus = taskStatus; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getMidPoint() { + return midPoint; + } + + public void setMidPoint(String midPoint) { + this.midPoint = midPoint; + } + + public String getDestination() { + return destination; + } + + public void setDestination(String destination) { + this.destination = destination; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public Integer getVehicleSize() { + return vehicleSize; + } + + public void setVehicleSize(Integer vehicleSize) { + this.vehicleSize = vehicleSize; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/WcsToWmsInspectVesselEntity.java b/src/main/java/com/wms/entity/app/wcs/WcsToWmsInspectVesselEntity.java new file mode 100644 index 0000000..dea894b --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/WcsToWmsInspectVesselEntity.java @@ -0,0 +1,102 @@ +package com.wms.entity.app.wcs; + +import com.wms.entity.BaseEntity; + +import java.math.BigDecimal; + +/** + * WCS向WMS发送容器信息的实体类 + */ +public class WcsToWmsInspectVesselEntity extends BaseEntity { + + /** + * 请求时间 + */ + private String requestTime; + + /** + * 任务类型 + */ + private Integer taskType; + + /** + * 载具编号 + */ + private String vehicleNo; + + /** + * 设备编号 + */ + private Integer equipmentId; + + /** + * 地点 + */ + private String place; + + /** + * 尺寸 + */ + private Integer size; + + /** + * 重量 + */ + private BigDecimal weight; + + public String getRequestTime() { + return requestTime; + } + + public void setRequestTime(String requestTime) { + this.requestTime = requestTime; + } + + public Integer getTaskType() { + return taskType; + } + + public void setTaskType(Integer taskType) { + this.taskType = taskType; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public Integer getSize() { + return size; + } + + public void setSize(Integer size) { + this.size = size; + } + + public BigDecimal getWeight() { + return weight; + } + + public void setWeight(BigDecimal weight) { + this.weight = weight; + } + + public Integer getEquipmentId() { + return equipmentId; + } + + public void setEquipmentId(Integer equipmentId) { + this.equipmentId = equipmentId; + } +} diff --git a/src/main/java/com/wms/entity/app/wcs/WmsReceiveTaskResultEntity.java b/src/main/java/com/wms/entity/app/wcs/WmsReceiveTaskResultEntity.java new file mode 100644 index 0000000..96d0332 --- /dev/null +++ b/src/main/java/com/wms/entity/app/wcs/WmsReceiveTaskResultEntity.java @@ -0,0 +1,74 @@ +package com.wms.entity.app.wcs; + +import com.wms.entity.BaseEntity; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; + +/** + * WCS向WMS发送任务结果请求实体类 + */ +public class WmsReceiveTaskResultEntity extends BaseEntity { + + /** + * WMS任务编号 + */ + @NotBlank(message = "任务ID不允许为空") + private String taskId; + /** + * 任务状态 + */ + @NotNull(message = "任务状态不允许为空") + private Integer taskStatus; + /** + * 任务终点 + */ + private String destination; + /** + * 载具号/箱号 + */ + private String vehicleNo; + /** + * 任务信息 + */ + private String message; + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public Integer getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(Integer taskStatus) { + this.taskStatus = taskStatus; + } + + public String getDestination() { + return destination; + } + + public void setDestination(String destination) { + this.destination = destination; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/src/main/java/com/wms/entity/common/WmsApiResponse.java b/src/main/java/com/wms/entity/common/WmsApiResponse.java new file mode 100644 index 0000000..abb5ab7 --- /dev/null +++ b/src/main/java/com/wms/entity/common/WmsApiResponse.java @@ -0,0 +1,30 @@ +package com.wms.entity.common; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; + +@Data +@AllArgsConstructor +public class WmsApiResponse { + + /** + * 返回代码 + */ + @JsonProperty(value = "code") + private Integer code; + + /** + * 返回消息 + */ + @JsonProperty(value = "message") + private String message; + + /** + * 返回信息 + */ + @JsonProperty(value = "returnData") + private T returnData; + + +} diff --git a/src/main/java/com/wms/entity/common/WmsApiResponseByCheckBack.java b/src/main/java/com/wms/entity/common/WmsApiResponseByCheckBack.java new file mode 100644 index 0000000..d6c6e09 --- /dev/null +++ b/src/main/java/com/wms/entity/common/WmsApiResponseByCheckBack.java @@ -0,0 +1,47 @@ +package com.wms.entity.common; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; + +import java.math.BigDecimal; + +@Data +@AllArgsConstructor +public class WmsApiResponseByCheckBack { + + /** + * 返回代码 + */ + @JsonProperty(value = "code") + private Integer code; + + /** + * 返回消息 + */ + @JsonProperty(value = "message") + private String message; + + /** + * 返回消息 + */ + @JsonProperty(value = "goodsId") + private String goodsId; + + /** + * 返回消息 + */ + @JsonProperty(value = "goodsNum") + private BigDecimal goodsNum; + + + @JsonProperty(value = "rowId") + private String rowId; + /** + * 返回信息 + */ + @JsonProperty(value = "returnData") + private T returnData; + + +} diff --git a/src/main/java/com/wms/entity/dto/PageQuery.java b/src/main/java/com/wms/entity/dto/PageQuery.java new file mode 100644 index 0000000..9ae0be3 --- /dev/null +++ b/src/main/java/com/wms/entity/dto/PageQuery.java @@ -0,0 +1,67 @@ +package com.wms.entity.dto; + +//import com.baomidou.mybatisplus.core.metadata.OrderItem; +//import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.wms.utils.StringUtils; +import lombok.Data; + +/** + * 分页查询 + */ +@Data +public class PageQuery { + /** + * 页码 + */ + @JsonProperty("pageNo") + private Long pageNo = 1L; + /** + * 每页行数 + */ + @JsonProperty("pageSize") + private Long pageSize = 10L; + /** + * 排序字段 + */ + @JsonProperty("sortBy") + private String sortBy; + /** + * 是否升序 + */ + @JsonProperty("isAsc") + private Boolean isAsc = true; + /** + * 请求用户名 + */ + @JsonProperty("userName") + private String userName; + +// /** +// * 将前端查询转换为数据库查询可用的分页查询 +// * @param orderItems 排序字段 +// * @return 分页查询 +// * @param 实体类PO +// */ +// public Page toMpPage(OrderItem ... orderItems){ +// Page page = Page.of(pageNo, pageSize); +// if (StringUtils.isNotEmpty(sortBy)) { +// page.addOrder(new OrderItem().setColumn(sortBy).setAsc(isAsc)); +// } else { +// page.addOrder(orderItems); +// } +// return page; +// } +// +// /** +// * 传入 默认排序字段的转换 +// * @param defaultSortValue 默认查询 +// * @param isAsc 排序方式 +// * @return 分页查询 +// * @param 实体类 +// */ +// public Page toMpPage(String defaultSortValue, Boolean isAsc){ +// return toMpPage(new OrderItem().setColumn(defaultSortValue).setAsc(isAsc)); +// } +} + diff --git a/src/main/java/com/wms/entity/dto/goodsRequest.java b/src/main/java/com/wms/entity/dto/goodsRequest.java new file mode 100644 index 0000000..7a13c4a --- /dev/null +++ b/src/main/java/com/wms/entity/dto/goodsRequest.java @@ -0,0 +1,20 @@ +package com.wms.entity.dto; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class goodsRequest { + + /** + * 零件号 + */ + @JsonProperty(value = "goodsId") + private String goodsId; + + /** + * 机型 + */ + @JsonProperty(value = "efSelect") + private String efSelect; +} diff --git a/src/main/java/com/wms/entity/dto/orderCheck/addOrderCheckRequest.java b/src/main/java/com/wms/entity/dto/orderCheck/addOrderCheckRequest.java new file mode 100644 index 0000000..9dffe36 --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderCheck/addOrderCheckRequest.java @@ -0,0 +1,21 @@ +package com.wms.entity.dto.orderCheck; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class addOrderCheckRequest { + /** + * 盘点类型 + */ + @JsonProperty(value = "efSelect") + private String efSelect; + + /** + * 对应信息 + */ + @JsonProperty(value = "goodsId") + public String goodsId; +} diff --git a/src/main/java/com/wms/entity/dto/orderCheck/queryOrderCheckRequest.java b/src/main/java/com/wms/entity/dto/orderCheck/queryOrderCheckRequest.java new file mode 100644 index 0000000..722d27f --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderCheck/queryOrderCheckRequest.java @@ -0,0 +1,21 @@ +package com.wms.entity.dto.orderCheck; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class queryOrderCheckRequest { + /** + * 查询参数 + */ + @JsonProperty(value = "searchStr") + private String searchStr; + + /** + * 状态 + */ + @JsonProperty(value = "orderStatus") + public List orderStatus; +} diff --git a/src/main/java/com/wms/entity/dto/orderCheck/remarkOrderCheckRequest.java b/src/main/java/com/wms/entity/dto/orderCheck/remarkOrderCheckRequest.java new file mode 100644 index 0000000..a605975 --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderCheck/remarkOrderCheckRequest.java @@ -0,0 +1,12 @@ +package com.wms.entity.dto.orderCheck; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class remarkOrderCheckRequest { + + @JsonProperty(value = "remarkReturn") + private String remarkReturn; +} diff --git a/src/main/java/com/wms/entity/dto/orderIn/bindingVehicleRequest.java b/src/main/java/com/wms/entity/dto/orderIn/bindingVehicleRequest.java new file mode 100644 index 0000000..062a0ce --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderIn/bindingVehicleRequest.java @@ -0,0 +1,21 @@ +package com.wms.entity.dto.orderIn; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class bindingVehicleRequest { + + /** + * 载具号 + */ + @JsonProperty(value = "vehicleNo") + private String vehicleNo; + + /** + * 条码 + */ + @JsonProperty(value = "code") + private String code; + +} diff --git a/src/main/java/com/wms/entity/dto/orderIn/downOrderInRequest.java b/src/main/java/com/wms/entity/dto/orderIn/downOrderInRequest.java new file mode 100644 index 0000000..429155c --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderIn/downOrderInRequest.java @@ -0,0 +1,33 @@ +package com.wms.entity.dto.orderIn; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +@Data +public class downOrderInRequest { + + /** + * 物料号 + * 发动机和原材料需要区分 + */ + @JsonProperty(value = "goodsId") + public String goodsId; + + /** + * 数量 + */ + @JsonProperty(value = "goodsNum") + public int goodsNum; + + + /** + * 载具号 + */ + @JsonProperty(value = "vehicleNo") + public String vehicleNo; + + /** + * + */ + @JsonProperty(value = "userName") + public String userName; +} \ No newline at end of file diff --git a/src/main/java/com/wms/entity/dto/orderIn/goodsInByTaskRequest.java b/src/main/java/com/wms/entity/dto/orderIn/goodsInByTaskRequest.java new file mode 100644 index 0000000..3700759 --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderIn/goodsInByTaskRequest.java @@ -0,0 +1,16 @@ +package com.wms.entity.dto.orderIn; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class goodsInByTaskRequest { + + + @JsonProperty(value = "vehicleNo") + private String vehicleNo; + + @JsonProperty(value = "selectByIn") + private String selectByIn; + +} diff --git a/src/main/java/com/wms/entity/dto/orderIn/loginInBad.java b/src/main/java/com/wms/entity/dto/orderIn/loginInBad.java new file mode 100644 index 0000000..57fd8df --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderIn/loginInBad.java @@ -0,0 +1,25 @@ +package com.wms.entity.dto.orderIn; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.math.BigDecimal; +@Data +public class loginInBad { + + @JsonProperty(value = "efSelect") + private String efSelect; + + @JsonProperty(value = "vehicleNo") + private String vehicleNo; + + @JsonProperty(value = "goodsId") + private String goodsId; + + @JsonProperty(value = "goodsNum") + private BigDecimal goodsNum; + + @JsonProperty(value = "model") + private String model; + +} diff --git a/src/main/java/com/wms/entity/dto/orderIn/queryOrderInRequest.java b/src/main/java/com/wms/entity/dto/orderIn/queryOrderInRequest.java new file mode 100644 index 0000000..64ab8d5 --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderIn/queryOrderInRequest.java @@ -0,0 +1,25 @@ +package com.wms.entity.dto.orderIn; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.time.LocalDate; +import java.util.List; + +@Data +public class queryOrderInRequest { + + /** + * 查询参数 + */ + @JsonProperty(value = "searchStr") + private String searchStr; + + /** + * 状态 + */ + @JsonProperty(value = "orderStatus") + public List orderStatus; + + +} diff --git a/src/main/java/com/wms/entity/dto/orderIn/updateInformation.java b/src/main/java/com/wms/entity/dto/orderIn/updateInformation.java new file mode 100644 index 0000000..974ceda --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderIn/updateInformation.java @@ -0,0 +1,24 @@ +package com.wms.entity.dto.orderIn; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDate; + +@Data +public class updateInformation { + + @JsonProperty(value = "vehicleNo") + private String vehicleNo; + + @JsonProperty(value = "goodsId") + private String goodsId; + + @JsonProperty(value = "goodsNum") + private BigDecimal goodsNum; + + @JsonProperty(value = "rowId") + private String rowId; + +} diff --git a/src/main/java/com/wms/entity/dto/orderIn/updateNumRequest.java b/src/main/java/com/wms/entity/dto/orderIn/updateNumRequest.java new file mode 100644 index 0000000..cde2621 --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderIn/updateNumRequest.java @@ -0,0 +1,21 @@ +package com.wms.entity.dto.orderIn; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDate; + +@Data +public class updateNumRequest { + + @JsonProperty(value = "rowId") + private String rowId; + + @JsonProperty(value = "realNum") + private BigDecimal realNum; + + @JsonProperty(value = "createTime") + private LocalDate createTime; + +} diff --git a/src/main/java/com/wms/entity/dto/orderOut/handOrderOutRequest.java b/src/main/java/com/wms/entity/dto/orderOut/handOrderOutRequest.java new file mode 100644 index 0000000..b52cb6c --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderOut/handOrderOutRequest.java @@ -0,0 +1,31 @@ +package com.wms.entity.dto.orderOut; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.List; + +public class handOrderOutRequest { + + + /** + * 查询参数 + */ + @JsonProperty(value = "goodsId") + public String goodsId; + + /** + * 状态 + */ + @JsonProperty(value = "goodsNum") + public int goodsNum; + + /** + * 优先级 + */ + @JsonProperty(value = "efSelect") + public String efSelect; + + + @JsonProperty(value = "orderOutType") + public String orderOutType; +} diff --git a/src/main/java/com/wms/entity/dto/orderOut/queryOrderOutRequest.java b/src/main/java/com/wms/entity/dto/orderOut/queryOrderOutRequest.java new file mode 100644 index 0000000..d0fd764 --- /dev/null +++ b/src/main/java/com/wms/entity/dto/orderOut/queryOrderOutRequest.java @@ -0,0 +1,23 @@ +package com.wms.entity.dto.orderOut; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class queryOrderOutRequest { + + /** + * 查询参数 + */ + @JsonProperty(value = "searchStr") + private String searchStr; + + /** + * 状态 + */ + @JsonProperty(value = "orderStatus") + public List orderStatus; + +} diff --git a/src/main/java/com/wms/entity/dto/user/PermissionQuery.java b/src/main/java/com/wms/entity/dto/user/PermissionQuery.java new file mode 100644 index 0000000..8b14080 --- /dev/null +++ b/src/main/java/com/wms/entity/dto/user/PermissionQuery.java @@ -0,0 +1,22 @@ +package com.wms.entity.dto.user; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.wms.entity.dto.PageQuery; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@EqualsAndHashCode(callSuper = true) +@Data +public class PermissionQuery extends PageQuery { + /** + * 角色id1 + */ + @JsonProperty("roleId1") + private Integer roleId1; + /** + * 角色id2 + */ + @JsonProperty("roleId2") + private Integer roleId2; +} + diff --git a/src/main/java/com/wms/entity/dto/user/addUser.java b/src/main/java/com/wms/entity/dto/user/addUser.java new file mode 100644 index 0000000..4b898f5 --- /dev/null +++ b/src/main/java/com/wms/entity/dto/user/addUser.java @@ -0,0 +1,38 @@ +package com.wms.entity.dto.user; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class addUser { + + /** + * 当前登陆的角色id + */ + @JsonProperty(value = "roleId1") + private Integer roleId1; + + /** + * 角色id + */ + @JsonProperty(value = "roleIdUpdate") + private Integer roleIdUpdate; + + /** + * 用户名 + */ + @JsonProperty(value = "userNameUpdate") + private String userNameUpdate; + + /** + * 账户 + */ + @JsonProperty(value = "loginAccountUpdate") + private String loginAccountUpdate; + + /** + * 密码 + */ + @JsonProperty(value = "loginPasswordUpdate") + private String loginPasswordUpdate; +} diff --git a/src/main/java/com/wms/entity/dto/user/deleteUser.java b/src/main/java/com/wms/entity/dto/user/deleteUser.java new file mode 100644 index 0000000..af444ed --- /dev/null +++ b/src/main/java/com/wms/entity/dto/user/deleteUser.java @@ -0,0 +1,26 @@ +package com.wms.entity.dto.user; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class deleteUser { + + /** + * 账号 + */ + @JsonProperty(value = "zhanghao") + private String zhanghao; + + /** + * jiumima + */ + @JsonProperty(value = "oldPW") + private String oldPW; + + /** + * 新密码 + */ + @JsonProperty(value = "newPW") + private String newPW; +} diff --git a/src/main/java/com/wms/entity/dto/user/queryUserRequest.java b/src/main/java/com/wms/entity/dto/user/queryUserRequest.java new file mode 100644 index 0000000..cc632f0 --- /dev/null +++ b/src/main/java/com/wms/entity/dto/user/queryUserRequest.java @@ -0,0 +1,14 @@ +package com.wms.entity.dto.user; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class queryUserRequest { + /** + * 查询参数 + */ + @JsonProperty(value = "userName") + private String userName; +} diff --git a/src/main/java/com/wms/entity/dto/user/updateUser.java b/src/main/java/com/wms/entity/dto/user/updateUser.java new file mode 100644 index 0000000..013bcad --- /dev/null +++ b/src/main/java/com/wms/entity/dto/user/updateUser.java @@ -0,0 +1,37 @@ +package com.wms.entity.dto.user; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class updateUser { + /** + * 当前登陆的角色id + */ + @JsonProperty(value = "roleId1") + private Integer roleId1; + + /** + * 角色id + */ + @JsonProperty(value = "roleIdUpdate") + private Integer roleIdUpdate; + + /** + * 用户名 + */ + @JsonProperty(value = "userIdUpdate") + private Integer userIdUpdate; + + /** + * 账户 + */ + @JsonProperty(value = "userNameUpdate") + private String userNameUpdate; + + /** + * 密码 + */ + @JsonProperty(value = "loginAccountUpdate") + private String loginAccountUpdate; +} diff --git a/src/main/java/com/wms/entity/page/PageDomain.java b/src/main/java/com/wms/entity/page/PageDomain.java new file mode 100644 index 0000000..dc6e300 --- /dev/null +++ b/src/main/java/com/wms/entity/page/PageDomain.java @@ -0,0 +1,67 @@ +package com.wms.entity.page; + +import com.wms.utils.StringUtils; + +/** + * 分页请求 + * 前端表格用 + */ +public class PageDomain { + /** + * 当前记录起始索引 + */ + private Integer pageNum; + /** + * 每页显示记录数 + */ + private Integer pageSize; + /** + *排序列 + */ + private String orderByColumn; + /** + * 排序方向 + */ + private String isAsc = "asc"; + + public String getOrderBy() + { + if (StringUtils.isEmpty(orderByColumn)) + { + return ""; + } + return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc; + } + + public Integer getPageNum() { + return pageNum; + } + + public void setPageNum(Integer pageNum) { + this.pageNum = pageNum; + } + + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + + public String getOrderByColumn() { + return orderByColumn; + } + + public void setOrderByColumn(String orderByColumn) { + this.orderByColumn = orderByColumn; + } + + public String getIsAsc() { + return isAsc; + } + + public void setIsAsc(String isAsc) { + this.isAsc = isAsc; + } +} diff --git a/src/main/java/com/wms/entity/page/TableRequest.java b/src/main/java/com/wms/entity/page/TableRequest.java new file mode 100644 index 0000000..7b0f0e6 --- /dev/null +++ b/src/main/java/com/wms/entity/page/TableRequest.java @@ -0,0 +1,25 @@ +package com.wms.entity.page; + +import lombok.Getter; +import lombok.Setter; + +/** + * 前端请求表格数据 + */ +@Setter +@Getter +public class TableRequest { + /** + * 分页请求数据 + */ + private PageDomain page; + /** + * 参数 + */ + private T param; + /** + * 参数2 + */ + private T2 param2; + +} diff --git a/src/main/java/com/wms/entity/page/TableResponse.java b/src/main/java/com/wms/entity/page/TableResponse.java new file mode 100644 index 0000000..4ea4218 --- /dev/null +++ b/src/main/java/com/wms/entity/page/TableResponse.java @@ -0,0 +1,57 @@ +package com.wms.entity.page; + +import java.util.List; + +/** + * 前端表格请求的返回值 + */ +public class TableResponse { + /** + * 总记录数 + */ + private long total; + /** + * 列表数据 + */ + private List rows; + /** + * 状态码 + */ + private int code; + /** + * 消息 + */ + private String message; + + public long getTotal() { + return total; + } + + public void setTotal(long total) { + this.total = total; + } + + public List getRows() { + return rows; + } + + public void setRows(List rows) { + this.rows = rows; + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/src/main/java/com/wms/entity/table/AppOrderIn.java b/src/main/java/com/wms/entity/table/AppOrderIn.java new file mode 100644 index 0000000..0cf73af --- /dev/null +++ b/src/main/java/com/wms/entity/table/AppOrderIn.java @@ -0,0 +1,137 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.wms.utils.excel.ExcelExport; +import lombok.*; +import org.apache.poi.hpsf.Decimal; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.Date; + +/** + * tbl_app_order_in 的实体类 + */ + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class AppOrderIn { + + public AppOrderIn(String guid) { + this.guid = guid; + } + + + public AppOrderIn(String betchId, BigDecimal goodsNum, Integer orderStatus) { + this.batchNo = betchId; + this.goodsNum = goodsNum; + this.orderStatus = orderStatus; + } + + /** + * 主键 + */ + @JsonProperty(value = "rowId") + private String rowId; + + /** + * 唯一标识 + */ + @JsonProperty(value = "guid") + private String guid; + + /** + * 订单类型 + */ + @JsonProperty(value = "inType") + private Integer inType; + + /** + * 批次号 + */ + @JsonProperty(value = "batchNo") + private String batchNo; + + /** + * 载具号 + */ + @JsonProperty(value = "vehicleNo") + private String vehicleNo; + + /** + * 商品id + */ + @JsonProperty(value = "goodsId") + private String goodsId; + + /** + * 商品数量 + */ + @JsonProperty(value = "goodsNum") + private BigDecimal goodsNum; + + /** + * 仓库 + */ + @JsonProperty(value = "wareHouse") + private String wareHouse; + + /** + * 订单状态 + */ + @JsonProperty(value = "orderStatus") + private Integer orderStatus; + + /** + * 创建时间 + */ + @JsonProperty(value = "createTime") + private LocalDate createTime; + + +// /** +// * 生产日期 +// */ + + @JsonProperty(value = "productionDate") + private LocalDate productionDate; + +// @ExcelExport("生产日期") +// @DateTimeFormat(pattern = "yyyy-MM-dd") +// @JsonFormat(pattern = "yyyy-MM-dd") +// private Date productionDate; + + /** + * 创建人 + */ + @JsonProperty(value = "createPerson") + private String createPerson; + + /** + * 修改时间 + */ + @JsonProperty(value = "updateTime") + private LocalDateTime updateTime; + + /** + * 收货日期 + */ + + /** + * 备注 + */ + @JsonProperty(value = "remark") + private String remark; + + @JsonProperty(value = "model") + private String model; + + @JsonProperty(value = "enginen") + private String enginen; + + +} diff --git a/src/main/java/com/wms/entity/table/Config.java b/src/main/java/com/wms/entity/table/Config.java new file mode 100644 index 0000000..b0d5979 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Config.java @@ -0,0 +1,73 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + +/** + * 配置 + */ +public class Config extends BaseEntity { + /** + * 配置ID + */ + private Integer configId; + + /** + * 配置键 + */ + private String configKey; + + /** + * 配置值 + */ + private String configValue; + + /** + * 配置展示类型 + */ + private String configType; + + /** + * 配置名称 + */ + private String configName; + + public Integer getConfigId() { + return configId; + } + + public void setConfigId(Integer configId) { + this.configId = configId; + } + + public String getConfigKey() { + return configKey; + } + + public void setConfigKey(String configKey) { + this.configKey = configKey; + } + + public String getConfigValue() { + return configValue; + } + + public void setConfigValue(String configValue) { + this.configValue = configValue; + } + + public String getConfigType() { + return configType; + } + + public void setConfigType(String configType) { + this.configType = configType; + } + + public String getConfigName() { + return configName; + } + + public void setConfigName(String configName) { + this.configName = configName; + } +} diff --git a/src/main/java/com/wms/entity/table/Goods.java b/src/main/java/com/wms/entity/table/Goods.java new file mode 100644 index 0000000..4be40f5 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Goods.java @@ -0,0 +1,149 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + +import java.util.Date; + +/** + * 物料 + */ +public class Goods extends BaseEntity { + + /** + * 物料编号 + */ + private String goodsId; + + /** + * 物料名称 + */ + private String goodsName; + + /** + * 单位 + */ + private String goodsUnit; + + /** + * 物料ID + */ + private String itemId; + /** + * 用户物料类型 + */ + private String itemType; + /** + * 库存类别 + */ + private String invCategory; + /** + * 存储天数 + */ + private Integer lifeDays; + /** + * 库存组织Id + */ + private String organizationId; + /** + * 库存组织代码 + */ + private String organizationCode; + + /** + * 最后更新日期 + */ + private Date lastUpdateTime; + + /** + * 最后更新用户 + */ + private String lastUpdateUser; + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public String getGoodsUnit() { + return goodsUnit; + } + + public void setGoodsUnit(String goodsUnit) { + this.goodsUnit = goodsUnit; + } + + public String getItemId() { + return itemId; + } + + public void setItemId(String itemId) { + this.itemId = itemId; + } + + public String getItemType() { + return itemType; + } + + public void setItemType(String itemType) { + this.itemType = itemType; + } + + public String getInvCategory() { + return invCategory; + } + + public void setInvCategory(String invCategory) { + this.invCategory = invCategory; + } + + public Integer getLifeDays() { + return lifeDays; + } + + public void setLifeDays(Integer lifeDays) { + this.lifeDays = lifeDays; + } + + public String getOrganizationId() { + return organizationId; + } + + public void setOrganizationId(String organizationId) { + this.organizationId = organizationId; + } + + public String getOrganizationCode() { + return organizationCode; + } + + public void setOrganizationCode(String organizationCode) { + this.organizationCode = organizationCode; + } + + public Date getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Date lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUser() { + return lastUpdateUser; + } + + public void setLastUpdateUser(String lastUpdateUser) { + this.lastUpdateUser = lastUpdateUser; + } +} diff --git a/src/main/java/com/wms/entity/table/Location.java b/src/main/java/com/wms/entity/table/Location.java new file mode 100644 index 0000000..e3a8ec3 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Location.java @@ -0,0 +1,93 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; +import lombok.Data; +import lombok.Getter; +import lombok.Setter; + +/** + * 库位 + */ +@Data +public class Location extends BaseEntity { + + /** + * 库位编号 + */ + private String locationId; + + /** + * 库区编号 + */ + private Integer areaId; + + /** + * 巷道编号 + */ + private Integer tunnelId; + + /** + * 设备编号 + */ + private Integer equipmentId; + + /** + * 库位类型 + */ + private Integer locationType; + + /** + * 行 + */ + @Setter + @Getter + private Integer queue; + + /** + * 列 + */ + @Setter + @Getter + private Integer line; + + /** + * 层 + */ + private Integer layer; + + /** + * 深度 + */ + private Integer depth; + + /** + * 是否锁定 + */ + private Integer isLock; + + /** + * 库位状态 + */ + private Integer locationStatus; + + /** + * 载具编号 + */ + private String vehicleId; + + + private String wareArea; + + public Location() { + } + + public Location(String locationId) { + this.locationId = locationId; + } + public Location(Integer equipmentId) { + this.equipmentId = equipmentId; + } + + + +} diff --git a/src/main/java/com/wms/entity/table/Menu.java b/src/main/java/com/wms/entity/table/Menu.java new file mode 100644 index 0000000..39b4263 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Menu.java @@ -0,0 +1,38 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; +import lombok.Getter; +import lombok.Setter; + +/** + * 菜单 + */ +@Setter +@Getter +public class Menu extends BaseEntity { + /** + * 菜单Id + */ + private String menuId; + + /** + * 菜单名称 + */ + private String labelName; + + /** + * 图标值 + */ + private String iconValue; + + /** + * 地址 + */ + private String path; + + /** + * 父菜单Id + */ + private String parentId; + +} diff --git a/src/main/java/com/wms/entity/table/MenuVo.java b/src/main/java/com/wms/entity/table/MenuVo.java new file mode 100644 index 0000000..3349472 --- /dev/null +++ b/src/main/java/com/wms/entity/table/MenuVo.java @@ -0,0 +1,38 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class MenuVo { + /** + * 菜单id + */ + @JsonProperty("id") + private String id; + /** + * 菜单名称 + */ + @JsonProperty("label") + private String label; + /** + * 子菜单 + */ + @JsonProperty("children") + private List children; + + /** + * 将菜单对象转换为菜单视图对象 + * @param menu 菜单对象 + * @return 菜单 + */ + public static MenuVo of(Menu menu) { + MenuVo menuVo = new MenuVo(); + menuVo.setId(menu.getMenuId()); + menuVo.setLabel(menu.getLabelName()); + + return menuVo; + } +} diff --git a/src/main/java/com/wms/entity/table/OrderCheck.java b/src/main/java/com/wms/entity/table/OrderCheck.java new file mode 100644 index 0000000..ce3f851 --- /dev/null +++ b/src/main/java/com/wms/entity/table/OrderCheck.java @@ -0,0 +1,60 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.time.LocalDate; +import java.util.Date; + +/** + * 盘点通知单表格 + * tbl_app_order_check + */ +@Data +public class OrderCheck { + + /** + * 记录号,唯一识别号 + */ + @JsonProperty(value = "recordId") + private String recordId; + + /** + * 盘点通知单号 + */ + @JsonProperty(value = "checkId") + private String checkId; + + /** + * 库别 + */ + @JsonProperty(value = "warehouse") + private String warehouse; + + /** + * 状态 + */ + @JsonProperty(value = "status") + private Integer status; + + /** + * 创建时间 + */ + @JsonProperty(value = "createTime") + private LocalDate createTime; + + /** + * 完成时间 + */ + @JsonProperty(value = "completeTime") + private Date completeTime; + + /** + * 备注 + */ + @JsonProperty(value = "remark") + private String remark; + + + +} diff --git a/src/main/java/com/wms/entity/table/OrderOut.java b/src/main/java/com/wms/entity/table/OrderOut.java new file mode 100644 index 0000000..fc6de59 --- /dev/null +++ b/src/main/java/com/wms/entity/table/OrderOut.java @@ -0,0 +1,124 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * 出库单 + * tbl_app_order_out + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class OrderOut { + + public OrderOut(String rowId) { + this.rowId = rowId; + } + + /** + * 主键 + */ + @JsonProperty(value = "rowId") + private String rowId; + + /** + * 记录号 + */ + @JsonProperty(value = "recordId") + private String recordId; + + /** + * 出库通知单号 + */ + @JsonProperty(value = "orderId") + private String orderId; + + /** + * 起始库区 + */ + @JsonProperty(value = "warehouseOrigin") + private String warehouseOrigin; + + /** + * 目的库区 + */ + @JsonProperty(value = "warehouseDestination") + private String warehouseDestination; + + /** + * 出库单类型 + * 1:生产领料通知单 + * 2:调拨出库单 + * 3:出货通知单 + */ + @JsonProperty(value = "orderType") + private Integer orderType; + + /** + * 交货时间 + */ + @JsonProperty(value = "deliveryTime") + private Date deliveryTime; + + /** + * 行号 + */ + @JsonProperty(value = "rowNo") + private Integer rowNo; + + /** + * 物料编号 + */ + @JsonProperty(value = "goodsId") + private String goodsId; + + /** + * 物料名称 + */ + @JsonProperty(value = "goodsName") + private String goodsName; + + /** + * 物料数量 + */ + @JsonProperty(value = "goodsNum") + private String goodsNum; + + /** + * 单位 + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * 状态 + */ + @JsonProperty(value = "status") + private Integer status; + + /** + * 创建时间 + */ + @JsonProperty(value = "createTime") + private Date createTime; + + + /** + * 备注 + */ + @JsonProperty(value = "remark") + private String remark; + + + /** + * 批次号 + */ + @JsonProperty(value = "batchNo") + private String batchNo; + +} diff --git a/src/main/java/com/wms/entity/table/OrderOutBak.java b/src/main/java/com/wms/entity/table/OrderOutBak.java new file mode 100644 index 0000000..6b9d074 --- /dev/null +++ b/src/main/java/com/wms/entity/table/OrderOutBak.java @@ -0,0 +1,124 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * 出库单 + * tbl_app_order_out_bak + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class OrderOutBak { + + public OrderOutBak(String rowId) { + this.rowId = rowId; + } + + /** + * 主键 + */ + @JsonProperty(value = "rowId") + private String rowId; + + /** + * 记录号 + */ + @JsonProperty(value = "recordId") + private String recordId; + + /** + * 出库通知单号 + */ + @JsonProperty(value = "orderId") + private String orderId; + + /** + * 起始库区 + */ + @JsonProperty(value = "warehouseOrigin") + private String warehouseOrigin; + + /** + * 目的库区 + */ + @JsonProperty(value = "warehouseDestination") + private String warehouseDestination; + + /** + * 出库单类型 + * 1:生产领料通知单 + * 2:调拨出库单 + * 3:出货通知单 + */ + @JsonProperty(value = "orderType") + private Integer orderType; + + /** + * 交货时间 + */ + @JsonProperty(value = "deliveryTime") + private Date deliveryTime; + + /** + * 行号 + */ + @JsonProperty(value = "rowNo") + private Integer rowNo; + + /** + * 物料编号 + */ + @JsonProperty(value = "goodsId") + private String goodsId; + + /** + * 物料名称 + */ + @JsonProperty(value = "goodsName") + private String goodsName; + + /** + * 物料数量 + */ + @JsonProperty(value = "goodsNum") + private String goodsNum; + + /** + * 单位 + */ + @JsonProperty(value = "unit") + private String unit; + + /** + * 状态 + */ + @JsonProperty(value = "status") + private Integer status; + + /** + * 创建时间 + */ + @JsonProperty(value = "createTime") + private Date createTime; + + + /** + * 备注 + */ + @JsonProperty(value = "remark") + private String remark; + + + /** + * 批次号 + */ + @JsonProperty(value = "batchNo") + private String batchNo; + +} diff --git a/src/main/java/com/wms/entity/table/PartInfo.java b/src/main/java/com/wms/entity/table/PartInfo.java new file mode 100644 index 0000000..cbc1c17 --- /dev/null +++ b/src/main/java/com/wms/entity/table/PartInfo.java @@ -0,0 +1,212 @@ +package com.wms.entity.table; + +import com.wms.utils.excel.ExcelExport; +import com.wms.utils.excel.ExcelImport; + +/** + * 零件数据 + */ +public class PartInfo { + @ExcelImport("Material") + @ExcelExport("零件号") + private String material; + @ExcelImport("Desc") + @ExcelExport("描述") + private String itemDesc; + @ExcelImport("Category") + @ExcelExport("零件类型") + private String category; + @ExcelImport("CategoryRemark") + @ExcelExport("策略") + private String categoryRemark; + @ExcelImport("Unload Place") + @ExcelExport("卸货点") + private String unloadPlace; + @ExcelImport("Kitting Point") + @ExcelExport("配料点") + private String kittingPoint; + @ExcelImport("Property") + @ExcelExport("可用性") + private String property; + @ExcelImport("Vendor ID") + @ExcelExport("供应商代码") + private String vendorId; + @ExcelImport("Data Owner") + @ExcelExport("数据负责人") + private String dataOwner; + @ExcelImport("Part Weight") + @ExcelExport("重量") + private Double partWeight; + @ExcelImport("Storage Location") + @ExcelExport("库位") + private String storageLocation; + @ExcelImport("Storage Type") + @ExcelExport("存储类型") + private String storageType; + @ExcelImport("Storage Bin") + @ExcelExport("BIN位") + private String storageBin; + @ExcelImport("Vendor Name") + @ExcelExport("供应商名称(英文)") + private String vendorNameEN; + + @ExcelImport("供应商") + @ExcelExport("供应商名称(中文)") + private String vendorNameCN; + + @ExcelImport("Vendor Country") + @ExcelExport("供应商国家/地区") + private String vendorCountry; + + @ExcelImport("SLED") + @ExcelExport("SLED") + private String SLED; + + @ExcelImport("UpdateDate") + @ExcelExport("更新时间") + private String updateDate; + + public String getMaterial() { + return material; + } + + public void setMaterial(String material) { + this.material = material; + } + + public String getItemDesc() { + return itemDesc; + } + + public void setItemDesc(String itemDesc) { + this.itemDesc = itemDesc; + } + + public String getCategory() { + return category; + } + + public void setCategory(String category) { + this.category = category; + } + + public String getCategoryRemark() { + return categoryRemark; + } + + public void setCategoryRemark(String categoryRemark) { + this.categoryRemark = categoryRemark; + } + + public String getUnloadPlace() { + return unloadPlace; + } + + public void setUnloadPlace(String unloadPlace) { + this.unloadPlace = unloadPlace; + } + + public String getKittingPoint() { + return kittingPoint; + } + + public void setKittingPoint(String kittingPoint) { + this.kittingPoint = kittingPoint; + } + + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + public String getVendorId() { + return vendorId; + } + + public void setVendorId(String vendorId) { + this.vendorId = vendorId; + } + + public String getDataOwner() { + return dataOwner; + } + + public void setDataOwner(String dataOwner) { + this.dataOwner = dataOwner; + } + + public Double getPartWeight() { + return partWeight; + } + + public void setPartWeight(Double partWeight) { + this.partWeight = partWeight; + } + + public String getStorageLocation() { + return storageLocation; + } + + public void setStorageLocation(String storageLocation) { + this.storageLocation = storageLocation; + } + + public String getStorageType() { + return storageType; + } + + public void setStorageType(String storageType) { + this.storageType = storageType; + } + + public String getStorageBin() { + return storageBin; + } + + public void setStorageBin(String storageBin) { + this.storageBin = storageBin; + } + + public String getVendorNameEN() { + return vendorNameEN; + } + + public void setVendorNameEN(String vendorNameEN) { + this.vendorNameEN = vendorNameEN; + } + + public String getVendorCountry() { + return vendorCountry; + } + + public void setVendorCountry(String vendorCountry) { + this.vendorCountry = vendorCountry; + } + + public String getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(String updateDate) { + this.updateDate = updateDate; + } + + public String getSLED() { + return SLED; + } + + public void setSLED(String SLED) { + this.SLED = SLED; + } + + public String getVendorNameCN() { + return vendorNameCN; + } + + public void setVendorNameCN(String vendorNameCN) { + this.vendorNameCN = vendorNameCN; + } +} diff --git a/src/main/java/com/wms/entity/table/Permission.java b/src/main/java/com/wms/entity/table/Permission.java new file mode 100644 index 0000000..7f62894 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Permission.java @@ -0,0 +1,23 @@ +package com.wms.entity.table; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class Permission { + /** + * 权限id + */ + private String permissionId; + /** + * 菜单id + */ + private String menuId; + /** + * 角色id + */ + private Integer roleId; +} diff --git a/src/main/java/com/wms/entity/table/PermissionVo.java b/src/main/java/com/wms/entity/table/PermissionVo.java new file mode 100644 index 0000000..7244a50 --- /dev/null +++ b/src/main/java/com/wms/entity/table/PermissionVo.java @@ -0,0 +1,20 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class PermissionVo { + /** + * 请求角色的所有menuId + */ + @JsonProperty("menu") + private List menu; + /** + * 待查询角色的menuId列表 + */ + @JsonProperty("menuIds") + private List menuIds; +} diff --git a/src/main/java/com/wms/entity/table/Role.java b/src/main/java/com/wms/entity/table/Role.java new file mode 100644 index 0000000..cc8b66a --- /dev/null +++ b/src/main/java/com/wms/entity/table/Role.java @@ -0,0 +1,13 @@ +package com.wms.entity.table; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +public class Role { + private Integer roleId; + private String roleName; +} diff --git a/src/main/java/com/wms/entity/table/RoleUpdateForm.java b/src/main/java/com/wms/entity/table/RoleUpdateForm.java new file mode 100644 index 0000000..c507dcb --- /dev/null +++ b/src/main/java/com/wms/entity/table/RoleUpdateForm.java @@ -0,0 +1,30 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class RoleUpdateForm { + /** + * 角色id1 + */ + @JsonProperty("roleId1") + private Integer roleId1; + /** + * 角色id2 + */ + @JsonProperty("roleId2") + private Integer roleId2; + /** + * 角色名2 + */ + @JsonProperty("role2Name") + private String role2Name; + /** + * 权限列表 + */ + @JsonProperty("menuIds") + private List menuIds; +} diff --git a/src/main/java/com/wms/entity/table/Stand.java b/src/main/java/com/wms/entity/table/Stand.java new file mode 100644 index 0000000..35fe5f6 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Stand.java @@ -0,0 +1,151 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + +/** + * 站台表 + */ +public class Stand extends BaseEntity { + /** + * 站台id + */ + private String standId; + /** + * 是否允许入库 + */ + private Integer allowIn; + /** + * 是否允许出库 + */ + private Integer allowOut; + /** + * 任务号 + */ + private String taskId; + /** + * 站台是否锁定 + */ + private Integer isLock; + /** + * 站台状态 + */ + private Integer standStatus; + + /** + * 设备编号 + */ + private Integer equipmentId; + + /** + * 库区编号 + */ + private Integer areaId; + /** + * 站台类型 + */ + private Integer standType; + /** + * 站台ip + */ + private String standIp; + + public Stand() { + + } + public Stand(Integer standType, String standIp, Integer standStatus) { + this.standType = standType; + this.standIp = standIp; + this.standStatus = standStatus; + } + public Stand(String standId, Integer allowIn, Integer allowOut, String taskId, Integer isLock, Integer standStatus, Integer equipmentId, Integer areaId, Integer standType) { + this.standId = standId; + this.allowIn = allowIn; + this.allowOut = allowOut; + this.taskId = taskId; + this.isLock = isLock; + this.standStatus = standStatus; + this.equipmentId = equipmentId; + this.areaId = areaId; + this.standType = standType; + } + + public String getStandId() { + return standId; + } + + public void setStandId(String standId) { + this.standId = standId; + } + + public Integer getAllowIn() { + return allowIn; + } + + public void setAllowIn(Integer allowIn) { + this.allowIn = allowIn; + } + + public Integer getAllowOut() { + return allowOut; + } + + public void setAllowOut(Integer allowOut) { + this.allowOut = allowOut; + } + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public Integer getIsLock() { + return isLock; + } + + public void setIsLock(Integer isLock) { + this.isLock = isLock; + } + + public Integer getStandStatus() { + return standStatus; + } + + public void setStandStatus(Integer standStatus) { + this.standStatus = standStatus; + } + + public Integer getEquipmentId() { + return equipmentId; + } + + public void setEquipmentId(Integer equipmentId) { + this.equipmentId = equipmentId; + } + + public Integer getAreaId() { + return areaId; + } + + public void setAreaId(Integer areaId) { + this.areaId = areaId; + } + + public Integer getStandType() { + return standType; + } + + public void setStandType(Integer standType) { + this.standType = standType; + } + + public String getStandIp() { + return standIp; + } + + public void setStandIp(String standIp) { + this.standIp = standIp; + } +} diff --git a/src/main/java/com/wms/entity/table/Stock.java b/src/main/java/com/wms/entity/table/Stock.java new file mode 100644 index 0000000..5ddacc7 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Stock.java @@ -0,0 +1,366 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.wms.entity.BaseEntity; +import com.wms.utils.excel.ExcelExport; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDate; +import java.util.Date; + +/** + * 库存 + */ +public class Stock extends BaseEntity { + + /** + * 库存编号 + */ + @ExcelExport("库存编号") + private String stockId; + + /** + * 库区编号 + */ + @ExcelExport("库区编号") + private String warehouseName; + + + + /** + * 库位ID + */ + @ExcelExport("库位") + private String locationId; + + /** + * 托盘号 + */ + @ExcelExport("箱号") + private String vehicleId; + + /** + * 物料编号 + */ + @ExcelExport("零件号") + private String goodsId; + + /** + * 物料名称 + */ + @ExcelExport("零件名称") + private String goodsName; + + /** + * 批次号 + */ + @ExcelExport("批次号") + private String batchNo; + + /** + * 可用数量 + */ + @ExcelExport("可用数量") + private Integer availableNum; + + /** + * 剩余数量 + */ + @ExcelExport("剩余数量") + private Integer remainNum; + + private String operationType; + /** + * 实际数量 + */ + @ExcelExport("实际数量") + private Integer realNum; + + /** + * 供应商编号 + */ + @ExcelExport("供应商编号") + private String providerId; + /** + * 供应商名称 + */ + @ExcelExport("供应商名称") + private String providerName; + /** + * 生产日期 + */ + @ExcelExport("生产日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private LocalDate productionDate; + /** + * 过期日期 + */ + @ExcelExport("过期日期") + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date expirationDate; + /** + * 库存状态 + * 正常、出库中、锁定 等 + */ + @ExcelExport("库存状态") + private Integer stockStatus; + /** + * 物料状态 + * 合格、不合格、报废、延期 等 + */ + @ExcelExport("零件状态") + private Integer goodsStatus; + /** + * 创建时间 + */ + @ExcelExport("入库时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + /** + * 最后更新时间 + */ + @ExcelExport("最后更新时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date lastUpdateTime; + /** + * 最后更新用户 + */ + @ExcelExport("上架人") + private String lastUpdateUser; + /** + * 备注 + */ + @ExcelExport("备注") + private String remark; + /** + * 是否盘点 + */ + @ExcelExport("是否盘点") + private Integer isInventory; + /** + * 盘点任务号 盘点出库和盘点入库同样 + */ + @ExcelExport("盘点任务号") + private String inventoryTaskId; + /** + * 当前位置 + */ + @ExcelExport("当前位置") + private String currentLocation; + + /** + * 保质期 + */ + @ExcelExport("保质期") + private Double shelfLife; + + public Stock() { + + } + + public Stock(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getStockId() { + return stockId; + } + + public String getWarehouseName() { return warehouseName; } + + public void setWarehouseName(String warehouseName) { this.warehouseName = warehouseName; } + + public void setStockId(String stockId) { + this.stockId = stockId; + } + + public String getLocationId() { + return locationId; + } + + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + public String getVehicleId() { + return vehicleId; + } + + public void setVehicleId(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + public String getBatchNo() { + return batchNo; + } + + public void setBatchNo(String batchNo) { + this.batchNo = batchNo; + } + + public String getOperationType() { + return operationType; + } + + public void getOperationType(String operationType) { + this.operationType = operationType; + } + + public Integer getRemainNum() { + return remainNum; + } + + public void setRemainNum(Integer remainNum) { + this.remainNum = remainNum; + } + + public Integer getAvailableNum() { + return availableNum; + } + + public void setAvailableNum(Integer availableNum) { + this.availableNum = availableNum; + } + + public Integer getRealNum() { + return realNum; + } + + public void setRealNum(Integer realNum) { + this.realNum = realNum; + } + + public String getProviderId() { + return providerId; + } + + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + public String getProviderName() { + return providerName; + } + + public void setProviderName(String providerName) { + this.providerName = providerName; + } + + + public Date getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate(Date expirationDate) { + this.expirationDate = expirationDate; + } + + public Integer getStockStatus() { + return stockStatus; + } + + public void setStockStatus(Integer stockStatus) { + this.stockStatus = stockStatus; + } + + public Integer getGoodsStatus() { + return goodsStatus; + } + + public void setGoodsStatus(Integer goodsStatus) { + this.goodsStatus = goodsStatus; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getLastUpdateTime() { + return lastUpdateTime; + } + + public void setLastUpdateTime(Date lastUpdateTime) { + this.lastUpdateTime = lastUpdateTime; + } + + public String getLastUpdateUser() { + return lastUpdateUser; + } + + public void setLastUpdateUser(String lastUpdateUser) { + this.lastUpdateUser = lastUpdateUser; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Integer getIsInventory() { + return isInventory; + } + + public void setIsInventory(Integer isInventory) { + this.isInventory = isInventory; + } + + public String getInventoryTaskId() { + return inventoryTaskId; + } + + public void setInventoryTaskId(String inventoryTaskId) { + this.inventoryTaskId = inventoryTaskId; + } + + public String getCurrentLocation() { + return currentLocation; + } + + public void setCurrentLocation(String currentLocation) { + this.currentLocation = currentLocation; + } + + public Double getShelfLife() { + return shelfLife; + } + + public void setShelfLife(Double shelfLife) { + this.shelfLife = shelfLife; + } + + public LocalDate getProductionDate() { + return productionDate; + } + + public void setProductionDate(LocalDate productionDate) { + this.productionDate = productionDate; + } +} diff --git a/src/main/java/com/wms/entity/table/Task.java b/src/main/java/com/wms/entity/table/Task.java new file mode 100644 index 0000000..1c3a47c --- /dev/null +++ b/src/main/java/com/wms/entity/table/Task.java @@ -0,0 +1,348 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.wms.entity.BaseEntity; +import com.wms.utils.excel.ExcelExport; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDate; +import java.util.Date; + +/** + * 任务 + */ +public class Task extends BaseEntity { + + + /** + * 物料编号 + */ + @ExcelExport("零件号") + private String goodsId; + + /** + * 任务编号 + */ + @ExcelExport("箱号") + private String taskId; + + /** + * 物料名称 + */ + @ExcelExport("零件名称") + private String goodsName; + + + /** + * 任务类型 + */ + @ExcelExport("任务类型") + private Integer taskType; + + /** + * 任务组 + */ + @ExcelExport("任务组") + private String taskGroup; + + /** + * 起点 + */ + @ExcelExport("起点") + private String origin; + + /** + * 终点 + */ + @ExcelExport("终点") + private String destination; + + /** + * 拣选站台 + */ + @ExcelExport("拣选站台") + private String pickStand; + + /** + * 重量 + */ + @ExcelExport("重量") + private Double weight; + + /** + * 生产日期 + */ + @ExcelExport("生产日期") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDate productionDate; + + /** + * 过期日期 + */ + @ExcelExport("有效日期") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date expirationDate; + + /** + * 本次操作数量 + */ + @ExcelExport("操作数量") + private Integer operateNum; + + /** + * 库存总数量 + */ + @ExcelExport("库存数量") + private Integer totalNum; + + /** + * 任务优先级 + */ + @ExcelExport("任务优先级") + private Integer taskPriority; + + /** + * 卡特任务的id + */ + @ExcelExport("配件任务号") + private String kateTaskId; + + /** + * 操作人员姓名 + */ + @ExcelExport("操作人员姓名") + private String userName; + + /** + * 创建时间 + */ + @ExcelExport("创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** + * 完成时间 + */ + @ExcelExport("任务完成时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date finishTime; + + + /** + * 任务状态 + */ + @ExcelExport("任务状态") + private Integer taskStatus; + + /** + * 载具编号 + */ + + private String vehicleNo; + + /** + * 尺寸 + */ + private Integer vehicleSize; + + + /** + * 电子标签库位 + */ + private String etagLocation; + + /** + * 备用字段 + * 1. 原包装出库的货架号 + */ + private String remark1; + + public String getTaskId() { + return taskId; + } + + public void setTaskId(String taskId) { + this.taskId = taskId; + } + + public Integer getTaskType() { + return taskType; + } + + public void setTaskType(Integer taskType) { + this.taskType = taskType; + } + + public Integer getTaskStatus() { + return taskStatus; + } + + public void setTaskStatus(Integer taskStatus) { + this.taskStatus = taskStatus; + } + + public String getTaskGroup() { + return taskGroup; + } + + public void setTaskGroup(String taskGroup) { + this.taskGroup = taskGroup; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getDestination() { + return destination; + } + + public void setDestination(String destination) { + this.destination = destination; + } + + public String getPickStand() { + return pickStand; + } + + public void setPickStand(String pickStand) { + this.pickStand = pickStand; + } + + public Double getWeight() { + return weight; + } + + public void setWeight(Double weight) { + this.weight = weight; + } + + public String getVehicleNo() { + return vehicleNo; + } + + public void setVehicleNo(String vehicleNo) { + this.vehicleNo = vehicleNo; + } + + public Integer getVehicleSize() { + return vehicleSize; + } + + public void setVehicleSize(Integer vehicleSize) { + this.vehicleSize = vehicleSize; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getGoodsId() { + return goodsId; + } + + public void setGoodsId(String goodsId) { + this.goodsId = goodsId; + } + + public String getGoodsName() { + return goodsName; + } + + public void setGoodsName(String goodsName) { + this.goodsName = goodsName; + } + + + public Date getExpirationDate() { + return expirationDate; + } + + public void setExpirationDate(Date expirationDate) { + this.expirationDate = expirationDate; + } + + public Integer getOperateNum() { + return operateNum; + } + + public void setOperateNum(Integer operateNum) { + this.operateNum = operateNum; + } + + public Integer getTotalNum() { + return totalNum; + } + + public void setTotalNum(Integer totalNum) { + this.totalNum = totalNum; + } + + public String getEtagLocation() { + return etagLocation; + } + + public void setEtagLocation(String etagLocation) { + this.etagLocation = etagLocation; + } + + public Integer getTaskPriority() { + return taskPriority; + } + + public void setTaskPriority(Integer taskPriority) { + this.taskPriority = taskPriority; + } + + public String getKateTaskId() { + return kateTaskId; + } + + public void setKateTaskId(String kateTaskId) { + this.kateTaskId = kateTaskId; + } + + public Date getFinishTime() { + return finishTime; + } + + public void setFinishTime(Date finishTime) { + this.finishTime = finishTime; + } + + public String getRemark1() { + return remark1; + } + + public void setRemark1(String remark1) { + this.remark1 = remark1; + } + + public LocalDate getProductionDate() { + return productionDate; + } + + public void setProductionDate(LocalDate productionDate) { + this.productionDate = productionDate; + } +} diff --git a/src/main/java/com/wms/entity/table/User.java b/src/main/java/com/wms/entity/table/User.java new file mode 100644 index 0000000..ee3c8ea --- /dev/null +++ b/src/main/java/com/wms/entity/table/User.java @@ -0,0 +1,101 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.wms.entity.BaseEntity; + +import java.util.Date; + +/** + * 用户 + */ +public class User extends BaseEntity { + /** 用户ID */ + private Integer userId; + + /** 用户名 */ + private String userName; + + /** 角色Id */ + private Integer roleId = null; + + /** 登录账户 */ + private String loginAccount; + + /** 登录密码 */ + private String loginPassword; + + /** 添加时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date addTime; + + /** 更新时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** 添加用户名 */ + private String addUser; + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Integer getRoleId() { + return roleId; + } + + public void setRoleId(Integer roleId) { + this.roleId = roleId; + } + + public String getLoginAccount() { + return loginAccount; + } + + public void setLoginAccount(String loginAccount) { + this.loginAccount = loginAccount; + } + + public String getLoginPassword() { + return loginPassword; + } + + public void setLoginPassword(String loginPassword) { + this.loginPassword = loginPassword; + } + + public Date getAddTime() { + return addTime; + } + + public void setAddTime(Date addTime) { + this.addTime = addTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getAddUser() { + return addUser; + } + + public void setAddUser(String addUser) { + this.addUser = addUser; + } +} diff --git a/src/main/java/com/wms/entity/table/VechileList.java b/src/main/java/com/wms/entity/table/VechileList.java new file mode 100644 index 0000000..1b633cc --- /dev/null +++ b/src/main/java/com/wms/entity/table/VechileList.java @@ -0,0 +1,26 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + + +public class VechileList extends BaseEntity { + /** + * 载具编号 + */ + private String vehicleId; + + public VechileList() { + + } + public VechileList(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getVehicleId() { + return vehicleId; + } + + public void setVehicleId(String vehicleId) { + this.vehicleId = vehicleId; + } +} diff --git a/src/main/java/com/wms/entity/table/Vehicle.java b/src/main/java/com/wms/entity/table/Vehicle.java new file mode 100644 index 0000000..30a7859 --- /dev/null +++ b/src/main/java/com/wms/entity/table/Vehicle.java @@ -0,0 +1,65 @@ +package com.wms.entity.table; + +import com.wms.entity.BaseEntity; + +/** + * 载具 + */ +public class Vehicle extends BaseEntity { + /** + * 载具编号 + */ + private String vehicleId; + /** + * 当前所在位置 + */ + private String currentLocation; + /** + * 载具状态 + */ + private Integer vehicleStatus; + /** + * 是否是空箱 + */ + private Integer isEmpty; + + public Vehicle() { + + } + + public Vehicle(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getVehicleId() { + return vehicleId; + } + + public void setVehicleId(String vehicleId) { + this.vehicleId = vehicleId; + } + + public String getCurrentLocation() { + return currentLocation; + } + + public void setCurrentLocation(String currentLocation) { + this.currentLocation = currentLocation; + } + + public Integer getVehicleStatus() { + return vehicleStatus; + } + + public void setVehicleStatus(Integer vehicleStatus) { + this.vehicleStatus = vehicleStatus; + } + + public Integer getIsEmpty() { + return isEmpty; + } + + public void setIsEmpty(Integer isEmpty) { + this.isEmpty = isEmpty; + } +} diff --git a/src/main/java/com/wms/entity/table/oledIn.java b/src/main/java/com/wms/entity/table/oledIn.java new file mode 100644 index 0000000..b5b7aee --- /dev/null +++ b/src/main/java/com/wms/entity/table/oledIn.java @@ -0,0 +1,56 @@ +package com.wms.entity.table; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class oledIn { + /** + * 母托号 + */ + @JsonProperty(value = "vehicleNo") + private String vehicleNo; + + /** + * 物料号/序列号 + */ + @JsonProperty(value = "goodsId") + private String goodsId; + + /** + * 机型 + */ + @JsonProperty(value = "model") + private String model; + + /** + * 数量 + */ + @JsonProperty(value = "goodsNum") + private String goodsNum; + + + /** + * 点位 + */ + @JsonProperty(value = "point") + private String point; + + /** + * 备注 + */ + @JsonProperty(value = "remark") + private String remark; + + /** + * 状态 + */ + @JsonProperty(value = "status") + private String status; +} diff --git a/src/main/java/com/wms/entity/test/ExcelTest.java b/src/main/java/com/wms/entity/test/ExcelTest.java new file mode 100644 index 0000000..03bead4 --- /dev/null +++ b/src/main/java/com/wms/entity/test/ExcelTest.java @@ -0,0 +1,36 @@ +package com.wms.entity.test; + +import com.wms.utils.excel.ExcelExport; +import com.wms.utils.excel.ExcelImport; + +public class ExcelTest { + @ExcelImport("库位") + @ExcelExport("库位") + private String locationId; + @ExcelImport("箱号") + @ExcelExport("箱号") + private String vehicleId; + + public ExcelTest(){}; + + public ExcelTest(String locationId, String vehicleId) { + this.locationId = locationId; + this.vehicleId = vehicleId; + } + + public String getLocationId() { + return locationId; + } + + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + public String getVehicleId() { + return vehicleId; + } + + public void setVehicleId(String vehicleId) { + this.vehicleId = vehicleId; + } +} diff --git a/src/main/java/com/wms/filter/GlobalExceptionHandler.java b/src/main/java/com/wms/filter/GlobalExceptionHandler.java new file mode 100644 index 0000000..21c07d0 --- /dev/null +++ b/src/main/java/com/wms/filter/GlobalExceptionHandler.java @@ -0,0 +1,41 @@ +package com.wms.filter; + +import com.alibaba.fastjson.JSON; +import com.wms.entity.app.container.ContainerApiLocalResponse; +import com.wms.entity.app.mes.MesApiLocalResponse; +import org.springframework.context.support.DefaultMessageSourceResolvable; +import org.springframework.validation.ObjectError; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.lang.reflect.Method; +import java.util.List; +import java.util.stream.Collectors; + +@ControllerAdvice +public class GlobalExceptionHandler { + @ExceptionHandler(value = MethodArgumentNotValidException.class) + @ResponseBody + public String handleMethodArgumentNotValidException(MethodArgumentNotValidException e) { + StringBuilder sb = new StringBuilder(); + List allErrors = e.getBindingResult().getAllErrors(); + String message = allErrors.stream().map(DefaultMessageSourceResolvable::getDefaultMessage).collect(Collectors.joining(";")); + Method method = e.getParameter().getMethod(); + if(method != null) { + Class controllerClass = method.getDeclaringClass(); + String className = controllerClass.getName(); + if(className.contains("MesController")) { + /* 给mes返回的异常信息 */ + return JSON.toJSONString(new MesApiLocalResponse(0, message)); + } + if(className.contains("ContainerController")) { + /* 给四向车返回的异常信息 */ + return JSON.toJSONString(new ContainerApiLocalResponse("999", message)); + } + } + return String.format("{\"code\": 999, \"message\": \"%s\"}", message); + } + +} diff --git a/src/main/java/com/wms/mapper/AppOrderInMapper.java b/src/main/java/com/wms/mapper/AppOrderInMapper.java new file mode 100644 index 0000000..da69ad7 --- /dev/null +++ b/src/main/java/com/wms/mapper/AppOrderInMapper.java @@ -0,0 +1,98 @@ +package com.wms.mapper; + +import com.wms.entity.table.AppOrderIn; +import com.wms.entity.table.Location; +import com.wms.entity.table.OrderOut; +import com.wms.entity.table.Vehicle; +import org.apache.ibatis.annotations.Param; +import org.mapstruct.Mapper; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +@Mapper +public interface AppOrderInMapper { + + /** + * 条件查询,结果会按照创建时间倒序排列 + * @param queryParam 查询条件 + * @return 查询结果 + */ + List select(AppOrderIn queryParam); + + + + + /** + * 插入一条数据 + * @param appOrderIn 要插入的数据 + * @return 插入的数据行数 + */ + int insert(AppOrderIn appOrderIn); + + /** + * 批量插入数据 + * @param appOrderInList 要插入的数据 + * @return 插入的数据行数 + */ + int insertList(List appOrderInList); + + /** + * 更新一条数据 + * @param appOrderIn 要更新的数据 + * @return 更新的数据行数 + */ + int update(AppOrderIn appOrderIn); + + /** + * 删除一条数据 + * @param rowId 要删除的数据的rowId + * @return 删除的数据行数 + */ + int delete(String rowId); + + + + /** + * 条件查询 + * @param searchStr 查询字符串 + * @param orderStatus 状态 + * @return 查询结果 + */ + List selectWithParams(@Param("searchStr") String searchStr, @Param("orderStatus") List orderStatus); + + + /** + * 根据车辆编号更新状态 + * @param vehicleNo 车辆编号 + * @param orderStatus 状态 + * @return 更新的数据行数 + */ + int updateStatusWithVehicleNo(@Param("vehicleNo") String vehicleNo, @Param("orderStatus") Integer orderStatus); + + + /** + * 根据车辆编号查询 + * @param vehicleNo 车辆编号 + * @return 查询结果 + */ + List selectWithVehicle(@Param("vehicleNo") String vehicleNo); + + + + List selectWithGoodsId(@Param("goodsId") String goodsId); + + + List selectWithRowId(@Param("rowId") String rowId); + + + //List selectWithBatchNo(@Param("batchNo") String batchNo, @Param("goodsNum") BigDecimal goodsNum); + + List selectWithBatchNo(Map params); + + + int deleteByCheckNoGood(String remark); + + int deleteByVehicleNo(String vehicleNo); +} diff --git a/src/main/java/com/wms/mapper/ConfigMapper.java b/src/main/java/com/wms/mapper/ConfigMapper.java new file mode 100644 index 0000000..55d19c7 --- /dev/null +++ b/src/main/java/com/wms/mapper/ConfigMapper.java @@ -0,0 +1,26 @@ +package com.wms.mapper; + +import com.wms.entity.table.Config; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 配置 + */ +@Mapper +public interface ConfigMapper { + /** + * 通过键查询配置值(configKey为null或者空时,查询所有的键值) + * @param configKey 键值 + * @return 结果 + */ + List selectConfigs(String configKey); + + /** + * 更新系统配置信息 + * @param config 配置 + * @return 结果 + */ + int updateConfig(Config config); +} diff --git a/src/main/java/com/wms/mapper/GoodsMapper.java b/src/main/java/com/wms/mapper/GoodsMapper.java new file mode 100644 index 0000000..424259c --- /dev/null +++ b/src/main/java/com/wms/mapper/GoodsMapper.java @@ -0,0 +1,45 @@ +package com.wms.mapper; + +import com.wms.entity.table.Goods; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface GoodsMapper { + + /** + * 查询物料信息 + * @param goods + * @return + */ + List selGoods(Goods goods); + + /** + * 根据物料id查询物料信息 + * @param goodsId + * @return + */ + Goods selGoodsByGoodsId(String goodsId); + + /** + * 添加物料信息 + * @param goods + * @return + */ + int addGoods(Goods goods); + + /** + * 修改物料信息 + * @param goods + * @return + */ + int modifyGoods(Goods goods); + + /** + * 删除物料信息 + * @param goodsId + * @return + */ + int deleteGoods(String goodsId); +} diff --git a/src/main/java/com/wms/mapper/LocationMapper.java b/src/main/java/com/wms/mapper/LocationMapper.java new file mode 100644 index 0000000..731a39a --- /dev/null +++ b/src/main/java/com/wms/mapper/LocationMapper.java @@ -0,0 +1,44 @@ +package com.wms.mapper; + +import com.wms.entity.table.Location; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface LocationMapper { + + /** + * 查询库位列表 + * @param location + * @return + */ + List selLocations(Location location); + + + List selLocationsByDesc(Location location); + + + List selSmallDepthLocations(Location location); + + /** + * 查找下一个可用库位 + * @param location 具体信息 + * @return 结果 + */ + List selNextLocation(Location location); + + /** + * 添加一个新库位 + * @param location 库位信息 + * @return 添加结果 + */ + int addLocation(Location location); + + /** + * 修改库位信息 + * @param location + * @return + */ + int modifyLocation(Location location); +} diff --git a/src/main/java/com/wms/mapper/MenuMapper.java b/src/main/java/com/wms/mapper/MenuMapper.java new file mode 100644 index 0000000..1a33e36 --- /dev/null +++ b/src/main/java/com/wms/mapper/MenuMapper.java @@ -0,0 +1,18 @@ +package com.wms.mapper; + +import com.wms.entity.table.Menu; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 菜单Mapper + */ +@Mapper +public interface MenuMapper { + + List selMenuByRoleId(int roleId); + List selMenuByMenuIds(@Param("menuIds") List menuIds); + +} diff --git a/src/main/java/com/wms/mapper/OledInMapper.java b/src/main/java/com/wms/mapper/OledInMapper.java new file mode 100644 index 0000000..f09459f --- /dev/null +++ b/src/main/java/com/wms/mapper/OledInMapper.java @@ -0,0 +1,28 @@ +package com.wms.mapper; + +import com.wms.entity.table.OrderCheck; +import com.wms.entity.table.oledIn; +import org.mapstruct.Mapper; + +import java.util.List; + +@Mapper +public interface OledInMapper { + + /** + * 插入一条记录 + * @param oledIn 记录 + * @return 插入数量 + */ + int insert(oledIn oledIn); + + + List selectAll(); + + /** + * 删除一条记录 + */ + int delete(oledIn oledIn); + + int deleteByVehicleNo(String vehicleNo); +} diff --git a/src/main/java/com/wms/mapper/OrderCheckMapper.java b/src/main/java/com/wms/mapper/OrderCheckMapper.java new file mode 100644 index 0000000..b517798 --- /dev/null +++ b/src/main/java/com/wms/mapper/OrderCheckMapper.java @@ -0,0 +1,43 @@ +package com.wms.mapper; + +import com.wms.entity.table.OrderCheck; +import org.mapstruct.Mapper; + +import java.util.List; + +@Mapper +public interface OrderCheckMapper { + + /** + * 插入一条记录 + * @param orderCheck 记录 + * @return 插入数量 + */ + int insert(OrderCheck orderCheck); + + int update(OrderCheck orderCheck); + /** + * 条件查询 + * @param orderCheck 查询条件 + * @return 查询结果 + */ + List query(OrderCheck orderCheck); + + List queryByRecordId(String recordId); + /** + * 插入 批量 + * @param orderChecks 记录 + * @return 插入数量 + */ + int insertList(List orderChecks); + + + List queryAll(); + + + int delete(String record_id); + + + + +} diff --git a/src/main/java/com/wms/mapper/OrderOutMapper.java b/src/main/java/com/wms/mapper/OrderOutMapper.java new file mode 100644 index 0000000..18991ac --- /dev/null +++ b/src/main/java/com/wms/mapper/OrderOutMapper.java @@ -0,0 +1,60 @@ +package com.wms.mapper; + +import com.wms.entity.table.OrderOut; +import org.apache.ibatis.annotations.Param; +import org.mapstruct.Mapper; + +import java.util.List; + +@Mapper +public interface OrderOutMapper { + + /** + * 插入 + * @param data 要插入的数据 + * @return 插入的行数 + */ + int insert(OrderOut data); + + int update(OrderOut data); + + /** + * 批量插入 + * @param data 要插入的数据 + * @return 插入的行数 + */ + int insertList(List data); + + /** + * 删除 + * @param rowId 要删除的数据的rowId + * @return 删除的行数 + */ + int deleteOrderOut(String rowId); + + + int deleteOrdersByType(int orderType); + /** + * 查询数据 + * @param data 查询条件 + * @return 查到的数据 + */ + List query(OrderOut data); + + List queryAll(); + + List queryByType(); + + List queryWithOrderStatus(OrderOut data); + + List queryWithRowId(@Param("rowId") String rowId); + + /** + * 查询数据 + * @param searchStr 查询条件 + * @param orderStatus 查询条件 + * @return 查到的数据 + */ + List queryWithParams(@Param("searchStr") String searchStr, @Param("orderStatus") List orderStatus); + +} diff --git a/src/main/java/com/wms/mapper/OrderOutRecordMapper.java b/src/main/java/com/wms/mapper/OrderOutRecordMapper.java new file mode 100644 index 0000000..4fbaf10 --- /dev/null +++ b/src/main/java/com/wms/mapper/OrderOutRecordMapper.java @@ -0,0 +1,21 @@ +package com.wms.mapper; + +import com.wms.entity.table.OrderOut; +import org.mapstruct.Mapper; + +import java.util.List; + +@Mapper +public interface OrderOutRecordMapper { + + + /** + * 插入数据 + */ + int insert(OrderOut data); + + /** + * 批量插入数据 + */ + int insertList(List data); +} diff --git a/src/main/java/com/wms/mapper/PartInfoMapper.java b/src/main/java/com/wms/mapper/PartInfoMapper.java new file mode 100644 index 0000000..540b392 --- /dev/null +++ b/src/main/java/com/wms/mapper/PartInfoMapper.java @@ -0,0 +1,16 @@ +package com.wms.mapper; + +import com.wms.entity.table.PartInfo; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface PartInfoMapper { + List selParts(PartInfo partInfo); + List selPartsByEqual(PartInfo partInfo); + PartInfo selPartByPartNo(String material); + int addPart(PartInfo partInfo); + int modifyPart(PartInfo partInfo); + int deletePartByPartNo(String material); +} diff --git a/src/main/java/com/wms/mapper/PermissionMapper.java b/src/main/java/com/wms/mapper/PermissionMapper.java new file mode 100644 index 0000000..c8d61f3 --- /dev/null +++ b/src/main/java/com/wms/mapper/PermissionMapper.java @@ -0,0 +1,15 @@ +package com.wms.mapper; + +import com.wms.entity.table.Permission; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface PermissionMapper { + List selectPermissionByRoleId(Permission permission); + List selectPermissionWithOutL1(int roleId, String menuIds); + List selectAll(); + int saveBatch(List permissions); + int removePermissonsByRoleId(Permission permission); +} diff --git a/src/main/java/com/wms/mapper/RoleMapper.java b/src/main/java/com/wms/mapper/RoleMapper.java new file mode 100644 index 0000000..0186019 --- /dev/null +++ b/src/main/java/com/wms/mapper/RoleMapper.java @@ -0,0 +1,15 @@ +package com.wms.mapper; + +import com.wms.entity.table.Role; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface RoleMapper { + List selectRoles(Role role); + Role selectMaxRoleId(); + int addRole(Role role); + int removeRole(Role role); + int updateRole(Role role); +} diff --git a/src/main/java/com/wms/mapper/StandMapper.java b/src/main/java/com/wms/mapper/StandMapper.java new file mode 100644 index 0000000..cedcf7d --- /dev/null +++ b/src/main/java/com/wms/mapper/StandMapper.java @@ -0,0 +1,19 @@ +package com.wms.mapper; + +import com.wms.entity.table.Stand; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface StandMapper { + List selStands(Stand stand); + + Stand selStandById(String standId); + + int addStand(Stand stand); + + int modifyStand(Stand stand); + + int deleteStand(Stand stand); +} diff --git a/src/main/java/com/wms/mapper/StockMapper.java b/src/main/java/com/wms/mapper/StockMapper.java new file mode 100644 index 0000000..1a03142 --- /dev/null +++ b/src/main/java/com/wms/mapper/StockMapper.java @@ -0,0 +1,164 @@ +package com.wms.mapper; + +import com.wms.entity.table.AppOrderIn; +import com.wms.entity.table.Stock; +import com.wms.entity.table.Task; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.Date; +import java.util.List; + +@Mapper +public interface StockMapper { + + /** + * 查询库存列表 + * @param stock 库存参数 + * @return 结果 + */ + List selStocks(Stock stock); + + /** + * 查询库存,前端用 + * @param query 查询键值 + * @return 结果 + */ + List selStocksFront(@Param("query") String query); + + + + List selStocksFrontTwo(@Param("query") String query, @Param("vehicle") String vehicle); + + /** + * 添加库存 + * @param stock + * @return + */ + int addStock(Stock stock); + + /** + * 修改库存信息 + * @param stock + * @return + */ + int modifyStock(Stock stock); + + + /** + * 根据批次号分组查询库存 + * @param + * @return + */ + List groupByVehicleNo(@Param("locationId") String locationId); + + + + List groupByBatchNo(@Param("locationId") String locationId); + + /** + * 修改库存存储的位置 + * @param oldLocationId 旧库位 + * @param newLocationId 新库位 + * @return 结果 + */ + int updateLocation(@Param("oldLocationId") String oldLocationId, @Param("newLocationId") String newLocationId); + + /** + * 更新库存里的库位和库存状态 + * @param oldLocationId 旧库位 + * @param newLocationId 新库位 + * @param status 状态 + * @return 结果 + */ + int updateLocationAndStatus(@Param("oldLocationId") String oldLocationId, @Param("newLocationId") String newLocationId, @Param("status") Integer status); + + /** + * 删除库存 + * @param stockId + * @return + */ + int deleteStock(String stockId); + + /** + * 根据库位删除库存 + * @param locationId 库位 + * @return 删除结果 + */ + int deleteStockWithLocationId(@Param("locationId") String locationId); + + /** + * 根据库位更新库位状态 + * @param locationId 库位 + * @param status 状态 + * @return 更新结果 + */ + int updateStockStatusWithLocationId(@Param("locationId") String locationId, @Param("status") Integer status); + + + /** + * 根据库存id更新库存可用数量 + * @param stockId 库存id + * @param availableNum 可用数量 + * @return 更新结果 + */ + int updateStockAvailableNumWithStockId(@Param("stockId") String stockId, @Param("availableNum") Integer availableNum); + + + /** + * 根据库存id更新库存生产日期 + * @param stockId 库存id + * @param productionDate 生产日期 + * @return 更新结果 + */ + int updateStockProductionDateWithStockId(@Param("stockId") String stockId, @Param("productionDate") Date productionDate); + + + + + int updateLocationIdWithBetchNo(@Param("batchNo") String batchNo, @Param("locationId") String locationId); + + + + /** + * 根据商品id查询库存 + * @param stock + * @return + */ + List selStocksByGoodsId(Stock stock); + + + + /** + * 根据库位查询库存 + * @param + * @return + */ + List selStocksByLocationId(@Param("locationId") String locationId); + /** + * 查询过期库存 + * @return + */ + List selStockOutOfDate(); + + /** + * 查询库存快过期的库存 + * @param nearInterval 快过期的间隔天数 + * @return + */ + List selStockNearDeadLine(int nearInterval); + + /** + * 查询库存长时间未使用 + * @param nearInterval 长时间未使用的间隔天数 + * @return + */ + List selStockLongTimeNoUse(int nearInterval); + + /** + * 重置库存 + * @param stock + * @return + */ + int resetStock(Stock stock); +} diff --git a/src/main/java/com/wms/mapper/TaskMapper.java b/src/main/java/com/wms/mapper/TaskMapper.java new file mode 100644 index 0000000..e0cb70b --- /dev/null +++ b/src/main/java/com/wms/mapper/TaskMapper.java @@ -0,0 +1,51 @@ +package com.wms.mapper; + +import com.wms.entity.table.Task; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface TaskMapper { + + /** + * 查找任务 + * @param task + * @return 符合条件的任务列表 + */ + List selTasks(Task task); + + + + List selTasksByTaskId(Task task); + /** + * 添加任务 + * @param task + * @return + */ + int addTask(Task task); + + /** + * 添加任务 + * @param tasks + * @return + */ + int addTasks(List tasks); + + /** + * 执行任务 + * @param task + * @return + */ + int executeTask(Task task); + + /** + * 删除任务 + * @param taskId + * @return + */ + int deleteTask(String taskId); + + + List haveNotCompleteTask(String location); +} diff --git a/src/main/java/com/wms/mapper/TaskRecordMapper.java b/src/main/java/com/wms/mapper/TaskRecordMapper.java new file mode 100644 index 0000000..f100620 --- /dev/null +++ b/src/main/java/com/wms/mapper/TaskRecordMapper.java @@ -0,0 +1,40 @@ +package com.wms.mapper; + +import com.wms.entity.table.Task; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface TaskRecordMapper { + + /** + * 查找任务记录 + * @param taskRecord 任务记录 + * @return 符合条件的任务列表 + */ + List selTasks(Task taskRecord); + + /** + * 添加任务记录 + * @param taskRecord 任务记录 + * @return 结果 + */ + int addTask(Task taskRecord); + + /** + * 更新任务记录 + * @param taskRecord 任务记录 + * @return 结果 + */ + int executeTask(Task taskRecord); + + /** + * 删除任务 + * @param taskId 任务记录 + * @return 结果 + */ + int deleteTask(String taskId); + + int deleteTaskRecordRegularly(); +} diff --git a/src/main/java/com/wms/mapper/UserMapper.java b/src/main/java/com/wms/mapper/UserMapper.java new file mode 100644 index 0000000..519d359 --- /dev/null +++ b/src/main/java/com/wms/mapper/UserMapper.java @@ -0,0 +1,38 @@ +package com.wms.mapper; + +import com.wms.entity.table.User; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface UserMapper { + /** + * 查找用户 + * @param user + * @return + */ + List selectUsers(User user); + + + /** + * 添加用户 + * @param user + * @return + */ + int addUsers(User user); + + /** + * 删除用户 + */ + int deleteUser(int userId); + + int updateUser(User user); + + /** + * 更新用户信息 + * @param user + * @return + */ + int updateUserInfromation(User user); +} diff --git a/src/main/java/com/wms/mapper/VehicleIistMapper.java b/src/main/java/com/wms/mapper/VehicleIistMapper.java new file mode 100644 index 0000000..5f040db --- /dev/null +++ b/src/main/java/com/wms/mapper/VehicleIistMapper.java @@ -0,0 +1,28 @@ +package com.wms.mapper; + +import com.wms.entity.table.VechileList; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface VehicleIistMapper { + /** + * 插入 + * @param vehicle 载具信息 + * @return 查询到的载具 + */ + int insert(VechileList vehicle); + + + List select(VechileList vehicle); + + List selectByEqual(VechileList vehicle); + + /** + * 删除 + * @param vehicle 载具信息 + * @return 查询到的载具 + */ + int delete(VechileList vehicle); +} diff --git a/src/main/java/com/wms/mapper/VehicleMapper.java b/src/main/java/com/wms/mapper/VehicleMapper.java new file mode 100644 index 0000000..1397d34 --- /dev/null +++ b/src/main/java/com/wms/mapper/VehicleMapper.java @@ -0,0 +1,55 @@ +package com.wms.mapper; + +import com.wms.entity.table.Vehicle; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface VehicleMapper { + /** + * 根据条件查找载具 + * @param vehicle 载具信息 + * @return 查询到的载具 + */ + List selVehicles(Vehicle vehicle); + + + List selVehiclesByEmptyOut(Vehicle vehicle); + + + /** + * 根据id查询载具 + * @param vehicleId 载具id + * @return 结果 + */ + Vehicle selVehicleById(String vehicleId); + + /** + * 添加载具 + * @param vehicle 载具 + * @return 结果 + */ + int addVehicle(Vehicle vehicle); + + /** + * 更新载具 + * @param vehicle 载具 + * @return 结果 + */ + int modifyVehicle(Vehicle vehicle); + + /*更新载具位置*/ + int updateLocation(String oldVehicleId, String newVehicleId); + + /** + * 删除载具 + * @param vehicle 载具 + * @return 结果 + */ + int deleteVehicle(Vehicle vehicle); + + + + int deleteVehicleByLocation(Vehicle vehicle); +} diff --git a/src/main/java/com/wms/service/ConfigService.java b/src/main/java/com/wms/service/ConfigService.java new file mode 100644 index 0000000..397ecd9 --- /dev/null +++ b/src/main/java/com/wms/service/ConfigService.java @@ -0,0 +1,20 @@ +package com.wms.service; + +import com.wms.entity.table.Config; + +import java.util.List; + +public interface ConfigService { + /** + * 通过键查询配置值(configKey为null或者空时,查询所有的键值) + * @param configKey 配置键值 + * @return 结果 + */ + List selectConfigs(String configKey); + + /** + * 更新系统配置信息 + * @param config 配置 + */ + int updateConfig(Config config); +} diff --git a/src/main/java/com/wms/service/ContainerService.java b/src/main/java/com/wms/service/ContainerService.java new file mode 100644 index 0000000..1fa5a38 --- /dev/null +++ b/src/main/java/com/wms/service/ContainerService.java @@ -0,0 +1,27 @@ +package com.wms.service; + +import com.wms.entity.app.container.ContainerApiLocalResponse; +import com.wms.entity.app.container.CreateInstoreTaskRequest; +import com.wms.entity.app.container.CreateInstoreTaskResponse; +import com.wms.entity.app.container.TaskStateNoticeRequest; + +/** + * 四向车api的Service + */ +public interface ContainerService { + + /** + * 接收四向车扫码入库信息 + * @param request 请求信息 + * @return 返回信息 + */ + CreateInstoreTaskResponse createInstoreTask(CreateInstoreTaskRequest request); + + + /** + * 接收四向车任务状态通知 + * @param request 请求信息 + * @return 响应信息 + */ + ContainerApiLocalResponse taskStateNotice( TaskStateNoticeRequest request); +} diff --git a/src/main/java/com/wms/service/GoodsService.java b/src/main/java/com/wms/service/GoodsService.java new file mode 100644 index 0000000..3c645f4 --- /dev/null +++ b/src/main/java/com/wms/service/GoodsService.java @@ -0,0 +1,43 @@ +package com.wms.service; + +import com.wms.entity.table.Goods; + +import java.util.List; + +public interface GoodsService { + + /** + * 查询物料信息 + * @param goods 物料 + * @return 结果 + */ + List selGoods(Goods goods); + + /** + * 根据物料id查询物料信息 + * @param goodsId 物料id + * @return 结果 + */ + Goods selGoodsByGoodsId(String goodsId); + + /** + * 添加物料信息 + * @param goods 物料信息 + * @return 物料 + */ + int addGoods(Goods goods); + + /** + * 修改物料信息 + * @param goods 物料信息 + * @return 结果 + */ + int modifyGoods(Goods goods); + + /** + * 删除物料信息 + * @param goodsId 物料id + * @return 结果 + */ + int deleteGoods(String goodsId); +} diff --git a/src/main/java/com/wms/service/IOrderCheckService.java b/src/main/java/com/wms/service/IOrderCheckService.java new file mode 100644 index 0000000..82ad0fe --- /dev/null +++ b/src/main/java/com/wms/service/IOrderCheckService.java @@ -0,0 +1,22 @@ +package com.wms.service; + +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.dto.orderCheck.addOrderCheckRequest; +import com.wms.entity.dto.orderCheck.queryOrderCheckRequest; +import com.wms.entity.table.OrderCheck; + +import java.util.List; + +public interface IOrderCheckService { + + WmsApiResponse> queryOrderCheck(queryOrderCheckRequest request); + + WmsApiResponse executeOrderCheck(String recordId); + + WmsApiResponse deleteOrderCheck(String recordId); + + WmsApiResponse deleteOrderCheckAll(String remarkReturn); + + WmsApiResponse addOrderCheck(addOrderCheckRequest request); + +} diff --git a/src/main/java/com/wms/service/IOrderInService.java b/src/main/java/com/wms/service/IOrderInService.java new file mode 100644 index 0000000..fd573a8 --- /dev/null +++ b/src/main/java/com/wms/service/IOrderInService.java @@ -0,0 +1,34 @@ +package com.wms.service; + +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.common.WmsApiResponseByCheckBack; +import com.wms.entity.dto.orderIn.*; +import com.wms.entity.table.AppOrderIn; + +import java.math.BigDecimal; +import java.util.List; + +public interface IOrderInService { + + WmsApiResponse> queryOrderIn(queryOrderInRequest request); + + WmsApiResponse loginInBad(loginInBad request); + + WmsApiResponse bindingVehicle(bindingVehicleRequest request); + + WmsApiResponse updateForNum(updateNumRequest request); + + WmsApiResponse updateForInformation(updateInformation request); + + WmsApiResponseByCheckBack> getOrderInWithVehicleNo(String vehicleNo); + + WmsApiResponse unBindingVehicle(String rowId); + + WmsApiResponse deleteOrderIn(String rowId); + + WmsApiResponse addOrderIn(downOrderInRequest request); + + WmsApiResponse addOrderInByBlinging(downOrderInRequest request, String userName); + + WmsApiResponse addInByTask(goodsInByTaskRequest request); +} diff --git a/src/main/java/com/wms/service/IOrderOutService.java b/src/main/java/com/wms/service/IOrderOutService.java new file mode 100644 index 0000000..3ecc2f1 --- /dev/null +++ b/src/main/java/com/wms/service/IOrderOutService.java @@ -0,0 +1,40 @@ +package com.wms.service; + +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.dto.orderOut.handOrderOutRequest; +import com.wms.entity.dto.orderOut.queryOrderOutRequest; +import com.wms.entity.table.OrderOut; +import com.wms.entity.table.Stock; +import org.apache.poi.ss.formula.functions.T; + +import java.sql.Wrapper; +import java.util.List; + +public interface IOrderOutService { + + int writeOrderOutList(OrderOut request); + + List getAllOrderOut(queryOrderOutRequest request); + + WmsApiResponse> queryOrderOut(queryOrderOutRequest request); + + WmsApiResponse executeOrderOut(String rowId); + + WmsApiResponse executeDownEmpty(); + + WmsApiResponse deleteOrderOut(String rowId); + + WmsApiResponse createOrderOut(handOrderOutRequest request); + + WmsApiResponse handFinish(String rowId); + + WmsApiResponse> queryOrderOutByLocation(queryOrderOutRequest request); + + WmsApiResponse executeOrderOutByLocation(String rowId); + + WmsApiResponse downCheckTask(Stock stock); + + //WmsApiResponse outRowStock(String rowId); + + +} diff --git a/src/main/java/com/wms/service/IRequestInService.java b/src/main/java/com/wms/service/IRequestInService.java new file mode 100644 index 0000000..fcb65b7 --- /dev/null +++ b/src/main/java/com/wms/service/IRequestInService.java @@ -0,0 +1,9 @@ +package com.wms.service; + +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.wcs.RequireInRequest; + +public interface IRequestInService { + + ResponseEntity emptyOrderIn(RequireInRequest request); +} diff --git a/src/main/java/com/wms/service/LocationService.java b/src/main/java/com/wms/service/LocationService.java new file mode 100644 index 0000000..b60fe4a --- /dev/null +++ b/src/main/java/com/wms/service/LocationService.java @@ -0,0 +1,39 @@ +package com.wms.service; + +import com.wms.entity.table.Location; + +import java.util.List; + +public interface LocationService { + + /** + * 查询库位列表 + * @param location 库位查询参数 + * @return 结果 + */ + List selLocations(Location location); + + + + List selDescLocations(Location location); + /** + * 查找下一个可用库位 + * @param location 设备id + * @return 结果 + */ + List selNextLocation(Location location); + + /** + * 添加一个新库位 + * @param location 库位信息 + * @return 添加结果 + */ + int addLocation(Location location); + + /** + * 修改库位信息 + * @param location 库位 + * @return 结果 + */ + int modifyLocation(Location location); +} diff --git a/src/main/java/com/wms/service/MenuService.java b/src/main/java/com/wms/service/MenuService.java new file mode 100644 index 0000000..19e4413 --- /dev/null +++ b/src/main/java/com/wms/service/MenuService.java @@ -0,0 +1,16 @@ +package com.wms.service; + +import com.wms.entity.table.Menu; + +import java.util.List; + +public interface MenuService { + /** + * 根据角色查找对应的菜单/权限 + * @param roleId 角色id + * @return 结果 + */ + List selMenuByRoleId(int roleId); + + List selMenuByMenuIds(List menuIds); +} diff --git a/src/main/java/com/wms/service/MesService.java b/src/main/java/com/wms/service/MesService.java new file mode 100644 index 0000000..1944d68 --- /dev/null +++ b/src/main/java/com/wms/service/MesService.java @@ -0,0 +1,36 @@ +package com.wms.service; + +import com.wms.entity.app.mes.CheckNoticeRequest; +import com.wms.entity.app.mes.MesApiLocalResponse; +import com.wms.entity.app.mes.OutNoticeRequest; +import com.wms.entity.app.mes.ReceiptInRequest; + +/** + * 上位系统交互 + * Mes 交互 Service + * @author icewint + */ +public interface MesService { + + /** + * mes 入库之前用此接口推送信息 + * @param request 请求信息 + * @return 返回信息 + */ + MesApiLocalResponse receiptIn(ReceiptInRequest request); + + /** + * mes 出库通知单 + * @param request 请求信息 + * @return 返回信息 + */ + MesApiLocalResponse outNotice(OutNoticeRequest request); + + /** + * mes 盘点通知单 IF206 + * @param request 请求信息 + * @return 返回信息 + */ + MesApiLocalResponse checkNotice(CheckNoticeRequest request); + +} diff --git a/src/main/java/com/wms/service/PartInfoService.java b/src/main/java/com/wms/service/PartInfoService.java new file mode 100644 index 0000000..af752b0 --- /dev/null +++ b/src/main/java/com/wms/service/PartInfoService.java @@ -0,0 +1,42 @@ +package com.wms.service; + +import com.wms.entity.table.PartInfo; + +import java.util.List; + +public interface PartInfoService { + /** + * 查询零件信息 + * @param partInfo 零件信息 + * @return 结果 + */ + List selParts(PartInfo partInfo); + + /** + * 根据零件号查询零件信息 + * @param material 零件号 + * @return 结果 + */ + PartInfo selPartByPartNo(String material); + + /** + * 添加零件 + * @param partInfo 零件信息 + * @return 结果 + */ + int addPart(PartInfo partInfo); + + /** + * 更新零件信息 + * @param partInfo 新的零件信息 + * @return 结果 + */ + int modifyPart(PartInfo partInfo); + + /** + * 根据零件号删除零件 + * @param material 零件号 + * @return 结果 + */ + int deletePartByPartNo(String material); +} diff --git a/src/main/java/com/wms/service/PermissionService.java b/src/main/java/com/wms/service/PermissionService.java new file mode 100644 index 0000000..25bd467 --- /dev/null +++ b/src/main/java/com/wms/service/PermissionService.java @@ -0,0 +1,13 @@ +package com.wms.service; + +import com.wms.entity.table.Permission; + +import java.util.List; + +public interface PermissionService { + List selectPermissionByRoleId(int roleId); + List selectPermissionWithOutL1(int roleId, List menuIds); + List selectAll(); + int saveBatch(List permissions); + int removePermissonsByRoleId(int roleId); +} diff --git a/src/main/java/com/wms/service/RoleService.java b/src/main/java/com/wms/service/RoleService.java new file mode 100644 index 0000000..195130c --- /dev/null +++ b/src/main/java/com/wms/service/RoleService.java @@ -0,0 +1,13 @@ +package com.wms.service; + +import com.wms.entity.table.Role; + +import java.util.List; + +public interface RoleService { + List selectRoles(Role role); + Role selectMaxRoleId(); + int addRole(Role role); + int removeRole(Role role); + int updateRole(Role role); +} diff --git a/src/main/java/com/wms/service/StandService.java b/src/main/java/com/wms/service/StandService.java new file mode 100644 index 0000000..23d6f42 --- /dev/null +++ b/src/main/java/com/wms/service/StandService.java @@ -0,0 +1,45 @@ +package com.wms.service; + +import com.wms.entity.table.Stand; + +import java.util.List; + +/** + * + */ +public interface StandService { + /** + * 查询站台 + * @param stand 查询参数 + * @return 结果 + */ + List selStands(Stand stand); + + /** + * 根据站台id查询站台 + * @param standId 站台id + * @return 结果 + */ + Stand selStandById(String standId); + + /** + * 添加新站台 + * @param stand 站台信息 + * @return 结果 + */ + int addStand(Stand stand); + + /** + * 更新站台信息 + * @param stand 更新参数 + * @return 结果 + */ + int modifyStand(Stand stand); + + /** + * 删除站台 + * @param stand 删除参数 + * @return 结果 + */ + int deleteStand(Stand stand); +} diff --git a/src/main/java/com/wms/service/StockService.java b/src/main/java/com/wms/service/StockService.java new file mode 100644 index 0000000..5b3776f --- /dev/null +++ b/src/main/java/com/wms/service/StockService.java @@ -0,0 +1,79 @@ +package com.wms.service; + +import com.wms.entity.table.Stock; + +import java.util.List; + +public interface StockService { + + /** + * 查询库存列表 + * @param stock 库存查询参数 + * @return 结果 + */ + List selStocks(Stock stock); + + /** + * 前端用查询库存 + * @param query 查询键值 + * @return 结果 + */ + List selStocksFront(String query); + + List selStocksFrontTwo(String query, String vehicle); + + /** + * 添加库存 + * @param stock 库存信息 + * @return 结果 + */ + int addStock(Stock stock); + + /** + * 修改库存信息 + * @param stock 库存信息 + * @return 结果 + */ + int modifyStock(Stock stock); + + /** + * 删除库存 + * @param stockId 库存id + * @return 结果 + */ + int deleteStock(String stockId); + + /** + * 根据零件号查询零件总数 + * @param stock 参数 + * @return 结果 + */ + List selStocksByGoodsId(Stock stock); + + /** + * 查询过期的合格物料 + * @return 结果 + */ + List selStockOutOfDate(); + + /** + * 查询临近期限的合格物料 + * @param nearInterval 天数 + * @return 结果 + */ + List selStockNearDeadLine(int nearInterval); + + /** + * 查询长时间未使用的库存 + * @param nearInterval 天数 + * @return 结果 + */ + List selStockLongTimeNoUse(int nearInterval); + + /** + * 重置库存数量 + * @param stock 参数 + * @return 结果 + */ + int resetStock(Stock stock); +} diff --git a/src/main/java/com/wms/service/TaskRecordService.java b/src/main/java/com/wms/service/TaskRecordService.java new file mode 100644 index 0000000..b362f80 --- /dev/null +++ b/src/main/java/com/wms/service/TaskRecordService.java @@ -0,0 +1,42 @@ +package com.wms.service; + +import com.wms.entity.table.Task; + +import java.util.List; + +public interface TaskRecordService { + + /** + * 查找任务记录 + * @param taskRecord 任务记录 + * @return 符合条件的任务列表 + */ + List selTasks(Task taskRecord); + + /** + * 添加任务记录 + * @param taskRecord 任务记录 + * @return 结果 + */ + int addTask(Task taskRecord); + + /** + * 更新任务记录 + * @param taskRecord 任务记录 + * @return 结果 + */ + int executeTask(Task taskRecord); + + /** + * 删除任务记录 + * @param taskId 任务id + * @return 结果 + */ + int deleteTask(String taskId); + + /** + * 定期删除任务记录 + * @return 结果 + */ + int deleteTaskRecordRegularly(); +} diff --git a/src/main/java/com/wms/service/TaskService.java b/src/main/java/com/wms/service/TaskService.java new file mode 100644 index 0000000..fed2bf2 --- /dev/null +++ b/src/main/java/com/wms/service/TaskService.java @@ -0,0 +1,38 @@ +package com.wms.service; + +import com.wms.entity.table.Task; + +import java.util.List; + +public interface TaskService{ + + /** + * 查找任务 + * @param task 任务 + * @return 符合条件的任务列表 + */ + List selTasks(Task task); + + /** + * 添加任务 + * @param task 任务 + * @return 结果 + */ + int addTask(Task task); + + List selTasksByTaskId(Task task); + + /** + * 执行任务 + * @param task 任务 + * @return 结果 + */ + int executeTask(Task task); + + /** + * 删除任务 + * @param taskId 任务id + * @return 结果 + */ + int deleteTask(String taskId); +} diff --git a/src/main/java/com/wms/service/UserService.java b/src/main/java/com/wms/service/UserService.java new file mode 100644 index 0000000..94e9a35 --- /dev/null +++ b/src/main/java/com/wms/service/UserService.java @@ -0,0 +1,38 @@ +package com.wms.service; + +import com.wms.entity.table.User; + +import java.util.List; + +public interface UserService { + + /** + * 查找用户 + * @param user 用户 + * @return 结果 + */ + List selectUsers(User user); + + + /** + * 添加用户 + * + * @param user 用户 + * @return 结果 + */ + int addUsers(User user); + + + /** + * 删除用户 + */ + int deleteUser(int userId); + + /** + * 更新账户密码 + */ + + int updateUser(User user); + + int updateUserInfromation(User user); +} diff --git a/src/main/java/com/wms/service/VehicleService.java b/src/main/java/com/wms/service/VehicleService.java new file mode 100644 index 0000000..ad6c29c --- /dev/null +++ b/src/main/java/com/wms/service/VehicleService.java @@ -0,0 +1,42 @@ +package com.wms.service; + +import com.wms.entity.table.Vehicle; + +import java.util.List; + +public interface VehicleService { + /** + * 根据条件查找载具 + * @param vehicle 载具信息 + * @return 查询到的载具 + */ + List selVehicles(Vehicle vehicle); + + /** + * 根据id查询载具 + * @param vehicleId 载具id + * @return 结果 + */ + Vehicle selVehicleById(String vehicleId); + + /** + * 添加载具 + * @param vehicle 载具 + * @return 结果 + */ + int addVehicle(Vehicle vehicle); + + /** + * 更新载具 + * @param vehicle 载具 + * @return 结果 + */ + int modifyVehicle(Vehicle vehicle); + + /** + * 删除载具 + * @param vehicle 载具 + * @return 结果 + */ + int deleteVehicle(Vehicle vehicle); +} diff --git a/src/main/java/com/wms/service/serviceImplements/ConfigServiceImplement.java b/src/main/java/com/wms/service/serviceImplements/ConfigServiceImplement.java new file mode 100644 index 0000000..e2eff9f --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/ConfigServiceImplement.java @@ -0,0 +1,30 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Config; +import com.wms.mapper.ConfigMapper; +import com.wms.service.ConfigService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class ConfigServiceImplement implements ConfigService { + + private final ConfigMapper configMapper; + + @Autowired + public ConfigServiceImplement(ConfigMapper configMapper){ + this.configMapper = configMapper; + } + + @Override + public List selectConfigs(String configKey) { + return this.configMapper.selectConfigs(configKey); + } + + @Override + public int updateConfig(Config config) { + return this.configMapper.updateConfig(config); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/GoodsServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/GoodsServiceImplements.java new file mode 100644 index 0000000..ed7ce66 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/GoodsServiceImplements.java @@ -0,0 +1,45 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Goods; +import com.wms.mapper.GoodsMapper; +import com.wms.service.GoodsService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class GoodsServiceImplements implements GoodsService { + + + private final GoodsMapper goodsMapper; + @Autowired + public GoodsServiceImplements(GoodsMapper goodsMapper) { + this.goodsMapper = goodsMapper; + } + + @Override + public List selGoods(Goods goods){ + return this.goodsMapper.selGoods(goods); + } + + @Override + public Goods selGoodsByGoodsId(String goodsId) { + return this.goodsMapper.selGoodsByGoodsId(goodsId); + } + + @Override + public int addGoods(Goods goods) { + return this.goodsMapper.addGoods(goods); + } + + @Override + public int modifyGoods(Goods goods) { + return this.goodsMapper.modifyGoods(goods); + } + + @Override + public int deleteGoods(String goodsId) { + return this.goodsMapper.deleteGoods(goodsId); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java new file mode 100644 index 0000000..daa9b05 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java @@ -0,0 +1,45 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Location; +import com.wms.mapper.LocationMapper; +import com.wms.service.LocationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class LocationServiceImplements implements LocationService { + + private final LocationMapper locationMapper; + @Autowired + public LocationServiceImplements(LocationMapper locationMapper) { + this.locationMapper = locationMapper; + } + + @Override + public List selLocations(Location location) { + return this.locationMapper.selLocations(location); + } + + @Override + public List selDescLocations(Location location) { + return this.locationMapper.selLocationsByDesc(location); + } + + + @Override + public List selNextLocation(Location location) { + return locationMapper.selNextLocation(location); + } + + @Override + public int addLocation(Location location) { + return locationMapper.addLocation(location); + } + + @Override + public int modifyLocation(Location location) { + return this.locationMapper.modifyLocation(location); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/MenuServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/MenuServiceImplements.java new file mode 100644 index 0000000..8c76971 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/MenuServiceImplements.java @@ -0,0 +1,35 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Menu; +import com.wms.mapper.MenuMapper; +import com.wms.service.MenuService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class MenuServiceImplements implements MenuService { + + + private final MenuMapper menuMapper; + @Autowired + public MenuServiceImplements(MenuMapper menuMapper) { + this.menuMapper = menuMapper; + } + + @Override + public List selMenuByRoleId(int roleId) { + return this.menuMapper.selMenuByRoleId(roleId); + } + +// @Override +// public List selMenuByMenuIds(List menuIds) { +// return menuMapper.selMenuByMenuIds("(" + String.join(",", menuIds) + ")"); +// } + + @Override + public List selMenuByMenuIds(List menuIds) { + return menuMapper.selMenuByMenuIds(menuIds); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/OrderCheckImplements.java b/src/main/java/com/wms/service/serviceImplements/OrderCheckImplements.java new file mode 100644 index 0000000..f51184d --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/OrderCheckImplements.java @@ -0,0 +1,243 @@ +package com.wms.service.serviceImplements; + +import cn.hutool.core.date.DateTime; +import com.wms.constants.enums.OrderCheckStatusEnum; +import com.wms.constants.enums.OrderOutStatusEnum; +import com.wms.constants.enums.StockStatus; +import com.wms.constants.enums.TaskType; +import com.wms.entity.app.mes.MesApiLocalResponse; +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.dto.orderCheck.addOrderCheckRequest; +import com.wms.entity.dto.orderCheck.queryOrderCheckRequest; +import com.wms.entity.table.*; +import com.wms.mapper.*; +import com.wms.service.IOrderCheckService; +import com.wms.utils.WmsUtils; +import lombok.RequiredArgsConstructor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDate; +import java.util.*; + +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class OrderCheckImplements implements IOrderCheckService { + + private final OrderCheckMapper orderCheckMapper; + + private final StockMapper stockMapper; + + private final com.wms.mapper.TaskMapper taskMapper; + + private final AppOrderInMapper appOrderInMapper; + + private final ConfigMapper configMapper; + + private final LocationMapper locationMapper; + + private static final Logger log = LoggerFactory.getLogger(OrderOutImplements.class); + + /** + * 查询订单 + */ + public WmsApiResponse> queryOrderCheck(queryOrderCheckRequest request){ + if(request.getOrderStatus() == null || request.getOrderStatus().isEmpty()) { + return new WmsApiResponse<>(0, "查询成功", new ArrayList<>()); // 没有查询参数,返回空 + } + List orderChecks = orderCheckMapper.queryAll(); + return new WmsApiResponse<>(0, "查询成功", orderChecks); + } + + /** + * 新增加订单 + */ + public WmsApiResponse addOrderCheck(addOrderCheckRequest request){ + /*首先根据类型判断具体是哪一种盘点(E是物料号,F是货位) + * 如果是根据货号,则根据货号去库表中找到对应的货号,然后生成盘点任务 + * 如果是根据货位,则去库存表找到对应的数据,然后生成盘点任务 + * */ + if (request.getEfSelect() == null || request.getEfSelect().isEmpty()){ + return new WmsApiResponse<>(1, "数据为空", null); + } + /* + * 对request数据进行判断,如果是e,那么去库存表中先查找是否有对应的库存,如果没有就返回 + * 如果是f,先查看对应库位是否有货,如果没有就返回 + * */ + Stock stock = new Stock(); + if (request.getEfSelect().equals("E")){ + stock.setGoodsId(request.goodsId); + List s = stockMapper.selStocks(stock); + if (s.isEmpty()){ + return new WmsApiResponse<>(1, "该物料号库存中不存在", null); + } + }else{ + Location location = new Location(); + location.setLocationId(request.goodsId); + List l = locationMapper.selLocations(location); + if (l.isEmpty()){ + return new WmsApiResponse<>(1, "输入的库位号格式错误", null); + } + stock.setLocationId(request.goodsId); + List s = stockMapper.selStocks(stock); + if (s.isEmpty()){ + return new WmsApiResponse<>(1, "该库位没有库存", null); + } + } + OrderCheck orderCheck = new OrderCheck(); + orderCheck.setRecordId(UUID.randomUUID().toString()); + orderCheck.setCheckId(request.getEfSelect()); // 盘点单号判断类别 + orderCheck.setWarehouse("珀金斯立体库"); + orderCheck.setStatus(OrderCheckStatusEnum.CREATED.getCode()); + orderCheck.setCreateTime(LocalDate.now()); + orderCheck.setRemark(request.getGoodsId()); + int a = orderCheckMapper.insert(orderCheck); + if(a > 0) { + return new WmsApiResponse<>(0, "添加成功", null); + }else { + return new WmsApiResponse<>(1, "添加失败,请稍后再试", null); + } + } + + /** + * 执行盘点订单 + */ + public WmsApiResponse executeOrderCheck(String recordId){ + //根据recordId去盘点单中找对应的盘点任务 + List orderCheckTask = orderCheckMapper.queryByRecordId(recordId); + if(orderCheckTask == null || orderCheckTask.isEmpty()) { + return new WmsApiResponse<>(0, "该条记录不存在", null); + } + OrderCheck orderCheck = orderCheckTask.get(0); + // 将该盘点单号对应的库别全部生成盘点任务 + List checkTasks = new ArrayList<>(); // 盘点任务列表 + Stock queryStock = new Stock(); + queryStock.setWarehouseName(orderCheck.getWarehouse()); + queryStock.setStockStatus(0); + //判断,e按料号,f按库位 + if (Objects.equals(orderCheck.getCheckId(), "E")){ + queryStock.setGoodsId(orderCheck.getRemark()); + }else if (Objects.equals(orderCheck.getCheckId(), "F")){ + queryStock.setLocationId(orderCheck.getRemark()); + } + List stockList0 = stockMapper.selStocks(queryStock); + if(stockList0 == null || stockList0.isEmpty()) { + return new WmsApiResponse<>(0, String.format("该库别没有库存,请稍后再试,库别:%s", orderCheck.getWarehouse()), null); + } + List stockList = new ArrayList<>(); + if(Objects.equals(orderCheck.getCheckId(), "F")){ + stockList.add(stockList0.get(0)); + }else { + stockList.addAll(stockList0); + } + //查询一号出入库口状态,如果是1则是出库,需要平均分配。0和2则正常入库,终点依旧 + List configs = configMapper.selectConfigs("100"); + Config config = configs.get(0); + String destination; + if (Objects.equals(config.getConfigValue(), "1")){ + //从task表中查询所有终点为241和201,进行数量对比,将数量少的值赋值给变量 + Task task = new Task(); + task.setDestination("241"); + List TasksBy241 = taskMapper.selTasks(task); + task.setDestination("201"); + List TasksBy201 = taskMapper.selTasks(task); + //进行数量对比,将数量少的值赋值给变量destination + destination = (TasksBy241.size() > TasksBy201.size()) ? ("201"):("241"); + }else{ + destination = "241"; + } + // 检查这些应该盘点的库位有没有任务在执行 + for(Stock stock : stockList) { + List notCompleteTasks = taskMapper.haveNotCompleteTask(stock.getLocationId()); + if(notCompleteTasks == null) { + return new WmsApiResponse<>(0, String.format("数据库校验任务失败,请稍后再试,库位:%s", stock.getLocationId()), null); + } + if(!notCompleteTasks.isEmpty()) { + return new WmsApiResponse<>(0, String.format("该库位有任务在执行,请稍后再试,库位:%s", stock.getLocationId()), null); + } + Task task = new Task(); + task.setTaskId(WmsUtils.generateUUIDString()); + task.setTaskType(TaskType.INVENTORY.getCode()); + task.setTaskStatus(OrderOutStatusEnum.CREATED.getCode()); + task.setTaskGroup(orderCheck.getCheckId()); + task.setOrigin(stock.getLocationId()); + if (Objects.equals(stock.getProviderName(), "大")){ + task.setDestination("104"); + } else { + task.setDestination(destination); + } + task.setPickStand("大"); + task.setWeight(0.0); + task.setVehicleNo(stock.getVehicleId()); + task.setCreateTime(new Date()); + task.setUserName("wms"); + task.setGoodsId(stock.getGoodsId()); + task.setGoodsName(stock.getGoodsName()); + task.setOperateNum(stock.getRealNum()); + task.setTotalNum(stock.getRealNum()); + task.setTaskPriority(1); + task.setProductionDate(stock.getProductionDate()); + task.setRemark1("盘点出库"); + checkTasks.add(task); + + stockMapper.updateStockStatusWithLocationId(stock.getLocationId(), StockStatus.OUT.getCode()); + } + + int addTasks = taskMapper.addTasks(checkTasks); + if(addTasks == checkTasks.size()) { + //修改盘点单状态为1 + OrderCheck orderCheckForUpdate = new OrderCheck(); + orderCheckForUpdate.setStatus(OrderCheckStatusEnum.CHECKING.getCode()); + orderCheckForUpdate.setRecordId(recordId); + int deleteResult = orderCheckMapper.update(orderCheckForUpdate); + if (deleteResult > 0){ + log.info("添加任务成功,修改盘点单状态成功,任务:{}", checkTasks); + } + return new WmsApiResponse<>(1, "添加成功", null); + } + return new WmsApiResponse<>(0, "添加失败", null); + } + + + + /** + * 删除订单 + */ + public WmsApiResponse deleteOrderCheck(String recordId) { + try { + // 确保 orderId 不为空 + if (recordId == null) { + return new WmsApiResponse<>(1, "执行失败,参数错误", null); + } + // 调用 Mapper 方法执行删除操作 + int deletedResult = orderCheckMapper.delete(recordId); + // 检查删除是否成功 + if (deletedResult > 0) { + return new WmsApiResponse<>(0, "删除成功", true); + } else { + return new WmsApiResponse<>(1, "订单不存在", false); + } + } catch (Exception e) { + // 记录异常 + return new WmsApiResponse<>(1, "删除失败", false); + } + } + + + + public WmsApiResponse deleteOrderCheckAll(String remarkReturn){ + try { + int deletedResult = appOrderInMapper.deleteByCheckNoGood("盘点回库"); + if (deletedResult > 0) { + return new WmsApiResponse<>(0, "删除成功", true); + } else { + return new WmsApiResponse<>(1, "订单不存在", false); + } + }catch (Exception e){ + return new WmsApiResponse<>(1, "删除失败", false); + } + } + +} diff --git a/src/main/java/com/wms/service/serviceImplements/OrderInImplement.java b/src/main/java/com/wms/service/serviceImplements/OrderInImplement.java new file mode 100644 index 0000000..5134023 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/OrderInImplement.java @@ -0,0 +1,342 @@ +package com.wms.service.serviceImplements; + +import com.wms.constants.enums.OrderInStatusEnum; +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.common.WmsApiResponseByCheckBack; +import com.wms.entity.dto.orderIn.*; +import com.wms.entity.table.AppOrderIn; +import com.wms.entity.table.Task; +import com.wms.mapper.TaskMapper; +import com.wms.service.IOrderInService; +import com.wms.utils.StringUtils; +import lombok.RequiredArgsConstructor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; + +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class OrderInImplement implements IOrderInService { + + private static final Logger log = LoggerFactory.getLogger(OrderInImplement.class); + private final com.wms.mapper.AppOrderInMapper appOrderInMapper; + + private final TaskMapper taskMapper; + + /** + * 查询入库单 + * @param request 查询参数 + * @return 返回结果 + */ + public WmsApiResponse> queryOrderIn(queryOrderInRequest request) { + if(request.getOrderStatus() == null || request.getOrderStatus().isEmpty()) { + return new WmsApiResponse<>(0, "查询成功", new ArrayList<>()); // 没有查询参数,返回空 + } + List appOrderIns = appOrderInMapper.selectWithParams(request.getSearchStr(), request.getOrderStatus()); + return new WmsApiResponse<>(0, "查询成功", appOrderIns); + } + + public WmsApiResponse updateForNum(updateNumRequest request){ + AppOrderIn appOrderIn = new AppOrderIn(); + appOrderIn.setRowId(request.getRowId()); + if (request.getRealNum() == null || request.getRealNum().compareTo(BigDecimal.ZERO) <= 0){ + appOrderIn.setCreateTime(request.getCreateTime()); + }else { + appOrderIn.setGoodsNum(request.getRealNum()); + appOrderIn.setCreateTime(request.getCreateTime()); + } + int i = appOrderInMapper.update(appOrderIn); + if(i > 0) { + return new WmsApiResponse<>(0, "修改成功", null); + }else { + return new WmsApiResponse<>(999, "修改失败", null); + } + } + + public WmsApiResponse updateForInformation(updateInformation request){ + //先查找入库单中是否存在该托盘 +// +// AppOrderIn appOrderIn = new AppOrderIn(); +// appOrderIn.setRowId(request.getRowId()); +// appOrderIn.setGoodsId(request.getGoodsId()); +// appOrderIn.setGoodsNum(request.getGoodsNum()); +// int i = appOrderInMapper.update(appOrderIn); +// if(i > 0) { +// log.info("盘点结果修改成功,载具号:{}", appOrderIn.getVehicleNo()); +// }else { +// log.info("盘点结果修改失败,载具号:{}", appOrderIn.getVehicleNo()); +// } + //查询对应的回库状态为666的回库任务,并更新数量 + Task task = new Task(); + task.setTaskStatus(666); + task.setTaskGroup(request.getRowId()); + List taskList = taskMapper.selTasks(task); + if (taskList == null || taskList.isEmpty()){ + return new WmsApiResponse<>(999, "没有找到该巷道的盘点回库任务,修改入库单成功", null); + } + //taskList.get(0).setOperateNum(request.getGoodsNum().intValue()); + taskList.get(0).setTaskStatus(0); + int a = taskMapper.executeTask(taskList.get(0)); + if (a > 0){ + return new WmsApiResponse<>(0, "盘点任务修改成功", null); + }else { + return new WmsApiResponse<>(999, "盘点任务修改失败", null); + } + + } + + public WmsApiResponse loginInBad(loginInBad request) { + return new WmsApiResponse<>(999, "盘点任务修改失败", null); + } + + + + + /** + * 绑定载具 + * @param request 绑定参数 + * @return 返回结果 + */ + public WmsApiResponse bindingVehicle(bindingVehicleRequest request) { + String vehicleNo = request.getVehicleNo(); + String code = request.getCode(); + if(StringUtils.isEmpty(vehicleNo) || StringUtils.isEmpty(code)) { + return new WmsApiResponse<>(999, "载具号或者条码为空", null); + } + // 拆分条码 + // 前八位是零件号,后面六位是批次,后面一位是班次,最后五位是数量 + if(code.length() == 22) { + //return new WmsApiResponse<>(999, "条码长度错误", null); + String goodsId = code.substring(0, 10); // 物料编码 + String productionDate = code.substring(10, 16); //生产日期 + SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd"); + Date date; + try { + // 将字符串解析成Date对象 + date = dateFormat.parse(productionDate); + } catch (ParseException e) { + throw new RuntimeException(e); + } + String batchNo = code.substring(0, 16); // 批次 ---- 这个批次应该是料号加中间六位 + String shift = code.substring(17, 18); // 班次 + String goodsNumStr = code.substring(18, 22); // 数量字符串 + if(!goodsNumStr.matches("[0-9]+")) { + return new WmsApiResponse<>(999, "数量错误", null); + } + BigDecimal goodsNum = new BigDecimal(goodsNumStr); // 数量 + List selectRows = appOrderInMapper.select(new AppOrderIn(batchNo, goodsNum, OrderInStatusEnum.CREATE.getCode())); + if(selectRows == null || selectRows.isEmpty()) { + return new WmsApiResponse<>(999, String.format("条码找不到入库单,无法绑定,条码:%s, 批次: %s, 数量: %s", code, batchNo, goodsNum), null); + } + AppOrderIn orderIn = selectRows.get(0); // 这条数据 + // 绑定载具 + AppOrderIn bindingOrderIn = new AppOrderIn(); + bindingOrderIn.setRowId(orderIn.getRowId()); + bindingOrderIn.setVehicleNo(vehicleNo); + bindingOrderIn.setOrderStatus(OrderInStatusEnum.BINDING.getCode()); + bindingOrderIn.setUpdateTime(java.time.LocalDateTime.now()); + //bindingOrderIn.setProductionDate(date); + //bindingOrderIn.setUpdateTime(date); + if(appOrderInMapper.update(bindingOrderIn) > 0) { + return new WmsApiResponse<>(0, "绑定成功", null); + } + return new WmsApiResponse<>(999, "绑定失败,未知异常,请重试", null); + } else if (code.length() == 20) { + //String goodsId = code.substring(0, 10); // 物料编码 + String productionDate = code.substring(8, 14); //生产日期 + SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd"); + Date date; + try { + // 将字符串解析成Date对象 + date = dateFormat.parse(productionDate); + } catch (ParseException e) { + throw new RuntimeException(e); + } + String batchNo = code.substring(0, 14); // 批次 ---- 这个批次应该是料号加中间六位 + //String shift = code.substring(17, 18); // 班次 + String goodsNumStr = code.substring(16, 20); // 数量字符串 + if(!goodsNumStr.matches("[0-9]+")) { + return new WmsApiResponse<>(999, "数量错误", null); + } + BigDecimal goodsNum = new BigDecimal(goodsNumStr); // 数量 + List selectRows = appOrderInMapper.select(new AppOrderIn(batchNo, goodsNum, OrderInStatusEnum.CREATE.getCode())); + if(selectRows == null || selectRows.isEmpty()) { + return new WmsApiResponse<>(999, String.format("条码找不到入库单,无法绑定,条码:%s, 批次: %s, 数量: %s", code, batchNo, goodsNum), null); + } + AppOrderIn orderIn = selectRows.get(0); // 这条数据 + // 绑定载具 + AppOrderIn bindingOrderIn = new AppOrderIn(); + bindingOrderIn.setRowId(orderIn.getRowId()); + bindingOrderIn.setVehicleNo(vehicleNo); + bindingOrderIn.setOrderStatus(OrderInStatusEnum.BINDING.getCode()); + bindingOrderIn.setUpdateTime(java.time.LocalDateTime.now()); + //bindingOrderIn.setProductionDate(date); + //bindingOrderIn.setUpdateTime(date); + if(appOrderInMapper.update(bindingOrderIn) > 0) { + return new WmsApiResponse<>(0, "绑定成功", null); + } + return new WmsApiResponse<>(999, "绑定失败,未知异常,请重试", null); + } + + return new WmsApiResponse<>(999, "条码长度错误", null); + } + + + + + /** + * 根据载具号查询入库单 + * @param vehicleNo 载具号 + * @return 返回结果 + */ + public WmsApiResponseByCheckBack> getOrderInWithVehicleNo(String vehicleNo) { + AppOrderIn appOrderInQuery = new AppOrderIn(); + appOrderInQuery.setVehicleNo(vehicleNo); + List appOrderIns = appOrderInMapper.select(appOrderInQuery); + if(appOrderIns == null || appOrderIns.isEmpty()) { + return new WmsApiResponseByCheckBack<>(0, "载具号未绑定",null,null,null,null); + } + return new WmsApiResponseByCheckBack<>(0, "查询成功",appOrderIns.get(0).getGoodsId(),appOrderIns.get(0).getGoodsNum(),appOrderIns.get(0).getRowId() ,appOrderIns); + } + + /** + * 解绑载具 + * @param rowId 入库单行号 + * @return 返回结果 + */ + public WmsApiResponse unBindingVehicle(String rowId) { + if(rowId == null || rowId.isEmpty()) { + return new WmsApiResponse<>(999, "入库单行号不能为空", null); + } + AppOrderIn unBindingVehicle = new AppOrderIn(); + unBindingVehicle.setRowId(rowId); + unBindingVehicle.setOrderStatus(OrderInStatusEnum.CREATE.getCode()); + unBindingVehicle.setVehicleNo(""); + unBindingVehicle.setUpdateTime(java.time.LocalDateTime.now()); + int updateResult = appOrderInMapper.update(unBindingVehicle); + if(updateResult > 0) { + return new WmsApiResponse<>(0, "解绑成功", null); + } + return new WmsApiResponse<>(999, "解绑失败,请重试", null); + } + + /** + * 添加入库单 + * @param request 入库单参数 + * @return 返回结果 + */ + public WmsApiResponse addOrderIn(downOrderInRequest request){ + try { +// // 去掉字符串中的中括号 +// String cleanedInput = request.goodsId.replaceAll("[【】]", "");; // 去掉 '[' 和 ']' +// // 使用空格分割字符串 +// String[] parts = cleanedInput.split(" "); +// // 获取所需的部分 +// String firstPart = parts[0]; // PK_EN85177R +// String secondPart = parts[1]; + + AppOrderIn appOrderIn = new AppOrderIn(); + appOrderIn.setRowId(UUID.randomUUID().toString()); + appOrderIn.setGuid(UUID.randomUUID().toString()); + appOrderIn.setInType(1); + appOrderIn.setBatchNo(null); + appOrderIn.setVehicleNo(request.vehicleNo); + appOrderIn.setGoodsId(request.goodsId); + appOrderIn.setGoodsNum(BigDecimal.valueOf(request.goodsNum)); + appOrderIn.setWareHouse("珀金斯立体库"); + appOrderIn.setOrderStatus(0); + appOrderIn.setCreateTime(LocalDate.now()); + appOrderIn.setCreatePerson("WMS"); + appOrderIn.setUpdateTime(LocalDateTime.now()); + appOrderIn.setRemark(null); + appOrderIn.setModel("121212"); + appOrderInMapper.insert(appOrderIn); + return new WmsApiResponse<>(0, "添加成功", appOrderIn); + }catch (Exception e){ + return new WmsApiResponse<>(1, "物料号格式异常",null); + } + + } + + + public WmsApiResponse addOrderInByBlinging(downOrderInRequest request, String userName) { + try { + String[] parts = request.goodsId.split("&"); + String goodsId = parts[0]; + String goodsNum = parts[1]; + String dateString = parts[2]; + + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); + LocalDate date = LocalDate.parse(dateString, formatter); + + AppOrderIn appOrderIn = new AppOrderIn(); + appOrderIn.setRowId(UUID.randomUUID().toString()); + appOrderIn.setGuid(UUID.randomUUID().toString()); + appOrderIn.setInType(1); + appOrderIn.setVehicleNo(request.vehicleNo); + appOrderIn.setGoodsId(goodsId); + appOrderIn.setGoodsNum(new BigDecimal(goodsNum)); + appOrderIn.setWareHouse("珀金斯立体库"); + appOrderIn.setOrderStatus(0); + appOrderIn.setCreateTime(LocalDate.now()); + appOrderIn.setCreatePerson(userName); + appOrderIn.setUpdateTime(LocalDateTime.now()); + appOrderIn.setProductionDate(date); + appOrderIn.setRemark(null); + if(appOrderInMapper.insert(appOrderIn) > 0){ + return new WmsApiResponse<>(0, "添加成功", appOrderIn); + } + return new WmsApiResponse<>(1, "添加失败", null); + }catch (Exception e){ + return new WmsApiResponse<>(1, "物料号格式异常,请检查",null); + } + } + + /** + * 根据载具号查找所有的入库单并直接生成任务 + * @param request 入库单参数 + * @return 返回结果 + */ + public WmsApiResponse addInByTask(goodsInByTaskRequest request) { +// if (request.getVehicleNo() == null || request.getVehicleNo().isEmpty()){ +// return new WmsApiResponse<>(1, "载具号不能为空", null); +// } +// if (request.getSelectByIn() == null || request.getSelectByIn().isEmpty()){ +// return new WmsApiResponse<>(1, "入库站台不能为空", null); +// } +// //根据载具号查找所有的入库单 +// AppOrderIn appOrderInQuery = new AppOrderIn(); +// appOrderInQuery.setVehicleNo(request.getVehicleNo()); + return new WmsApiResponse<>(0, "添加成功", null); + } + + public WmsApiResponse deleteOrderIn(String rowId) { + try { + // 确保 orderId 不为空 + if (rowId == null) { + return new WmsApiResponse<>(1, "执行失败,参数错误", null); + } + // 调用 Mapper 方法执行删除操作 + int deletedResult = appOrderInMapper.delete(rowId); + // 检查删除是否成功 + if (deletedResult > 0) { + return new WmsApiResponse<>(0, "删除成功", true); + } else { + return new WmsApiResponse<>(1, "订单不存在", false); + } + } catch (Exception e) { + // 记录异常 + return new WmsApiResponse<>(1, "删除失败", false); + } + } + +} diff --git a/src/main/java/com/wms/service/serviceImplements/OrderOutImplements.java b/src/main/java/com/wms/service/serviceImplements/OrderOutImplements.java new file mode 100644 index 0000000..82da067 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/OrderOutImplements.java @@ -0,0 +1,525 @@ +package com.wms.service.serviceImplements; + +import com.wms.constants.enums.*; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.mes.MesApiLocalResponse; +import com.wms.entity.common.WmsApiResponse; +import com.wms.entity.dto.orderOut.handOrderOutRequest; +import com.wms.entity.dto.orderOut.queryOrderOutRequest; +import com.wms.entity.table.*; +import com.wms.mapper.*; +import com.wms.service.IOrderOutService; +import com.wms.utils.StringUtils; +import com.wms.utils.WmsUtils; +import lombok.RequiredArgsConstructor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.sql.Timestamp; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.*; + +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class OrderOutImplements implements IOrderOutService { + + + private static final Logger log = LoggerFactory.getLogger(OrderOutImplements.class); + private final OrderOutMapper orderOutMapper; + + private final StockMapper stockMapper; + + private final com.wms.mapper.TaskMapper taskMapper; + + private final ConfigMapper configMapper; + + private final VehicleMapper vehicleMapper; + + private final PartInfoMapper partInfoMapper; + + @Override + public List getAllOrderOut(queryOrderOutRequest request) { + return orderOutMapper.queryAll(); + } + + public int writeOrderOutList(OrderOut request) { + /* 插入数据,插入记录表 */ + if (request.getGoodsId() == null || request.getGoodsId().isEmpty()){ + return 0; + }else{ + OrderOut orderOut = new OrderOut(); + orderOut.setRowId(UUID.randomUUID().toString()); + orderOut.setRecordId(UUID.randomUUID().toString()); + orderOut.setOrderId(UUID.randomUUID().toString()); + orderOut.setWarehouseOrigin("珀金斯立体库"); + if(request.getGoodsName() == null || request.getGoodsName().isEmpty()){ + orderOut.setWarehouseDestination("原材料"); + }else{ + orderOut.setWarehouseDestination("成品"); + } + + // 手动设置成2,excel导入的设置成1 + orderOut.setOrderType(1); + orderOut.setRowNo(null); + orderOut.setGoodsId(request.getGoodsId()); + orderOut.setGoodsNum("1"); + orderOut.setUnit(""); + orderOut.setStatus(OrderOutStatusEnum.CREATED.getCode()); + orderOut.setCreateTime(new Timestamp(System.currentTimeMillis())); + orderOut.setRemark("普通出库"); + return orderOutMapper.insert(orderOut); + } + } + + /** + * 查询出库单 + * @param request 请求参数 + * @return 结果 + */ + public WmsApiResponse> queryOrderOut(queryOrderOutRequest request){ + if(request.getOrderStatus() == null || request.getOrderStatus().isEmpty()) { + return new WmsApiResponse<>(0, "查询成功", new ArrayList<>()); // 没有查询参数,返回空 + } + List orderOuts = orderOutMapper.queryWithParams(request.getSearchStr(), request.getOrderStatus()); + // 过滤 orderType 为 1 或 2 的数据 + List filteredOrderOuts = orderOuts.stream() + .filter(orderOut -> orderOut.getOrderType() == 1 || orderOut.getOrderType() == 2) + .toList(); + return new WmsApiResponse<>(0, "查询成功", filteredOrderOuts); + } + + + public WmsApiResponse executeDownEmpty(){ + log.info("用户呼叫空托垛出库"); + //先查询有没有呼叫空托的任务,有的话不执行 + Task task = new Task(); + task.setVehicleNo("D99999999"); + List tasks = taskMapper.selTasks(task); + if (!tasks.isEmpty()){ + return new WmsApiResponse<>(1, "已经有空托出库的任务,请稍后再下发。", tasks.size()); + } + //去载具表找一个空托,下发任务,终点写point + Vehicle vehicle = new Vehicle(); + vehicle.setVehicleId("D99999999"); + List vList = vehicleMapper.selVehiclesByEmptyOut(vehicle); + if (vList == null || vList.isEmpty()){ + return new WmsApiResponse<>(1, "执行失败,库中没有空托垛", null); + } + //下发出库任务 + Task taskByEmptyOut = new Task(); + taskByEmptyOut.setTaskId(UUID.randomUUID().toString()); + taskByEmptyOut.setTaskType(TaskType.OUT.getCode()); + taskByEmptyOut.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskByEmptyOut.setTaskGroup(UUID.randomUUID().toString()); + taskByEmptyOut.setOrigin(vList.get(0).getCurrentLocation()); + taskByEmptyOut.setDestination("241"); + taskByEmptyOut.setPickStand(null);//因为出库要选择不同的站台,要区分大小托盘,用这个字段来标记 + taskByEmptyOut.setWeight(0.0); + taskByEmptyOut.setVehicleNo(vList.get(0).getVehicleId()); + taskByEmptyOut.setCreateTime(new Date()); + taskByEmptyOut.setUserName(null); + taskByEmptyOut.setGoodsId(null); + taskByEmptyOut.setGoodsName(null); + taskByEmptyOut.setOperateNum(0); + taskByEmptyOut.setTotalNum(0); + taskByEmptyOut.setTaskPriority(1); + taskByEmptyOut.setRemark1("空托垛出库"); + int addTask = taskMapper.addTask(taskByEmptyOut); + if(addTask > 0) { + return new WmsApiResponse<>(0, "执行成功", null); + }else { + return new WmsApiResponse<>(1, "执行失败,添加任务失败", null); + } + } + + +/* + public Lis + + /** + * 执行出库单 + * @param rowId 出库单ID + * @return 结果 + */ + public WmsApiResponse executeOrderOut(String rowId) { + if(rowId == null || rowId.isEmpty()) { + return new WmsApiResponse<>(1, "执行失败,参数错误", null); + } + List queryResult = orderOutMapper.queryWithRowId(rowId); + if(queryResult == null) { + return new WmsApiResponse<>(1, "执行失败,请重试", null); + } + if(queryResult.isEmpty()) { + return new WmsApiResponse<>(1, "执行失败,该任务不存在,请刷新后再试", null); + } + OrderOut orderOut = queryResult.get(0); // 出库单数据 + //判断出库单状态,非待出库不准执行 + if (orderOut.getStatus() == 100){ + return new WmsApiResponse<>(1, "执行失败,该订单已经完成", null); + } + // 计算出库 + List outTasks = new ArrayList<>(); // 出库任务列表 + /* 查询库存 */ + // 拉出该物料的所有库存 + Stock queryStock = new Stock(); + queryStock.setGoodsId(orderOut.getGoodsId()); + queryStock.setStockStatus(StockStatus.OK.getCode()); + List stockList = stockMapper.selStocks(queryStock); + if(stockList == null) { + return new WmsApiResponse<>(1, String.format("库存拉取失败,请稍后再试,物料号:%s", orderOut.getGoodsId()), null); + } + if(stockList.isEmpty()) { + //更改出库单状态为没有库存 + OrderOut orderOutUpdateStatus = new OrderOut(); + orderOutUpdateStatus.setRowId(rowId); + orderOutUpdateStatus.setStatus(OrderOutStatusEnum.UNSTOCK.getCode()); + orderOutMapper.update(orderOutUpdateStatus); + return new WmsApiResponse<>(1, String.format("该物料没有库存,物料号:%s,其他物料也一并拒绝出库", orderOut.getGoodsId()), null); + } + Integer availableNum = com.wms.utils.storage.StockUtils.sumStcokAvailableNum(stockList); // 拥有的数量 + int needNum = Integer.parseInt(orderOut.getGoodsNum()); // 需要的数量 + if(availableNum.compareTo(needNum) < 0) { + //更改出库单状态为库存不足 + OrderOut orderOutUpdateStatus = new OrderOut(); + orderOutUpdateStatus.setRowId(rowId); + orderOutUpdateStatus.setStatus(OrderOutStatusEnum.UNENOUGH.getCode()); + orderOutMapper.update(orderOutUpdateStatus); + return new WmsApiResponse<>(1, String.format("该物料库存不足,物料号:%s,库存数量:%d,出库数量:%s", orderOut.getGoodsId(), availableNum, orderOut.getGoodsNum()), null); + } + //查询一号出入库口状态,如果是1则是出库,需要平均分配。0和2则正常入库,终点依旧 + List configs = configMapper.selectConfigs("100"); + Config config = configs.get(0); + String destination; + if (Objects.equals(config.getConfigValue(), "1")){ + //从task表中查询所有终点为241和201,进行数量对比,将数量少的值赋值给变量 + Task task = new Task(); + task.setDestination("241"); + List TasksBy241 = taskMapper.selTasks(task); + task.setDestination("201"); + List TasksBy201 = taskMapper.selTasks(task); + //进行数量对比,将数量少的值赋值给变量destination + destination = (TasksBy241.size() > TasksBy201.size()) ? ("201"):("241"); + }else{ + destination = "241"; + } + for(Stock outStock : stockList) { + if(needNum <= 0) { + break; + } + // 生成出库任务,更新库存为出库中 + int outNum = needNum > outStock.getAvailableNum() ? outStock.getAvailableNum() : needNum; // 需要操作的数量 + if(outTasks.stream().filter(task -> task.getOrigin().equals(outStock.getLocationId())).toList().isEmpty()) { + Task task = new Task(); + task.setTaskId(UUID.randomUUID().toString()); + task.setTaskType(2); + task.setTaskGroup(orderOut.getRowId()); + task.setTaskStatus(OrderOutStatusEnum.CREATED.getCode()); + task.setOrigin(outStock.getLocationId()); + //大小托盘的出库位置不同 + if (Objects.equals(outStock.getProviderName(), "大")){ + task.setDestination("106"); + }else { + task.setDestination(destination); + } + task.setPickStand(null); + task.setWeight(0.0); + task.setVehicleNo(outStock.getVehicleId()); + task.setCreateTime(new Date()); + task.setUserName("user"); + task.setGoodsId(outStock.getGoodsId()); + task.setGoodsName(outStock.getGoodsName()); + task.setOperateNum(outNum); + task.setTotalNum(outStock.getRealNum()); + task.setTaskPriority(Objects.equals(orderOut.getRemark(), "普通出库") ? 1 : 8 ); + task.setRemark1("手动出库"); + outTasks.add(task); + } + // 把这条库存记录可用数量更新为 0 + stockMapper.updateStockAvailableNumWithStockId(outStock.getStockId(), outStock.getAvailableNum()-outNum); + // 更新该托盘号上所有的库存为出库中 + stockMapper.updateStockStatusWithLocationId(outStock.getLocationId(), StockStatus.OUT.getCode()); + // 重新计算需求数量 + needNum -= outNum; + } + if(outTasks.isEmpty()) { + //更改出库单状态为异常 + OrderOut orderOutUpdateStatus = new OrderOut(); + orderOutUpdateStatus.setRowId(rowId); + orderOutUpdateStatus.setStatus(OrderOutStatusEnum.EXPRESS.getCode()); + orderOutMapper.update(orderOutUpdateStatus); + return new WmsApiResponse<>(1, "无法生成任务,请稍后再试", null); + } + int addResult = 0; + try { + addResult = taskMapper.addTasks(outTasks); + } catch (Exception e) { + log.error("添加任务失败,请稍后再试", e); + // 回滚库存状态以及可用数量 + for (Stock outStock : stockList) { + stockMapper.updateStockAvailableNumWithStockId(outStock.getStockId(), outStock.getRealNum()); + stockMapper.updateStockStatusWithLocationId(outStock.getLocationId(), StockStatus.OK.getCode()); + } + return new WmsApiResponse<>(1, "执行出库任务发生异常", null); + } + if(addResult == outTasks.size()) { + //更改出库单状态为出库中 + OrderOut orderOutUpdateStatus = new OrderOut(); + orderOutUpdateStatus.setRowId(rowId); + orderOutUpdateStatus.setStatus(OrderOutStatusEnum.RUNNING.getCode()); + int a = orderOutMapper.update(orderOutUpdateStatus); + if (a > 0){ + log.info("更新出库单状态成功"); + }else { + log.info("更新出库单状态失败"); + } + return new WmsApiResponse<>(0, "添加成功", null); + } + //更改出库单状态为异常 + OrderOut orderOutUpdateStatus = new OrderOut(); + orderOutUpdateStatus.setRowId(rowId); + orderOutUpdateStatus.setStatus(OrderOutStatusEnum.EXPRESS.getCode()); + orderOutMapper.update(orderOutUpdateStatus); + return new WmsApiResponse<>(1, "添加失败,请重试", null); + } + + + /** + * 创建出库单 + */ + public WmsApiResponse createOrderOut(handOrderOutRequest request) { + if (request.goodsId == null|| request.goodsId.isEmpty()){ + return new WmsApiResponse<>(1, "物料号不能为空", null); + } + if (request.goodsNum <= 0){ + return new WmsApiResponse<>(1, "数量必须大于0", null); + } +// //查询清单,如果清单内没有则不允许下发 +// PartInfo partInfo = new PartInfo(); +// partInfo.setMaterial(request.goodsId); +// List partInfos = partInfoMapper.selPartsByEqual(partInfo); +// if (partInfos == null || partInfos.isEmpty()){ +// return new WmsApiResponse<>(1, "清单内没有该序列号/物料号", null); +// } + /* 插入数据,插入记录表 */ + OrderOut orderOut = new OrderOut(); + orderOut.setRowId(UUID.randomUUID().toString()); + orderOut.setRecordId(UUID.randomUUID().toString()); + orderOut.setOrderId(UUID.randomUUID().toString()); + orderOut.setWarehouseOrigin("珀金斯立体库"); + if(Objects.equals(request.orderOutType, "CP")){ + orderOut.setWarehouseDestination("成品"); + }else{ + orderOut.setWarehouseDestination("原材料"); + } + // 手动设置成2,excel导入的设置成1 + orderOut.setOrderType(2); + orderOut.setRowNo(null); + orderOut.setGoodsId(request.goodsId); + orderOut.setGoodsNum(String.valueOf(request.goodsNum)); + orderOut.setUnit(""); + orderOut.setStatus(OrderOutStatusEnum.CREATED.getCode()); + orderOut.setCreateTime(new Timestamp(System.currentTimeMillis())); + if (Objects.equals(request.efSelect, "E")){ + orderOut.setRemark("普通出库"); + }else{ + orderOut.setRemark("紧急出库"); + } + orderOutMapper.insert(orderOut); + return new WmsApiResponse<>(0, "添加成功", orderOut); + } + + + public WmsApiResponse handFinish(String rowId) { + OrderOut orderOut = new OrderOut(); + orderOut.setRowId(rowId); +// List lists = orderOutMapper.query(orderOut); + orderOut.setStatus(OrderOutStatusEnum.FINISHED.getCode()); + if (orderOutMapper.update(orderOut) > 0){ + return new WmsApiResponse<>(0, "更新成功", null); + } + return new WmsApiResponse<>(1, "更新失败", null); + } + + public WmsApiResponse> queryOrderOutByLocation(queryOrderOutRequest request) { + if(request.getOrderStatus() == null || request.getOrderStatus().isEmpty()) { + return new WmsApiResponse<>(0, "查询成功", new ArrayList<>()); // 没有查询参数,返回空 + } + List orderOuts = orderOutMapper.queryWithParams(request.getSearchStr(), request.getOrderStatus()); + List orderOutsWithLocation = new ArrayList<>(); + for (OrderOut orderOut : orderOuts){ + if (orderOut.getOrderType() == 3){ + orderOutsWithLocation.add(orderOut); + } + } + return new WmsApiResponse<>(0, "查询成功", orderOutsWithLocation); + } + + @Override + public WmsApiResponse downCheckTask(Stock stock) { +// log.info(stock.getAvailableNum().toString()); +// log.info(stock.getStockId()); +// log.info(stock.getOperationType()); + //检查库存是否存在 + Stock stockQuery = new Stock(); + stockQuery.setStockId(stock.getStockId()); + List stocks = stockMapper.selStocks(stockQuery); + if (stocks.isEmpty()){ + return new WmsApiResponse<>(1, "该库存已经不存在,请刷新后重试", null); + } + stockQuery = stocks.get(0); + if (stockQuery.getStockStatus() != 0){ + return new WmsApiResponse<>(1, "该库存已经出库中,请刷新后重试", null); + } + Task task = new Task(); + task.setTaskId(WmsUtils.generateUUIDString()); + task.setTaskType(TaskType.OUT.getCode()); + task.setTaskStatus(OrderOutStatusEnum.CREATED.getCode()); + task.setTaskGroup("PYPK"); + task.setOrigin(stockQuery.getLocationId()); + if (Objects.equals(stockQuery.getProviderName(), "大")){ + task.setDestination("104"); + } else { + task.setDestination("241"); + } + task.setPickStand(""); + task.setWeight(0.0); + task.setVehicleNo(stockQuery.getVehicleId()); + task.setCreateTime(new Date()); + task.setUserName("wms"); + task.setGoodsId(stockQuery.getGoodsId()); + task.setGoodsName(stockQuery.getGoodsName()); + task.setOperateNum(stockQuery.getRealNum()); + task.setTotalNum(stockQuery.getRealNum()); + task.setTaskPriority(1); + task.setRemark1(stockQuery.getRemark()); + int addTasks = taskMapper.addTask(task); + if(addTasks == 1) { + //更新库存为出库中 + // 把这条库存记录可用数量更新为 0 + stockMapper.updateStockAvailableNumWithStockId(stockQuery.getStockId(), 0); + // 更新该托盘号上所有的库存为出库中 + stockMapper.updateStockStatusWithLocationId(stockQuery.getLocationId(), StockStatus.OUT.getCode()); + return new WmsApiResponse<>(1, "添加成功", null); + } + return new WmsApiResponse<>(0, "添加成功", null); + } + + @Override + public WmsApiResponse executeOrderOutByLocation(String rowId) { + //根据rowId去出库单中找对应的盘点任务 + List orderOutTask = orderOutMapper.queryWithRowId(rowId); + if(orderOutTask == null || orderOutTask.isEmpty()) { + return new WmsApiResponse<>(0, "该出库任务已被删除", null); + } + OrderOut orderOut = orderOutTask.get(0); + // 将该出库单号对应的库位生成出库任务 + Stock queryStock = new Stock(); + queryStock.setStockStatus(0); + //判断,e按料号,f按库位 + queryStock.setLocationId(orderOut.getGoodsId()); + List stockList0 = stockMapper.selStocks(queryStock); + if(stockList0 == null || stockList0.isEmpty()) { + return new WmsApiResponse<>(0, String.format("该库别没有库存,请稍后再试,库别:%s", "珀金斯立体库"), null); + } + List stockList = new ArrayList<>(); + stockList.add(stockList0.get(0)); + //查询一号出入库口状态,如果是1则是出库,需要平均分配。0和2则正常入库,终点依旧 + List configs = configMapper.selectConfigs("100"); + Config config = configs.get(0); + String destination; + if (Objects.equals(config.getConfigValue(), "1")){ + //从task表中查询所有终点为241和201,进行数量对比,将数量少的值赋值给变量 + Task task = new Task(); + task.setDestination("241"); + List TasksBy241 = taskMapper.selTasks(task); + task.setDestination("201"); + List TasksBy201 = taskMapper.selTasks(task); + //进行数量对比,将数量少的值赋值给变量destination + destination = (TasksBy241.size() > TasksBy201.size()) ? ("201"):("241"); + }else{ + destination = "241"; + } + // 检查这些应该盘点的库位有没有任务在执行 + for(Stock stock : stockList) { + List notCompleteTasks = taskMapper.haveNotCompleteTask(stock.getLocationId()); + if(notCompleteTasks == null) { + return new WmsApiResponse<>(0, String.format("数据库校验任务失败,请稍后再试,库位:%s", stock.getLocationId()), null); + } + if(!notCompleteTasks.isEmpty()) { + return new WmsApiResponse<>(0, String.format("该库位有任务在执行,请稍后再试,库位:%s", stock.getLocationId()), null); + } + Task task = new Task(); + task.setTaskId(WmsUtils.generateUUIDString()); + task.setTaskType(TaskType.OUT.getCode()); + task.setTaskStatus(OrderOutStatusEnum.CREATED.getCode()); + task.setTaskGroup(orderOut.getRowId()); + task.setOrigin(stock.getLocationId()); + if (Objects.equals(stock.getProviderName(), "大")){ + task.setDestination("104"); + } else { + task.setDestination(destination); + } + task.setPickStand(""); + task.setWeight(0.0); + task.setVehicleNo(stock.getVehicleId()); + task.setCreateTime(new Date()); + task.setUserName("wms"); + task.setGoodsId(stock.getGoodsId()); + task.setGoodsName(stock.getGoodsName()); + task.setOperateNum(stock.getRealNum()); + task.setTotalNum(stock.getRealNum()); + task.setTaskPriority(1); + task.setRemark1(stock.getRemark()); + //checkTasks.add(task); + int addTasks = taskMapper.addTask(task); + if(addTasks == 1) { + // 把这条库存记录可用数量更新为 0 + stockMapper.updateStockAvailableNumWithStockId(stock.getStockId(), 0); + // 更新该托盘号上所有的库存为出库中 + stockMapper.updateStockStatusWithLocationId(stock.getLocationId(), StockStatus.OUT.getCode()); + //修改盘点单状态为1 + OrderOut orderOut1 = new OrderOut(); + orderOut1.setStatus(OrderOutStatusEnum.RUNNING.getCode()); + orderOut1.setRowId(rowId); + int deleteResult = orderOutMapper.update(orderOut1); + if (deleteResult > 0){ + log.info("添加任务成功,修改出库单状态成功,任务:{}", task); + } + return new WmsApiResponse<>(1, "添加成功", null); + } + } + return new WmsApiResponse<>(0, "添加失败", null); + } + + + + + /** + * 删除出库单 + * @param rowId 出库单ID + * @return 结果 + */ + public WmsApiResponse deleteOrderOut(String rowId) { + try { + // 确保 orderId 不为空 + if (rowId == null) { + return new WmsApiResponse<>(1, "执行失败,参数错误", null); + } + // 调用 Mapper 方法执行删除操作 + int deletedResult = orderOutMapper.deleteOrderOut(rowId); + // 检查删除是否成功 + if (deletedResult > 0) { + return new WmsApiResponse<>(0, "删除成功", true); + } else { + return new WmsApiResponse<>(1, "订单不存在", false); + } + } catch (Exception e) { + // 记录异常 + return new WmsApiResponse<>(1, "删除失败", false); + } + + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/PartInfoServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/PartInfoServiceImplements.java new file mode 100644 index 0000000..77e1ac8 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/PartInfoServiceImplements.java @@ -0,0 +1,40 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.PartInfo; +import com.wms.mapper.PartInfoMapper; +import com.wms.service.PartInfoService; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class PartInfoServiceImplements implements PartInfoService { + private final PartInfoMapper partInfoMapper; + @Override + public List selParts(PartInfo partInfo) { + return partInfoMapper.selParts(partInfo); + } + + @Override + public PartInfo selPartByPartNo(String material) { + return partInfoMapper.selPartByPartNo(material); + } + + @Override + public int addPart(PartInfo partInfo) { + return partInfoMapper.addPart(partInfo); + } + + @Override + public int modifyPart(PartInfo partInfo) { + return partInfoMapper.modifyPart(partInfo); + } + + @Override + public int deletePartByPartNo(String material) { + return partInfoMapper.deletePartByPartNo(material); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/PermissionServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/PermissionServiceImplements.java new file mode 100644 index 0000000..28b462b --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/PermissionServiceImplements.java @@ -0,0 +1,43 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Permission; +import com.wms.mapper.PermissionMapper; +import com.wms.service.PermissionService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +@RequiredArgsConstructor +public class PermissionServiceImplements implements PermissionService { + private final PermissionMapper permissionMapper; + @Override + public List selectPermissionByRoleId(int roleId) { + Permission permission = new Permission(); + permission.setRoleId(roleId); + return permissionMapper.selectPermissionByRoleId(permission); + } + + @Override + public List selectPermissionWithOutL1(int roleId, List menuIds) { + return permissionMapper.selectPermissionWithOutL1(roleId, "(" + String.join(",", menuIds) + ")"); + } + + @Override + public List selectAll() { + return permissionMapper.selectAll(); + } + + @Override + public int saveBatch(List permissions) { + return permissionMapper.saveBatch(permissions); + } + + @Override + public int removePermissonsByRoleId(int roleId) { + Permission permission = new Permission(); + permission.setRoleId(roleId); + return permissionMapper.removePermissonsByRoleId(permission); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/RequestInImplement.java b/src/main/java/com/wms/service/serviceImplements/RequestInImplement.java new file mode 100644 index 0000000..475924a --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/RequestInImplement.java @@ -0,0 +1,219 @@ +package com.wms.service.serviceImplements; + +import com.wms.bussiness.TaskOperation; +import com.wms.constants.enums.LocationStatus; +import com.wms.constants.enums.TaskType; +import com.wms.constants.enums.WmsTaskStatus; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.wcs.RequireInRequest; +import com.wms.entity.table.Location; +import com.wms.entity.table.Task; +import com.wms.mapper.AppOrderInMapper; +import com.wms.mapper.LocationMapper; +import com.wms.mapper.StockMapper; +import com.wms.mapper.TaskMapper; +import com.wms.service.IRequestInService; +import com.wms.service.StockService; +import com.wms.service.TaskService; +import com.wms.utils.storage.LocationUtils; +import jakarta.servlet.http.HttpServletRequest; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Date; +import java.util.List; +import java.util.UUID; + +@Slf4j +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class RequestInImplement implements IRequestInService { + + /** + * 任务操作类 + */ + private final TaskOperation taskOperation; + + /** + * 库存 Mapper + */ + private final StockMapper stockMapper; + + /** + * 库位 Mapper + */ + private final LocationMapper locationMapper; + + /** + * 任务 Mapper + */ + private final TaskMapper taskMapper; + + + /** + * 库存服务 + */ + private final StockService stockService; + /** + * 库位操作类 + */ + private final LocationUtils locationUtils; + + /** + * 请求头部信息 + */ + private final HttpServletRequest servletRequest; + + /** + * 任务服务 + */ + private final TaskService taskService; + + /** + * 订单入库 Mapper + */ + private final AppOrderInMapper appOrderInMapper; + + + + + + /* + * 空托垛入库 + * */ + public ResponseEntity emptyOrderIn(RequireInRequest request) { + //两个点位都有叠盘入库 + if(request.getPoint().equals("201") || request.getPoint().equals("228")) {//小托盘叠盘 + /* 查找一个空库位 */ + //每个巷道要留出5%的空库位用于移库,424(22),424,336(17) + int[] tunnelIds = {1, 2, 3}; + int[] requiredEmptySlots = {22, 22, 17}; + int userId = 1; + for (int i = 0; i < tunnelIds.length; i++) { + try { + int tunnelId = tunnelIds[i]; + int requiredSlots = requiredEmptySlots[i]; + + Location useForKeepEmptyLocation = new Location(); + useForKeepEmptyLocation.setTunnelId(tunnelId); + useForKeepEmptyLocation.setLocationStatus(0); + + List useForKeepEmptyLocations = locationMapper.selLocations(useForKeepEmptyLocation); + int availableSlots = useForKeepEmptyLocations.size(); + + if (availableSlots >= requiredSlots) { + log.info("空托入库,巷道 {} 剩余空库位 {},满足要求。", tunnelId, availableSlots); + userId = tunnelId; + break; + } else { + log.info("空托入库,巷道 {} 剩余空库位 {},不足5%,尝试下一个巷道。", tunnelId, availableSlots); + } + if (tunnelId == 3){ + log.info("空托入库,所有巷道剩余空库位均不足5%,取消入库!"); + return new ResponseEntity(-1, String.format("没有多余空闲库位,取消入库,条码号:%s", request.getVehicleNo())); + } + } catch (Exception e) { + log.error("空托入库,查询巷道 {} 空库位时发生错误:{}", tunnelIds[i], e.getMessage()); + return new ResponseEntity(-1, "查询空库位时发生错误"); + } + } + /* 查找一个空库位 */ + Location emptyLocation = new Location(); + emptyLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + emptyLocation.setTunnelId(userId); + List emptyLocations = locationMapper.selLocationsByDesc(emptyLocation); + if(emptyLocations == null) { + return new ResponseEntity(-1, "库位查找失败,网络连接异常,请稍后再试"); + } + + Location emptyLocationItem = locationUtils.checkCanUse(emptyLocations); + if(emptyLocationItem == null) { + return new ResponseEntity(-1, "没有可用库位或者库位存在干涉,请稍后再试"); + } + // 该空库位可用,生成一个入库任务,并将库存表更新库位 + // 更新库位表,占掉库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(emptyLocationItem.getLocationId()); + updateLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + updateLocation.setVehicleId(request.getVehicleNo()); + locationMapper.modifyLocation(updateLocation); // 占掉库位 + // 添加入库任务 + Task taskByLitterEngine = new Task(); + taskByLitterEngine.setTaskId(UUID.randomUUID().toString()); + taskByLitterEngine.setTaskType(TaskType.IN.getCode()); + taskByLitterEngine.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskByLitterEngine.setTaskGroup(UUID.randomUUID().toString()); + taskByLitterEngine.setOrigin(request.getPoint()); + taskByLitterEngine.setDestination(emptyLocationItem.getLocationId()); + taskByLitterEngine.setPickStand("小");//因为出库要选择不同的站台,要区分大小托盘,用这个字段来标记 + taskByLitterEngine.setWeight(0.0); + taskByLitterEngine.setVehicleNo(request.getVehicleNo()); + taskByLitterEngine.setCreateTime(new Date()); + taskByLitterEngine.setUserName(null); + taskByLitterEngine.setGoodsId(null); + taskByLitterEngine.setGoodsName(null); + taskByLitterEngine.setOperateNum(0); + taskByLitterEngine.setTotalNum(0); + taskByLitterEngine.setTaskPriority(1); + taskByLitterEngine.setRemark1("空托垛入库"); + //开始向任务表中添加任务 + int addTask = taskMapper.addTask(taskByLitterEngine); + if(addTask > 0) { + return new ResponseEntity(0, "存在入库任务,申请成功"); + } + return new ResponseEntity(-1, "添加入库任务失败,网络连接异常,请稍后再试"); + } else if (request.getPoint().equals("101")) {//大托盘叠盘 + /* 查找一个空库位 */ + Location emptyLocation = new Location(); + emptyLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + emptyLocation.setTunnelId(3); + List emptyLocations = locationMapper.selLocationsByDesc(emptyLocation); + if(emptyLocations == null) { + return new ResponseEntity(-1, "库位查找失败,网络连接异常,请稍后再试"); + } + if (emptyLocations.size() < 17){ + return new ResponseEntity(-1, "空闲库位不足5%,取消入库"); + } + + Location emptyLocationItem = locationUtils.checkCanUse(emptyLocations); + if(emptyLocationItem == null) { + return new ResponseEntity(-1, "没有可用库位或者库位存在干涉,请稍后再试"); + } + // 该空库位可用,生成一个入库任务,并将库存表更新库位 + // 更新库位表,占掉库位 + Location updateLocation = new Location(); + updateLocation.setLocationId(emptyLocationItem.getLocationId()); + updateLocation.setLocationStatus(LocationStatus.OCCUPY.getCode()); + updateLocation.setVehicleId(request.getVehicleNo()); + locationMapper.modifyLocation(updateLocation); // 占掉库位 + // 添加入库任务 + Task taskByLitterEngine = new Task(); + taskByLitterEngine.setTaskId(UUID.randomUUID().toString()); + taskByLitterEngine.setTaskType(TaskType.IN.getCode()); + taskByLitterEngine.setTaskStatus(WmsTaskStatus.NEW.getCode()); + taskByLitterEngine.setTaskGroup(UUID.randomUUID().toString()); + taskByLitterEngine.setOrigin(request.getPoint()); + taskByLitterEngine.setDestination(emptyLocationItem.getLocationId()); + taskByLitterEngine.setPickStand("大"); + taskByLitterEngine.setWeight(0.0); + taskByLitterEngine.setVehicleNo(request.getVehicleNo()); + taskByLitterEngine.setCreateTime(new Date()); + taskByLitterEngine.setUserName(null); + taskByLitterEngine.setGoodsId(null); + taskByLitterEngine.setGoodsName(null); + taskByLitterEngine.setOperateNum(0); + taskByLitterEngine.setTotalNum(0); + taskByLitterEngine.setTaskPriority(1); + taskByLitterEngine.setRemark1("空托垛入库"); + //开始向任务表中添加任务 + int addTask = taskMapper.addTask(taskByLitterEngine); + if(addTask > 0) { + return new ResponseEntity(0, "存在入库任务,申请成功"); + } + return new ResponseEntity(-1, "添加入库任务失败,网络连接异常,请稍后再试"); + } + return null; + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/RoleServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/RoleServiceImplements.java new file mode 100644 index 0000000..d0c262f --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/RoleServiceImplements.java @@ -0,0 +1,39 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Role; +import com.wms.mapper.RoleMapper; +import com.wms.service.RoleService; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +@RequiredArgsConstructor +public class RoleServiceImplements implements RoleService { + private final RoleMapper roleMapper; + @Override + public List selectRoles(Role role) { + return roleMapper.selectRoles(role); + } + + @Override + public Role selectMaxRoleId() { + return roleMapper.selectMaxRoleId(); + } + + @Override + public int addRole(Role role) { + return roleMapper.addRole(role); + } + + @Override + public int removeRole(Role role) { + return roleMapper.removeRole(role); + } + + @Override + public int updateRole(Role role) { + return roleMapper.updateRole(role); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/StandServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/StandServiceImplements.java new file mode 100644 index 0000000..effa96f --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/StandServiceImplements.java @@ -0,0 +1,45 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Stand; +import com.wms.mapper.StandMapper; +import com.wms.service.StandService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class StandServiceImplements implements StandService { + + private final StandMapper standMapper; + + @Autowired + public StandServiceImplements(StandMapper standMapper) { + this.standMapper = standMapper; + } + + @Override + public List selStands(Stand stand) { + return this.standMapper.selStands(stand); + } + + @Override + public Stand selStandById(String standId) { + return this.standMapper.selStandById(standId); + } + + @Override + public int addStand(Stand stand) { + return this.standMapper.addStand(stand); + } + + @Override + public int modifyStand(Stand stand) { + return this.standMapper.modifyStand(stand); + } + + @Override + public int deleteStand(Stand stand) { + return this.standMapper.deleteStand(stand); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/StockServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/StockServiceImplements.java new file mode 100644 index 0000000..14650b2 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/StockServiceImplements.java @@ -0,0 +1,72 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Stock; +import com.wms.mapper.StockMapper; +import com.wms.service.StockService; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class StockServiceImplements implements StockService { + + private final StockMapper stockMapper; + + @Override + public List selStocks(Stock stock) { + return this.stockMapper.selStocks(stock); + } + + @Override + public List selStocksFront(String query) { + return stockMapper.selStocksFront(query); + } + + @Override + public List selStocksFrontTwo(String query, String vehicle) { + return stockMapper.selStocksFrontTwo(query, vehicle); + } + + @Override + public int addStock(Stock stock) { + return this.stockMapper.addStock(stock); + } + + @Override + public int modifyStock(Stock stock) { + return this.stockMapper.modifyStock(stock); + } + + @Override + public int deleteStock(String stockId) { + return this.stockMapper.deleteStock(stockId); + } + + @Override + public List selStocksByGoodsId(Stock stock) { + return stockMapper.selStocksByGoodsId(stock); + } + + @Override + public List selStockOutOfDate() { + return stockMapper.selStockOutOfDate(); + } + + @Override + public List selStockNearDeadLine(int nearInterval) { + return stockMapper.selStockNearDeadLine(nearInterval); + } + + @Override + public List selStockLongTimeNoUse(int nearInterval) { + return stockMapper.selStockLongTimeNoUse(nearInterval); + } + + @Override + public int resetStock(Stock stock) { + return stockMapper.resetStock(stock); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/TaskRecordServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/TaskRecordServiceImplements.java new file mode 100644 index 0000000..7fe4718 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/TaskRecordServiceImplements.java @@ -0,0 +1,45 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Task; +import com.wms.mapper.TaskRecordMapper; +import com.wms.service.TaskRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class TaskRecordServiceImplements implements TaskRecordService { + + private final TaskRecordMapper taskRecordMapper; + + @Autowired + public TaskRecordServiceImplements(TaskRecordMapper taskRecordMapper) { + this.taskRecordMapper = taskRecordMapper; + } + + @Override + public List selTasks(Task taskRecord) { + return taskRecordMapper.selTasks(taskRecord); + } + + @Override + public int addTask(Task taskRecord) { + return taskRecordMapper.addTask(taskRecord); + } + + @Override + public int executeTask(Task taskRecord) { + return taskRecordMapper.executeTask(taskRecord); + } + + @Override + public int deleteTask(String taskId) { + return taskRecordMapper.deleteTask(taskId); + } + + @Override + public int deleteTaskRecordRegularly() { + return taskRecordMapper.deleteTaskRecordRegularly(); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/TaskServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/TaskServiceImplements.java new file mode 100644 index 0000000..e9b20b1 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/TaskServiceImplements.java @@ -0,0 +1,45 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Task; +import com.wms.mapper.TaskMapper; +import com.wms.service.TaskService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class TaskServiceImplements implements TaskService { + + private final TaskMapper taskMapper; + + @Autowired + public TaskServiceImplements(TaskMapper taskMapper) { + this.taskMapper = taskMapper; + } + + @Override + public List selTasks(Task task) { + return taskMapper.selTasks(task); + } + + @Override + public int addTask(Task task) { + return taskMapper.addTask(task); + } + + @Override + public List selTasksByTaskId(Task task) { + return taskMapper.selTasksByTaskId(task); + } + + @Override + public int executeTask(Task task) { + return taskMapper.executeTask(task); + } + + @Override + public int deleteTask(String taskId) { + return taskMapper.deleteTask(taskId); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/UserServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/UserServiceImplements.java new file mode 100644 index 0000000..58503f3 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/UserServiceImplements.java @@ -0,0 +1,44 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.User; +import com.wms.mapper.UserMapper; +import com.wms.service.UserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class UserServiceImplements implements UserService { + + private final UserMapper userMapper; + @Autowired + public UserServiceImplements(UserMapper userMapper) { + this.userMapper = userMapper; + } + + @Override + public List selectUsers(User user) { + return userMapper.selectUsers(user); + } + + @Override + public int addUsers(User user) { + return userMapper.addUsers(user); + } + + @Override + public int deleteUser(int userId) { + return userMapper.deleteUser(userId); + } + + @Override + public int updateUser(User user) { + return userMapper.updateUser(user); + } + + @Override + public int updateUserInfromation(User user) { + return userMapper.updateUserInfromation(user); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/VehicleServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/VehicleServiceImplements.java new file mode 100644 index 0000000..4987863 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/VehicleServiceImplements.java @@ -0,0 +1,43 @@ +package com.wms.service.serviceImplements; + +import com.wms.entity.table.Vehicle; +import com.wms.mapper.VehicleMapper; +import com.wms.service.VehicleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class VehicleServiceImplements implements VehicleService { + private final VehicleMapper vehicleMapper; + + @Autowired + public VehicleServiceImplements(VehicleMapper vehicleMapper) { + this.vehicleMapper = vehicleMapper; + } + @Override + public List selVehicles(Vehicle vehicle) { + return vehicleMapper.selVehicles(vehicle); + } + + @Override + public Vehicle selVehicleById(String vehicleId) { + return vehicleMapper.selVehicleById(vehicleId); + } + + @Override + public int addVehicle(Vehicle vehicle) { + return vehicleMapper.addVehicle(vehicle); + } + + @Override + public int modifyVehicle(Vehicle vehicle) { + return vehicleMapper.modifyVehicle(vehicle); + } + + @Override + public int deleteVehicle(Vehicle vehicle) { + return vehicleMapper.deleteVehicle(vehicle); + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/parent/ContainerImplement.java b/src/main/java/com/wms/service/serviceImplements/parent/ContainerImplement.java new file mode 100644 index 0000000..b74de0a --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/parent/ContainerImplement.java @@ -0,0 +1,283 @@ +package com.wms.service.serviceImplements.parent; + +import com.wms.bussiness.TaskOperation; +import com.wms.constants.enums.*; +import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.container.ContainerApiLocalResponse; +import com.wms.entity.app.container.CreateInstoreTaskRequest; +import com.wms.entity.app.container.CreateInstoreTaskResponse; +import com.wms.entity.app.container.TaskStateNoticeRequest; +import com.wms.entity.table.AppOrderIn; +import com.wms.entity.table.Location; +import com.wms.entity.table.Stock; +import com.wms.entity.table.Task; +import com.wms.mapper.AppOrderInMapper; +import com.wms.mapper.LocationMapper; +import com.wms.mapper.StockMapper; +import com.wms.mapper.TaskMapper; +import com.wms.service.ContainerService; +import com.wms.utils.StringUtils; +import com.wms.utils.storage.LocationUtils; +import lombok.RequiredArgsConstructor; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.wms.utils.WmsUtils; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDateTime; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.UUID; + +/** + * 四向车 api service 的实现 + */ +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class ContainerImplement implements ContainerService { + + + private static final Logger log = LoggerFactory.getLogger(ContainerImplement.class); + /** + * 库存 Mapper + */ + private final StockMapper stockMapper; + + /** + * 库位操作类 + */ + private final LocationUtils locationUtils; + + /** + * 任务表操作类 + */ + private final TaskMapper taskMapper; + + /** + * 库位 Mapper + */ + private final LocationMapper locationMapper; + + /** + * 任务操作类 + */ + private final TaskOperation taskOperation; + + /** + * 订单入库 Mapper + */ + private final com.wms.mapper.AppOrderInMapper appOrderInMapper; + + /** + * 接收四向车请求扫码入库 + * @param request 请求信息 + * @return 响应信息 + */ + @Override + public CreateInstoreTaskResponse createInstoreTask(CreateInstoreTaskRequest request) { + //String md5 = StringUtils.containerMd5(request.getRequestId()); +// if(!md5.equals(request.getKey())) { +// return new CreateInstoreTaskResponse("400", "请求失败,密钥校验未通过"); +// } + if (request.getPalletNo().length() == 27){ + String code = request.getPalletNo(); + String productionDate = code.substring(15, 21); //生产日期 + SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd"); + Date date; + try { + // 将字符串解析成Date对象 + date = dateFormat.parse(productionDate); + } catch (ParseException e) { + throw new RuntimeException(e); + } + + AppOrderIn waitInStockQuery = new AppOrderIn(); + waitInStockQuery.setVehicleNo(request.getPalletNo()); + waitInStockQuery.setWareHouse("300002"); + waitInStockQuery.setOrderStatus(OrderInStatusEnum.CREATE.getCode()); + List waitInStockList = appOrderInMapper.select(waitInStockQuery); // 查找待入库的批次号 + if(waitInStockList.isEmpty()) { + return new CreateInstoreTaskResponse("400", String.format("条码:%s 不存在待入库的任务", request.getPalletNo())); + } + /* 查找可用库位 */ + List canUseLocations = locationUtils.getNewLocation(2); + if(canUseLocations.isEmpty()){ + return new CreateInstoreTaskResponse("400", "没有可用库位"); + } + Location useLocation = locationUtils.checkCanUse(canUseLocations); + if(useLocation == null) { + return new CreateInstoreTaskResponse("400", "暂没有可以直接使用的库位,因为存在互锁的库位,请等待当前任务都执行完成后再试"); + } + /* 找到可用的库位 */ /* 生成任务(生成的任务直接运行中,因为此处会把任务直接回回去),更新库存表内状态为入库中 */ + // 新建任务 插入任务表 + Task newInTask = new Task(); + newInTask.setTaskId(String.valueOf(Calendar.getInstance().getTimeInMillis())); + newInTask.setTaskGroup(UUID.randomUUID().toString()); + newInTask.setTaskType(TaskType.IN.getCode()); + newInTask.setTaskStatus(WmsTaskStatus.WAIT.getCode()); // 因为任务是直接返回去的,所以直接是已下发状态 + newInTask.setOrigin(request.getFromCellNo()); + newInTask.setDestination(useLocation.getLocationId()); + newInTask.setGoodsId(String.format("%s 等 %d 个物料", waitInStockList.get(0).getGoodsId(), waitInStockList.size())); + newInTask.setWeight(Double.valueOf(request.getWeight())); + newInTask.setCreateTime(new java.util.Date()); + newInTask.setUserName("四向车API"); + newInTask.setVehicleSize(Integer.valueOf(request.getHeight())); + newInTask.setVehicleNo(request.getPalletNo()); + newInTask.setTaskPriority(1); + //newInTask.setProductionDate(date); + int insertTaskResult = taskMapper.addTask(newInTask); // 添加入库任务 + if(insertTaskResult < 1) { + return new CreateInstoreTaskResponse("400", "生成任务失败,无法插入新的入库任务"); + } + // 更新库存中的待入库记录为入库中,并将库位更新进去 +// for(Stock waitInStock : waitInStockList) { +// Stock updateStock = new Stock(); +// updateStock.setStockId(waitInStock.getStockId()); +// updateStock.setStockStatus(StockStatus.IN_ING.getCode()); +// updateStock.setLocationId(useLocation.getLocationId()); +// stockMapper.modifyStock(updateStock); +// } + + for(AppOrderIn waitInStock : waitInStockList) { + AppOrderIn updateAppOrderIn = new AppOrderIn(); + updateAppOrderIn.setRowId(waitInStock.getRowId()); + updateAppOrderIn.setOrderStatus(OrderInStatusEnum.IN.getCode()); + updateAppOrderIn.setUpdateTime(LocalDateTime.now()); + appOrderInMapper.update(updateAppOrderIn); + //updateAppOrderIn.setLocationId(useLocation.getLocationId()); + //stockMapper.modifyStock(updateStock); + } + // 占用库位 + Location location = new Location(); + location.setLocationId(useLocation.getLocationId()); + location.setLocationStatus(LocationStatus.OCCUPY.getCode()); + location.setVehicleId(request.getPalletNo()); + locationMapper.modifyLocation(location); + + CreateInstoreTaskResponse success = new CreateInstoreTaskResponse(); + success.setCode("200"); + success.setMessage("生成入库任务成功"); + success.setWmsTaskId(newInTask.getTaskId()); + success.setPalletNo(request.getPalletNo()); + success.setFromCellNo(request.getFromCellNo()); + success.setToCellNo(useLocation.getLocationId()); + return success; + } else if (request.getPalletNo().length() == 19) { + AppOrderIn waitInStockQuery = new AppOrderIn(); + waitInStockQuery.setVehicleNo(request.getPalletNo()); + waitInStockQuery.setWareHouse("300002"); + waitInStockQuery.setOrderStatus(OrderInStatusEnum.BINDING.getCode()); + List waitInStockList = appOrderInMapper.select(waitInStockQuery); // 查找待入库的批次号 + if(waitInStockList.isEmpty()) { + return new CreateInstoreTaskResponse("400", String.format("条码:%s 不存在待入库的任务", request.getPalletNo())); + } + // 绑定完载具的数据入库 + String vehicleNo = request.getPalletNo(); // 载具号 + //获取零件号 + String goodsIdByContainerBX = vehicleNo.substring(0, 10); + + //查找可用库位 + List canUseLocations = locationUtils.getNewLocation(2); + if(canUseLocations.isEmpty()){ + return new CreateInstoreTaskResponse("400", "没有可用库位"); + } + Location useLocation = locationUtils.checkCanUse(canUseLocations); + if(useLocation == null) { + return new CreateInstoreTaskResponse("400", "暂没有可以直接使用的库位,因为存在互锁的库位,请等待当前任务都执行完成后再试"); + } + Task task = new Task(); + task.setTaskId(String.valueOf(Calendar.getInstance().getTimeInMillis())); + task.setTaskGroup(UUID.randomUUID().toString()); + task.setTaskType(TaskType.IN.getCode()); + task.setTaskStatus(WmsTaskStatus.WAIT.getCode()); + task.setOrigin(request.getFromCellNo()); + task.setDestination(useLocation.getLocationId()); + task.setGoodsId(goodsIdByContainerBX); + task.setWeight(Double.valueOf(request.getWeight())); + task.setCreateTime(new Date()); + task.setUserName("四向车API"); + task.setVehicleSize(Integer.valueOf(request.getHeight())); + task.setVehicleNo(request.getPalletNo()); + task.setPickStand(""); + task.setGoodsName(""); + task.setTaskPriority(1); + int addTask = taskMapper.addTask(task); + if(addTask < 1) { + return new CreateInstoreTaskResponse("400", "生成任务失败,无法插入新的入库任务"); + } + + for(AppOrderIn waitInStock : waitInStockList) { + AppOrderIn updateAppOrderIn = new AppOrderIn(); + updateAppOrderIn.setRowId(waitInStock.getRowId()); + updateAppOrderIn.setOrderStatus(OrderInStatusEnum.IN.getCode()); + updateAppOrderIn.setUpdateTime(LocalDateTime.now()); + appOrderInMapper.update(updateAppOrderIn); + //updateAppOrderIn.setLocationId(useLocation.getLocationId()); + //stockMapper.modifyStock(updateStock); + } + // 该空库位可用,生成一个入库任务,并将库存表更新库位 + // 更新库位表,占掉库位 + // 占用库位 + Location location = new Location(); + location.setLocationId(useLocation.getLocationId()); + location.setLocationStatus(LocationStatus.OCCUPY.getCode()); + location.setVehicleId(request.getPalletNo()); + locationMapper.modifyLocation(location);// 占掉库位 + + CreateInstoreTaskResponse success = new CreateInstoreTaskResponse(); + success.setCode("200"); + success.setMessage("生成并箱入库任务成功"); + success.setWmsTaskId(task.getTaskId()); + success.setPalletNo(request.getPalletNo()); + success.setFromCellNo(request.getFromCellNo()); + success.setToCellNo(useLocation.getLocationId()); + return success; + } + return new CreateInstoreTaskResponse("400", "条码长度错误"); + } + + /** + * 接收四向车任务状态通知 + * @param request 请求信息 + * @return 响应信息 + */ + @Override + public ContainerApiLocalResponse taskStateNotice(TaskStateNoticeRequest request) { +// String md5 = StringUtils.containerMd5(request.getRequestId()); +// if(!md5.equals(request.getKey())) { +// return new ContainerApiLocalResponse("400", "请求失败,密钥校验未通过"); +// } + /* 查找出相关任务 */ + Task queryTask = new Task(); + queryTask.setTaskId(request.getWmsTaskId()); + List taskList = taskMapper.selTasks(queryTask); + if(taskList == null) { + return new ContainerApiLocalResponse("400", String.format("任务:%s 未找到任务,数据库查询失败", request.getWmsTaskId())); + } + if(taskList.isEmpty()) { + return new ContainerApiLocalResponse("400", String.format("任务:%s 不存在", request.getWmsTaskId())); + } + Task thisTask = taskList.get(0); + if(request.getTaskState().equals("20")) { // 任务完成 + boolean completeResult = taskOperation.completeTask(thisTask); + if(!completeResult) { + return new ContainerApiLocalResponse("400", String.format("任务:%s 完成事件异常,请重试", request.getWmsTaskId())); + } + return new ContainerApiLocalResponse("200", "任务完成"); + } + if(request.getTaskState().equals("21")) { // 任务取消 + boolean cancelResult = taskOperation.cancelTask(thisTask); + if(!cancelResult) { + return new ContainerApiLocalResponse("400", String.format("任务:%s 取消事件异常,请重试", request.getWmsTaskId())); + } + return new ContainerApiLocalResponse("200", "任务取消"); + } + return new ContainerApiLocalResponse("400", String.format("不支持的任务状态:%s", request.getTaskState())); + + + } +} diff --git a/src/main/java/com/wms/service/serviceImplements/parent/MesServiceImplement.java b/src/main/java/com/wms/service/serviceImplements/parent/MesServiceImplement.java new file mode 100644 index 0000000..31b5365 --- /dev/null +++ b/src/main/java/com/wms/service/serviceImplements/parent/MesServiceImplement.java @@ -0,0 +1,228 @@ +package com.wms.service.serviceImplements.parent; + +import com.wms.constants.enums.*; +import com.wms.entity.app.mes.CheckNoticeRequest; +import com.wms.entity.app.mes.MesApiLocalResponse; +import com.wms.entity.app.mes.OutNoticeRequest; +import com.wms.entity.app.mes.ReceiptInRequest; +import com.wms.entity.table.*; +import com.wms.mapper.*; +import com.wms.service.MesService; +import com.wms.utils.StringUtils; +import com.wms.utils.WmsUtils; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.*; + +/** + * 上位系统交互 + * mes控制器的 Service 实现 + * @author icewint + */ +@Service +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class MesServiceImplement implements MesService { + + /** + * 入库单 Mapper + */ + private final AppOrderInMapper appOrderInMapper; + + /** + * 出库通知单 Mapper + */ + private final OrderOutMapper orderOutMapper; + + /** + * 盘点通知单 Mapper + */ + private final OrderCheckMapper orderCheckMapper; + + private final StockMapper stockMapper; + + private final TaskMapper taskMapper; + + + /* + + */ +// + + /** + * mes 入库之前用此接口推送信息 + * @param request 请求信息 + * @return 返回信息 + */ + @Override + public MesApiLocalResponse receiptIn(ReceiptInRequest request) { + try{ + /* 校验入库单是否存在 */ + List checkIsExistListResult = appOrderInMapper.select(new AppOrderIn(request.getGuid())); + if(checkIsExistListResult == null) { + // 数据库查询失败 + return new MesApiLocalResponse(0, String.format("记录号校验失败,请重试,记录号:%s", request.getGuid())); + } + if(!checkIsExistListResult.isEmpty()) { + // 记录已经存在 + return new MesApiLocalResponse(0, String.format("该条记录已经存在,记录号:%s", request.getGuid())); + } + /* 添加信息进入入库单,标记为创建状态 */ + AppOrderIn orderIn = new AppOrderIn(); + orderIn.setRowId(UUID.randomUUID().toString()); + orderIn.setGuid(request.getGuid()); + orderIn.setInType(request.getType()); + orderIn.setBatchNo(request.getLosnr()); + orderIn.setVehicleNo(request.getVehicleNo()); + orderIn.setGoodsId(request.getItemCode()); + orderIn.setGoodsNum(new BigDecimal(request.getLotQty())); + orderIn.setWareHouse(request.getWarehouse()); +// if (Objects.equals(request.getWarehouse(), "100001")){ +// orderIn.setOrderStatus(OrderInStatusEnum.CREATE.getCode()); +// } else if (Objects.equals(request.getWarehouse(), "300002")) { +// orderIn.setOrderStatus(OrderInStatusEnum.BINDING.getCode()); +// } + orderIn.setOrderStatus(OrderInStatusEnum.CREATE.getCode()); +// orderIn.setCreateTime(LocalDateTime.now()); + orderIn.setCreatePerson("MES_API"); + orderIn.setUpdateTime(LocalDateTime.now()); + int addResult = appOrderInMapper.insert(orderIn); + if(addResult == 1) { + return new MesApiLocalResponse(1, "入库单添加成功"); + } + return new MesApiLocalResponse(0, "入库单添加失败"); + }catch (Exception e){ + return new MesApiLocalResponse(0, "入库单添加异常"); + } + } + + + /** + * mes 出库通知单 + * @param request 请求信息 + * @return 返回信息 + */ + @Override + public MesApiLocalResponse outNotice(OutNoticeRequest request) { + /* 检验记录是否存在 */ + try{ + OrderOut checkIsExist = new OrderOut(); + checkIsExist.setRecordId(request.getGuid()); + List checkIsExistListResult = orderOutMapper.query(checkIsExist); + if(!checkIsExistListResult.isEmpty()) { + return new MesApiLocalResponse(0, String.format("该条记录已经存在,记录号:%s", request.getGuid())); + } + /* 插入数据,插入记录表 */ + List orderOutList = new ArrayList<>(); + for(var row : request.getRow()) { + OrderOut orderOut = new OrderOut(); + orderOut.setRowId(UUID.randomUUID().toString()); + orderOut.setRecordId(request.getGuid()); + orderOut.setOrderId(request.getTransferNo()); + orderOut.setWarehouseOrigin(request.getFWarehouse()); + orderOut.setWarehouseDestination(request.getTWarehouse()); + orderOut.setOrderType(request.getType()); + //orderOut.setDeliveryTime(StringUtils.toData(request.getRDate())); + orderOut.setRowNo(Integer.parseInt(row.getTransferLine())); + orderOut.setGoodsId(row.getItemCode()); + orderOut.setGoodsNum(row.getQty()); + //Integer.parseInt(row.getQty()) + orderOut.setUnit(row.getUnit()); + orderOut.setStatus(OrderOutStatusEnum.CREATED.getCode()); + orderOut.setCreateTime(new Timestamp(System.currentTimeMillis())); + orderOutList.add(orderOut); + } + if(orderOutList.isEmpty()) { + return new MesApiLocalResponse(0, "没有数据"); + } + int addOrderResult = orderOutMapper.insertList(orderOutList); + if(addOrderResult == orderOutList.size()) { + return new MesApiLocalResponse(1, "添加出库单成功"); + } + return new MesApiLocalResponse(0, "添加失败,请稍后再试"); + }catch (Exception e){ + return new MesApiLocalResponse(0, "添加失败,请稍后再试"); + } + } + + /** + * mes 盘点通知单 IF206 + * @param request 请求信息 + * @return 返回信息 + */ + @Override + public MesApiLocalResponse checkNotice(CheckNoticeRequest request) { + /* 检测这条记录存不存在 */ + try{ + OrderCheck checkIsExist = new OrderCheck(); + checkIsExist.setRecordId(request.getGuid()); + List checkIsExistListResult = orderCheckMapper.query(checkIsExist); + if(!checkIsExistListResult.isEmpty()) { + return new MesApiLocalResponse(0, String.format("该条记录已经存在,记录号:%s", request.getGuid())); + } + /* 添加盘点记录 */ + OrderCheck orderCheck = new OrderCheck(); + orderCheck.setRecordId(request.getGuid()); + orderCheck.setCheckId(request.getInventoryNo()); + orderCheck.setWarehouse(request.getIWarehouse()); + orderCheck.setStatus(OrderCheckStatusEnum.CREATED.getCode()); + //orderCheck.setCreateTime(LocalDate); + int insertOrderCheckResult = orderCheckMapper.insert(orderCheck); + if(insertOrderCheckResult > 0) { + return new MesApiLocalResponse(1, "添加成功"); + } + return new MesApiLocalResponse(0, "添加失败,请稍后再试"); + }catch (Exception e){ + return new MesApiLocalResponse(0, "添加异常,请稍后再试"); + } + + +// +// // 将该盘点单号对应的库别全部生成盘点任务 +// List checkTasks = new ArrayList<>(); // 盘点任务列表 +// Stock queryStock = new Stock(); +// queryStock.setWarehouseName(request.getIWarehouse()); +// List stockList = stockMapper.selStocks(queryStock); +// if(stockList == null || stockList.isEmpty()) { +// return new MesApiLocalResponse(0, String.format("该库别没有库存,请稍后再试,库别:%s", request.getIWarehouse())); +// } +// // 检查这些应该盘点的库位有没有任务在执行 +// for(Stock stock : stockList) { +// List notCompleteTasks = taskMapper.haveNotCompleteTask(stock.getLocationId()); +// if(notCompleteTasks == null) { +// return new MesApiLocalResponse(0, String.format("数据库校验任务失败,请稍后再试,库位:%s", stock.getLocationId())); +// } +// if(!notCompleteTasks.isEmpty()) { +// return new MesApiLocalResponse(0, String.format("该库位有任务在执行,请稍后再试,库位:%s", stock.getLocationId())); +// } +// Task task = new Task(); +// task.setTaskId(WmsUtils.generateUUIDString()); +// task.setTaskType(TaskType.INVENTORY.getCode()); +// task.setTaskStatus(OrderOutStatusEnum.CREATED.getCode()); +// task.setTaskGroup(request.getInventoryNo()); +// task.setOrigin(stock.getLocationId()); +// task.setDestination(""); +// task.setPickStand(""); +// task.setWeight(0.0); +// task.setVehicleNo(stock.getVehicleId()); +// task.setCreateTime(new Date()); +// task.setUserName("mes"); +// task.setGoodsId(stock.getGoodsId()); +// task.setGoodsName(stock.getGoodsName()); +// task.setOperateNum(stock.getRealNum()); +// task.setTotalNum(stock.getRealNum()); +// task.setTaskPriority(1); +// checkTasks.add(task); +// } +// int addTasks = taskMapper.addTasks(checkTasks); +// if(addTasks == checkTasks.size()) { +// return new MesApiLocalResponse(1, "添加成功"); +// } + + } +} diff --git a/src/main/java/com/wms/utils/HttpUtils.java b/src/main/java/com/wms/utils/HttpUtils.java new file mode 100644 index 0000000..62fdc63 --- /dev/null +++ b/src/main/java/com/wms/utils/HttpUtils.java @@ -0,0 +1,227 @@ +package com.wms.utils; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.nio.charset.Charset; +import java.util.Base64; +import java.util.Map; + +import jakarta.servlet.http.HttpServletRequest; +import org.apache.commons.lang3.StringUtils; +import org.apache.http.HttpEntity; +import org.apache.http.ParseException; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClients; +import org.apache.http.util.EntityUtils; + +/** + * Http工具类 + */ +public class HttpUtils { + + /** + * 获取请求的ip地址 + * @param request 请求 + * @return ip地址 + */ + public static String getIpAddr(HttpServletRequest request) { + String ip = request.getHeader("x-forwarded-for"); + if (ip == null || ip.isEmpty() || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("Proxy-Client-IP"); + } + if (ip == null || ip.isEmpty() || "unknown".equalsIgnoreCase(ip)) { + ip = request.getHeader("WL-Proxy-Client-IP"); + } + if (ip == null || ip.isEmpty() || "unknown".equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + if (ip != null && ip.indexOf(",") > 0) { + String[] parts = ip.split(","); + for (String part : parts) { + if (!part.isEmpty() && !"unknown".equalsIgnoreCase(part)) { + ip = part.trim(); + break; + } + } + } + if ("0:0:0:0:0:0:0:1".equals(ip)) { + ip = "127.0.0.1"; + } + return ip; + } + + /** + * 发送HttpGet请求(无参数) + * @param url 地址 + * @return 响应结果 + */ + public static String sendHttpGet(String url) { + String result = ""; + CloseableHttpClient httpClient = null; + CloseableHttpResponse response = null; + try { + httpClient = HttpClients.createDefault(); + HttpGet httpget = new HttpGet(url); + response = httpClient.execute(httpget); + HttpEntity entity = null; + if (response != null) { + entity = response.getEntity(); + } + if (entity != null) { + result = EntityUtils.toString(entity); + } + } catch (ParseException | IOException e) { + e.printStackTrace(); + } finally { + if(response!=null){ try{response.close();}catch (IOException e){ e.printStackTrace();} } + if(httpClient!=null){ try{httpClient.close();}catch(IOException e){ e.printStackTrace();} } + } + return result; + } + + /** + * 发送HttpGet请求(带参数) + * @param url 地址 + * @param header 参数放在请求头里面 + * @return 响应结果 + */ + public static String sendHttpGet(String url, Map header) { + if (header == null) {// 没有参数 + return sendHttpGet(url); + } + String result = ""; + CloseableHttpClient httpClient = null; + CloseableHttpResponse response = null; + try { + httpClient = HttpClients.createDefault(); + HttpGet httpGet = new HttpGet(url); + // 设置超时时间 + RequestConfig requestConfig = RequestConfig.custom() + .setConnectTimeout(5000) + .setConnectionRequestTimeout(1000) + .setSocketTimeout(5000).build(); + httpGet.setConfig(requestConfig); + for(Map.Entry entry : header.entrySet()){ + + httpGet.setHeader(entry.getKey(), entry.getValue()); + } + response = httpClient.execute(httpGet); + HttpEntity entity = null; + if (response != null) { + entity = response.getEntity(); + } + if (entity != null) { + result = EntityUtils.toString(entity); + } + } catch (ParseException | IOException e) { + e.printStackTrace(); + } finally { + if(response!=null){ try{response.close();}catch (IOException e){ e.printStackTrace();} } + if(httpClient!=null){ try{httpClient.close();}catch(IOException e){ e.printStackTrace();} } + } + return result; + } + + /** + * 发送httpPost请求(不需要认证信息) + * @param url 目的地址 + * @param param 参数 + * @return 请求结果 + */ + public static String sendHttpPostWithoutToken(String url,String param) { + return sendHttpPost(url, param, null, null, null); + } + + /** + * 发送httpPost请求 + * @param url 目的地址 + * @param param 参数 + * @param token 认证信息 + * @param userName 登录账户 + * @param password 登录密码 + * @return 请求结果 + */ + public static String sendHttpPost(String url, String param, String token, String userName, String password) { + String data=""; + CloseableHttpClient httpClient = null; + CloseableHttpResponse response = null; + try { + httpClient = HttpClients.createDefault(); + HttpPost httppost = new HttpPost(url); + RequestConfig requestConfig = RequestConfig.custom() + .setConnectTimeout(5000) + .setConnectionRequestTimeout(1000) + .setSocketTimeout(5000).build(); + httppost.setConfig(requestConfig); + httppost.setHeader("Content-Type", "application/json;charset=UTF-8"); + if (StringUtils.isEmpty(token) && StringUtils.isNotEmpty(userName) && StringUtils.isNotEmpty(password)) { + httppost.setHeader("Authorization", "Basic " + Base64.getUrlEncoder().encodeToString((userName + ":" + password).getBytes())); + } else { + httppost.setHeader("Authorization", "Bearer " + token); + } + StringEntity se = new StringEntity(param, Charset.forName("UTF-8")); + se.setContentType("text/json"); + se.setContentEncoding("UTF-8"); + httppost.setEntity(se); + response = httpClient.execute(httppost); + data = EntityUtils.toString(response.getEntity(), "utf-8"); + EntityUtils.consume(response.getEntity()); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if(response!=null){ try{response.close();}catch (IOException e){ e.printStackTrace();} } + if(httpClient!=null){ try{httpClient.close();}catch(IOException e){ e.printStackTrace();} } + } + return data; + } + + /** + * 发送httpPost请求 + * @param url 目的地址 + * @param param 参数 + * @param token 认证信息 + * @param userName 登录账户 + * @param password 登录密码 + * @return 请求结果 + */ + public static String sendHttpPostForm(String url, String param, String token, String userName, String password) { + + String data=""; + CloseableHttpClient httpClient = null; + CloseableHttpResponse response = null; + try { + httpClient = HttpClients.createDefault(); + HttpPost httppost = new HttpPost(url); + RequestConfig requestConfig = RequestConfig.custom() + .setConnectTimeout(5000) + .setConnectionRequestTimeout(1000) + .setSocketTimeout(5000).build(); + httppost.setConfig(requestConfig); + httppost.setHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"); + if (StringUtils.isEmpty(token) && StringUtils.isNotEmpty(userName) && StringUtils.isNotEmpty(password)) { + httppost.setHeader("Authorization", "Basic " + Base64.getUrlEncoder().encodeToString((userName + ":" + password).getBytes())); + } else { + httppost.setHeader("Authorization", "Bearer " + token); + } + StringEntity se = new StringEntity(param, Charset.forName("UTF-8")); + se.setContentType("application/x-www-form-urlencoded"); + se.setContentEncoding("UTF-8"); + httppost.setEntity(se); + response = httpClient.execute(httppost); + data = EntityUtils.toString(response.getEntity(), "utf-8"); + EntityUtils.consume(response.getEntity()); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if(response!=null){ try{response.close();}catch (IOException e){ e.printStackTrace();} } + if(httpClient!=null){ try{httpClient.close();}catch(IOException e){ e.printStackTrace();} } + } + return data; + } +} diff --git a/src/main/java/com/wms/utils/JWTUtils.java b/src/main/java/com/wms/utils/JWTUtils.java new file mode 100644 index 0000000..20363ad --- /dev/null +++ b/src/main/java/com/wms/utils/JWTUtils.java @@ -0,0 +1,15 @@ +package com.wms.utils; + +import com.auth0.jwt.JWT; +import com.auth0.jwt.interfaces.DecodedJWT; + +public class JWTUtils { + /** + * 解码token + * @param token token + * @return 结果 + */ + public static DecodedJWT decodeToken(String token) { + return JWT.decode(token); + } +} diff --git a/src/main/java/com/wms/utils/MyPassword.java b/src/main/java/com/wms/utils/MyPassword.java new file mode 100644 index 0000000..ceb6ab3 --- /dev/null +++ b/src/main/java/com/wms/utils/MyPassword.java @@ -0,0 +1,113 @@ +package com.wms.utils; + +import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; +import java.security.SecureRandom; + +/** + * Md5加密算法 + */ +public class MyPassword { + + // 密钥 + private static final String myPwd = "fdbk"; + + /** + * 加密 + * @param originalPassword + * @return + */ + public static String encrypt(String originalPassword) { + byte[] targetPassword; + try { + // 声明加密算法 + KeyGenerator kgen = KeyGenerator.getInstance("AES"); + SecureRandom random = SecureRandom.getInstance("SHA1PRNG"); + random.setSeed(myPwd.getBytes()); + kgen.init(128, random); + SecretKey secretKey = kgen.generateKey(); + byte[] enCodeFormat = secretKey.getEncoded(); + SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES"); + + // 创建密码器 + Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); + cipher.init(Cipher.ENCRYPT_MODE, key); + byte[] byteContent = originalPassword.getBytes(); + targetPassword = cipher.doFinal(byteContent); + + } catch (Exception e) { + return null; + } + + return parseByte2HexStr(targetPassword); + } + + /** + * 解密 + * @param targetPassword + * @return + */ + public static String decrypt(String targetPassword) { + byte[] originalPassword; + byte[] content = parseHexStr2Byte(targetPassword); + try { + KeyGenerator kgen = KeyGenerator.getInstance("AES"); + SecureRandom random = SecureRandom.getInstance("SHA1PRNG"); + random.setSeed(myPwd.getBytes()); + kgen.init(128, random); + SecretKey secretKey = kgen.generateKey(); + byte[] enCodeFormat = secretKey.getEncoded(); + SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES"); + + // 创建密码器 + Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); + cipher.init(Cipher.DECRYPT_MODE, key); + originalPassword = cipher.doFinal(content); + + } catch (Exception e) { + e.printStackTrace(); + return null; + } + + return new String(originalPassword); + } + + /** + * 将二进制转换成十六进制 + * + * @param buf + * @return + */ + public static String parseByte2HexStr(byte buf[]) { + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < buf.length; i++) { + String hex = Integer.toHexString(buf[i] & 0xFF); + if (hex.length() == 1) { + hex = '0' + hex; + } + sb.append(hex.toUpperCase()); + } + return sb.toString(); + } + + /** + * 将十六进制转换为二进制 + * + * @param hexStr + * @return + */ + public static byte[] parseHexStr2Byte(String hexStr) { + if (hexStr.length() < 1) { + return null; + } + byte[] result = new byte[hexStr.length() / 2]; + for (int i = 0; i < hexStr.length() / 2; i++) { + int high = Integer.parseInt(hexStr.substring(i * 2, i * 2 + 1), 16); + int low = Integer.parseInt(hexStr.substring(i * 2 + 1, i * 2 + 2), 16); + result[i] = (byte) (high * 16 + low); + } + return result; + } +} diff --git a/src/main/java/com/wms/utils/StringUtils.java b/src/main/java/com/wms/utils/StringUtils.java new file mode 100644 index 0000000..7ee4acc --- /dev/null +++ b/src/main/java/com/wms/utils/StringUtils.java @@ -0,0 +1,143 @@ +package com.wms.utils; + +import com.alibaba.fastjson2.JSON; + +/** + * WMS字符串工具类 + * @author 梁州 + * @date 2023/2/13 + */ +public class StringUtils { + /** 空字符串 */ + private static final String NULLSTR = ""; + + /** 下划线 */ + private static final char SEPARATOR = '_'; + + public static boolean isEmpty(String value) { + return value == null || value.equals(NULLSTR); + } + + public static boolean isNotEmpty(String value) { + return !isEmpty(value); + } + + /** + * 驼峰转下划线命名 + */ + public static String toUnderScoreCase(String str) + { + if (str == null) + { + return null; + } + StringBuilder sb = new StringBuilder(); + // 前置字符是否大写 + boolean preCharIsUpperCase = true; + // 当前字符是否大写 + boolean curreCharIsUpperCase = true; + // 下一字符是否大写 + boolean nexteCharIsUpperCase = true; + for (int i = 0; i < str.length(); i++) + { + char c = str.charAt(i); + if (i > 0) + { + preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1)); + } + else + { + preCharIsUpperCase = false; + } + + curreCharIsUpperCase = Character.isUpperCase(c); + + if (i < (str.length() - 1)) + { + nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1)); + } + + if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) + { + sb.append(SEPARATOR); + } + else if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase) + { + sb.append(SEPARATOR); + } + sb.append(Character.toLowerCase(c)); + } + + return sb.toString(); + } + + /** + * 驼峰式命名法 + * 例如:user_name->userName + */ + public static String toCamelCase(String s) + { + if (s == null) + { + return null; + } + if (s.indexOf(SEPARATOR) == -1) + { + s = s.toLowerCase(); + return s; + } + s = s.toLowerCase(); + StringBuilder sb = new StringBuilder(s.length()); + boolean upperCase = false; + for (int i = 0; i < s.length(); i++) + { + char c = s.charAt(i); + + if (c == SEPARATOR) + { + upperCase = true; + } + else if (upperCase) + { + sb.append(Character.toUpperCase(c)); + upperCase = false; + } + else + { + sb.append(c); + } + } + return sb.toString(); + } + + /** + * 将对象转为json字符串 + * @param o 实体类 + * @return 字符串 + */ + public static String convertJsonString(Object o) { + return JSON.toJSONString(o); + } + + /** + * 往字符串左侧添加字符 + * @param value 原字符 + * @param size 目标字符串长度 + * @param padStr 添加的字符 + * @return 结果 + */ + public static String padLeft(String value, int size, String padStr) { + return org.apache.commons.lang3.StringUtils.leftPad(value, size, padStr); + } + + /** + * 往字符串右侧添加字符 + * @param value 原字符 + * @param size 目标字符串长度 + * @param padStr 添加的字符 + * @return 结果 + */ + public static String padRight(String value, int size, String padStr) { + return org.apache.commons.lang3.StringUtils.rightPad(value, size, padStr); + } +} diff --git a/src/main/java/com/wms/utils/TokenUtils.java b/src/main/java/com/wms/utils/TokenUtils.java new file mode 100644 index 0000000..f824f25 --- /dev/null +++ b/src/main/java/com/wms/utils/TokenUtils.java @@ -0,0 +1,6 @@ +package com.wms.utils; + +public class TokenUtils { + private static final long EXPIRE_TIME= 10*60*60*1000; //十小时 + private static final String TOKEN_SECRET="123456"; //密钥盐 +} diff --git a/src/main/java/com/wms/utils/WmsUtils.java b/src/main/java/com/wms/utils/WmsUtils.java new file mode 100644 index 0000000..1cafcd1 --- /dev/null +++ b/src/main/java/com/wms/utils/WmsUtils.java @@ -0,0 +1,174 @@ +package com.wms.utils; + +import org.apache.commons.lang3.StringUtils; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.UUID; + +/** + * WMS工具类 + * @author 梁州 + * @date 2023/2/13 + */ +public class WmsUtils { + // 日期格式 + private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + // 时间格式 + private static final SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + // id用的时间格式 + private static final SimpleDateFormat idTimeFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + private static volatile Long lastTimestamp = -1L; + /** + * 生成唯一的编号 + * @param code 插入字符串 + * @return 唯一id + */ + public static String generateId(String code) { + return code + generateUUIDString(); + } + + /** + * 生成UUID + */ + public synchronized static String generateUUIDString() { + long timeStamp = System.currentTimeMillis(); + if (timeStamp == lastTimestamp) { + try { + Thread.sleep(1); + } catch (InterruptedException e){ + timeStamp = System.currentTimeMillis(); + lastTimestamp = timeStamp; + return idTimeFormat.format(new Date()).concat(String.valueOf(timeStamp)); + } + timeStamp = System.currentTimeMillis(); + lastTimestamp = timeStamp; + return idTimeFormat.format(new Date()).concat(String.valueOf(timeStamp)); + } else { + lastTimestamp = timeStamp; + return idTimeFormat.format(new Date()).concat(String.valueOf(timeStamp)); + } + } + + /** + * 时间字符串转时间格式 + * @param time 时间 + */ + public static Date timeStringToTime(String time) throws ParseException { + return timeFormat.parse(time); + } + + /** + * 日期字符串 + * @param date 日期 + */ + public static Date dateStringToDate(String date) throws ParseException { + return dateFormat.parse(date); + } + + /** + * 生成时间戳,格式yyyy-MM-dd HH:mm:ss + * @return 时间戳 + */ + public static String createCurrentTimeString() { + return timeFormat.format(new Date()); + } + + /** + * 生成日期字符串,格式yyyy-MM-dd + * @return 时间戳 + */ + public static String createCurrentDateString() { + return dateFormat.format(new Date()); + } + + /** + * 格式化日期,格式yyyy-MM-dd + * @param date 日期 + * @return 时间戳 + */ + public static String formatDateString(Date date) { + return dateFormat.format(date); + } + + /** + * 格式化时间,格式yyyy-MM-dd HH:mm:ss + * @param date 日期 + * @return 时间戳 + */ + public static String formatTimeString(Date date) { + return timeFormat.format(date); + } + + /** + * 获得指定日期之后指定天数的日期 + * @param beginDay 开始日期 + * @param days 天数 + * @return 日期 + */ + public static Date calculationDate(Date beginDay, int days){ + Calendar calendar = Calendar.getInstance(); + calendar.setTime(beginDay); + calendar.add(Calendar.DATE, days); + return calendar.getTime(); + } + + /** + * 获得指定日期之后指定月数的日期 + * @param beginDay 开始日期 + * @param months 月数 + * @return 日期 + */ + public static Date calculationMonth(Date beginDay, int months){ + Calendar calendar = Calendar.getInstance(); + calendar.setTime(beginDay); + calendar.add(Calendar.MONTH, months); + return calendar.getTime(); + } + + /** + * 获得指定日期之后指定年数的日期 + * @param beginDay 开始日期 + * @param years 年数 + * @return 日期 + */ + public static Date calculationYear(Date beginDay, int years){ + Calendar calendar = Calendar.getInstance(); + calendar.setTime(beginDay); + calendar.add(Calendar.YEAR, years); + return calendar.getTime(); + } + + /** + * 获取指定天数后的日期 + * @param day 天数 + * @return 日期 + */ + public static Date getDay(int day){ + return calculationDate(new Date(), day); + } + + /** + * 获取任意月后的时间 + * @Params: mon 1表示后一个月 -1表示前一个月 + * @Return + */ + public static Date getMon(int mon){ + return calculationMonth(new Date(), mon); + } + + /** + * 获取任意年之后的日期 + * @param year 年 + * @return 日期 + */ + public static Date getYear(int year){ + return calculationYear(new Date(), year); + } + + + + +} diff --git a/src/main/java/com/wms/utils/excel/ExcelClassField.java b/src/main/java/com/wms/utils/excel/ExcelClassField.java new file mode 100644 index 0000000..008be2b --- /dev/null +++ b/src/main/java/com/wms/utils/excel/ExcelClassField.java @@ -0,0 +1,71 @@ +package com.wms.utils.excel; + +import java.util.LinkedHashMap; + +public class ExcelClassField { + /** 字段名称 */ + private String fieldName; + + /** 表头名称 */ + private String name; + + /** 映射关系 */ + private LinkedHashMap kvMap; + + /** 示例值 */ + private Object example; + + /** 排序 */ + private int sort; + + /** 是否为注解字段:0-否,1-是 */ + private int hasAnnotation; + + public String getFieldName() { + return fieldName; + } + + public void setFieldName(String fieldName) { + this.fieldName = fieldName; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LinkedHashMap getKvMap() { + return kvMap; + } + + public void setKvMap(LinkedHashMap kvMap) { + this.kvMap = kvMap; + } + + public Object getExample() { + return example; + } + + public void setExample(Object example) { + this.example = example; + } + + public int getSort() { + return sort; + } + + public void setSort(int sort) { + this.sort = sort; + } + + public int getHasAnnotation() { + return hasAnnotation; + } + + public void setHasAnnotation(int hasAnnotation) { + this.hasAnnotation = hasAnnotation; + } +} diff --git a/src/main/java/com/wms/utils/excel/ExcelExport.java b/src/main/java/com/wms/utils/excel/ExcelExport.java new file mode 100644 index 0000000..431d99e --- /dev/null +++ b/src/main/java/com/wms/utils/excel/ExcelExport.java @@ -0,0 +1,22 @@ +package com.wms.utils.excel; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +public @interface ExcelExport { + /** 字段名称 */ + String value(); + + /** 导出排序先后: 数字越小越靠前(默认按Java类字段顺序导出) */ + int sort() default 0; + + /** 导出映射,格式如:0-未知;1-男;2-女 */ + String kv() default ""; + + /** 导出模板示例值(有值的话,直接取该值,不做映射) */ + String example() default ""; +} diff --git a/src/main/java/com/wms/utils/excel/ExcelImport.java b/src/main/java/com/wms/utils/excel/ExcelImport.java new file mode 100644 index 0000000..58c7b52 --- /dev/null +++ b/src/main/java/com/wms/utils/excel/ExcelImport.java @@ -0,0 +1,25 @@ +package com.wms.utils.excel; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +public @interface ExcelImport { + /** 字段名称 */ + String value(); + + /** 导出映射,格式如:0-未知;1-男;2-女 */ + String kv() default ""; + + /** 是否为必填字段(默认为非必填) */ + boolean required() default false; + + /** 最大长度(默认255) */ + int maxLength() default 255; + + /** 导入唯一性验证(多个字段则取联合验证) */ + boolean unique() default false; +} diff --git a/src/main/java/com/wms/utils/excel/ExcelUtils.java b/src/main/java/com/wms/utils/excel/ExcelUtils.java new file mode 100644 index 0000000..fa34c60 --- /dev/null +++ b/src/main/java/com/wms/utils/excel/ExcelUtils.java @@ -0,0 +1,1021 @@ +package com.wms.utils.excel; + + +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.HttpServletResponse; +import org.apache.poi.hssf.usermodel.HSSFDataFormatter; +import org.apache.poi.hssf.usermodel.HSSFDataValidation; +import org.apache.poi.hssf.usermodel.HSSFWorkbook; +import org.apache.poi.poifs.filesystem.POIFSFileSystem; +import org.apache.poi.ss.usermodel.*; +import org.apache.poi.ss.util.CellRangeAddress; +import org.apache.poi.ss.util.CellRangeAddressList; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; +import org.apache.poi.xssf.usermodel.*; +import org.springframework.web.multipart.MultipartFile; +import org.apache.poi.ss.usermodel.DateUtil; + +import java.io.*; +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.net.URL; +import java.text.DecimalFormat; +import java.text.NumberFormat; +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * Excel工具类 + */ +@SuppressWarnings("unused") +public class ExcelUtils { + private static final String XLSX = ".xlsx"; + private static final String XLS = ".xls"; + public static final String ROW_MERGE = "row_merge"; + public static final String COLUMN_MERGE = "column_merge"; + private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; + private static final String ROW_NUM = "rowNum"; + private static final String ROW_DATA = "rowData"; + private static final String ROW_TIPS = "rowTips"; + private static final int CELL_OTHER = 0; + private static final int CELL_ROW_MERGE = 1; + private static final int CELL_COLUMN_MERGE = 2; + private static final int IMG_HEIGHT = 30; + private static final int IMG_WIDTH = 30; + private static final char LEAN_LINE = '/'; + private static final int BYTES_DEFAULT_LENGTH = 10240; + private static final NumberFormat NUMBER_FORMAT = NumberFormat.getNumberInstance(); + + public static List readFile(File file, Class clazz) throws Exception { + JSONArray array = readFile(file); + return getBeanList(array, clazz); + } + + public static List readMultipartFile(MultipartFile mFile, Class clazz) throws Exception { + JSONArray array = readMultipartFile(mFile); + return getBeanList(array, clazz); + } + public static JSONArray readFile(File file) throws Exception { + return readExcel(null, file); + } + + public static JSONArray readMultipartFile(MultipartFile mFile) throws Exception { + return readExcel(mFile, null); + } + + public static Map readFileManySheet(File file) throws Exception { + return readExcelManySheet(null, file); + } + + public static Map readFileManySheet(MultipartFile file) throws Exception { + return readExcelManySheet(file, null); + } + + private static List getBeanList(JSONArray array, Class clazz) throws Exception { + List list = new ArrayList<>(); + Map uniqueMap = new HashMap<>(16); + for (int i = 0; i < array.size(); i++) { + list.add(getBean(clazz, array.getJSONObject(i), uniqueMap)); + } + return list; + } + + + /** + * 获取每个对象的数据 + */ + private static T getBean(Class c, JSONObject obj, Map uniqueMap) throws Exception { + T t = c.getDeclaredConstructor().newInstance(); + Field[] fields = c.getDeclaredFields(); + List errMsgList = new ArrayList<>(); + boolean hasRowTipsField = false; + StringBuilder uniqueBuilder = new StringBuilder(); + int rowNum = 0; + for (Field field : fields) { + // 行号 + if (field.getName().equals(ROW_NUM)) { + rowNum = obj.getInteger(ROW_NUM); + field.setAccessible(true); + field.set(t, rowNum); + continue; + } + // 是否需要设置异常信息 + if (field.getName().equals(ROW_TIPS)) { + hasRowTipsField = true; + continue; + } + // 原始数据 + if (field.getName().equals(ROW_DATA)) { + field.setAccessible(true); + field.set(t, obj.toString()); + continue; + } + // 设置对应属性值 + setFieldValue(t, field, obj, uniqueBuilder, errMsgList); + } + // 数据唯一性校验 + if (uniqueBuilder.length() > 0) { + if (uniqueMap.containsValue(uniqueBuilder.toString())) { + Set rowNumKeys = uniqueMap.keySet(); + for (Integer num : rowNumKeys) { + if (uniqueMap.get(num).equals(uniqueBuilder.toString())) { + errMsgList.add(String.format("数据唯一性校验失败,(%s)与第%s行重复)", uniqueBuilder, num)); + } + } + } else { + uniqueMap.put(rowNum, uniqueBuilder.toString()); + } + } + // 失败处理 + if (errMsgList.isEmpty() && !hasRowTipsField) { + return t; + } + StringBuilder sb = new StringBuilder(); + int size = errMsgList.size(); + for (int i = 0; i < size; i++) { + if (i == size - 1) { + sb.append(errMsgList.get(i)); + } else { + sb.append(errMsgList.get(i)).append(";"); + } + } + // 设置错误信息 + for (Field field : fields) { + if (field.getName().equals(ROW_TIPS)) { + field.setAccessible(true); + field.set(t, sb.toString()); + } + } + return t; + } + + private static void setFieldValue(T t, Field field, JSONObject obj, StringBuilder uniqueBuilder, List errMsgList) { + // 获取 ExcelImport 注解属性 + ExcelImport annotation = field.getAnnotation(ExcelImport.class); + if (annotation == null) { + return; + } + String cname = annotation.value(); + if (cname.trim().length() == 0) { + return; + } + // 获取具体值 + String val = null; + if (obj.containsKey(cname)) { + val = getString(obj.getString(cname)); + } + if (val == null) { + return; + } + field.setAccessible(true); + // 判断是否必填 + boolean require = annotation.required(); + if (require && val.isEmpty()) { + errMsgList.add(String.format("[%s]不能为空", cname)); + return; + } + // 数据唯一性获取 + boolean unique = annotation.unique(); + if (unique) { + if (uniqueBuilder.length() > 0) { + uniqueBuilder.append("--").append(val); + } else { + uniqueBuilder.append(val); + } + } + // 判断是否超过最大长度 + int maxLength = annotation.maxLength(); + if (maxLength > 0 && val.length() > maxLength) { + errMsgList.add(String.format("[%s]长度不能超过%s个字符(当前%s个字符)", cname, maxLength, val.length())); + } + // 判断当前属性是否有映射关系 + LinkedHashMap kvMap = getKvMap(annotation.kv()); + if (!kvMap.isEmpty()) { + boolean isMatch = false; + for (String key : kvMap.keySet()) { + if (kvMap.get(key).equals(val)) { + val = key; + isMatch = true; + break; + } + } + if (!isMatch) { + errMsgList.add(String.format("[%s]的值不正确(当前值为%s)", cname, val)); + return; + } + } + // 其余情况根据类型赋值 + String fieldClassName = field.getType().getSimpleName(); + try { + if ("String".equalsIgnoreCase(fieldClassName)) { + field.set(t, val); + } else if ("boolean".equalsIgnoreCase(fieldClassName)) { + field.set(t, Boolean.valueOf(val)); + } else if ("int".equalsIgnoreCase(fieldClassName) || "Integer".equals(fieldClassName)) { + try { + field.set(t, Integer.valueOf(val)); + } catch (NumberFormatException e) { + errMsgList.add(String.format("[%s]的值格式不正确(当前值为%s)", cname, val)); + } + } else if ("double".equalsIgnoreCase(fieldClassName)) { + field.set(t, Double.valueOf(val)); + } else if ("long".equalsIgnoreCase(fieldClassName)) { + field.set(t, Long.valueOf(val)); + } else if ("BigDecimal".equalsIgnoreCase(fieldClassName)) { + field.set(t, new BigDecimal(val)); + } else if ("Date".equalsIgnoreCase(fieldClassName)) { + try { + field.set(t, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(val)); + } catch (Exception e) { + field.set(t, new SimpleDateFormat("yyyy-MM-dd").parse(val)); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + private static Map readExcelManySheet(MultipartFile mFile, File file) throws IOException { + Workbook book = getWorkbook(mFile, file); + if (book == null) { + return Collections.emptyMap(); + } + Map map = new LinkedHashMap<>(); + for (int i = 0; i < book.getNumberOfSheets(); i++) { + Sheet sheet = book.getSheetAt(i); + JSONArray arr = readSheet(sheet); + map.put(sheet.getSheetName(), arr); + } + book.close(); + return map; + } + + private static JSONArray readExcel(MultipartFile mFile, File file) throws IOException { + Workbook book = getWorkbook(mFile, file); + if (book == null) { + return new JSONArray(); + } + JSONArray array = readSheet(book.getSheetAt(0)); + book.close(); + return array; + } + + private static Workbook getWorkbook(MultipartFile mFile, File file) throws IOException { + boolean fileNotExist = (file == null || !file.exists()); + if (mFile == null && fileNotExist) { + return null; + } + // 解析表格数据 + InputStream in; + String fileName; + if (mFile != null) { + // 上传文件解析 + in = mFile.getInputStream(); + fileName = getString(mFile.getOriginalFilename()).toLowerCase(); + } else { + // 本地文件解析 + in = new FileInputStream(file); + fileName = file.getName().toLowerCase(); + } + Workbook book; + if (fileName.endsWith(XLSX)) { + book = new XSSFWorkbook(in); + } else if (fileName.endsWith(XLS)) { + POIFSFileSystem poifsFileSystem = new POIFSFileSystem(in); + book = new HSSFWorkbook(poifsFileSystem); + } else { + return null; + } + in.close(); + return book; + } + + private static JSONArray readSheet(Sheet sheet) { + // 首行下标 + int rowStart = sheet.getFirstRowNum(); + // 尾行下标 + int rowEnd = sheet.getLastRowNum(); + // 获取表头行 + Row headRow = sheet.getRow(rowStart); + if (headRow == null) { + return new JSONArray(); + } + int cellStart = headRow.getFirstCellNum(); + int cellEnd = headRow.getLastCellNum(); + Map keyMap = new HashMap<>(); + for (int j = cellStart; j < cellEnd; j++) { + // 获取表头数据 + String val = getCellValue(headRow.getCell(j)); + if (val != null && val.trim().length() != 0) { + keyMap.put(j, val); + } + } + // 如果表头没有数据则不进行解析 + if (keyMap.isEmpty()) { + return (JSONArray) Collections.emptyList(); + } + // 获取每行JSON对象的值 + JSONArray array = new JSONArray(); + // 如果首行与尾行相同,表明只有一行,返回表头数据 + if (rowStart == rowEnd) { + JSONObject obj = new JSONObject(); + // 添加行号 + obj.put(ROW_NUM, 1); + for (int i : keyMap.keySet()) { + obj.put(keyMap.get(i), ""); + } + array.add(obj); + return array; + } + for (int i = rowStart + 1; i <= rowEnd; i++) { + Row eachRow = sheet.getRow(i); + JSONObject obj = new JSONObject(); + // 添加行号 + obj.put(ROW_NUM, i + 1); + StringBuilder sb = new StringBuilder(); + for (int k = cellStart; k < cellEnd; k++) { + if (eachRow != null) { + String val = getCellValue(eachRow.getCell(k)); + // 所有数据添加到里面,用于判断该行是否为空 + sb.append(val); + obj.put(keyMap.get(k), val); + } + } + if (sb.length() > 0) { + array.add(obj); + } + } + return array; + } + + private static String getCellValue(Cell cell) { + // 空白或空 + if (cell == null || cell.getCellType() == CellType.BLANK) { + return ""; + } + // String类型 + if (cell.getCellType() == CellType.STRING) { + String val = cell.getStringCellValue(); + if (val == null || val.trim().length() == 0) { + return ""; + } + return val.trim(); + } + // 数字类型 + if (cell.getCellType() == CellType.NUMERIC) { + if (DateUtil.isCellDateFormatted(cell)) {// 日期类型 + // 短日期转化为字符串 + Date date = cell.getDateCellValue(); + if (date != null) { + // 标准0点 1970/01/01 08:00:00 + if (date.getTime() % 86400000 == 16 * 3600 * 1000 && cell.getCellStyle().getDataFormat() == 14) { + return new SimpleDateFormat("yyyy-MM-dd").format(date); + } else { + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date); + } + } + } else {// 数值 + //System.out.println("Value:"+cell.getNumericCellValue()); + String numberStr = new HSSFDataFormatter().formatCellValue(cell); + // 货币格式,如:1,200.00 + if (numberStr.contains(",")) { + numberStr = numberStr.replace(",", ""); + } + if (numberStr.contains("E")) { // 科学计算法 + numberStr = new DecimalFormat("0").format(cell.getNumericCellValue()); //4.89481368464913E14还原为长整数 + return numberStr; + } else { + if (numberStr.contains(".")) { // 小数 + return numberStr; + } else { // 转换为整数 + return numberStr; + } + } + } +// String s = cell.getNumericCellValue() + ""; +// // 去掉尾巴上的小数点0 +// if (Pattern.matches(".*\\.0*", s)) { +// return s.split("\\.")[0]; +// } else { +// return s; +// } + } + // 布尔值类型 + if (cell.getCellType() == CellType.BOOLEAN) { + return String.valueOf(cell.getBooleanCellValue()); + } + // 错误类型 + return cell.getCellFormula(); + } + + public static void exportTemplate(HttpServletResponse response, String fileName, Class clazz) { + exportTemplate(response, fileName, fileName, clazz, false); + } + + public static void exportTemplate(HttpServletResponse response, String fileName, String sheetName, + Class clazz) { + exportTemplate(response, fileName, sheetName, clazz, false); + } + + public static void exportTemplate(HttpServletResponse response, String fileName, Class clazz, + boolean isContainExample) { + exportTemplate(response, fileName, fileName, clazz, isContainExample); + } + + public static void exportTemplate(HttpServletResponse response, String fileName, String sheetName, + Class clazz, boolean isContainExample) { + // 获取表头字段 + List headFieldList = getExcelClassFieldList(clazz); + // 获取表头数据和示例数据 + List> sheetDataList = new ArrayList<>(); + List headList = new ArrayList<>(); + List exampleList = new ArrayList<>(); + Map> selectMap = new LinkedHashMap<>(); + for (int i = 0; i < headFieldList.size(); i++) { + ExcelClassField each = headFieldList.get(i); + headList.add(each.getName()); + exampleList.add(each.getExample()); + LinkedHashMap kvMap = each.getKvMap(); + if (kvMap != null && kvMap.size() > 0) { + selectMap.put(i, new ArrayList<>(kvMap.values())); + } + } + sheetDataList.add(headList); + if (isContainExample) { + sheetDataList.add(exampleList); + } + // 导出数据 + export(response, fileName, sheetName, sheetDataList, selectMap); + } + + private static List getExcelClassFieldList(Class clazz) { + // 解析所有字段 + Field[] fields = clazz.getDeclaredFields(); + boolean hasExportAnnotation = false; + Map> map = new LinkedHashMap<>(); + List sortList = new ArrayList<>(); + for (Field field : fields) { + ExcelClassField cf = getExcelClassField(field); + if (cf.getHasAnnotation() == 1) { + hasExportAnnotation = true; + } + int sort = cf.getSort(); + if (map.containsKey(sort)) { + map.get(sort).add(cf); + } else { + List list = new ArrayList<>(); + list.add(cf); + sortList.add(sort); + map.put(sort, list); + } + } + Collections.sort(sortList); + // 获取表头 + List headFieldList = new ArrayList<>(); + if (hasExportAnnotation) { + for (Integer sort : sortList) { + for (ExcelClassField cf : map.get(sort)) { + if (cf.getHasAnnotation() == 1) { + headFieldList.add(cf); + } + } + } + } else { + headFieldList.addAll(map.get(0)); + } + return headFieldList; + } + + private static ExcelClassField getExcelClassField(Field field) { + ExcelClassField cf = new ExcelClassField(); + String fieldName = field.getName(); + cf.setFieldName(fieldName); + ExcelExport annotation = field.getAnnotation(ExcelExport.class); + // 无 ExcelExport 注解情况 + if (annotation == null) { + cf.setHasAnnotation(0); + cf.setName(fieldName); + cf.setSort(0); + return cf; + } + // 有 ExcelExport 注解情况 + cf.setHasAnnotation(1); + cf.setName(annotation.value()); + String example = getString(annotation.example()); + if (!example.isEmpty()) { + if (isNumeric(example) && example.length() < 8) { + cf.setExample(Double.valueOf(example)); + } else { + cf.setExample(example); + } + } else { + cf.setExample(""); + } + cf.setSort(annotation.sort()); + // 解析映射 + String kv = getString(annotation.kv()); + cf.setKvMap(getKvMap(kv)); + return cf; + } + + private static LinkedHashMap getKvMap(String kv) { + LinkedHashMap kvMap = new LinkedHashMap<>(); + if (kv.isEmpty()) { + return kvMap; + } + String[] kvs = kv.split(";"); + for (String each : kvs) { + String[] eachKv = getString(each).split("-"); + if (eachKv.length != 2) { + continue; + } + String k = eachKv[0]; + String v = eachKv[1]; + if (k.isEmpty() || v.isEmpty()) { + continue; + } + kvMap.put(k, v); + } + return kvMap; + } + + /** + * 导出表格到本地 + * + * @param file 本地文件对象 + * @param sheetData 导出数据 + */ + public static void exportFile(File file, List> sheetData) { + if (file == null) { + System.out.println("文件创建失败"); + return; + } + if (sheetData == null) { + sheetData = new ArrayList<>(); + } + Map>> map = new HashMap<>(); + map.put(file.getName(), sheetData); + export(null, file, file.getName(), map, null); + } + + /** + * 导出表格到本地 + * + * @param 导出数据类似,和K类型保持一致 + * @param filePath 文件父路径(如:D:/doc/excel/) + * @param fileName 文件名称(不带尾缀,如:学生表) + * @param list 导出数据 + * @throws IOException IO异常 + */ + public static File exportFile(String filePath, String fileName, List list) throws IOException { + File file = getFile(filePath, fileName); + List> sheetData = getSheetData(list); + exportFile(file, sheetData); + return file; + } + + /** + * 获取文件 + * + * @param filePath filePath 文件父路径(如:D:/doc/excel/) + * @param fileName 文件名称(不带尾缀,如:用户表) + * @return 本地File文件对象 + */ + private static File getFile(String filePath, String fileName) throws IOException { + String dirPath = getString(filePath); + String fileFullPath; + if (dirPath.isEmpty()) { + fileFullPath = fileName; + } else { + // 判定文件夹是否存在,如果不存在,则级联创建 + File dirFile = new File(dirPath); + if (!dirFile.exists()) { + boolean mkdirs = dirFile.mkdirs(); + if (!mkdirs) { + return null; + } + } + // 获取文件夹全名 + if (dirPath.endsWith(String.valueOf(LEAN_LINE))) { + fileFullPath = dirPath + fileName + XLSX; + } else { + fileFullPath = dirPath + LEAN_LINE + fileName + XLSX; + } + } + System.out.println(fileFullPath); + File file = new File(fileFullPath); + if (!file.exists()) { + boolean result = file.createNewFile(); + if (!result) { + return null; + } + } + return file; + } + + private static List> getSheetData(List list) { + // 获取表头字段 + List excelClassFieldList = getExcelClassFieldList(list.get(0).getClass()); + List headFieldList = new ArrayList<>(); + List headList = new ArrayList<>(); + Map headFieldMap = new HashMap<>(); + for (ExcelClassField each : excelClassFieldList) { + String fieldName = each.getFieldName(); + headFieldList.add(fieldName); + headFieldMap.put(fieldName, each); + headList.add(each.getName()); + } + // 添加表头名称 + List> sheetDataList = new ArrayList<>(); + sheetDataList.add(headList); + // 获取表数据 + for (T t : list) { + Map fieldDataMap = getFieldDataMap(t); + Set fieldDataKeys = fieldDataMap.keySet(); + List rowList = new ArrayList<>(); + for (String headField : headFieldList) { + if (!fieldDataKeys.contains(headField)) { + continue; + } + Object data = fieldDataMap.get(headField); + if (data == null) { + rowList.add(""); + continue; + } + ExcelClassField cf = headFieldMap.get(headField); + // 判断是否有映射关系 + LinkedHashMap kvMap = cf.getKvMap(); + if (kvMap == null || kvMap.isEmpty()) { + rowList.add(data); + continue; + } + String val = kvMap.get(data.toString()); + if (isNumeric(val)) { + rowList.add(Double.valueOf(val)); + } else { + rowList.add(val); + } + } + sheetDataList.add(rowList); + } + return sheetDataList; + } + + private static Map getFieldDataMap(T t) { + Map map = new HashMap<>(); + Field[] fields = t.getClass().getDeclaredFields(); + try { + for (Field field : fields) { + String fieldName = field.getName(); + field.setAccessible(true); + Object object = field.get(t); + map.put(fieldName, object); + } + } catch (IllegalArgumentException | IllegalAccessException e) { + e.printStackTrace(); + } + return map; + } + + public static void exportEmpty(HttpServletResponse response, String fileName) { + List> sheetDataList = new ArrayList<>(); + List headList = new ArrayList<>(); + headList.add("导出无数据"); + sheetDataList.add(headList); + export(response, fileName, sheetDataList); + } + + public static void export(HttpServletResponse response, String fileName, List> sheetDataList) { + export(response, fileName, fileName, sheetDataList, null); + } + + public static void exportManySheet(HttpServletResponse response, String fileName, Map>> sheetMap) { + export(response, null, fileName, sheetMap, null); + } + + + public static void export(HttpServletResponse response, String fileName, String sheetName, + List> sheetDataList) { + export(response, fileName, sheetName, sheetDataList, null); + } + + public static void export(HttpServletResponse response, String fileName, String sheetName, + List> sheetDataList, Map> selectMap) { + + Map>> map = new HashMap<>(); + map.put(sheetName, sheetDataList); + export(response, null, fileName, map, selectMap); + } + + public static void export(HttpServletResponse response, String fileName, List list, Class template) { + // list 是否为空 + boolean lisIsEmpty = list == null || list.isEmpty(); + // 如果模板数据为空,且导入的数据为空,则导出空文件 + if (template == null && lisIsEmpty) { + exportEmpty(response, fileName); + return; + } + // 如果 list 数据,则导出模板数据 + if (lisIsEmpty) { + exportTemplate(response, fileName, template); + return; + } + // 导出数据 + List> sheetDataList = getSheetData(list); + export(response, fileName, sheetDataList); + } + + public static void export(HttpServletResponse response, String fileName, List> sheetDataList, Map> selectMap) { + export(response, fileName, fileName, sheetDataList, selectMap); + } + + private static void export(HttpServletResponse response, File file, String fileName, + Map>> sheetMap, Map> selectMap) { + // 整个 Excel 表格 book 对象 + SXSSFWorkbook book = new SXSSFWorkbook(); + // 每个 Sheet 页 + Set>>> entries = sheetMap.entrySet(); + for (Map.Entry>> entry : entries) { + List> sheetDataList = entry.getValue(); + Sheet sheet = book.createSheet(entry.getKey()); + Drawing patriarch = sheet.createDrawingPatriarch(); + // 设置表头背景色(灰色) + CellStyle headStyle = book.createCellStyle(); + headStyle.setFillForegroundColor(IndexedColors.GREY_80_PERCENT.index); + headStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND); + headStyle.setAlignment(HorizontalAlignment.CENTER); + headStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.index); + headStyle.setWrapText(true); // 启用自动换行 + // 设置表身背景色(默认色) + CellStyle rowStyle = book.createCellStyle(); + rowStyle.setAlignment(HorizontalAlignment.CENTER); + rowStyle.setVerticalAlignment(VerticalAlignment.CENTER); + rowStyle.setWrapText(true); // 启用自动换行 + // 设置表格列宽度(默认为15个字节) + sheet.setDefaultColumnWidth(15); + // 创建合并算法数组 + int rowLength = sheetDataList.size(); + int columnLength = sheetDataList.get(0).size(); + int[][] mergeArray = new int[rowLength][columnLength]; + for (int i = 0; i < sheetDataList.size(); i++) { + // 每个 Sheet 页中的行数据 + Row row = sheet.createRow(i); + List rowList = sheetDataList.get(i); + for (int j = 0; j < rowList.size(); j++) { + // 每个行数据中的单元格数据 + Object o = rowList.get(j); + int v = 0; + if (o instanceof URL) { + // 如果要导出图片的话, 链接需要传递 URL 对象 + setCellPicture(book, row, patriarch, i, j, (URL) o); + } else { + Cell cell = row.createCell(j); + if (i == 0) { + // 第一行为表头行,采用灰色底背景 + v = setCellValue(cell, o, headStyle); + } else { + // 其他行为数据行,默认白底色 + v = setCellValue(cell, o, rowStyle); + } + } + mergeArray[i][j] = v; + } + // 自动调整行高 + row.setHeight((short) -1); + } + // 合并单元格 + mergeCells(sheet, mergeArray); + // 设置下拉列表 + setSelect(sheet, selectMap); + } + // 写数据 + if (response != null) { + // 前端导出 + try { + write(response, book, fileName); + } catch (IOException e) { + e.printStackTrace(); + } + } else { + // 本地导出 + FileOutputStream fos; + try { + fos = new FileOutputStream(file); + ByteArrayOutputStream ops = new ByteArrayOutputStream(); + book.write(ops); + fos.write(ops.toByteArray()); + fos.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + + /** + * 合并当前Sheet页的单元格 + * + * @param sheet 当前 sheet 页 + * @param mergeArray 合并单元格算法 + */ + private static void mergeCells(Sheet sheet, int[][] mergeArray) { + // 横向合并 + for (int x = 0; x < mergeArray.length; x++) { + int[] arr = mergeArray[x]; + boolean merge = false; + int y1 = 0; + int y2 = 0; + for (int y = 0; y < arr.length; y++) { + int value = arr[y]; + if (value == CELL_COLUMN_MERGE) { + if (!merge) { + y1 = y; + } + y2 = y; + merge = true; + } else { + merge = false; + if (y1 > 0) { + sheet.addMergedRegion(new CellRangeAddress(x, x, (y1 - 1), y2)); + } + y1 = 0; + y2 = 0; + } + } + if (y1 > 0) { + sheet.addMergedRegion(new CellRangeAddress(x, x, (y1 - 1), y2)); + } + } + // 纵向合并 + int xLen = mergeArray.length; + int yLen = mergeArray[0].length; + for (int y = 0; y < yLen; y++) { + boolean merge = false; + int x1 = 0; + int x2 = 0; + for (int x = 0; x < xLen; x++) { + int value = mergeArray[x][y]; + if (value == CELL_ROW_MERGE) { + if (!merge) { + x1 = x; + } + x2 = x; + merge = true; + } else { + merge = false; + if (x1 > 0) { + sheet.addMergedRegion(new CellRangeAddress((x1 - 1), x2, y, y)); + } + x1 = 0; + x2 = 0; + } + } + if (x1 > 0) { + sheet.addMergedRegion(new CellRangeAddress((x1 - 1), x2, y, y)); + } + } + } + + private static void write(HttpServletResponse response, SXSSFWorkbook book, String fileName) throws IOException { + response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + response.setCharacterEncoding("utf-8"); + String name = new String(fileName.getBytes("GBK"), "ISO8859_1") + XLSX; + response.addHeader("Content-Disposition", "attachment;filename=" + name); + ServletOutputStream out = response.getOutputStream(); + book.write(out); + out.flush(); + out.close(); + } + + private static int setCellValue(Cell cell, Object o, CellStyle style) { + // 设置样式 + cell.setCellStyle(style); + // 数据为空时 + if (o == null) { + cell.setCellValue(""); + return CELL_OTHER; + } + // 是否为字符串 + if (o instanceof String) { + String s = o.toString(); + cell.setCellValue(s); + if (s.contains("\n")) { + style.setWrapText(true); + cell.setCellStyle(style); + } + if (s.equals(ROW_MERGE)) { + return CELL_ROW_MERGE; + } else if (s.equals(COLUMN_MERGE)) { + return CELL_COLUMN_MERGE; + } else { + return CELL_OTHER; + } + } + // 是否为数字 + if (o instanceof Integer || o instanceof Long || o instanceof Double || o instanceof Float) { + cell.setCellValue(Double.parseDouble(o.toString())); + return CELL_OTHER; + } + // 是否为Boolean + if (o instanceof Boolean) { + cell.setCellValue((Boolean) o); + return CELL_OTHER; + } + // 如果是BigDecimal,则默认3位小数 + if (o instanceof BigDecimal) { + cell.setCellValue(((BigDecimal) o).setScale(3, RoundingMode.HALF_UP).doubleValue()); + return CELL_OTHER; + } + // 如果是Date数据,则显示格式化数据 + if (o instanceof Date) { + cell.setCellValue(formatDate((Date) o)); + return CELL_OTHER; + } + // 如果是其他,则默认字符串类型 + cell.setCellValue(o.toString()); + return CELL_OTHER; + } + + + private static void setCellPicture(SXSSFWorkbook wb, Row sr, Drawing patriarch, int x, int y, URL url) { + // 设置图片宽高 + sr.setHeight((short) (IMG_WIDTH * IMG_HEIGHT)); + // (jdk1.7版本try中定义流可自动关闭) + try (InputStream is = url.openStream(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { + byte[] buff = new byte[BYTES_DEFAULT_LENGTH]; + int rc; + while ((rc = is.read(buff, 0, BYTES_DEFAULT_LENGTH)) > 0) { + outputStream.write(buff, 0, rc); + } + // 设置图片位置 + XSSFClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, y, x, y + 1, x + 1); + // 设置这个,图片会自动填满单元格的长宽 + anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_AND_RESIZE); + patriarch.createPicture(anchor, wb.addPicture(outputStream.toByteArray(), HSSFWorkbook.PICTURE_TYPE_JPEG)); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private static String formatDate(Date date) { + if (date == null) { + return ""; + } + SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT); + return format.format(date); + } + + private static void setSelect(Sheet sheet, Map> selectMap) { + if (selectMap == null || selectMap.isEmpty()) { + return; + } + Set>> entrySet = selectMap.entrySet(); + for (Map.Entry> entry : entrySet) { + int y = entry.getKey(); + List list = entry.getValue(); + if (list == null || list.isEmpty()) { + continue; + } + String[] arr = new String[list.size()]; + for (int i = 0; i < list.size(); i++) { + arr[i] = list.get(i); + } + DataValidationHelper helper = sheet.getDataValidationHelper(); + CellRangeAddressList addressList = new CellRangeAddressList(1, 65000, y, y); + DataValidationConstraint dvc = helper.createExplicitListConstraint(arr); + DataValidation dv = helper.createValidation(dvc, addressList); + if (dv instanceof HSSFDataValidation) { + dv.setSuppressDropDownArrow(false); + } else { + dv.setSuppressDropDownArrow(true); + dv.setShowErrorBox(true); + } + sheet.addValidationData(dv); + } + } + + private static boolean isNumeric(String str) { + if (Objects.nonNull(str) && "0.0".equals(str)) { + return true; + } + for (int i = str.length(); --i >= 0; ) { + if (!Character.isDigit(str.charAt(i))) { + return false; + } + } + return true; + } + + private static String getString(String s) { + if (s == null) { + return ""; + } + if (s.isEmpty()) { + return s; + } + return s.trim(); + } +} diff --git a/src/main/java/com/wms/utils/excel/listener/UploadKateOrdersListener.java b/src/main/java/com/wms/utils/excel/listener/UploadKateOrdersListener.java new file mode 100644 index 0000000..51bc60f --- /dev/null +++ b/src/main/java/com/wms/utils/excel/listener/UploadKateOrdersListener.java @@ -0,0 +1,139 @@ +package com.wms.utils.excel.listener; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.read.listener.ReadListener; +import com.alibaba.excel.util.ListUtils; +import com.wms.constants.enums.ConfigMapKeyEnum; +import com.wms.entity.table.*; +import com.wms.service.*; +import com.wms.utils.StringUtils; +import com.wms.utils.excel.vo.KateOrdersExcelVo; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.math.BigDecimal; +import java.util.*; + +import static com.wms.config.InitLocalConfig.configMap; +import static com.wms.utils.WmsUtils.generateId; + +/** + * 上传库存监听 + */ +public class UploadKateOrdersListener implements ReadListener { + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + /** + * 每隔5条存储数据库,实际使用中可以1000条,然后清理list ,方便内存回收 + */ + private static final int BATCH_COUNT = 1000; + private List cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT); + /** + * 筛选工单字符串 + */ + private final String slocFilterString = configMap.get(ConfigMapKeyEnum.SLOC_FILTER_STRING.getConfigKey()); + private final IOrderOutService orderOutService;// Dbs服务 + private final String uploadUser;// 用户 + private final Map oldKateOrdersMap;// 旧的工单数据 + private final Map newKateOrdersMap = new HashMap<>();// 新的工单数据 + public UploadKateOrdersListener(IOrderOutService orderOutService, Map oldKateOrdersMap, String uploadUser) { + this.orderOutService = orderOutService; + this.oldKateOrdersMap = oldKateOrdersMap; + this.uploadUser = uploadUser; + } + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + int rowCount = context.readRowHolder().getRowIndex() + 1; + logger.error("处理工单数据发生异常,第{}行发生异常。", rowCount); + throw new Exception("第" + rowCount + "行数据异常。"); + } + + /** + * 这个每一条数据解析都会来调用 + * + * @param kateOrdersExcelVo one row value. It is same as {@link AnalysisContext#readRowHolder()} + * @param analysisContext context + */ + @Override + public void invoke(KateOrdersExcelVo kateOrdersExcelVo, AnalysisContext analysisContext) { + if (StringUtils.isNotEmpty(slocFilterString) && Objects.equals(kateOrdersExcelVo.getSortString(), slocFilterString)) { + // 符合筛选字符串 + if (StringUtils.isNotEmpty(kateOrdersExcelVo.getWorkOrder()) + && StringUtils.isNotEmpty(kateOrdersExcelVo.getGoodsId()) + && StringUtils.isNotEmpty(kateOrdersExcelVo.getSortString()) + && StringUtils.isNotEmpty(kateOrdersExcelVo.getSupplyArea()) + && kateOrdersExcelVo.getRequirementQuantity() != null) { + // 符合条件 + cachedDataList.add(kateOrdersExcelVo); + } + } + // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM + if (cachedDataList.size() >= BATCH_COUNT) { + //saveData(); + // 存储完成清理 list + cachedDataList = ListUtils.newArrayListWithExpectedSize(BATCH_COUNT); + } + } + + /** + * 所有数据解析完成了 都会来调用 + * + * @param analysisContext context + */ + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + // 再做一次数据处理 + //saveData(); + // 在这里统一保存数据 + insertIntoDb(); + } + + /** + * 存储数据 + */ +// private void saveData() { +// for (KateOrdersExcelVo kateOrdersExcelVo : cachedDataList) { +// String key = kateOrdersExcelVo.getWorkOrder() + kateOrdersExcelVo.getGoodsId() + kateOrdersExcelVo.getSupplyArea(); +// if (newKateOrdersMap.containsKey(key)) { +// KateOrders currentOrder = newKateOrdersMap.get(key); +// // 设定数量 +// currentOrder.setRequirementQuantity(currentOrder.getRequirementQuantity().add(kateOrdersExcelVo.getRequirementQuantity())); +// currentOrder.setLackQuantity(currentOrder.getLackQuantity().add(kateOrdersExcelVo.getRequirementQuantity())); +// newKateOrdersMap.replace(key, currentOrder); +// continue; +// } +// // 查询数据库是否存在重复数据 +// if (!oldKateOrdersMap.containsKey(key)) { +// // 之前没存在过 +// KateOrders newKateOrders = new KateOrders(); +// newKateOrders.setOrderId(generateId("ORDER_")); +// newKateOrders.setWorkOrder(kateOrdersExcelVo.getWorkOrder()); +// newKateOrders.setGoodsId(kateOrdersExcelVo.getGoodsId()); +// newKateOrders.setItem(kateOrdersExcelVo.getItem()); +// newKateOrders.setDescription(kateOrdersExcelVo.getDescription()); +// newKateOrders.setSLoc(kateOrdersExcelVo.getSLoc()); +// newKateOrders.setType(kateOrdersExcelVo.getType()); +// newKateOrders.setOriginStatus(kateOrdersExcelVo.getOriginStatus()); +// newKateOrders.setSupplyArea(kateOrdersExcelVo.getSupplyArea()); +// newKateOrders.setSortString(kateOrdersExcelVo.getSortString()); +// newKateOrders.setRequirementQuantity(kateOrdersExcelVo.getRequirementQuantity()); +// newKateOrders.setGoodsUnit(kateOrdersExcelVo.getGoodsUnit()); +// newKateOrders.setOrderStatus(0); +// newKateOrders.setLackQuantity(kateOrdersExcelVo.getRequirementQuantity()); +// newKateOrders.setPickedQuantity(BigDecimal.ZERO); +// newKateOrders.setUserName(uploadUser); +// newKateOrdersMap.put(key, newKateOrders); +// } +// } +// } + + /** + * 保存数据库 + */ + private void insertIntoDb() { + logger.info("此次共导入{}条数据。", newKateOrdersMap.size()); + // 保存数据 + //kateOrdersService.saveOrUpdateBatch(newKateOrdersMap.values(), BATCH_COUNT); + logger.info("保存成功{}条数据。", newKateOrdersMap.size()); + } +} diff --git a/src/main/java/com/wms/utils/excel/listener/UploadTestListener.java b/src/main/java/com/wms/utils/excel/listener/UploadTestListener.java new file mode 100644 index 0000000..957c88b --- /dev/null +++ b/src/main/java/com/wms/utils/excel/listener/UploadTestListener.java @@ -0,0 +1,59 @@ +package com.wms.utils.excel.listener; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.read.listener.ReadListener; +import com.alibaba.fastjson2.JSON; +import com.wms.constants.enums.OrderOutStatusEnum; +import com.wms.entity.table.OrderOut; +import com.wms.service.IOrderOutService; +import com.wms.utils.excel.vo.ExcelTemplateVo; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; + +import java.sql.Timestamp; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +@Slf4j +@RequiredArgsConstructor +public class UploadTestListener implements ReadListener { + private final List datas = new ArrayList<>(); + private final List orderOuts = new ArrayList<>(); + private final IOrderOutService orderOutService; + + + + @Override + public void onException(Exception exception, AnalysisContext context) throws Exception { + int rowCount = context.readRowHolder().getRowIndex() + 1; + log.error("处理数据发生异常,第{}行发生异常。", rowCount); + throw new Exception("第" + rowCount + "行数据异常。"); + } + + @Override + public void invoke(ExcelTemplateVo excelVo, AnalysisContext analysisContext) { + OrderOut orderOut = new OrderOut(); + orderOut.setGoodsName(excelVo.getModel()); + orderOut.setGoodsId(excelVo.getCodeMessage()); + orderOuts.add(orderOut); + log.info("获取到数据:{}", JSON.toJSONString(excelVo)); + datas.add(excelVo); + } + + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + saveData(); + log.info("数据读取完成。{}", JSON.toJSONString(datas)); + } + + /** + * 存储数据 + */ + private void saveData() { + for ( OrderOut orderOut :orderOuts){ + orderOutService.writeOrderOutList(orderOut); + } + } +} diff --git a/src/main/java/com/wms/utils/excel/vo/ExcelTemplateVo.java b/src/main/java/com/wms/utils/excel/vo/ExcelTemplateVo.java new file mode 100644 index 0000000..888e2b0 --- /dev/null +++ b/src/main/java/com/wms/utils/excel/vo/ExcelTemplateVo.java @@ -0,0 +1,45 @@ +package com.wms.utils.excel.vo; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.wms.utils.excel.ExcelExport; +import lombok.Data; + +@Data +public class ExcelTemplateVo { + + @ExcelProperty("No.\n序号") + @ExcelExport("No.\n序号") + private String no; + + @ExcelProperty("Perkins DN Number\n发运订单号") + @ExcelExport("Perkins DN Number\n发运订单号") + private String number; + + @ExcelProperty("Customer Purchase Order Number\n客户采购订单号") + @ExcelExport("Customer Purchase Order Number\n客户采购订单号") + private String custNumber; + + @ExcelProperty("Build List\n产品号") + @ExcelExport("Build List\n产品号") + private String model; + + @ExcelProperty("Serial Number\n序列号") + @ExcelExport("Serial Number\n序列号") + private String codeMessage; + + @ExcelProperty("Bin \n库位号") + @ExcelExport("Bin \n库位号") + private String bin; + + @ExcelProperty("Checking\n装车前检查") + @ExcelExport("Checking\n装车前检查") + private String checking; + + @ExcelProperty("Truck \n车辆信息 \nABCD") + @ExcelExport("Truck \n车辆信息 \nABCD") + private String truck; + + @ExcelProperty("Remark \n备注") + @ExcelExport("Remark \n备注") + private String remark; +} diff --git a/src/main/java/com/wms/utils/excel/vo/KateOrdersExcelVo.java b/src/main/java/com/wms/utils/excel/vo/KateOrdersExcelVo.java new file mode 100644 index 0000000..2305eab --- /dev/null +++ b/src/main/java/com/wms/utils/excel/vo/KateOrdersExcelVo.java @@ -0,0 +1,116 @@ +package com.wms.utils.excel.vo; + +import cn.hutool.core.bean.BeanUtil; +import com.alibaba.excel.annotation.ExcelProperty; +//import com.baomidou.mybatisplus.annotation.TableField; +//import com.baomidou.mybatisplus.annotation.TableId; +//import com.wms.entity.table.KateOrders; +import com.wms.entity.table.Location; +import com.wms.entity.table.OrderOut; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Data +public class KateOrdersExcelVo { + /** + * id + */ + @ExcelProperty("order_id") + private String orderId; + /** + * Order + */ + @ExcelProperty("Order") + private String workOrder; + /** + * Material + */ + @ExcelProperty("Material") + private String goodsId; + /** + * Item + */ + @ExcelProperty("Item") + private String item; + /** + * Description + */ + @ExcelProperty("Description") + private String description; + /** + * SLoc + */ + @ExcelProperty("SLoc") + private String sLoc; + /** + * Type + */ + @ExcelProperty("Type") + private String type; + /** + * Status + */ + @ExcelProperty("Status") + private String originStatus; + /** + * SupplyArea + */ + @ExcelProperty("SupplyArea") + private String supplyArea; + /** + * SortStrng + */ + @ExcelProperty("SortStrng") + private String sortString; + /** + * Requirement Qty + */ + @ExcelProperty("Requirement Qty") + private BigDecimal requirementQuantity; + /** + * BUn + */ + @ExcelProperty("BUn") + private String goodsUnit; + /** + * 工单状态 + * 0:未开始 + * 1:已生成任务 + * 2:已呼叫料箱 + * 3:正在拣选 + * 4:拣选完成 + */ + @ExcelProperty("工单状态") + private Integer orderStatus; + /** + * 缺少数量 + */ + @ExcelProperty("缺少数量") + private BigDecimal lackQuantity; + /** + * 实际拣选数量 + */ + @ExcelProperty("实际拣选数量") + private BigDecimal pickedQuantity; + /** + * 操作人员 + */ + @ExcelProperty("操作人员") + private String userName; + /** + * 完成时间 + */ + @ExcelProperty("完成时间") + private LocalDateTime finishTime; + + /** + * 从数据库实体转换为excel对象 + * @param ordersPo 数据库实体 + * @return excel对象 + */ + public static KateOrdersExcelVo of(OrderOut ordersPo) { + return BeanUtil.copyProperties(ordersPo, KateOrdersExcelVo.class); + } +} diff --git a/src/main/java/com/wms/utils/storage/LocationUtils.java b/src/main/java/com/wms/utils/storage/LocationUtils.java new file mode 100644 index 0000000..1f02a9b --- /dev/null +++ b/src/main/java/com/wms/utils/storage/LocationUtils.java @@ -0,0 +1,109 @@ +package com.wms.utils.storage; + +import com.wms.constants.enums.LocationStatus; +import com.wms.entity.table.Location; +import com.wms.entity.table.Stock; +import com.wms.entity.table.Task; +import com.wms.mapper.LocationMapper; +import com.wms.mapper.StockMapper; +import com.wms.mapper.TaskMapper; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * 库位工具类 + */ +@Component +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class LocationUtils { + + /** + * 库存 Mapper + */ + private final StockMapper stockMapper; + + /** + * 库位 Mapper + */ + private final LocationMapper locationMapper; + + /** + * 任务mapper + */ + private final TaskMapper taskMapper; + + /** + * 获取一个区域的可用的库位 + * @param areaId 区域ID + * @return 可用的库位排序 + */ + public List getNewLocation(Integer areaId) { + Location query = new Location(); + query.setAreaId(areaId); + query.setLocationStatus(LocationStatus.EMPTY.getCode()); + return locationMapper.selNextLocation(query); + } + + /** + * 在一堆空闲的库位中寻找一个可用的入库库位 + * @param canUseLocations 可用的库位 + * @return 可用的库位,若没有可用的库位则返回 null + */ + public Location checkCanUse(List canUseLocations) { + if(canUseLocations == null || canUseLocations.isEmpty()) { + return null; + } + for (Location location : canUseLocations) { + if(location.getDepth() == 1) { + return location; // 1 深度的不需要检验 + } + /* 校验此位置是否有遮挡 */ /* 如果这位置有库存(可能出现记错导致有库存),或者这位置其他深度(不论深度大小)有任务则不采用此位置 */ + /* 1 判断库存 */ + Stock checkStock = new Stock(); + checkStock.setLocationId(location.getLocationId()); + List checkResult = stockMapper.selStocks(checkStock); + if(!checkResult.isEmpty()) { + continue; // 库存不为空,跳过 + } + /* 2 判断同位置不同深度是否有任务 */ + // 找出此位置不同深度的库位 + Location queryDifferentDepthLocation = new Location(); + queryDifferentDepthLocation.setAreaId(location.getAreaId()); + queryDifferentDepthLocation.setEquipmentId(location.getEquipmentId()); + queryDifferentDepthLocation.setQueue(location.getQueue()); + queryDifferentDepthLocation.setLine(location.getLine()); + queryDifferentDepthLocation.setLayer(location.getLayer()); + List differentDepthLocations = locationMapper.selLocations(queryDifferentDepthLocation); + if(differentDepthLocations == null) { + continue; // 数据库查询失败 + } + boolean canUse = false; // 指示当前库位是否可用,若可用会置成 true + if(!differentDepthLocations.isEmpty()) { + // 存在干涉库位,检验其是否有未完成的任务 + for (Location differentDepthLocation : differentDepthLocations) { + // 找出此位置不同深度的库位 + Location queryLocationTask = new Location(); + queryLocationTask.setLocationId(differentDepthLocation.getLocationId()); + List locationTasks = taskMapper.haveNotCompleteTask(differentDepthLocation.getLocationId()); + if(locationTasks == null) { + continue; // 数据库查询失败 + } + if(!locationTasks.isEmpty()) { + break; // 有任务这个库位不行 + } + } + canUse = true; + } + if(canUse) { + return location; + } + } + return null; + } + + + +} diff --git a/src/main/java/com/wms/utils/storage/StockUtils.java b/src/main/java/com/wms/utils/storage/StockUtils.java new file mode 100644 index 0000000..091a15c --- /dev/null +++ b/src/main/java/com/wms/utils/storage/StockUtils.java @@ -0,0 +1,29 @@ +package com.wms.utils.storage; + +import com.wms.entity.table.Stock; + +import java.util.List; + +/** + * 库存工具类 + */ +public class StockUtils { + + /** + * 获取库存列表的总可用库存 + * @param stocks 库存列表 + * @return 可用库存总数 + */ + public static Integer sumStcokAvailableNum(List stocks) { + if(stocks == null) { + return null; + } + Integer sum = 0; + for(Stock stock : stocks) { + sum += stock.getAvailableNum(); + } + return sum; + } + + +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..b260299 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,71 @@ +spring: + + # 本地测试环境 + # datasource: + # url: jdbc:mysql://localhost:3306/wms_yaxinke_yangzhou?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true + # username: root + # password: 123456 + +# SQL SERVER测试环境 + datasource: + url: jdbc:sqlserver://localhost:1433;databaseName=wms_bojinsi_wuxi;user=sa;password=Sa123;encrypt=true;trustServerCertificate=true; + username: sa + password: Sa123 + # driver-class-name: net.sourceforge.jtds.jdbc.Driver + driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver + + +# #SQL SERVER在线环境 +# datasource: +# url: jdbc:sqlserver://10.90.85.69:1433;databaseName=wms_bojinsi_wuxi;user=s2_asrs;password=FcveGk`bA*[N%.CX5zTfRE;encrypt=true;trustServerCertificate=true; +# username: s2_asrs +# password: FcveGk`bA*[N%.CX5zTfRE +# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver + + + # 在线环境 + + # datasource: + # url: jdbc:mysql://172.21.80.150:3306/wms_yaxinke_yangzhou?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true + # username: developer + # password: developer 19990 + + profiles: + active: online +server: + # 服务端配置 + port: 19990 + servlet: + # 接口地址 + context-path: / + encoding: + charset: utf-8 + enabled: true + force: true + +mybatis: + config-location: classpath:mybatis-config.xml + mapper-locations: classpath:mapper/*.xml + type-aliases-package: com.wms.entity.table + +logging: + config: classpath:logback-spring.xml + +#mybatis-plus: +# mapper-locations: classpath*:mapper/*.xml # mapper.xml扫描包 +# type-aliases-package: com.wms.entity.table # 实体类扫描包 +# configuration: +# map-underscore-to-camel-case: true # 开启驼峰映射 +# cache-enabled: false # 是否开启二级缓存 +# global-config: +# db-config: +# id-type: assign_id +# update-strategy: not_null + +#mybatis 分页插件 +#pagehelper: +# helperDialect: mysql +# reasonable: true +# supportMethodsArguments: true +# params: count=countSql + diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..005203d --- /dev/null +++ b/src/main/resources/logback-spring.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + ${LOG_HOME}/info/%d{yyyy-MM-dd}/%d{yyyy-MM-dd}.%i.log + + 10MB + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + INFO + ACCEPT + DENY + + + + + + ${LOG_HOME}/warning/%d{yyyy-MM-dd}/%d{yyyy-MM-dd}.%i.log + + 10MB + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + WARNING + ACCEPT + DENY + + + + + + ${LOG_HOME}/error/%d{yyyy-MM-dd}/%d{yyyy-MM-dd}.%i.log + + 10MB + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + ERROR + ACCEPT + DENY + + + + + + ${LOG_HOME}/debug/%d{yyyy-MM-dd}/%d{yyyy-MM-dd}.%i.log + + 10MB + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + DEBUG + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/mapper/AppOrderInMapper.xml b/src/main/resources/mapper/AppOrderInMapper.xml new file mode 100644 index 0000000..34f7788 --- /dev/null +++ b/src/main/resources/mapper/AppOrderInMapper.xml @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into tbl_app_order_in + (row_id, guid, in_type, batch_no, vehicle_no, goods_id, goods_num, + ware_house, order_status, create_time, create_person, update_time, remark, model, enginen,productionDate) + values (#{rowId}, #{guid}, #{inType}, #{batchNo}, #{vehicleNo}, #{goodsId}, #{goodsNum}, + #{wareHouse}, #{orderStatus}, #{createTime}, #{createPerson}, #{updateTime}, #{remark}, #{model}, #{enginen}, #{productionDate}) + + + + + insert into tbl_app_order_in(row_id, guid, in_type, batch_no, vehicle_no, goods_id, goods_num, + ware_house, order_status, create_time, create_person, update_time, remark, model, enginen) + values + + (#{item.rowId}, #{item.guid}, #{item.inType}, #{item.batchNo}, #{item.vehicleNo}, #{item.goodsId}, #{item.goodsNum}, + #{item.wareHouse}, #{item.orderStatus}, #{item.createTime}, #{item.createPerson}, #{item.updateTime}, #{item.remark}, #{item.model}, #{item.enginen}) + + + + + + update tbl_app_order_in + + guid = #{guid}, + in_type = #{inType}, + batch_no = #{batchNo}, + vehicle_no = #{vehicleNo}, + goods_id = #{goodsId}, + goods_num = #{goodsNum}, + ware_house = #{wareHouse}, + order_status = #{orderStatus}, + create_person = #{createPerson}, + update_time = #{updateTime}, + remark = #{remark}, + create_time = #{createTime}, + production_date = #{productionDate}, + + where row_id = #{rowId} + + + + + delete from tbl_app_order_in where row_id = #{rowId} + + + + + + + + + + + + + + + + + + + update tbl_app_order_in + set order_status = #{orderStatus} + where vehicle_no = #{vehicleNo} + + + + + + delete from tbl_app_order_in where remark = #{remark} + + + + delete from tbl_app_order_in where vehicle_no = #{vehicleNo} + + + \ No newline at end of file diff --git a/src/main/resources/mapper/ConfigMapper.xml b/src/main/resources/mapper/ConfigMapper.xml new file mode 100644 index 0000000..1aad51f --- /dev/null +++ b/src/main/resources/mapper/ConfigMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + update tbl_sys_config + set config_value = #{configValue} + where config_id = #{configId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/GoodsMapper.xml b/src/main/resources/mapper/GoodsMapper.xml new file mode 100644 index 0000000..550f8cd --- /dev/null +++ b/src/main/resources/mapper/GoodsMapper.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + select goods_id, goods_name, goods_unit, item_id, item_type, inv_category, life_days, organization_id, + organization_code, last_update_time, last_update_user + from tbl_app_goods + + + + + + + + insert into tbl_app_goods + + goods_id, + goods_name, + goods_unit, + item_id, + item_type, + inv_category, + life_days, + organization_id, + organization_code, + last_update_time, + last_update_user, + + + #{goodsId}, + #{goodsName}, + #{goodsUnit}, + #{itemId}, + #{itemType}, + #{invCategory}, + #{lifeDays}, + #{organizationId}, + #{organizationCode}, + #{lastUpdateTime}, + #{lastUpdateUser}, + + + + + update tbl_app_goods + + goods_name = #{goodsName}, + goods_unit = #{goodsUnit}, + item_id = #{itemId}, + item_type = #{itemType}, + inv_category = #{invCategory}, + life_days = #{lifeDays}, + organization_id = #{organizationId}, + organization_code = #{organizationCode}, + last_update_time = #{lastUpdateTime}, + last_update_user = #{lastUpdateUser}, + + where goods_id = #{goodsId} + + + + delete from tbl_app_goods where goods_id = #{goodsId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/LocationMapper.xml b/src/main/resources/mapper/LocationMapper.xml new file mode 100644 index 0000000..e67ab53 --- /dev/null +++ b/src/main/resources/mapper/LocationMapper.xml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + select location_id, area_id, tunnel_id, equipment_id, location_type, queue, line, layer, depth, is_lock, location_status, vehicle_id, ware_area + from tbl_app_location + + + + + + + + + + + + + + insert into tbl_app_location + + location_id, + area_id, + tunnel_id, + equipment_id, + location_type, + queue, + line, + layer, + depth, + is_lock, + location_status, + vehicle_id, + ware_area, + + + #{locationId}, + #{areaId}, + #{tunnelId}, + #{equipmentId}, + #{locationType}, + #{queue}, + #{line}, + #{layer}, + #{depth}, + #{isLock}, + #{locationStatus}, + #{vehicleId}, + #{wareArea}, + + + + + update tbl_app_location + + is_lock = #{isLock}, + location_status = #{locationStatus}, + vehicle_id = #{vehicleId}, + + where location_id = #{locationId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/MenuMapper.xml b/src/main/resources/mapper/MenuMapper.xml new file mode 100644 index 0000000..5be8865 --- /dev/null +++ b/src/main/resources/mapper/MenuMapper.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/OledInMapper.xml b/src/main/resources/mapper/OledInMapper.xml new file mode 100644 index 0000000..22a8574 --- /dev/null +++ b/src/main/resources/mapper/OledInMapper.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + insert into tbl_app_oled_in(vehicleNo, point, goodsId, model, goodsNum, remark, status) + values(#{vehicleNo}, #{point}, #{goodsId}, #{model}, #{goodsNum}, #{remark}, #{status}) + + + + + + delete from tbl_app_oled_in + where point = #{point} and status != 0 + + + + delete from tbl_app_oled_in + where vehicleNo = #{vehicleNo} + + + \ No newline at end of file diff --git a/src/main/resources/mapper/OrderCheckMapper.xml b/src/main/resources/mapper/OrderCheckMapper.xml new file mode 100644 index 0000000..db31f9d --- /dev/null +++ b/src/main/resources/mapper/OrderCheckMapper.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + insert into tbl_app_order_check(record_id, check_id, warehouse, status, create_time, complete_time, remark) + values(#{recordId}, #{checkId}, #{warehouse}, #{status}, #{createTime}, #{completeTime}, #{remark}) + + + + update tbl_app_order_check + + status = #{status}, + + where record_id = #{recordId} + + + + + insert into tbl_app_order_check(record_id, check_id, warehouse, status, create_time, complete_time, remark) + values + + (#{item.recordId}, #{item.checkId}, #{item.warehouse}, #{item.status}, #{item.createTime}, #{item.completeTime}, #{item.remark}) + + + + + + delete from tbl_app_order_check where record_id = #{record_id} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/OrderOutMapper.xml b/src/main/resources/mapper/OrderOutMapper.xml new file mode 100644 index 0000000..164b2d3 --- /dev/null +++ b/src/main/resources/mapper/OrderOutMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + insert into tbl_app_order_out(row_id, record_id, order_id, warehouse_origin, warehouse_destination, order_type, delivery_time, row_no, goods_id, goods_name, goods_num, unit, status, create_time, remark) + values(#{rowId}, #{recordId}, #{orderId}, #{warehouseOrigin}, #{warehouseDestination}, #{orderType}, #{deliveryTime}, #{rowNo}, #{goodsId}, #{goodsName}, #{goodsNum}, #{unit}, #{status}, #{createTime}, #{remark}) + + + + + update tbl_app_order_out + + status = #{status}, + + where row_id = #{rowId} + + + + + insert into tbl_app_order_out(row_id, record_id, order_id, warehouse_origin, warehouse_destination, order_type, delivery_time, row_no, goods_id, goods_name, goods_num, unit, status, create_time, remark) + values + + (#{item.rowId}, #{item.recordId}, #{item.orderId}, #{item.warehouseOrigin}, #{item.warehouseDestination}, #{item.orderType}, + #{item.deliveryTime}, #{item.rowNo}, #{item.goodsId}, + #{item.goodsName}, #{item.goodsNum}, #{item.unit}, + #{item.status}, #{item.createTime}, #{item.remark}) + + + + + + delete from tbl_app_order_out where row_id = #{rowId} + + + + + delete from tbl_app_order_out + where order_type = #{orderType} + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/OrderOutRecordMapper.xml b/src/main/resources/mapper/OrderOutRecordMapper.xml new file mode 100644 index 0000000..a730876 --- /dev/null +++ b/src/main/resources/mapper/OrderOutRecordMapper.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + insert into tbl_app_order_out_bak(row_id, record_id, order_id, warehouse_origin, warehouse_destination, order_type, delivery_time, row_no, goods_id, goods_name, goods_num, unit, status, create_time, remark) + values(#{rowId}, #{recordId}, #{orderId}, #{warehouseOrigin}, #{warehouseDestination}, #{orderType}, #{deliveryTime}, #{rowNo}, #{goodsId}, #{goodsName}, #{goodsNum}, #{unit}, #{status}, #{createTime}, #{remark}) + + + + + insert into tbl_app_order_out_bak(row_id, record_id, order_id, warehouse_origin, warehouse_destination, order_type, delivery_time, row_no, goods_id, goods_name, goods_num, unit, status, create_time, remark) + values + + (#{item.rowId}, #{item.recordId}, #{item.orderId}, #{item.warehouseOrigin}, #{item.warehouseDestination}, #{item.orderType}, #{item.deliveryTime}, #{item.rowNo}, #{item.goodsId}, #{item.goodsName}, #{item.goodsNum}, #{item.unit}, #{item.status}, #{item.createTime}, #{item.remark}) + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/PartInfoMapper.xml b/src/main/resources/mapper/PartInfoMapper.xml new file mode 100644 index 0000000..64c59a7 --- /dev/null +++ b/src/main/resources/mapper/PartInfoMapper.xml @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select Material, ItemDesc, Category, CategoryRemark, Unload_Place, Kitting_Point, Property, Vendor_ID, Data_Owner, + Part_Weight, Storage_Location, Storage_Type, Storage_Bin, Vendor_Name_EN, Vendor_Country, UpdateDate, + SLED, Vendor_Name_CN + from tbl_app_part_info + + + + + + + + + + + + + + + + + + + insert into tbl_app_part_info + + Material, + ItemDesc, + Category, + CategoryRemark, + Unload_Place, + Kitting_Point, + Property, + Vendor_ID, + Data_Owner, + Part_Weight, + Storage_Location, + Storage_Type, + Storage_Bin, + Vendor_Name_EN, + Vendor_Country, + UpdateDate, + SLED, + Vendor_Name_CN, + + + #{material}, + #{itemDesc}, + #{category}, + #{categoryRemark}, + #{unloadPlace}, + #{kittingPoint}, + #{property}, + #{vendorId}, + #{dataOwner}, + #{partWeight}, + #{storageLocation}, + #{storageType}, + #{storageBin}, + #{vendorNameEN}, + #{vendorCountry}, + #{updateDate}, + #{SLED}, + #{vendorNameCN}, + + + + + update tbl_app_part_info + + ItemDesc = #{itemDesc}, + Category = #{category}, + CategoryRemark = #{categoryRemark}, + Unload_Place = #{unloadPlace}, + Kitting_Point = #{kittingPoint}, + Property = #{property}, + Vendor_ID = #{vendorId}, + Data_Owner = #{dataOwner}, + Part_Weight = #{partWeight}, + Storage_Location = #{storageLocation}, + Storage_Type = #{storageType}, + Storage_Bin = #{storageBin}, + Vendor_Name_EN = #{vendorNameEN}, + Vendor_Country = #{vendorCountry}, + UpdateDate = #{updateDate}, + SLED = #{SLED}, + Vendor_Name_CN = #{vendorNameCN}, + + where Material = #{material} + + + + delete from tbl_app_part_info where Material = #{material} + + \ No newline at end of file diff --git a/src/main/resources/mapper/PermissionMapper.xml b/src/main/resources/mapper/PermissionMapper.xml new file mode 100644 index 0000000..49866a4 --- /dev/null +++ b/src/main/resources/mapper/PermissionMapper.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO tbl_sys_permission (permission_id, menu_id, role_id) + VALUES + + (#{permission.permissionId}, #{permission.menuId}, #{permission.roleId}) + + + + + + delete from tbl_sys_permission where role_id = #{roleId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/RoleMapper.xml b/src/main/resources/mapper/RoleMapper.xml new file mode 100644 index 0000000..44f90f1 --- /dev/null +++ b/src/main/resources/mapper/RoleMapper.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + insert into tbl_sys_role values (#{roleId}, #{roleName}) + + + + delete from tbl_sys_role where role_id = #{roleId} + + + + update tbl_sys_role + + role_name = #{roleName}, + + where role_id = #{roleId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/StandMapper.xml b/src/main/resources/mapper/StandMapper.xml new file mode 100644 index 0000000..f534bb1 --- /dev/null +++ b/src/main/resources/mapper/StandMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + select stand_id, allow_in, allow_out, task_id, is_lock, stand_status, equipment_id, area_id, stand_type, stand_ip + from tbl_app_stand + + + + + + + + insert into tbl_app_stand + + stand_id, + allow_in, + allow_out, + task_id, + is_lock, + stand_status, + equipment_id, + area_id, + stand_type, + stand_ip, + + + #{standId}, + #{allowIn}, + #{allowOut}, + #{taskId}, + #{isLock}, + #{standStatus}, + #{equipmentId}, + #{areaId}, + #{standType}, + #{standIp}, + + + + + update tbl_app_stand + + allow_in = #{allowIn}, + allow_out = #{allowOut}, + task_id = #{taskId}, + is_lock = #{isLock}, + stand_status = #{standStatus}, + equipment_id = #{equipmentId}, + area_id = #{areaId}, + stand_type = #{standType}, + stand_ip = #{standIp}, + + where stand_id = #{standId} + + + + delete from tbl_app_stand where stand_id = #{standId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/StockMapper.xml b/src/main/resources/mapper/StockMapper.xml new file mode 100644 index 0000000..8570cc3 --- /dev/null +++ b/src/main/resources/mapper/StockMapper.xml @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select stock_id, warehouse_name, location_id, vehicle_id, goods_id, goods_name, batch_no, available_num, remain_num, real_num, provider_id, + provider_name, production_date, expiration_date, stock_status, goods_status, create_time, last_update_time, last_update_user, remark, + is_inventory, inventory_task_id, current_location, shelf_life + from tbl_app_stock + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into tbl_app_stock + + stock_id, + warehouse_name, + location_id, + vehicle_id, + goods_id, + goods_name, + batch_no, + remain_num, + available_num, + real_num, + provider_id, + provider_name, + production_date, + expiration_date, + stock_status, + goods_status, + create_time, + last_update_time, + last_update_user, + remark, + is_inventory, + inventory_task_id, + current_location, + shelf_life, + + + #{stockId}, + #{warehouseName}, + #{locationId}, + #{vehicleId}, + #{goodsId}, + #{goodsName}, + #{batchNo}, + #{remainNum}, + #{availableNum}, + #{realNum}, + #{providerId}, + #{providerName}, + #{productionDate}, + #{expirationDate}, + #{stockStatus}, + #{goodsStatus}, + #{createTime}, + #{lastUpdateTime}, + #{lastUpdateUser}, + #{remark}, + #{isInventory}, + #{inventoryTaskId}, + #{currentLocation}, + #{shelfLife}, + + + + + update tbl_app_stock + + location_id = #{locationId}, + vehicle_id = #{vehicleId}, + goods_id = #{goodsId}, + goods_name = #{goodsName}, + batch_no = #{batchNo}, + remain_num = #{remainNum}, + available_num = #{availableNum}, + real_num = #{realNum}, + provider_id = #{providerId}, + provider_name = #{providerName}, + production_date = #{productionDate}, + expiration_date = #{expirationDate}, + stock_status = #{stockStatus}, + goods_status = #{goodsStatus}, + create_time = #{createTime}, + last_update_time = #{lastUpdateTime}, + last_update_user = #{lastUpdateUser}, + remark = #{remark}, + is_inventory = #{isInventory}, + inventory_task_id = #{inventoryTaskId}, + current_location = #{currentLocation}, + shelf_life = #{shelfLife}, + + where stock_id = #{stockId} + + + + update tbl_app_stock set location_id = #{newLocationId} where location_id = #{oldLocationId} + + + update tbl_app_stock set location_id = #{newLocationId}, stock_status = #{status} where location_id = #{oldLocationId} + + + + + + + + + + + update tbl_app_stock set available_num = real_num; + + + + + delete from tbl_app_stock where stock_id = #{stockId} + + + + + delete from tbl_app_stock where location_id = #{locationId} + + + + update tbl_app_stock set stock_status = #{status} where location_id = #{locationId} + + + + update tbl_app_stock set available_num = #{availableNum} where stock_id = #{stockId} + + + + + update tbl_app_stock set production_date = #{productionDate} where stock_id = #{stockId} + + + + + + update tbl_app_stock set location_id = #{locationId} where batch_no = #{batchNo} + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TaskMapper.xml b/src/main/resources/mapper/TaskMapper.xml new file mode 100644 index 0000000..d28a719 --- /dev/null +++ b/src/main/resources/mapper/TaskMapper.xml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select task_id, task_type, task_status, task_group, origin, destination, pick_stand, weight, vehicle_no, vehicle_size, + create_time, user_name, goods_id, goods_name, operate_num, total_num, etag_location, task_priority, + production_date, expiration_date, kate_task_id, remark1 + from tbl_app_task + + + + + + + + + insert into tbl_app_task + + task_id, + task_type, + task_status, + task_group, + origin, + destination, + pick_stand, + weight, + vehicle_no, + vehicle_size, + create_time, + user_name, + goods_id, + goods_name, + operate_num, + total_num, + etag_location, + task_priority, + production_date, + expiration_date, + kate_task_id, + remark1, + + + #{taskId}, + #{taskType}, + #{taskStatus}, + #{taskGroup}, + #{origin}, + #{destination}, + #{pickStand}, + #{weight}, + #{vehicleNo}, + #{vehicleSize}, + #{createTime}, + #{userName}, + #{goodsId}, + #{goodsName}, + #{operateNum}, + #{totalNum}, + #{etagLocation}, + #{taskPriority}, + #{productionDate}, + #{expirationDate}, + #{kateTaskId}, + #{remark1}, + + + + + insert into tbl_app_task(task_id, task_type, task_status, task_group, origin, + destination, pick_stand, weight, vehicle_no, vehicle_size, + create_time, user_name, goods_id, goods_name, operate_num, + total_num, etag_location, task_priority, production_date, + expiration_date, kate_task_id, remark1) values + + (#{item.taskId}, #{item.taskType}, #{item.taskStatus}, #{item.taskGroup}, #{item.origin}, + #{item.destination}, #{item.pickStand}, #{item.weight}, #{item.vehicleNo}, #{item.vehicleSize}, + #{item.createTime, jdbcType=TIMESTAMP}, #{item.userName}, #{item.goodsId}, #{item.goodsName}, #{item.operateNum}, + #{item.totalNum}, #{item.etagLocation}, #{item.taskPriority}, + #{item.productionDate, jdbcType=TIMESTAMP}, + #{item.expirationDate, jdbcType=TIMESTAMP}, #{item.kateTaskId}, #{item.remark1}) + + + + + + + update tbl_app_task + + task_type = #{taskType}, + task_status = #{taskStatus}, + task_group = #{taskGroup}, + origin = #{origin}, + destination = #{destination}, + pick_stand = #{pickStand}, + weight = #{weight}, + vehicle_no = #{vehicleNo}, + vehicle_size = #{vehicleSize}, + create_time = #{createTime}, + user_name = #{userName}, + goods_id = #{goodsId}, + goods_name = #{goodsName}, + operate_num = #{operateNum}, + total_num = #{totalNum}, + etag_location = #{etagLocation}, + task_priority = #{taskPriority}, + production_date = #{productionDate}, + expiration_date = #{expirationDate}, + kate_task_id = #{kateTaskId}, + remark1 = #{remark1}, + + where task_id = #{taskId} + + + + delete from tbl_app_task where task_id = #{taskId} + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/TaskRecordMapper.xml b/src/main/resources/mapper/TaskRecordMapper.xml new file mode 100644 index 0000000..077c445 --- /dev/null +++ b/src/main/resources/mapper/TaskRecordMapper.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select task_id, task_type, task_status, task_group, origin, destination, pick_stand, weight, vehicle_no, vehicle_size, + create_time, user_name, goods_id, goods_name, operate_num, total_num, etag_location, task_priority, + production_date, expiration_date, kate_task_id, finish_time, remark1 + from tbl_app_task_bak + + + + + + insert into tbl_app_task_bak + + task_id, + task_type, + task_status, + task_group, + origin, + destination, + pick_stand, + weight, + vehicle_no, + vehicle_size, + create_time, + user_name, + goods_id, + goods_name, + operate_num, + total_num, + etag_location, + task_priority, + production_date, + expiration_date, + kate_task_id, + finish_time, + remark1, + + + #{taskId}, + #{taskType}, + #{taskStatus}, + #{taskGroup}, + #{origin}, + #{destination}, + #{pickStand}, + #{weight}, + #{vehicleNo}, + #{vehicleSize}, + #{createTime}, + #{userName}, + #{goodsId}, + #{goodsName}, + #{operateNum}, + #{totalNum}, + #{etagLocation}, + #{taskPriority}, + #{productionDate}, + #{expirationDate}, + #{kateTaskId}, + #{finishTime}, + #{remark1}, + + + + + update tbl_app_task_bak + + task_type = #{taskType}, + task_status = #{taskStatus}, + task_group = #{taskGroup}, + origin = #{origin}, + destination = #{destination}, + pick_stand = #{pickStand}, + weight = #{weight}, + vehicle_no = #{vehicleNo}, + vehicle_size = #{vehicleSize}, + create_time = #{createTime}, + user_name = #{userName}, + goods_id = #{goodsId}, + goods_name = #{goodsName}, + operate_num = #{operateNum}, + total_num = #{totalNum}, + etag_location = #{etagLocation}, + task_priority = #{taskPriority}, + task_priority = #{productionDate}, + expiration_date = #{expirationDate}, + kate_task_id = #{kateTaskId}, + finish_time = #{finishTime}, + remark1 = #{remark1}, + + where task_id = #{taskId} + + + + delete from tbl_app_task_bak where task_id = #{taskId} + + + + delete from tbl_app_task_bak where finish_time < date_add(curdate(),INTERVAL -7 DAY) and task_type != 3 + + \ No newline at end of file diff --git a/src/main/resources/mapper/UserMapper.xml b/src/main/resources/mapper/UserMapper.xml new file mode 100644 index 0000000..47dd4d6 --- /dev/null +++ b/src/main/resources/mapper/UserMapper.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + insert into tbl_sys_user (user_id, user_name, role_id, login_account, login_password, add_time, update_time, add_user) + values (#{userId}, #{userName}, #{roleId}, #{loginAccount}, #{loginPassword}, #{addTime}, #{updateTime}, #{addUser}) + + + + + delete from tbl_sys_user where user_id = #{userId} + + + + update tbl_sys_user + + login_password = #{loginPassword}, + + where login_account = #{loginAccount} + + + + update tbl_sys_user + + user_name = #{userName}, + login_account = #{loginAccount}, + role_id = #{roleId}, + + where user_id = #{userId} + + \ No newline at end of file diff --git a/src/main/resources/mapper/VehicleIistMapper.xml b/src/main/resources/mapper/VehicleIistMapper.xml new file mode 100644 index 0000000..5efa904 --- /dev/null +++ b/src/main/resources/mapper/VehicleIistMapper.xml @@ -0,0 +1,45 @@ + + + + + + + + + + insert into tbl_app_vehicle_list(vehicle_id) + values(#{vehicleId}) + + + + + + + + update tbl_app_vehicle_list + + vehicle_id = #{vehicleId} + + where vehicle_id = #{vehicleId} + + + + delete from tbl_app_vehicle_list + where vehicle_id = #{vehicleId} + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/VehicleMapper.xml b/src/main/resources/mapper/VehicleMapper.xml new file mode 100644 index 0000000..650377d --- /dev/null +++ b/src/main/resources/mapper/VehicleMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + select vehicle_id, current_location, vehicle_status, is_empty + from tbl_app_vehicle + + + + + + + + + + + + insert into tbl_app_vehicle + + vehicle_id, + current_location, + vehicle_status, + is_empty, + + + #{vehicleId}, + #{currentLocation}, + #{vehicleStatus}, + #{isEmpty}, + + + + + update tbl_app_vehicle + + current_location = #{currentLocation}, + vehicle_status = #{vehicleStatus}, + is_empty = #{isEmpty}, + + where vehicle_id = #{vehicleId} + + + + + update tbl_app_vehicle set current_location = #{newVehicleId} where current_location = #{oldVehicleId} + + + + delete from tbl_app_vehicle where vehicle_id = #{vehicleId} + + + + delete from tbl_app_vehicle where current_location= #{currentLocation} + + + + \ No newline at end of file diff --git a/src/main/resources/mybatis-config.xml b/src/main/resources/mybatis-config.xml new file mode 100644 index 0000000..a67aade --- /dev/null +++ b/src/main/resources/mybatis-config.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/sql/wms_bk_xuzhou.sql b/src/main/resources/sql/wms_bk_xuzhou.sql new file mode 100644 index 0000000..eb2c387 --- /dev/null +++ b/src/main/resources/sql/wms_bk_xuzhou.sql @@ -0,0 +1,1598 @@ +/* + Navicat Premium Data Transfer + + Source Server : 本地数据库 + Source Server Type : MySQL + Source Server Version : 80032 (8.0.32) + Source Host : localhost:3306 + Source Schema : wms_bk_xuzhou + + Target Server Type : MySQL + Target Server Version : 80032 (8.0.32) + File Encoding : 65001 + + Date: 15/03/2024 14:03:24 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for tbl_app_goods +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_goods`; +CREATE TABLE `tbl_app_goods` ( + `goods_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '物料编号', + `goods_name` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料名称', + `goods_unit` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单位', + `item_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料id', + `item_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料类别', + `inv_category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存类别', + `life_days` int NULL DEFAULT NULL COMMENT '存储天数', + `organization_id` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存组织id', + `organization_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存组织代码', + `last_update_time` datetime NULL DEFAULT NULL COMMENT '最后更新时间', + `last_update_user` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后更新用户', + PRIMARY KEY (`goods_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_goods +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_location +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_location`; +CREATE TABLE `tbl_app_location` ( + `location_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '库位编号', + `area_id` int NULL DEFAULT NULL COMMENT '区域编号', + `tunnel_id` int NULL DEFAULT NULL COMMENT '巷道编号', + `equipment_id` int NULL DEFAULT NULL COMMENT '设备编号', + `location_type` int NULL DEFAULT NULL COMMENT '库位类型', + `queue` int NULL DEFAULT NULL COMMENT '排', + `line` int NULL DEFAULT NULL COMMENT '列', + `layer` int NULL DEFAULT NULL COMMENT '层', + `depth` int NULL DEFAULT NULL COMMENT '深度', + `is_lock` int NULL DEFAULT NULL COMMENT '库位是否锁定(0:未锁定,1:锁定)', + `location_status` int NULL DEFAULT NULL COMMENT '库位状态(0:空闲,1:占用)', + `vehicle_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '载具编号', + PRIMARY KEY (`location_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_location +-- ---------------------------- +INSERT INTO `tbl_app_location` VALUES ('010101', 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010102', 1, 1, 1, 0, 1, 1, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010103', 1, 1, 1, 0, 1, 1, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010104', 1, 1, 1, 0, 1, 1, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010105', 1, 1, 1, 0, 1, 1, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010106', 1, 1, 1, 0, 1, 1, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010107', 1, 1, 1, 0, 1, 1, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010108', 1, 1, 1, 0, 1, 1, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010109', 1, 1, 1, 0, 1, 1, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010110', 1, 1, 1, 0, 1, 1, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010111', 1, 1, 1, 0, 1, 1, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010112', 1, 1, 1, 0, 1, 1, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010201', 1, 1, 1, 0, 1, 2, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010202', 1, 1, 1, 0, 1, 2, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010203', 1, 1, 1, 0, 1, 2, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010204', 1, 1, 1, 0, 1, 2, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010205', 1, 1, 1, 0, 1, 2, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010206', 1, 1, 1, 0, 1, 2, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010207', 1, 1, 1, 0, 1, 2, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010208', 1, 1, 1, 0, 1, 2, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010209', 1, 1, 1, 0, 1, 2, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010210', 1, 1, 1, 0, 1, 2, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010211', 1, 1, 1, 0, 1, 2, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010212', 1, 1, 1, 0, 1, 2, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010301', 1, 1, 1, 0, 1, 3, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010302', 1, 1, 1, 0, 1, 3, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010303', 1, 1, 1, 0, 1, 3, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010304', 1, 1, 1, 0, 1, 3, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010305', 1, 1, 1, 0, 1, 3, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010306', 1, 1, 1, 0, 1, 3, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010307', 1, 1, 1, 0, 1, 3, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010308', 1, 1, 1, 0, 1, 3, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010309', 1, 1, 1, 0, 1, 3, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010310', 1, 1, 1, 0, 1, 3, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010311', 1, 1, 1, 0, 1, 3, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010312', 1, 1, 1, 0, 1, 3, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010401', 1, 1, 1, 0, 1, 4, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010402', 1, 1, 1, 0, 1, 4, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010403', 1, 1, 1, 0, 1, 4, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010404', 1, 1, 1, 0, 1, 4, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010405', 1, 1, 1, 0, 1, 4, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010406', 1, 1, 1, 0, 1, 4, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010407', 1, 1, 1, 0, 1, 4, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010408', 1, 1, 1, 0, 1, 4, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010409', 1, 1, 1, 0, 1, 4, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010410', 1, 1, 1, 0, 1, 4, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010411', 1, 1, 1, 0, 1, 4, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010412', 1, 1, 1, 0, 1, 4, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010501', 1, 1, 1, 0, 1, 5, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010502', 1, 1, 1, 0, 1, 5, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010503', 1, 1, 1, 0, 1, 5, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010504', 1, 1, 1, 0, 1, 5, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010505', 1, 1, 1, 0, 1, 5, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010506', 1, 1, 1, 0, 1, 5, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010507', 1, 1, 1, 0, 1, 5, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010508', 1, 1, 1, 0, 1, 5, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010509', 1, 1, 1, 0, 1, 5, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010510', 1, 1, 1, 0, 1, 5, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010511', 1, 1, 1, 0, 1, 5, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010512', 1, 1, 1, 0, 1, 5, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010601', 1, 1, 1, 0, 1, 6, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010602', 1, 1, 1, 0, 1, 6, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010603', 1, 1, 1, 0, 1, 6, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010604', 1, 1, 1, 0, 1, 6, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010605', 1, 1, 1, 0, 1, 6, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010606', 1, 1, 1, 0, 1, 6, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010607', 1, 1, 1, 0, 1, 6, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010608', 1, 1, 1, 0, 1, 6, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010609', 1, 1, 1, 0, 1, 6, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010610', 1, 1, 1, 0, 1, 6, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010611', 1, 1, 1, 0, 1, 6, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010612', 1, 1, 1, 0, 1, 6, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010701', 1, 1, 1, 0, 1, 7, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010702', 1, 1, 1, 0, 1, 7, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010703', 1, 1, 1, 0, 1, 7, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010704', 1, 1, 1, 0, 1, 7, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010705', 1, 1, 1, 0, 1, 7, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010706', 1, 1, 1, 0, 1, 7, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010707', 1, 1, 1, 0, 1, 7, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010708', 1, 1, 1, 0, 1, 7, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010709', 1, 1, 1, 0, 1, 7, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010710', 1, 1, 1, 0, 1, 7, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010711', 1, 1, 1, 0, 1, 7, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010712', 1, 1, 1, 0, 1, 7, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010801', 1, 1, 1, 0, 1, 8, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010802', 1, 1, 1, 0, 1, 8, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010803', 1, 1, 1, 0, 1, 8, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010804', 1, 1, 1, 0, 1, 8, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010805', 1, 1, 1, 0, 1, 8, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010806', 1, 1, 1, 0, 1, 8, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010807', 1, 1, 1, 0, 1, 8, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010808', 1, 1, 1, 0, 1, 8, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010809', 1, 1, 1, 0, 1, 8, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010810', 1, 1, 1, 0, 1, 8, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010811', 1, 1, 1, 0, 1, 8, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010812', 1, 1, 1, 0, 1, 8, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010901', 1, 1, 1, 0, 1, 9, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010902', 1, 1, 1, 0, 1, 9, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010903', 1, 1, 1, 0, 1, 9, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010904', 1, 1, 1, 0, 1, 9, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010905', 1, 1, 1, 0, 1, 9, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010906', 1, 1, 1, 0, 1, 9, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010907', 1, 1, 1, 0, 1, 9, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010908', 1, 1, 1, 0, 1, 9, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010909', 1, 1, 1, 0, 1, 9, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010910', 1, 1, 1, 0, 1, 9, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010911', 1, 1, 1, 0, 1, 9, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('010912', 1, 1, 1, 0, 1, 9, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011001', 1, 1, 1, 0, 1, 10, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011002', 1, 1, 1, 0, 1, 10, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011003', 1, 1, 1, 0, 1, 10, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011004', 1, 1, 1, 0, 1, 10, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011005', 1, 1, 1, 0, 1, 10, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011006', 1, 1, 1, 0, 1, 10, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011007', 1, 1, 1, 0, 1, 10, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011008', 1, 1, 1, 0, 1, 10, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011009', 1, 1, 1, 0, 1, 10, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011010', 1, 1, 1, 0, 1, 10, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011011', 1, 1, 1, 0, 1, 10, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011012', 1, 1, 1, 0, 1, 10, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011101', 1, 1, 1, 0, 1, 11, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011102', 1, 1, 1, 0, 1, 11, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011103', 1, 1, 1, 0, 1, 11, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011104', 1, 1, 1, 0, 1, 11, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011105', 1, 1, 1, 0, 1, 11, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011106', 1, 1, 1, 0, 1, 11, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011107', 1, 1, 1, 0, 1, 11, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011108', 1, 1, 1, 0, 1, 11, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011109', 1, 1, 1, 0, 1, 11, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011110', 1, 1, 1, 0, 1, 11, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011111', 1, 1, 1, 0, 1, 11, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011112', 1, 1, 1, 0, 1, 11, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011201', 1, 1, 1, 0, 1, 12, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011202', 1, 1, 1, 0, 1, 12, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011203', 1, 1, 1, 0, 1, 12, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011204', 1, 1, 1, 0, 1, 12, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011205', 1, 1, 1, 0, 1, 12, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011206', 1, 1, 1, 0, 1, 12, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011207', 1, 1, 1, 0, 1, 12, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011208', 1, 1, 1, 0, 1, 12, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011209', 1, 1, 1, 0, 1, 12, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011210', 1, 1, 1, 0, 1, 12, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011211', 1, 1, 1, 0, 1, 12, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011212', 1, 1, 1, 0, 1, 12, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011301', 1, 1, 1, 0, 1, 13, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011302', 1, 1, 1, 0, 1, 13, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011303', 1, 1, 1, 0, 1, 13, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011304', 1, 1, 1, 0, 1, 13, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011305', 1, 1, 1, 0, 1, 13, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011306', 1, 1, 1, 0, 1, 13, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011307', 1, 1, 1, 0, 1, 13, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011308', 1, 1, 1, 0, 1, 13, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011309', 1, 1, 1, 0, 1, 13, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011310', 1, 1, 1, 0, 1, 13, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011311', 1, 1, 1, 0, 1, 13, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011312', 1, 1, 1, 0, 1, 13, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011401', 1, 1, 1, 0, 1, 14, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011402', 1, 1, 1, 0, 1, 14, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011403', 1, 1, 1, 0, 1, 14, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011404', 1, 1, 1, 0, 1, 14, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011405', 1, 1, 1, 0, 1, 14, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011406', 1, 1, 1, 0, 1, 14, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011407', 1, 1, 1, 0, 1, 14, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011408', 1, 1, 1, 0, 1, 14, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011409', 1, 1, 1, 0, 1, 14, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011410', 1, 1, 1, 0, 1, 14, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011411', 1, 1, 1, 0, 1, 14, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011412', 1, 1, 1, 0, 1, 14, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011501', 1, 1, 1, 0, 1, 15, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011502', 1, 1, 1, 0, 1, 15, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011503', 1, 1, 1, 0, 1, 15, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011504', 1, 1, 1, 0, 1, 15, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011505', 1, 1, 1, 0, 1, 15, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011506', 1, 1, 1, 0, 1, 15, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011507', 1, 1, 1, 0, 1, 15, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011508', 1, 1, 1, 0, 1, 15, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011509', 1, 1, 1, 0, 1, 15, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011510', 1, 1, 1, 0, 1, 15, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011511', 1, 1, 1, 0, 1, 15, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011512', 1, 1, 1, 0, 1, 15, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011601', 1, 1, 1, 0, 1, 16, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011602', 1, 1, 1, 0, 1, 16, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011603', 1, 1, 1, 0, 1, 16, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011604', 1, 1, 1, 0, 1, 16, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011605', 1, 1, 1, 0, 1, 16, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011606', 1, 1, 1, 0, 1, 16, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011607', 1, 1, 1, 0, 1, 16, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011608', 1, 1, 1, 0, 1, 16, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011609', 1, 1, 1, 0, 1, 16, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011610', 1, 1, 1, 0, 1, 16, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011611', 1, 1, 1, 0, 1, 16, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011612', 1, 1, 1, 0, 1, 16, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011701', 1, 1, 1, 0, 1, 17, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011702', 1, 1, 1, 0, 1, 17, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011703', 1, 1, 1, 0, 1, 17, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011704', 1, 1, 1, 0, 1, 17, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011705', 1, 1, 1, 0, 1, 17, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011706', 1, 1, 1, 0, 1, 17, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011707', 1, 1, 1, 0, 1, 17, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011708', 1, 1, 1, 0, 1, 17, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011709', 1, 1, 1, 0, 1, 17, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011710', 1, 1, 1, 0, 1, 17, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011711', 1, 1, 1, 0, 1, 17, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011712', 1, 1, 1, 0, 1, 17, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011801', 1, 1, 1, 0, 1, 18, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011802', 1, 1, 1, 0, 1, 18, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011803', 1, 1, 1, 0, 1, 18, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011804', 1, 1, 1, 0, 1, 18, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011805', 1, 1, 1, 0, 1, 18, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011806', 1, 1, 1, 0, 1, 18, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011807', 1, 1, 1, 0, 1, 18, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011808', 1, 1, 1, 0, 1, 18, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011809', 1, 1, 1, 0, 1, 18, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011810', 1, 1, 1, 0, 1, 18, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011811', 1, 1, 1, 0, 1, 18, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011812', 1, 1, 1, 0, 1, 18, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011901', 1, 1, 1, 0, 1, 19, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011902', 1, 1, 1, 0, 1, 19, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011903', 1, 1, 1, 0, 1, 19, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011904', 1, 1, 1, 0, 1, 19, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011905', 1, 1, 1, 0, 1, 19, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011906', 1, 1, 1, 0, 1, 19, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011907', 1, 1, 1, 0, 1, 19, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011908', 1, 1, 1, 0, 1, 19, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011909', 1, 1, 1, 0, 1, 19, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011910', 1, 1, 1, 0, 1, 19, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011911', 1, 1, 1, 0, 1, 19, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('011912', 1, 1, 1, 0, 1, 19, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012001', 1, 1, 1, 0, 1, 20, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012002', 1, 1, 1, 0, 1, 20, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012003', 1, 1, 1, 0, 1, 20, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012004', 1, 1, 1, 0, 1, 20, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012005', 1, 1, 1, 0, 1, 20, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012006', 1, 1, 1, 0, 1, 20, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012007', 1, 1, 1, 0, 1, 20, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012008', 1, 1, 1, 0, 1, 20, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012009', 1, 1, 1, 0, 1, 20, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012010', 1, 1, 1, 0, 1, 20, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012011', 1, 1, 1, 0, 1, 20, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012012', 1, 1, 1, 0, 1, 20, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012101', 1, 1, 1, 0, 1, 21, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012102', 1, 1, 1, 0, 1, 21, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012103', 1, 1, 1, 0, 1, 21, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012104', 1, 1, 1, 0, 1, 21, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012105', 1, 1, 1, 0, 1, 21, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012106', 1, 1, 1, 0, 1, 21, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012107', 1, 1, 1, 0, 1, 21, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012108', 1, 1, 1, 0, 1, 21, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012109', 1, 1, 1, 0, 1, 21, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012110', 1, 1, 1, 0, 1, 21, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012111', 1, 1, 1, 0, 1, 21, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012112', 1, 1, 1, 0, 1, 21, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012201', 1, 1, 1, 0, 1, 22, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012202', 1, 1, 1, 0, 1, 22, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012203', 1, 1, 1, 0, 1, 22, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012204', 1, 1, 1, 0, 1, 22, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012205', 1, 1, 1, 0, 1, 22, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012206', 1, 1, 1, 0, 1, 22, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012207', 1, 1, 1, 0, 1, 22, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012208', 1, 1, 1, 0, 1, 22, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012209', 1, 1, 1, 0, 1, 22, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012210', 1, 1, 1, 0, 1, 22, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012211', 1, 1, 1, 0, 1, 22, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012212', 1, 1, 1, 0, 1, 22, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012301', 1, 1, 1, 0, 1, 23, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012302', 1, 1, 1, 0, 1, 23, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012303', 1, 1, 1, 0, 1, 23, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012304', 1, 1, 1, 0, 1, 23, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012305', 1, 1, 1, 0, 1, 23, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012306', 1, 1, 1, 0, 1, 23, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012307', 1, 1, 1, 0, 1, 23, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012308', 1, 1, 1, 0, 1, 23, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012309', 1, 1, 1, 0, 1, 23, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012310', 1, 1, 1, 0, 1, 23, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012311', 1, 1, 1, 0, 1, 23, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012312', 1, 1, 1, 0, 1, 23, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012401', 1, 1, 1, 0, 1, 24, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012402', 1, 1, 1, 0, 1, 24, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012403', 1, 1, 1, 0, 1, 24, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012404', 1, 1, 1, 0, 1, 24, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012405', 1, 1, 1, 0, 1, 24, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012406', 1, 1, 1, 0, 1, 24, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012407', 1, 1, 1, 0, 1, 24, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012408', 1, 1, 1, 0, 1, 24, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012409', 1, 1, 1, 0, 1, 24, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012410', 1, 1, 1, 0, 1, 24, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012411', 1, 1, 1, 0, 1, 24, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012412', 1, 1, 1, 0, 1, 24, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012501', 1, 1, 1, 0, 1, 25, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012502', 1, 1, 1, 0, 1, 25, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012503', 1, 1, 1, 0, 1, 25, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012504', 1, 1, 1, 0, 1, 25, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012505', 1, 1, 1, 0, 1, 25, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012506', 1, 1, 1, 0, 1, 25, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012507', 1, 1, 1, 0, 1, 25, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012508', 1, 1, 1, 0, 1, 25, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012509', 1, 1, 1, 0, 1, 25, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012510', 1, 1, 1, 0, 1, 25, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012511', 1, 1, 1, 0, 1, 25, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012512', 1, 1, 1, 0, 1, 25, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012601', 1, 1, 1, 0, 1, 26, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012602', 1, 1, 1, 0, 1, 26, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012603', 1, 1, 1, 0, 1, 26, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012604', 1, 1, 1, 0, 1, 26, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012605', 1, 1, 1, 0, 1, 26, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012606', 1, 1, 1, 0, 1, 26, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012607', 1, 1, 1, 0, 1, 26, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012608', 1, 1, 1, 0, 1, 26, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012609', 1, 1, 1, 0, 1, 26, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012610', 1, 1, 1, 0, 1, 26, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012611', 1, 1, 1, 0, 1, 26, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012612', 1, 1, 1, 0, 1, 26, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012701', 1, 1, 1, 0, 1, 27, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012702', 1, 1, 1, 0, 1, 27, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012703', 1, 1, 1, 0, 1, 27, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012704', 1, 1, 1, 0, 1, 27, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012705', 1, 1, 1, 0, 1, 27, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012706', 1, 1, 1, 0, 1, 27, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012707', 1, 1, 1, 0, 1, 27, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012708', 1, 1, 1, 0, 1, 27, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012709', 1, 1, 1, 0, 1, 27, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012710', 1, 1, 1, 0, 1, 27, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012711', 1, 1, 1, 0, 1, 27, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012712', 1, 1, 1, 0, 1, 27, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012801', 1, 1, 1, 0, 1, 28, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012802', 1, 1, 1, 0, 1, 28, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012803', 1, 1, 1, 0, 1, 28, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012804', 1, 1, 1, 0, 1, 28, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012805', 1, 1, 1, 0, 1, 28, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012806', 1, 1, 1, 0, 1, 28, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012807', 1, 1, 1, 0, 1, 28, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012808', 1, 1, 1, 0, 1, 28, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012809', 1, 1, 1, 0, 1, 28, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012810', 1, 1, 1, 0, 1, 28, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012811', 1, 1, 1, 0, 1, 28, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012812', 1, 1, 1, 0, 1, 28, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012901', 1, 1, 1, 0, 1, 29, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012902', 1, 1, 1, 0, 1, 29, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012903', 1, 1, 1, 0, 1, 29, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012904', 1, 1, 1, 0, 1, 29, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012905', 1, 1, 1, 0, 1, 29, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012906', 1, 1, 1, 0, 1, 29, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012907', 1, 1, 1, 0, 1, 29, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012908', 1, 1, 1, 0, 1, 29, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012909', 1, 1, 1, 0, 1, 29, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012910', 1, 1, 1, 0, 1, 29, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012911', 1, 1, 1, 0, 1, 29, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('012912', 1, 1, 1, 0, 1, 29, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013001', 1, 1, 1, 0, 1, 30, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013002', 1, 1, 1, 0, 1, 30, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013003', 1, 1, 1, 0, 1, 30, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013004', 1, 1, 1, 0, 1, 30, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013005', 1, 1, 1, 0, 1, 30, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013006', 1, 1, 1, 0, 1, 30, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013007', 1, 1, 1, 0, 1, 30, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013008', 1, 1, 1, 0, 1, 30, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013009', 1, 1, 1, 0, 1, 30, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013010', 1, 1, 1, 0, 1, 30, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013011', 1, 1, 1, 0, 1, 30, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013012', 1, 1, 1, 0, 1, 30, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013101', 1, 1, 1, 0, 1, 31, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013102', 1, 1, 1, 0, 1, 31, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013103', 1, 1, 1, 0, 1, 31, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013104', 1, 1, 1, 0, 1, 31, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013105', 1, 1, 1, 0, 1, 31, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013106', 1, 1, 1, 0, 1, 31, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013107', 1, 1, 1, 0, 1, 31, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013108', 1, 1, 1, 0, 1, 31, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013109', 1, 1, 1, 0, 1, 31, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013110', 1, 1, 1, 0, 1, 31, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013111', 1, 1, 1, 0, 1, 31, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013112', 1, 1, 1, 0, 1, 31, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013201', 1, 1, 1, 0, 1, 32, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013202', 1, 1, 1, 0, 1, 32, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013203', 1, 1, 1, 0, 1, 32, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013204', 1, 1, 1, 0, 1, 32, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013205', 1, 1, 1, 0, 1, 32, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013206', 1, 1, 1, 0, 1, 32, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013207', 1, 1, 1, 0, 1, 32, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013208', 1, 1, 1, 0, 1, 32, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013209', 1, 1, 1, 0, 1, 32, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013210', 1, 1, 1, 0, 1, 32, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013211', 1, 1, 1, 0, 1, 32, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013212', 1, 1, 1, 0, 1, 32, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013301', 1, 1, 1, 0, 1, 33, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013302', 1, 1, 1, 0, 1, 33, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013303', 1, 1, 1, 0, 1, 33, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013304', 1, 1, 1, 0, 1, 33, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013305', 1, 1, 1, 0, 1, 33, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013306', 1, 1, 1, 0, 1, 33, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013307', 1, 1, 1, 0, 1, 33, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013308', 1, 1, 1, 0, 1, 33, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013309', 1, 1, 1, 0, 1, 33, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013310', 1, 1, 1, 0, 1, 33, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013311', 1, 1, 1, 0, 1, 33, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013312', 1, 1, 1, 0, 1, 33, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013401', 1, 1, 1, 0, 1, 34, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013402', 1, 1, 1, 0, 1, 34, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013403', 1, 1, 1, 0, 1, 34, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013404', 1, 1, 1, 0, 1, 34, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013405', 1, 1, 1, 0, 1, 34, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013406', 1, 1, 1, 0, 1, 34, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013407', 1, 1, 1, 0, 1, 34, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013408', 1, 1, 1, 0, 1, 34, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013409', 1, 1, 1, 0, 1, 34, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013410', 1, 1, 1, 0, 1, 34, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013411', 1, 1, 1, 0, 1, 34, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013412', 1, 1, 1, 0, 1, 34, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013501', 1, 1, 1, 0, 1, 35, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013502', 1, 1, 1, 0, 1, 35, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013503', 1, 1, 1, 0, 1, 35, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013504', 1, 1, 1, 0, 1, 35, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013505', 1, 1, 1, 0, 1, 35, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013506', 1, 1, 1, 0, 1, 35, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013507', 1, 1, 1, 0, 1, 35, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013508', 1, 1, 1, 0, 1, 35, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013509', 1, 1, 1, 0, 1, 35, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013510', 1, 1, 1, 0, 1, 35, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013511', 1, 1, 1, 0, 1, 35, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013512', 1, 1, 1, 0, 1, 35, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013601', 1, 1, 1, 0, 1, 36, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013602', 1, 1, 1, 0, 1, 36, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013603', 1, 1, 1, 0, 1, 36, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013604', 1, 1, 1, 0, 1, 36, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013605', 1, 1, 1, 0, 1, 36, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013606', 1, 1, 1, 0, 1, 36, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013607', 1, 1, 1, 0, 1, 36, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013608', 1, 1, 1, 0, 1, 36, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013609', 1, 1, 1, 0, 1, 36, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013610', 1, 1, 1, 0, 1, 36, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013611', 1, 1, 1, 0, 1, 36, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013612', 1, 1, 1, 0, 1, 36, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013701', 1, 1, 1, 0, 1, 37, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013702', 1, 1, 1, 0, 1, 37, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013703', 1, 1, 1, 0, 1, 37, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013704', 1, 1, 1, 0, 1, 37, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013705', 1, 1, 1, 0, 1, 37, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013706', 1, 1, 1, 0, 1, 37, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013707', 1, 1, 1, 0, 1, 37, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013708', 1, 1, 1, 0, 1, 37, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013709', 1, 1, 1, 0, 1, 37, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013710', 1, 1, 1, 0, 1, 37, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013711', 1, 1, 1, 0, 1, 37, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013712', 1, 1, 1, 0, 1, 37, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013801', 1, 1, 1, 0, 1, 38, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013802', 1, 1, 1, 0, 1, 38, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013803', 1, 1, 1, 0, 1, 38, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013804', 1, 1, 1, 0, 1, 38, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013805', 1, 1, 1, 0, 1, 38, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013806', 1, 1, 1, 0, 1, 38, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013807', 1, 1, 1, 0, 1, 38, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013808', 1, 1, 1, 0, 1, 38, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013809', 1, 1, 1, 0, 1, 38, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013810', 1, 1, 1, 0, 1, 38, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013811', 1, 1, 1, 0, 1, 38, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013812', 1, 1, 1, 0, 1, 38, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013901', 1, 1, 1, 0, 1, 39, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013902', 1, 1, 1, 0, 1, 39, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013903', 1, 1, 1, 0, 1, 39, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013904', 1, 1, 1, 0, 1, 39, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013905', 1, 1, 1, 0, 1, 39, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013906', 1, 1, 1, 0, 1, 39, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013907', 1, 1, 1, 0, 1, 39, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013908', 1, 1, 1, 0, 1, 39, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013909', 1, 1, 1, 0, 1, 39, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013910', 1, 1, 1, 0, 1, 39, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013911', 1, 1, 1, 0, 1, 39, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('013912', 1, 1, 1, 0, 1, 39, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014001', 1, 1, 1, 0, 1, 40, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014002', 1, 1, 1, 0, 1, 40, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014003', 1, 1, 1, 0, 1, 40, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014004', 1, 1, 1, 0, 1, 40, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014005', 1, 1, 1, 0, 1, 40, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014006', 1, 1, 1, 0, 1, 40, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014007', 1, 1, 1, 0, 1, 40, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014008', 1, 1, 1, 0, 1, 40, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014009', 1, 1, 1, 0, 1, 40, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014010', 1, 1, 1, 0, 1, 40, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014011', 1, 1, 1, 0, 1, 40, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014012', 1, 1, 1, 0, 1, 40, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014101', 1, 1, 1, 0, 1, 41, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014102', 1, 1, 1, 0, 1, 41, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014103', 1, 1, 1, 0, 1, 41, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014104', 1, 1, 1, 0, 1, 41, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014105', 1, 1, 1, 0, 1, 41, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014106', 1, 1, 1, 0, 1, 41, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014107', 1, 1, 1, 0, 1, 41, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014108', 1, 1, 1, 0, 1, 41, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014109', 1, 1, 1, 0, 1, 41, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014110', 1, 1, 1, 0, 1, 41, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014111', 1, 1, 1, 0, 1, 41, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014112', 1, 1, 1, 0, 1, 41, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014201', 1, 1, 1, 0, 1, 42, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014202', 1, 1, 1, 0, 1, 42, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014203', 1, 1, 1, 0, 1, 42, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014204', 1, 1, 1, 0, 1, 42, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014205', 1, 1, 1, 0, 1, 42, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014206', 1, 1, 1, 0, 1, 42, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014207', 1, 1, 1, 0, 1, 42, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014208', 1, 1, 1, 0, 1, 42, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014209', 1, 1, 1, 0, 1, 42, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014210', 1, 1, 1, 0, 1, 42, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014211', 1, 1, 1, 0, 1, 42, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014212', 1, 1, 1, 0, 1, 42, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014301', 1, 1, 1, 0, 1, 43, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014302', 1, 1, 1, 0, 1, 43, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014303', 1, 1, 1, 0, 1, 43, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014304', 1, 1, 1, 0, 1, 43, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014305', 1, 1, 1, 0, 1, 43, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014306', 1, 1, 1, 0, 1, 43, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014307', 1, 1, 1, 0, 1, 43, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014308', 1, 1, 1, 0, 1, 43, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014309', 1, 1, 1, 0, 1, 43, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014310', 1, 1, 1, 0, 1, 43, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014311', 1, 1, 1, 0, 1, 43, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014312', 1, 1, 1, 0, 1, 43, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014401', 1, 1, 1, 0, 1, 44, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014402', 1, 1, 1, 0, 1, 44, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014403', 1, 1, 1, 0, 1, 44, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014404', 1, 1, 1, 0, 1, 44, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014405', 1, 1, 1, 0, 1, 44, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014406', 1, 1, 1, 0, 1, 44, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014407', 1, 1, 1, 0, 1, 44, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014408', 1, 1, 1, 0, 1, 44, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014409', 1, 1, 1, 0, 1, 44, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014410', 1, 1, 1, 0, 1, 44, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014411', 1, 1, 1, 0, 1, 44, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014412', 1, 1, 1, 0, 1, 44, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014501', 1, 1, 1, 0, 1, 45, 1, 1, 0, 1, 'XZBK0001'); +INSERT INTO `tbl_app_location` VALUES ('014502', 1, 1, 1, 0, 1, 45, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014503', 1, 1, 1, 0, 1, 45, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014504', 1, 1, 1, 0, 1, 45, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014505', 1, 1, 1, 0, 1, 45, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014506', 1, 1, 1, 0, 1, 45, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014507', 1, 1, 1, 0, 1, 45, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014508', 1, 1, 1, 0, 1, 45, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014509', 1, 1, 1, 0, 1, 45, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014510', 1, 1, 1, 0, 1, 45, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014511', 1, 1, 1, 0, 1, 45, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('014512', 1, 1, 1, 0, 1, 45, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020101', 1, 1, 1, 0, 2, 1, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020102', 1, 1, 1, 0, 2, 1, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020103', 1, 1, 1, 0, 2, 1, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020104', 1, 1, 1, 0, 2, 1, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020105', 1, 1, 1, 0, 2, 1, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020106', 1, 1, 1, 0, 2, 1, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020107', 1, 1, 1, 0, 2, 1, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020108', 1, 1, 1, 0, 2, 1, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020109', 1, 1, 1, 0, 2, 1, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020110', 1, 1, 1, 0, 2, 1, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020111', 1, 1, 1, 0, 2, 1, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020112', 1, 1, 1, 0, 2, 1, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020201', 1, 1, 1, 0, 2, 2, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020202', 1, 1, 1, 0, 2, 2, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020203', 1, 1, 1, 0, 2, 2, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020204', 1, 1, 1, 0, 2, 2, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020205', 1, 1, 1, 0, 2, 2, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020206', 1, 1, 1, 0, 2, 2, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020207', 1, 1, 1, 0, 2, 2, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020208', 1, 1, 1, 0, 2, 2, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020209', 1, 1, 1, 0, 2, 2, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020210', 1, 1, 1, 0, 2, 2, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020211', 1, 1, 1, 0, 2, 2, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020212', 1, 1, 1, 0, 2, 2, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020301', 1, 1, 1, 0, 2, 3, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020302', 1, 1, 1, 0, 2, 3, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020303', 1, 1, 1, 0, 2, 3, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020304', 1, 1, 1, 0, 2, 3, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020305', 1, 1, 1, 0, 2, 3, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020306', 1, 1, 1, 0, 2, 3, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020307', 1, 1, 1, 0, 2, 3, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020308', 1, 1, 1, 0, 2, 3, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020309', 1, 1, 1, 0, 2, 3, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020310', 1, 1, 1, 0, 2, 3, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020311', 1, 1, 1, 0, 2, 3, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020312', 1, 1, 1, 0, 2, 3, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020401', 1, 1, 1, 0, 2, 4, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020402', 1, 1, 1, 0, 2, 4, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020403', 1, 1, 1, 0, 2, 4, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020404', 1, 1, 1, 0, 2, 4, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020405', 1, 1, 1, 0, 2, 4, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020406', 1, 1, 1, 0, 2, 4, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020407', 1, 1, 1, 0, 2, 4, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020408', 1, 1, 1, 0, 2, 4, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020409', 1, 1, 1, 0, 2, 4, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020410', 1, 1, 1, 0, 2, 4, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020411', 1, 1, 1, 0, 2, 4, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020412', 1, 1, 1, 0, 2, 4, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020501', 1, 1, 1, 0, 2, 5, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020502', 1, 1, 1, 0, 2, 5, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020503', 1, 1, 1, 0, 2, 5, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020504', 1, 1, 1, 0, 2, 5, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020505', 1, 1, 1, 0, 2, 5, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020506', 1, 1, 1, 0, 2, 5, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020507', 1, 1, 1, 0, 2, 5, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020508', 1, 1, 1, 0, 2, 5, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020509', 1, 1, 1, 0, 2, 5, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020510', 1, 1, 1, 0, 2, 5, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020511', 1, 1, 1, 0, 2, 5, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020512', 1, 1, 1, 0, 2, 5, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020601', 1, 1, 1, 0, 2, 6, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020602', 1, 1, 1, 0, 2, 6, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020603', 1, 1, 1, 0, 2, 6, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020604', 1, 1, 1, 0, 2, 6, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020605', 1, 1, 1, 0, 2, 6, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020606', 1, 1, 1, 0, 2, 6, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020607', 1, 1, 1, 0, 2, 6, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020608', 1, 1, 1, 0, 2, 6, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020609', 1, 1, 1, 0, 2, 6, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020610', 1, 1, 1, 0, 2, 6, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020611', 1, 1, 1, 0, 2, 6, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020612', 1, 1, 1, 0, 2, 6, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020701', 1, 1, 1, 0, 2, 7, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020702', 1, 1, 1, 0, 2, 7, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020703', 1, 1, 1, 0, 2, 7, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020704', 1, 1, 1, 0, 2, 7, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020705', 1, 1, 1, 0, 2, 7, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020706', 1, 1, 1, 0, 2, 7, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020707', 1, 1, 1, 0, 2, 7, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020708', 1, 1, 1, 0, 2, 7, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020709', 1, 1, 1, 0, 2, 7, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020710', 1, 1, 1, 0, 2, 7, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020711', 1, 1, 1, 0, 2, 7, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020712', 1, 1, 1, 0, 2, 7, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020801', 1, 1, 1, 0, 2, 8, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020802', 1, 1, 1, 0, 2, 8, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020803', 1, 1, 1, 0, 2, 8, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020804', 1, 1, 1, 0, 2, 8, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020805', 1, 1, 1, 0, 2, 8, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020806', 1, 1, 1, 0, 2, 8, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020807', 1, 1, 1, 0, 2, 8, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020808', 1, 1, 1, 0, 2, 8, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020809', 1, 1, 1, 0, 2, 8, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020810', 1, 1, 1, 0, 2, 8, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020811', 1, 1, 1, 0, 2, 8, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020812', 1, 1, 1, 0, 2, 8, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020901', 1, 1, 1, 0, 2, 9, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020902', 1, 1, 1, 0, 2, 9, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020903', 1, 1, 1, 0, 2, 9, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020904', 1, 1, 1, 0, 2, 9, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020905', 1, 1, 1, 0, 2, 9, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020906', 1, 1, 1, 0, 2, 9, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020907', 1, 1, 1, 0, 2, 9, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020908', 1, 1, 1, 0, 2, 9, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020909', 1, 1, 1, 0, 2, 9, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020910', 1, 1, 1, 0, 2, 9, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020911', 1, 1, 1, 0, 2, 9, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('020912', 1, 1, 1, 0, 2, 9, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021001', 1, 1, 1, 0, 2, 10, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021002', 1, 1, 1, 0, 2, 10, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021003', 1, 1, 1, 0, 2, 10, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021004', 1, 1, 1, 0, 2, 10, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021005', 1, 1, 1, 0, 2, 10, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021006', 1, 1, 1, 0, 2, 10, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021007', 1, 1, 1, 0, 2, 10, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021008', 1, 1, 1, 0, 2, 10, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021009', 1, 1, 1, 0, 2, 10, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021010', 1, 1, 1, 0, 2, 10, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021011', 1, 1, 1, 0, 2, 10, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021012', 1, 1, 1, 0, 2, 10, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021101', 1, 1, 1, 0, 2, 11, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021102', 1, 1, 1, 0, 2, 11, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021103', 1, 1, 1, 0, 2, 11, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021104', 1, 1, 1, 0, 2, 11, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021105', 1, 1, 1, 0, 2, 11, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021106', 1, 1, 1, 0, 2, 11, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021107', 1, 1, 1, 0, 2, 11, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021108', 1, 1, 1, 0, 2, 11, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021109', 1, 1, 1, 0, 2, 11, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021110', 1, 1, 1, 0, 2, 11, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021111', 1, 1, 1, 0, 2, 11, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021112', 1, 1, 1, 0, 2, 11, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021201', 1, 1, 1, 0, 2, 12, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021202', 1, 1, 1, 0, 2, 12, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021203', 1, 1, 1, 0, 2, 12, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021204', 1, 1, 1, 0, 2, 12, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021205', 1, 1, 1, 0, 2, 12, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021206', 1, 1, 1, 0, 2, 12, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021207', 1, 1, 1, 0, 2, 12, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021208', 1, 1, 1, 0, 2, 12, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021209', 1, 1, 1, 0, 2, 12, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021210', 1, 1, 1, 0, 2, 12, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021211', 1, 1, 1, 0, 2, 12, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021212', 1, 1, 1, 0, 2, 12, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021301', 1, 1, 1, 0, 2, 13, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021302', 1, 1, 1, 0, 2, 13, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021303', 1, 1, 1, 0, 2, 13, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021304', 1, 1, 1, 0, 2, 13, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021305', 1, 1, 1, 0, 2, 13, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021306', 1, 1, 1, 0, 2, 13, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021307', 1, 1, 1, 0, 2, 13, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021308', 1, 1, 1, 0, 2, 13, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021309', 1, 1, 1, 0, 2, 13, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021310', 1, 1, 1, 0, 2, 13, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021311', 1, 1, 1, 0, 2, 13, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021312', 1, 1, 1, 0, 2, 13, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021401', 1, 1, 1, 0, 2, 14, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021402', 1, 1, 1, 0, 2, 14, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021403', 1, 1, 1, 0, 2, 14, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021404', 1, 1, 1, 0, 2, 14, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021405', 1, 1, 1, 0, 2, 14, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021406', 1, 1, 1, 0, 2, 14, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021407', 1, 1, 1, 0, 2, 14, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021408', 1, 1, 1, 0, 2, 14, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021409', 1, 1, 1, 0, 2, 14, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021410', 1, 1, 1, 0, 2, 14, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021411', 1, 1, 1, 0, 2, 14, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021412', 1, 1, 1, 0, 2, 14, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021501', 1, 1, 1, 0, 2, 15, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021502', 1, 1, 1, 0, 2, 15, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021503', 1, 1, 1, 0, 2, 15, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021504', 1, 1, 1, 0, 2, 15, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021505', 1, 1, 1, 0, 2, 15, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021506', 1, 1, 1, 0, 2, 15, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021507', 1, 1, 1, 0, 2, 15, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021508', 1, 1, 1, 0, 2, 15, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021509', 1, 1, 1, 0, 2, 15, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021510', 1, 1, 1, 0, 2, 15, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021511', 1, 1, 1, 0, 2, 15, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021512', 1, 1, 1, 0, 2, 15, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021601', 1, 1, 1, 0, 2, 16, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021602', 1, 1, 1, 0, 2, 16, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021603', 1, 1, 1, 0, 2, 16, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021604', 1, 1, 1, 0, 2, 16, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021605', 1, 1, 1, 0, 2, 16, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021606', 1, 1, 1, 0, 2, 16, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021607', 1, 1, 1, 0, 2, 16, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021608', 1, 1, 1, 0, 2, 16, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021609', 1, 1, 1, 0, 2, 16, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021610', 1, 1, 1, 0, 2, 16, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021611', 1, 1, 1, 0, 2, 16, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021612', 1, 1, 1, 0, 2, 16, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021701', 1, 1, 1, 0, 2, 17, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021702', 1, 1, 1, 0, 2, 17, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021703', 1, 1, 1, 0, 2, 17, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021704', 1, 1, 1, 0, 2, 17, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021705', 1, 1, 1, 0, 2, 17, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021706', 1, 1, 1, 0, 2, 17, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021707', 1, 1, 1, 0, 2, 17, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021708', 1, 1, 1, 0, 2, 17, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021709', 1, 1, 1, 0, 2, 17, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021710', 1, 1, 1, 0, 2, 17, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021711', 1, 1, 1, 0, 2, 17, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021712', 1, 1, 1, 0, 2, 17, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021801', 1, 1, 1, 0, 2, 18, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021802', 1, 1, 1, 0, 2, 18, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021803', 1, 1, 1, 0, 2, 18, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021804', 1, 1, 1, 0, 2, 18, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021805', 1, 1, 1, 0, 2, 18, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021806', 1, 1, 1, 0, 2, 18, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021807', 1, 1, 1, 0, 2, 18, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021808', 1, 1, 1, 0, 2, 18, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021809', 1, 1, 1, 0, 2, 18, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021810', 1, 1, 1, 0, 2, 18, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021811', 1, 1, 1, 0, 2, 18, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021812', 1, 1, 1, 0, 2, 18, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021901', 1, 1, 1, 0, 2, 19, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021902', 1, 1, 1, 0, 2, 19, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021903', 1, 1, 1, 0, 2, 19, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021904', 1, 1, 1, 0, 2, 19, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021905', 1, 1, 1, 0, 2, 19, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021906', 1, 1, 1, 0, 2, 19, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021907', 1, 1, 1, 0, 2, 19, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021908', 1, 1, 1, 0, 2, 19, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021909', 1, 1, 1, 0, 2, 19, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021910', 1, 1, 1, 0, 2, 19, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021911', 1, 1, 1, 0, 2, 19, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('021912', 1, 1, 1, 0, 2, 19, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022001', 1, 1, 1, 0, 2, 20, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022002', 1, 1, 1, 0, 2, 20, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022003', 1, 1, 1, 0, 2, 20, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022004', 1, 1, 1, 0, 2, 20, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022005', 1, 1, 1, 0, 2, 20, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022006', 1, 1, 1, 0, 2, 20, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022007', 1, 1, 1, 0, 2, 20, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022008', 1, 1, 1, 0, 2, 20, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022009', 1, 1, 1, 0, 2, 20, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022010', 1, 1, 1, 0, 2, 20, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022011', 1, 1, 1, 0, 2, 20, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022012', 1, 1, 1, 0, 2, 20, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022101', 1, 1, 1, 0, 2, 21, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022102', 1, 1, 1, 0, 2, 21, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022103', 1, 1, 1, 0, 2, 21, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022104', 1, 1, 1, 0, 2, 21, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022105', 1, 1, 1, 0, 2, 21, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022106', 1, 1, 1, 0, 2, 21, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022107', 1, 1, 1, 0, 2, 21, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022108', 1, 1, 1, 0, 2, 21, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022109', 1, 1, 1, 0, 2, 21, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022110', 1, 1, 1, 0, 2, 21, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022111', 1, 1, 1, 0, 2, 21, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022112', 1, 1, 1, 0, 2, 21, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022201', 1, 1, 1, 0, 2, 22, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022202', 1, 1, 1, 0, 2, 22, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022203', 1, 1, 1, 0, 2, 22, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022204', 1, 1, 1, 0, 2, 22, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022205', 1, 1, 1, 0, 2, 22, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022206', 1, 1, 1, 0, 2, 22, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022207', 1, 1, 1, 0, 2, 22, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022208', 1, 1, 1, 0, 2, 22, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022209', 1, 1, 1, 0, 2, 22, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022210', 1, 1, 1, 0, 2, 22, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022211', 1, 1, 1, 0, 2, 22, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022212', 1, 1, 1, 0, 2, 22, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022301', 1, 1, 1, 0, 2, 23, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022302', 1, 1, 1, 0, 2, 23, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022303', 1, 1, 1, 0, 2, 23, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022304', 1, 1, 1, 0, 2, 23, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022305', 1, 1, 1, 0, 2, 23, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022306', 1, 1, 1, 0, 2, 23, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022307', 1, 1, 1, 0, 2, 23, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022308', 1, 1, 1, 0, 2, 23, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022309', 1, 1, 1, 0, 2, 23, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022310', 1, 1, 1, 0, 2, 23, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022311', 1, 1, 1, 0, 2, 23, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022312', 1, 1, 1, 0, 2, 23, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022401', 1, 1, 1, 0, 2, 24, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022402', 1, 1, 1, 0, 2, 24, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022403', 1, 1, 1, 0, 2, 24, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022404', 1, 1, 1, 0, 2, 24, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022405', 1, 1, 1, 0, 2, 24, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022406', 1, 1, 1, 0, 2, 24, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022407', 1, 1, 1, 0, 2, 24, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022408', 1, 1, 1, 0, 2, 24, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022409', 1, 1, 1, 0, 2, 24, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022410', 1, 1, 1, 0, 2, 24, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022411', 1, 1, 1, 0, 2, 24, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022412', 1, 1, 1, 0, 2, 24, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022501', 1, 1, 1, 0, 2, 25, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022502', 1, 1, 1, 0, 2, 25, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022503', 1, 1, 1, 0, 2, 25, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022504', 1, 1, 1, 0, 2, 25, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022505', 1, 1, 1, 0, 2, 25, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022506', 1, 1, 1, 0, 2, 25, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022507', 1, 1, 1, 0, 2, 25, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022508', 1, 1, 1, 0, 2, 25, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022509', 1, 1, 1, 0, 2, 25, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022510', 1, 1, 1, 0, 2, 25, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022511', 1, 1, 1, 0, 2, 25, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022512', 1, 1, 1, 0, 2, 25, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022601', 1, 1, 1, 0, 2, 26, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022602', 1, 1, 1, 0, 2, 26, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022603', 1, 1, 1, 0, 2, 26, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022604', 1, 1, 1, 0, 2, 26, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022605', 1, 1, 1, 0, 2, 26, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022606', 1, 1, 1, 0, 2, 26, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022607', 1, 1, 1, 0, 2, 26, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022608', 1, 1, 1, 0, 2, 26, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022609', 1, 1, 1, 0, 2, 26, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022610', 1, 1, 1, 0, 2, 26, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022611', 1, 1, 1, 0, 2, 26, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022612', 1, 1, 1, 0, 2, 26, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022701', 1, 1, 1, 0, 2, 27, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022702', 1, 1, 1, 0, 2, 27, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022703', 1, 1, 1, 0, 2, 27, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022704', 1, 1, 1, 0, 2, 27, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022705', 1, 1, 1, 0, 2, 27, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022706', 1, 1, 1, 0, 2, 27, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022707', 1, 1, 1, 0, 2, 27, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022708', 1, 1, 1, 0, 2, 27, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022709', 1, 1, 1, 0, 2, 27, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022710', 1, 1, 1, 0, 2, 27, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022711', 1, 1, 1, 0, 2, 27, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022712', 1, 1, 1, 0, 2, 27, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022801', 1, 1, 1, 0, 2, 28, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022802', 1, 1, 1, 0, 2, 28, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022803', 1, 1, 1, 0, 2, 28, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022804', 1, 1, 1, 0, 2, 28, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022805', 1, 1, 1, 0, 2, 28, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022806', 1, 1, 1, 0, 2, 28, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022807', 1, 1, 1, 0, 2, 28, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022808', 1, 1, 1, 0, 2, 28, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022809', 1, 1, 1, 0, 2, 28, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022810', 1, 1, 1, 0, 2, 28, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022811', 1, 1, 1, 0, 2, 28, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022812', 1, 1, 1, 0, 2, 28, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022901', 1, 1, 1, 0, 2, 29, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022902', 1, 1, 1, 0, 2, 29, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022903', 1, 1, 1, 0, 2, 29, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022904', 1, 1, 1, 0, 2, 29, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022905', 1, 1, 1, 0, 2, 29, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022906', 1, 1, 1, 0, 2, 29, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022907', 1, 1, 1, 0, 2, 29, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022908', 1, 1, 1, 0, 2, 29, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022909', 1, 1, 1, 0, 2, 29, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022910', 1, 1, 1, 0, 2, 29, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022911', 1, 1, 1, 0, 2, 29, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('022912', 1, 1, 1, 0, 2, 29, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023001', 1, 1, 1, 0, 2, 30, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023002', 1, 1, 1, 0, 2, 30, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023003', 1, 1, 1, 0, 2, 30, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023004', 1, 1, 1, 0, 2, 30, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023005', 1, 1, 1, 0, 2, 30, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023006', 1, 1, 1, 0, 2, 30, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023007', 1, 1, 1, 0, 2, 30, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023008', 1, 1, 1, 0, 2, 30, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023009', 1, 1, 1, 0, 2, 30, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023010', 1, 1, 1, 0, 2, 30, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023011', 1, 1, 1, 0, 2, 30, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023012', 1, 1, 1, 0, 2, 30, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023101', 1, 1, 1, 0, 2, 31, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023102', 1, 1, 1, 0, 2, 31, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023103', 1, 1, 1, 0, 2, 31, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023104', 1, 1, 1, 0, 2, 31, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023105', 1, 1, 1, 0, 2, 31, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023106', 1, 1, 1, 0, 2, 31, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023107', 1, 1, 1, 0, 2, 31, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023108', 1, 1, 1, 0, 2, 31, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023109', 1, 1, 1, 0, 2, 31, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023110', 1, 1, 1, 0, 2, 31, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023111', 1, 1, 1, 0, 2, 31, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023112', 1, 1, 1, 0, 2, 31, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023201', 1, 1, 1, 0, 2, 32, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023202', 1, 1, 1, 0, 2, 32, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023203', 1, 1, 1, 0, 2, 32, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023204', 1, 1, 1, 0, 2, 32, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023205', 1, 1, 1, 0, 2, 32, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023206', 1, 1, 1, 0, 2, 32, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023207', 1, 1, 1, 0, 2, 32, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023208', 1, 1, 1, 0, 2, 32, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023209', 1, 1, 1, 0, 2, 32, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023210', 1, 1, 1, 0, 2, 32, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023211', 1, 1, 1, 0, 2, 32, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023212', 1, 1, 1, 0, 2, 32, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023301', 1, 1, 1, 0, 2, 33, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023302', 1, 1, 1, 0, 2, 33, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023303', 1, 1, 1, 0, 2, 33, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023304', 1, 1, 1, 0, 2, 33, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023305', 1, 1, 1, 0, 2, 33, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023306', 1, 1, 1, 0, 2, 33, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023307', 1, 1, 1, 0, 2, 33, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023308', 1, 1, 1, 0, 2, 33, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023309', 1, 1, 1, 0, 2, 33, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023310', 1, 1, 1, 0, 2, 33, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023311', 1, 1, 1, 0, 2, 33, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023312', 1, 1, 1, 0, 2, 33, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023401', 1, 1, 1, 0, 2, 34, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023402', 1, 1, 1, 0, 2, 34, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023403', 1, 1, 1, 0, 2, 34, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023404', 1, 1, 1, 0, 2, 34, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023405', 1, 1, 1, 0, 2, 34, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023406', 1, 1, 1, 0, 2, 34, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023407', 1, 1, 1, 0, 2, 34, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023408', 1, 1, 1, 0, 2, 34, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023409', 1, 1, 1, 0, 2, 34, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023410', 1, 1, 1, 0, 2, 34, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023411', 1, 1, 1, 0, 2, 34, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023412', 1, 1, 1, 0, 2, 34, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023501', 1, 1, 1, 0, 2, 35, 1, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023502', 1, 1, 1, 0, 2, 35, 2, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023503', 1, 1, 1, 0, 2, 35, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023504', 1, 1, 1, 0, 2, 35, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023505', 1, 1, 1, 0, 2, 35, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023506', 1, 1, 1, 0, 2, 35, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023507', 1, 1, 1, 0, 2, 35, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023508', 1, 1, 1, 0, 2, 35, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023509', 1, 1, 1, 0, 2, 35, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023510', 1, 1, 1, 0, 2, 35, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023511', 1, 1, 1, 0, 2, 35, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023512', 1, 1, 1, 0, 2, 35, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023601', 1, 1, 1, 0, 2, 36, 1, 1, 0, 1, 'XZBK0014'); +INSERT INTO `tbl_app_location` VALUES ('023602', 1, 1, 1, 0, 2, 36, 2, 1, 0, 1, 'XZBK0013'); +INSERT INTO `tbl_app_location` VALUES ('023603', 1, 1, 1, 0, 2, 36, 3, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023604', 1, 1, 1, 0, 2, 36, 4, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023605', 1, 1, 1, 0, 2, 36, 5, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023606', 1, 1, 1, 0, 2, 36, 6, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023607', 1, 1, 1, 0, 2, 36, 7, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023608', 1, 1, 1, 0, 2, 36, 8, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023609', 1, 1, 1, 0, 2, 36, 9, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023610', 1, 1, 1, 0, 2, 36, 10, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023611', 1, 1, 1, 0, 2, 36, 11, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023612', 1, 1, 1, 0, 2, 36, 12, 1, 0, 0, NULL); +INSERT INTO `tbl_app_location` VALUES ('023701', 1, 1, 1, 0, 2, 37, 1, 1, 0, 1, 'XZBK0010'); +INSERT INTO `tbl_app_location` VALUES ('023702', 1, 1, 1, 0, 2, 37, 2, 1, 0, 1, 'XZBK0009'); +INSERT INTO `tbl_app_location` VALUES ('023703', 1, 1, 1, 0, 2, 37, 3, 1, 0, 1, 'XZBK0008'); +INSERT INTO `tbl_app_location` VALUES ('023704', 1, 1, 1, 0, 2, 37, 4, 1, 0, 1, 'XZBK0007'); +INSERT INTO `tbl_app_location` VALUES ('023705', 1, 1, 1, 0, 2, 37, 5, 1, 0, 1, 'XZBK0006'); +INSERT INTO `tbl_app_location` VALUES ('023706', 1, 1, 1, 0, 2, 37, 6, 1, 0, 1, 'XZBK0005'); +INSERT INTO `tbl_app_location` VALUES ('023707', 1, 1, 1, 0, 2, 37, 7, 1, 0, 1, 'XZBK0020'); +INSERT INTO `tbl_app_location` VALUES ('023708', 1, 1, 1, 0, 2, 37, 8, 1, 0, 1, 'XZBK0019'); +INSERT INTO `tbl_app_location` VALUES ('023709', 1, 1, 1, 0, 2, 37, 9, 1, 0, 1, 'XZBK0018'); +INSERT INTO `tbl_app_location` VALUES ('023710', 1, 1, 1, 0, 2, 37, 10, 1, 0, 1, 'XZBK0017'); +INSERT INTO `tbl_app_location` VALUES ('023711', 1, 1, 1, 0, 2, 37, 11, 1, 0, 1, 'XZBK0016'); +INSERT INTO `tbl_app_location` VALUES ('023712', 1, 1, 1, 0, 2, 37, 12, 1, 0, 1, 'XZBK0015'); +INSERT INTO `tbl_app_location` VALUES ('023801', 1, 1, 1, 0, 2, 38, 1, 1, 0, 1, 'XZBK0022'); +INSERT INTO `tbl_app_location` VALUES ('023802', 1, 1, 1, 0, 2, 38, 2, 1, 0, 1, 'XZBK0021'); +INSERT INTO `tbl_app_location` VALUES ('023803', 1, 1, 1, 0, 2, 38, 3, 1, 0, 1, 'XZBK0036'); +INSERT INTO `tbl_app_location` VALUES ('023804', 1, 1, 1, 0, 2, 38, 4, 1, 0, 1, 'XZBK0035'); +INSERT INTO `tbl_app_location` VALUES ('023805', 1, 1, 1, 0, 2, 38, 5, 1, 0, 1, 'XZBK0034'); +INSERT INTO `tbl_app_location` VALUES ('023806', 1, 1, 1, 0, 2, 38, 6, 1, 0, 1, 'XZBK0033'); +INSERT INTO `tbl_app_location` VALUES ('023807', 1, 1, 1, 0, 2, 38, 7, 1, 0, 1, 'XZBK0032'); +INSERT INTO `tbl_app_location` VALUES ('023808', 1, 1, 1, 0, 2, 38, 8, 1, 0, 1, 'XZBK0031'); +INSERT INTO `tbl_app_location` VALUES ('023809', 1, 1, 1, 0, 2, 38, 9, 1, 0, 1, 'XZBK0030'); +INSERT INTO `tbl_app_location` VALUES ('023810', 1, 1, 1, 0, 2, 38, 10, 1, 0, 1, 'XZBK0029'); +INSERT INTO `tbl_app_location` VALUES ('023811', 1, 1, 1, 0, 2, 38, 11, 1, 0, 1, 'XZBK0012'); +INSERT INTO `tbl_app_location` VALUES ('023812', 1, 1, 1, 0, 2, 38, 12, 1, 0, 1, 'XZBK0011'); +INSERT INTO `tbl_app_location` VALUES ('023901', 1, 1, 1, 0, 2, 39, 1, 1, 0, 1, 'XZBK0050'); +INSERT INTO `tbl_app_location` VALUES ('023902', 1, 1, 1, 0, 2, 39, 2, 1, 0, 1, 'XZBK0049'); +INSERT INTO `tbl_app_location` VALUES ('023903', 1, 1, 1, 0, 2, 39, 3, 1, 0, 1, 'XZBK0048'); +INSERT INTO `tbl_app_location` VALUES ('023904', 1, 1, 1, 0, 2, 39, 4, 1, 0, 1, 'XZBK0047'); +INSERT INTO `tbl_app_location` VALUES ('023905', 1, 1, 1, 0, 2, 39, 5, 1, 0, 1, 'XZBK0046'); +INSERT INTO `tbl_app_location` VALUES ('023906', 1, 1, 1, 0, 2, 39, 6, 1, 0, 1, 'XZBK0045'); +INSERT INTO `tbl_app_location` VALUES ('023907', 1, 1, 1, 0, 2, 39, 7, 1, 0, 1, 'XZBK0028'); +INSERT INTO `tbl_app_location` VALUES ('023908', 1, 1, 1, 0, 2, 39, 8, 1, 0, 1, 'XZBK0027'); +INSERT INTO `tbl_app_location` VALUES ('023909', 1, 1, 1, 0, 2, 39, 9, 1, 0, 1, 'XZBK0026'); +INSERT INTO `tbl_app_location` VALUES ('023910', 1, 1, 1, 0, 2, 39, 10, 1, 0, 1, 'XZBK0025'); +INSERT INTO `tbl_app_location` VALUES ('023911', 1, 1, 1, 0, 2, 39, 11, 1, 0, 1, 'XZBK0024'); +INSERT INTO `tbl_app_location` VALUES ('023912', 1, 1, 1, 0, 2, 39, 12, 1, 0, 1, 'XZBK0023'); +INSERT INTO `tbl_app_location` VALUES ('024001', 1, 1, 1, 0, 2, 40, 1, 1, 0, 1, 'XZBK0061'); +INSERT INTO `tbl_app_location` VALUES ('024002', 1, 1, 1, 0, 2, 40, 2, 1, 0, 1, 'XZBK0739'); +INSERT INTO `tbl_app_location` VALUES ('024003', 1, 1, 1, 0, 2, 40, 3, 1, 0, 1, 'XZBK0044'); +INSERT INTO `tbl_app_location` VALUES ('024004', 1, 1, 1, 0, 2, 40, 4, 1, 0, 1, 'XZBK0043'); +INSERT INTO `tbl_app_location` VALUES ('024005', 1, 1, 1, 0, 2, 40, 5, 1, 0, 1, 'XZBK0042'); +INSERT INTO `tbl_app_location` VALUES ('024006', 1, 1, 1, 0, 2, 40, 6, 1, 0, 1, 'XZBK0041'); +INSERT INTO `tbl_app_location` VALUES ('024007', 1, 1, 1, 0, 2, 40, 7, 1, 0, 1, 'XZBK0040'); +INSERT INTO `tbl_app_location` VALUES ('024008', 1, 1, 1, 0, 2, 40, 8, 1, 0, 1, 'XZBK0039'); +INSERT INTO `tbl_app_location` VALUES ('024009', 1, 1, 1, 0, 2, 40, 9, 1, 0, 1, 'XZBK0038'); +INSERT INTO `tbl_app_location` VALUES ('024010', 1, 1, 1, 0, 2, 40, 10, 1, 0, 1, 'XZBK0037'); +INSERT INTO `tbl_app_location` VALUES ('024011', 1, 1, 1, 0, 2, 40, 11, 1, 0, 1, 'XZBK0052'); +INSERT INTO `tbl_app_location` VALUES ('024012', 1, 1, 1, 0, 2, 40, 12, 1, 0, 1, 'XZBK0051'); +INSERT INTO `tbl_app_location` VALUES ('024101', 1, 1, 1, 0, 2, 41, 1, 1, 0, 1, 'XZBK0057'); +INSERT INTO `tbl_app_location` VALUES ('024102', 1, 1, 1, 0, 2, 41, 2, 1, 0, 1, 'XZBK0056'); +INSERT INTO `tbl_app_location` VALUES ('024103', 1, 1, 1, 0, 2, 41, 3, 1, 0, 1, 'XZBK0055'); +INSERT INTO `tbl_app_location` VALUES ('024104', 1, 1, 1, 0, 2, 41, 4, 1, 0, 1, 'XZBK0054'); +INSERT INTO `tbl_app_location` VALUES ('024105', 1, 1, 1, 0, 2, 41, 5, 1, 0, 1, 'XZBK0053'); +INSERT INTO `tbl_app_location` VALUES ('024106', 1, 1, 1, 0, 2, 41, 6, 1, 0, 1, 'XZBK0068'); +INSERT INTO `tbl_app_location` VALUES ('024107', 1, 1, 1, 0, 2, 41, 7, 1, 0, 1, 'XZBK0067'); +INSERT INTO `tbl_app_location` VALUES ('024108', 1, 1, 1, 0, 2, 41, 8, 1, 0, 1, 'XZBK0066'); +INSERT INTO `tbl_app_location` VALUES ('024109', 1, 1, 1, 0, 2, 41, 9, 1, 0, 1, 'XZBK0065'); +INSERT INTO `tbl_app_location` VALUES ('024110', 1, 1, 1, 0, 2, 41, 10, 1, 0, 1, 'XZBK0064'); +INSERT INTO `tbl_app_location` VALUES ('024111', 1, 1, 1, 0, 2, 41, 11, 1, 0, 1, 'XZBK0063'); +INSERT INTO `tbl_app_location` VALUES ('024112', 1, 1, 1, 0, 2, 41, 12, 1, 0, 1, 'XZBK0062'); +INSERT INTO `tbl_app_location` VALUES ('024201', 1, 1, 1, 0, 2, 42, 1, 1, 0, 1, 'XZBK0069'); +INSERT INTO `tbl_app_location` VALUES ('024202', 1, 1, 1, 0, 2, 42, 2, 1, 0, 1, 'XZBK0084'); +INSERT INTO `tbl_app_location` VALUES ('024203', 1, 1, 1, 0, 2, 42, 3, 1, 0, 1, 'XZBK0083'); +INSERT INTO `tbl_app_location` VALUES ('024204', 1, 1, 1, 0, 2, 42, 4, 1, 0, 1, 'XZBK0082'); +INSERT INTO `tbl_app_location` VALUES ('024205', 1, 1, 1, 0, 2, 42, 5, 1, 0, 1, 'XZBK0081'); +INSERT INTO `tbl_app_location` VALUES ('024206', 1, 1, 1, 0, 2, 42, 6, 1, 0, 1, 'XZBK0080'); +INSERT INTO `tbl_app_location` VALUES ('024207', 1, 1, 1, 0, 2, 42, 7, 1, 0, 1, 'XZBK0079'); +INSERT INTO `tbl_app_location` VALUES ('024208', 1, 1, 1, 0, 2, 42, 8, 1, 0, 1, 'XZBK0078'); +INSERT INTO `tbl_app_location` VALUES ('024209', 1, 1, 1, 0, 2, 42, 9, 1, 0, 1, 'XZBK0077'); +INSERT INTO `tbl_app_location` VALUES ('024210', 1, 1, 1, 0, 2, 42, 10, 1, 0, 1, 'XZBK0060'); +INSERT INTO `tbl_app_location` VALUES ('024211', 1, 1, 1, 0, 2, 42, 11, 1, 0, 1, 'XZBK0059'); +INSERT INTO `tbl_app_location` VALUES ('024212', 1, 1, 1, 0, 2, 42, 12, 1, 0, 1, 'XZBK0058'); +INSERT INTO `tbl_app_location` VALUES ('024301', 1, 1, 1, 0, 2, 43, 1, 1, 0, 1, 'XZBK0776'); +INSERT INTO `tbl_app_location` VALUES ('024302', 1, 1, 1, 0, 2, 43, 2, 1, 0, 1, 'XZBK0747'); +INSERT INTO `tbl_app_location` VALUES ('024303', 1, 1, 1, 0, 2, 43, 3, 1, 0, 1, 'XZBK0002'); +INSERT INTO `tbl_app_location` VALUES ('024304', 1, 1, 1, 0, 2, 43, 4, 1, 0, 1, 'XZBK0745'); +INSERT INTO `tbl_app_location` VALUES ('024305', 1, 1, 1, 0, 2, 43, 5, 1, 0, 1, 'XZBK0746'); +INSERT INTO `tbl_app_location` VALUES ('024306', 1, 1, 1, 0, 2, 43, 6, 1, 0, 1, 'XZBK0076'); +INSERT INTO `tbl_app_location` VALUES ('024307', 1, 1, 1, 0, 2, 43, 7, 1, 0, 1, 'XZBK0075'); +INSERT INTO `tbl_app_location` VALUES ('024308', 1, 1, 1, 0, 2, 43, 8, 1, 0, 1, 'XZBK0074'); +INSERT INTO `tbl_app_location` VALUES ('024309', 1, 1, 1, 0, 2, 43, 9, 1, 0, 1, 'XZBK0073'); +INSERT INTO `tbl_app_location` VALUES ('024310', 1, 1, 1, 0, 2, 43, 10, 1, 0, 1, 'XZBK0072'); +INSERT INTO `tbl_app_location` VALUES ('024311', 1, 1, 1, 0, 2, 43, 11, 1, 0, 1, 'XZBK0071'); +INSERT INTO `tbl_app_location` VALUES ('024312', 1, 1, 1, 0, 2, 43, 12, 1, 0, 1, 'XZBK0070'); +INSERT INTO `tbl_app_location` VALUES ('024401', 1, 1, 1, 0, 2, 44, 1, 1, 0, 1, 'XZBK0096'); +INSERT INTO `tbl_app_location` VALUES ('024402', 1, 1, 1, 0, 2, 44, 2, 1, 0, 1, 'XZBK0095'); +INSERT INTO `tbl_app_location` VALUES ('024403', 1, 1, 1, 0, 2, 44, 3, 1, 0, 1, 'XZBK0094'); +INSERT INTO `tbl_app_location` VALUES ('024404', 1, 1, 1, 0, 2, 44, 4, 1, 0, 1, 'XZBK0093'); +INSERT INTO `tbl_app_location` VALUES ('024405', 1, 1, 1, 0, 2, 44, 5, 1, 0, 1, 'XZBK0744'); +INSERT INTO `tbl_app_location` VALUES ('024406', 1, 1, 1, 0, 2, 44, 6, 1, 0, 1, 'XZBK0738'); +INSERT INTO `tbl_app_location` VALUES ('024407', 1, 1, 1, 0, 2, 44, 7, 1, 0, 1, 'XZBK0737'); +INSERT INTO `tbl_app_location` VALUES ('024408', 1, 1, 1, 0, 2, 44, 8, 1, 0, 1, 'XZBK0736'); +INSERT INTO `tbl_app_location` VALUES ('024409', 1, 1, 1, 0, 2, 44, 9, 1, 0, 1, 'XZBK0743'); +INSERT INTO `tbl_app_location` VALUES ('024410', 1, 1, 1, 0, 2, 44, 10, 1, 0, 1, 'XZBK0742'); +INSERT INTO `tbl_app_location` VALUES ('024411', 1, 1, 1, 0, 2, 44, 11, 1, 0, 1, 'XZBK0741'); +INSERT INTO `tbl_app_location` VALUES ('024412', 1, 1, 1, 0, 2, 44, 12, 1, 0, 1, 'XZBK0740'); +INSERT INTO `tbl_app_location` VALUES ('024501', 1, 1, 1, 0, 2, 45, 1, 1, 0, 1, 'XZBK0092'); +INSERT INTO `tbl_app_location` VALUES ('024502', 1, 1, 1, 0, 2, 45, 2, 1, 0, 1, 'XZBK0091'); +INSERT INTO `tbl_app_location` VALUES ('024503', 1, 1, 1, 0, 2, 45, 3, 1, 0, 1, 'XZBK0090'); +INSERT INTO `tbl_app_location` VALUES ('024504', 1, 1, 1, 0, 2, 45, 4, 1, 0, 1, 'XZBK0089'); +INSERT INTO `tbl_app_location` VALUES ('024505', 1, 1, 1, 0, 2, 45, 5, 1, 0, 1, 'XZBK0088'); +INSERT INTO `tbl_app_location` VALUES ('024506', 1, 1, 1, 0, 2, 45, 6, 1, 0, 1, 'XZBK0087'); +INSERT INTO `tbl_app_location` VALUES ('024507', 1, 1, 1, 0, 2, 45, 7, 1, 0, 1, 'XZBK0086'); +INSERT INTO `tbl_app_location` VALUES ('024508', 1, 1, 1, 0, 2, 45, 8, 1, 0, 1, 'XZBK0085'); +INSERT INTO `tbl_app_location` VALUES ('024509', 1, 1, 1, 0, 2, 45, 9, 1, 0, 1, 'XZBK0100'); +INSERT INTO `tbl_app_location` VALUES ('024510', 1, 1, 1, 0, 2, 45, 10, 1, 0, 1, 'XZBK0099'); +INSERT INTO `tbl_app_location` VALUES ('024511', 1, 1, 1, 0, 2, 45, 11, 1, 0, 1, 'XZBK0098'); +INSERT INTO `tbl_app_location` VALUES ('024512', 1, 1, 1, 0, 2, 45, 12, 1, 0, 1, 'XZBK0097'); + +-- ---------------------------- +-- Table structure for tbl_app_part_info +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_part_info`; +CREATE TABLE `tbl_app_part_info` ( + `Material` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '零件号', + `ItemDesc` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '描述', + `Category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '零件类型', + `CategoryRemark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '策略', + `Unload_Place` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '卸货点', + `Kitting_Point` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '配料点', + `Property` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '可用性', + `Vendor_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商代码', + `Data_Owner` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据负责人', + `Part_Weight` double NULL DEFAULT NULL COMMENT '重量', + `Storage_Location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位', + `Storage_Type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '存储类型', + `Storage_Bin` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'BIN位', + `Vendor_Name_EN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称-英文', + `Vendor_Country` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '进口/国产', + `UpdateDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新日期', + `SLED` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '有效期', + `Vendor_Name_CN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称-中文' +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_part_info +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_stand +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_stand`; +CREATE TABLE `tbl_app_stand` ( + `stand_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '站台', + `allow_in` int NULL DEFAULT NULL COMMENT '允许入库', + `allow_out` int NULL DEFAULT NULL COMMENT '允许出库', + `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '任务id', + `is_lock` int NULL DEFAULT NULL COMMENT '是否锁定/默认值0:未锁定', + `stand_status` int NULL DEFAULT NULL COMMENT '库存状态/默认值0:空闲', + `equipment_id` int NULL DEFAULT NULL, + `area_id` int NULL DEFAULT NULL, + `stand_type` int NULL DEFAULT NULL COMMENT '站台类型,1:基础入出库站台,2:拣选站台', + `stand_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '站台电脑的ip', + PRIMARY KEY (`stand_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_stand +-- ---------------------------- +INSERT INTO `tbl_app_stand` VALUES ('1', 0, 0, NULL, 0, 0, 1, 1, 3, NULL); +INSERT INTO `tbl_app_stand` VALUES ('101', 0, 1, NULL, 0, 0, 1, 1, 1, NULL); +INSERT INTO `tbl_app_stand` VALUES ('111', 1, 0, NULL, 0, 0, 1, 1, 1, NULL); +INSERT INTO `tbl_app_stand` VALUES ('2001', 0, 0, NULL, 0, 0, 0, 1, 2, '127.0.0.1'); + +-- ---------------------------- +-- Table structure for tbl_app_stock +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_stock`; +CREATE TABLE `tbl_app_stock` ( + `stock_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '库存编号', + `location_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '库位编号', + `vehicle_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '载具编号', + `goods_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料编码', + `goods_name` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料描述', + `batch_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号', + `available_num` int NULL DEFAULT NULL COMMENT '可用数量', + `real_num` int NULL DEFAULT NULL COMMENT '实际数量', + `provider_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商编号', + `provider_name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称', + `production_date` datetime NULL DEFAULT NULL COMMENT '生产日期', + `expiration_date` datetime NULL DEFAULT NULL COMMENT '过期日期', + `stock_status` int NULL DEFAULT NULL COMMENT '库存状态', + `goods_status` int NULL DEFAULT NULL COMMENT '物料状态', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `last_update_time` datetime NULL DEFAULT NULL COMMENT '最近更新时间', + `last_update_user` datetime NULL DEFAULT NULL COMMENT '最近更新用户', + `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '备注,预留字段', + `is_inventory` int NULL DEFAULT NULL COMMENT '是否盘点,默认为空。', + `inventory_task_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '盘点的任务单号', + `current_location` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '当前所在位置', + `remain_num` int NULL DEFAULT NULL COMMENT '剩余数量', + `shelf_life` double NULL DEFAULT NULL COMMENT '保质期--单位:年', + PRIMARY KEY (`stock_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_stock +-- ---------------------------- +INSERT INTO `tbl_app_stock` VALUES ('1', '010101', 'XZBK0001', '1', '1', '1', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `tbl_app_stock` VALUES ('2', '010102', 'XZBK0002', '1', '1', '1', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `tbl_app_stock` VALUES ('3', '010103', 'XZBK0003', '2', '2', '2', 2, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for tbl_app_task +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_task`; +CREATE TABLE `tbl_app_task` ( + `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务编号,主键,UUID', + `task_type` int NOT NULL COMMENT '任务类型(1:入库;2:出库;9:移库)', + `task_status` int NOT NULL COMMENT '任务状态', + `task_group` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务组', + `origin` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '起点', + `destination` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '终点', + `pick_stand` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '拣货站台', + `weight` double NULL DEFAULT NULL COMMENT '重量', + `vehicle_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '托盘号', + `vehicle_size` int NULL DEFAULT NULL COMMENT '尺寸', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `user_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作人员姓名', + `goods_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料编号', + `goods_name` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料名称', + `operate_num` int NULL DEFAULT NULL COMMENT '本次操作数量', + `total_num` int NULL DEFAULT NULL COMMENT '库存总数量', + `etag_location` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '电子标签位置', + `task_priority` int NULL DEFAULT NULL COMMENT '任务优先级:1普通9紧急', + `production_date` datetime NULL DEFAULT NULL COMMENT '入库日期/生产日期', + `expiration_date` datetime NULL DEFAULT NULL COMMENT '过期日期', + `kate_task_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '卡特任务的id', + `remark1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备用字段', + PRIMARY KEY (`task_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_task +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_task_bak +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_task_bak`; +CREATE TABLE `tbl_app_task_bak` ( + `task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务编号,主键,UUID', + `task_type` int NOT NULL COMMENT '任务类型(1:入库;2:出库;9:移库)', + `task_status` int NOT NULL COMMENT '任务状态', + `task_group` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务组', + `origin` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '起点', + `destination` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '终点', + `pick_stand` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '拣货站台', + `weight` double NULL DEFAULT NULL COMMENT '重量', + `vehicle_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '托盘号', + `vehicle_size` int NULL DEFAULT NULL COMMENT '尺寸', + `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间', + `user_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作人员姓名', + `goods_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料编号', + `goods_name` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物料名称', + `operate_num` int NULL DEFAULT NULL COMMENT '本次操作数量', + `total_num` int NULL DEFAULT NULL COMMENT '库存总数量', + `etag_location` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '电子标签位置', + `task_priority` int NULL DEFAULT NULL COMMENT '任务优先级:1普通9紧急', + `production_date` datetime NULL DEFAULT NULL COMMENT '入库日期/生产日期', + `expiration_date` datetime NULL DEFAULT NULL COMMENT '过期日期', + `kate_task_id` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '卡特任务的id', + `finish_time` datetime NULL DEFAULT NULL COMMENT '完成时间', + `remark1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备用字段', + PRIMARY KEY (`task_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_task_bak +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_app_vehicle +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_app_vehicle`; +CREATE TABLE `tbl_app_vehicle` ( + `vehicle_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '载具编号', + `vehicle_status` int NULL DEFAULT NULL COMMENT '载具状态', + `current_location` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '当前位置', + `is_empty` int NULL DEFAULT NULL COMMENT '是否空箱', + PRIMARY KEY (`vehicle_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_app_vehicle +-- ---------------------------- +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0001', 2, '014501', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0002', 2, '024303', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0005', 2, '023706', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0006', 2, '023705', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0007', 2, '023704', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0008', 2, '023703', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0009', 2, '023702', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0010', 2, '023701', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0011', 2, '023812', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0012', 2, '023811', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0013', 2, '023602', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0014', 2, '023601', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0015', 2, '023712', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0016', 2, '023711', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0017', 2, '023710', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0018', 2, '023709', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0019', 2, '023708', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0020', 2, '023707', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0021', 2, '023802', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0022', 2, '023801', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0023', 2, '023912', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0024', 2, '023911', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0025', 2, '023910', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0026', 2, '023909', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0027', 2, '023908', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0028', 2, '023907', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0029', 2, '023810', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0030', 2, '023809', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0031', 2, '023808', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0032', 2, '023807', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0033', 2, '023806', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0034', 2, '023805', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0035', 2, '023804', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0036', 2, '023803', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0037', 2, '024010', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0038', 2, '024009', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0039', 2, '024008', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0040', 2, '024007', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0041', 2, '024006', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0042', 2, '024005', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0043', 2, '024004', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0044', 2, '024003', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0045', 2, '023906', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0046', 2, '023905', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0047', 2, '023904', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0048', 2, '023903', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0049', 2, '023902', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0050', 2, '023901', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0051', 2, '024012', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0052', 2, '024011', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0053', 2, '024105', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0054', 2, '024104', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0055', 2, '024103', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0056', 2, '024102', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0057', 2, '024101', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0058', 2, '024212', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0059', 2, '024211', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0060', 2, '024210', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0061', 2, '024001', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0062', 2, '024112', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0063', 2, '024111', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0064', 2, '024110', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0065', 2, '024109', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0066', 2, '024108', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0067', 2, '024107', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0068', 2, '024106', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0069', 2, '024201', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0070', 2, '024312', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0071', 2, '024311', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0072', 2, '024310', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0073', 2, '024309', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0074', 2, '024308', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0075', 2, '024307', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0076', 2, '024306', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0077', 2, '024209', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0078', 2, '024208', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0079', 2, '024207', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0080', 2, '024206', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0081', 2, '024205', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0082', 2, '024204', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0083', 2, '024203', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0084', 2, '024202', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0085', 2, '024508', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0086', 2, '024507', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0087', 2, '024506', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0088', 2, '024505', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0089', 2, '024504', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0090', 2, '024503', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0091', 2, '024502', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0092', 2, '024501', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0093', 2, '024404', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0094', 2, '024403', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0095', 2, '024402', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0096', 2, '024401', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0097', 2, '024512', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0098', 2, '024511', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0099', 2, '024510', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0100', 2, '024509', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0736', 2, '024408', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0737', 2, '024407', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0738', 2, '024406', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0739', 2, '024002', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0740', 2, '024412', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0741', 2, '024411', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0742', 2, '024410', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0743', 2, '024409', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0744', 2, '024405', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0745', 2, '024304', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0746', 2, '024305', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0747', 2, '024302', 1); +INSERT INTO `tbl_app_vehicle` VALUES ('XZBK0776', 2, '024301', 1); + +-- ---------------------------- +-- Table structure for tbl_sys_config +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_config`; +CREATE TABLE `tbl_sys_config` ( + `config_id` int NOT NULL COMMENT '配置ID', + `config_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置键', + `config_value` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置值', + `config_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置类型:1.输入框2.下拉多选3.下拉单选', + `config_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置显示名称', + PRIMARY KEY (`config_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_config +-- ---------------------------- +INSERT INTO `tbl_sys_config` VALUES (1, 'MAX_EMPTY_VEHICLE_NUM', '4', '1', '空箱个数'); + +-- ---------------------------- +-- Table structure for tbl_sys_log +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_log`; +CREATE TABLE `tbl_sys_log` ( + `log_id` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '日志id', + `log_title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '日志标题', + `log_method` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求方法名', + `log_request` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求参数', + `log_response` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求响应结果', + `log_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求ip', + `log_time` datetime NULL DEFAULT NULL COMMENT '请求时间', + `log_user` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求用户', + PRIMARY KEY (`log_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_log +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_sys_menu +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_menu`; +CREATE TABLE `tbl_sys_menu` ( + `menu_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '菜单编号', + `label_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '菜单名称', + `icon_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图标名称', + `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '菜单地址', + `parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '父菜单编号', + PRIMARY KEY (`menu_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_menu +-- ---------------------------- +INSERT INTO `tbl_sys_menu` VALUES ('1', '操作', 'Operation', '', '0'); +INSERT INTO `tbl_sys_menu` VALUES ('11', '入库', NULL, '/goodsIn', '1'); +INSERT INTO `tbl_sys_menu` VALUES ('12', '出库', NULL, '/goodsOut', '1'); +INSERT INTO `tbl_sys_menu` VALUES ('13', '盘点', NULL, '/inventory', '1'); +INSERT INTO `tbl_sys_menu` VALUES ('2', '数据', 'Histogram', '', '0'); +INSERT INTO `tbl_sys_menu` VALUES ('21', '库存信息', NULL, '/stock', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('22', '物料信息', NULL, '/goods', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('23', '入库记录', NULL, '/inTaskRecord', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('24', '出库记录', NULL, '/outTaskRecord', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('241', '盘点记录', NULL, '/inventoryRecord', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('25', '任务监控', NULL, '/taskMonitor', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('26', '库位监控', NULL, '/location', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('27', '料箱监控', NULL, '/vehicle', '2'); +INSERT INTO `tbl_sys_menu` VALUES ('3', '系统', 'Setting', NULL, '0'); +INSERT INTO `tbl_sys_menu` VALUES ('31', '用户', NULL, '/user', '3'); +INSERT INTO `tbl_sys_menu` VALUES ('32', '角色', NULL, '/role', '3'); +INSERT INTO `tbl_sys_menu` VALUES ('33', '菜单', NULL, '/menu', '3'); +INSERT INTO `tbl_sys_menu` VALUES ('34', '库口设置', NULL, '/standSettings', '3'); +INSERT INTO `tbl_sys_menu` VALUES ('35', '系统配置', NULL, '/config', '3'); + +-- ---------------------------- +-- Table structure for tbl_sys_permission +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_permission`; +CREATE TABLE `tbl_sys_permission` ( + `permission_id` int NOT NULL AUTO_INCREMENT COMMENT '权限编号', + `menu_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '菜单编号', + `role_id` int NOT NULL COMMENT '角色编号', + PRIMARY KEY (`permission_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 53 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_permission +-- ---------------------------- +INSERT INTO `tbl_sys_permission` VALUES (1, '1', 1); +INSERT INTO `tbl_sys_permission` VALUES (2, '11', 1); +INSERT INTO `tbl_sys_permission` VALUES (3, '12', 1); +INSERT INTO `tbl_sys_permission` VALUES (4, '13', 1); +INSERT INTO `tbl_sys_permission` VALUES (5, '2', 1); +INSERT INTO `tbl_sys_permission` VALUES (6, '21', 1); +INSERT INTO `tbl_sys_permission` VALUES (7, '22', 1); +INSERT INTO `tbl_sys_permission` VALUES (8, '23', 1); +INSERT INTO `tbl_sys_permission` VALUES (9, '24', 1); +INSERT INTO `tbl_sys_permission` VALUES (10, '241', 1); +INSERT INTO `tbl_sys_permission` VALUES (11, '25', 1); +INSERT INTO `tbl_sys_permission` VALUES (12, '26', 1); +INSERT INTO `tbl_sys_permission` VALUES (13, '27', 1); +INSERT INTO `tbl_sys_permission` VALUES (14, '3', 1); +INSERT INTO `tbl_sys_permission` VALUES (15, '31', 1); +INSERT INTO `tbl_sys_permission` VALUES (16, '32', 1); +INSERT INTO `tbl_sys_permission` VALUES (17, '33', 1); +INSERT INTO `tbl_sys_permission` VALUES (18, '34', 1); +INSERT INTO `tbl_sys_permission` VALUES (19, '35', 1); + +-- ---------------------------- +-- Table structure for tbl_sys_role +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_role`; +CREATE TABLE `tbl_sys_role` ( + `role_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色编号', + `role_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '角色名称', + PRIMARY KEY (`role_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_role +-- ---------------------------- +INSERT INTO `tbl_sys_role` VALUES ('1', '管理员'); +INSERT INTO `tbl_sys_role` VALUES ('2', '普通用户'); + +-- ---------------------------- +-- Table structure for tbl_sys_settings +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_settings`; +CREATE TABLE `tbl_sys_settings` ( + `setting_id` int NOT NULL COMMENT '设置id', + `setting_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置键', + `setting_value` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置值', + `setting_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置类型:1.输入框2.下拉多选3.下拉单选', + `setting_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '配置显示名称', + PRIMARY KEY (`setting_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of tbl_sys_settings +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tbl_sys_user +-- ---------------------------- +DROP TABLE IF EXISTS `tbl_sys_user`; +CREATE TABLE `tbl_sys_user` ( + `user_id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID', + `user_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户名', + `role_id` int NULL DEFAULT NULL COMMENT '角色', + `login_account` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '登录账号', + `login_password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '登录密码', + `add_time` datetime NULL DEFAULT NULL, + `update_time` datetime NULL DEFAULT NULL, + `add_user` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '添加人', + PRIMARY KEY (`user_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of tbl_sys_user +-- ---------------------------- +INSERT INTO `tbl_sys_user` VALUES (1, '管理员', 1, 'admin', '812C0C84E2970FA98456DDC5B0B59594', '2023-03-23 11:17:06', '2023-03-23 11:17:10', '系统'); + +SET FOREIGN_KEY_CHECKS = 1;