Compare commits
No commits in common. 'main' and 'master' have entirely different histories.
@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="WMS" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/WMS/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_23" default="true" project-jdk-name="23" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/ck.iml" filepath="$PROJECT_DIR$/.idea/ck.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,8 @@
|
||||
## .gitignore
|
||||
|
||||
# .gitignore for maven
|
||||
target/
|
||||
|
||||
# IDE support file
|
||||
.idea
|
||||
WMS.iml
|
||||
@ -0,0 +1,316 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>WMS</name>
|
||||
<groupId>com.ken</groupId>
|
||||
<artifactId>WMS</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<!-- version of dependence -->
|
||||
<servlet.version>3.1.0</servlet.version>
|
||||
<junit.version>4.12</junit.version>
|
||||
<aopalliance.version>1.0</aopalliance.version>
|
||||
<aspectjweaver.version>1.8.0</aspectjweaver.version>
|
||||
<commons.fileuoload.version>1.3.1</commons.fileuoload.version>
|
||||
<commons.io.version>2.1</commons.io.version>
|
||||
<commons.beanutils.version>1.9.3</commons.beanutils.version>
|
||||
<commons.lang3.version>3.4</commons.lang3.version>
|
||||
<poi.version>3.15-beta2</poi.version>
|
||||
<mybatis.version>3.4.0</mybatis.version>
|
||||
<mybatisSpring.version>1.3.0</mybatisSpring.version>
|
||||
<pagehelper.version>4.1.6</pagehelper.version>
|
||||
<spring.version>4.3.0.RELEASE</spring.version>
|
||||
<shiro.version>1.4.0</shiro.version>
|
||||
<ehcache.version>2.10.2</ehcache.version>
|
||||
<mysqlconnector.version>8.0.28</mysqlconnector.version>
|
||||
<c3p0.version>0.9.5.5</c3p0.version>
|
||||
<log4j.version>1.2.17</log4j.version>
|
||||
<slf4j.version>1.7.21</slf4j.version>
|
||||
<jackson.version>2.7.0</jackson.version>
|
||||
|
||||
<!-- plugin config -->
|
||||
<plugin.tomcat.version>2.1</plugin.tomcat.version>
|
||||
<plugin.tomcat.port>8080</plugin.tomcat.port>
|
||||
<plugin.tomcat.path>/WMS</plugin.tomcat.path>
|
||||
<plugin.maven.varsion>3.3</plugin.maven.varsion>
|
||||
<plugin.maven.jdk>1.8</plugin.maven.jdk>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- Servlet dependency -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>${servlet.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Junit dependency -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>aopalliance</groupId>
|
||||
<artifactId>aopalliance</artifactId>
|
||||
<version>${aopalliance.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
<version>${aspectjweaver.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Apache commons -->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>${commons.fileuoload.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons.io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>${commons.beanutils.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.4</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Apache poi dependency -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-excelant</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-scratchpad</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- MyBatis dependency -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>${mybatis.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis-spring</artifactId>
|
||||
<version>${mybatisSpring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper</artifactId>
|
||||
<version>${pagehelper.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Spring FrameWork dependency -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-expression</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-orm</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- apache shiro -->
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-core</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-web</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-spring</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-ehcache</artifactId>
|
||||
<version>${shiro.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- ehcache -->
|
||||
<dependency>
|
||||
<groupId>net.sf.ehcache</groupId>
|
||||
<artifactId>ehcache</artifactId>
|
||||
<version>${ehcache.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- mysql-connector-java dependency -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysqlconnector.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- C3P0 dependency -->
|
||||
<dependency>
|
||||
<groupId>com.mchange</groupId>
|
||||
<artifactId>c3p0</artifactId>
|
||||
<version>${c3p0.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- log4j dependency -->
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- slf4j dependency -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- jackson dependency -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/java</directory>
|
||||
<includes>
|
||||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
<plugins>
|
||||
<!-- tomcat plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.tomcat.maven</groupId>
|
||||
<artifactId>tomcat7-maven-plugin</artifactId>
|
||||
<version>${plugin.tomcat.version}</version>
|
||||
<configuration>
|
||||
<port>${plugin.tomcat.port}</port>
|
||||
<path>${plugin.tomcat.path}</path>
|
||||
<uriEncoding>UTF-8</uriEncoding>
|
||||
<server>tomcat7</server>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- maven plugin -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${plugin.maven.varsion}</version>
|
||||
<configuration>
|
||||
<source>${plugin.maven.jdk}</source>
|
||||
<target>${plugin.maven.jdk}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@ -0,0 +1,224 @@
|
||||
create database wms_db
|
||||
DEFAULT CHARACTER SET utf8mb4
|
||||
DEFAULT COLLATE utf8mb4_general_ci;
|
||||
|
||||
use wms_db;
|
||||
|
||||
# 创建数据表
|
||||
|
||||
# 创建供应商信息表
|
||||
create table wms_supplier
|
||||
(
|
||||
SUPPLIER_ID int not null auto_increment,
|
||||
SUPPLIER_NAME varchar(30) not null,
|
||||
SUPPLIER_PERSON varchar(10) not null,
|
||||
SUPPLIER_TEL varchar(20) not null,
|
||||
SUPPLIER_EMAIL varchar(20) not null,
|
||||
SUPPLIER_ADDRESS varchar(30) not null,
|
||||
primary key(SUPPLIER_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 创建客户信息表
|
||||
create table wms_customer
|
||||
(
|
||||
CUSTOMER_ID int not null auto_increment,
|
||||
CUSTOMER_NAME varchar(30) not null,
|
||||
CUSTOMER_PERSON varchar(10) not null,
|
||||
CUSTOMER_TEL varchar(20) not null,
|
||||
CUSTOMER_EMAIL varchar(20) not null,
|
||||
CUSTOMER_ADDRESS varchar(30) not null,
|
||||
primary key(CUSTOMER_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 创建货物信息表
|
||||
create table wms_goods
|
||||
(
|
||||
GOOD_ID int not null auto_increment,
|
||||
GOOD_NAME varChar(30) not null,
|
||||
GOOD_RYPE varchar(20),
|
||||
GOOD_SIZE varchar(20),
|
||||
GOOD_VALUE double not null,
|
||||
primary key(GOOD_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 创建仓库信息表
|
||||
create table wms_respository
|
||||
(
|
||||
REPO_ID int not null auto_increment,
|
||||
REPO_ADDRESS varchar(30) not null,
|
||||
REPO_STATUS varchar(20) not null,
|
||||
REPO_AREA varchar(20) not null,
|
||||
REPO_DESC varchar(50),
|
||||
primary key(REPO_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 创建仓库管理员信息表
|
||||
create table wms_repo_admin
|
||||
(
|
||||
REPO_ADMIN_ID int not null auto_increment,
|
||||
REPO_ADMIN_NAME varchar(10) not null,
|
||||
REPO_ADMIN_SEX varchar(10) not null,
|
||||
REPO_ADMIN_TEL varchar(20) not null,
|
||||
REPO_ADMIN_ADDRESS varchar(30) not null,
|
||||
REPO_ADMIN_BIRTH datetime not null,
|
||||
REPO_ADMIN_REPOID int,
|
||||
primary key(REPO_ADMIN_ID),
|
||||
foreign key (REPO_ADMIN_REPOID) references wms_respository(REPO_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 创建入库记录表
|
||||
create table wms_record_in
|
||||
(
|
||||
RECORD_ID int not null auto_increment,
|
||||
RECORD_SUPPLIERID int not null,
|
||||
RECORD_GOODID int not null,
|
||||
RECORD_NUMBER int not null,
|
||||
RECORD_TIME datetime not null,
|
||||
RECORD_PERSON varchar(10) not null,
|
||||
RECORD_REPOSITORYID int not null,
|
||||
primary key(RECORD_ID),
|
||||
foreign key(RECORD_SUPPLIERID) references wms_supplier(SUPPLIER_ID),
|
||||
foreign key(RECORD_GOODID) references wms_goods(GOOD_ID),
|
||||
foreign key(RECORD_REPOSITORYID) references wms_respository(REPO_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 创建出库记录表
|
||||
create table wms_record_out
|
||||
(
|
||||
RECORD_ID int not null auto_increment,
|
||||
RECORD_CUSTOMERID int not null,
|
||||
RECORD_GOODID int not null,
|
||||
RECORD_NUMBER int not null,
|
||||
RECORD_TIME datetime not null,
|
||||
RECORD_PERSON varchar(10) not null,
|
||||
RECORD_REPOSITORYID int not null,
|
||||
primary key(RECORD_ID),
|
||||
foreign key(RECORD_CUSTOMERID) references wms_customer(CUSTOMER_ID),
|
||||
foreign key(RECORD_GOODID) references wms_goods(GOOD_ID),
|
||||
foreign key(RECORD_REPOSITORYID) references wms_respository(REPO_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 创建库存记录表
|
||||
create table wms_record_storage
|
||||
(
|
||||
RECORD_GOODID int not null auto_increment,
|
||||
RECORD_REPOSITORY int not null,
|
||||
RECORD_NUMBER int not null,
|
||||
primary key(RECORD_GOODID, RECORD_REPOSITORY),
|
||||
foreign key (RECORD_GOODID) references wms_goods(GOOD_ID),
|
||||
foreign key (RECORD_REPOSITORY) references wms_respository(REPO_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 创建系统用户信息表
|
||||
create table wms_user
|
||||
(
|
||||
USER_ID int not null auto_increment,
|
||||
USER_USERNAME varchar(30) not null,
|
||||
USER_PASSWORD varchar(40) not null,
|
||||
USER_FIRST_LOGIN int not null,
|
||||
primary key (USER_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 创建用户角色表
|
||||
create table wms_roles
|
||||
(
|
||||
ROLE_ID int not null auto_increment,
|
||||
ROLE_NAME varchar(20) not null,
|
||||
ROLE_DESC varchar(30),
|
||||
ROLE_URL_PREFIX varchar(20) not null,
|
||||
primary key(ROLE_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 创建URL权限表
|
||||
create table wms_action
|
||||
(
|
||||
ACTION_ID int not null auto_increment,
|
||||
ACTION_NAME varchar(30) not null,
|
||||
ACTION_DESC varchar(30),
|
||||
ACTION_PARAM varchar(50) not null,
|
||||
primary key(ACTION_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 用户 - 角色关联表
|
||||
create table wms_user_role
|
||||
(
|
||||
ROLE_ID int not null,
|
||||
USER_ID int not null,
|
||||
primary key(ROLE_ID,USER_ID),
|
||||
foreign key(ROLE_ID) references wms_roles(ROLE_ID),
|
||||
foreign key(USER_ID) references wms_user(USER_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 角色 - URL权限关联表
|
||||
create table wms_role_action
|
||||
(
|
||||
ACTION_ID int not null,
|
||||
ROLE_ID int not null,
|
||||
primary key(ACTION_ID,ROLE_ID),
|
||||
foreign key(ROLE_ID) references wms_roles(ROLE_ID),
|
||||
foreign key(ACTION_ID) references wms_action(ACTION_ID)
|
||||
)engine=innodb;
|
||||
|
||||
# 系统登入登出记录表
|
||||
create table wms_access_record
|
||||
(
|
||||
RECORD_ID int auto_increment primary key,
|
||||
USER_ID int not null,
|
||||
USER_NAME varchar(50) not null,
|
||||
ACCESS_TYPE varchar(30) not null,
|
||||
ACCESS_TIME datetime not null,
|
||||
ACCESS_IP varchar(45) not null
|
||||
);
|
||||
|
||||
# 用户系统操作记录表
|
||||
create table wms_operation_record
|
||||
(
|
||||
RECORD_ID int auto_increment primary key,
|
||||
USER_ID int not null,
|
||||
USER_NAME varchar(50) not null,
|
||||
OPERATION_NAME varchar(30) not null,
|
||||
OPERATION_TIME datetime not null,
|
||||
OPERATION_RESULT varchar(15) not null
|
||||
);
|
||||
|
||||
|
||||
# 导入数据
|
||||
|
||||
# 导入系统用户信息
|
||||
INSERT INTO `wms_user` VALUES (1001,'admin','6f5379e73c1a9eac6163ab8eaec7e41c',0),(1018,'王皓','50f202f4862360e55635b0a9616ded13',1),(1019,'李富荣','c4b3af5a5ab3e3d5aac4c5a5436201b8',1);
|
||||
|
||||
# 导入系统角色信息
|
||||
INSERT INTO `wms_roles` VALUES (1,'systemAdmin',NULL,'systemAdmin'),(2,'commonsAdmin',NULL,'commonsAdmin');
|
||||
|
||||
# 导入 系统用户 - 角色 信息
|
||||
INSERT INTO `wms_user_role` VALUES (1,1001),(2,1018),(2,1019);
|
||||
|
||||
# 导入URL权限信息
|
||||
INSERT INTO `wms_action` VALUES (1,'addSupplier',NULL,'/supplierManage/addSupplier'),(2,'deleteSupplier',NULL,'/supplierManage/deleteSupplier'),(3,'updateSupplier',NULL,'/supplierManage/updateSupplier'),(4,'selectSupplier',NULL,'/supplierManage/getSupplierList'),(5,'getSupplierInfo',NULL,'/supplierManage/getSupplierInfo'),(6,'importSupplier',NULL,'/supplierManage/importSupplier'),(7,'exportSupplier',NULL,'/supplierManage/exportSupplier'),(8,'selectCustomer',NULL,'/customerManage/getCustomerList'),(9,'addCustomer',NULL,'/customerManage/addCustomer'),(10,'getCustomerInfo',NULL,'/customerManage/getCustomerInfo'),(11,'updateCustomer',NULL,'/customerManage/updateCustomer'),(12,'deleteCustomer',NULL,'/customerManage/deleteCustomer'),(13,'importCustomer',NULL,'/customerManage/importCustomer'),(14,'exportCustomer',NULL,'/customerManage/exportCustomer'),(15,'selectGoods',NULL,'/goodsManage/getGoodsList'),(16,'addGoods',NULL,'/goodsManage/addGoods'),(17,'getGoodsInfo',NULL,'/goodsManage/getGoodsInfo'),(18,'updateGoods',NULL,'/goodsManage/updateGoods'),(19,'deleteGoods',NULL,'/goodsManage/deleteGoods'),(20,'importGoods',NULL,'/goodsManage/importGoods'),(21,'exportGoods',NULL,'/goodsManage/exportGoods'),(22,'selectRepository',NULL,'/repositoryManage/getRepositoryList'),(23,'addRepository',NULL,'/repositoryManage/addRepository'),(24,'getRepositoryInfo',NULL,'/repositoryManage/getRepository'),(25,'updateRepository',NULL,'/repositoryManage/updateRepository'),(26,'deleteRepository',NULL,'/repositoryManage/deleteRepository'),(27,'importRepository',NULL,'/repositoryManage/importRepository'),(28,'exportRepository',NULL,'/repositoryManage/exportRepository'),(29,'selectRepositoryAdmin',NULL,'/repositoryAdminManage/getRepositoryAdminList'),(30,'addRepositoryAdmin',NULL,'/repositoryAdminManage/addRepositoryAdmin'),(31,'getRepositoryAdminInfo',NULL,'/repositoryAdminManage/getRepositoryAdminInfo'),(32,'updateRepositoryAdmin',NULL,'/repositoryAdminManage/updateRepositoryAdmin'),(33,'deleteRepositoryAdmin',NULL,'/repositoryAdminManage/deleteRepositoryAdmin'),(34,'importRepositoryAd,om',NULL,'/repositoryAdminManage/importRepositoryAdmin'),(35,'exportRepository',NULL,'/repositoryAdminManage/exportRepositoryAdmin'),(36,'getUnassignRepository',NULL,'/repositoryManage/getUnassignRepository'),(37,'getStorageListWithRepository',NULL,'/storageManage/getStorageListWithRepository'),(38,'getStorageList',NULL,'/storageManage/getStorageList'),(39,'addStorageRecord',NULL,'/storageManage/addStorageRecord'),(40,'updateStorageRecord',NULL,'/storageManage/updateStorageRecord'),(41,'deleteStorageRecord',NULL,'/storageManage/deleteStorageRecord'),(42,'importStorageRecord',NULL,'/storageManage/importStorageRecord'),(43,'exportStorageRecord',NULL,'/storageManage/exportStorageRecord'),(44,' stockIn','货物进库操作','/stockRecordManage/stockIn'),(45,'stockOut','货物出库操作','/stockRecordManage/stockOut'),(46,'searchStockRecord','查询货物出入库记录','/stockRecordManage/searchStockRecord'),(47,'getAccessRecords','查询登入登出记录','/systemLog/getAccessRecords'),(48,'selectUserOperationRecords','查村用户操作记录','/systemLog/selectUserOperationRecords');
|
||||
|
||||
# 导入 角色 - URL权限 信息
|
||||
INSERT INTO `wms_role_action` VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1),(14,1),(15,1),(16,1),(17,1),(18,1),(19,1),(20,1),(21,1),(22,1),(23,1),(24,1),(25,1),(26,1),(27,1),(28,1),(29,1),(30,1),(31,1),(32,1),(33,1),(34,1),(35,1),(36,1),(37,1),(39,1),(40,1),(41,1),(42,1),(43,1),(44,1),(45,1),(46,1),(47,1),(48,1),(4,2),(8,2),(15,2),(38,2),(43,2),(44,2),(45,2);
|
||||
|
||||
# 导入供应商信息
|
||||
INSERT INTO `wms_supplier` VALUES (1013,'浙江奇同电器有限公司','王泽伟','13777771126','86827868@126.com','中国 浙江 温州市龙湾区 龙湾区永强大道1648号'),(1014,'醴陵春天陶瓷实业有限公司','温仙容','13974167256','23267999@126.com','中国 湖南 醴陵市 东正街15号'),(1015,'洛阳嘉吉利饮品有限公司','郑绮云','26391678','22390898@qq.com','中国 广东 佛山市顺德区 北滘镇怡和路2号怡和中心14楼');
|
||||
|
||||
# 导入客户信息
|
||||
INSERT INTO `wms_customer` VALUES (1214,'醴陵荣旗瓷业有限公司','陈娟','17716786888','23369888@136.com','中国 湖南 醴陵市 嘉树乡玉茶村柏树组'),(1215,'深圳市松林达电子有限公司','刘明','85263335-820','85264958@126.com','中国 广东 深圳市宝安区 深圳市宝安区福永社区桥头村桥塘路育'),(1216,'郑州绿之源饮品有限公司 ','赵志敬','87094196','87092165@qq.com','中国 河南 郑州市 郑州市嘉亿东方大厦609');
|
||||
|
||||
# 导入货物信息
|
||||
INSERT INTO `wms_goods` VALUES (103,'五孔插座西门子墙壁开关','电器','86*86',1.85),(104,'陶瓷马克杯','陶瓷','9*9*11',3.5),(105,'精酿苹果醋','饮料','312ml',300);
|
||||
|
||||
# 导入仓库信息
|
||||
INSERT INTO `wms_respository` VALUES (1003,'北京顺义南彩工业园区彩祥西路9号','可用','11000㎡','提供服务完整'),(1004,'广州白云石井石潭路大基围工业区','可用','1000㎡','物流极为便利'),(1005,' 香港北区文锦渡路(红桥新村)','可用','5000.00㎡',NULL);
|
||||
|
||||
# 导入仓库管理员信息
|
||||
INSERT INTO `wms_repo_admin` VALUES (1018,'王皓','女','12345874526','中国佛山','2016-12-09 00:00:00',1004),(1019,'李富荣','男','1234','广州','2016-12-07 00:00:00',1003);
|
||||
|
||||
# 导入入库记录
|
||||
INSERT INTO `wms_record_in` VALUES (15,1015,105,1000,'2016-12-31 00:00:00','admin',1004),(16,1015,105,200,'2017-01-02 00:00:00','admin',1004);
|
||||
|
||||
# 导入出库记录
|
||||
INSERT INTO `wms_record_out` VALUES (7,1214,104,750,'2016-12-31 00:00:00','admin',1003);
|
||||
|
||||
# 导入库存信息
|
||||
INSERT INTO `wms_record_storage` VALUES (103,1005,10000),(104,1003,1750),(105,1004,2000);
|
||||
@ -0,0 +1,43 @@
|
||||
package com.ken.wms.common.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
/**
|
||||
* 处理文件下载请求
|
||||
*
|
||||
* @author Ken
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/commons/fileSource")
|
||||
public class FileSourceHandler {
|
||||
|
||||
@RequestMapping(value = "download/{fileName:.+}", method = RequestMethod.GET)
|
||||
public void fileDownload(@PathVariable("fileName") String fileName, HttpServletRequest request,
|
||||
HttpServletResponse response) throws IOException {
|
||||
|
||||
if (fileName == null)
|
||||
return;
|
||||
|
||||
// 获取文件
|
||||
ServletContext context = request.getServletContext();
|
||||
String directory = context.getRealPath("/WEB-INF/download");
|
||||
Path file = Paths.get(directory, fileName);
|
||||
if (Files.exists(file)) {
|
||||
// 设置响应头
|
||||
response.addHeader("Content-Disposition", "attachment;filename=" + file.getFileName());
|
||||
Files.copy(file, response.getOutputStream());
|
||||
response.getOutputStream().flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.ken.wms.common.util;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 文件操作工具类
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/4/22.
|
||||
*/
|
||||
public class FileUtil {
|
||||
|
||||
/**
|
||||
* 将 org.springframework.web.multipart.MultipartFile 类型的文件转换为 java.io.File 类型的文件
|
||||
*
|
||||
* @param multipartFile org.springframework.web.multipart.MultipartFile 类型的文件
|
||||
* @return 返回转换后的 java.io.File 类型的文件
|
||||
* @throws IOException IOException
|
||||
*/
|
||||
public static File convertMultipartFileToFile(MultipartFile multipartFile) throws IOException {
|
||||
File convertedFile = new File(multipartFile.getOriginalFilename());
|
||||
multipartFile.transferTo(convertedFile);
|
||||
return convertedFile;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.ken.wms.common.util;
|
||||
|
||||
/**
|
||||
* Response 工厂类
|
||||
*
|
||||
* @author ken
|
||||
* @since 2017/1/18.
|
||||
*/
|
||||
public class ResponseFactory {
|
||||
|
||||
/**
|
||||
* 生成一个 Response 对象
|
||||
*
|
||||
* @return response 对象
|
||||
*/
|
||||
public static Response newInstance() {
|
||||
return new Response();
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.AccessRecordMapper">
|
||||
<resultMap id="accessRecordDO" type="com.ken.wms.domain.AccessRecordDO">
|
||||
<id column="RECORD_ID" property="id"/>
|
||||
<result column="USER_ID" property="userID"/>
|
||||
<result column="USER_NAME" property="userName"/>
|
||||
<result column="ACCESS_TYPE" property="accessType"/>
|
||||
<result column="ACCESS_TIME" property="accessTime"/>
|
||||
<result column="ACCESS_IP" property="accessIP"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertAccessRecord">
|
||||
insert into wms_access_record(USER_ID, USER_NAME, ACCESS_TYPE, ACCESS_TIME, ACCESS_IP)
|
||||
values(#{userID}, #{userName}, #{accessType}, #{accessTime}, #{accessIP})
|
||||
</insert>
|
||||
|
||||
<select id="selectAccessRecords" resultMap="accessRecordDO">
|
||||
select
|
||||
RECORD_ID,
|
||||
USER_ID,
|
||||
USER_NAME,
|
||||
ACCESS_TYPE,
|
||||
ACCESS_TIME,
|
||||
ACCESS_IP
|
||||
from
|
||||
wms_access_record
|
||||
<where>
|
||||
<if test="userID != -1">
|
||||
USER_ID = #{userID}
|
||||
</if>
|
||||
<if test="accessType != 'all'">
|
||||
and ACCESS_TYPE = #{accessType}
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
and ACCESS_TIME >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
<![CDATA[and ACCESS_TIME <= #{endDate}]]>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.CustomerMapper">
|
||||
|
||||
<resultMap type="com.ken.wms.domain.Customer" id="customer">
|
||||
<id property="id" column="CUSTOMER_ID"/>
|
||||
<result property="name" column="CUSTOMER_NAME"/>
|
||||
<result property="personInCharge" column="CUSTOMER_PERSON"/>
|
||||
<result property="tel" column="CUSTOMER_TEL"/>
|
||||
<result property="email" column="CUSTOMER_EMAIL"/>
|
||||
<result property="address" column="CUSTOMER_ADDRESS"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAll" resultMap="customer">
|
||||
select
|
||||
c.CUSTOMER_ID,
|
||||
c.CUSTOMER_NAME,
|
||||
c.CUSTOMER_PERSON,
|
||||
c.CUSTOMER_TEL,
|
||||
c.CUSTOMER_EMAIL,
|
||||
c.CUSTOMER_ADDRESS
|
||||
from
|
||||
wms_customer c
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultMap="customer">
|
||||
select
|
||||
c.CUSTOMER_ID,
|
||||
c.CUSTOMER_NAME,
|
||||
c.CUSTOMER_PERSON,
|
||||
c.CUSTOMER_TEL,
|
||||
c.CUSTOMER_EMAIL,
|
||||
c.CUSTOMER_ADDRESS
|
||||
from
|
||||
wms_customer c
|
||||
where
|
||||
c.CUSTOMER_ID = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByName" resultMap="customer">
|
||||
select
|
||||
c.CUSTOMER_ID,
|
||||
c.CUSTOMER_NAME,
|
||||
c.CUSTOMER_PERSON,
|
||||
c.CUSTOMER_TEL,
|
||||
c.CUSTOMER_EMAIL,
|
||||
c.CUSTOMER_ADDRESS
|
||||
from
|
||||
wms_customer c
|
||||
where
|
||||
c.CUSTOMER_NAME = #{customerName}
|
||||
</select>
|
||||
|
||||
<select id="selectApproximateByName" resultMap="customer">
|
||||
select
|
||||
c.CUSTOMER_ID,
|
||||
c.CUSTOMER_NAME,
|
||||
c.CUSTOMER_PERSON,
|
||||
c.CUSTOMER_TEL,
|
||||
c.CUSTOMER_EMAIL,
|
||||
c.CUSTOMER_ADDRESS
|
||||
from
|
||||
wms_customer c
|
||||
where
|
||||
c.CUSTOMER_NAME like concat(concat('%',#{customerName}),'%')
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into wms_customer(CUSTOMER_NAME,CUSTOMER_PERSON,CUSTOMER_TEL,CUSTOMER_EMAIL,CUSTOMER_ADDRESS)
|
||||
values (#{name},#{personInCharge},#{tel},#{email},#{address})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into wms_customer(CUSTOMER_NAME,CUSTOMER_PERSON,CUSTOMER_TEL,CUSTOMER_EMAIL,CUSTOMER_ADDRESS)
|
||||
values
|
||||
<foreach collection="list" item="customer" separator=",">
|
||||
(#{customer.name},#{customer.personInCharge},#{customer.tel},#{customer.email},#{customer.address})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update
|
||||
wms_customer
|
||||
set
|
||||
CUSTOMER_NAME = #{name},
|
||||
CUSTOMER_PERSON = #{personInCharge},
|
||||
CUSTOMER_TEL = #{tel},
|
||||
CUSTOMER_EMAIL = #{email},
|
||||
CUSTOMER_ADDRESS = #{address}
|
||||
where
|
||||
CUSTOMER_ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
delete from wms_customer
|
||||
where CUSTOMER_ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByName">
|
||||
delete from wms_customer
|
||||
where CUSTOMER_NAME = #{name}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.GoodsMapper">
|
||||
|
||||
<resultMap type="com.ken.wms.domain.Goods" id="goods">
|
||||
<id property="id" column="GOOD_ID"/>
|
||||
<result property="name" column="GOOD_NAME"/>
|
||||
<result property="type" column="GOOD_RYPE"/>
|
||||
<result property="size" column="GOOD_SIZE"/>
|
||||
<result property="value" column="GOOD_VALUE"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAll" resultMap="goods">
|
||||
select
|
||||
g.GOOD_ID,
|
||||
g.GOOD_NAME,
|
||||
g.GOOD_RYPE,
|
||||
g.GOOD_SIZE,
|
||||
g.GOOD_VALUE
|
||||
from
|
||||
wms_goods g
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultMap="goods">
|
||||
select
|
||||
g.GOOD_ID,
|
||||
g.GOOD_NAME,
|
||||
g.GOOD_RYPE,
|
||||
g.GOOD_SIZE,
|
||||
g.GOOD_VALUE
|
||||
from
|
||||
wms_goods g
|
||||
where
|
||||
g.GOOD_ID = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByName" resultMap="goods">
|
||||
select
|
||||
g.GOOD_ID,
|
||||
g.GOOD_NAME,
|
||||
g.GOOD_RYPE,
|
||||
g.GOOD_SIZE,
|
||||
g.GOOD_VALUE
|
||||
from
|
||||
wms_goods g
|
||||
where
|
||||
g.GOOD_NAME = #{goodsName}
|
||||
</select>
|
||||
|
||||
<select id="selectApproximateByName" resultMap="goods">
|
||||
select
|
||||
g.GOOD_ID,
|
||||
g.GOOD_NAME,
|
||||
g.GOOD_RYPE,
|
||||
g.GOOD_SIZE,
|
||||
g.GOOD_VALUE
|
||||
from
|
||||
wms_goods g
|
||||
where
|
||||
g.GOOD_NAME like concat(concat('%',#{goodsName}),'%')
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into wms_goods(GOOD_NAME,GOOD_RYPE,GOOD_SIZE,GOOD_VALUE)
|
||||
values (#{name},#{type},#{size},#{value})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into wms_goods(GOOD_NAME,GOOD_RYPE,GOOD_SIZE,GOOD_VALUE)
|
||||
values
|
||||
<foreach collection="list" item="goods" separator=",">
|
||||
(#{goods.name},#{goods.type},#{goods.size},#{goods.value})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update
|
||||
wms_goods
|
||||
set
|
||||
GOOD_NAME = #{name},
|
||||
GOOD_RYPE = #{type},
|
||||
GOOD_SIZE = #{size},
|
||||
GOOD_VALUE = #{value}
|
||||
where
|
||||
GOOD_ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
delete from wms_goods
|
||||
where GOOD_ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByName">
|
||||
delete from wms_goods
|
||||
where GOOD_NAME = #{goodsName}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,65 @@
|
||||
package com.ken.wms.dao;
|
||||
|
||||
import com.ken.wms.domain.RepositoryAdmin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* RepositoryAdmin 映射器
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public interface RepositoryAdminMapper {
|
||||
|
||||
/**
|
||||
* 选择指定 ID 的仓库管理员信息
|
||||
* @param id 仓库管理员ID
|
||||
* @return 返回指定 ID 的仓库管理员信息
|
||||
*/
|
||||
RepositoryAdmin selectByID(Integer id);
|
||||
|
||||
/**
|
||||
* 选择指定 name 的仓库管理员信息。
|
||||
* 支持模糊查找
|
||||
* @param name 仓库管理员名字
|
||||
* @return 返回若干条指定 name 的仓库管理员信息
|
||||
*/
|
||||
List<RepositoryAdmin> selectByName(String name);
|
||||
|
||||
/**
|
||||
* 选择所有的仓库管理员信息
|
||||
* @return 返回所有的仓库管理员信息
|
||||
*/
|
||||
List<RepositoryAdmin> selectAll();
|
||||
|
||||
/**
|
||||
* 选择已指派指定 repositoryID 的仓库管理员信息
|
||||
* @param repositoryID 指派的仓库ID
|
||||
* @return 返回已指派指定 repositoryID 的仓库管理员信息
|
||||
*/
|
||||
RepositoryAdmin selectByRepositoryID(Integer repositoryID);
|
||||
|
||||
/**
|
||||
* 插入一条仓库管理员信息
|
||||
* @param repositoryAdmin 仓库管理员信息
|
||||
*/
|
||||
void insert(RepositoryAdmin repositoryAdmin);
|
||||
|
||||
/**
|
||||
* 批量插入仓库管理员信息
|
||||
* @param repositoryAdmins 存放若干条仓库管理员信息的 List
|
||||
*/
|
||||
void insertBatch(List<RepositoryAdmin> repositoryAdmins);
|
||||
|
||||
/**
|
||||
* 更新仓库管理员信息
|
||||
* @param repositoryAdmin 仓库管理员信息
|
||||
*/
|
||||
void update(RepositoryAdmin repositoryAdmin);
|
||||
|
||||
/**
|
||||
* 删除指定 ID 的仓库管理员信息
|
||||
* @param id 仓库管理员 ID
|
||||
*/
|
||||
void deleteByID(Integer id);
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.RepositoryAdminMapper">
|
||||
|
||||
<resultMap type="com.ken.wms.domain.RepositoryAdmin" id="repositoryAdmin">
|
||||
<id property="id" column="REPO_ADMIN_ID"/>
|
||||
<result property="name" column="REPO_ADMIN_NAME"/>
|
||||
<result property="sex" column="REPO_ADMIN_SEX"/>
|
||||
<result property="tel" column="REPO_ADMIN_TEL"/>
|
||||
<result property="address" column="REPO_ADMIN_ADDRESS"/>
|
||||
<result property="birth" column="REPO_ADMIN_BIRTH"/>
|
||||
<result property="repositoryBelongID" column="REPO_ADMIN_REPOID"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAll" resultMap="repositoryAdmin">
|
||||
select
|
||||
REPO_ADMIN_ID,
|
||||
REPO_ADMIN_NAME,
|
||||
REPO_ADMIN_SEX,
|
||||
REPO_ADMIN_TEL,
|
||||
REPO_ADMIN_ADDRESS,
|
||||
REPO_ADMIN_BIRTH,
|
||||
REPO_ADMIN_REPOID
|
||||
from
|
||||
wms_repo_admin
|
||||
</select>
|
||||
|
||||
<select id="selectByID" resultMap="repositoryAdmin">
|
||||
select
|
||||
REPO_ADMIN_ID,
|
||||
REPO_ADMIN_NAME,
|
||||
REPO_ADMIN_SEX,
|
||||
REPO_ADMIN_TEL,
|
||||
REPO_ADMIN_ADDRESS,
|
||||
REPO_ADMIN_BIRTH,
|
||||
REPO_ADMIN_REPOID
|
||||
from
|
||||
wms_repo_admin
|
||||
where
|
||||
REPO_ADMIN_ID = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByName" resultMap="repositoryAdmin">
|
||||
select
|
||||
REPO_ADMIN_ID,
|
||||
REPO_ADMIN_NAME,
|
||||
REPO_ADMIN_SEX,
|
||||
REPO_ADMIN_TEL,
|
||||
REPO_ADMIN_ADDRESS,
|
||||
REPO_ADMIN_BIRTH,
|
||||
REPO_ADMIN_REPOID
|
||||
from
|
||||
wms_repo_admin
|
||||
where
|
||||
REPO_ADMIN_NAME like concat(concat("%",#{name}),"%")
|
||||
</select>
|
||||
|
||||
<select id="selectByRepositoryID" resultMap="repositoryAdmin">
|
||||
select
|
||||
REPO_ADMIN_ID,
|
||||
REPO_ADMIN_NAME,
|
||||
REPO_ADMIN_SEX,
|
||||
REPO_ADMIN_TEL,
|
||||
REPO_ADMIN_ADDRESS,
|
||||
REPO_ADMIN_BIRTH,
|
||||
REPO_ADMIN_REPOID
|
||||
from
|
||||
wms_repo_admin
|
||||
where
|
||||
REPO_ADMIN_REPOID = #{repositoryID}
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into wms_repo_admin(REPO_ADMIN_NAME,REPO_ADMIN_SEX,REPO_ADMIN_TEL,REPO_ADMIN_ADDRESS,REPO_ADMIN_BIRTH,REPO_ADMIN_REPOID)
|
||||
values(#{name},#{sex},#{tel},#{address},#{birth},#{repositoryBelongID})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into wms_repo_admin(REPO_ADMIN_NAME,REPO_ADMIN_SEX,REPO_ADMIN_TEL,REPO_ADMIN_ADDRESS,REPO_ADMIN_BIRTH,REPO_ADMIN_REPOID)
|
||||
values
|
||||
<foreach collection="list" item="repositoryAdmin" separator=",">
|
||||
(#{repositoryAdmin.name},#{repositoryAdmin.sex},#{repositoryAdmin.tel},#{repositoryAdmin.address},#{repositoryAdmin.birth},#{repositoryAdmin.repositoryBelongID})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update
|
||||
wms_repo_admin
|
||||
set
|
||||
REPO_ADMIN_NAME = #{name},
|
||||
REPO_ADMIN_SEX = #{sex},
|
||||
REPO_ADMIN_TEL = #{tel},
|
||||
REPO_ADMIN_ADDRESS = #{address},
|
||||
REPO_ADMIN_BIRTH = #{birth},
|
||||
REPO_ADMIN_REPOID = #{repositoryBelongID}
|
||||
where
|
||||
REPO_ADMIN_ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByID">
|
||||
delete from wms_repo_admin
|
||||
where REPO_ADMIN_ID = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,63 @@
|
||||
package com.ken.wms.dao;
|
||||
|
||||
import com.ken.wms.domain.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Repository 映射器
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public interface RepositoryMapper {
|
||||
|
||||
/**
|
||||
* 选择全部的 Repository 记录
|
||||
* @return 返回全部的 Repository
|
||||
*/
|
||||
List<Repository> selectAll();
|
||||
|
||||
/**
|
||||
* 选择全部的未分配的 repository 记录
|
||||
* @return 返回所有未分配的 Repository
|
||||
*/
|
||||
List<Repository> selectUnassign();
|
||||
|
||||
/**
|
||||
* 选择指定 Repository ID 的 Repository 记录
|
||||
* @param repositoryID 仓库ID
|
||||
* @return 返回指定的Repository
|
||||
*/
|
||||
Repository selectByID(Integer repositoryID);
|
||||
|
||||
/**
|
||||
* 选择指定 repository Address 的 repository 记录
|
||||
* @param address 仓库地址
|
||||
* @return 返回指定的Repository
|
||||
*/
|
||||
List<Repository> selectByAddress(String address);
|
||||
|
||||
/**
|
||||
* 插入一条新的 Repository 记录
|
||||
* @param repository 仓库信息
|
||||
*/
|
||||
void insert(Repository repository);
|
||||
|
||||
/**
|
||||
* 批量插入 Repository 记录
|
||||
* @param repositories 存有若干条记录的 List
|
||||
*/
|
||||
void insertbatch(List<Repository> repositories);
|
||||
|
||||
/**
|
||||
* 更新 Repository 记录
|
||||
* @param repository 仓库信息
|
||||
*/
|
||||
void update(Repository repository);
|
||||
|
||||
/**
|
||||
* 删除指定 Repository ID 的 Repository 记录
|
||||
* @param repositoryID 仓库ID
|
||||
*/
|
||||
void deleteByID(Integer repositoryID);
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.RepositoryMapper">
|
||||
|
||||
<resultMap type="com.ken.wms.domain.Repository" id="repository">
|
||||
<id property="id" column="REPO_ID"/>
|
||||
<result property="address" column="REPO_ADDRESS"/>
|
||||
<result property="status" column="REPO_STATUS"/>
|
||||
<result property="area" column="REPO_AREA"/>
|
||||
<result property="desc" column="REPO_DESC"/>
|
||||
<result property="adminName" column="REPO_ADMIN_NAME"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAll" resultMap="repository">
|
||||
select
|
||||
r.REPO_ID,
|
||||
r.REPO_ADDRESS,
|
||||
r.REPO_STATUS,
|
||||
r.REPO_AREA,
|
||||
r.REPO_DESC,
|
||||
ra.REPO_ADMIN_NAME
|
||||
from
|
||||
wms_respository r left join wms_repo_admin ra on(r.REPO_ID = ra.REPO_ADMIN_REPOID)
|
||||
</select>
|
||||
|
||||
<select id="selectUnassign" resultMap="repository">
|
||||
select
|
||||
r.REPO_ID,
|
||||
r.REPO_ADDRESS,
|
||||
r.REPO_STATUS,
|
||||
r.REPO_AREA,
|
||||
r.REPO_DESC
|
||||
from
|
||||
wms_respository r
|
||||
where not exists
|
||||
(
|
||||
select *
|
||||
from
|
||||
wms_repo_admin ra
|
||||
where
|
||||
ra.REPO_ADMIN_REPOID = r.REPO_ID
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="selectByID" resultMap="repository">
|
||||
select
|
||||
r.REPO_ID,
|
||||
r.REPO_ADDRESS,
|
||||
r.REPO_STATUS,
|
||||
r.REPO_AREA,
|
||||
r.REPO_DESC,
|
||||
ra.REPO_ADMIN_NAME
|
||||
from
|
||||
wms_respository r left join wms_repo_admin ra on(r.REPO_ID = ra.REPO_ADMIN_REPOID)
|
||||
where
|
||||
r.REPO_ID = #{repositoryID}
|
||||
</select>
|
||||
|
||||
<select id="selectByAddress" resultMap="repository">
|
||||
select
|
||||
r.REPO_ID,
|
||||
r.REPO_ADDRESS,
|
||||
r.REPO_STATUS,
|
||||
r.REPO_AREA,
|
||||
r.REPO_DESC,
|
||||
ra.REPO_ADMIN_NAME
|
||||
from
|
||||
wms_respository r left join wms_repo_admin ra on(r.REPO_ID = ra.REPO_ADMIN_REPOID)
|
||||
where
|
||||
r.REPO_ADDRESS like concat(concat("%",#{address},"%"))
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into wms_respository(REPO_ADDRESS,REPO_STATUS,REPO_AREA,REPO_DESC)
|
||||
values(#{address},#{status},#{area},#{desc})
|
||||
</insert>
|
||||
|
||||
<insert id="insertbatch">
|
||||
insert into wms_respository(REPO_ADDRESS,REPO_STATUS,REPO_AREA,REPO_DESC)
|
||||
values
|
||||
<foreach collection="list" item="repository" separator=",">
|
||||
(#{repository.address},#{repository.status},#{repository.area},#{repository.desc})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update
|
||||
wms_respository
|
||||
set
|
||||
REPO_ADDRESS = #{address},
|
||||
REPO_STATUS = #{status},
|
||||
REPO_AREA = #{area},
|
||||
REPO_desc = #{desc}
|
||||
where
|
||||
REPO_ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByID">
|
||||
delete from wms_respository
|
||||
where REPO_ID = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,16 @@
|
||||
package com.ken.wms.dao;
|
||||
|
||||
import com.ken.wms.domain.RolePermissionDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 角色权限信息 Mapper
|
||||
*
|
||||
* @author ken
|
||||
* @since 2017/2/26.
|
||||
*/
|
||||
public interface RolePermissionMapper {
|
||||
|
||||
List<RolePermissionDO> selectAll();
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.RolePermissionMapper">
|
||||
|
||||
<resultMap id="rolePermission" type="com.ken.wms.domain.RolePermissionDO">
|
||||
<result property="name" column="ACTION_NAME"/>
|
||||
<result property="url" column="ACTION_PARAM"/>
|
||||
<result property="role" column="ROLE_NAME"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAll" resultMap="rolePermission">
|
||||
select
|
||||
ACTION_NAME, ACTION_PARAM, ROLE_NAME
|
||||
from
|
||||
wms_roles r, wms_action a, wms_role_action ra
|
||||
where
|
||||
r.ROLE_ID = ra.ROLE_ID and
|
||||
a.ACTION_ID = ra.ACTION_ID
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,17 @@
|
||||
package com.ken.wms.dao;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/1.
|
||||
*/
|
||||
public interface RolesMapper {
|
||||
|
||||
/**
|
||||
* 获取角色对应的ID
|
||||
* @param roleName 角色名
|
||||
* @return 返回角色的ID
|
||||
*/
|
||||
Integer getRoleID(String roleName);
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.RolesMapper">
|
||||
|
||||
<select id="getRoleID" resultType="java.lang.Integer">
|
||||
select
|
||||
ROLE_ID
|
||||
from
|
||||
wms_roles
|
||||
where
|
||||
ROLE_NAME = #{roleName}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,87 @@
|
||||
package com.ken.wms.dao;
|
||||
|
||||
import com.ken.wms.domain.StockInDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入库记录映射器
|
||||
*
|
||||
* @author Ken
|
||||
*/
|
||||
public interface StockInMapper {
|
||||
|
||||
/**
|
||||
* 选择全部的入库记录
|
||||
*
|
||||
* @return 返回全部的入库记录
|
||||
*/
|
||||
List<StockInDO> selectAll();
|
||||
|
||||
/**
|
||||
* 选择指定供应商ID相关的入库记录
|
||||
*
|
||||
* @param supplierID 指定的供应商ID
|
||||
* @return 返回指定供应商相关的入库记录
|
||||
*/
|
||||
List<StockInDO> selectBySupplierId(Integer supplierID);
|
||||
|
||||
/**
|
||||
* 选择指定货物ID相关的入库记录
|
||||
*
|
||||
* @param goodID 指定的货物ID
|
||||
* @return 返回指定货物相关的入库记录
|
||||
*/
|
||||
List<StockInDO> selectByGoodID(Integer goodID);
|
||||
|
||||
/**
|
||||
* 选择指定仓库ID相关的入库记录
|
||||
*
|
||||
* @param repositoryID 指定的仓库ID
|
||||
* @return 返回指定仓库相关的入库记录
|
||||
*/
|
||||
List<StockInDO> selectByRepositoryID(Integer repositoryID);
|
||||
|
||||
/**
|
||||
* 选择指定仓库ID以及指定日期范围内的入库记录
|
||||
*
|
||||
* @param repositoryID 指定的仓库ID
|
||||
* @param startDate 记录的起始日期
|
||||
* @param endDate 记录的结束日期
|
||||
* @return 返回所有符合要求的入库记录
|
||||
*/
|
||||
List<StockInDO> selectByRepositoryIDAndDate(@Param("repositoryID") Integer repositoryID,
|
||||
@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate);
|
||||
|
||||
/**
|
||||
* 选择指定入库记录的ID的入库记录
|
||||
*
|
||||
* @param id 入库记录ID
|
||||
* @return 返回指定ID的入库记录
|
||||
*/
|
||||
StockInDO selectByID(Integer id);
|
||||
|
||||
/**
|
||||
* 添加一条新的入库记录
|
||||
*
|
||||
* @param stockInDO 入库记录
|
||||
*/
|
||||
void insert(StockInDO stockInDO);
|
||||
|
||||
/**
|
||||
* 更新入库记录
|
||||
*
|
||||
* @param stockInDO 入库记录
|
||||
*/
|
||||
void update(StockInDO stockInDO);
|
||||
|
||||
/**
|
||||
* 删除指定ID的入库记录
|
||||
*
|
||||
* @param id 指定删除入库记录的ID
|
||||
*/
|
||||
void deleteByID(Integer id);
|
||||
}
|
||||
@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.StockInMapper">
|
||||
|
||||
<resultMap type="com.ken.wms.domain.StockInDO" id="stockInDO">
|
||||
<id property="id" column="STOCKIN_ID"/>
|
||||
<result property="supplierID" column="STOCKIN_SUPPLIER_ID"/>
|
||||
<result property="supplierName" column="STOCKIN_SUPPLIER_NAME"/>
|
||||
<result property="goodID" column="STOCKIN_GOOD_ID"/>
|
||||
<result property="goodName" column="STOCKIN_GOOD_NAME"/>
|
||||
<result property="number" column="STOCKIN_NUMBER"/>
|
||||
<result property="time" column="STOCKIN_TIME"/>
|
||||
<result property="personInCharge" column="STOCKIN_PERSON"/>
|
||||
<result property="repositoryID" column="STOCKIN_REPOSITORY_ID"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAll" resultMap="stockInDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKIN_ID,
|
||||
r.RECORD_SUPPLIERID as STOCKIN_SUPPLIER_ID,
|
||||
s.SUPPLIER_NAME as STOCKIN_SUPPLIER_NAME,
|
||||
r.RECORD_GOODID as STOCKIN_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKIN_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKIN_NUMBER,
|
||||
r.RECORD_TIME as STOCKIN_TIME,
|
||||
r.RECORD_PERSON as STOCKIN_PERSON,
|
||||
r.RECORD_REPOSITORYID as STOCKIN_REPOSITORY_ID
|
||||
from
|
||||
wms_record_in r,wms_goods g,wms_supplier s
|
||||
where
|
||||
r.RECORD_SUPPLIERID = s.SUPPLIER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID
|
||||
</select>
|
||||
|
||||
<select id="selectBySupplierId" resultMap="stockInDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKIN_ID,
|
||||
r.RECORD_SUPPLIERID as STOCKIN_SUPPLIER_ID,
|
||||
s.SUPPLIER_NAME as STOCKIN_SUPPLIER_NAME,
|
||||
r.RECORD_GOODID as STOCKIN_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKIN_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKIN_NUMBER,
|
||||
r.RECORD_TIME as STOCKIN_TIME,
|
||||
r.RECORD_PERSON as STOCKIN_PERSON,
|
||||
r.RECORD_REPOSITORYID as STOCKIN_REPOSITORY_ID
|
||||
from
|
||||
wms_record_in r,wms_goods g,wms_supplier s
|
||||
where
|
||||
r.RECORD_SUPPLIERID = s.SUPPLIER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID and
|
||||
r.RECORD_SUPPLIERID = #{supplierID}
|
||||
</select>
|
||||
|
||||
<select id="selectByGoodID" resultMap="stockInDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKIN_ID,
|
||||
r.RECORD_SUPPLIERID as STOCKIN_SUPPLIER_ID,
|
||||
s.SUPPLIER_NAME as STOCKIN_SUPPLIER_NAME,
|
||||
r.RECORD_GOODID as STOCKIN_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKIN_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKIN_NUMBER,
|
||||
r.RECORD_TIME as STOCKIN_TIME,
|
||||
r.RECORD_PERSON as STOCKIN_PERSON,
|
||||
r.RECORD_REPOSITORYID as STOCKIN_REPOSITORY_ID
|
||||
from
|
||||
wms_record_in r,wms_goods g,wms_supplier s
|
||||
where
|
||||
r.RECORD_SUPPLIERID = s.SUPPLIER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID and
|
||||
r.RECORD_GOODID = #{goodID}
|
||||
</select>
|
||||
|
||||
<select id="selectByID" resultMap="stockInDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKIN_ID,
|
||||
r.RECORD_SUPPLIERID as STOCKIN_SUPPLIER_ID,
|
||||
s.SUPPLIER_NAME as STOCKIN_SUPPLIER_NAME,
|
||||
r.RECORD_GOODID as STOCKIN_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKIN_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKIN_NUMBER,
|
||||
r.RECORD_TIME as STOCKIN_TIME,
|
||||
r.RECORD_PERSON as STOCKIN_PERSON,
|
||||
r.RECORD_REPOSITORYID as STOCKIN_REPOSITORY_ID
|
||||
from
|
||||
wms_record_in r,wms_goods g,wms_supplier s
|
||||
where
|
||||
r.RECORD_SUPPLIERID = s.SUPPLIER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID and
|
||||
r.RECORD_ID = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByRepositoryID" resultMap="stockInDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKIN_ID,
|
||||
r.RECORD_SUPPLIERID as STOCKIN_SUPPLIER_ID,
|
||||
s.SUPPLIER_NAME as STOCKIN_SUPPLIER_NAME,
|
||||
r.RECORD_GOODID as STOCKIN_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKIN_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKIN_NUMBER,
|
||||
r.RECORD_TIME as STOCKIN_TIME,
|
||||
r.RECORD_PERSON as STOCKIN_PERSON,
|
||||
r.RECORD_REPOSITORYID as STOCKIN_REPOSITORY_ID
|
||||
from
|
||||
wms_record_in r,wms_goods g,wms_supplier s
|
||||
where
|
||||
r.RECORD_SUPPLIERID = s.SUPPLIER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID and
|
||||
r.RECORD_REPOSITORYID = #{repositoryID}
|
||||
</select>
|
||||
|
||||
<select id="selectByRepositoryIDAndDate" resultMap="stockInDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKIN_ID,
|
||||
r.RECORD_SUPPLIERID as STOCKIN_SUPPLIER_ID,
|
||||
s.SUPPLIER_NAME as STOCKIN_SUPPLIER_NAME,
|
||||
r.RECORD_GOODID as STOCKIN_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKIN_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKIN_NUMBER,
|
||||
r.RECORD_TIME as STOCKIN_TIME,
|
||||
r.RECORD_PERSON as STOCKIN_PERSON,
|
||||
r.RECORD_REPOSITORYID as STOCKIN_REPOSITORY_ID
|
||||
from
|
||||
wms_record_in r,wms_goods g,wms_supplier s
|
||||
where
|
||||
r.RECORD_SUPPLIERID = s.SUPPLIER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID
|
||||
<if test="repositoryID > 0">
|
||||
and r.RECORD_REPOSITORYID = #{repositoryID}
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
and r.RECORD_TIME >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
<![CDATA[and r.RECORD_TIME <= #{endDate}]]>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into wms_record_in(RECORD_SUPPLIERID,RECORD_GOODID,RECORD_NUMBER,RECORD_TIME,RECORD_PERSON,RECORD_REPOSITORYID)
|
||||
values(#{supplierID},#{goodID},#{number},#{time},#{personInCharge},#{repositoryID})
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update
|
||||
wms_record_in
|
||||
set
|
||||
RECORD_SUPPLIERID = #{supplierID},
|
||||
RECORD_GOODID = #{goodID},
|
||||
RECORD_NUMBER = #{number},
|
||||
RECORD_TIME = #{time},
|
||||
RECORD_PERSON = #{personInCharge}
|
||||
where
|
||||
RECORD_ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByID">
|
||||
delete from wms_record_in
|
||||
where RECORD_ID = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,87 @@
|
||||
package com.ken.wms.dao;
|
||||
|
||||
import com.ken.wms.domain.StockOutDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出库记录 映射器
|
||||
*
|
||||
* @author Ken
|
||||
*/
|
||||
public interface StockOutMapper {
|
||||
|
||||
/**
|
||||
* 选择全部的出库记录
|
||||
*
|
||||
* @return 返回所有的出库记录
|
||||
*/
|
||||
List<StockOutDO> selectAll();
|
||||
|
||||
/**
|
||||
* 选择指定客户ID相关的出库记录
|
||||
*
|
||||
* @param customerId 指定的客户ID
|
||||
* @return 返回指定客户相关的出库记录
|
||||
*/
|
||||
List<StockOutDO> selectByCustomerId(Integer customerId);
|
||||
|
||||
/**
|
||||
* 选择指定货物ID相关的出库记录
|
||||
*
|
||||
* @param goodId 指定的货物ID
|
||||
* @return 返回指定货物ID相关的出库记录
|
||||
*/
|
||||
List<StockOutDO> selectByGoodId(Integer goodId);
|
||||
|
||||
/**
|
||||
* 选择指定仓库ID关联的出库记录
|
||||
*
|
||||
* @param repositoryID 指定的仓库ID
|
||||
* @return 返回指定仓库ID相关的出库记录
|
||||
*/
|
||||
List<StockOutDO> selectByRepositoryID(Integer repositoryID);
|
||||
|
||||
/**
|
||||
* 选择指定仓库ID以及指定日期范围内的出库记录
|
||||
*
|
||||
* @param repositoryID 指定的仓库ID
|
||||
* @param startDate 记录起始日期
|
||||
* @param endDate 记录结束日期
|
||||
* @return 返回所有符合指定要求的出库记录
|
||||
*/
|
||||
List<StockOutDO> selectByRepositoryIDAndDate(@Param("repositoryID") Integer repositoryID,
|
||||
@Param("startDate") Date startDate,
|
||||
@Param("endDate") Date endDate);
|
||||
|
||||
/**
|
||||
* 选择指定ID的出库记录
|
||||
*
|
||||
* @param id 指定的出库记录ID
|
||||
* @return 返回指定ID的出库记录
|
||||
*/
|
||||
StockOutDO selectById(Integer id);
|
||||
|
||||
/**
|
||||
* 插入一条新的出库记录
|
||||
*
|
||||
* @param stockOutDO 出库记录
|
||||
*/
|
||||
void insert(StockOutDO stockOutDO);
|
||||
|
||||
/**
|
||||
* 更新出库记录
|
||||
*
|
||||
* @param stockOutDO 出库记录
|
||||
*/
|
||||
void update(StockOutDO stockOutDO);
|
||||
|
||||
/**
|
||||
* 删除指定ID的出库记录
|
||||
*
|
||||
* @param id 指定的出库记录ID
|
||||
*/
|
||||
void deleteById(Integer id);
|
||||
}
|
||||
@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.StockOutMapper">
|
||||
|
||||
<resultMap type="com.ken.wms.domain.StockOutDO" id="stockOutDO">
|
||||
<id property="id" column="STOCKOUT_ID"/>
|
||||
<result property="customerID" column="STOCKOUT_CUSTOMER_ID"/>
|
||||
<result property="customerName" column="STOCKOUT_CUSTOMER_NAME"/>
|
||||
<result property="goodID" column="STOCKOUT_GOOD_ID"/>
|
||||
<result property="goodName" column="STOCKOUT_GOOD_NAME"/>
|
||||
<result property="number" column="STOCKOUT_NUMBER"/>
|
||||
<result property="time" column="STOCKOUT_TIME"/>
|
||||
<result property="personInCharge" column="STOCKOUT_PERSON"/>
|
||||
<result property="repositoryID" column="STOCKOUT_REPOSITORY_ID"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAll" resultMap="stockOutDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKOUT_ID,
|
||||
r.RECORD_CUSTOMERID as STOCKOUT_CUSTOMER_ID,
|
||||
c.CUSTOMER_NAME as STOCKOUT_CUSTOMER_NAME,
|
||||
r.RECORD_GOODID as STOCKOUT_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKOUT_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKOUT_NUMBER,
|
||||
r.RECORD_TIME as STOCKOUT_TIME,
|
||||
r.RECORD_PERSON as STOCKOUT_PERSON,
|
||||
r.RECORD_REPOSITORYID asSTOCKOUT_REPOSITORY_ID
|
||||
from
|
||||
wms_record_out r,wms_goods g,wms_customer c
|
||||
where
|
||||
r.RECORD_CUSTOMERID = c.CUSTOMER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID
|
||||
</select>
|
||||
|
||||
<select id="selectByCustomerId" resultMap="stockOutDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKOUT_ID,
|
||||
r.RECORD_CUSTOMERID as STOCKOUT_CUSTOMER_ID,
|
||||
c.CUSTOMER_NAME as STOCKOUT_CUSTOMER_NAME,
|
||||
r.RECORD_GOODID as STOCKOUT_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKOUT_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKOUT_NUMBER,
|
||||
r.RECORD_TIME as STOCKOUT_TIME,
|
||||
r.RECORD_PERSON as STOCKOUT_PERSON,
|
||||
r.RECORD_REPOSITORYID asSTOCKOUT_REPOSITORY_ID
|
||||
from
|
||||
wms_record_out r,wms_goods g,wms_customer c
|
||||
where
|
||||
r.RECORD_CUSTOMERID = c.CUSTOMER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID and
|
||||
r.RECORD_CUSTOMERID = #{customerId}
|
||||
</select>
|
||||
|
||||
<select id="selectByGoodId" resultMap="stockOutDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKOUT_ID,
|
||||
r.RECORD_CUSTOMERID as STOCKOUT_CUSTOMER_ID,
|
||||
c.CUSTOMER_NAME as STOCKOUT_CUSTOMER_NAME,
|
||||
r.RECORD_GOODID as STOCKOUT_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKOUT_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKOUT_NUMBER,
|
||||
r.RECORD_TIME as STOCKOUT_TIME,
|
||||
r.RECORD_PERSON as STOCKOUT_PERSON,
|
||||
r.RECORD_REPOSITORYID asSTOCKOUT_REPOSITORY_ID
|
||||
from
|
||||
wms_record_out r,wms_goods g,wms_customer c
|
||||
where
|
||||
r.RECORD_CUSTOMERID = c.CUSTOMER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID and
|
||||
r.RECORD_GOODID = #{goodId}
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultMap="stockOutDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKOUT_ID,
|
||||
r.RECORD_CUSTOMERID as STOCKOUT_CUSTOMER_ID,
|
||||
c.CUSTOMER_NAME as STOCKOUT_CUSTOMER_NAME,
|
||||
r.RECORD_GOODID as STOCKOUT_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKOUT_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKOUT_NUMBER,
|
||||
r.RECORD_TIME as STOCKOUT_TIME,
|
||||
r.RECORD_PERSON as STOCKOUT_PERSON,
|
||||
r.RECORD_REPOSITORYID asSTOCKOUT_REPOSITORY_ID
|
||||
from
|
||||
wms_record_out r,wms_goods g,wms_customer c
|
||||
where
|
||||
r.RECORD_CUSTOMERID = c.CUSTOMER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID and
|
||||
r.RECORD_ID = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByRepositoryID" resultMap="stockOutDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKOUT_ID,
|
||||
r.RECORD_CUSTOMERID as STOCKOUT_CUSTOMER_ID,
|
||||
c.CUSTOMER_NAME as STOCKOUT_CUSTOMER_NAME,
|
||||
r.RECORD_GOODID as STOCKOUT_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKOUT_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKOUT_NUMBER,
|
||||
r.RECORD_TIME as STOCKOUT_TIME,
|
||||
r.RECORD_PERSON as STOCKOUT_PERSON,
|
||||
r.RECORD_REPOSITORYID as STOCKOUT_REPOSITORY_ID
|
||||
from
|
||||
wms_record_out r,wms_goods g,wms_customer c
|
||||
where
|
||||
r.RECORD_CUSTOMERID = c.CUSTOMER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID and
|
||||
r.RECORD_REPOSITORYID = 1007
|
||||
</select>
|
||||
|
||||
<select id="selectByRepositoryIDAndDate" resultMap="stockOutDO">
|
||||
select
|
||||
r.RECORD_ID as STOCKOUT_ID,
|
||||
r.RECORD_CUSTOMERID as STOCKOUT_CUSTOMER_ID,
|
||||
c.CUSTOMER_NAME as STOCKOUT_CUSTOMER_NAME,
|
||||
r.RECORD_GOODID as STOCKOUT_GOOD_ID,
|
||||
g.GOOD_NAME as STOCKOUT_GOOD_NAME,
|
||||
r.RECORD_NUMBER as STOCKOUT_NUMBER,
|
||||
r.RECORD_TIME as STOCKOUT_TIME,
|
||||
r.RECORD_PERSON as STOCKOUT_PERSON,
|
||||
r.RECORD_REPOSITORYID as STOCKOUT_REPOSITORY_ID
|
||||
from
|
||||
wms_record_out r,wms_goods g,wms_customer c
|
||||
where
|
||||
r.RECORD_CUSTOMERID = c.CUSTOMER_ID and
|
||||
r.RECORD_GOODID = g.GOOD_ID
|
||||
<if test="repositoryID > 0">
|
||||
and r.RECORD_REPOSITORYID = #{repositoryID}
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
and r.RECORD_TIME >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
<![CDATA[and r.RECORD_TIME <= #{endDate}]]>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into wms_record_out(RECORD_CUSTOMERID,RECORD_GOODID,RECORD_NUMBER,RECORD_TIME,RECORD_PERSON,RECORD_REPOSITORYID)
|
||||
values(#{customerID},#{goodID},#{number},#{time},#{personInCharge},#{repositoryID})
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update
|
||||
wms_record_out
|
||||
set
|
||||
RECORD_CUSTOMERID = #{customerID},
|
||||
RECORD_GOODID = #{goodID},
|
||||
RECORD_NUMBER = #{number},
|
||||
RECORD_TIME = #{time},
|
||||
RECORD_PERSON = #{personInCharge}
|
||||
where
|
||||
RECORD_ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
delete from wms_record_out
|
||||
where RECORD_ID = #{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.StorageMapper">
|
||||
|
||||
<!-- 结果映射 -->
|
||||
<resultMap type="com.ken.wms.domain.Storage" id="storage">
|
||||
<id property="goodsID" column="goodsID"/>
|
||||
<result property="goodsName" column="goodsName"/>
|
||||
<result property="goodsSize" column="goodsSize"/>
|
||||
<result property="goodsType" column="goodsType"/>
|
||||
<result property="goodsValue" column="goodsValue"/>
|
||||
<result property="repositoryID" column="repositoryID"/>
|
||||
<result property="number" column="number"/>
|
||||
<!--
|
||||
<association property="goodsInfo" javaType="com.ken.Goods" resultMap="goods"/>
|
||||
-->
|
||||
</resultMap>
|
||||
|
||||
<!--
|
||||
<resultMap type="com.ken.Goods" id="goods">
|
||||
<id property="id" column="goodsID"/>
|
||||
<result property="name" column="goodsName"/>
|
||||
<result property="size" column="goodsSize"/>
|
||||
<result property="type" column="goodsType"/>
|
||||
<result property="value" column="goodsValue"/>
|
||||
</resultMap>
|
||||
-->
|
||||
|
||||
<select id="selectAllAndRepositoryID" resultMap="storage">
|
||||
select
|
||||
r.REPO_ID as repositoryID,
|
||||
s.RECORD_NUMBER as number,
|
||||
g.GOOD_ID as goodsID,
|
||||
g.GOOD_NAME as goodsName,
|
||||
g.GOOD_RYPE as goodsType,
|
||||
g.GOOD_SIZE as goodsSize,
|
||||
g.GOOD_VALUE as goodsValue
|
||||
from
|
||||
wms_record_storage s,wms_respository r, wms_goods g
|
||||
where
|
||||
s.RECORD_GOODID = g.GOOD_ID and
|
||||
s.RECORD_REPOSITORY = r.REPO_ID
|
||||
<if test="repositoryID > 0">
|
||||
and r.REPO_ID = #{repositoryID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectByGoodsIDAndRepositoryID" resultMap="storage">
|
||||
select
|
||||
r.REPO_ID as repositoryID,
|
||||
s.RECORD_NUMBER as number,
|
||||
g.GOOD_ID as goodsID,
|
||||
g.GOOD_NAME as goodsName,
|
||||
g.GOOD_RYPE as goodsType,
|
||||
g.GOOD_SIZE as goodsSize,
|
||||
g.GOOD_VALUE as goodsValue
|
||||
from
|
||||
wms_record_storage s,wms_respository r, wms_goods g
|
||||
where
|
||||
s.RECORD_GOODID = g.GOOD_ID and
|
||||
s.RECORD_REPOSITORY = r.REPO_ID and
|
||||
g.GOOD_ID = #{goodsID}
|
||||
<if test="repositoryID > 0">
|
||||
and r.REPO_ID = #{repositoryID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectByGoodsNameAndRepositoryID" resultMap="storage">
|
||||
select
|
||||
r.REPO_ID as repositoryID,
|
||||
s.RECORD_NUMBER as number,
|
||||
g.GOOD_ID as goodsID,
|
||||
g.GOOD_NAME as goodsName,
|
||||
g.GOOD_RYPE as goodsType,
|
||||
g.GOOD_SIZE as goodsSize,
|
||||
g.GOOD_VALUE as goodsValue
|
||||
from
|
||||
wms_record_storage s,wms_respository r, wms_goods g
|
||||
where
|
||||
s.RECORD_GOODID = g.GOOD_ID and
|
||||
s.RECORD_REPOSITORY = r.REPO_ID and
|
||||
g.GOOD_NAME like concat("%",concat(#{goodsName},"%"))
|
||||
<if test="repositoryID > 0">
|
||||
and r.REPO_ID = #{repositoryID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectByGoodsTypeAndRepositoryID" resultMap="storage">
|
||||
select
|
||||
r.REPO_ID as repositoryID,
|
||||
s.RECORD_NUMBER as number,
|
||||
g.GOOD_ID as goodsID,
|
||||
g.GOOD_NAME as goodsName,
|
||||
g.GOOD_RYPE as goodsType,
|
||||
g.GOOD_SIZE as goodsSize,
|
||||
g.GOOD_VALUE as goodsValue
|
||||
from
|
||||
wms_record_storage s,wms_respository r, wms_goods g
|
||||
where
|
||||
s.RECORD_GOODID = g.GOOD_ID and
|
||||
s.RECORD_REPOSITORY = r.REPO_ID and
|
||||
g.GOOD_RYPE like concat("%",concat(#{goodsType},"%"))
|
||||
<if test="repositoryID > 0">
|
||||
and r.REPO_ID = #{repositoryID}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="update">
|
||||
update
|
||||
wms_record_storage
|
||||
set
|
||||
RECORD_GOODID = #{goodsID},
|
||||
RECORD_REPOSITORY = #{repositoryID},
|
||||
RECORD_NUMBER = #{number}
|
||||
where
|
||||
RECORD_GOODID = #{goodsID} and
|
||||
RECORD_REPOSITORY = #{repositoryID}
|
||||
</update>
|
||||
|
||||
<insert id="insert">
|
||||
insert into wms_record_storage
|
||||
(
|
||||
RECORD_GOODID,
|
||||
RECORD_REPOSITORY,
|
||||
RECORD_NUMBER
|
||||
)
|
||||
values
|
||||
(
|
||||
#{goodsID},
|
||||
#{repositoryID},
|
||||
#{number}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into wms_record_storage(RECORD_GOODID,RECORD_REPOSITORY,RECORD_NUMBER)
|
||||
values
|
||||
<foreach collection="list" item="storage" separator=",">
|
||||
(
|
||||
#{storage.goodsID},#{storage.repositoryID},#{storage.number})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByGoodsID">
|
||||
delete from
|
||||
wms_record_storage
|
||||
where
|
||||
RECORD_GOODID = #{goodsID}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByRepositoryID">
|
||||
delete from
|
||||
wms_record_storage
|
||||
where
|
||||
wms_record_storage.RECORD_REPOSITORY = #{repositoryID}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByRepositoryIDAndGoodsID">
|
||||
delete from
|
||||
wms_record_storage
|
||||
where
|
||||
RECORD_GOODID = #{goodsID} and
|
||||
wms_record_storage.RECORD_REPOSITORY = #{repositoryID}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.SupplierMapper">
|
||||
|
||||
<resultMap type="com.ken.wms.domain.Supplier" id="supplier">
|
||||
<id property="id" column="SUPPLIER_ID"/>
|
||||
<result property="name" column="SUPPLIER_NAME"/>
|
||||
<result property="personInCharge" column="SUPPLIER_PERSON"/>
|
||||
<result property="tel" column="SUPPLIER_TEL"/>
|
||||
<result property="email" column="SUPPLIER_EMAIL"/>
|
||||
<result property="address" column="SUPPLIER_ADDRESS"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectAll" resultMap="supplier">
|
||||
select
|
||||
s.SUPPLIER_ID,
|
||||
s.SUPPLIER_NAME,
|
||||
s.SUPPLIER_PERSON,
|
||||
s.SUPPLIER_TEL,
|
||||
s.SUPPLIER_EMAIL,
|
||||
s.SUPPLIER_ADDRESS
|
||||
from
|
||||
wms_supplier s
|
||||
</select>
|
||||
|
||||
<select id="selectById" resultMap="supplier">
|
||||
select
|
||||
s.SUPPLIER_ID,
|
||||
s.SUPPLIER_NAME,
|
||||
s.SUPPLIER_PERSON,
|
||||
s.SUPPLIER_TEL,
|
||||
s.SUPPLIER_EMAIL,
|
||||
s.SUPPLIER_ADDRESS
|
||||
from
|
||||
wms_supplier s
|
||||
where
|
||||
s.SUPPLIER_ID = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectBuName" resultMap="supplier">
|
||||
select
|
||||
s.SUPPLIER_ID,
|
||||
s.SUPPLIER_NAME,
|
||||
s.SUPPLIER_PERSON,
|
||||
s.SUPPLIER_TEL,
|
||||
s.SUPPLIER_EMAIL,
|
||||
s.SUPPLIER_ADDRESS
|
||||
from
|
||||
wms_supplier s
|
||||
where
|
||||
s.SUPPLIER_NAME = #{supplierName}
|
||||
</select>
|
||||
|
||||
<select id="selectApproximateByName" resultMap="supplier">
|
||||
select
|
||||
s.SUPPLIER_ID,
|
||||
s.SUPPLIER_NAME,
|
||||
s.SUPPLIER_PERSON,
|
||||
s.SUPPLIER_TEL,
|
||||
s.SUPPLIER_EMAIL,
|
||||
s.SUPPLIER_ADDRESS
|
||||
from
|
||||
wms_supplier s
|
||||
where
|
||||
s.SUPPLIER_NAME like concat(concat('%',#{supplierName}),'%')
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into wms_supplier(SUPPLIER_NAME,SUPPLIER_PERSON,SUPPLIER_TEL,SUPPLIER_EMAIL,SUPPLIER_ADDRESS)
|
||||
values(#{name},#{personInCharge},#{tel},#{email},#{address})
|
||||
</insert>
|
||||
|
||||
<insert id="insertBatch">
|
||||
insert into wms_supplier(SUPPLIER_NAME,SUPPLIER_PERSON,SUPPLIER_TEL,SUPPLIER_EMAIL,SUPPLIER_ADDRESS)
|
||||
values
|
||||
<foreach collection="list" item="supplier" separator=",">
|
||||
(#{supplier.name},#{supplier.personInCharge},#{supplier.tel},#{supplier.email},#{supplier.address})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update
|
||||
wms_supplier
|
||||
set
|
||||
SUPPLIER_NAME = #{name},
|
||||
SUPPLIER_PERSON = #{personInCharge},
|
||||
SUPPLIER_TEL = #{tel},
|
||||
SUPPLIER_EMAIL = #{email},
|
||||
SUPPLIER_ADDRESS = #{address}
|
||||
where
|
||||
SUPPLIER_ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
delete from wms_supplier
|
||||
where SUPPLIER_ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByName">
|
||||
delete from wms_supplier
|
||||
where SUPPLIER_NAME = #{name}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.UserInfoMapper">
|
||||
|
||||
<resultMap id="user" type="com.ken.wms.domain.UserInfoDO">
|
||||
<result property="userID" column="USER_ID"/>
|
||||
<result property="userName" column="USER_USERNAME"/>
|
||||
<result property="password" column="USER_PASSWORD"/>
|
||||
<result property="firstLogin" column="USER_FIRST_LOGIN"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByUserID" resultMap="user">
|
||||
select
|
||||
u.USER_ID,
|
||||
u.USER_USERNAME,
|
||||
u.USER_PASSWORD,
|
||||
u.USER_FIRST_LOGIN
|
||||
from
|
||||
wms_user u
|
||||
where
|
||||
u.USER_ID = #{userID}
|
||||
</select>
|
||||
|
||||
<select id="selectByName" resultMap="user">
|
||||
select
|
||||
s.USER_ID,
|
||||
s.USER_USERNAME,
|
||||
s.USER_PASSWORD,
|
||||
s.USER_FIRST_LOGIN
|
||||
from
|
||||
wms_user s
|
||||
where
|
||||
s.USER_USERNAME = #{userName}
|
||||
</select>
|
||||
|
||||
<select id="selectAll" resultMap="user">
|
||||
select
|
||||
s.USER_ID,
|
||||
s.USER_USERNAME,
|
||||
s.USER_PASSWORD,
|
||||
s.USER_FIRST_LOGIN
|
||||
from
|
||||
wms_user s
|
||||
</select>
|
||||
|
||||
<insert id="insert" useGeneratedKeys="true">
|
||||
insert into wms_user(USER_ID,USER_USERNAME,USER_PASSWORD, USER_FIRST_LOGIN)
|
||||
values (#{userID},#{userName},#{password}, #{firstLogin})
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update wms_user set
|
||||
USER_USERNAME = #{userName},
|
||||
USER_PASSWORD = #{password},
|
||||
USER_FIRST_LOGIN = #{firstLogin}
|
||||
where
|
||||
USER_ID = #{userID}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
delete from wms_user
|
||||
where
|
||||
USER_ID = #{userID}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ken.wms.dao.UserOperationRecordMapper">
|
||||
<resultMap id="userOperationRecord" type="com.ken.wms.domain.UserOperationRecordDO">
|
||||
<id property="id" column="RECORD_ID"/>
|
||||
<result property="userID" column="USER_ID"/>
|
||||
<result property="userName" column="USER_NAME"/>
|
||||
<result property="operationName" column="OPERATION_NAME"/>
|
||||
<result property="operationTime" column="OPERATION_TIME"/>
|
||||
<result property="operationResult" column="OPERATION_RESULT"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectUserOperationRecord" resultMap="userOperationRecord">
|
||||
select
|
||||
RECORD_ID,
|
||||
USER_ID,
|
||||
USER_NAME,
|
||||
OPERATION_NAME,
|
||||
OPERATION_TIME,
|
||||
OPERATION_RESULT
|
||||
from
|
||||
wms_operation_record
|
||||
<where>
|
||||
<if test="userID > 0">
|
||||
USER_ID = #{userID}
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
and OPERATION_TIME >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
<![CDATA[and OPERATION_TIME <= #{endDate}]]>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertUserOperationRecord">
|
||||
insert into wms_operation_record(USER_ID, USER_NAME, OPERATION_NAME, OPERATION_TIME, OPERATION_RESULT)
|
||||
values(#{userID}, #{userName}, #{operationName}, #{operationTime}, #{operationResult})
|
||||
</insert>
|
||||
</mapper>
|
||||
@ -0,0 +1,34 @@
|
||||
package com.ken.wms.dao;
|
||||
|
||||
import com.ken.wms.domain.RoleDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户角色权限映射器
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public interface UserPermissionMapper {
|
||||
|
||||
/**
|
||||
* 为指定 userID 用户指派指定 roleID 的角色
|
||||
* @param userID 用户ID
|
||||
* @param roleID 角色ID
|
||||
*/
|
||||
void insert(@Param("userID") Integer userID, @Param("roleID") Integer roleID);
|
||||
|
||||
/**
|
||||
* 删除指定用户的角色
|
||||
* @param userID 用户ID
|
||||
*/
|
||||
void deleteByUserID(Integer userID);
|
||||
|
||||
/**
|
||||
* 获取指定 userID 对应用户拥有的角色
|
||||
* @param userID 用户ID
|
||||
* @return 返回 userID 指定用户的角色
|
||||
*/
|
||||
List<RoleDO> selectUserRole(Integer userID);
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.ken.wms.dao.UserPermissionMapper">
|
||||
|
||||
<resultMap id="role" type="com.ken.wms.domain.RoleDO">
|
||||
<id property="id" column="ROLE_ID"/>
|
||||
<result property="roleName" column="ROLE_NAME"/>
|
||||
<result property="roleDesc" column="ROLE_DESC"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectUserRole" resultMap="role">
|
||||
select
|
||||
r.ROLE_ID,
|
||||
r.ROLE_NAME,
|
||||
r.ROLE_DESC
|
||||
from
|
||||
wms_roles r, wms_user_role ur
|
||||
where
|
||||
r.ROLE_ID = ur.ROLE_ID and
|
||||
ur.USER_ID = #{userID}
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into wms_user_role(ROLE_ID,USER_ID)
|
||||
values(#{roleID},#{userID})
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByUserID">
|
||||
delete from wms_user_role
|
||||
where USER_ID = #{userID}
|
||||
</delete>
|
||||
</mapper>
|
||||
@ -0,0 +1,73 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 客户信息
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public class Customer implements Serializable {
|
||||
|
||||
private Integer id;// 客户ID
|
||||
private String name;// 客户名
|
||||
private String personInCharge;// 负责人
|
||||
private String tel;// 联系电话
|
||||
private String email;// 电子邮件
|
||||
private String address;// 地址
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPersonInCharge() {
|
||||
return personInCharge;
|
||||
}
|
||||
|
||||
public void setPersonInCharge(String personInCharge) {
|
||||
this.personInCharge = personInCharge;
|
||||
}
|
||||
|
||||
public String getTel() {
|
||||
return tel;
|
||||
}
|
||||
|
||||
public void setTel(String tel) {
|
||||
this.tel = tel;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Customer [id=" + id + ", name=" + name + ", personInCharge=" + personInCharge + ", tel=" + tel
|
||||
+ ", email=" + email + ", address=" + address + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 货物信息
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public class Goods implements Serializable {
|
||||
|
||||
private Integer id;// 货物ID
|
||||
private String name;// 货物名
|
||||
private String type;// 货物类型
|
||||
private String size;// 货物规格
|
||||
private Double value;// 货物价值
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public Double getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Double value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Goods [id=" + id + ", name=" + name + ", type=" + type + ", size=" + size + ", value=" + value + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 仓库信息
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public class Repository implements Serializable {
|
||||
|
||||
private Integer id;// 仓库ID
|
||||
private String address;// 仓库地址
|
||||
private String status;// 仓库状态
|
||||
private String area;// 仓库面积
|
||||
private String desc;// 仓库描述
|
||||
private Integer adminID;//仓库管理员ID
|
||||
private String adminName; //仓库管理员名字
|
||||
|
||||
public Integer getAdminID() {
|
||||
return adminID;
|
||||
}
|
||||
|
||||
public void setAdminID(Integer adminID) {
|
||||
this.adminID = adminID;
|
||||
}
|
||||
|
||||
public String getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(String area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public void setDesc(String desc) {
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public String getAdminName() {
|
||||
return adminName;
|
||||
}
|
||||
|
||||
public void setAdminName(String adminName) {
|
||||
this.adminName = adminName;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Repository [id=" + id + ", address=" + address + ", status=" + status + ", area=" + area + ", desc="
|
||||
+ desc + ", adminID=" + adminID + ", adminName=" + adminName + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Date;
|
||||
|
||||
/**
|
||||
* 仓库管理员信息
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public class RepositoryAdmin implements Serializable {
|
||||
|
||||
private Integer id;// 仓库管理员ID
|
||||
private String name;// 姓名
|
||||
private String sex;// 性别
|
||||
private String tel;// 联系电话
|
||||
private String address;// 地址
|
||||
private Date birth;// 出生日期
|
||||
private Integer repositoryBelongID;// 所属仓库ID
|
||||
|
||||
|
||||
public Integer getRepositoryBelongID() {
|
||||
return repositoryBelongID;
|
||||
}
|
||||
|
||||
public void setRepositoryBelongID(Integer repositoryBelongID) {
|
||||
this.repositoryBelongID = repositoryBelongID;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getTel() {
|
||||
return tel;
|
||||
}
|
||||
|
||||
public void setTel(String tel) {
|
||||
this.tel = tel;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public Date getBirth() {
|
||||
return birth;
|
||||
}
|
||||
|
||||
public void setBirth(Date birth) {
|
||||
this.birth = birth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RepositoryAdmin [id=" + id + ", name=" + name + ", sex=" + sex + ", tel=" + tel + ", address=" + address
|
||||
+ ", birth=" + birth + ", repositoryBelongID=" + repositoryBelongID + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统使用的角色信息
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public class RoleDO implements Serializable {
|
||||
|
||||
private Integer id;// 角色ID
|
||||
private String roleName;// 角色名
|
||||
private String roleDesc;// 角色描述
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
public String getRoleDesc() {
|
||||
return roleDesc;
|
||||
}
|
||||
|
||||
public void setRoleDesc(String roleDesc) {
|
||||
this.roleDesc = roleDesc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RoleDO{" +
|
||||
"id=" + id +
|
||||
", roleName='" + roleName + '\'' +
|
||||
", roleDesc='" + roleDesc + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* URL 的角色角色权限信息
|
||||
*
|
||||
* @author ken
|
||||
* @since 2017/2/26
|
||||
*/
|
||||
public class RolePermissionDO implements Serializable {
|
||||
|
||||
/**
|
||||
* URL 的角色角色权限信息名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* URL 的角色角色权限信息对应的 URL
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* URL 的角色角色权限信息对应的角色
|
||||
*/
|
||||
private String role;
|
||||
|
||||
|
||||
/**
|
||||
* 对应的 getter & setter
|
||||
*/
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RolePermissionDO{" +
|
||||
"name='" + name + '\'' +
|
||||
", url='" + url + '\'' +
|
||||
", role='" + role + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,138 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 入库记录
|
||||
*
|
||||
* @author Ken
|
||||
*/
|
||||
public class StockInDO implements Serializable {
|
||||
|
||||
/**
|
||||
* 入库记录
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 供应商ID
|
||||
*/
|
||||
private Integer supplierID;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
private String supplierName;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private Integer goodID;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodName;
|
||||
|
||||
/**
|
||||
* 入库仓库ID
|
||||
*/
|
||||
private Integer repositoryID;
|
||||
|
||||
/**
|
||||
* 入库数量
|
||||
*/
|
||||
private long number;
|
||||
|
||||
/**
|
||||
* 入库日期
|
||||
*/
|
||||
private Date time;
|
||||
|
||||
/**
|
||||
* 入库经手人
|
||||
*/
|
||||
private String personInCharge;
|
||||
|
||||
public Integer getRepositoryID() {
|
||||
return repositoryID;
|
||||
}
|
||||
|
||||
public void setRepositoryID(Integer repositoryID) {
|
||||
this.repositoryID = repositoryID;
|
||||
}
|
||||
|
||||
public Integer getSupplierID() {
|
||||
return supplierID;
|
||||
}
|
||||
|
||||
public void setSupplierID(Integer supplierID) {
|
||||
this.supplierID = supplierID;
|
||||
}
|
||||
|
||||
public Integer getGoodID() {
|
||||
return goodID;
|
||||
}
|
||||
|
||||
public void setGoodID(Integer goodID) {
|
||||
this.goodID = goodID;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
public String getGoodName() {
|
||||
return goodName;
|
||||
}
|
||||
|
||||
public void setGoodName(String goodName) {
|
||||
this.goodName = goodName;
|
||||
}
|
||||
|
||||
public long getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(long number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public Date getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Date time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getPersonInCharge() {
|
||||
return personInCharge;
|
||||
}
|
||||
|
||||
public void setPersonInCharge(String personInCharge) {
|
||||
this.personInCharge = personInCharge;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StockInDO [id=" + id + ", supplierID=" + supplierID + ", supplierName=" + supplierName + ", goodID="
|
||||
+ goodID + ", goodName=" + goodName + ", repositoryID=" + repositoryID + ", number=" + number
|
||||
+ ", time=" + time + ", personInCharge=" + personInCharge + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,138 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 出库记录
|
||||
*
|
||||
* @author Ken
|
||||
*/
|
||||
public class StockOutDO implements Serializable {
|
||||
|
||||
/**
|
||||
* 出库记录ID
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 客户ID
|
||||
*/
|
||||
private Integer customerID;
|
||||
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
private String customerName;
|
||||
|
||||
/**
|
||||
* 商品ID
|
||||
*/
|
||||
private Integer goodID;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodName;
|
||||
|
||||
/**
|
||||
* 出库仓库ID
|
||||
*/
|
||||
private Integer repositoryID;
|
||||
|
||||
/**
|
||||
* 商品出库数量
|
||||
*/
|
||||
private long number;
|
||||
|
||||
/**
|
||||
* 出库日期
|
||||
*/
|
||||
private Date time;
|
||||
|
||||
/**
|
||||
* 出库经手人
|
||||
*/
|
||||
private String personInCharge;// 经手人
|
||||
|
||||
public Integer getRepositoryID() {
|
||||
return repositoryID;
|
||||
}
|
||||
|
||||
public void setRepositoryID(Integer repositoryID) {
|
||||
this.repositoryID = repositoryID;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getCustomerID() {
|
||||
return customerID;
|
||||
}
|
||||
|
||||
public void setCustomerID(Integer customerID) {
|
||||
this.customerID = customerID;
|
||||
}
|
||||
|
||||
public String getCustomerName() {
|
||||
return customerName;
|
||||
}
|
||||
|
||||
public void setCustomerName(String customerName) {
|
||||
this.customerName = customerName;
|
||||
}
|
||||
|
||||
public Integer getGoodID() {
|
||||
return goodID;
|
||||
}
|
||||
|
||||
public void setGoodID(Integer goodID) {
|
||||
this.goodID = goodID;
|
||||
}
|
||||
|
||||
public String getGoodName() {
|
||||
return goodName;
|
||||
}
|
||||
|
||||
public void setGoodName(String goodName) {
|
||||
this.goodName = goodName;
|
||||
}
|
||||
|
||||
public long getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(long number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public Date getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Date time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getPersonInCharge() {
|
||||
return personInCharge;
|
||||
}
|
||||
|
||||
public void setPersonInCharge(String personInCharge) {
|
||||
this.personInCharge = personInCharge;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StockOutDO [id=" + id + ", customerID=" + customerID + ", customerName=" + customerName + ", goodID="
|
||||
+ goodID + ", goodName=" + goodName + ", repositoryID=" + repositoryID + ", number=" + number
|
||||
+ ", time=" + time + ", personInCharge=" + personInCharge + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 仓库库存
|
||||
*
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public class Storage implements Serializable {
|
||||
|
||||
private Integer goodsID;// 货物ID
|
||||
private String goodsName;// 货物名称
|
||||
private String goodsSize;// 货物规格
|
||||
private String goodsType;// 货物类型
|
||||
private Double goodsValue;// 货物价值
|
||||
private Integer repositoryID;// 仓库ID
|
||||
private Long number;// 库存数量
|
||||
|
||||
public Integer getGoodsID() {
|
||||
return goodsID;
|
||||
}
|
||||
|
||||
public void setGoodsID(Integer goodsID) {
|
||||
this.goodsID = goodsID;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getGoodsSize() {
|
||||
return goodsSize;
|
||||
}
|
||||
|
||||
public void setGoodsSize(String goodsSize) {
|
||||
this.goodsSize = goodsSize;
|
||||
}
|
||||
|
||||
public String getGoodsType() {
|
||||
return goodsType;
|
||||
}
|
||||
|
||||
public void setGoodsType(String goodsType) {
|
||||
this.goodsType = goodsType;
|
||||
}
|
||||
|
||||
public Double getGoodsValue() {
|
||||
return goodsValue;
|
||||
}
|
||||
|
||||
public void setGoodsValue(Double goodsValue) {
|
||||
this.goodsValue = goodsValue;
|
||||
}
|
||||
|
||||
public Integer getRepositoryID() {
|
||||
return repositoryID;
|
||||
}
|
||||
|
||||
public void setRepositoryID(Integer repositoryID) {
|
||||
this.repositoryID = repositoryID;
|
||||
}
|
||||
|
||||
public Long getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(Long number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Storage [goodsID=" + goodsID + ", goodsName=" + goodsName + ", goodsSize=" + goodsSize + ", goodsType="
|
||||
+ goodsType + ", goodsValue=" + goodsValue + ", repositoryID=" + repositoryID + ", number=" + number
|
||||
+ "]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 供应商信息
|
||||
*
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public class Supplier implements Serializable {
|
||||
|
||||
private Integer id;// 供应商ID
|
||||
private String name;// 供应商名
|
||||
private String personInCharge;// 负责人
|
||||
private String tel;// 联系电话
|
||||
private String email;// 电子邮件
|
||||
private String address;// 供应商地址
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPersonInCharge() {
|
||||
return personInCharge;
|
||||
}
|
||||
|
||||
public void setPersonInCharge(String personInCharge) {
|
||||
this.personInCharge = personInCharge;
|
||||
}
|
||||
|
||||
public String getTel() {
|
||||
return tel;
|
||||
}
|
||||
|
||||
public void setTel(String tel) {
|
||||
this.tel = tel;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Supplier [id=" + id + ", name=" + name + ", personInCharge=" + personInCharge + ", tel=" + tel
|
||||
+ ", email=" + email + ", address=" + address + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 系统的使用用户
|
||||
* @author Ken
|
||||
*
|
||||
*/
|
||||
public class User implements Serializable {
|
||||
|
||||
private Integer id;// 用户ID
|
||||
private String userName;// 用户名
|
||||
private String password;// 用户密码
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User [id=" + id + ", userName=" + userName + ", password=" + password + "]";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户操作记录DO
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/4/9.
|
||||
*/
|
||||
public class UserOperationRecordDO implements Serializable {
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 执行操作的用户ID
|
||||
*/
|
||||
private Integer userID;
|
||||
|
||||
/**
|
||||
* 执行操作的用户名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 操作的名称
|
||||
*/
|
||||
private String operationName;
|
||||
|
||||
/**
|
||||
* 执行操作的时间
|
||||
*/
|
||||
private Date operationTime;
|
||||
|
||||
/**
|
||||
* 执行操作结果
|
||||
*/
|
||||
private String operationResult;
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setUserID(Integer userID) {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public void setOperationName(String operationName) {
|
||||
this.operationName = operationName;
|
||||
}
|
||||
|
||||
public void setOperationTime(Date operationTime) {
|
||||
this.operationTime = operationTime;
|
||||
}
|
||||
|
||||
public void setOperationResult(String operationResult) {
|
||||
this.operationResult = operationResult;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Integer getUserID() {
|
||||
return userID;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public String getOperationName() {
|
||||
return operationName;
|
||||
}
|
||||
|
||||
public Date getOperationTime() {
|
||||
return operationTime;
|
||||
}
|
||||
|
||||
public String getOperationResult() {
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserOperationRecordDO{" +
|
||||
"id=" + id +
|
||||
", userID=" + userID +
|
||||
", userName='" + userName + '\'' +
|
||||
", operationName='" + operationName + '\'' +
|
||||
", operationTime=" + operationTime +
|
||||
", operationResult='" + operationResult + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,102 @@
|
||||
package com.ken.wms.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 用户操作记录DTO
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/4/9.
|
||||
*/
|
||||
public class UserOperationRecordDTO implements Serializable {
|
||||
|
||||
/**
|
||||
* 操作记录ID
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 执行操作的用户ID
|
||||
*/
|
||||
private Integer userID;
|
||||
|
||||
/**
|
||||
* 执行操作的用户名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 操作的名称
|
||||
*/
|
||||
private String operationName;
|
||||
|
||||
/**
|
||||
* 操作执行的时间
|
||||
*/
|
||||
private String operationTime;
|
||||
|
||||
/**
|
||||
* 操作执行的结果
|
||||
*/
|
||||
private String operationResult;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Integer getUserID() {
|
||||
return userID;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public String getOperationName() {
|
||||
return operationName;
|
||||
}
|
||||
|
||||
public String getOperationTime() {
|
||||
return operationTime;
|
||||
}
|
||||
|
||||
public String getOperationResult() {
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setUserID(Integer userID) {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public void setOperationName(String operationName) {
|
||||
this.operationName = operationName;
|
||||
}
|
||||
|
||||
public void setOperationTime(String operationTime) {
|
||||
this.operationTime = operationTime;
|
||||
}
|
||||
|
||||
public void setOperationResult(String operationResult) {
|
||||
this.operationResult = operationResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserOperationRecordDTO{" +
|
||||
"id=" + id +
|
||||
", userID=" + userID +
|
||||
", userName='" + userName + '\'' +
|
||||
", operationName='" + operationName + '\'' +
|
||||
", operationTime='" + operationTime + '\'' +
|
||||
", operationResult='" + operationResult + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* 业务层异常的父类
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/8.
|
||||
*/
|
||||
public class BusinessException extends Exception{
|
||||
|
||||
private String exceptionDesc;
|
||||
|
||||
public BusinessException(Exception e){
|
||||
super(e);
|
||||
}
|
||||
|
||||
BusinessException(Exception e, String exceptionDesc){
|
||||
super(e);
|
||||
this.exceptionDesc = exceptionDesc;
|
||||
}
|
||||
|
||||
BusinessException(String exceptionDesc){
|
||||
this.exceptionDesc = exceptionDesc;
|
||||
}
|
||||
|
||||
BusinessException(){}
|
||||
|
||||
public String getExceptionDesc() {
|
||||
return exceptionDesc;
|
||||
}
|
||||
|
||||
public void setExceptionDesc(String exceptionDesc) {
|
||||
this.exceptionDesc = exceptionDesc;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* CustomerManageService异常
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/8.
|
||||
*/
|
||||
public class CustomerManageServiceException extends BusinessException{
|
||||
|
||||
public CustomerManageServiceException(){
|
||||
super();
|
||||
}
|
||||
|
||||
public CustomerManageServiceException(Exception e, String exception){
|
||||
super(e, exception);
|
||||
}
|
||||
|
||||
public CustomerManageServiceException(Exception e){
|
||||
super(e);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* GoodsManageService异常
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/8.
|
||||
*/
|
||||
public class GoodsManageServiceException extends BusinessException {
|
||||
|
||||
GoodsManageServiceException(){
|
||||
super();
|
||||
}
|
||||
|
||||
public GoodsManageServiceException(Exception e){
|
||||
super(e);
|
||||
}
|
||||
|
||||
GoodsManageServiceException(Exception e, String exceptionDesc){
|
||||
super(e, exceptionDesc);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* RepositoryAdminManageService异常
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/8.
|
||||
*/
|
||||
public class RepositoryAdminManageServiceException extends BusinessException {
|
||||
|
||||
public RepositoryAdminManageServiceException(){
|
||||
super();
|
||||
}
|
||||
|
||||
public RepositoryAdminManageServiceException(Exception e){
|
||||
super(e);
|
||||
}
|
||||
|
||||
public RepositoryAdminManageServiceException(Exception e, String exceptionDesc){
|
||||
super(e, exceptionDesc);
|
||||
}
|
||||
|
||||
public RepositoryAdminManageServiceException(String exceptionDesc){
|
||||
super(exceptionDesc);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* RepositoryManageService异常
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/8.
|
||||
*/
|
||||
public class RepositoryManageServiceException extends BusinessException {
|
||||
|
||||
RepositoryManageServiceException(){
|
||||
super();
|
||||
}
|
||||
|
||||
public RepositoryManageServiceException(Exception e){
|
||||
super(e);
|
||||
}
|
||||
|
||||
RepositoryManageServiceException(Exception e, String exceptionDesc){
|
||||
super(e, exceptionDesc);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* StockRecordManageService异常
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/8.
|
||||
*/
|
||||
public class StockRecordManageServiceException extends BusinessException {
|
||||
|
||||
public StockRecordManageServiceException(){
|
||||
super();
|
||||
}
|
||||
|
||||
public StockRecordManageServiceException(Exception e){
|
||||
super(e);
|
||||
}
|
||||
|
||||
public StockRecordManageServiceException(Exception e, String exceptionDesc){
|
||||
super(e, exceptionDesc);
|
||||
}
|
||||
|
||||
public StockRecordManageServiceException(String exceptionDesc){
|
||||
super(exceptionDesc);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* StorageManageServiceException异常
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/8.
|
||||
*/
|
||||
public class StorageManageServiceException extends BusinessException {
|
||||
|
||||
StorageManageServiceException(){
|
||||
super();
|
||||
}
|
||||
|
||||
public StorageManageServiceException(Exception e){
|
||||
super(e);
|
||||
}
|
||||
|
||||
StorageManageServiceException(Exception e, String exceptionDesc){
|
||||
super(e, exceptionDesc);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* SupplierManageService异常
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/8.
|
||||
*/
|
||||
public class SupplierManageServiceException extends BusinessException {
|
||||
|
||||
SupplierManageServiceException(){
|
||||
super();
|
||||
}
|
||||
|
||||
public SupplierManageServiceException(Exception e){
|
||||
super(e);
|
||||
}
|
||||
|
||||
SupplierManageServiceException(Exception e, String exceptionDesc){
|
||||
super(e, exceptionDesc);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* 系统操作日志 Service 异常
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/4/7.
|
||||
*/
|
||||
public class SystemLogServiceException extends BusinessException {
|
||||
|
||||
public SystemLogServiceException(){
|
||||
super();
|
||||
}
|
||||
|
||||
public SystemLogServiceException(Exception e){
|
||||
super(e);
|
||||
}
|
||||
|
||||
public SystemLogServiceException(Exception e, String exceptionDesc){
|
||||
super(e, exceptionDesc);
|
||||
}
|
||||
|
||||
public SystemLogServiceException(String exceptionDesc){
|
||||
super(exceptionDesc);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* AccountServiceException异常
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/8.
|
||||
*/
|
||||
public class UserAccountServiceException extends BusinessException {
|
||||
|
||||
public static final String PASSWORD_ERROR = "passwordError";
|
||||
public static final String PASSWORD_UNMATCH = "passwordUnmatched";
|
||||
|
||||
public UserAccountServiceException() {
|
||||
super();
|
||||
}
|
||||
|
||||
public UserAccountServiceException(String exceptionDesc) {
|
||||
super(null, exceptionDesc);
|
||||
}
|
||||
|
||||
UserAccountServiceException(Exception e) {
|
||||
super(e);
|
||||
}
|
||||
|
||||
UserAccountServiceException(Exception e, String exceptionDesc) {
|
||||
super(e, exceptionDesc);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.ken.wms.exception;
|
||||
|
||||
/**
|
||||
* UserInfoService异常
|
||||
*
|
||||
* @author Ken
|
||||
* @since 2017/3/8.
|
||||
*/
|
||||
public class UserInfoServiceException extends BusinessException {
|
||||
|
||||
public UserInfoServiceException(){
|
||||
super();
|
||||
}
|
||||
|
||||
public UserInfoServiceException(Exception e){
|
||||
super(e);
|
||||
}
|
||||
|
||||
public UserInfoServiceException(Exception e, String exceptionDesc){
|
||||
super(e, exceptionDesc);
|
||||
}
|
||||
|
||||
public UserInfoServiceException(String exceptionDesc){
|
||||
super(exceptionDesc);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.ken.wms.security.controller;
|
||||
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.subject.Subject;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* 页面重定向
|
||||
*
|
||||
* @author ken
|
||||
* @since 2017/2/27.
|
||||
*/
|
||||
@RequestMapping("/")
|
||||
@Controller
|
||||
public class PageForwardHandler {
|
||||
|
||||
/**
|
||||
* 内部重定向到登陆页面
|
||||
*
|
||||
* @return 跳转的 jsp
|
||||
*/
|
||||
@RequestMapping("login")
|
||||
public String loginPageForward() {
|
||||
// 判断但钱用户是否已经登陆
|
||||
Subject currentSubject = SecurityUtils.getSubject();
|
||||
if (!currentSubject.isAuthenticated())
|
||||
return "login";
|
||||
else
|
||||
return "mainPage";
|
||||
}
|
||||
|
||||
/**
|
||||
* 内部重定向到主页面
|
||||
*
|
||||
* @return 跳转的 jsp
|
||||
*/
|
||||
@RequestMapping("")
|
||||
public String showLoginView() {
|
||||
return "mainPage";
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue