Commit d5cde3d8361401ed928a9af662f8e174919fdfea
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
# Conflicts: # .idea/compiler.xml # .idea/workspace.xml # src/main/java/com/huaheng/pc/system/user/controller/UserController.java
Showing
65 changed files
with
1788 additions
and
1479 deletions
.gitignore
.idea/MyBatisCodeHelperDatasource.xml
@@ -6,9 +6,9 @@ | @@ -6,9 +6,9 @@ | ||
6 | <option name="addSerializeUid" value="true" /> | 6 | <option name="addSerializeUid" value="true" /> |
7 | <option name="generateService" value="true" /> | 7 | <option name="generateService" value="true" /> |
8 | <option name="generateServiceInterface" value="true" /> | 8 | <option name="generateServiceInterface" value="true" /> |
9 | - <option name="javaMapperPackage" value="com.huaheng.pc.system.userWarehousel.mapper" /> | 9 | + <option name="javaMapperPackage" value="com.huaheng.pc.config.containerCapacityl.mapper" /> |
10 | <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> | 10 | <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> |
11 | - <option name="javaModelPackage" value="com.huaheng.pc.system.userWarehousel.domain" /> | 11 | + <option name="javaModelPackage" value="com.huaheng.pc.config.containerCapacityl.domain" /> |
12 | <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> | 12 | <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> |
13 | <option name="lastDatabaseCrudChooseModuleName" value="huaheng" /> | 13 | <option name="lastDatabaseCrudChooseModuleName" value="huaheng" /> |
14 | <option name="moduleNameToPackageAndPathMap"> | 14 | <option name="moduleNameToPackageAndPathMap"> |
@@ -30,15 +30,15 @@ | @@ -30,15 +30,15 @@ | ||
30 | <entry key="huaheng"> | 30 | <entry key="huaheng"> |
31 | <value> | 31 | <value> |
32 | <UserPackageAndPathInfoByModule> | 32 | <UserPackageAndPathInfoByModule> |
33 | - <option name="javaMapperPackage" value="com.huaheng.pc.system.userWarehousel.mapper" /> | 33 | + <option name="javaMapperPackage" value="com.huaheng.pc.config.containerCapacityl.mapper" /> |
34 | <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> | 34 | <option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" /> |
35 | - <option name="javaModelPacakge" value="com.huaheng.pc.system.userWarehousel.domain" /> | 35 | + <option name="javaModelPacakge" value="com.huaheng.pc.config.containerCapacityl.domain" /> |
36 | <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> | 36 | <option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" /> |
37 | - <option name="javaServiceInterfacePackage" value="com.huaheng.pc.system.userWarehousel.service" /> | 37 | + <option name="javaServiceInterfacePackage" value="com.huaheng.pc.config.containerCapacityl.service" /> |
38 | <option name="javaServiceInterfacePath" value="$PROJECT_DIR$/src/main/java" /> | 38 | <option name="javaServiceInterfacePath" value="$PROJECT_DIR$/src/main/java" /> |
39 | - <option name="javaServicePackage" value="com.huaheng.pc.system.userWarehousel.service" /> | 39 | + <option name="javaServicePackage" value="com.huaheng.pc.config.containerCapacityl.service" /> |
40 | <option name="javaServicePath" value="$PROJECT_DIR$/src/main/java" /> | 40 | <option name="javaServicePath" value="$PROJECT_DIR$/src/main/java" /> |
41 | - <option name="xmlPackage" value="system" /> | 41 | + <option name="xmlPackage" value="config" /> |
42 | <option name="xmlPath" value="E:\code\wms2\src\main\resources\mybatis" /> | 42 | <option name="xmlPath" value="E:\code\wms2\src\main\resources\mybatis" /> |
43 | </UserPackageAndPathInfoByModule> | 43 | </UserPackageAndPathInfoByModule> |
44 | </value> | 44 | </value> |
@@ -77,6 +77,16 @@ | @@ -77,6 +77,16 @@ | ||
77 | </TableGenerateConfig> | 77 | </TableGenerateConfig> |
78 | </value> | 78 | </value> |
79 | </entry> | 79 | </entry> |
80 | + <entry key="wms_v2:container_capacity"> | ||
81 | + <value> | ||
82 | + <TableGenerateConfig> | ||
83 | + <option name="generatedKey" value="id" /> | ||
84 | + <option name="javaModelName" value="ContainerCapacity" /> | ||
85 | + <option name="moduleName" value="huaheng" /> | ||
86 | + <option name="useActualColumnName" value="true" /> | ||
87 | + </TableGenerateConfig> | ||
88 | + </value> | ||
89 | + </entry> | ||
80 | <entry key="wms_v2:container_type"> | 90 | <entry key="wms_v2:container_type"> |
81 | <value> | 91 | <value> |
82 | <TableGenerateConfig> | 92 | <TableGenerateConfig> |
@@ -283,7 +293,7 @@ | @@ -283,7 +293,7 @@ | ||
283 | <option name="useLomBokOnModel" value="true" /> | 293 | <option name="useLomBokOnModel" value="true" /> |
284 | <option name="useSwagger" value="true" /> | 294 | <option name="useSwagger" value="true" /> |
285 | <option name="userMybatisPlus" value="true" /> | 295 | <option name="userMybatisPlus" value="true" /> |
286 | - <option name="xmlMapperPackage" value="system" /> | 296 | + <option name="xmlMapperPackage" value="config" /> |
287 | <option name="xmlMapperPath" value="E:\code\wms2\src\main\resources\mybatis" /> | 297 | <option name="xmlMapperPath" value="E:\code\wms2\src\main\resources\mybatis" /> |
288 | </ProjectProfile> | 298 | </ProjectProfile> |
289 | </option> | 299 | </option> |
.idea/encodings.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <project version="4"> | 2 | <project version="4"> |
3 | - <component name="Encoding"> | 3 | + <component name="Encoding" native2AsciiForPropertiesFiles="true" defaultCharsetForPropertiesFiles="UTF-8"> |
4 | <file url="file://$PROJECT_DIR$" charset="UTF-8" /> | 4 | <file url="file://$PROJECT_DIR$" charset="UTF-8" /> |
5 | + <file url="PROJECT" charset="UTF-8" /> | ||
5 | </component> | 6 | </component> |
6 | </project> | 7 | </project> |
7 | \ No newline at end of file | 8 | \ No newline at end of file |
.idea/libraries/Maven__com_baomidou_mybatis_plus_3_1_2.xml deleted
1 | -<component name="libraryTable"> | ||
2 | - <library name="Maven: com.baomidou:mybatis-plus:3.1.2"> | ||
3 | - <CLASSES> | ||
4 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus/3.1.2/mybatis-plus-3.1.2.jar!/" /> | ||
5 | - </CLASSES> | ||
6 | - <JAVADOC> | ||
7 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus/3.1.2/mybatis-plus-3.1.2-javadoc.jar!/" /> | ||
8 | - </JAVADOC> | ||
9 | - <SOURCES> | ||
10 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus/3.1.2/mybatis-plus-3.1.2-sources.jar!/" /> | ||
11 | - </SOURCES> | ||
12 | - </library> | ||
13 | -</component> | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |
.idea/libraries/Maven__com_baomidou_mybatis_plus_annotation_3_1_2.xml deleted
1 | -<component name="libraryTable"> | ||
2 | - <library name="Maven: com.baomidou:mybatis-plus-annotation:3.1.2"> | ||
3 | - <CLASSES> | ||
4 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-annotation/3.1.2/mybatis-plus-annotation-3.1.2.jar!/" /> | ||
5 | - </CLASSES> | ||
6 | - <JAVADOC> | ||
7 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-annotation/3.1.2/mybatis-plus-annotation-3.1.2-javadoc.jar!/" /> | ||
8 | - </JAVADOC> | ||
9 | - <SOURCES> | ||
10 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-annotation/3.1.2/mybatis-plus-annotation-3.1.2-sources.jar!/" /> | ||
11 | - </SOURCES> | ||
12 | - </library> | ||
13 | -</component> | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |
.idea/libraries/Maven__com_baomidou_mybatis_plus_boot_starter_3_1_2.xml deleted
1 | -<component name="libraryTable"> | ||
2 | - <library name="Maven: com.baomidou:mybatis-plus-boot-starter:3.1.2"> | ||
3 | - <CLASSES> | ||
4 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-boot-starter/3.1.2/mybatis-plus-boot-starter-3.1.2.jar!/" /> | ||
5 | - </CLASSES> | ||
6 | - <JAVADOC> | ||
7 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-boot-starter/3.1.2/mybatis-plus-boot-starter-3.1.2-javadoc.jar!/" /> | ||
8 | - </JAVADOC> | ||
9 | - <SOURCES> | ||
10 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-boot-starter/3.1.2/mybatis-plus-boot-starter-3.1.2-sources.jar!/" /> | ||
11 | - </SOURCES> | ||
12 | - </library> | ||
13 | -</component> | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |
.idea/libraries/Maven__com_baomidou_mybatis_plus_core_3_1_2.xml deleted
1 | -<component name="libraryTable"> | ||
2 | - <library name="Maven: com.baomidou:mybatis-plus-core:3.1.2"> | ||
3 | - <CLASSES> | ||
4 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-core/3.1.2/mybatis-plus-core-3.1.2.jar!/" /> | ||
5 | - </CLASSES> | ||
6 | - <JAVADOC> | ||
7 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-core/3.1.2/mybatis-plus-core-3.1.2-javadoc.jar!/" /> | ||
8 | - </JAVADOC> | ||
9 | - <SOURCES> | ||
10 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-core/3.1.2/mybatis-plus-core-3.1.2-sources.jar!/" /> | ||
11 | - </SOURCES> | ||
12 | - </library> | ||
13 | -</component> | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |
.idea/libraries/Maven__com_baomidou_mybatis_plus_extension_3_1_2.xml deleted
1 | -<component name="libraryTable"> | ||
2 | - <library name="Maven: com.baomidou:mybatis-plus-extension:3.1.2"> | ||
3 | - <CLASSES> | ||
4 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-extension/3.1.2/mybatis-plus-extension-3.1.2.jar!/" /> | ||
5 | - </CLASSES> | ||
6 | - <JAVADOC> | ||
7 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-extension/3.1.2/mybatis-plus-extension-3.1.2-javadoc.jar!/" /> | ||
8 | - </JAVADOC> | ||
9 | - <SOURCES> | ||
10 | - <root url="jar://$MAVEN_REPOSITORY$/com/baomidou/mybatis-plus-extension/3.1.2/mybatis-plus-extension-3.1.2-sources.jar!/" /> | ||
11 | - </SOURCES> | ||
12 | - </library> | ||
13 | -</component> | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |
.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_4.xml deleted
1 | -<component name="libraryTable"> | ||
2 | - <library name="Maven: commons-fileupload:commons-fileupload:1.4"> | ||
3 | - <CLASSES> | ||
4 | - <root url="jar://$MAVEN_REPOSITORY$/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar!/" /> | ||
5 | - </CLASSES> | ||
6 | - <JAVADOC> | ||
7 | - <root url="jar://$MAVEN_REPOSITORY$/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4-javadoc.jar!/" /> | ||
8 | - </JAVADOC> | ||
9 | - <SOURCES> | ||
10 | - <root url="jar://$MAVEN_REPOSITORY$/commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4-sources.jar!/" /> | ||
11 | - </SOURCES> | ||
12 | - </library> | ||
13 | -</component> | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |
.idea/libraries/Maven__commons_io_commons_io_2_2.xml deleted
1 | -<component name="libraryTable"> | ||
2 | - <library name="Maven: commons-io:commons-io:2.2"> | ||
3 | - <CLASSES> | ||
4 | - <root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.2/commons-io-2.2.jar!/" /> | ||
5 | - </CLASSES> | ||
6 | - <JAVADOC> | ||
7 | - <root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.2/commons-io-2.2-javadoc.jar!/" /> | ||
8 | - </JAVADOC> | ||
9 | - <SOURCES> | ||
10 | - <root url="jar://$MAVEN_REPOSITORY$/commons-io/commons-io/2.2/commons-io-2.2-sources.jar!/" /> | ||
11 | - </SOURCES> | ||
12 | - </library> | ||
13 | -</component> | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |
.idea/libraries/Maven__org_mybatis_mybatis_3_5_1.xml deleted
1 | -<component name="libraryTable"> | ||
2 | - <library name="Maven: org.mybatis:mybatis:3.5.1"> | ||
3 | - <CLASSES> | ||
4 | - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis/3.5.1/mybatis-3.5.1.jar!/" /> | ||
5 | - </CLASSES> | ||
6 | - <JAVADOC> | ||
7 | - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis/3.5.1/mybatis-3.5.1-javadoc.jar!/" /> | ||
8 | - </JAVADOC> | ||
9 | - <SOURCES> | ||
10 | - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis/3.5.1/mybatis-3.5.1-sources.jar!/" /> | ||
11 | - </SOURCES> | ||
12 | - </library> | ||
13 | -</component> | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |
.idea/libraries/Maven__org_mybatis_mybatis_spring_2_0_1.xml deleted
1 | -<component name="libraryTable"> | ||
2 | - <library name="Maven: org.mybatis:mybatis-spring:2.0.1"> | ||
3 | - <CLASSES> | ||
4 | - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis-spring/2.0.1/mybatis-spring-2.0.1.jar!/" /> | ||
5 | - </CLASSES> | ||
6 | - <JAVADOC> | ||
7 | - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis-spring/2.0.1/mybatis-spring-2.0.1-javadoc.jar!/" /> | ||
8 | - </JAVADOC> | ||
9 | - <SOURCES> | ||
10 | - <root url="jar://$MAVEN_REPOSITORY$/org/mybatis/mybatis-spring/2.0.1/mybatis-spring-2.0.1-sources.jar!/" /> | ||
11 | - </SOURCES> | ||
12 | - </library> | ||
13 | -</component> | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |
.idea/libraries/Maven__org_projectlombok_lombok_1_18_8.xml deleted
1 | -<component name="libraryTable"> | ||
2 | - <library name="Maven: org.projectlombok:lombok:1.18.8"> | ||
3 | - <CLASSES> | ||
4 | - <root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.8/lombok-1.18.8.jar!/" /> | ||
5 | - </CLASSES> | ||
6 | - <JAVADOC> | ||
7 | - <root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.8/lombok-1.18.8-javadoc.jar!/" /> | ||
8 | - </JAVADOC> | ||
9 | - <SOURCES> | ||
10 | - <root url="jar://$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.8/lombok-1.18.8-sources.jar!/" /> | ||
11 | - </SOURCES> | ||
12 | - </library> | ||
13 | -</component> | ||
14 | \ No newline at end of file | 0 | \ No newline at end of file |
.idea/misc.xml
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <project version="4"> | 2 | <project version="4"> |
3 | <component name="ExternalStorageConfigurationManager" enabled="true" /> | 3 | <component name="ExternalStorageConfigurationManager" enabled="true" /> |
4 | + <component name="JavaScriptSettings"> | ||
5 | + <option name="languageLevel" value="ES6" /> | ||
6 | + </component> | ||
4 | <component name="MavenProjectsManager"> | 7 | <component name="MavenProjectsManager"> |
5 | <option name="originalFiles"> | 8 | <option name="originalFiles"> |
6 | <list> | 9 | <list> |
pom.xml
@@ -5,16 +5,16 @@ | @@ -5,16 +5,16 @@ | ||
5 | 5 | ||
6 | <groupId>com.huaheng</groupId> | 6 | <groupId>com.huaheng</groupId> |
7 | <artifactId>huaheng</artifactId> | 7 | <artifactId>huaheng</artifactId> |
8 | - <version>2.3.0</version> | 8 | + <version>4.0.0</version> |
9 | <packaging>jar</packaging> | 9 | <packaging>jar</packaging> |
10 | 10 | ||
11 | <name>huaheng</name> | 11 | <name>huaheng</name> |
12 | - <description>华恒管理系统</description> | 12 | + <description>华恒WMS管理系统</description> |
13 | 13 | ||
14 | <parent> | 14 | <parent> |
15 | <groupId>org.springframework.boot</groupId> | 15 | <groupId>org.springframework.boot</groupId> |
16 | <artifactId>spring-boot-starter-parent</artifactId> | 16 | <artifactId>spring-boot-starter-parent</artifactId> |
17 | - <version>2.0.3.RELEASE</version> | 17 | + <version>2.1.3.RELEASE</version> |
18 | <relativePath /> | 18 | <relativePath /> |
19 | </parent> | 19 | </parent> |
20 | 20 | ||
@@ -22,20 +22,20 @@ | @@ -22,20 +22,20 @@ | ||
22 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | 22 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
23 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | 23 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
24 | <java.version>1.8</java.version> | 24 | <java.version>1.8</java.version> |
25 | - <shiro.version>1.4.0</shiro.version> | 25 | + <shiro.version>1.4.1</shiro.version> |
26 | <thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version> | 26 | <thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version> |
27 | <!--<mybatis.spring.boot.starter.version>1.3.2</mybatis.spring.boot.starter.version>--> | 27 | <!--<mybatis.spring.boot.starter.version>1.3.2</mybatis.spring.boot.starter.version>--> |
28 | <pagehelper.spring.boot.starter.version>1.2.12</pagehelper.spring.boot.starter.version> | 28 | <pagehelper.spring.boot.starter.version>1.2.12</pagehelper.spring.boot.starter.version> |
29 | - <fastjson.version>1.2.47</fastjson.version> | ||
30 | - <druid.version>1.1.10</druid.version> | ||
31 | - <commons.io.version>2.2</commons.io.version> | 29 | + <fastjson.version>1.2.59</fastjson.version> |
30 | + <druid.version>1.1.18</druid.version> | ||
31 | + <commons.io.version>2.5</commons.io.version> | ||
32 | <commons.fileupload.version>1.4</commons.fileupload.version> | 32 | <commons.fileupload.version>1.4</commons.fileupload.version> |
33 | - <bitwalker.version>1.19</bitwalker.version> | 33 | + <bitwalker.version>1.21</bitwalker.version> |
34 | <lombok.version>1.18.8</lombok.version> | 34 | <lombok.version>1.18.8</lombok.version> |
35 | <velocity.version>1.7</velocity.version> | 35 | <velocity.version>1.7</velocity.version> |
36 | <kaptcha.version>2.3.2</kaptcha.version> | 36 | <kaptcha.version>2.3.2</kaptcha.version> |
37 | - <swagger.version>2.7.0</swagger.version> | ||
38 | - <jsoup.version>1.11.3</jsoup.version> | 37 | + <swagger.version>2.9.2</swagger.version> |
38 | + <jsoup.version>1.12.1</jsoup.version> | ||
39 | <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format> | 39 | <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format> |
40 | </properties> | 40 | </properties> |
41 | 41 | ||
@@ -114,16 +114,10 @@ | @@ -114,16 +114,10 @@ | ||
114 | </dependency> | 114 | </dependency> |
115 | 115 | ||
116 | <!--阿里数据库连接池 --> | 116 | <!--阿里数据库连接池 --> |
117 | -<!-- <dependency> | ||
118 | - <groupId>com.alibaba</groupId> | ||
119 | - <artifactId>druid-spring-boot-starter</artifactId> | ||
120 | - <version>${druid.version}</version> | ||
121 | - </dependency>--> | ||
122 | - | ||
123 | <dependency> | 117 | <dependency> |
124 | <groupId>com.alibaba</groupId> | 118 | <groupId>com.alibaba</groupId> |
125 | <artifactId>druid-spring-boot-starter</artifactId> | 119 | <artifactId>druid-spring-boot-starter</artifactId> |
126 | - <version>1.1.17</version> | 120 | + <version>${druid.version}</version> |
127 | </dependency> | 121 | </dependency> |
128 | 122 | ||
129 | <!--常用工具类 --> | 123 | <!--常用工具类 --> |
@@ -199,12 +193,12 @@ | @@ -199,12 +193,12 @@ | ||
199 | <groupId>org.quartz-scheduler</groupId> | 193 | <groupId>org.quartz-scheduler</groupId> |
200 | <artifactId>quartz</artifactId> | 194 | <artifactId>quartz</artifactId> |
201 | <version>2.3.1</version> | 195 | <version>2.3.1</version> |
202 | - <exclusions> | 196 | + <!--<exclusions> |
203 | <exclusion> | 197 | <exclusion> |
204 | <groupId>com.mchange</groupId> | 198 | <groupId>com.mchange</groupId> |
205 | <artifactId>c3p0</artifactId> | 199 | <artifactId>c3p0</artifactId> |
206 | </exclusion> | 200 | </exclusion> |
207 | - </exclusions> | 201 | + </exclusions>--> |
208 | </dependency> | 202 | </dependency> |
209 | 203 | ||
210 | <!--velocity代码生成使用模板 --> | 204 | <!--velocity代码生成使用模板 --> |
@@ -262,51 +256,13 @@ | @@ -262,51 +256,13 @@ | ||
262 | <!--<version>6.0.0</version>--> | 256 | <!--<version>6.0.0</version>--> |
263 | <!--</dependency>--> | 257 | <!--</dependency>--> |
264 | 258 | ||
265 | - <!--共享Session-spring-session-data-redis分布式系统中--> | ||
266 | - <dependency> | ||
267 | - <groupId>org.springframework.session</groupId> | ||
268 | - <artifactId>spring-session-data-redis</artifactId> | ||
269 | - </dependency> | ||
270 | - <!-- Spring Boot Redis依赖 --> | ||
271 | - <dependency> | ||
272 | - <groupId>org.springframework.boot</groupId> | ||
273 | - <artifactId>spring-boot-starter-data-redis</artifactId> | ||
274 | - <!-- 1.5的版本默认采用的连接池技术是jedis 2.0以上版本默认连接池是lettuce, 在这里采用jedis,所以需要排除lettuce的jar --> | ||
275 | - <exclusions> | ||
276 | - <exclusion> | ||
277 | - <groupId>redis.clients</groupId> | ||
278 | - <artifactId>jedis</artifactId> | ||
279 | - </exclusion> | ||
280 | - <exclusion> | ||
281 | - <groupId>io.lettuce</groupId> | ||
282 | - <artifactId>lettuce-core</artifactId> | ||
283 | - </exclusion> | ||
284 | - </exclusions> | ||
285 | - </dependency> | ||
286 | - | ||
287 | - <!-- 添加jedis客户端 --> | ||
288 | - <dependency> | ||
289 | - <groupId>redis.clients</groupId> | ||
290 | - <artifactId>jedis</artifactId> | ||
291 | - </dependency> | ||
292 | - | ||
293 | - <!--spring2.0集成redis所需common-pool2--> | ||
294 | - <!-- 必须加上,jedis依赖此 --> | ||
295 | - <dependency> | ||
296 | - <groupId>org.apache.commons</groupId> | ||
297 | - <artifactId>commons-pool2</artifactId> | ||
298 | - <version>2.5.0</version> | ||
299 | - </dependency> | ||
300 | - | ||
301 | - <!-- 将作为Redis对象序列化器 --> | 259 | + <!--json库--> |
302 | <dependency> | 260 | <dependency> |
303 | <groupId>com.alibaba</groupId> | 261 | <groupId>com.alibaba</groupId> |
304 | <artifactId>fastjson</artifactId> | 262 | <artifactId>fastjson</artifactId> |
305 | - <version>1.2.47</version> | 263 | + <version>${fastjson.version}</version> |
306 | </dependency> | 264 | </dependency> |
307 | 265 | ||
308 | - | ||
309 | - | ||
310 | <dependency> | 266 | <dependency> |
311 | <groupId>org.apache.httpcomponents</groupId> | 267 | <groupId>org.apache.httpcomponents</groupId> |
312 | <artifactId>httpclient</artifactId> | 268 | <artifactId>httpclient</artifactId> |
@@ -317,25 +273,29 @@ | @@ -317,25 +273,29 @@ | ||
317 | <artifactId>httpcore</artifactId> | 273 | <artifactId>httpcore</artifactId> |
318 | </dependency> | 274 | </dependency> |
319 | 275 | ||
320 | - | ||
321 | <dependency> | 276 | <dependency> |
322 | <groupId>org.springframework.boot</groupId> | 277 | <groupId>org.springframework.boot</groupId> |
323 | <artifactId>spring-boot-starter-mail</artifactId> | 278 | <artifactId>spring-boot-starter-mail</artifactId> |
324 | </dependency> | 279 | </dependency> |
325 | 280 | ||
326 | - | ||
327 | - | ||
328 | <dependency> | 281 | <dependency> |
329 | <groupId>com.google.code.gson</groupId> | 282 | <groupId>com.google.code.gson</groupId> |
330 | <artifactId>gson</artifactId> | 283 | <artifactId>gson</artifactId> |
331 | <version>2.8.2</version> | 284 | <version>2.8.2</version> |
332 | </dependency> | 285 | </dependency> |
333 | 286 | ||
334 | - <dependency> | 287 | +<!-- <dependency> |
335 | <groupId>com.huaheng.soft</groupId> | 288 | <groupId>com.huaheng.soft</groupId> |
336 | <artifactId>echarts</artifactId> | 289 | <artifactId>echarts</artifactId> |
337 | <version>1.1</version> | 290 | <version>1.1</version> |
338 | - </dependency> | 291 | + </dependency>--> |
292 | + | ||
293 | + <dependency> | ||
294 | + <groupId>com.github.abel533</groupId> | ||
295 | + <artifactId>ECharts</artifactId> | ||
296 | + <version>3.0.0.5</version> | ||
297 | + </dependency> | ||
298 | + | ||
339 | <dependency> | 299 | <dependency> |
340 | <groupId>org.junit.jupiter</groupId> | 300 | <groupId>org.junit.jupiter</groupId> |
341 | <artifactId>junit-jupiter-api</artifactId> | 301 | <artifactId>junit-jupiter-api</artifactId> |
@@ -392,6 +352,38 @@ | @@ -392,6 +352,38 @@ | ||
392 | </plugins> | 352 | </plugins> |
393 | </build> | 353 | </build> |
394 | 354 | ||
355 | + <!--阿里maven地址--> | ||
356 | + <!--<repositories> | ||
357 | + <repository> | ||
358 | + <id>nexus-aliyun</id> | ||
359 | + <name>Nexus aliyun</name> | ||
360 | + <layout>default</layout> | ||
361 | + <url>http://maven.aliyun.com/nexus/content/groups/public/</url> | ||
362 | + <snapshots> | ||
363 | + <enabled>false</enabled> | ||
364 | + </snapshots> | ||
365 | + <releases> | ||
366 | + <enabled>true</enabled> | ||
367 | + </releases> | ||
368 | + </repository> | ||
369 | + </repositories> | ||
370 | + | ||
371 | + <pluginRepositories> | ||
372 | + <pluginRepository> | ||
373 | + <id>nexus-aliyun</id> | ||
374 | + <name>Nexus aliyun</name> | ||
375 | + <url>http://maven.aliyun.com/nexus/content/groups/public/</url> | ||
376 | + <snapshots> | ||
377 | + <enabled>false</enabled> | ||
378 | + </snapshots> | ||
379 | + <releases> | ||
380 | + <enabled>true</enabled> | ||
381 | + </releases> | ||
382 | + </pluginRepository> | ||
383 | + </pluginRepositories>--> | ||
384 | + | ||
385 | + <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore --> | ||
386 | + | ||
395 | <repositories> | 387 | <repositories> |
396 | <repository> | 388 | <repository> |
397 | <id>nexus</id> | 389 | <id>nexus</id> |
src/main/java/com/huaheng/HuaHengApplication.java
@@ -10,8 +10,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; | @@ -10,8 +10,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; | ||
10 | * | 10 | * |
11 | * @author huaheng | 11 | * @author huaheng |
12 | */ | 12 | */ |
13 | -//@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) | ||
14 | -@MapperScan("com.huaheng.pc.**.**.mapper") | 13 | +@MapperScan({"com.huaheng.pc.**.**.mapper","com.huaheng.common.**.**.mapper"}) |
15 | //添加SecurityAutoConfiguration.class,防止报java.lang.ArrayStoreException错 | 14 | //添加SecurityAutoConfiguration.class,防止报java.lang.ArrayStoreException错 |
16 | @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) | 15 | @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) |
17 | public class HuaHengApplication | 16 | public class HuaHengApplication |
@@ -20,7 +19,7 @@ public class HuaHengApplication | @@ -20,7 +19,7 @@ public class HuaHengApplication | ||
20 | { | 19 | { |
21 | // System.setProperty("spring.devtools.restart.enabled", "false"); | 20 | // System.setProperty("spring.devtools.restart.enabled", "false"); |
22 | SpringApplication.run(HuaHengApplication.class, args); | 21 | SpringApplication.run(HuaHengApplication.class, args); |
23 | - System.out.println("(♥◠‿◠)ノ゙ 华恒启动成功 ლ(´ڡ`ლ)゙ \n" + | 22 | + System.out.println("*************** 华恒WMS启动成功 ***************\n" + |
24 | " .-------. ____ __ \n" + | 23 | " .-------. ____ __ \n" + |
25 | " | _ _ \\ \\ \\ / / \n" + | 24 | " | _ _ \\ \\ \\ / / \n" + |
26 | " | ( ' ) | \\ _. / ' \n" + | 25 | " | ( ' ) | \\ _. / ' \n" + |
src/main/java/com/huaheng/common/redis/RedisConfig.java deleted
1 | -package com.huaheng.common.redis; | ||
2 | - | ||
3 | -import org.springframework.beans.factory.annotation.Autowired; | ||
4 | -import org.springframework.context.annotation.Bean; | ||
5 | -import org.springframework.context.annotation.Configuration; | ||
6 | -import org.springframework.data.redis.connection.RedisConnectionFactory; | ||
7 | -import org.springframework.data.redis.core.*; | ||
8 | -import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer; | ||
9 | -import org.springframework.data.redis.serializer.StringRedisSerializer; | ||
10 | - | ||
11 | -@Configuration | ||
12 | -public class RedisConfig { | ||
13 | - | ||
14 | - /** | ||
15 | - * 注入 RedisConnectionFactory | ||
16 | - */ | ||
17 | - @Autowired | ||
18 | - RedisConnectionFactory redisConnectionFactory; | ||
19 | - | ||
20 | - /** | ||
21 | - * 实例化 RedisTemplate 对象 | ||
22 | - * | ||
23 | - * @return | ||
24 | - */ | ||
25 | - @Bean | ||
26 | - public RedisTemplate<String, Object> functionDomainRedisTemplate() { | ||
27 | - RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>(); | ||
28 | - initDomainRedisTemplate(redisTemplate, redisConnectionFactory); | ||
29 | - return redisTemplate; | ||
30 | - } | ||
31 | - | ||
32 | - /** | ||
33 | - * 设置数据存入 redis 的序列化方式 | ||
34 | - * | ||
35 | - * @param redisTemplate | ||
36 | - * @param factory | ||
37 | - */ | ||
38 | - private void initDomainRedisTemplate(RedisTemplate<String, Object> redisTemplate, RedisConnectionFactory factory) { | ||
39 | - redisTemplate.setKeySerializer(new StringRedisSerializer()); | ||
40 | - redisTemplate.setHashKeySerializer(new StringRedisSerializer()); | ||
41 | - redisTemplate.setHashValueSerializer(new JdkSerializationRedisSerializer()); | ||
42 | - redisTemplate.setValueSerializer(new JdkSerializationRedisSerializer()); | ||
43 | - redisTemplate.setConnectionFactory(factory); | ||
44 | - } | ||
45 | - | ||
46 | - /** | ||
47 | - * 实例化 HashOperations 对象,可以使用 Hash 类型操作 | ||
48 | - * | ||
49 | - * @param redisTemplate | ||
50 | - * @return | ||
51 | - */ | ||
52 | - @Bean | ||
53 | - public HashOperations<String, String, Object> hashOperations(RedisTemplate<String, Object> redisTemplate) { | ||
54 | - return redisTemplate.opsForHash(); | ||
55 | - } | ||
56 | - | ||
57 | - /** | ||
58 | - * 实例化 ValueOperations 对象,可以使用 String 操作 | ||
59 | - * | ||
60 | - * @param redisTemplate | ||
61 | - * @return | ||
62 | - */ | ||
63 | - @Bean | ||
64 | - public ValueOperations<String, Object> valueOperations(RedisTemplate<String, Object> redisTemplate) { | ||
65 | - return redisTemplate.opsForValue(); | ||
66 | - } | ||
67 | - | ||
68 | - /** | ||
69 | - * 实例化 ListOperations 对象,可以使用 List 操作 | ||
70 | - * | ||
71 | - * @param redisTemplate | ||
72 | - * @return | ||
73 | - */ | ||
74 | - @Bean | ||
75 | - public ListOperations<String, Object> listOperations(RedisTemplate<String, Object> redisTemplate) { | ||
76 | - return redisTemplate.opsForList(); | ||
77 | - } | ||
78 | - | ||
79 | - /** | ||
80 | - * 实例化 SetOperations 对象,可以使用 Set 操作 | ||
81 | - * | ||
82 | - * @param redisTemplate | ||
83 | - * @return | ||
84 | - */ | ||
85 | - @Bean | ||
86 | - public SetOperations<String, Object> setOperations(RedisTemplate<String, Object> redisTemplate) { | ||
87 | - return redisTemplate.opsForSet(); | ||
88 | - } | ||
89 | - | ||
90 | - /** | ||
91 | - * 实例化 ZSetOperations 对象,可以使用 ZSet 操作 | ||
92 | - * | ||
93 | - * @param redisTemplate | ||
94 | - * @return | ||
95 | - */ | ||
96 | - @Bean | ||
97 | - public ZSetOperations<String, Object> zSetOperations(RedisTemplate<String, Object> redisTemplate) { | ||
98 | - return redisTemplate.opsForZSet(); | ||
99 | - } | ||
100 | -} | ||
101 | \ No newline at end of file | 0 | \ No newline at end of file |
src/main/java/com/huaheng/common/redis/controller/RedisController.java deleted
1 | -package com.huaheng.common.redis.controller; | ||
2 | - | ||
3 | -import com.huaheng.common.redis.model.RedisModel; | ||
4 | -import com.huaheng.common.redis.serviceimpl.RedisServiceImpl; | ||
5 | -import org.springframework.beans.factory.annotation.Autowired; | ||
6 | -import org.springframework.stereotype.Controller; | ||
7 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
8 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
9 | -import org.springframework.web.bind.annotation.ResponseBody; | ||
10 | -import org.springframework.web.bind.annotation.RestController; | ||
11 | - | ||
12 | -@Controller | ||
13 | -public class RedisController { | ||
14 | - | ||
15 | - @Autowired | ||
16 | - private RedisServiceImpl service; | ||
17 | - | ||
18 | - //添加 | ||
19 | -// @RequestMapping(value = "/add", method = RequestMethod.GET) | ||
20 | - public void test() { | ||
21 | - System.out.println("start....."); | ||
22 | - RedisModel m = new RedisModel(); | ||
23 | - m.setName("张三"); | ||
24 | - m.setTel("1111"); | ||
25 | - m.setAddress("长沙"); | ||
26 | - m.setRedisKey("zhangsanKey01"); | ||
27 | - service.put(m.getRedisKey(), m, -1); | ||
28 | - | ||
29 | - RedisModel m2 = new RedisModel(); | ||
30 | - m2.setName("张三2"); | ||
31 | - m2.setTel("2222"); | ||
32 | - m2.setAddress("长沙2"); | ||
33 | - m2.setRedisKey("zhangsanKey02"); | ||
34 | - service.put(m2.getRedisKey(), m2, -1); | ||
35 | - | ||
36 | - RedisModel m3 = new RedisModel(); | ||
37 | - m3.setName("张三3"); | ||
38 | - m3.setTel("2222"); | ||
39 | - m3.setAddress("长沙3"); | ||
40 | - m3.setRedisKey("zhangsanKey03"); | ||
41 | - service.put(m3.getRedisKey(), m3, -1); | ||
42 | - | ||
43 | - System.out.println("add success end..."); | ||
44 | - } | ||
45 | - | ||
46 | - //查询所有对象 | ||
47 | -// @RequestMapping(value = "/getAll", method = RequestMethod.GET) | ||
48 | -// @ResponseBody | ||
49 | - public Object getAll() { | ||
50 | - return service.getAll(); | ||
51 | - } | ||
52 | - | ||
53 | - //查询所有key | ||
54 | -// @RequestMapping(value = "/getKeys", method = RequestMethod.GET) | ||
55 | -// @ResponseBody | ||
56 | - public Object getKeys() { | ||
57 | - return service.getKeys(); | ||
58 | - } | ||
59 | - | ||
60 | - //根据key查询 | ||
61 | -// @RequestMapping(value = "/get", method = RequestMethod.GET) | ||
62 | - public Object get(String key) { | ||
63 | - RedisModel m = new RedisModel(); | ||
64 | - m.setRedisKey(key); | ||
65 | - return service.get(m.getRedisKey()); | ||
66 | - } | ||
67 | - | ||
68 | - //删除 | ||
69 | -// @RequestMapping(value = "/remove", method = RequestMethod.GET) | ||
70 | -// @ResponseBody | ||
71 | - public void remove() { | ||
72 | - RedisModel m = new RedisModel(); | ||
73 | - m.setRedisKey("zhangsanKey01"); | ||
74 | - service.remove(m.getRedisKey()); | ||
75 | - } | ||
76 | - | ||
77 | - //判断key是否存在 | ||
78 | -// @RequestMapping(value = "/isKeyExists", method = RequestMethod.GET) | ||
79 | -// @ResponseBody | ||
80 | - public void isKeyExists() { | ||
81 | - RedisModel m = new RedisModel(); | ||
82 | - m.setRedisKey("zhangsanKey01"); | ||
83 | - boolean flag = service.isKeyExists(m.getRedisKey()); | ||
84 | - System.out.println("zhangsanKey01 是否存在: "+flag); | ||
85 | - } | ||
86 | - | ||
87 | - //查询当前缓存的数量 | ||
88 | -// @RequestMapping(value = "/count", method = RequestMethod.GET) | ||
89 | -// @ResponseBody | ||
90 | - public Object count() { | ||
91 | - return service.count(); | ||
92 | - } | ||
93 | - | ||
94 | - //清空所有key | ||
95 | -// @RequestMapping(value = "/empty", method = RequestMethod.GET) | ||
96 | -// @ResponseBody | ||
97 | - public void empty() { | ||
98 | - service.empty(); | ||
99 | - } | ||
100 | -} | ||
101 | \ No newline at end of file | 0 | \ No newline at end of file |
src/main/java/com/huaheng/common/redis/model/RedisModel.java deleted
1 | -package com.huaheng.common.redis.model; | ||
2 | - | ||
3 | -import java.io.Serializable; | ||
4 | - | ||
5 | -public class RedisModel implements Serializable { | ||
6 | - | ||
7 | - | ||
8 | - private String redisKey;//redis中的key | ||
9 | - private String name;//姓名 | ||
10 | - private String tel;//电话 | ||
11 | - private String address;//住址 | ||
12 | - | ||
13 | - public String getRedisKey() { | ||
14 | - return redisKey; | ||
15 | - } | ||
16 | - | ||
17 | - public void setRedisKey(String redisKey) { | ||
18 | - this.redisKey = redisKey; | ||
19 | - } | ||
20 | - | ||
21 | - public String getName() { | ||
22 | - return name; | ||
23 | - } | ||
24 | - | ||
25 | - public void setName(String name) { | ||
26 | - this.name = name; | ||
27 | - } | ||
28 | - | ||
29 | - public String getTel() { | ||
30 | - return tel; | ||
31 | - } | ||
32 | - | ||
33 | - public void setTel(String tel) { | ||
34 | - this.tel = tel; | ||
35 | - } | ||
36 | - | ||
37 | - public String getAddress() { | ||
38 | - return address; | ||
39 | - } | ||
40 | - | ||
41 | - public void setAddress(String address) { | ||
42 | - this.address = address; | ||
43 | - } | ||
44 | - | ||
45 | -} | ||
46 | \ No newline at end of file | 0 | \ No newline at end of file |
src/main/java/com/huaheng/common/redis/service/IRedisService.java deleted
1 | -package com.huaheng.common.redis.service; | ||
2 | - | ||
3 | -import org.springframework.beans.factory.annotation.Autowired; | ||
4 | -import org.springframework.data.redis.core.HashOperations; | ||
5 | -import org.springframework.data.redis.core.RedisTemplate; | ||
6 | - | ||
7 | -import javax.annotation.Resource; | ||
8 | -import java.util.List; | ||
9 | -import java.util.Set; | ||
10 | -import java.util.concurrent.TimeUnit; | ||
11 | - | ||
12 | -public abstract class IRedisService<T> { | ||
13 | - | ||
14 | - | ||
15 | - @Autowired | ||
16 | - protected RedisTemplate<String, Object> redisTemplate; | ||
17 | - @Resource | ||
18 | - protected HashOperations<String, String, T> hashOperations; | ||
19 | - | ||
20 | - /** | ||
21 | - * 存入redis中的key | ||
22 | - * | ||
23 | - * @return | ||
24 | - */ | ||
25 | - protected abstract String getRedisKey(); | ||
26 | - | ||
27 | - | ||
28 | - /** | ||
29 | - * 添加 | ||
30 | - * | ||
31 | - * @param key key | ||
32 | - * @param doamin 对象 | ||
33 | - * @param expire 过期时间(单位:秒),传入 -1 时表示不设置过期时间 | ||
34 | - */ | ||
35 | - public void put(String key, T doamin, long expire) { | ||
36 | - hashOperations.put(getRedisKey(), key, doamin); | ||
37 | - if (expire != -1) { | ||
38 | - redisTemplate.expire(getRedisKey(), expire, TimeUnit.SECONDS); | ||
39 | - } | ||
40 | - } | ||
41 | - | ||
42 | - /** | ||
43 | - * 删除 | ||
44 | - * | ||
45 | - * @param key 传入key的名称 | ||
46 | - */ | ||
47 | - public void remove(String key) { | ||
48 | - hashOperations.delete(getRedisKey(), key); | ||
49 | - } | ||
50 | - | ||
51 | - /** | ||
52 | - * 查询 | ||
53 | - * | ||
54 | - * @param key 查询的key | ||
55 | - * @return | ||
56 | - */ | ||
57 | - public T get(String key) { | ||
58 | - return hashOperations.get(getRedisKey(), key); | ||
59 | - } | ||
60 | - | ||
61 | - /** | ||
62 | - * 获取当前redis库下所有对象 | ||
63 | - * | ||
64 | - * @return | ||
65 | - */ | ||
66 | - public List<T> getAll() { | ||
67 | - return hashOperations.values(getRedisKey()); | ||
68 | - } | ||
69 | - | ||
70 | - /** | ||
71 | - * 查询查询当前redis库下所有key | ||
72 | - * | ||
73 | - * @return | ||
74 | - */ | ||
75 | - public Set<String> getKeys() { | ||
76 | - return hashOperations.keys(getRedisKey()); | ||
77 | - } | ||
78 | - | ||
79 | - /** | ||
80 | - * 判断key是否存在redis中 | ||
81 | - * | ||
82 | - * @param key 传入key的名称 | ||
83 | - * @return | ||
84 | - */ | ||
85 | - public boolean isKeyExists(String key) { | ||
86 | - return hashOperations.hasKey(getRedisKey(), key); | ||
87 | - } | ||
88 | - | ||
89 | - /** | ||
90 | - * 查询当前key下缓存数量 | ||
91 | - * | ||
92 | - * @return | ||
93 | - */ | ||
94 | - public long count() { | ||
95 | - return hashOperations.size(getRedisKey()); | ||
96 | - } | ||
97 | - | ||
98 | - /** | ||
99 | - * 清空redis | ||
100 | - */ | ||
101 | - public void empty() { | ||
102 | - Set<String> set = hashOperations.keys(getRedisKey()); | ||
103 | - set.stream().forEach(key -> hashOperations.delete(getRedisKey(), key)); | ||
104 | - } | ||
105 | -} | ||
106 | \ No newline at end of file | 0 | \ No newline at end of file |
src/main/java/com/huaheng/common/redis/serviceimpl/RedisServiceImpl.java deleted
1 | -package com.huaheng.common.redis.serviceimpl; | ||
2 | - | ||
3 | -import com.huaheng.common.redis.model.RedisModel; | ||
4 | -import com.huaheng.common.redis.service.IRedisService; | ||
5 | -import org.springframework.stereotype.Service; | ||
6 | - | ||
7 | -@Service | ||
8 | -public class RedisServiceImpl extends IRedisService<RedisModel> { | ||
9 | - | ||
10 | - private static final String REDIS_KEY = "TEST_REDIS_KEY"; | ||
11 | - | ||
12 | - @Override | ||
13 | - protected String getRedisKey() { | ||
14 | - | ||
15 | - | ||
16 | - return this.REDIS_KEY; | ||
17 | - } | ||
18 | -} |
src/main/java/com/huaheng/pc/config/containerCapacity/controller/ContainerCapacityController.java
0 → 100644
1 | +package com.huaheng.pc.config.containerCapacity.controller; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
6 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
7 | +import com.huaheng.common.support.Convert; | ||
8 | +import com.huaheng.common.utils.StringUtils; | ||
9 | +import com.huaheng.common.utils.security.ShiroUtils; | ||
10 | +import com.huaheng.framework.aspectj.lang.annotation.Log; | ||
11 | +import com.huaheng.framework.aspectj.lang.constant.BusinessType; | ||
12 | +import com.huaheng.framework.web.controller.BaseController; | ||
13 | +import com.huaheng.framework.web.domain.AjaxResult; | ||
14 | +import com.huaheng.framework.web.page.PageDomain; | ||
15 | +import com.huaheng.framework.web.page.TableDataInfo; | ||
16 | +import com.huaheng.framework.web.page.TableSupport; | ||
17 | +import com.huaheng.pc.config.containerCapacity.domain.ContainerCapacity; | ||
18 | +import com.huaheng.pc.config.containerCapacity.service.ContainerCapacityService; | ||
19 | +import com.huaheng.pc.general.material.domain.Material; | ||
20 | +import com.huaheng.pc.general.material.service.MaterialService; | ||
21 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
22 | +import org.springframework.beans.factory.annotation.Autowired; | ||
23 | +import org.springframework.stereotype.Controller; | ||
24 | +import org.springframework.ui.ModelMap; | ||
25 | +import org.springframework.web.bind.annotation.*; | ||
26 | + | ||
27 | +import java.util.List; | ||
28 | + | ||
29 | +/** | ||
30 | + * 容器容量值 | ||
31 | + * 信息操作处理 | ||
32 | + * | ||
33 | + * @author ricard | ||
34 | + * @date 2019-08-12 | ||
35 | + */ | ||
36 | +@Controller | ||
37 | +@RequestMapping("/config/containerCapacity") | ||
38 | +public class ContainerCapacityController extends BaseController { | ||
39 | + | ||
40 | + private String prefix = "config/containerCapacity"; | ||
41 | + | ||
42 | + @Autowired | ||
43 | + private ContainerCapacityService containerCapacityService; | ||
44 | + | ||
45 | + @Autowired | ||
46 | + private MaterialService materialService; | ||
47 | + | ||
48 | + @RequiresPermissions("config:containerCapacity:view") | ||
49 | + @GetMapping() | ||
50 | + public String containerCapacity() | ||
51 | + { | ||
52 | + return prefix + "/containerCapacity"; | ||
53 | + } | ||
54 | + | ||
55 | + /** | ||
56 | + * 查询容器容量列表 | ||
57 | + */ | ||
58 | + @RequiresPermissions("config:containerCapacity:list") | ||
59 | + @Log(title = "配置-容器容量设置", operating = "查看容器容量", action = BusinessType.GRANT) | ||
60 | + @PostMapping("/list") | ||
61 | + @ResponseBody | ||
62 | + public TableDataInfo list(ContainerCapacity containerCapacity,String createdBegin, String createdEnd) | ||
63 | + { | ||
64 | + LambdaQueryWrapper<ContainerCapacity> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
65 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | ||
66 | + Integer pageNum = pageDomain.getPageNum(); | ||
67 | + Integer pageSize = pageDomain.getPageSize(); | ||
68 | + | ||
69 | + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),ContainerCapacity::getCreated, createdBegin) | ||
70 | + .le(StringUtils.isNotEmpty(createdEnd), ContainerCapacity::getCreated, createdEnd) | ||
71 | + .eq(ContainerCapacity::getWarehouseCode,ShiroUtils.getWarehouseCode()) | ||
72 | + .eq(StringUtils.isNotEmpty(containerCapacity.getMaterialCode()),ContainerCapacity::getMaterialCode,containerCapacity.getMaterialCode()) | ||
73 | + .eq(StringUtils.isNotEmpty(containerCapacity.getContainerType()), ContainerCapacity::getContainerType, containerCapacity.getContainerType()) | ||
74 | + .like(StringUtils.isNotEmpty(containerCapacity.getMaterialName()), ContainerCapacity::getMaterialName, containerCapacity.getMaterialName()) | ||
75 | + .orderByAsc(ContainerCapacity::getId); | ||
76 | + | ||
77 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | ||
78 | + /** | ||
79 | + * 使用分页查询 | ||
80 | + */ | ||
81 | + Page<ContainerCapacity> page = new Page<>(pageNum, pageSize); | ||
82 | + IPage<ContainerCapacity> iPage = containerCapacityService.page(page, lambdaQueryWrapper); | ||
83 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | ||
84 | + } else { | ||
85 | + List<ContainerCapacity> list = containerCapacityService.list(lambdaQueryWrapper); | ||
86 | + return getDataTable(list); | ||
87 | + } | ||
88 | + } | ||
89 | + | ||
90 | + | ||
91 | + /** | ||
92 | + * 新增容器容量数据 | ||
93 | + */ | ||
94 | + @GetMapping("/add") | ||
95 | + public String add() | ||
96 | + { | ||
97 | + return prefix + "/add"; | ||
98 | + } | ||
99 | + | ||
100 | + /** | ||
101 | + * 新增保存容器容量数据 | ||
102 | + */ | ||
103 | + @RequiresPermissions("config:containerCapacity:add") | ||
104 | + @Log(title = "配置-容器容量设置", operating = "新增容器容量", action = BusinessType.INSERT) | ||
105 | + @PostMapping("/add") | ||
106 | + @ResponseBody | ||
107 | + public AjaxResult addSave(ContainerCapacity containerCapacity) | ||
108 | + { | ||
109 | + AjaxResult ajaxResult=containerCapacityService.insertModel(containerCapacity); | ||
110 | + return ajaxResult; | ||
111 | + } | ||
112 | + | ||
113 | + /** | ||
114 | + * 修改容器容量 | ||
115 | + */ | ||
116 | + @GetMapping("/edit/{id}") | ||
117 | + public String edit(@PathVariable("id") Integer id, ModelMap mmap) | ||
118 | + { | ||
119 | + ContainerCapacity containerCapacity = containerCapacityService.getById(id); | ||
120 | + mmap.put("containerCapacity", containerCapacity); | ||
121 | + return prefix + "/edit"; | ||
122 | + } | ||
123 | + | ||
124 | + /** | ||
125 | + * 修改保存容器容量 | ||
126 | + */ | ||
127 | + @RequiresPermissions("config:containerCapacity:edit") | ||
128 | + @Log(title = "配置-容器容量设置", operating = "修改容器容量", action = BusinessType.UPDATE) | ||
129 | + @PostMapping("/edit") | ||
130 | + @ResponseBody | ||
131 | + public AjaxResult editSave(ContainerCapacity containerCapacity) | ||
132 | + { | ||
133 | + containerCapacity.setLastUpdatedBy(ShiroUtils.getLoginName()); | ||
134 | + return toAjax(containerCapacityService.saveOrUpdate(containerCapacity)); | ||
135 | + } | ||
136 | + | ||
137 | + /** | ||
138 | + * 删除容器类型 | ||
139 | + */ | ||
140 | + @RequiresPermissions("config:containerCapacity:remove") | ||
141 | + @Log(title = "配置-容器容量设置", operating = "删除容器容量", action = BusinessType.DELETE) | ||
142 | + @PostMapping( "/remove") | ||
143 | + @ResponseBody | ||
144 | + public AjaxResult remove(String ids) | ||
145 | + { | ||
146 | + if (StringUtils.isEmpty(ids)) | ||
147 | + return AjaxResult.error("id不能为空"); | ||
148 | + for (Integer id : Convert.toIntArray(ids)) | ||
149 | + { | ||
150 | + | ||
151 | + } | ||
152 | + return AjaxResult.success("删除成功!"); | ||
153 | + } | ||
154 | + | ||
155 | + | ||
156 | + | ||
157 | +} |
src/main/java/com/huaheng/pc/config/containerCapacity/domain/ContainerCapacity.java
0 → 100644
1 | +package com.huaheng.pc.config.containerCapacity.domain; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
6 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
7 | +import io.swagger.annotations.ApiModel; | ||
8 | +import io.swagger.annotations.ApiModelProperty; | ||
9 | +import java.io.Serializable; | ||
10 | +import java.math.BigDecimal; | ||
11 | +import java.util.Date; | ||
12 | +import lombok.Data; | ||
13 | + | ||
14 | +@ApiModel(value="com.huaheng.pc.config.containerCapacityl.domain.ContainerCapacity") | ||
15 | +@Data | ||
16 | +@TableName(value = "container_capacity") | ||
17 | +public class ContainerCapacity implements Serializable { | ||
18 | + /** | ||
19 | + * 内部号 | ||
20 | + */ | ||
21 | + @TableId(value = "id", type = IdType.AUTO) | ||
22 | + @ApiModelProperty(value="内部号") | ||
23 | + private Integer id; | ||
24 | + | ||
25 | + /** | ||
26 | + * 容器类型编码 | ||
27 | + */ | ||
28 | + @TableField(value = "containerType") | ||
29 | + @ApiModelProperty(value="容器类型编码") | ||
30 | + private String containerType; | ||
31 | + | ||
32 | + /** | ||
33 | + * 仓库编码 | ||
34 | + */ | ||
35 | + @TableField(value = "warehouseCode") | ||
36 | + @ApiModelProperty(value="仓库编码") | ||
37 | + private String warehouseCode; | ||
38 | + | ||
39 | + /** | ||
40 | + * 货主编码 | ||
41 | + */ | ||
42 | + @TableField(value = "companyCode") | ||
43 | + @ApiModelProperty(value="货主编码") | ||
44 | + private String companyCode; | ||
45 | + | ||
46 | + /** | ||
47 | + * 商品编码 | ||
48 | + */ | ||
49 | + @TableField(value = "materialCode") | ||
50 | + @ApiModelProperty(value="商品编码") | ||
51 | + private String materialCode; | ||
52 | + | ||
53 | + /** | ||
54 | + * 商品名称 | ||
55 | + */ | ||
56 | + @TableField(value = "materialName") | ||
57 | + @ApiModelProperty(value="商品名称") | ||
58 | + private String materialName; | ||
59 | + | ||
60 | + /** | ||
61 | + * 商品规格 | ||
62 | + */ | ||
63 | + @TableField(value = "materialSpec") | ||
64 | + @ApiModelProperty(value="商品规格") | ||
65 | + private String materialSpec; | ||
66 | + | ||
67 | + /** | ||
68 | + * 商品单位 | ||
69 | + */ | ||
70 | + @TableField(value = "materialUnit") | ||
71 | + @ApiModelProperty(value="商品单位") | ||
72 | + private String materialUnit; | ||
73 | + | ||
74 | + /** | ||
75 | + * 存放数量 | ||
76 | + */ | ||
77 | + @TableField(value = "qty") | ||
78 | + @ApiModelProperty(value="存放数量") | ||
79 | + private BigDecimal qty; | ||
80 | + | ||
81 | + /** | ||
82 | + * 启用;0—禁用状态 | ||
83 | + */ | ||
84 | + @TableField(value = "enable") | ||
85 | + @ApiModelProperty(value="启用;0—禁用状态") | ||
86 | + private Boolean enable; | ||
87 | + | ||
88 | + /** | ||
89 | + * 创建时间 | ||
90 | + */ | ||
91 | + @TableField(value = "created") | ||
92 | + @ApiModelProperty(value="创建时间") | ||
93 | + private Date created; | ||
94 | + | ||
95 | + /** | ||
96 | + * 创建用户 | ||
97 | + */ | ||
98 | + @TableField(value = "createdBy") | ||
99 | + @ApiModelProperty(value="创建用户") | ||
100 | + private String createdBy; | ||
101 | + | ||
102 | + /** | ||
103 | + * 创建时间 | ||
104 | + */ | ||
105 | + @TableField(value = "lastUpdated") | ||
106 | + @ApiModelProperty(value="创建时间") | ||
107 | + private Date lastUpdated; | ||
108 | + | ||
109 | + /** | ||
110 | + * 更新用户 | ||
111 | + */ | ||
112 | + @TableField(value = "lastUpdatedBy") | ||
113 | + @ApiModelProperty(value="更新用户") | ||
114 | + private String lastUpdatedBy; | ||
115 | + | ||
116 | + /** | ||
117 | + * 数据版本 | ||
118 | + */ | ||
119 | + @TableField(value = "version") | ||
120 | + @ApiModelProperty(value="数据版本") | ||
121 | + private Integer version; | ||
122 | + | ||
123 | + /** | ||
124 | + * 自定义字段1-robot交互用字段 | ||
125 | + */ | ||
126 | + @TableField(value = "userDef1") | ||
127 | + @ApiModelProperty(value="自定义字段1-robot交互用字段") | ||
128 | + private String userDef1; | ||
129 | + | ||
130 | + /** | ||
131 | + * 自定义字段2 | ||
132 | + */ | ||
133 | + @TableField(value = "userDef2") | ||
134 | + @ApiModelProperty(value="自定义字段2") | ||
135 | + private String userDef2; | ||
136 | + | ||
137 | + /** | ||
138 | + * 自定义字段3 | ||
139 | + */ | ||
140 | + @TableField(value = "userDef3") | ||
141 | + @ApiModelProperty(value="自定义字段3") | ||
142 | + private String userDef3; | ||
143 | + | ||
144 | + /** | ||
145 | + * 自定义字段4 | ||
146 | + */ | ||
147 | + @TableField(value = "userDef4") | ||
148 | + @ApiModelProperty(value="自定义字段4") | ||
149 | + private String userDef4; | ||
150 | + | ||
151 | + /** | ||
152 | + * 自定义字段5 | ||
153 | + */ | ||
154 | + @TableField(value = "userDef5") | ||
155 | + @ApiModelProperty(value="自定义字段5") | ||
156 | + private String userDef5; | ||
157 | + | ||
158 | + /** | ||
159 | + * 自定义字段6 | ||
160 | + */ | ||
161 | + @TableField(value = "userDef6") | ||
162 | + @ApiModelProperty(value="自定义字段6") | ||
163 | + private String userDef6; | ||
164 | + | ||
165 | + /** | ||
166 | + * 自定义字段7 | ||
167 | + */ | ||
168 | + @TableField(value = "userDef7") | ||
169 | + @ApiModelProperty(value="自定义字段7") | ||
170 | + private String userDef7; | ||
171 | + | ||
172 | + /** | ||
173 | + * 自定义字段8 | ||
174 | + */ | ||
175 | + @TableField(value = "userDef8") | ||
176 | + @ApiModelProperty(value="自定义字段8") | ||
177 | + private String userDef8; | ||
178 | + | ||
179 | + /** | ||
180 | + * 处理标记 | ||
181 | + */ | ||
182 | + @TableField(value = "processStamp") | ||
183 | + @ApiModelProperty(value="处理标记") | ||
184 | + private String processStamp; | ||
185 | + | ||
186 | + private static final long serialVersionUID = 1L; | ||
187 | + | ||
188 | + public static final String COL_CONTAINERTYPE = "containerType"; | ||
189 | + | ||
190 | + public static final String COL_WAREHOUSECODE = "warehouseCode"; | ||
191 | + | ||
192 | + public static final String COL_COMPANYCODE = "companyCode"; | ||
193 | + | ||
194 | + public static final String COL_MATERIALCODE = "materialCode"; | ||
195 | + | ||
196 | + public static final String COL_MATERIALNAME = "materialName"; | ||
197 | + | ||
198 | + public static final String COL_MATERIALSPEC = "materialSpec"; | ||
199 | + | ||
200 | + public static final String COL_MATERIALUNIT = "materialUnit"; | ||
201 | + | ||
202 | + public static final String COL_QTY = "qty"; | ||
203 | + | ||
204 | + public static final String COL_ENABLE = "enable"; | ||
205 | + | ||
206 | + public static final String COL_CREATED = "created"; | ||
207 | + | ||
208 | + public static final String COL_CREATEDBY = "createdBy"; | ||
209 | + | ||
210 | + public static final String COL_LASTUPDATED = "lastUpdated"; | ||
211 | + | ||
212 | + public static final String COL_LASTUPDATEDBY = "lastUpdatedBy"; | ||
213 | + | ||
214 | + public static final String COL_VERSION = "version"; | ||
215 | + | ||
216 | + public static final String COL_USERDEF1 = "userDef1"; | ||
217 | + | ||
218 | + public static final String COL_USERDEF2 = "userDef2"; | ||
219 | + | ||
220 | + public static final String COL_USERDEF3 = "userDef3"; | ||
221 | + | ||
222 | + public static final String COL_USERDEF4 = "userDef4"; | ||
223 | + | ||
224 | + public static final String COL_USERDEF5 = "userDef5"; | ||
225 | + | ||
226 | + public static final String COL_USERDEF6 = "userDef6"; | ||
227 | + | ||
228 | + public static final String COL_USERDEF7 = "userDef7"; | ||
229 | + | ||
230 | + public static final String COL_USERDEF8 = "userDef8"; | ||
231 | + | ||
232 | + public static final String COL_PROCESSSTAMP = "processStamp"; | ||
233 | +} | ||
0 | \ No newline at end of file | 234 | \ No newline at end of file |
src/main/java/com/huaheng/pc/config/containerCapacity/mapper/ContainerCapacityMapper.java
0 → 100644
1 | +package com.huaheng.pc.config.containerCapacity.mapper; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
4 | +import com.huaheng.pc.config.containerCapacity.domain.ContainerCapacity; | ||
5 | + | ||
6 | +public interface ContainerCapacityMapper extends BaseMapper<ContainerCapacity> { | ||
7 | +} | ||
0 | \ No newline at end of file | 8 | \ No newline at end of file |
src/main/java/com/huaheng/pc/config/containerCapacity/service/ContainerCapacityService.java
0 → 100644
1 | +package com.huaheng.pc.config.containerCapacity.service; | ||
2 | + | ||
3 | +import com.huaheng.framework.web.domain.AjaxResult; | ||
4 | +import com.huaheng.pc.config.containerCapacity.domain.ContainerCapacity; | ||
5 | +import com.baomidou.mybatisplus.extension.service.IService; | ||
6 | +public interface ContainerCapacityService extends IService<ContainerCapacity>{ | ||
7 | + | ||
8 | + | ||
9 | + //新增容器容量 | ||
10 | + AjaxResult insertModel(ContainerCapacity containerCapacity); | ||
11 | + | ||
12 | +} |
src/main/java/com/huaheng/pc/config/containerCapacity/service/ContainerCapacityServiceImpl.java
0 → 100644
1 | +package com.huaheng.pc.config.containerCapacity.service; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
5 | +import com.huaheng.common.utils.StringUtils; | ||
6 | +import com.huaheng.common.utils.security.ShiroUtils; | ||
7 | +import com.huaheng.framework.web.domain.AjaxResult; | ||
8 | +import com.huaheng.pc.config.containerType.domain.ContainerType; | ||
9 | +import com.huaheng.pc.config.containerType.service.ContainerTypeService; | ||
10 | +import com.huaheng.pc.general.material.domain.Material; | ||
11 | +import com.huaheng.pc.general.material.service.MaterialService; | ||
12 | +import org.springframework.beans.factory.annotation.Autowired; | ||
13 | +import org.springframework.stereotype.Service; | ||
14 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
15 | +import com.huaheng.pc.config.containerCapacity.mapper.ContainerCapacityMapper; | ||
16 | +import com.huaheng.pc.config.containerCapacity.domain.ContainerCapacity; | ||
17 | + | ||
18 | +@Service | ||
19 | +public class ContainerCapacityServiceImpl extends ServiceImpl<ContainerCapacityMapper, ContainerCapacity> implements ContainerCapacityService{ | ||
20 | + | ||
21 | + @Autowired | ||
22 | + private MaterialService materialService; | ||
23 | + @Autowired | ||
24 | + private ContainerTypeService containerTypeService; | ||
25 | + | ||
26 | + | ||
27 | + //判断容器类别是否存在,添加容器容量时,查找到该物料的具体信息,一并加入到容器容量中 | ||
28 | + @Override | ||
29 | + public AjaxResult insertModel(ContainerCapacity containerCapacity) { | ||
30 | + containerCapacity.setWarehouseCode(ShiroUtils.getWarehouseCode()); | ||
31 | + containerCapacity.setCreatedBy(ShiroUtils.getLoginName()); | ||
32 | + containerCapacity.setLastUpdatedBy(ShiroUtils.getLoginName()); | ||
33 | + | ||
34 | + //查找该容器类别信息 | ||
35 | + LambdaQueryWrapper<ContainerType> lambdaQueryWrappers = Wrappers.lambdaQuery(); | ||
36 | + lambdaQueryWrappers.eq(StringUtils.isNotEmpty(containerCapacity.getContainerType()),ContainerType::getCode, containerCapacity.getContainerType()) | ||
37 | + .eq(StringUtils.isNotEmpty(containerCapacity.getWarehouseCode()),ContainerType::getWarehouseCode, containerCapacity.getWarehouseCode()); | ||
38 | + ContainerType containerType=containerTypeService.getOne(lambdaQueryWrappers); | ||
39 | + if(containerType==null){ | ||
40 | + return AjaxResult.error("系统没有该容器类型"); | ||
41 | + } | ||
42 | + | ||
43 | + //查找该物料信息 | ||
44 | + LambdaQueryWrapper<Material> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
45 | + lambdaQueryWrapper.eq(StringUtils.isNotEmpty(containerCapacity.getMaterialCode()),Material::getCode, containerCapacity.getMaterialCode()) | ||
46 | + .eq(StringUtils.isNotEmpty(containerCapacity.getWarehouseCode()),Material::getWarehouseCode, containerCapacity.getWarehouseCode()); | ||
47 | + Material material=materialService.getOne(lambdaQueryWrapper); | ||
48 | + if(material==null){ | ||
49 | + return AjaxResult.error("系统没有该物料"); | ||
50 | + } | ||
51 | + containerCapacity.setMaterialName(material.getName()); | ||
52 | + containerCapacity.setMaterialSpec(material.getSpec()); | ||
53 | + containerCapacity.setMaterialUnit(material.getUnit()); | ||
54 | + if(!this.save(containerCapacity)){ | ||
55 | + return AjaxResult.error("新增容器容量失败"); | ||
56 | + } | ||
57 | + return AjaxResult.success("新增容器容量成功"); | ||
58 | + } | ||
59 | +} |
src/main/java/com/huaheng/pc/config/containerType/controller/ContainerTypeController.java
@@ -27,8 +27,8 @@ import java.util.List; | @@ -27,8 +27,8 @@ import java.util.List; | ||
27 | /** | 27 | /** |
28 | * 容器类型 信息操作处理 | 28 | * 容器类型 信息操作处理 |
29 | * | 29 | * |
30 | - * @author huaheng | ||
31 | - * @date 2018-08-19 | 30 | + * @author ricard |
31 | + * @date 2019-08-12 | ||
32 | */ | 32 | */ |
33 | @Controller | 33 | @Controller |
34 | @RequestMapping("/config/containerType") | 34 | @RequestMapping("/config/containerType") |
src/main/java/com/huaheng/pc/config/containerType/domain/ContainerType.java
@@ -53,7 +53,7 @@ public class ContainerType implements Serializable { | @@ -53,7 +53,7 @@ public class ContainerType implements Serializable { | ||
53 | */ | 53 | */ |
54 | @TableField(value = "enable") | 54 | @TableField(value = "enable") |
55 | @ApiModelProperty(value="启用;0—禁用状态") | 55 | @ApiModelProperty(value="启用;0—禁用状态") |
56 | - private Integer enable; | 56 | + private Boolean enable; |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * 序号 | 59 | * 序号 |
@@ -116,7 +116,7 @@ public class ContainerType implements Serializable { | @@ -116,7 +116,7 @@ public class ContainerType implements Serializable { | ||
116 | */ | 116 | */ |
117 | @TableField(value = "useAsDEFAULT") | 117 | @TableField(value = "useAsDEFAULT") |
118 | @ApiModelProperty(value="作为默认货箱") | 118 | @ApiModelProperty(value="作为默认货箱") |
119 | - private Integer useAsDEFAULT; | 119 | + private Boolean useAsDEFAULT; |
120 | 120 | ||
121 | /** | 121 | /** |
122 | * 状态 | 122 | * 状态 |
@@ -373,23 +373,6 @@ public class ContainerType implements Serializable { | @@ -373,23 +373,6 @@ public class ContainerType implements Serializable { | ||
373 | this.companyCode = companyCode; | 373 | this.companyCode = companyCode; |
374 | } | 374 | } |
375 | 375 | ||
376 | - /** | ||
377 | - * 获取启用;0—禁用状态 | ||
378 | - * | ||
379 | - * @return enable - 启用;0—禁用状态 | ||
380 | - */ | ||
381 | - public Integer getEnable() { | ||
382 | - return enable; | ||
383 | - } | ||
384 | - | ||
385 | - /** | ||
386 | - * 设置启用;0—禁用状态 | ||
387 | - * | ||
388 | - * @param enable 启用;0—禁用状态 | ||
389 | - */ | ||
390 | - public void setEnable(Integer enable) { | ||
391 | - this.enable = enable; | ||
392 | - } | ||
393 | 376 | ||
394 | /** | 377 | /** |
395 | * 获取序号 | 378 | * 获取序号 |
@@ -517,39 +500,33 @@ public class ContainerType implements Serializable { | @@ -517,39 +500,33 @@ public class ContainerType implements Serializable { | ||
517 | this.maxWeight = maxWeight; | 500 | this.maxWeight = maxWeight; |
518 | } | 501 | } |
519 | 502 | ||
520 | - /** | ||
521 | - * 获取装满度 | ||
522 | - * | ||
523 | - * @return fillPercent - 装满度 | ||
524 | - */ | ||
525 | public Integer getFillPercent() { | 503 | public Integer getFillPercent() { |
526 | return fillPercent; | 504 | return fillPercent; |
527 | } | 505 | } |
528 | 506 | ||
529 | - /** | ||
530 | - * 设置装满度 | ||
531 | - * | ||
532 | - * @param fillPercent 装满度 | ||
533 | - */ | ||
534 | public void setFillPercent(Integer fillPercent) { | 507 | public void setFillPercent(Integer fillPercent) { |
535 | this.fillPercent = fillPercent; | 508 | this.fillPercent = fillPercent; |
536 | } | 509 | } |
537 | 510 | ||
538 | /** | 511 | /** |
539 | - * 获取作为默认货箱 | 512 | + * 获取装满度 |
540 | * | 513 | * |
541 | - * @return useAsDEFAULT - 作为默认货箱 | 514 | + * @return fillPercent - 装满度 |
542 | */ | 515 | */ |
543 | - public Integer getUseAsDEFAULT() { | 516 | + |
517 | + public Boolean getEnable() { | ||
518 | + return enable; | ||
519 | + } | ||
520 | + | ||
521 | + public void setEnable(Boolean enable) { | ||
522 | + this.enable = enable; | ||
523 | + } | ||
524 | + | ||
525 | + public Boolean getUseAsDEFAULT() { | ||
544 | return useAsDEFAULT; | 526 | return useAsDEFAULT; |
545 | } | 527 | } |
546 | 528 | ||
547 | - /** | ||
548 | - * 设置作为默认货箱 | ||
549 | - * | ||
550 | - * @param useAsDEFAULT 作为默认货箱 | ||
551 | - */ | ||
552 | - public void setUseAsDEFAULT(Integer useAsDEFAULT) { | 529 | + public void setUseAsDEFAULT(Boolean useAsDEFAULT) { |
553 | this.useAsDEFAULT = useAsDEFAULT; | 530 | this.useAsDEFAULT = useAsDEFAULT; |
554 | } | 531 | } |
555 | 532 |
src/main/java/com/huaheng/pc/config/locationType/controller/LocationTypeController.java
1 | package com.huaheng.pc.config.locationType.controller; | 1 | package com.huaheng.pc.config.locationType.controller; |
2 | 2 | ||
3 | - | ||
4 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
5 | import com.baomidou.mybatisplus.core.metadata.IPage; | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
@@ -17,133 +16,150 @@ import com.huaheng.framework.web.page.TableDataInfo; | @@ -17,133 +16,150 @@ import com.huaheng.framework.web.page.TableDataInfo; | ||
17 | import com.huaheng.framework.web.page.TableSupport; | 16 | import com.huaheng.framework.web.page.TableSupport; |
18 | import com.huaheng.pc.config.locationType.domain.LocationType; | 17 | import com.huaheng.pc.config.locationType.domain.LocationType; |
19 | import com.huaheng.pc.config.locationType.service.LocationTypeService; | 18 | import com.huaheng.pc.config.locationType.service.LocationTypeService; |
20 | -import com.huaheng.pc.general.location.domain.Location; | ||
21 | -import com.huaheng.pc.general.location.service.LocationService; | 19 | +import com.huaheng.pc.config.zone.domain.Zone; |
20 | +import com.huaheng.pc.config.zone.service.ZoneService; | ||
22 | import org.apache.shiro.authz.annotation.RequiresPermissions; | 21 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
23 | import org.springframework.beans.factory.annotation.Autowired; | 22 | import org.springframework.beans.factory.annotation.Autowired; |
24 | import org.springframework.stereotype.Controller; | 23 | import org.springframework.stereotype.Controller; |
25 | import org.springframework.ui.ModelMap; | 24 | import org.springframework.ui.ModelMap; |
26 | import org.springframework.web.bind.annotation.*; | 25 | import org.springframework.web.bind.annotation.*; |
27 | 26 | ||
28 | -import java.util.Arrays; | ||
29 | import java.util.List; | 27 | import java.util.List; |
30 | 28 | ||
29 | +/** | ||
30 | + * 库位类型 信息操作处理 | ||
31 | + * | ||
32 | + * @author ricard | ||
33 | + * @date 2019-08-12 | ||
34 | + */ | ||
31 | @Controller | 35 | @Controller |
32 | @RequestMapping("/config/locationType") | 36 | @RequestMapping("/config/locationType") |
33 | -public class LocationTypeController extends BaseController { | ||
34 | - | 37 | +public class LocationTypeController extends BaseController |
38 | +{ | ||
35 | private String prefix = "config/locationType"; | 39 | private String prefix = "config/locationType"; |
36 | - | ||
37 | - @Autowired | ||
38 | - private LocationTypeService locationTypeService; | ||
39 | - @Autowired | ||
40 | - private LocationService locationService; | ||
41 | - | ||
42 | - @RequestMapping("config:locationType:view") | ||
43 | - @GetMapping() | ||
44 | - public String locationType() | ||
45 | - { | ||
46 | - return prefix + "/locationType"; | ||
47 | - } | ||
48 | - | ||
49 | - /** | ||
50 | - * 查询库位类型列表 | ||
51 | - */ | ||
52 | - @RequiresPermissions("config:locationType:list") | ||
53 | - @Log(title = "通用-库位类型管理", operating = "查看库位类型列表", action = BusinessType.GRANT) | ||
54 | - @PostMapping("/list") | ||
55 | - @ResponseBody | ||
56 | - public TableDataInfo list(LocationType locationType,String createdBegin, String createdEnd) { | ||
57 | - LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
58 | - PageDomain pageDomain = TableSupport.buildPageRequest(); | ||
59 | - Integer pageNum = pageDomain.getPageNum(); | ||
60 | - Integer pageSize = pageDomain.getPageSize(); | ||
61 | - | ||
62 | - lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),LocationType::getCreated, createdBegin) | ||
63 | - .le(StringUtils.isNotEmpty(createdEnd), LocationType::getCreated, createdEnd) | ||
64 | - .eq(LocationType::getWarehouseCode, ShiroUtils.getWarehouseCode()) | ||
65 | - .eq(StringUtils.isNotEmpty(locationType.getCode()),LocationType::getCode,locationType.getCode()) | ||
66 | - .like(StringUtils.isNotEmpty(locationType.getName()),LocationType::getName,locationType.getName()); | ||
67 | - | ||
68 | - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | ||
69 | - /** | ||
70 | - * 使用分页查询 | ||
71 | - */ | ||
72 | - Page<LocationType> page = new Page<>(pageNum, pageSize); | ||
73 | - IPage<LocationType> iPage = locationTypeService.page(page, lambdaQueryWrapper); | ||
74 | - return getDataTable(iPage.getRecords()); | ||
75 | - } else { | ||
76 | - List<LocationType> list = locationTypeService.list(lambdaQueryWrapper); | ||
77 | - return getDataTable(list); | ||
78 | - } | ||
79 | - } | ||
80 | - | ||
81 | - /** | ||
82 | - * 新增库位类型 | ||
83 | - */ | ||
84 | - @GetMapping("/add") | ||
85 | - public String add() { | ||
86 | - return prefix + "/add"; | ||
87 | - } | ||
88 | - | ||
89 | - /** | ||
90 | - * 新增保存库位类型 | ||
91 | - */ | ||
92 | - @RequiresPermissions("config:locationType:add") | ||
93 | - @Log(title = "通用-库位类型管理", operating = "新增库位类型", action = BusinessType.INSERT) | ||
94 | - @PostMapping("/add") | ||
95 | - @ResponseBody | ||
96 | - public AjaxResult addSave(LocationType locationType) { | ||
97 | - Boolean result = locationTypeService.save(locationType); | ||
98 | - return toAjax(result); | ||
99 | - } | ||
100 | - | ||
101 | - /** | ||
102 | - * 修改库位类型 | ||
103 | - */ | ||
104 | - @GetMapping("/edit/{id}") | ||
105 | - public String edit(@PathVariable("id") Integer id, ModelMap mmap) { | ||
106 | - LocationType locationType = locationTypeService.getById(id); | ||
107 | - mmap.put("locationType", locationType); | ||
108 | - return prefix + "/edit"; | ||
109 | - } | ||
110 | - | ||
111 | - /** | ||
112 | - * 修改保存库位类型 | ||
113 | - */ | ||
114 | - @RequiresPermissions("config:locationType:edit") | ||
115 | - @Log(title = "通用-库位类型管理", operating = "修改库位类型", action = BusinessType.UPDATE) | ||
116 | - @PostMapping("/edit") | ||
117 | - @ResponseBody | ||
118 | - public AjaxResult editSave(LocationType locationType) { | ||
119 | - locationType.setLastUpdatedBy(ShiroUtils.getLoginName()); | ||
120 | - Boolean result = locationTypeService.updateById(locationType); | ||
121 | - return toAjax(result); | ||
122 | - } | ||
123 | - | ||
124 | - /** | ||
125 | - * 删除库位 | ||
126 | - */ | ||
127 | - @RequiresPermissions("config:locationType:remove") | ||
128 | - @Log(title = "通用-库位类型管理", operating = "删除库位类型", action = BusinessType.DELETE) | ||
129 | - @PostMapping( "/remove") | ||
130 | - @ResponseBody | ||
131 | - public AjaxResult remove(String ids) { | ||
132 | - if (StringUtils.isEmpty(ids)){ | ||
133 | - return AjaxResult.error("id不能为空"); | ||
134 | - } | ||
135 | - | ||
136 | - for (Integer id : Convert.toIntArray(ids)) { | ||
137 | - LambdaQueryWrapper<Location> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
138 | - lambdaQueryWrapper.eq(Location::getLocationType,id); | ||
139 | - | ||
140 | - int count = locationService.count(lambdaQueryWrapper); | ||
141 | - if (count != 0){ | ||
142 | - return AjaxResult.error("库位类型id="+id+",存在库位,不能删除。"); | ||
143 | - } | ||
144 | - } | ||
145 | - List<Integer> list = Arrays.asList(Convert.toIntArray(ids)); | ||
146 | - locationTypeService.removeByIds(list); | ||
147 | - return AjaxResult.success("删除成功!"); | ||
148 | - } | 40 | + |
41 | + @Autowired | ||
42 | + private LocationTypeService locationTypeService; | ||
43 | + @Autowired | ||
44 | + private ZoneService zoneService; | ||
45 | + | ||
46 | + @RequiresPermissions("config:locationType:view") | ||
47 | + @GetMapping() | ||
48 | + public String locationType() | ||
49 | + { | ||
50 | + return prefix + "/locationType"; | ||
51 | + } | ||
52 | + | ||
53 | + /** | ||
54 | + * 查询库位类型列表 | ||
55 | + */ | ||
56 | + @RequiresPermissions("config:locationType:list") | ||
57 | + @Log(title = "配置-库位类型设置", operating = "查看库位类型", action = BusinessType.GRANT) | ||
58 | + @PostMapping("/list") | ||
59 | + @ResponseBody | ||
60 | + public TableDataInfo list(LocationType locationType,String createdBegin, String createdEnd) | ||
61 | + { | ||
62 | + LambdaQueryWrapper<LocationType> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
63 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | ||
64 | + Integer pageNum = pageDomain.getPageNum(); | ||
65 | + Integer pageSize = pageDomain.getPageSize(); | ||
66 | + | ||
67 | + lambdaQueryWrapper.ge(StringUtils.isNotEmpty(createdBegin),LocationType::getCreated, createdBegin) | ||
68 | + .le(StringUtils.isNotEmpty(createdEnd), LocationType::getCreated, createdEnd) | ||
69 | + .eq(LocationType::getWarehouseCode,ShiroUtils.getWarehouseCode()) | ||
70 | + .eq(StringUtils.isNotEmpty(locationType.getCode()), LocationType::getCode, locationType.getCode()) | ||
71 | + .like(StringUtils.isNotEmpty(locationType.getName()), LocationType::getName, locationType.getName()) | ||
72 | + .orderByAsc(LocationType::getId); | ||
73 | + | ||
74 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | ||
75 | + /** | ||
76 | + * 使用分页查询 | ||
77 | + */ | ||
78 | + Page<LocationType> page = new Page<>(pageNum, pageSize); | ||
79 | + IPage<LocationType> iPage = locationTypeService.page(page, lambdaQueryWrapper); | ||
80 | + return getMpDataTable(iPage.getRecords(),iPage.getTotal()); | ||
81 | + } else { | ||
82 | + List<LocationType> list = locationTypeService.list(lambdaQueryWrapper); | ||
83 | + return getDataTable(list); | ||
84 | + } | ||
85 | + } | ||
86 | + | ||
87 | + /** | ||
88 | + * 新增库位类型 | ||
89 | + */ | ||
90 | + @GetMapping("/add") | ||
91 | + public String add() | ||
92 | + { | ||
93 | + return prefix + "/add"; | ||
94 | + } | ||
95 | + | ||
96 | + /** | ||
97 | + * 新增保存库位类型 | ||
98 | + */ | ||
99 | + @RequiresPermissions("config:locationType:add") | ||
100 | + @Log(title = "配置-库位类型设置", operating = "新增库位类型", action = BusinessType.INSERT) | ||
101 | + @PostMapping("/add") | ||
102 | + @ResponseBody | ||
103 | + public AjaxResult addSave(LocationType locationType) | ||
104 | + { | ||
105 | + if(StringUtils.isEmpty(locationType.getCode())){ | ||
106 | + return AjaxResult.error("库位类型为空"); | ||
107 | + } | ||
108 | + //查找location,是否存在 | ||
109 | + Zone zone=new Zone(); | ||
110 | + LambdaQueryWrapper<Zone> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
111 | + lambdaQueryWrapper.eq(Zone::getLocationType,locationType.getCode()) | ||
112 | + .eq(Zone::getWarehouseCode,ShiroUtils.getWarehouseCode()); | ||
113 | + zone=zoneService.getOne(lambdaQueryWrapper); | ||
114 | + if(zone==null){ | ||
115 | + return AjaxResult.error("系统没有此库位类型"); | ||
116 | + } | ||
117 | + locationType.setWarehouseCode(ShiroUtils.getWarehouseCode()); | ||
118 | + locationType.setCreatedBy(ShiroUtils.getLoginName()); | ||
119 | + locationType.setLastUpdatedBy(ShiroUtils.getLoginName()); | ||
120 | + return toAjax(locationTypeService.save(locationType)); | ||
121 | + } | ||
122 | + | ||
123 | + /** | ||
124 | + * 修改库位类型 | ||
125 | + */ | ||
126 | + @GetMapping("/edit/{id}") | ||
127 | + public String edit(@PathVariable("id") Integer id, ModelMap mmap) | ||
128 | + { | ||
129 | + LocationType locationType = locationTypeService.getById(id); | ||
130 | + mmap.put("locationType", locationType); | ||
131 | + return prefix + "/edit"; | ||
132 | + } | ||
133 | + | ||
134 | + /** | ||
135 | + * 修改保存库位类型 | ||
136 | + */ | ||
137 | + @RequiresPermissions("config:locationType:edit") | ||
138 | + @Log(title = "配置-库位类型设置", operating = "修改库位类型", action = BusinessType.UPDATE) | ||
139 | + @PostMapping("/edit") | ||
140 | + @ResponseBody | ||
141 | + public AjaxResult editSave(LocationType locationType) | ||
142 | + { | ||
143 | + locationType.setLastUpdatedBy(ShiroUtils.getLoginName()); | ||
144 | + return toAjax(locationTypeService.saveOrUpdate(locationType)); | ||
145 | + } | ||
146 | + | ||
147 | + /** | ||
148 | + * 删除库位类型 | ||
149 | + */ | ||
150 | + @RequiresPermissions("config:locationType:remove") | ||
151 | + @Log(title = "配置-库位类型设置", operating = "删除库位类型", action = BusinessType.DELETE) | ||
152 | + @PostMapping( "/remove") | ||
153 | + @ResponseBody | ||
154 | + public AjaxResult remove(String ids) | ||
155 | + { | ||
156 | + if (StringUtils.isEmpty(ids)) | ||
157 | + return AjaxResult.error("id不能为空"); | ||
158 | + for (Integer id : Convert.toIntArray(ids)) | ||
159 | + { | ||
160 | + locationTypeService.removeById(id); | ||
161 | + } | ||
162 | + return AjaxResult.success("删除成功!"); | ||
163 | + } | ||
164 | + | ||
149 | } | 165 | } |
src/main/java/com/huaheng/pc/config/locationType/domain/LocationType.java
@@ -93,7 +93,7 @@ public class LocationType implements Serializable { | @@ -93,7 +93,7 @@ public class LocationType implements Serializable { | ||
93 | * 有效 | 93 | * 有效 |
94 | */ | 94 | */ |
95 | @TableField(value = "enable") | 95 | @TableField(value = "enable") |
96 | - private Integer enable; | 96 | + private Boolean enable; |
97 | 97 | ||
98 | /** | 98 | /** |
99 | * 创建时间 | 99 | * 创建时间 |
src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeService.java
@@ -7,6 +7,4 @@ import java.util.List; | @@ -7,6 +7,4 @@ import java.util.List; | ||
7 | import java.util.Map; | 7 | import java.util.Map; |
8 | 8 | ||
9 | public interface LocationTypeService extends IService<LocationType>{ | 9 | public interface LocationTypeService extends IService<LocationType>{ |
10 | - | ||
11 | - List<Map<String,Object>> getLocationPrefix(); | ||
12 | } | 10 | } |
src/main/java/com/huaheng/pc/config/locationType/service/LocationTypeServiceImpl.java
@@ -14,13 +14,4 @@ import java.util.Map; | @@ -14,13 +14,4 @@ import java.util.Map; | ||
14 | @Service("locationType") | 14 | @Service("locationType") |
15 | public class LocationTypeServiceImpl extends ServiceImpl<LocationTypeMapper, LocationType> implements LocationTypeService{ | 15 | public class LocationTypeServiceImpl extends ServiceImpl<LocationTypeMapper, LocationType> implements LocationTypeService{ |
16 | 16 | ||
17 | - @Override | ||
18 | - public List<Map<String, Object>> getLocationPrefix() { | ||
19 | - LocationType locationType=new LocationType(); | ||
20 | - locationType.setWarehouseCode(ShiroUtils.getWarehouseCode()); | ||
21 | - locationType.setEnable(0); | ||
22 | - LambdaQueryWrapper<LocationType> lambda = Wrappers.lambdaQuery(locationType); | ||
23 | - | ||
24 | - return this.listMaps(lambda); | ||
25 | - } | ||
26 | } | 17 | } |
src/main/java/com/huaheng/pc/config/zone/controller/ZoneController.java
@@ -24,6 +24,13 @@ import org.springframework.web.bind.annotation.*; | @@ -24,6 +24,13 @@ import org.springframework.web.bind.annotation.*; | ||
24 | 24 | ||
25 | import java.util.List; | 25 | import java.util.List; |
26 | 26 | ||
27 | +/** | ||
28 | + * 库区 信息操作处理 | ||
29 | + * | ||
30 | + * @author ricard | ||
31 | + * @date 2019-08-12 | ||
32 | + */ | ||
33 | + | ||
27 | @Controller | 34 | @Controller |
28 | @RequestMapping("/config/zone") | 35 | @RequestMapping("/config/zone") |
29 | public class ZoneController extends BaseController { | 36 | public class ZoneController extends BaseController { |
src/main/java/com/huaheng/pc/config/zoneCapacity/controller/ZoneCapacityController.java
@@ -29,7 +29,7 @@ import java.util.List; | @@ -29,7 +29,7 @@ import java.util.List; | ||
29 | * 库区容量 信息操作处理 | 29 | * 库区容量 信息操作处理 |
30 | * | 30 | * |
31 | * @author ricard | 31 | * @author ricard |
32 | - * @date 2019-08-18 | 32 | + * @date 2019-08-12 |
33 | */ | 33 | */ |
34 | @Controller | 34 | @Controller |
35 | @RequestMapping("/config/zoneCapacity") | 35 | @RequestMapping("/config/zoneCapacity") |
src/main/java/com/huaheng/pc/general/bom/controller/BomDetailController.java
0 → 100644
1 | +package com.huaheng.pc.general.bom.controller; | ||
2 | + | ||
3 | +import com.huaheng.pc.general.bom.domain.BomDetail; | ||
4 | +import com.huaheng.pc.general.bom.service.BomDetailService; | ||
5 | +import org.springframework.stereotype.Controller; | ||
6 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
7 | + | ||
8 | +import javax.annotation.Resource; | ||
9 | + | ||
10 | +@Controller | ||
11 | +@RequestMapping("/general/bomDetail") | ||
12 | +public class BomDetailController { | ||
13 | + | ||
14 | + private String prefix = "general/bomDetail"; | ||
15 | + | ||
16 | + @Resource | ||
17 | + private BomDetailService bomDetailService; | ||
18 | +} |
src/main/java/com/huaheng/pc/general/bom/controller/BomHeaderController.java
0 → 100644
1 | +package com.huaheng.pc.general.bom.controller; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
5 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
6 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
7 | +import com.huaheng.common.support.Convert; | ||
8 | +import com.huaheng.common.utils.StringUtils; | ||
9 | +import com.huaheng.framework.aspectj.lang.annotation.Log; | ||
10 | +import com.huaheng.framework.aspectj.lang.constant.BusinessType; | ||
11 | +import com.huaheng.framework.web.controller.BaseController; | ||
12 | +import com.huaheng.framework.web.domain.AjaxResult; | ||
13 | +import com.huaheng.framework.web.page.PageDomain; | ||
14 | +import com.huaheng.framework.web.page.TableDataInfo; | ||
15 | +import com.huaheng.framework.web.page.TableSupport; | ||
16 | +import com.huaheng.pc.general.bom.domain.BomDetail; | ||
17 | +import com.huaheng.pc.general.bom.domain.BomHeader; | ||
18 | +import com.huaheng.pc.general.bom.service.BomDetailService; | ||
19 | +import com.huaheng.pc.general.bom.service.BomHeaderService; | ||
20 | +import io.swagger.annotations.ApiOperation; | ||
21 | +import io.swagger.annotations.ApiParam; | ||
22 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | ||
23 | +import org.springframework.stereotype.Controller; | ||
24 | +import org.springframework.ui.ModelMap; | ||
25 | +import org.springframework.web.bind.annotation.*; | ||
26 | + | ||
27 | +import javax.annotation.Resource; | ||
28 | +import java.util.ArrayList; | ||
29 | +import java.util.List; | ||
30 | + | ||
31 | +@Controller | ||
32 | +@RequestMapping("/general/bomHeader") | ||
33 | +public class BomHeaderController extends BaseController { | ||
34 | + | ||
35 | + private String prefix = "general/bomHeader"; | ||
36 | + | ||
37 | + @Resource | ||
38 | + private BomHeaderService bomHeaderService; | ||
39 | + | ||
40 | + @Resource | ||
41 | + private BomDetailService bomDetailService; | ||
42 | + | ||
43 | + @RequiresPermissions("general:bomHeader:view") | ||
44 | + @GetMapping() | ||
45 | + public String company() { | ||
46 | + return prefix + "/bomHeader"; | ||
47 | + } | ||
48 | + | ||
49 | + /** | ||
50 | + * 查询商品列表 | ||
51 | + */ | ||
52 | + @ApiOperation(value="查看商品列表", notes="根据物料编码、物料名称、货主编码、创建时间获取商品信息", httpMethod = "POST") | ||
53 | + @RequiresPermissions("general:bomHeader:list") | ||
54 | + @Log(title = "通用-商品管理", operating = "查看商品列表", action = BusinessType.GRANT) | ||
55 | + @PostMapping("/list") | ||
56 | + @ResponseBody | ||
57 | + public TableDataInfo list( | ||
58 | + @ApiParam(name="bomHeader",value="物料编码、物料名称、货主编码") BomHeader bomHeader, | ||
59 | + @ApiParam(name = "createdBegin", value = "起止时间") String createdBegin, | ||
60 | + @ApiParam(name = "createdEnd", value = "结束时间") String createdEnd) { | ||
61 | + LambdaQueryWrapper<BomHeader> lambdaQueryWrapper = Wrappers.lambdaQuery(); | ||
62 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | ||
63 | + Integer pageNum = pageDomain.getPageNum(); | ||
64 | + Integer pageSize = pageDomain.getPageSize(); | ||
65 | + lambdaQueryWrapper.gt(StringUtils.isNotEmpty(createdBegin), BomHeader::getCreated, createdBegin) | ||
66 | + .lt(StringUtils.isNotEmpty(createdEnd), BomHeader::getCreated, createdEnd) | ||
67 | + .eq(StringUtils.isNotEmpty(bomHeader.getMaterialCode()), BomHeader::getMaterialCode, bomHeader.getMaterialCode()) | ||
68 | + .eq(StringUtils.isNotEmpty(bomHeader.getMaterialName()), BomHeader::getMaterialName, bomHeader.getMaterialName()) | ||
69 | + .eq(StringUtils.isNotEmpty(bomHeader.getCompanyCode()), BomHeader::getCompanyCode, bomHeader.getCompanyCode()); | ||
70 | + | ||
71 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){ | ||
72 | + /*使用分页查询*/ | ||
73 | + Page<BomHeader> page = new Page<>(pageNum, pageSize); | ||
74 | + IPage<BomHeader> iPage = bomHeaderService.page(page, lambdaQueryWrapper); | ||
75 | + return getMpDataTable(iPage.getRecords(), iPage.getTotal()); | ||
76 | + } else { | ||
77 | + List<BomHeader> list = bomHeaderService.list(lambdaQueryWrapper); | ||
78 | + return getDataTable(list); | ||
79 | + } | ||
80 | + } | ||
81 | + | ||
82 | + /** | ||
83 | + * 新增商品 | ||
84 | + */ | ||
85 | + @GetMapping("/add") | ||
86 | + public String add() { | ||
87 | + return prefix + "/add"; | ||
88 | + } | ||
89 | + | ||
90 | + /** | ||
91 | + * 新增保存商品 | ||
92 | + */ | ||
93 | + @ApiOperation(value="新增商品", notes="新增商品", httpMethod = "POST") | ||
94 | + @RequiresPermissions("general:bomHeader:add") | ||
95 | + @Log(title = "通用-商品", operating = "新增商品", action = BusinessType.INSERT) | ||
96 | + @PostMapping("/add") | ||
97 | + @ResponseBody | ||
98 | + public AjaxResult addSave(@ApiParam(name = "containerType", value = "商品类型", required = true) | ||
99 | + BomHeader bomHeader) { | ||
100 | + return toAjax(bomHeaderService.save(bomHeader)); | ||
101 | + } | ||
102 | + | ||
103 | + /** | ||
104 | + * 修改商品 | ||
105 | + */ | ||
106 | + @GetMapping("/edit/{id}") | ||
107 | + public String edit(@PathVariable("id") Integer id, ModelMap mmap) { | ||
108 | + mmap.put("bomHeader", bomHeaderService.getById(id)); | ||
109 | + return prefix + "/edit"; | ||
110 | + } | ||
111 | + | ||
112 | + /** | ||
113 | + * 修改保存商品 | ||
114 | + */ | ||
115 | + @ApiOperation(value="修改商品", notes="修改商品", httpMethod = "POST") | ||
116 | + @RequiresPermissions("general:bomHeader:edit") | ||
117 | + @Log(title = "通用-商品", operating = "修改商品", action = BusinessType.UPDATE) | ||
118 | + @PostMapping("/edit") | ||
119 | + @ResponseBody | ||
120 | + public AjaxResult editSave( | ||
121 | + @ApiParam(name = "bomHeader", value = "商品实体类", required = true)BomHeader bomHeader) { | ||
122 | + return toAjax(bomHeaderService.updateById(bomHeader)); | ||
123 | + } | ||
124 | + | ||
125 | + /** | ||
126 | + * 删除容器 | ||
127 | + */ | ||
128 | + @ApiOperation(value="删除商品", notes="根据id批量删除商品,参数示例1,2,3", httpMethod = "POST") | ||
129 | + @RequiresPermissions("general:bomHeader:remove") | ||
130 | + @Log(title = "通用-商品", operating = "删除商品", action = BusinessType.DELETE) | ||
131 | + @PostMapping( "/remove") | ||
132 | + @ResponseBody | ||
133 | + public AjaxResult remove(String ids) { | ||
134 | + if (StringUtils.isEmpty(ids)){ | ||
135 | + return AjaxResult.error("id不能为空"); | ||
136 | + } | ||
137 | + List<Integer> list = new ArrayList<>(); | ||
138 | + for (Integer id : Convert.toIntArray(ids)) { | ||
139 | + | ||
140 | + LambdaQueryWrapper<BomDetail> lambda = Wrappers.lambdaQuery(); | ||
141 | + List<BomDetail> bomDetailList = bomDetailService.list(lambda.eq(BomDetail::getBomId, id)); | ||
142 | + if (bomDetailList.size() != 0) { | ||
143 | + list.add(id); | ||
144 | + } else { | ||
145 | + return AjaxResult.error("商品编码为(" + id + ")存在商品详情"); | ||
146 | + } | ||
147 | + } | ||
148 | + return toAjax(bomHeaderService.removeByIds(list)); | ||
149 | + } | ||
150 | + | ||
151 | +} |
src/main/java/com/huaheng/pc/general/bom/domain/BomDetail.java
0 → 100644
1 | +package com.huaheng.pc.general.bom.domain; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
6 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
7 | +import io.swagger.annotations.ApiModel; | ||
8 | +import io.swagger.annotations.ApiModelProperty; | ||
9 | +import java.io.Serializable; | ||
10 | +import java.util.Date; | ||
11 | +import lombok.Data; | ||
12 | + | ||
13 | +@ApiModel(value="com.huaheng.pc.general.bom.domain.BomDetail") | ||
14 | +@Data | ||
15 | +@TableName(value = "bom_detail") | ||
16 | +public class BomDetail implements Serializable { | ||
17 | + /** | ||
18 | + * 内部号 | ||
19 | + */ | ||
20 | + @TableId(value = "id", type = IdType.AUTO) | ||
21 | + @ApiModelProperty(value="内部号") | ||
22 | + private Integer id; | ||
23 | + | ||
24 | + /** | ||
25 | + * 仓库代码 | ||
26 | + */ | ||
27 | + @TableField(value = "warehouseCode") | ||
28 | + @ApiModelProperty(value="仓库代码") | ||
29 | + private String warehouseCode; | ||
30 | + | ||
31 | + /** | ||
32 | + * 货主 | ||
33 | + */ | ||
34 | + @TableField(value = "companyCode") | ||
35 | + @ApiModelProperty(value="货主") | ||
36 | + private String companyCode; | ||
37 | + | ||
38 | + /** | ||
39 | + * 物料清单内部号 | ||
40 | + */ | ||
41 | + @TableField(value = "bomId") | ||
42 | + @ApiModelProperty(value="物料清单内部号") | ||
43 | + private Integer bomId; | ||
44 | + | ||
45 | + /** | ||
46 | + * 物料编码 | ||
47 | + */ | ||
48 | + @TableField(value = "materialCode") | ||
49 | + @ApiModelProperty(value="物料编码") | ||
50 | + private String materialCode; | ||
51 | + | ||
52 | + /** | ||
53 | + * 物料名称 | ||
54 | + */ | ||
55 | + @TableField(value = "materialName") | ||
56 | + @ApiModelProperty(value="物料名称") | ||
57 | + private String materialName; | ||
58 | + | ||
59 | + /** | ||
60 | + * 数量单位 | ||
61 | + */ | ||
62 | + @TableField(value = "materialUnit") | ||
63 | + @ApiModelProperty(value="数量单位") | ||
64 | + private String materialUnit; | ||
65 | + | ||
66 | + /** | ||
67 | + * 组套层次 | ||
68 | + */ | ||
69 | + @TableField(value = "buildLevel") | ||
70 | + @ApiModelProperty(value="组套层次") | ||
71 | + private Integer buildLevel; | ||
72 | + | ||
73 | + /** | ||
74 | + * 序号 | ||
75 | + */ | ||
76 | + @TableField(value = "buildSequence") | ||
77 | + @ApiModelProperty(value="序号") | ||
78 | + private Integer buildSequence; | ||
79 | + | ||
80 | + /** | ||
81 | + * 每成品需要数量 | ||
82 | + */ | ||
83 | + @TableField(value = "qty") | ||
84 | + @ApiModelProperty(value="每成品需要数量") | ||
85 | + private Integer qty; | ||
86 | + | ||
87 | + /** | ||
88 | + * 分配规则 | ||
89 | + */ | ||
90 | + @TableField(value = "allocationRule") | ||
91 | + @ApiModelProperty(value="分配规则") | ||
92 | + private String allocationRule; | ||
93 | + | ||
94 | + /** | ||
95 | + * 从货位 | ||
96 | + */ | ||
97 | + @TableField(value = "fromLocation") | ||
98 | + @ApiModelProperty(value="从货位") | ||
99 | + private String fromLocation; | ||
100 | + | ||
101 | + /** | ||
102 | + * 有效 | ||
103 | + */ | ||
104 | + @TableField(value = "enable") | ||
105 | + @ApiModelProperty(value="有效") | ||
106 | + private Boolean enable; | ||
107 | + | ||
108 | + /** | ||
109 | + * 创建时间 | ||
110 | + */ | ||
111 | + @TableField(value = "created") | ||
112 | + @ApiModelProperty(value="创建时间") | ||
113 | + private Date created; | ||
114 | + | ||
115 | + /** | ||
116 | + * 创建用户 | ||
117 | + */ | ||
118 | + @TableField(value = "createdBy") | ||
119 | + @ApiModelProperty(value="创建用户") | ||
120 | + private String createdBy; | ||
121 | + | ||
122 | + /** | ||
123 | + * 创建时间 | ||
124 | + */ | ||
125 | + @TableField(value = "lastUpdated") | ||
126 | + @ApiModelProperty(value="创建时间") | ||
127 | + private Date lastUpdated; | ||
128 | + | ||
129 | + /** | ||
130 | + * 更新用户 | ||
131 | + */ | ||
132 | + @TableField(value = "lastUpdatedBy") | ||
133 | + @ApiModelProperty(value="更新用户") | ||
134 | + private String lastUpdatedBy; | ||
135 | + | ||
136 | + /** | ||
137 | + * 数据版本 | ||
138 | + */ | ||
139 | + @TableField(value = "version") | ||
140 | + @ApiModelProperty(value="数据版本") | ||
141 | + private Integer version; | ||
142 | + | ||
143 | + /** | ||
144 | + * 自定义字段1 | ||
145 | + */ | ||
146 | + @TableField(value = "userDef1") | ||
147 | + @ApiModelProperty(value="自定义字段1") | ||
148 | + private String userDef1; | ||
149 | + | ||
150 | + /** | ||
151 | + * 自定义字段2 | ||
152 | + */ | ||
153 | + @TableField(value = "userDef2") | ||
154 | + @ApiModelProperty(value="自定义字段2") | ||
155 | + private String userDef2; | ||
156 | + | ||
157 | + /** | ||
158 | + * 自定义字段3 | ||
159 | + */ | ||
160 | + @TableField(value = "userDef3") | ||
161 | + @ApiModelProperty(value="自定义字段3") | ||
162 | + private String userDef3; | ||
163 | + | ||
164 | + /** | ||
165 | + * 自定义字段4 | ||
166 | + */ | ||
167 | + @TableField(value = "userDef4") | ||
168 | + @ApiModelProperty(value="自定义字段4") | ||
169 | + private String userDef4; | ||
170 | + | ||
171 | + /** | ||
172 | + * 自定义字段5 | ||
173 | + */ | ||
174 | + @TableField(value = "userDef5") | ||
175 | + @ApiModelProperty(value="自定义字段5") | ||
176 | + private String userDef5; | ||
177 | + | ||
178 | + /** | ||
179 | + * 自定义字段6 | ||
180 | + */ | ||
181 | + @TableField(value = "userDef6") | ||
182 | + @ApiModelProperty(value="自定义字段6") | ||
183 | + private String userDef6; | ||
184 | + | ||
185 | + /** | ||
186 | + * 自定义字段7 | ||
187 | + */ | ||
188 | + @TableField(value = "userDef7") | ||
189 | + @ApiModelProperty(value="自定义字段7") | ||
190 | + private String userDef7; | ||
191 | + | ||
192 | + /** | ||
193 | + * 自定义字段8 | ||
194 | + */ | ||
195 | + @TableField(value = "userDef8") | ||
196 | + @ApiModelProperty(value="自定义字段8") | ||
197 | + private String userDef8; | ||
198 | + | ||
199 | + /** | ||
200 | + * 处理标记 | ||
201 | + */ | ||
202 | + @TableField(value = "processStamp") | ||
203 | + @ApiModelProperty(value="处理标记") | ||
204 | + private String processStamp; | ||
205 | + | ||
206 | + private static final long serialVersionUID = 1L; | ||
207 | + | ||
208 | + public static final String COL_WAREHOUSECODE = "warehouseCode"; | ||
209 | + | ||
210 | + public static final String COL_COMPANYCODE = "companyCode"; | ||
211 | + | ||
212 | + public static final String COL_BOMID = "bomId"; | ||
213 | + | ||
214 | + public static final String COL_MATERIALCODE = "materialCode"; | ||
215 | + | ||
216 | + public static final String COL_MATERIALNAME = "materialName"; | ||
217 | + | ||
218 | + public static final String COL_MATERIALUNIT = "materialUnit"; | ||
219 | + | ||
220 | + public static final String COL_BUILDLEVEL = "buildLevel"; | ||
221 | + | ||
222 | + public static final String COL_BUILDSEQUENCE = "buildSequence"; | ||
223 | + | ||
224 | + public static final String COL_QTY = "qty"; | ||
225 | + | ||
226 | + public static final String COL_ALLOCATIONRULE = "allocationRule"; | ||
227 | + | ||
228 | + public static final String COL_FROMLOCATION = "fromLocation"; | ||
229 | + | ||
230 | + public static final String COL_ENABLE = "enable"; | ||
231 | + | ||
232 | + public static final String COL_CREATED = "created"; | ||
233 | + | ||
234 | + public static final String COL_CREATEDBY = "createdBy"; | ||
235 | + | ||
236 | + public static final String COL_LASTUPDATED = "lastUpdated"; | ||
237 | + | ||
238 | + public static final String COL_LASTUPDATEDBY = "lastUpdatedBy"; | ||
239 | + | ||
240 | + public static final String COL_VERSION = "version"; | ||
241 | + | ||
242 | + public static final String COL_USERDEF1 = "userDef1"; | ||
243 | + | ||
244 | + public static final String COL_USERDEF2 = "userDef2"; | ||
245 | + | ||
246 | + public static final String COL_USERDEF3 = "userDef3"; | ||
247 | + | ||
248 | + public static final String COL_USERDEF4 = "userDef4"; | ||
249 | + | ||
250 | + public static final String COL_USERDEF5 = "userDef5"; | ||
251 | + | ||
252 | + public static final String COL_USERDEF6 = "userDef6"; | ||
253 | + | ||
254 | + public static final String COL_USERDEF7 = "userDef7"; | ||
255 | + | ||
256 | + public static final String COL_USERDEF8 = "userDef8"; | ||
257 | + | ||
258 | + public static final String COL_PROCESSSTAMP = "processStamp"; | ||
259 | +} | ||
0 | \ No newline at end of file | 260 | \ No newline at end of file |
src/main/java/com/huaheng/pc/general/bom/mapper/BomDetailMapper.java
0 → 100644
1 | +package com.huaheng.pc.general.bom.mapper; | ||
2 | + | ||
3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
4 | +import com.huaheng.pc.general.bom.domain.BomDetail; | ||
5 | + | ||
6 | +public interface BomDetailMapper extends BaseMapper<BomDetail> { | ||
7 | +} | ||
0 | \ No newline at end of file | 8 | \ No newline at end of file |
src/main/java/com/huaheng/pc/general/bom/service/BomDetailService.java
0 → 100644
src/main/java/com/huaheng/pc/general/bom/service/BomDetailServiceImpl.java
0 → 100644
1 | +package com.huaheng.pc.general.bom.service; | ||
2 | + | ||
3 | +import org.springframework.stereotype.Service; | ||
4 | +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
5 | +import com.huaheng.pc.general.bom.domain.BomDetail; | ||
6 | +import com.huaheng.pc.general.bom.mapper.BomDetailMapper; | ||
7 | + | ||
8 | +@Service | ||
9 | +public class BomDetailServiceImpl extends ServiceImpl<BomDetailMapper, BomDetail> implements BomDetailService{ | ||
10 | + | ||
11 | +} |
src/main/java/com/huaheng/pc/general/carrier/domain/Carrier.java
@@ -10,6 +10,9 @@ import java.io.Serializable; | @@ -10,6 +10,9 @@ import java.io.Serializable; | ||
10 | import java.util.Date; | 10 | import java.util.Date; |
11 | import lombok.Data; | 11 | import lombok.Data; |
12 | 12 | ||
13 | +/** | ||
14 | + * 承运商 | ||
15 | + */ | ||
13 | @ApiModel(value="com.huaheng.pc.general.carrier.domain.Carrier") | 16 | @ApiModel(value="com.huaheng.pc.general.carrier.domain.Carrier") |
14 | @Data | 17 | @Data |
15 | @TableName(value = "carrier") | 18 | @TableName(value = "carrier") |
src/main/java/com/huaheng/pc/general/company/service/CompanyService.java
@@ -11,7 +11,7 @@ public interface CompanyService extends IService<Company>{ | @@ -11,7 +11,7 @@ public interface CompanyService extends IService<Company>{ | ||
11 | 11 | ||
12 | public List<Company> selectCompanyByCurrentUserId(); | 12 | public List<Company> selectCompanyByCurrentUserId(); |
13 | 13 | ||
14 | - List<Company> selectCompanyByUserId(Integer userId); | 14 | + public List<Company> selectCompanyByUserId(); |
15 | 15 | ||
16 | public AjaxResult addCompany(Company company); | 16 | public AjaxResult addCompany(Company company); |
17 | 17 |
src/main/java/com/huaheng/pc/general/company/service/CompanyServiceImpl.java
@@ -39,9 +39,9 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl | @@ -39,9 +39,9 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl | ||
39 | * @return | 39 | * @return |
40 | */ | 40 | */ |
41 | @Override | 41 | @Override |
42 | - public List<Company> selectCompanyByUserId(Integer userId) { | 42 | + public List<Company> selectCompanyByUserId() { |
43 | UserCompany condition = new UserCompany(); | 43 | UserCompany condition = new UserCompany(); |
44 | - condition.setUserId(userId); | 44 | + condition.setUserId(ShiroUtils.getUserId()); |
45 | List<UserCompany> userCompanys = userCompanyMapper.selectListEntityByEqual(condition); | 45 | List<UserCompany> userCompanys = userCompanyMapper.selectListEntityByEqual(condition); |
46 | Company company = new Company(); | 46 | Company company = new Company(); |
47 | company.setWarehouseCode(ShiroUtils.getWarehouseCode()); | 47 | company.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
src/main/java/com/huaheng/pc/general/material/domain/Material.java
@@ -180,7 +180,7 @@ public class Material implements Serializable { | @@ -180,7 +180,7 @@ public class Material implements Serializable { | ||
180 | */ | 180 | */ |
181 | @TableField(value = "enable") | 181 | @TableField(value = "enable") |
182 | @ApiModelProperty(value="状态") | 182 | @ApiModelProperty(value="状态") |
183 | - private byte[] enable; | 183 | + private Boolean enable; |
184 | 184 | ||
185 | /** | 185 | /** |
186 | * 创建时间 | 186 | * 创建时间 |
src/main/java/com/huaheng/pc/general/materialUnit/service/MaterialUnitService.java
@@ -2,7 +2,12 @@ package com.huaheng.pc.general.materialUnit.service; | @@ -2,7 +2,12 @@ package com.huaheng.pc.general.materialUnit.service; | ||
2 | 2 | ||
3 | import com.huaheng.pc.general.materialUnit.domain.MaterialUnit; | 3 | import com.huaheng.pc.general.materialUnit.domain.MaterialUnit; |
4 | import com.baomidou.mybatisplus.extension.service.IService; | 4 | import com.baomidou.mybatisplus.extension.service.IService; |
5 | + | ||
6 | +import java.util.List; | ||
7 | +import java.util.Map; | ||
8 | + | ||
5 | public interface MaterialUnitService extends IService<MaterialUnit>{ | 9 | public interface MaterialUnitService extends IService<MaterialUnit>{ |
6 | 10 | ||
11 | + public List<Map<String, Object>> getUnit(); | ||
7 | 12 | ||
8 | } | 13 | } |
src/main/java/com/huaheng/pc/general/materialUnit/service/MaterialUnitServiceImpl.java
1 | package com.huaheng.pc.general.materialUnit.service; | 1 | package com.huaheng.pc.general.materialUnit.service; |
2 | 2 | ||
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||
3 | import org.springframework.stereotype.Service; | 5 | import org.springframework.stereotype.Service; |
4 | import javax.annotation.Resource; | 6 | import javax.annotation.Resource; |
5 | import java.util.List; | 7 | import java.util.List; |
8 | +import java.util.Map; | ||
9 | + | ||
6 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | 10 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | import com.huaheng.pc.general.materialUnit.domain.MaterialUnit; | 11 | import com.huaheng.pc.general.materialUnit.domain.MaterialUnit; |
8 | import com.huaheng.pc.general.materialUnit.mapper.MaterialUnitMapper; | 12 | import com.huaheng.pc.general.materialUnit.mapper.MaterialUnitMapper; |
9 | import com.huaheng.pc.general.materialUnit.service.MaterialUnitService; | 13 | import com.huaheng.pc.general.materialUnit.service.MaterialUnitService; |
10 | -@Service | 14 | +@Service("materialUnitService") |
11 | public class MaterialUnitServiceImpl extends ServiceImpl<MaterialUnitMapper, MaterialUnit> implements MaterialUnitService{ | 15 | public class MaterialUnitServiceImpl extends ServiceImpl<MaterialUnitMapper, MaterialUnit> implements MaterialUnitService{ |
12 | 16 | ||
17 | + @Override | ||
18 | + public List<Map<String, Object>> getUnit(){ | ||
19 | + LambdaQueryWrapper<MaterialUnit> lambda = Wrappers.lambdaQuery(); | ||
20 | + return this.listMaps(lambda); | ||
21 | + } | ||
13 | } | 22 | } |
src/main/java/com/huaheng/pc/system/role/domain/Role.java
@@ -60,6 +60,7 @@ public class Role | @@ -60,6 +60,7 @@ public class Role | ||
60 | private String warehouseCode; | 60 | private String warehouseCode; |
61 | 61 | ||
62 | /** 用户是否存在此角色标识 默认不存在 */ | 62 | /** 用户是否存在此角色标识 默认不存在 */ |
63 | + @TableField(exist = false) | ||
63 | private boolean flag = false; | 64 | private boolean flag = false; |
64 | 65 | ||
65 | /** 菜单组 */ | 66 | /** 菜单组 */ |
@@ -87,7 +88,6 @@ public class Role | @@ -87,7 +88,6 @@ public class Role | ||
87 | private Date updateTime; | 88 | private Date updateTime; |
88 | 89 | ||
89 | /** 备注 */ | 90 | /** 备注 */ |
90 | -// @TableField(exist=false) | ||
91 | @TableField | 91 | @TableField |
92 | private String remark; | 92 | private String remark; |
93 | 93 |
src/main/java/com/huaheng/pc/system/user/controller/IndexController.java
@@ -6,10 +6,7 @@ import com.github.abel533.echarts.Option; | @@ -6,10 +6,7 @@ import com.github.abel533.echarts.Option; | ||
6 | import com.github.abel533.echarts.axis.Axis; | 6 | import com.github.abel533.echarts.axis.Axis; |
7 | import com.github.abel533.echarts.axis.CategoryAxis; | 7 | import com.github.abel533.echarts.axis.CategoryAxis; |
8 | import com.github.abel533.echarts.axis.ValueAxis; | 8 | import com.github.abel533.echarts.axis.ValueAxis; |
9 | -import com.github.abel533.echarts.code.Orient; | ||
10 | -import com.github.abel533.echarts.code.PointerType; | ||
11 | -import com.github.abel533.echarts.code.SeriesType; | ||
12 | -import com.github.abel533.echarts.code.Trigger; | 9 | +import com.github.abel533.echarts.code.*; |
13 | import com.github.abel533.echarts.json.GsonUtil; | 10 | import com.github.abel533.echarts.json.GsonUtil; |
14 | import com.github.abel533.echarts.series.Line; | 11 | import com.github.abel533.echarts.series.Line; |
15 | import com.github.abel533.echarts.series.Pie; | 12 | import com.github.abel533.echarts.series.Pie; |
@@ -76,7 +73,7 @@ public class IndexController extends BaseController | @@ -76,7 +73,7 @@ public class IndexController extends BaseController | ||
76 | pie.itemStyle().emphasis().setShadowBlur(10); | 73 | pie.itemStyle().emphasis().setShadowBlur(10); |
77 | pie.itemStyle().emphasis().setShadowOffsetX(0); | 74 | pie.itemStyle().emphasis().setShadowOffsetX(0); |
78 | pie.itemStyle().emphasis().setShadowColor("rgba(0, 0, 0, 0.4)"); | 75 | pie.itemStyle().emphasis().setShadowColor("rgba(0, 0, 0, 0.4)"); |
79 | - String sql = "SELECT d.dictLabel '状态', i.qty '库存' FROM (SELECT status ,SUM(qty) qty FROM inventory WHERE warehouseCode = " + ShiroUtils.getWarehouseCode() + " GROUP BY status) i INNER JOIN sys_dict_data d ON i.status= d.dictValue AND d.warehouseCode = '" + ShiroUtils.getWarehouseCode()+"'"; | 76 | + String sql = "SELECT d.dictLabel '状态', i.qty '库存' FROM (SELECT status ,SUM(qty) qty FROM inventory WHERE warehouseCode = " + ShiroUtils.getWarehouseCode() + " GROUP BY status) i INNER JOIN sys_dict_data d ON i.status= d.dictValue AND d.warehouseCode = ' " + ShiroUtils.getWarehouseCode()+"' ;"; |
80 | List<LinkedHashMap<String, Object>> results = mapper.selectCommon(sql); | 77 | List<LinkedHashMap<String, Object>> results = mapper.selectCommon(sql); |
81 | for(LinkedHashMap<String, Object> item : results){ | 78 | for(LinkedHashMap<String, Object> item : results){ |
82 | ChartData chartData = new ChartData(); | 79 | ChartData chartData = new ChartData(); |
@@ -226,7 +223,8 @@ public class IndexController extends BaseController | @@ -226,7 +223,8 @@ public class IndexController extends BaseController | ||
226 | option.legend().setTop(10); | 223 | option.legend().setTop(10); |
227 | option.legend().setBottom(10); | 224 | option.legend().setBottom(10); |
228 | option.legend().setData(new ArrayList<String>()); | 225 | option.legend().setData(new ArrayList<String>()); |
229 | - option.legend().setType("scroll"); | 226 | + option.legend().setType(LegendType.scroll); |
227 | + // option.legend().setType("scroll"); | ||
230 | 228 | ||
231 | Pie pie = new Pie(); | 229 | Pie pie = new Pie(); |
232 | pie.setName("库存"); | 230 | pie.setName("库存"); |
src/main/resources/application.properties
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | #\u540D\u79F0 | 2 | #\u540D\u79F0 |
3 | huaheng.name=huaheng | 3 | huaheng.name=huaheng |
4 | #\u7248\u672C | 4 | #\u7248\u672C |
5 | -huaheng.version=2.6.0 | 5 | +huaheng.version=4.0.0 |
6 | #\u7248\u6743\u5E74\u4EFD | 6 | #\u7248\u6743\u5E74\u4EFD |
7 | huaheng.copyrightYear=2018 | 7 | huaheng.copyrightYear=2018 |
8 | #\u5934\u50CF\u4E0A\u4F20\u8DEF\u5F84 | 8 | #\u5934\u50CF\u4E0A\u4F20\u8DEF\u5F84 |
@@ -107,31 +107,5 @@ gen.autoRemovePre=false | @@ -107,31 +107,5 @@ gen.autoRemovePre=false | ||
107 | # \u8868\u524D\u7F00(\u7C7B\u540D\u4E0D\u4F1A\u5305\u542B\u8868\u524D\u7F00) | 107 | # \u8868\u524D\u7F00(\u7C7B\u540D\u4E0D\u4F1A\u5305\u542B\u8868\u524D\u7F00) |
108 | gen.tablePrefix=sys_ | 108 | gen.tablePrefix=sys_ |
109 | 109 | ||
110 | -# default-store in spring session. it will be set in redis only outside. | ||
111 | -spring.session.store-type=none | ||
112 | -# REDIS (RedisProperties) | ||
113 | -# Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09 | ||
114 | -spring.redis.database=0 | ||
115 | -# Redis\u670D\u52A1\u5668\u5730\u5740 | ||
116 | -spring.redis.host=127.0.0.1 | ||
117 | -# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3 | ||
118 | -spring.redis.port=6379 | ||
119 | -# Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7A7A\uFF09 | ||
120 | -spring.redis.password= | ||
121 | -# \u8FDE\u63A5\u6C60\u6700\u5927\u8FDE\u63A5\u6570\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 | ||
122 | -#spring.redis.pool.max-active=8 | ||
123 | -spring.redis.jedis.pool.max-active=8 | ||
124 | -# \u8FDE\u63A5\u6C60\u6700\u5927\u963B\u585E\u7B49\u5F85\u65F6\u95F4\uFF08\u4F7F\u7528\u8D1F\u503C\u8868\u793A\u6CA1\u6709\u9650\u5236\uFF09 | ||
125 | -#spring.redis.pool.max-wait=-1 | ||
126 | -spring.redis.jedis.pool.max-wait=-1ms | ||
127 | -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5 | ||
128 | -#spring.redis.pool.max-idle=8 | ||
129 | -spring.redis.jedis.pool.max-idle=8 | ||
130 | -# \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5 | ||
131 | -#spring.redis.pool.min-idle=0 | ||
132 | -spring.redis.jedis.pool.min-idle= 0 | ||
133 | -# \u8FDE\u63A5\u8D85\u65F6\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09 | ||
134 | -spring.redis.timeout= 0 | ||
135 | -spring.redis.lettuce.shutdown-timeout=0ms | ||
136 | 110 | ||
137 | 111 |
src/main/resources/mybatis/config/ContainerCapacityMapper.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
3 | +<mapper namespace="com.huaheng.pc.config.containerCapacity.mapper.ContainerCapacityMapper"> | ||
4 | + <resultMap id="BaseResultMap" type="com.huaheng.pc.config.containerCapacity.domain.ContainerCapacity"> | ||
5 | + <!--@mbg.generated--> | ||
6 | + <id column="id" jdbcType="INTEGER" property="id" /> | ||
7 | + <result column="containerType" jdbcType="VARCHAR" property="containerType" /> | ||
8 | + <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> | ||
9 | + <result column="companyCode" jdbcType="VARCHAR" property="companyCode" /> | ||
10 | + <result column="materialCode" jdbcType="VARCHAR" property="materialCode" /> | ||
11 | + <result column="materialName" jdbcType="VARCHAR" property="materialName" /> | ||
12 | + <result column="materialSpec" jdbcType="VARCHAR" property="materialSpec" /> | ||
13 | + <result column="materialUnit" jdbcType="VARCHAR" property="materialUnit" /> | ||
14 | + <result column="qty" jdbcType="DECIMAL" property="qty" /> | ||
15 | + <result column="enable" jdbcType="INTEGER" property="enable" /> | ||
16 | + <result column="created" jdbcType="TIMESTAMP" property="created" /> | ||
17 | + <result column="createdBy" jdbcType="VARCHAR" property="createdBy" /> | ||
18 | + <result column="lastUpdated" jdbcType="TIMESTAMP" property="lastUpdated" /> | ||
19 | + <result column="lastUpdatedBy" jdbcType="VARCHAR" property="lastUpdatedBy" /> | ||
20 | + <result column="version" jdbcType="INTEGER" property="version" /> | ||
21 | + <result column="userDef1" jdbcType="VARCHAR" property="userDef1" /> | ||
22 | + <result column="userDef2" jdbcType="VARCHAR" property="userDef2" /> | ||
23 | + <result column="userDef3" jdbcType="VARCHAR" property="userDef3" /> | ||
24 | + <result column="userDef4" jdbcType="VARCHAR" property="userDef4" /> | ||
25 | + <result column="userDef5" jdbcType="VARCHAR" property="userDef5" /> | ||
26 | + <result column="userDef6" jdbcType="VARCHAR" property="userDef6" /> | ||
27 | + <result column="userDef7" jdbcType="VARCHAR" property="userDef7" /> | ||
28 | + <result column="userDef8" jdbcType="VARCHAR" property="userDef8" /> | ||
29 | + <result column="processStamp" jdbcType="VARCHAR" property="processStamp" /> | ||
30 | + </resultMap> | ||
31 | + <sql id="Base_Column_List"> | ||
32 | + <!--@mbg.generated--> | ||
33 | + id, containerType, warehouseCode, companyCode, materialCode, materialName, materialSpec, | ||
34 | + materialUnit, qty, `enable`, created, createdBy, lastUpdated, lastUpdatedBy, version, | ||
35 | + userDef1, userDef2, userDef3, userDef4, userDef5, userDef6, userDef7, userDef8, processStamp | ||
36 | + </sql> | ||
37 | +</mapper> | ||
0 | \ No newline at end of file | 38 | \ No newline at end of file |
src/main/resources/templates/config/containerCapacity/add.html
@@ -6,23 +6,13 @@ | @@ -6,23 +6,13 @@ | ||
6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | 6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
7 | <form class="form-horizontal m" id="form-containerCapacity-add"> | 7 | <form class="form-horizontal m" id="form-containerCapacity-add"> |
8 | <div class="form-group"> | 8 | <div class="form-group"> |
9 | - <label class="col-sm-3 control-label">库区编码:</label> | 9 | + <label class="col-sm-3 control-label">容器类型编码:</label> |
10 | <div class="col-sm-8"> | 10 | <div class="col-sm-8"> |
11 | - <select id="zonecode" name="zonecode" class="form-control" th:with="result=${@zone.getZoneCodeList()}"> | ||
12 | - <option th:each="item : ${result}" th:text="${item['code']}" th:value="${item['code']}"></option> | ||
13 | - </select> | 11 | + <input id="containerType" name="containerType" class="form-control" type="text"> |
14 | </div> | 12 | </div> |
15 | </div> | 13 | </div> |
16 | <div class="form-group"> | 14 | <div class="form-group"> |
17 | - <label class="col-sm-3 control-label">容器类型名称:</label> | ||
18 | - <div class="col-sm-8"> | ||
19 | - <select id="containercapacity" name="containercapacity" class="form-control" th:with="list=${@containerType.getAllContainerType()}"> | ||
20 | - <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['name']}" th:attr = " containerTypeId = ${item['id']}, containerTypeCode = ${item['code']}"></option> | ||
21 | - </select> | ||
22 | - </div> | ||
23 | - </div> | ||
24 | - <div class="form-group"> | ||
25 | - <label class="col-sm-3 control-label">物料编码:</label> | 15 | + <label class="col-sm-3 control-label">商品编码:</label> |
26 | <div class="col-sm-8"> | 16 | <div class="col-sm-8"> |
27 | <input id="materialCode" name="materialCode" class="form-control" type="text"> | 17 | <input id="materialCode" name="materialCode" class="form-control" type="text"> |
28 | </div> | 18 | </div> |
@@ -34,17 +24,12 @@ | @@ -34,17 +24,12 @@ | ||
34 | <!--</div>--> | 24 | <!--</div>--> |
35 | <!--</div>--> | 25 | <!--</div>--> |
36 | <div class="form-group"> | 26 | <div class="form-group"> |
37 | - <label class="col-sm-3 control-label">上限值:</label> | ||
38 | - <div class="col-sm-8"> | ||
39 | - <input id="uph" name="uph" class="form-control" type="text"> | ||
40 | - </div> | ||
41 | - </div> | ||
42 | - <div class="form-group"> | ||
43 | - <label class="col-sm-3 control-label">备注:</label> | 27 | + <label class="col-sm-3 control-label">存放数量:</label> |
44 | <div class="col-sm-8"> | 28 | <div class="col-sm-8"> |
45 | - <input id="remark" name="remark" class="form-control" type="text"> | 29 | + <input id="qty" name="qty" class="form-control" type="text"> |
46 | </div> | 30 | </div> |
47 | </div> | 31 | </div> |
32 | + | ||
48 | <!--<div class="form-group"> --> | 33 | <!--<div class="form-group"> --> |
49 | <!--<label class="col-sm-3 control-label">创建时间:</label>--> | 34 | <!--<label class="col-sm-3 control-label">创建时间:</label>--> |
50 | <!--<div class="col-sm-8">--> | 35 | <!--<div class="col-sm-8">--> |
@@ -131,7 +116,7 @@ | @@ -131,7 +116,7 @@ | ||
131 | var prefix = ctx + "config/containerCapacity"; | 116 | var prefix = ctx + "config/containerCapacity"; |
132 | $("#form-containerCapacity-add").validate({ | 117 | $("#form-containerCapacity-add").validate({ |
133 | rules:{ | 118 | rules:{ |
134 | - uph:{ | 119 | + qty:{ |
135 | required:true, | 120 | required:true, |
136 | digits:true, | 121 | digits:true, |
137 | number:true, | 122 | number:true, |
@@ -146,12 +131,9 @@ | @@ -146,12 +131,9 @@ | ||
146 | data : { | 131 | data : { |
147 | "enable" : $("input[name='enable']").is(':checked'), | 132 | "enable" : $("input[name='enable']").is(':checked'), |
148 | "materialCode" :$("input[name='materialCode']").val(), | 133 | "materialCode" :$("input[name='materialCode']").val(), |
149 | - "uph" :$("input[name='uph']").val(), | ||
150 | - "remark" :$("input[name='remark']").val(), | ||
151 | - "code" : $("#zonecode option:selected").val(), | ||
152 | - "containerTypeName" : $("#containercapacity option:selected").val(), | ||
153 | - "containerTypeId" : $("#containercapacity option:selected").attr("containerTypeId"), | ||
154 | - "containerTypeCode": $("#containercapacity option:selected").attr("containerTypeCode"), | 134 | + "qty" :$("input[name='qty']").val(), |
135 | + "containerType" :$("input[name='containerType']").val(), | ||
136 | + | ||
155 | }, | 137 | }, |
156 | async : false, | 138 | async : false, |
157 | error : function(request) { | 139 | error : function(request) { |
src/main/resources/templates/config/containerCapacity/containerCapacity.html
@@ -10,13 +10,13 @@ | @@ -10,13 +10,13 @@ | ||
10 | <div class="select-list"> | 10 | <div class="select-list"> |
11 | <ul> | 11 | <ul> |
12 | <li> | 12 | <li> |
13 | - 库区编码:<input type="text" name="code"/> | 13 | + 容器类型编码:<input type="text" name="containerType"/> |
14 | </li> | 14 | </li> |
15 | <li> | 15 | <li> |
16 | - 物料编码:<input type="text" name="materialCode"/> | 16 | + 商品编码:<input type="text" name="materialCode"/> |
17 | </li> | 17 | </li> |
18 | <li> | 18 | <li> |
19 | - 物料名称:<input type="text" name="materialName"/> | 19 | + 商品名称:<input type="text" name="materialName"/> |
20 | </li> | 20 | </li> |
21 | <!--<li>--> | 21 | <!--<li>--> |
22 | <!--角色状态:<select name="enable" th:with="type=${@dict.getType('sys_normal_disable')}">--> | 22 | <!--角色状态:<select name="enable" th:with="type=${@dict.getType('sys_normal_disable')}">--> |
@@ -75,32 +75,24 @@ | @@ -75,32 +75,24 @@ | ||
75 | title : '标识' | 75 | title : '标识' |
76 | }, | 76 | }, |
77 | { | 77 | { |
78 | - field : 'code', | ||
79 | - title : '编码' | ||
80 | - }, | ||
81 | - { | ||
82 | - field : 'containerTypeName', | ||
83 | - title : '容器类型名称' | ||
84 | - }, | ||
85 | - { | ||
86 | - field : 'containerTypeCode', | 78 | + field : 'containerType', |
87 | title : '容器类型编码' | 79 | title : '容器类型编码' |
88 | }, | 80 | }, |
89 | { | 81 | { |
90 | field : 'materialCode', | 82 | field : 'materialCode', |
91 | - title : '物料编码' | 83 | + title : '商品编码' |
92 | }, | 84 | }, |
93 | { | 85 | { |
94 | field : 'materialName', | 86 | field : 'materialName', |
95 | - title : '物料名称' | 87 | + title : '商品名称' |
96 | }, | 88 | }, |
97 | { | 89 | { |
98 | - field : 'uph', | ||
99 | - title : '上限值' | 90 | + field : 'materialSpec', |
91 | + title : '商品单位' | ||
100 | }, | 92 | }, |
101 | { | 93 | { |
102 | - field : 'remark', | ||
103 | - title : '备注' | 94 | + field : 'qty', |
95 | + title : '存放数量' | ||
104 | }, | 96 | }, |
105 | { | 97 | { |
106 | field : 'created', | 98 | field : 'created', |
src/main/resources/templates/config/containerCapacity/edit.html
@@ -6,22 +6,7 @@ | @@ -6,22 +6,7 @@ | ||
6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | 6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
7 | <form class="form-horizontal m" id="form-containerCapacity-edit" th:object="${containerCapacity}"> | 7 | <form class="form-horizontal m" id="form-containerCapacity-edit" th:object="${containerCapacity}"> |
8 | <input id="id" name="id" th:field="*{id}" type="hidden"> | 8 | <input id="id" name="id" th:field="*{id}" type="hidden"> |
9 | - <div class="form-group"> | ||
10 | - <label class="col-sm-3 control-label">库区编码:</label> | ||
11 | - <div class="col-sm-8"> | ||
12 | - <select id="zonecode" name="zonecode" class="form-control" th:with="result=${@zone.getZoneCodeList()}" disabled="disabled"> | ||
13 | - <option th:each="item : ${result}" th:field="*{code}" th:text="${item['code']}" th:value="${item['code']}"></option> | ||
14 | - </select> | ||
15 | - </div> | ||
16 | - </div> | ||
17 | - <div class="form-group"> | ||
18 | - <label class="col-sm-3 control-label">容器类型名称:</label> | ||
19 | - <div class="col-sm-8"> | ||
20 | - <select id="containercapacity" name="containercapacity" class="form-control" th:with="list=${@containerType.getAllContainerType()}" disabled="disabled"> | ||
21 | - <option th:each="item : ${list}" th:field="*{containerTypeName}" th:text="${item['name']}" th:value="${item['name']}" th:attr = " containerTypeId = ${item['id']}, containerTypeCode = ${item['code']}"></option> | ||
22 | - </select> | ||
23 | - </div> | ||
24 | - </div> | 9 | + |
25 | <!--<div class="form-group"> --> | 10 | <!--<div class="form-group"> --> |
26 | <!--<label class="col-sm-3 control-label">仓库Id:</label>--> | 11 | <!--<label class="col-sm-3 control-label">仓库Id:</label>--> |
27 | <!--<div class="col-sm-8">--> | 12 | <!--<div class="col-sm-8">--> |
@@ -35,29 +20,36 @@ | @@ -35,29 +20,36 @@ | ||
35 | <!--</div>--> | 20 | <!--</div>--> |
36 | <!--</div>--> | 21 | <!--</div>--> |
37 | <div class="form-group"> | 22 | <div class="form-group"> |
38 | - <label class="col-sm-3 control-label">物料编码:</label> | 23 | + <label class="col-sm-3 control-label">容器类型编码:</label> |
24 | + <div class="col-sm-8"> | ||
25 | + <input id="containerType" name="containerType" th:field="*{containerType}" class="form-control" type="text" readonly="readonly"> | ||
26 | + </div> | ||
27 | + </div> | ||
28 | + <div class="form-group"> | ||
29 | + <label class="col-sm-3 control-label">商品编码:</label> | ||
39 | <div class="col-sm-8"> | 30 | <div class="col-sm-8"> |
40 | - <input id="materialCode" name="materialCode" th:field="*{materialCode}" class="form-control" type="text" disabled="disabled"> | 31 | + <input id="materialCode" name="materialCode" th:field="*{materialCode}" class="form-control" type="text" readonly="readonly"> |
41 | </div> | 32 | </div> |
42 | </div> | 33 | </div> |
43 | <div class="form-group"> | 34 | <div class="form-group"> |
44 | - <label class="col-sm-3 control-label">物料名称:</label> | 35 | + <label class="col-sm-3 control-label">商品名称:</label> |
45 | <div class="col-sm-8"> | 36 | <div class="col-sm-8"> |
46 | - <input id="materialName" name="materialName" th:field="*{materialName}" class="form-control" type="text" disabled="disabled"> | 37 | + <input id="materialName" name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly="readonly"> |
47 | </div> | 38 | </div> |
48 | </div> | 39 | </div> |
49 | <div class="form-group"> | 40 | <div class="form-group"> |
50 | - <label class="col-sm-3 control-label">上限值:</label> | 41 | + <label class="col-sm-3 control-label">商品规格:</label> |
51 | <div class="col-sm-8"> | 42 | <div class="col-sm-8"> |
52 | - <input id="uph" name="uph" th:field="*{uph}" class="form-control" type="text"> | 43 | + <input id="materialSpec" name="materialSpec" th:field="*{materialSpec}" class="form-control" type="text" readonly="readonly"> |
53 | </div> | 44 | </div> |
54 | </div> | 45 | </div> |
55 | <div class="form-group"> | 46 | <div class="form-group"> |
56 | - <label class="col-sm-3 control-label">备注:</label> | 47 | + <label class="col-sm-3 control-label">存放数量:</label> |
57 | <div class="col-sm-8"> | 48 | <div class="col-sm-8"> |
58 | - <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text"> | 49 | + <input id="qty" name="qty" th:field="*{qty}" class="form-control" type="text"> |
59 | </div> | 50 | </div> |
60 | </div> | 51 | </div> |
52 | + | ||
61 | <!--<div class="form-group"> --> | 53 | <!--<div class="form-group"> --> |
62 | <!--<label class="col-sm-3 control-label">创建时间:</label>--> | 54 | <!--<label class="col-sm-3 control-label">创建时间:</label>--> |
63 | <!--<div class="col-sm-8">--> | 55 | <!--<div class="col-sm-8">--> |
@@ -175,13 +167,11 @@ | @@ -175,13 +167,11 @@ | ||
175 | "id": $("input[name='id']").val(), | 167 | "id": $("input[name='id']").val(), |
176 | "enable" : $("input[name='enable']").is(':checked'), | 168 | "enable" : $("input[name='enable']").is(':checked'), |
177 | "code" : $("#zonecode option:selected").val(), | 169 | "code" : $("#zonecode option:selected").val(), |
178 | - "containerTypeName" : $("#containercapacity option:selected").val(), | ||
179 | - "containerTypeId" : $("#containercapacity option:selected").attr("containerTypeId"), | ||
180 | - "containerTypeCode": $("#containercapacity option:selected").attr("containerTypeCode"), | ||
181 | "materialName" :$("input[name='materialName']").val(), | 170 | "materialName" :$("input[name='materialName']").val(), |
182 | "materialCode" :$("input[name='materialCode']").val(), | 171 | "materialCode" :$("input[name='materialCode']").val(), |
183 | - "uph" :$("input[name='uph']").val(), | ||
184 | - "remark" :$("input[name='remark']").val(), | 172 | + "qty" :$("input[name='qty']").val(), |
173 | + "containerType" :$("input[name='containerType']").val(), | ||
174 | + | ||
185 | }, | 175 | }, |
186 | async : false, | 176 | async : false, |
187 | error : function(request) { | 177 | error : function(request) { |
src/main/resources/templates/config/containerType/add.html
@@ -17,6 +17,12 @@ | @@ -17,6 +17,12 @@ | ||
17 | <input id="name" name="name" class="form-control" type="text"> | 17 | <input id="name" name="name" class="form-control" type="text"> |
18 | </div> | 18 | </div> |
19 | </div> | 19 | </div> |
20 | + <div class="form-group"> | ||
21 | + <label class="col-sm-3 control-label">序号:</label> | ||
22 | + <div class="col-sm-8"> | ||
23 | + <input id="sequence" name="sequence" class="form-control" type="text"> | ||
24 | + </div> | ||
25 | + </div> | ||
20 | <!--<div class="form-group"> --> | 26 | <!--<div class="form-group"> --> |
21 | <!--<label class="col-sm-3 control-label">仓库Id:</label>--> | 27 | <!--<label class="col-sm-3 control-label">仓库Id:</label>--> |
22 | <!--<div class="col-sm-8">--> | 28 | <!--<div class="col-sm-8">--> |
@@ -30,12 +36,6 @@ | @@ -30,12 +36,6 @@ | ||
30 | <!--</div>--> | 36 | <!--</div>--> |
31 | <!--</div>--> | 37 | <!--</div>--> |
32 | <div class="form-group"> | 38 | <div class="form-group"> |
33 | - <label class="col-sm-3 control-label">前缀:</label> | ||
34 | - <div class="col-sm-8"> | ||
35 | - <input id="prefix" name="prefix" class="form-control" type="text"> | ||
36 | - </div> | ||
37 | - </div> | ||
38 | - <div class="form-group"> | ||
39 | <label class="col-sm-3 control-label">空箱重量kg:</label> | 39 | <label class="col-sm-3 control-label">空箱重量kg:</label> |
40 | <div class="col-sm-8"> | 40 | <div class="col-sm-8"> |
41 | <input id="emptyWeight" name="emptyWeight" class="form-control" type="text"> | 41 | <input id="emptyWeight" name="emptyWeight" class="form-control" type="text"> |
@@ -71,6 +71,12 @@ | @@ -71,6 +71,12 @@ | ||
71 | <input id="fillPercent" name="fillPercent" class="form-control" type="text"> | 71 | <input id="fillPercent" name="fillPercent" class="form-control" type="text"> |
72 | </div> | 72 | </div> |
73 | </div> | 73 | </div> |
74 | + <div class="form-group"> | ||
75 | + <label class="col-sm-3 control-label">状态:</label> | ||
76 | + <div class="col-sm-8"> | ||
77 | + <input id="status" name="status" class="form-control" type="text"> | ||
78 | + </div> | ||
79 | + </div> | ||
74 | <!--<div class="form-group"> --> | 80 | <!--<div class="form-group"> --> |
75 | <!--<label class="col-sm-3 control-label">作为默认货箱:</label>--> | 81 | <!--<label class="col-sm-3 control-label">作为默认货箱:</label>--> |
76 | <!--<div class="col-sm-8">--> | 82 | <!--<div class="col-sm-8">--> |
@@ -81,7 +87,7 @@ | @@ -81,7 +87,7 @@ | ||
81 | <label class="col-sm-3 control-label">是否默认容器:</label> | 87 | <label class="col-sm-3 control-label">是否默认容器:</label> |
82 | <div class="col-sm-8"> | 88 | <div class="col-sm-8"> |
83 | <div class="onoffswitch"> | 89 | <div class="onoffswitch"> |
84 | - <input type="checkbox" th:checked="false" class="onoffswitch-checkbox" id="useAsDefault" name="useAsDefault"> | 90 | + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="useAsDefault" name="useAsDefault"> |
85 | <label class="onoffswitch-label" for="useAsDefault"> | 91 | <label class="onoffswitch-label" for="useAsDefault"> |
86 | <span class="onoffswitch-inner"></span> | 92 | <span class="onoffswitch-inner"></span> |
87 | <span class="onoffswitch-switch"></span> | 93 | <span class="onoffswitch-switch"></span> |
@@ -90,36 +96,6 @@ | @@ -90,36 +96,6 @@ | ||
90 | </div> | 96 | </div> |
91 | </div> | 97 | </div> |
92 | <div class="form-group"> | 98 | <div class="form-group"> |
93 | - <label class="col-sm-3 control-label">类型描述:</label> | ||
94 | - <div class="col-sm-8"> | ||
95 | - <input id="remark" name="remark" class="form-control" type="text"> | ||
96 | - </div> | ||
97 | - </div> | ||
98 | - <!--<div class="form-group"> --> | ||
99 | - <!--<label class="col-sm-3 control-label">创建时间:</label>--> | ||
100 | - <!--<div class="col-sm-8">--> | ||
101 | - <!--<input id="created" name="created" class="form-control" type="text">--> | ||
102 | - <!--</div>--> | ||
103 | - <!--</div>--> | ||
104 | - <!--<div class="form-group"> --> | ||
105 | - <!--<label class="col-sm-3 control-label">创建用户:</label>--> | ||
106 | - <!--<div class="col-sm-8">--> | ||
107 | - <!--<input id="createdBy" name="createdBy" class="form-control" type="text">--> | ||
108 | - <!--</div>--> | ||
109 | - <!--</div>--> | ||
110 | - <!--<div class="form-group"> --> | ||
111 | - <!--<label class="col-sm-3 control-label">创建时间:</label>--> | ||
112 | - <!--<div class="col-sm-8">--> | ||
113 | - <!--<input id="lastUpdated" name="lastUpdated" class="form-control" type="text">--> | ||
114 | - <!--</div>--> | ||
115 | - <!--</div>--> | ||
116 | - <!--<div class="form-group"> --> | ||
117 | - <!--<label class="col-sm-3 control-label">更新用户:</label>--> | ||
118 | - <!--<div class="col-sm-8">--> | ||
119 | - <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">--> | ||
120 | - <!--</div>--> | ||
121 | - <!--</div>--> | ||
122 | - <div class="form-group"> | ||
123 | <label class="col-sm-3 control-label">是否有效:</label> | 99 | <label class="col-sm-3 control-label">是否有效:</label> |
124 | <div class="col-sm-8"> | 100 | <div class="col-sm-8"> |
125 | <!--<input id="enable" name="enable" class="form-control" type="text">--> | 101 | <!--<input id="enable" name="enable" class="form-control" type="text">--> |
@@ -205,14 +181,14 @@ | @@ -205,14 +181,14 @@ | ||
205 | "useAsDefault" : $("input[name='useAsDefault']").is(':checked'), | 181 | "useAsDefault" : $("input[name='useAsDefault']").is(':checked'), |
206 | "code" :$("input[name='code']").val(), | 182 | "code" :$("input[name='code']").val(), |
207 | "name" :$("input[name='name']").val(), | 183 | "name" :$("input[name='name']").val(), |
208 | - "prefix" :$("input[name='prefix']").val(), | 184 | + "sequence" :$("input[name='sequence']").val(), |
209 | "emptyWeight" :$("input[name='emptyWeight']").val(), | 185 | "emptyWeight" :$("input[name='emptyWeight']").val(), |
210 | "length" :$("input[name='length']").val(), | 186 | "length" :$("input[name='length']").val(), |
211 | "width" :$("input[name='width']").val(), | 187 | "width" :$("input[name='width']").val(), |
212 | "height" :$("input[name='height']").val(), | 188 | "height" :$("input[name='height']").val(), |
213 | "maxWeight" :$("input[name='maxWeight']").val(), | 189 | "maxWeight" :$("input[name='maxWeight']").val(), |
214 | "fillPercent" :$("input[name='fillPercent']").val(), | 190 | "fillPercent" :$("input[name='fillPercent']").val(), |
215 | - "remark" :$("input[name='remark']").val() | 191 | + "status" :$("input[name='status']").val(), |
216 | }, | 192 | }, |
217 | async : false, | 193 | async : false, |
218 | error : function(request) { | 194 | error : function(request) { |
src/main/resources/templates/config/containerType/containerType.html
@@ -87,6 +87,10 @@ | @@ -87,6 +87,10 @@ | ||
87 | field : 'companyCode', | 87 | field : 'companyCode', |
88 | title : '货主编码' | 88 | title : '货主编码' |
89 | }, | 89 | }, |
90 | + { | ||
91 | + field : 'sequence', | ||
92 | + title : '序号' | ||
93 | + }, | ||
90 | { | 94 | { |
91 | field : 'emptyWeight', | 95 | field : 'emptyWeight', |
92 | title : '空箱重量kg' | 96 | title : '空箱重量kg' |
@@ -124,10 +128,6 @@ | @@ -124,10 +128,6 @@ | ||
124 | } | 128 | } |
125 | }, | 129 | }, |
126 | { | 130 | { |
127 | - field : 'remark', | ||
128 | - title : '类型描述' | ||
129 | - }, | ||
130 | - { | ||
131 | field : 'created', | 131 | field : 'created', |
132 | title : '创建时间' | 132 | title : '创建时间' |
133 | }, | 133 | }, |
src/main/resources/templates/config/containerType/edit.html
@@ -30,12 +30,7 @@ | @@ -30,12 +30,7 @@ | ||
30 | <!--<input id="warehouseCode" name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text">--> | 30 | <!--<input id="warehouseCode" name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text">--> |
31 | <!--</div>--> | 31 | <!--</div>--> |
32 | <!--</div>--> | 32 | <!--</div>--> |
33 | - <div class="form-group"> | ||
34 | - <label class="col-sm-3 control-label">前缀:</label> | ||
35 | - <div class="col-sm-8"> | ||
36 | - <input id="prefix" name="prefix" th:field="*{prefix}" class="form-control" type="text"> | ||
37 | - </div> | ||
38 | - </div> | 33 | + |
39 | <div class="form-group"> | 34 | <div class="form-group"> |
40 | <label class="col-sm-3 control-label">空箱重量kg:</label> | 35 | <label class="col-sm-3 control-label">空箱重量kg:</label> |
41 | <div class="col-sm-8"> | 36 | <div class="col-sm-8"> |
@@ -78,24 +73,24 @@ | @@ -78,24 +73,24 @@ | ||
78 | <input id="useAsDefault" name="useAsDefault" th:field="*{ }" class="form-control" type="text"> | 73 | <input id="useAsDefault" name="useAsDefault" th:field="*{ }" class="form-control" type="text"> |
79 | </div> | 74 | </div> |
80 | </div>--> | 75 | </div>--> |
81 | - <div class="form-group"> | ||
82 | - <label class="col-sm-3 control-label">是否默认容器:</label> | ||
83 | - <div class="col-sm-8"> | ||
84 | - <div class="onoffswitch"> | ||
85 | - <input type="checkbox" th:checked="${containerType.useAsDefault}" class="onoffswitch-checkbox" id="useAsDefault" name="useAsDefault"> | ||
86 | - <label class="onoffswitch-label" for="useAsDefault"> | ||
87 | - <span class="onoffswitch-inner"></span> | ||
88 | - <span class="onoffswitch-switch"></span> | ||
89 | - </label> | ||
90 | - </div> | ||
91 | - </div> | ||
92 | - </div> | ||
93 | - <div class="form-group"> | ||
94 | - <label class="col-sm-3 control-label">类型描述:</label> | ||
95 | - <div class="col-sm-8"> | ||
96 | - <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text"> | ||
97 | - </div> | ||
98 | - </div> | 76 | + <!--<div class="form-group">--> |
77 | + <!--<label class="col-sm-3 control-label">是否默认容器:</label>--> | ||
78 | + <!--<div class="col-sm-8">--> | ||
79 | + <!--<div class="onoffswitch">--> | ||
80 | + <!--<input type="checkbox" th:checked="${containerType.useAsDefault}" class="onoffswitch-checkbox" id="useAsDefault" name="useAsDefault">--> | ||
81 | + <!--<label class="onoffswitch-label" for="useAsDefault">--> | ||
82 | + <!--<span class="onoffswitch-inner"></span>--> | ||
83 | + <!--<span class="onoffswitch-switch"></span>--> | ||
84 | + <!--</label>--> | ||
85 | + <!--</div>--> | ||
86 | + <!--</div>--> | ||
87 | + <!--</div>--> | ||
88 | + <!--<div class="form-group"> --> | ||
89 | + <!--<label class="col-sm-3 control-label">类型描述:</label>--> | ||
90 | + <!--<div class="col-sm-8">--> | ||
91 | + <!--<input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text">--> | ||
92 | + <!--</div>--> | ||
93 | + <!--</div>--> | ||
99 | <!--<div class="form-group"> --> | 94 | <!--<div class="form-group"> --> |
100 | <!--<label class="col-sm-3 control-label">创建时间:</label>--> | 95 | <!--<label class="col-sm-3 control-label">创建时间:</label>--> |
101 | <!--<div class="col-sm-8">--> | 96 | <!--<div class="col-sm-8">--> |
src/main/resources/templates/config/locationType/add.html
@@ -17,12 +17,6 @@ | @@ -17,12 +17,6 @@ | ||
17 | <input id="name" name="name" class="form-control" type="text"> | 17 | <input id="name" name="name" class="form-control" type="text"> |
18 | </div> | 18 | </div> |
19 | </div> | 19 | </div> |
20 | - <div class="form-group"> | ||
21 | - <label class="col-sm-3 control-label">前缀:</label> | ||
22 | - <div class="col-sm-8"> | ||
23 | - <input id="prefix" name="prefix" class="form-control" type="text"> | ||
24 | - </div> | ||
25 | - </div> | ||
26 | <!--<div class="form-group"> --> | 20 | <!--<div class="form-group"> --> |
27 | <!--<label class="col-sm-3 control-label">仓库Id:</label>--> | 21 | <!--<label class="col-sm-3 control-label">仓库Id:</label>--> |
28 | <!--<div class="col-sm-8">--> | 22 | <!--<div class="col-sm-8">--> |
@@ -60,9 +54,33 @@ | @@ -60,9 +54,33 @@ | ||
60 | </div> | 54 | </div> |
61 | </div> | 55 | </div> |
62 | <div class="form-group"> | 56 | <div class="form-group"> |
63 | - <label class="col-sm-3 control-label">描述:</label> | 57 | + <label class="col-sm-3 control-label">最小允许单位:</label> |
58 | + <div class="col-sm-8"> | ||
59 | + <input id="minQtyUm" name="minQtyUm" class="form-control" type="text"> | ||
60 | + </div> | ||
61 | + </div> | ||
62 | + <div class="form-group"> | ||
63 | + <label class="col-sm-3 control-label">校验位:</label> | ||
64 | + <div class="col-sm-8"> | ||
65 | + <input id="checkDigit" name="checkDigit" class="form-control" type="text"> | ||
66 | + </div> | ||
67 | + </div> | ||
68 | + <div class="form-group"> | ||
69 | + <label class="col-sm-3 control-label">最多混放物料数:</label> | ||
70 | + <div class="col-sm-8"> | ||
71 | + <input id="maxMaterials" name="maxMaterials" class="form-control" type="text"> | ||
72 | + </div> | ||
73 | + </div> | ||
74 | + <div class="form-group"> | ||
75 | + <label class="col-sm-3 control-label">最大批号数量:</label> | ||
64 | <div class="col-sm-8"> | 76 | <div class="col-sm-8"> |
65 | - <input id="remark" name="remark" class="form-control" type="text"> | 77 | + <input id="maxLots" name="maxLots" class="form-control" type="text"> |
78 | + </div> | ||
79 | + </div> | ||
80 | + <div class="form-group"> | ||
81 | + <label class="col-sm-3 control-label">最大允许托盘数:</label> | ||
82 | + <div class="col-sm-8"> | ||
83 | + <input id="maxContainers" name="maxContainers" class="form-control" type="text"> | ||
66 | </div> | 84 | </div> |
67 | </div> | 85 | </div> |
68 | <!--<div class="form-group"> --> | 86 | <!--<div class="form-group"> --> |
@@ -89,19 +107,19 @@ | @@ -89,19 +107,19 @@ | ||
89 | <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">--> | 107 | <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">--> |
90 | <!--</div>--> | 108 | <!--</div>--> |
91 | <!--</div>--> | 109 | <!--</div>--> |
92 | - <div class="form-group"> | ||
93 | - <label class="col-sm-3 control-label">是否有效:</label> | ||
94 | - <div class="col-sm-8"> | ||
95 | - <!--<input id="enable" name="enable" class="form-control" type="text">--> | ||
96 | - <div class="onoffswitch"> | ||
97 | - <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable"> | ||
98 | - <label class="onoffswitch-label" for="enable"> | ||
99 | - <span class="onoffswitch-inner"></span> | ||
100 | - <span class="onoffswitch-switch"></span> | ||
101 | - </label> | ||
102 | - </div> | ||
103 | - </div> | ||
104 | - </div> | 110 | + <!--<div class="form-group"> --> |
111 | + <!--<label class="col-sm-3 control-label">是否有效:</label>--> | ||
112 | + <!--<div class="col-sm-8">--> | ||
113 | + <!--<!–<input id="enable" name="enable" class="form-control" type="text">–>--> | ||
114 | + <!--<div class="onoffswitch">--> | ||
115 | + <!--<input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable">--> | ||
116 | + <!--<label class="onoffswitch-label" for="enable">--> | ||
117 | + <!--<span class="onoffswitch-inner"></span>--> | ||
118 | + <!--<span class="onoffswitch-switch"></span>--> | ||
119 | + <!--</label>--> | ||
120 | + <!--</div>--> | ||
121 | + <!--</div>--> | ||
122 | + <!--</div>--> | ||
105 | <!--<div class="form-group"> --> | 123 | <!--<div class="form-group"> --> |
106 | <!--<label class="col-sm-3 control-label">是否删除:</label>--> | 124 | <!--<label class="col-sm-3 control-label">是否删除:</label>--> |
107 | <!--<div class="col-sm-8">--> | 125 | <!--<div class="col-sm-8">--> |
src/main/resources/templates/config/locationType/edit.html
@@ -19,12 +19,6 @@ | @@ -19,12 +19,6 @@ | ||
19 | </div> | 19 | </div> |
20 | </div> | 20 | </div> |
21 | <div class="form-group"> | 21 | <div class="form-group"> |
22 | - <label class="col-sm-3 control-label">前缀:</label> | ||
23 | - <div class="col-sm-8"> | ||
24 | - <input id="prefix" name="prefix" th:field="*{prefix}" class="form-control" type="text"> | ||
25 | - </div> | ||
26 | - </div> | ||
27 | - <div class="form-group"> | ||
28 | <label class="col-sm-3 control-label">长m:</label> | 22 | <label class="col-sm-3 control-label">长m:</label> |
29 | <div class="col-sm-8"> | 23 | <div class="col-sm-8"> |
30 | <input id="length" name="length" th:field="*{length}" class="form-control" type="text"> | 24 | <input id="length" name="length" th:field="*{length}" class="form-control" type="text"> |
@@ -49,9 +43,33 @@ | @@ -49,9 +43,33 @@ | ||
49 | </div> | 43 | </div> |
50 | </div> | 44 | </div> |
51 | <div class="form-group"> | 45 | <div class="form-group"> |
52 | - <label class="col-sm-3 control-label">描述:</label> | 46 | + <label class="col-sm-3 control-label">最小允许单位:</label> |
47 | + <div class="col-sm-8"> | ||
48 | + <input id="minQtyUm" name="minQtyUm" th:field="*{minQtyUm}" class="form-control" type="text"> | ||
49 | + </div> | ||
50 | + </div> | ||
51 | + <div class="form-group"> | ||
52 | + <label class="col-sm-3 control-label">校验位:</label> | ||
53 | + <div class="col-sm-8"> | ||
54 | + <input id="checkDigit" name="checkDigit" th:field="*{checkDigit}" class="form-control" type="text"> | ||
55 | + </div> | ||
56 | + </div> | ||
57 | + <div class="form-group"> | ||
58 | + <label class="col-sm-3 control-label">最多混放物料数:</label> | ||
59 | + <div class="col-sm-8"> | ||
60 | + <input id="maxMaterials" name="maxMaterials" th:field="*{maxMaterials}" class="form-control" type="text"> | ||
61 | + </div> | ||
62 | + </div> | ||
63 | + <div class="form-group"> | ||
64 | + <label class="col-sm-3 control-label">最大批号数量:</label> | ||
65 | + <div class="col-sm-8"> | ||
66 | + <input id="maxLots" name="maxLots" th:field="*{maxLots}" class="form-control" type="text"> | ||
67 | + </div> | ||
68 | + </div> | ||
69 | + <div class="form-group"> | ||
70 | + <label class="col-sm-3 control-label">最大允许托盘数:</label> | ||
53 | <div class="col-sm-8"> | 71 | <div class="col-sm-8"> |
54 | - <input id="remark" name="remark" th:field="*{remark}" class="form-control" type="text"> | 72 | + <input id="maxContainers" name="maxContainers" th:field="*{maxContainers}" class="form-control" type="text"> |
55 | </div> | 73 | </div> |
56 | </div> | 74 | </div> |
57 | <!--<div class="form-group"> --> | 75 | <!--<div class="form-group"> --> |
src/main/resources/templates/config/locationType/locationType.html
@@ -71,20 +71,12 @@ | @@ -71,20 +71,12 @@ | ||
71 | title : '库位类型Id' | 71 | title : '库位类型Id' |
72 | }, | 72 | }, |
73 | { | 73 | { |
74 | - field : 'prefix', | ||
75 | - title : '前缀' | 74 | + field : 'code', |
75 | + title : '货位类型' | ||
76 | }, | 76 | }, |
77 | { | 77 | { |
78 | - field : 'name', | ||
79 | - title : '库位名称' | ||
80 | - }, | ||
81 | - { | ||
82 | - field : 'code', | ||
83 | - title : '编码' | ||
84 | - }, | ||
85 | - { | ||
86 | - field : 'warehouseId', | ||
87 | - title : '仓库Id' | 78 | + field : 'name', |
79 | + title : '名称' | ||
88 | }, | 80 | }, |
89 | { | 81 | { |
90 | field : 'warehouseCode', | 82 | field : 'warehouseCode', |
@@ -107,9 +99,25 @@ | @@ -107,9 +99,25 @@ | ||
107 | title : '最大重量kg' | 99 | title : '最大重量kg' |
108 | }, | 100 | }, |
109 | { | 101 | { |
110 | - field : 'remark', | ||
111 | - title : '描述' | ||
112 | - }, | 102 | + field : 'minQtyUm', |
103 | + title : '最小允许单位' | ||
104 | + }, | ||
105 | + { | ||
106 | + field : 'checkDigit', | ||
107 | + title : '校验位' | ||
108 | + }, | ||
109 | + { | ||
110 | + field : 'checkDigit', | ||
111 | + title : '校验位' | ||
112 | + }, | ||
113 | + { | ||
114 | + field : 'maxMaterials', | ||
115 | + title : '最多混放物料数' | ||
116 | + }, | ||
117 | + { | ||
118 | + field : 'maxContainers', | ||
119 | + title : '最大允许托盘数' | ||
120 | + }, | ||
113 | { | 121 | { |
114 | field : 'created', | 122 | field : 'created', |
115 | title : '创建时间' | 123 | title : '创建时间' |
src/main/resources/templates/config/zoneCapacity/add.html
@@ -12,17 +12,11 @@ | @@ -12,17 +12,11 @@ | ||
12 | <input id="materialId" name="materialId" type="hidden"> | 12 | <input id="materialId" name="materialId" type="hidden"> |
13 | </div> | 13 | </div> |
14 | </div> | 14 | </div> |
15 | - <div class="form-group"> | ||
16 | - <label class="col-sm-3 control-label">仓库:</label> | ||
17 | - <div class="col-sm-8"> | ||
18 | - <input id="warehouseCode" name="warehouseCode" class="form-control" type="text"> | ||
19 | - </div> | ||
20 | - </div> | ||
21 | <div class="form-group"> | 15 | <div class="form-group"> |
22 | <label class="col-sm-3 control-label">货位过滤条件:</label> | 16 | <label class="col-sm-3 control-label">货位过滤条件:</label> |
23 | <div class="col-sm-8"> | 17 | <div class="col-sm-8"> |
24 | - <select id="zoneId" name="zoneId" class="form-control" th:with="zones=${@zone.list()}"> | ||
25 | - <option th:each="zone: ${zones}" th:text="${zone['name']}" th:value="${zone['id']}"></option> | 18 | + <select id="filterCode" name="filterCode" class="form-control" th:with="zones=${@zone.list()}"> |
19 | + <option th:each="zone: ${zones}" th:text="${zone['name']}" th:value="${zone['code']}"></option> | ||
26 | </select> | 20 | </select> |
27 | </div> | 21 | </div> |
28 | </div> | 22 | </div> |
@@ -54,7 +48,7 @@ | @@ -54,7 +48,7 @@ | ||
54 | materialCode:{ | 48 | materialCode:{ |
55 | required:true, | 49 | required:true, |
56 | }, | 50 | }, |
57 | - warehouseCode:{ | 51 | + filterCode:{ |
58 | required:true, | 52 | required:true, |
59 | }, | 53 | }, |
60 | materialCode:{ | 54 | materialCode:{ |
src/main/resources/templates/config/zoneCapacity/edit.html
@@ -7,98 +7,39 @@ | @@ -7,98 +7,39 @@ | ||
7 | <form class="form-horizontal m" id="form-zoneCapacity-edit" th:object="${zoneCapacity}"> | 7 | <form class="form-horizontal m" id="form-zoneCapacity-edit" th:object="${zoneCapacity}"> |
8 | <input id="id" name="id" th:field="*{id}" type="hidden"> | 8 | <input id="id" name="id" th:field="*{id}" type="hidden"> |
9 | <div class="form-group"> | 9 | <div class="form-group"> |
10 | - <label class="col-sm-3 control-label">编码:</label> | 10 | + <label class="col-sm-3 control-label">货位过滤条件:</label> |
11 | <div class="col-sm-8"> | 11 | <div class="col-sm-8"> |
12 | - <input id="code" name="code" th:field="*{code}" class="form-control" type="text"> | ||
13 | - </div> | ||
14 | - </div> | ||
15 | - <div class="form-group"> | ||
16 | - <label class="col-sm-3 control-label">名称:</label> | ||
17 | - <div class="col-sm-8"> | ||
18 | - <input id="name" name="name" th:field="*{name}" class="form-control" type="text"> | 12 | + <input id="filterCode" name="filterCode" th:field="*{filterCode}" class="form-control" type="text" readonly="readonly"> |
19 | </div> | 13 | </div> |
20 | </div> | 14 | </div> |
21 | <div class="form-group"> | 15 | <div class="form-group"> |
22 | - <label class="col-sm-3 control-label">物料:</label> | 16 | + <label class="col-sm-3 control-label">商品编码:</label> |
23 | <div class="col-sm-8"> | 17 | <div class="col-sm-8"> |
24 | - <input id="materialCode" name="materialCode" th:field="*{materialCode}" class="form-control" type="text"> | ||
25 | - <input id="materialId" name="materialId" th:field="*{materialId}" type="hidden"> | 18 | + <input id="materialCode" name="materialCode" th:field="*{materialCode}" class="form-control" type="text" readonly="readonly"> |
26 | </div> | 19 | </div> |
27 | </div> | 20 | </div> |
28 | <div class="form-group"> | 21 | <div class="form-group"> |
29 | - <label class="col-sm-3 control-label">物料类别:</label> | 22 | + <label class="col-sm-3 control-label">商品名称:</label> |
30 | <div class="col-sm-8"> | 23 | <div class="col-sm-8"> |
31 | - <select id="materialType" name="materialType" th:field="*{materialType}" th:with="type=${@dict.getType('materialType')}" class="form-control"> | ||
32 | - <option th:each="e : ${type}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option> | ||
33 | - </select> | 24 | + <input id="materialName" name="materialName" th:field="*{materialName}" class="form-control" type="text" readonly="readonly"> |
34 | </div> | 25 | </div> |
35 | </div> | 26 | </div> |
36 | <div class="form-group"> | 27 | <div class="form-group"> |
37 | - <label class="col-sm-3 control-label">仓库区域:</label> | 28 | + <label class="col-sm-3 control-label">商品规格:</label> |
38 | <div class="col-sm-8"> | 29 | <div class="col-sm-8"> |
39 | - <select id="zoneId" name="zoneId" class="form-control" th:field="*{zoneId}" th:with="zones=${@zone.getZoneCodeList()}"> | ||
40 | - <option th:each="zone: ${zones}" th:text="${zone['name']}" th:value="${zone['id']}"></option> | ||
41 | - </select> | 30 | + <input id="materialSpec" name="materialSpec" th:field="*{materialSpec}" class="form-control" type="text" readonly="readonly"> |
42 | </div> | 31 | </div> |
43 | </div> | 32 | </div> |
44 | <div class="form-group"> | 33 | <div class="form-group"> |
45 | - <label class="col-sm-3 control-label">上限预警值:</label> | 34 | + <label class="col-sm-3 control-label">最大数量:</label> |
46 | <div class="col-sm-8"> | 35 | <div class="col-sm-8"> |
47 | - <input id="uphAlarm" name="uphAlarm" th:field="*{uphAlarm}" class="form-control" type="text"> | 36 | + <input id="maxQty" name="maxQty" th:field="*{maxQty}" class="form-control" type="text"> |
48 | </div> | 37 | </div> |
49 | </div> | 38 | </div> |
50 | <div class="form-group"> | 39 | <div class="form-group"> |
51 | - <label class="col-sm-3 control-label">上限值:</label> | ||
52 | - <div class="col-sm-8"> | ||
53 | - <input id="uph" name="uph" th:field="*{uph}" class="form-control" type="text"> | ||
54 | - </div> | ||
55 | - </div> | ||
56 | - <div class="form-group"> | ||
57 | - <label class="col-sm-3 control-label">下限预警值:</label> | ||
58 | - <div class="col-sm-8"> | ||
59 | - <input id="lphAlarm" name="lphAlarm" th:field="*{lphAlarm}" class="form-control" type="text"> | ||
60 | - </div> | ||
61 | - </div> | ||
62 | - <div class="form-group"> | ||
63 | - <label class="col-sm-3 control-label">下限值:</label> | ||
64 | - <div class="col-sm-8"> | ||
65 | - <input id="lph" name="lph" th:field="*{lph}" class="form-control" type="text"> | ||
66 | - </div> | ||
67 | - </div> | ||
68 | - <div class="form-group"> | ||
69 | - <label class="col-sm-3 control-label">是否有效:</label> | ||
70 | - <div class="col-sm-8"> | ||
71 | - <div class="onoffswitch"> | ||
72 | - <input type="checkbox" th:checked="*{enable}" class="onoffswitch-checkbox" id="enable" name="enable"> | ||
73 | - <label class="onoffswitch-label" for="enable"> | ||
74 | - <span class="onoffswitch-inner"></span> | ||
75 | - <span class="onoffswitch-switch"></span> | ||
76 | - </label> | ||
77 | - </div> | ||
78 | - </div> | ||
79 | - </div> | ||
80 | - <div class="form-group"> | ||
81 | - <label class="col-sm-3 control-label">创建时间:</label> | 40 | + <label class="col-sm-3 control-label">最小数量:</label> |
82 | <div class="col-sm-8"> | 41 | <div class="col-sm-8"> |
83 | - <input id="created" name="created" th:field="*{created}" class="form-control" type="text" readonly="readonly"> | ||
84 | - </div> | ||
85 | - </div> | ||
86 | - <div class="form-group"> | ||
87 | - <label class="col-sm-3 control-label">创建用户:</label> | ||
88 | - <div class="col-sm-8"> | ||
89 | - <input id="createdBy" name="createdBy" th:field="*{createdBy}" class="form-control" type="text" readonly="readonly"> | ||
90 | - </div> | ||
91 | - </div> | ||
92 | - <div class="form-group"> | ||
93 | - <label class="col-sm-3 control-label">创建时间:</label> | ||
94 | - <div class="col-sm-8"> | ||
95 | - <input id="lastUpdated" name="lastUpdated" th:field="*{lastUpdated}" class="form-control" type="text" readonly="readonly"> | ||
96 | - </div> | ||
97 | - </div> | ||
98 | - <div class="form-group"> | ||
99 | - <label class="col-sm-3 control-label">更新用户:</label> | ||
100 | - <div class="col-sm-8"> | ||
101 | - <input id="lastUpdatedBy" name="lastUpdatedBy" th:field="*{lastUpdatedBy}" class="form-control" type="text" readonly="readonly"> | 42 | + <input id="minQty" name="minQty" th:field="*{minQty}" class="form-control" type="text"> |
102 | </div> | 43 | </div> |
103 | </div> | 44 | </div> |
104 | <div class="form-group"> | 45 | <div class="form-group"> |
@@ -114,30 +55,23 @@ | @@ -114,30 +55,23 @@ | ||
114 | var prefix = ctx + "config/zoneCapacity" | 55 | var prefix = ctx + "config/zoneCapacity" |
115 | $("#form-zoneCapacity-edit").validate({ | 56 | $("#form-zoneCapacity-edit").validate({ |
116 | rules:{ | 57 | rules:{ |
117 | - code:{ | ||
118 | - required:true, | ||
119 | - }, | ||
120 | - name:{ | 58 | + filterCode:{ |
121 | required:true, | 59 | required:true, |
122 | }, | 60 | }, |
123 | materialCode:{ | 61 | materialCode:{ |
124 | required:true, | 62 | required:true, |
125 | }, | 63 | }, |
126 | - uphAlarm:{ | 64 | + materialName:{ |
127 | required:true, | 65 | required:true, |
128 | - range:[0, 100] | ||
129 | }, | 66 | }, |
130 | - uph:{ | 67 | + materialSpec:{ |
131 | required:true, | 68 | required:true, |
132 | - range:[0, 100] | ||
133 | }, | 69 | }, |
134 | - lphAlarm:{ | 70 | + maxQty:{ |
135 | required:true, | 71 | required:true, |
136 | - range:[0, 100] | ||
137 | }, | 72 | }, |
138 | - lph:{ | 73 | + minQty:{ |
139 | required:true, | 74 | required:true, |
140 | - range:[0, 100] | ||
141 | }, | 75 | }, |
142 | }, | 76 | }, |
143 | submitHandler: function(form) { | 77 | submitHandler: function(form) { |
src/main/resources/templates/general/material/add.html
@@ -6,17 +6,37 @@ | @@ -6,17 +6,37 @@ | ||
6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | 6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
7 | <form class="form-horizontal m" id="form-material-add"> | 7 | <form class="form-horizontal m" id="form-material-add"> |
8 | <div class="form-group"> | 8 | <div class="form-group"> |
9 | - <label class="col-sm-3 control-label">存货编码:</label> | 9 | + <label class="col-sm-3 control-label">编码:</label> |
10 | <div class="col-sm-8"> | 10 | <div class="col-sm-8"> |
11 | <input id="code" name="code" class="form-control" type="text"> | 11 | <input id="code" name="code" class="form-control" type="text"> |
12 | </div> | 12 | </div> |
13 | </div> | 13 | </div> |
14 | <div class="form-group"> | 14 | <div class="form-group"> |
15 | + <label class="col-sm-3 control-label">货主编码:</label> | ||
16 | + <div class="col-sm-8"> | ||
17 | + <input id="companyCode" name="companyCode" class="form-control" type="text"> | ||
18 | + </div> | ||
19 | + </div> | ||
20 | + <div class="form-group"> | ||
15 | <label class="col-sm-3 control-label">名称:</label> | 21 | <label class="col-sm-3 control-label">名称:</label> |
16 | <div class="col-sm-8"> | 22 | <div class="col-sm-8"> |
17 | <input id="name" name="name" class="form-control" type="text"> | 23 | <input id="name" name="name" class="form-control" type="text"> |
18 | </div> | 24 | </div> |
19 | </div> | 25 | </div> |
26 | + <div class="form-group"> | ||
27 | + <label class="col-sm-3 control-label">规格:</label> | ||
28 | + <div class="col-sm-8"> | ||
29 | + <input id="spec" name="spec" class="form-control" type="text"> | ||
30 | + </div> | ||
31 | + </div> | ||
32 | + <div class="form-group"> | ||
33 | + <label class="col-sm-3 control-label">单位:</label> | ||
34 | + <div class="col-sm-8"> | ||
35 | + <select id="unit" name="unit" class="form-control" th:with="materialUnit=${@materialUnitService.getUnit()}"> | ||
36 | + <option th:each="item : ${materialUnit}" th:text="${item['unit']}" th:value="${item['unit']}"></option> | ||
37 | + </select> | ||
38 | + </div> | ||
39 | + </div> | ||
20 | <div class="form-group"> | 40 | <div class="form-group"> |
21 | <label class="col-sm-3 control-label">物料类别:</label> | 41 | <label class="col-sm-3 control-label">物料类别:</label> |
22 | <div class="col-sm-8"> | 42 | <div class="col-sm-8"> |
@@ -26,140 +46,101 @@ | @@ -26,140 +46,101 @@ | ||
26 | </div> | 46 | </div> |
27 | </div> | 47 | </div> |
28 | <div class="form-group"> | 48 | <div class="form-group"> |
29 | - <label class="col-sm-3 control-label">库区编码:</label> | 49 | + <label class="col-sm-3 control-label">ABC分类:</label> |
30 | <div class="col-sm-8"> | 50 | <div class="col-sm-8"> |
31 | - <input id="zoneCode" name="zoneCode" class="form-control" type="text" placeholder="指定该货物只能放在规定库区时填写,否则不填!"/> | 51 | + <input id="abcClass" name="abcClass" class="form-control" type="text"> |
32 | </div> | 52 | </div> |
33 | </div> | 53 | </div> |
34 | <div class="form-group"> | 54 | <div class="form-group"> |
35 | - <label class="col-sm-3 control-label">货主:</label> | 55 | + <label class="col-sm-3 control-label">保质期(天)</label> |
36 | <div class="col-sm-8"> | 56 | <div class="col-sm-8"> |
37 | - <select id="company" name="company" class="form-control" th:with="list=${@company.selectCompanyByCurrentUserId()}"> | ||
38 | - <option value ="" code="">全部货主</option> | ||
39 | - <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['id']}" th:attr = " code = ${item['code']}"></option> | ||
40 | - </select> | 57 | + <input id="daysToExpire" name="daysToExpire" class="form-control" type="text"/> |
41 | </div> | 58 | </div> |
42 | </div> | 59 | </div> |
43 | <div class="form-group"> | 60 | <div class="form-group"> |
44 | - <label class="col-sm-3 control-label">条码:</label> | 61 | + <label class="col-sm-3 control-label">定位规则:</label> |
45 | <div class="col-sm-8"> | 62 | <div class="col-sm-8"> |
46 | - <input id="barcode" name="barcode" class="form-control" type="text"> | 63 | + <input id="locatingRule" name="locatingRule" class="form-control" type="text"> |
47 | </div> | 64 | </div> |
48 | </div> | 65 | </div> |
49 | - <!--<div class="form-group"> --> | ||
50 | - <!--<label class="col-sm-3 control-label">条码2:</label>--> | ||
51 | - <!--<div class="col-sm-8">--> | ||
52 | - <!--<input id="barcode2" name="barcode2" class="form-control" type="text">--> | ||
53 | - <!--</div>--> | ||
54 | - <!--</div>--> | ||
55 | - <!--<div class="form-group"> --> | ||
56 | - <!--<label class="col-sm-3 control-label">条码3:</label>--> | ||
57 | - <!--<div class="col-sm-8">--> | ||
58 | - <!--<input id="barcode3" name="barcode3" class="form-control" type="text">--> | ||
59 | - <!--</div>--> | ||
60 | - <!--</div>--> | ||
61 | - <!--<div class="form-group"> --> | ||
62 | - <!--<label class="col-sm-3 control-label">条码4:</label>--> | ||
63 | - <!--<div class="col-sm-8">--> | ||
64 | - <!--<input id="barcode4" name="barcode4" class="form-control" type="text">--> | ||
65 | - <!--</div>--> | ||
66 | - <!--</div>--> | ||
67 | - <!--<div class="form-group"> --> | ||
68 | - <!--<label class="col-sm-3 control-label">类别A:</label>--> | ||
69 | - <!--<div class="col-sm-8">--> | ||
70 | - <!--<input id="classA" name="classA" class="form-control" type="text">--> | ||
71 | - <!--</div>--> | ||
72 | - <!--</div>--> | ||
73 | - <!--<div class="form-group"> --> | ||
74 | - <!--<label class="col-sm-3 control-label">类别B:</label>--> | ||
75 | - <!--<div class="col-sm-8">--> | ||
76 | - <!--<input id="classB" name="classB" class="form-control" type="text">--> | ||
77 | - <!--</div>--> | ||
78 | - <!--</div>--> | ||
79 | - <!--<div class="form-group"> --> | ||
80 | - <!--<label class="col-sm-3 control-label">类别C:</label>--> | ||
81 | - <!--<div class="col-sm-8">--> | ||
82 | - <!--<input id="classC" name="classC" class="form-control" type="text">--> | ||
83 | - <!--</div>--> | ||
84 | - <!--</div>--> | ||
85 | <div class="form-group"> | 66 | <div class="form-group"> |
86 | - <label class="col-sm-3 control-label">规格:</label> | 67 | + <label class="col-sm-3 control-label">分配规则:</label> |
87 | <div class="col-sm-8"> | 68 | <div class="col-sm-8"> |
88 | - <input id="specification" name="specification" class="form-control" type="text"> | 69 | + <input id="allocationRule" name="allocationRule" class="form-control" type="text"> |
89 | </div> | 70 | </div> |
90 | </div> | 71 | </div> |
91 | <div class="form-group"> | 72 | <div class="form-group"> |
92 | - <label class="col-sm-3 control-label">品牌:</label> | 73 | + <label class="col-sm-3 control-label">补货规则:</label> |
93 | <div class="col-sm-8"> | 74 | <div class="col-sm-8"> |
94 | - <input id="brand" name="brand" class="form-control" type="text"> | 75 | + <input id="replenishmentRule" name="replenishmentRule" class="form-control" type="text"> |
76 | + </div> | ||
77 | + </div> | ||
78 | + <div class="form-group"> | ||
79 | + <label class="col-sm-3 control-label">空货位规则:</label> | ||
80 | + <div class="col-sm-8"> | ||
81 | + <input id="emptyLocRule" name="emptyLocRule" class="form-control" type="text"> | ||
95 | </div> | 82 | </div> |
96 | </div> | 83 | </div> |
97 | - <!--<div class="form-group"> --> | ||
98 | - <!--<label class="col-sm-3 control-label">尺码:</label>--> | ||
99 | - <!--<div class="col-sm-8">--> | ||
100 | - <!--<input id="size" name="size" class="form-control" type="text">--> | ||
101 | - <!--</div>--> | ||
102 | - <!--</div>--> | ||
103 | - <!--<div class="form-group"> --> | ||
104 | - <!--<label class="col-sm-3 control-label">颜色:</label>--> | ||
105 | - <!--<div class="col-sm-8">--> | ||
106 | - <!--<input id="color" name="color" class="form-control" type="text">--> | ||
107 | - <!--</div>--> | ||
108 | - <!--</div>--> | ||
109 | - <!--<div class="form-group"> --> | ||
110 | - <!--<label class="col-sm-3 control-label">产地:</label>--> | ||
111 | - <!--<div class="col-sm-8">--> | ||
112 | - <!--<input id="placeOfOrigin" name="placeOfOrigin" class="form-control" type="text">--> | ||
113 | - <!--</div>--> | ||
114 | - <!--</div>--> | ||
115 | <div class="form-group"> | 84 | <div class="form-group"> |
116 | - <label class="col-sm-3 control-label">保质期(天):</label> | 85 | + <label class="col-sm-3 control-label">入库规则</label> |
117 | <div class="col-sm-8"> | 86 | <div class="col-sm-8"> |
118 | - <input id="daysToExpire" name="daysToExpire" class="form-control" type="text"> | 87 | + <input id="receivingFlow" name="receivingFlow" class="form-control" type="text"> |
119 | </div> | 88 | </div> |
120 | </div> | 89 | </div> |
121 | <div class="form-group"> | 90 | <div class="form-group"> |
122 | - <label class="col-sm-3 control-label">临期预警天数:</label> | 91 | + <label class="col-sm-3 control-label">出库流程:</label> |
123 | <div class="col-sm-8"> | 92 | <div class="col-sm-8"> |
124 | - <input id="expiringDays" name="expiringDays" class="form-control" type="text"> | 93 | + <input id="shippingFlow" name="shippingFlow" class="form-control" type="text"> |
125 | </div> | 94 | </div> |
126 | </div> | 95 | </div> |
127 | <div class="form-group"> | 96 | <div class="form-group"> |
128 | - <label class="col-sm-3 control-label">收货预警天数:</label> | 97 | + <label class="col-sm-3 control-label">属性模板:</label> |
129 | <div class="col-sm-8"> | 98 | <div class="col-sm-8"> |
130 | - <input id="minShelfLifeDays" name="minShelfLifeDays" class="form-control" type="text"> | 99 | + <input id="attributeTemplateCode" name="attributeTemplateCode" class="form-control" type="text"> |
131 | </div> | 100 | </div> |
132 | </div> | 101 | </div> |
133 | <div class="form-group"> | 102 | <div class="form-group"> |
134 | - <label class="col-sm-3 control-label">成本:</label> | 103 | + <label class="col-sm-3 control-label">记录序列号:</label> |
135 | <div class="col-sm-8"> | 104 | <div class="col-sm-8"> |
136 | - <input id="costPrice" name="costPrice" class="form-control" type="text"> | 105 | + <input id="trackSerialNum" name="trackSerialNum" class="form-control" type="text"> |
137 | </div> | 106 | </div> |
138 | </div> | 107 | </div> |
139 | <div class="form-group"> | 108 | <div class="form-group"> |
140 | - <label class="col-sm-3 control-label">标价:</label> | 109 | + <label class="col-sm-3 control-label">自动生成序列号:</label> |
141 | <div class="col-sm-8"> | 110 | <div class="col-sm-8"> |
142 | - <input id="listPrice" name="listPrice" class="form-control" type="text"> | 111 | + <input id="autoGenSerialNum" name="autoGenSerialNum" class="form-control" type="text"> |
143 | </div> | 112 | </div> |
144 | </div> | 113 | </div> |
145 | <div class="form-group"> | 114 | <div class="form-group"> |
146 | - <label class="col-sm-3 control-label">净价:</label> | 115 | + <label class="col-sm-3 control-label">自动生成序列号表达式:</label> |
147 | <div class="col-sm-8"> | 116 | <div class="col-sm-8"> |
148 | - <input id="netPrice" name="netPrice" class="form-control" type="text"> | 117 | + <input id="autoGenSerialNumFormat" name="autoGenSerialNumFormat" class="form-control" type="text"> |
149 | </div> | 118 | </div> |
150 | </div> | 119 | </div> |
151 | - <!--<div class="form-group"> --> | ||
152 | - <!--<label class="col-sm-3 control-label">出入库是否按照 生产日期 来匹配:</label>--> | ||
153 | - <!--<div class="col-sm-8">--> | ||
154 | - <!--<input id="manufactureDate" name="manufactureDate" class="form-control" type="text">--> | ||
155 | - <!--</div>--> | ||
156 | - <!--</div>--> | ||
157 | - <!--<div class="form-group"> --> | ||
158 | - <!--<label class="col-sm-3 control-label">出入库是否按照 入库时间 来匹配:</label>--> | ||
159 | - <!--<div class="col-sm-8">--> | ||
160 | - <!--<input id="receiptDate" name="receiptDate" class="form-control" type="text">--> | ||
161 | - <!--</div>--> | ||
162 | - <!--</div>--> | 120 | + <div class="form-group"> |
121 | + <label class="col-sm-3 control-label">序列号模板:</label> | ||
122 | + <div class="col-sm-8"> | ||
123 | + <input id="snTemplateCode" name="snTemplateCode" class="form-control" type="text"> | ||
124 | + </div> | ||
125 | + </div> | ||
126 | + <div class="form-group"> | ||
127 | + <label class="col-sm-3 control-label">临期预警天数:</label> | ||
128 | + <div class="col-sm-8"> | ||
129 | + <input id="expiringDays" name="expiringDays" class="form-control" type="text"> | ||
130 | + </div> | ||
131 | + </div> | ||
132 | + <div class="form-group"> | ||
133 | + <label class="col-sm-3 control-label">收货预警天数:</label> | ||
134 | + <div class="col-sm-8"> | ||
135 | + <input id="minShelfLifeDays" name="minShelfLifeDays" class="form-control" type="text"> | ||
136 | + </div> | ||
137 | + </div> | ||
138 | + <!--<div class="form-group"> | ||
139 | + <label class="col-sm-3 control-label">数据版本:</label> | ||
140 | + <div class="col-sm-8"> | ||
141 | + <input id="version" name="version" class="form-control" type="text"> | ||
142 | + </div> | ||
143 | + </div>--> | ||
163 | <!--<div class="form-group"> --> | 144 | <!--<div class="form-group"> --> |
164 | <!--<label class="col-sm-3 control-label">创建时间:</label>--> | 145 | <!--<label class="col-sm-3 control-label">创建时间:</label>--> |
165 | <!--<div class="col-sm-8">--> | 146 | <!--<div class="col-sm-8">--> |
@@ -184,8 +165,9 @@ | @@ -184,8 +165,9 @@ | ||
184 | <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">--> | 165 | <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">--> |
185 | <!--</div>--> | 166 | <!--</div>--> |
186 | <!--</div>--> | 167 | <!--</div>--> |
168 | + | ||
187 | <div class="form-group"> | 169 | <div class="form-group"> |
188 | - <label class="col-sm-3 control-label">是否有效:</label> | 170 | + <label class="col-sm-3 control-label">状态:</label> |
189 | <div class="col-sm-8"> | 171 | <div class="col-sm-8"> |
190 | <div class="onoffswitch"> | 172 | <div class="onoffswitch"> |
191 | <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable"> | 173 | <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable"> |
@@ -268,13 +250,7 @@ | @@ -268,13 +250,7 @@ | ||
268 | }, | 250 | }, |
269 | name:{ | 251 | name:{ |
270 | required:true, | 252 | required:true, |
271 | - }, | ||
272 | - /*zoneCode:{ | ||
273 | - required:true, | ||
274 | - },*/ | ||
275 | - barcode:{ | ||
276 | - required:true, | ||
277 | - }, | 253 | + } |
278 | }, | 254 | }, |
279 | submitHandler: function(form) { | 255 | submitHandler: function(form) { |
280 | // $.operate.save(prefix + "/add", $('#form-material-add').serialize()); | 256 | // $.operate.save(prefix + "/add", $('#form-material-add').serialize()); |
@@ -282,8 +258,6 @@ | @@ -282,8 +258,6 @@ | ||
282 | // $.operate.save(prefix + "/add", tableValue); | 258 | // $.operate.save(prefix + "/add", tableValue); |
283 | var tableValue = $("#form-material-add").serialize(); | 259 | var tableValue = $("#form-material-add").serialize(); |
284 | tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked')); | 260 | tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked')); |
285 | - tableValue = formValueReplace(tableValue, "companyId", $("#company option:selected").val()); | ||
286 | - tableValue = formValueReplace(tableValue, "companyCode", $("#company option:selected").attr("code")); | ||
287 | $.operate.save(prefix + "/add", tableValue); | 261 | $.operate.save(prefix + "/add", tableValue); |
288 | } | 262 | } |
289 | }); | 263 | }); |
src/main/resources/templates/general/material/edit.html
@@ -3,282 +3,260 @@ | @@ -3,282 +3,260 @@ | ||
3 | <meta charset="utf-8"> | 3 | <meta charset="utf-8"> |
4 | <head th:include="include :: header"></head> | 4 | <head th:include="include :: header"></head> |
5 | <body class="white-bg"> | 5 | <body class="white-bg"> |
6 | - <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | ||
7 | - <form class="form-horizontal m" id="form-material-edit" th:object="${material}"> | ||
8 | - <input id="id" name="id" th:field="*{id}" type="hidden"> | ||
9 | - <div class="form-group"> | ||
10 | - <label class="col-sm-3 control-label">存货编码:</label> | ||
11 | - <div class="col-sm-8"> | ||
12 | - <input id="code" name="code" th:field="*{code}" class="form-control" type="text" readonly="readonly"> | ||
13 | - </div> | 6 | +<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
7 | + <form class="form-horizontal m" id="form-material-add" th:object="${material}"> | ||
8 | + <div class="form-group"> | ||
9 | + <label class="col-sm-3 control-label">编码:</label> | ||
10 | + <div class="col-sm-8"> | ||
11 | + <input id="code" name="code" class="form-control" type="text" th:field="*{code}"> | ||
14 | </div> | 12 | </div> |
15 | - <div class="form-group"> | ||
16 | - <label class="col-sm-3 control-label">物料类别:</label> | ||
17 | - <div class="col-sm-8"> | ||
18 | - <select id="type" name="type" class="form-control" th:with="locationType=${@dict.getType('materialType')}"> | ||
19 | - <option th:each="item : ${locationType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}" th:field="*{type}"></option> | ||
20 | - </select> | ||
21 | - </div> | 13 | + </div> |
14 | + <div class="form-group"> | ||
15 | + <label class="col-sm-3 control-label">名称:</label> | ||
16 | + <div class="col-sm-8"> | ||
17 | + <input id="name" name="name" class="form-control" type="text" th:field="*{name}"> | ||
22 | </div> | 18 | </div> |
23 | - <div class="form-group"> | ||
24 | - <label class="col-sm-3 control-label">货主:</label> | ||
25 | - <div class="col-sm-8"> | ||
26 | - <select id="company" name="company" class="form-control" th:with="list=${@company.selectCompanyByCurrentUserId()}" th:field="*{companyId}" disabled="disabled"> | ||
27 | - <option value ="" code="">全部货主</option> | ||
28 | - <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['id']}" th:attr = " code = ${item['code']}"></option> | ||
29 | - </select> | ||
30 | - </div> | 19 | + </div> |
20 | + <div class="form-group"> | ||
21 | + <label class="col-sm-3 control-label">规格:</label> | ||
22 | + <div class="col-sm-8"> | ||
23 | + <input id="spec" name="spec" class="form-control" type="text" th:field="*{spec}"> | ||
31 | </div> | 24 | </div> |
32 | - <div class="form-group"> | ||
33 | - <label class="col-sm-3 control-label">名称:</label> | ||
34 | - <div class="col-sm-8"> | ||
35 | - <input id="name" name="name" th:field="*{name}" class="form-control" type="text"> | ||
36 | - </div> | 25 | + </div> |
26 | + <div class="form-group"> | ||
27 | + <label class="col-sm-3 control-label">单位:</label> | ||
28 | + <div class="col-sm-8"> | ||
29 | + <select id="unit" name="unit" class="form-control" th:with="materialType=${@dict.getType('materialType')}"> | ||
30 | + <option th:each="item : ${materialType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}" | ||
31 | + th:field="*{unit}" ></option> | ||
32 | + </select> | ||
37 | </div> | 33 | </div> |
38 | - <div class="form-group"> | ||
39 | - <label class="col-sm-3 control-label">条码:</label> | ||
40 | - <div class="col-sm-8"> | ||
41 | - <input id="barcode" name="barcode" th:field="*{barcode}" class="form-control" type="text"> | ||
42 | - </div> | 34 | + </div> |
35 | + <div class="form-group"> | ||
36 | + <label class="col-sm-3 control-label">物料类别:</label> | ||
37 | + <div class="col-sm-8"> | ||
38 | + <select id="type" name="type" class="form-control" th:with="materialType=${@dict.getType('materialType')}"> | ||
39 | + <option th:each="item : ${materialType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}" | ||
40 | + th:field="*{type}"></option> | ||
41 | + </select> | ||
43 | </div> | 42 | </div> |
44 | - <!--<div class="form-group"> --> | ||
45 | - <!--<label class="col-sm-3 control-label">条码2:</label>--> | ||
46 | - <!--<div class="col-sm-8">--> | ||
47 | - <!--<input id="barcode2" name="barcode2" th:field="*{barcode2}" class="form-control" type="text">--> | ||
48 | - <!--</div>--> | ||
49 | - <!--</div>--> | ||
50 | - <!--<div class="form-group"> --> | ||
51 | - <!--<label class="col-sm-3 control-label">条码3:</label>--> | ||
52 | - <!--<div class="col-sm-8">--> | ||
53 | - <!--<input id="barcode3" name="barcode3" th:field="*{barcode3}" class="form-control" type="text">--> | ||
54 | - <!--</div>--> | ||
55 | - <!--</div>--> | ||
56 | - <!--<div class="form-group"> --> | ||
57 | - <!--<label class="col-sm-3 control-label">条码4:</label>--> | ||
58 | - <!--<div class="col-sm-8">--> | ||
59 | - <!--<input id="barcode4" name="barcode4" th:field="*{barcode4}" class="form-control" type="text">--> | ||
60 | - <!--</div>--> | ||
61 | - <!--</div>--> | ||
62 | - <!--<div class="form-group"> --> | ||
63 | - <!--<label class="col-sm-3 control-label">类别A:</label>--> | ||
64 | - <!--<div class="col-sm-8">--> | ||
65 | - <!--<input id="classA" name="classA" th:field="*{classA}" class="form-control" type="text">--> | ||
66 | - <!--</div>--> | ||
67 | - <!--</div>--> | ||
68 | - <!--<div class="form-group"> --> | ||
69 | - <!--<label class="col-sm-3 control-label">类别B:</label>--> | ||
70 | - <!--<div class="col-sm-8">--> | ||
71 | - <!--<input id="classB" name="classB" th:field="*{classB}" class="form-control" type="text">--> | ||
72 | - <!--</div>--> | ||
73 | - <!--</div>--> | ||
74 | - <!--<div class="form-group"> --> | ||
75 | - <!--<label class="col-sm-3 control-label">类别C:</label>--> | ||
76 | - <!--<div class="col-sm-8">--> | ||
77 | - <!--<input id="classC" name="classC" th:field="*{classC}" class="form-control" type="text">--> | ||
78 | - <!--</div>--> | ||
79 | - <!--</div>--> | ||
80 | - <div class="form-group"> | ||
81 | - <label class="col-sm-3 control-label">规格:</label> | ||
82 | - <div class="col-sm-8"> | ||
83 | - <input id="specification" name="specification" th:field="*{specification}" class="form-control" type="text"> | ||
84 | - </div> | 43 | + </div> |
44 | + <div class="form-group"> | ||
45 | + <label class="col-sm-3 control-label">ABC分类:</label> | ||
46 | + <div class="col-sdm-8"> | ||
47 | + <input id="abcClass" name="abcClass" class="form-control" type="text" th:field="*{abcClass}"/> | ||
85 | </div> | 48 | </div> |
86 | - <div class="form-group"> | ||
87 | - <label class="col-sm-3 control-label">品牌:</label> | ||
88 | - <div class="col-sm-8"> | ||
89 | - <input id="brand" name="brand" th:field="*{brand}" class="form-control" type="text"> | ||
90 | - </div> | 49 | + </div> |
50 | + <div class="form-group"> | ||
51 | + <label class="col-sm-3 control-label">保质期(天)</label> | ||
52 | + <div class="col-sm-8"> | ||
53 | + <input id="daysToExpire" name="daysToExpire" class="form-control" type="text" th:field="*{daysToExpire}"/> | ||
91 | </div> | 54 | </div> |
92 | - <!--<div class="form-group"> --> | ||
93 | - <!--<label class="col-sm-3 control-label">尺码:</label>--> | ||
94 | - <!--<div class="col-sm-8">--> | ||
95 | - <!--<input id="size" name="size" th:field="*{size}" class="form-control" type="text">--> | ||
96 | - <!--</div>--> | ||
97 | - <!--</div>--> | ||
98 | - <!--<div class="form-group"> --> | ||
99 | - <!--<label class="col-sm-3 control-label">颜色:</label>--> | ||
100 | - <!--<div class="col-sm-8">--> | ||
101 | - <!--<input id="color" name="color" th:field="*{color}" class="form-control" type="text">--> | ||
102 | - <!--</div>--> | ||
103 | - <!--</div>--> | ||
104 | - <!--<div class="form-group"> --> | ||
105 | - <!--<label class="col-sm-3 control-label">产地:</label>--> | ||
106 | - <!--<div class="col-sm-8">--> | ||
107 | - <!--<input id="placeOfOrigin" name="placeOfOrigin" th:field="*{placeOfOrigin}" class="form-control" type="text">--> | ||
108 | - <!--</div>--> | ||
109 | - <!--</div>--> | ||
110 | - <div class="form-group"> | ||
111 | - <label class="col-sm-3 control-label">保质期(天):</label> | ||
112 | - <div class="col-sm-8"> | ||
113 | - <input id="daysToExpire" name="daysToExpire" th:field="*{daysToExpire}" class="form-control" type="text"> | ||
114 | - </div> | 55 | + </div> |
56 | + <div class="form-group"> | ||
57 | + <label class="col-sm-3 control-label">定位规则:</label> | ||
58 | + <div class="col-sm-8"> | ||
59 | + <input id="locatingRule" name="locatingRule" class="form-control" type="text" th:field="*{locatingRule}"> | ||
115 | </div> | 60 | </div> |
116 | - <div class="form-group"> | ||
117 | - <label class="col-sm-3 control-label">临期预警天数:</label> | ||
118 | - <div class="col-sm-8"> | ||
119 | - <input id="expiringDays" name="expiringDays" th:field="*{expiringDays}" class="form-control" type="text"> | ||
120 | - </div> | 61 | + </div> |
62 | + <div class="form-group"> | ||
63 | + <label class="col-sm-3 control-label">分配规则:</label> | ||
64 | + <div class="col-sm-8"> | ||
65 | + <input id="allocationRule" name="allocationRule" class="form-control" type="text" th:field="*{allocationRule}"> | ||
121 | </div> | 66 | </div> |
122 | - <div class="form-group"> | ||
123 | - <label class="col-sm-3 control-label">收货预警天数:</label> | ||
124 | - <div class="col-sm-8"> | ||
125 | - <input id="minShelfLifeDays" name="minShelfLifeDays" th:field="*{minShelfLifeDays}" class="form-control" type="text"> | ||
126 | - </div> | 67 | + </div> |
68 | + <div class="form-group"> | ||
69 | + <label class="col-sm-3 control-label">补货规则:</label> | ||
70 | + <div class="col-sm-8"> | ||
71 | + <input id="replenishmentRule" name="replenishmentRule" class="form-control" type="text" th:field="*{replenishmentRule}"> | ||
127 | </div> | 72 | </div> |
128 | - <div class="form-group"> | ||
129 | - <label class="col-sm-3 control-label">成本:</label> | ||
130 | - <div class="col-sm-8"> | ||
131 | - <input id="costPrice" name="costPrice" th:field="*{costPrice}" class="form-control" type="text"> | ||
132 | - </div> | 73 | + </div> |
74 | + <div class="form-group"> | ||
75 | + <label class="col-sm-3 control-label">空货位规则:</label> | ||
76 | + <div class="col-sm-8"> | ||
77 | + <input id="emptyLocRule" name="emptyLocRule" class="form-control" type="text" th:field="*{emptyLocRule}"> | ||
133 | </div> | 78 | </div> |
134 | - <div class="form-group"> | ||
135 | - <label class="col-sm-3 control-label">标价:</label> | ||
136 | - <div class="col-sm-8"> | ||
137 | - <input id="listPrice" name="listPrice" th:field="*{listPrice}" class="form-control" type="text"> | ||
138 | - </div> | 79 | + </div> |
80 | + <div class="form-group"> | ||
81 | + <label class="col-sm-3 control-label">入库规则</label> | ||
82 | + <div class="col-sm-8"> | ||
83 | + <input id="receivingFlow" name="receivingFlow" class="form-control" type="text" th:field="*{receivingFlow}"> | ||
139 | </div> | 84 | </div> |
140 | - <div class="form-group"> | ||
141 | - <label class="col-sm-3 control-label">净价:</label> | ||
142 | - <div class="col-sm-8"> | ||
143 | - <input id="netPrice" name="netPrice" th:field="*{netPrice}" class="form-control" type="text"> | ||
144 | - </div> | 85 | + </div> |
86 | + <div class="form-group"> | ||
87 | + <label class="col-sm-3 control-label">出库流程:</label> | ||
88 | + <div class="col-sm-8"> | ||
89 | + <input id="shippingFlow" name="shippingFlow" class="form-control" type="text" th:field="*{shippingFlow}"> | ||
90 | + </div> | ||
91 | + </div> | ||
92 | + <div class="form-group"> | ||
93 | + <label class="col-sm-3 control-label">属性模板:</label> | ||
94 | + <div class="col-sm-8"> | ||
95 | + <input id="attributeTemplateCode" name="attributeTemplateCode" class="form-control" type="text" th:field="*{attributeTemplateCode}"> | ||
96 | + </div> | ||
97 | + </div> | ||
98 | + <div class="form-group"> | ||
99 | + <label class="col-sm-3 control-label">记录序列号:</label> | ||
100 | + <div class="col-sm-8"> | ||
101 | + <input id="trackSerialNum" name="trackSerialNum" class="form-control" type="text" th:field="*{trackSerialNum}"> | ||
102 | + </div> | ||
103 | + </div> | ||
104 | + <div class="form-group"> | ||
105 | + <label class="col-sm-3 control-label">自动生成序列号:</label> | ||
106 | + <div class="col-sm-8"> | ||
107 | + <input id="autoGenSerialNum" name="autoGenSerialNum" class="form-control" type="text" th:field="*{autoGenSerialNum}"> | ||
108 | + </div> | ||
109 | + </div> | ||
110 | + <div class="form-group"> | ||
111 | + <label class="col-sm-3 control-label">自动生成序列号表达式:</label> | ||
112 | + <div class="col-sm-8"> | ||
113 | + <input id="autoGenSerialNumFormat" name="autoGenSerialNumFormat" class="form-control" type="text" th:field="*{autoGenSerialNumFormat}"> | ||
145 | </div> | 114 | </div> |
146 | - <!--<div class="form-group"> --> | ||
147 | - <!--<label class="col-sm-3 control-label">出入库是否按照 生产日期 来匹配:</label>--> | ||
148 | - <!--<div class="col-sm-8">--> | ||
149 | - <!--<input id="manufactureDate" name="manufactureDate" th:field="*{manufactureDate}" class="form-control" type="text">--> | ||
150 | - <!--</div>--> | ||
151 | - <!--</div>--> | ||
152 | - <!--<div class="form-group"> --> | ||
153 | - <!--<label class="col-sm-3 control-label">出入库是否按照 入库时间 来匹配:</label>--> | ||
154 | - <!--<div class="col-sm-8">--> | ||
155 | - <!--<input id="receiptDate" name="receiptDate" th:field="*{receiptDate}" class="form-control" type="text">--> | ||
156 | - <!--</div>--> | ||
157 | - <!--</div>--> | ||
158 | - <!--<div class="form-group"> --> | ||
159 | - <!--<label class="col-sm-3 control-label">创建时间:</label>--> | ||
160 | - <!--<div class="col-sm-8">--> | ||
161 | - <!--<input id="created" name="created" th:field="*{created}" class="form-control" type="text">--> | ||
162 | - <!--</div>--> | ||
163 | - <!--</div>--> | ||
164 | - <!--<div class="form-group"> --> | ||
165 | - <!--<label class="col-sm-3 control-label">创建用户:</label>--> | ||
166 | - <!--<div class="col-sm-8">--> | ||
167 | - <!--<input id="createdBy" name="createdBy" th:field="*{createdBy}" class="form-control" type="text">--> | ||
168 | - <!--</div>--> | ||
169 | - <!--</div>--> | ||
170 | - <!--<div class="form-group"> --> | ||
171 | - <!--<label class="col-sm-3 control-label">最后修改间:</label>--> | ||
172 | - <!--<div class="col-sm-8">--> | ||
173 | - <!--<input id="lastUpdated" name="lastUpdated" th:field="*{lastUpdated}" class="form-control" type="text">--> | ||
174 | - <!--</div>--> | ||
175 | - <!--</div>--> | ||
176 | - <!--<div class="form-group"> --> | ||
177 | - <!--<label class="col-sm-3 control-label">更新用户:</label>--> | ||
178 | - <!--<div class="col-sm-8">--> | ||
179 | - <!--<input id="lastUpdatedBy" name="lastUpdatedBy" th:field="*{lastUpdatedBy}" class="form-control" type="text">--> | ||
180 | - <!--</div>--> | ||
181 | - <!--</div>--> | ||
182 | - <div class="form-group"> | ||
183 | - <label class="col-sm-3 control-label">是否有效:</label> | ||
184 | - <div class="col-sm-8"> | ||
185 | - <div class="onoffswitch"> | ||
186 | - <input type="checkbox" th:checked="${material.enable}" class="onoffswitch-checkbox" id="enable" name="enable"> | ||
187 | - <label class="onoffswitch-label" for="enable"> | ||
188 | - <span class="onoffswitch-inner"></span> | ||
189 | - <span class="onoffswitch-switch"></span> | ||
190 | - </label> | ||
191 | - </div> | 115 | + </div> |
116 | + <div class="form-group"> | ||
117 | + <label class="col-sm-3 control-label">序列号模板:</label> | ||
118 | + <div class="col-sm-8"> | ||
119 | + <input id="snTemplateCode" name="snTemplateCode" class="form-control" type="text" th:field="*{snTemplateCode}"> | ||
120 | + </div> | ||
121 | + </div> | ||
122 | + <div class="form-group"> | ||
123 | + <label class="col-sm-3 control-label">临期预警天数:</label> | ||
124 | + <div class="col-sm-8"> | ||
125 | + <input id="expiringDays" name="expiringDays" class="form-control" type="text" th:field="*{expiringDays}"> | ||
126 | + </div> | ||
127 | + </div> | ||
128 | + <div class="form-group"> | ||
129 | + <label class="col-sm-3 control-label">收货预警天数:</label> | ||
130 | + <div class="col-sm-8"> | ||
131 | + <input id="minShelfLifeDays" name="minShelfLifeDays" class="form-control" type="text" th:field="*{minShelfLifeDays}"> | ||
132 | + </div> | ||
133 | + </div> | ||
134 | + <!--<div class="form-group"> | ||
135 | + <label class="col-sm-3 control-label">数据版本:</label> | ||
136 | + <div class="col-sm-8"> | ||
137 | + <input id="version" name="version" class="form-control" type="text"> | ||
138 | + </div> | ||
139 | + </div>--> | ||
140 | + <!--<div class="form-group"> --> | ||
141 | + <!--<label class="col-sm-3 control-label">创建时间:</label>--> | ||
142 | + <!--<div class="col-sm-8">--> | ||
143 | + <!--<input id="created" name="created" class="form-control" type="text">--> | ||
144 | + <!--</div>--> | ||
145 | + <!--</div>--> | ||
146 | + <!--<div class="form-group"> --> | ||
147 | + <!--<label class="col-sm-3 control-label">创建用户:</label>--> | ||
148 | + <!--<div class="col-sm-8">--> | ||
149 | + <!--<input id="createdBy" name="createdBy" class="form-control" type="text">--> | ||
150 | + <!--</div>--> | ||
151 | + <!--</div>--> | ||
152 | + <!--<div class="form-group"> --> | ||
153 | + <!--<label class="col-sm-3 control-label">最后修改间:</label>--> | ||
154 | + <!--<div class="col-sm-8">--> | ||
155 | + <!--<input id="lastUpdated" name="lastUpdated" class="form-control" type="text">--> | ||
156 | + <!--</div>--> | ||
157 | + <!--</div>--> | ||
158 | + <!--<div class="form-group"> --> | ||
159 | + <!--<label class="col-sm-3 control-label">更新用户:</label>--> | ||
160 | + <!--<div class="col-sm-8">--> | ||
161 | + <!--<input id="lastUpdatedBy" name="lastUpdatedBy" class="form-control" type="text">--> | ||
162 | + <!--</div>--> | ||
163 | + <!--</div>--> | ||
164 | + | ||
165 | + <div class="form-group"> | ||
166 | + <label class="col-sm-3 control-label">状态:</label> | ||
167 | + <div class="col-sm-8"> | ||
168 | + <div class="onoffswitch"> | ||
169 | + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable" th:field="*{enable}"> | ||
170 | + <label class="onoffswitch-label" for="enable"> | ||
171 | + <span class="onoffswitch-inner"></span> | ||
172 | + <span class="onoffswitch-switch"></span> | ||
173 | + </label> | ||
192 | </div> | 174 | </div> |
193 | </div> | 175 | </div> |
194 | - <!--<div class="form-group"> --> | ||
195 | - <!--<label class="col-sm-3 control-label">是否删除:</label>--> | ||
196 | - <!--<div class="col-sm-8">--> | ||
197 | - <!--<input id="deleted" name="deleted" th:field="*{deleted}" class="form-control" type="text">--> | ||
198 | - <!--</div>--> | ||
199 | - <!--</div>--> | ||
200 | - <!--<div class="form-group"> --> | ||
201 | - <!--<label class="col-sm-3 control-label">自定义字段1:</label>--> | ||
202 | - <!--<div class="col-sm-8">--> | ||
203 | - <!--<input id="userDef1" name="userDef1" th:field="*{userDef1}" class="form-control" type="text">--> | ||
204 | - <!--</div>--> | ||
205 | - <!--</div>--> | ||
206 | - <!--<div class="form-group"> --> | ||
207 | - <!--<label class="col-sm-3 control-label">自定义字段2:</label>--> | ||
208 | - <!--<div class="col-sm-8">--> | ||
209 | - <!--<input id="userDef2" name="userDef2" th:field="*{userDef2}" class="form-control" type="text">--> | ||
210 | - <!--</div>--> | ||
211 | - <!--</div>--> | ||
212 | - <!--<div class="form-group"> --> | ||
213 | - <!--<label class="col-sm-3 control-label">自定义字段3:</label>--> | ||
214 | - <!--<div class="col-sm-8">--> | ||
215 | - <!--<input id="userDef3" name="userDef3" th:field="*{userDef3}" class="form-control" type="text">--> | ||
216 | - <!--</div>--> | ||
217 | - <!--</div>--> | ||
218 | - <!--<div class="form-group"> --> | ||
219 | - <!--<label class="col-sm-3 control-label">自定义字段4:</label>--> | ||
220 | - <!--<div class="col-sm-8">--> | ||
221 | - <!--<input id="userDef4" name="userDef4" th:field="*{userDef4}" class="form-control" type="text">--> | ||
222 | - <!--</div>--> | ||
223 | - <!--</div>--> | ||
224 | - <!--<div class="form-group"> --> | ||
225 | - <!--<label class="col-sm-3 control-label">自定义字段5:</label>--> | ||
226 | - <!--<div class="col-sm-8">--> | ||
227 | - <!--<input id="userDef5" name="userDef5" th:field="*{userDef5}" class="form-control" type="text">--> | ||
228 | - <!--</div>--> | ||
229 | - <!--</div>--> | ||
230 | - <!--<div class="form-group"> --> | ||
231 | - <!--<label class="col-sm-3 control-label">自定义字段6:</label>--> | ||
232 | - <!--<div class="col-sm-8">--> | ||
233 | - <!--<input id="userDef6" name="userDef6" th:field="*{userDef6}" class="form-control" type="text">--> | ||
234 | - <!--</div>--> | ||
235 | - <!--</div>--> | ||
236 | - <!--<div class="form-group"> --> | ||
237 | - <!--<label class="col-sm-3 control-label">自定义字段7:</label>--> | ||
238 | - <!--<div class="col-sm-8">--> | ||
239 | - <!--<input id="userDef7" name="userDef7" th:field="*{userDef7}" class="form-control" type="text">--> | ||
240 | - <!--</div>--> | ||
241 | - <!--</div>--> | ||
242 | - <!--<div class="form-group"> --> | ||
243 | - <!--<label class="col-sm-3 control-label">自定义字段8:</label>--> | ||
244 | - <!--<div class="col-sm-8">--> | ||
245 | - <!--<input id="userDef8" name="userDef8" th:field="*{userDef8}" class="form-control" type="text">--> | ||
246 | - <!--</div>--> | ||
247 | - <!--</div>--> | ||
248 | - <div class="form-group"> | ||
249 | - <div class="form-control-static col-sm-offset-9"> | ||
250 | - <button type="submit" class="btn btn-primary">提交</button> | ||
251 | - <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | ||
252 | - </div> | ||
253 | - </div> | ||
254 | - </form> | ||
255 | - </div> | ||
256 | - <div th:include="include::footer"></div> | ||
257 | - <script type="text/javascript"> | ||
258 | - var prefix = ctx + "general/material"; | ||
259 | - $("#form-material-edit").validate({ | ||
260 | - rules:{ | ||
261 | - code:{ | ||
262 | - required:true | ||
263 | - }, | ||
264 | - name:{ | ||
265 | - required:true | ||
266 | - }, | ||
267 | - barcode:{ | ||
268 | - required:true | ||
269 | - } | 176 | + </div> |
177 | + <!--<div class="form-group"> --> | ||
178 | + <!--<label class="col-sm-3 control-label">是否删除:</label>--> | ||
179 | + <!--<div class="col-sm-8">--> | ||
180 | + <!--<input id="deleted" name="deleted" class="form-control" type="text">--> | ||
181 | + <!--</div>--> | ||
182 | + <!--</div>--> | ||
183 | + <!--<div class="form-group"> --> | ||
184 | + <!--<label class="col-sm-3 control-label">自定义字段1:</label>--> | ||
185 | + <!--<div class="col-sm-8">--> | ||
186 | + <!--<input id="userDef1" name="userDef1" class="form-control" type="text">--> | ||
187 | + <!--</div>--> | ||
188 | + <!--</div>--> | ||
189 | + <!--<div class="form-group"> --> | ||
190 | + <!--<label class="col-sm-3 control-label">自定义字段2:</label>--> | ||
191 | + <!--<div class="col-sm-8">--> | ||
192 | + <!--<input id="userDef2" name="userDef2" class="form-control" type="text">--> | ||
193 | + <!--</div>--> | ||
194 | + <!--</div>--> | ||
195 | + <!--<div class="form-group"> --> | ||
196 | + <!--<label class="col-sm-3 control-label">自定义字段3:</label>--> | ||
197 | + <!--<div class="col-sm-8">--> | ||
198 | + <!--<input id="userDef3" name="userDef3" class="form-control" type="text">--> | ||
199 | + <!--</div>--> | ||
200 | + <!--</div>--> | ||
201 | + <!--<div class="form-group"> --> | ||
202 | + <!--<label class="col-sm-3 control-label">自定义字段4:</label>--> | ||
203 | + <!--<div class="col-sm-8">--> | ||
204 | + <!--<input id="userDef4" name="userDef4" class="form-control" type="text">--> | ||
205 | + <!--</div>--> | ||
206 | + <!--</div>--> | ||
207 | + <!--<div class="form-group"> --> | ||
208 | + <!--<label class="col-sm-3 control-label">自定义字段5:</label>--> | ||
209 | + <!--<div class="col-sm-8">--> | ||
210 | + <!--<input id="userDef5" name="userDef5" class="form-control" type="text">--> | ||
211 | + <!--</div>--> | ||
212 | + <!--</div>--> | ||
213 | + <!--<div class="form-group"> --> | ||
214 | + <!--<label class="col-sm-3 control-label">自定义字段6:</label>--> | ||
215 | + <!--<div class="col-sm-8">--> | ||
216 | + <!--<input id="userDef6" name="userDef6" class="form-control" type="text">--> | ||
217 | + <!--</div>--> | ||
218 | + <!--</div>--> | ||
219 | + <!--<div class="form-group"> --> | ||
220 | + <!--<label class="col-sm-3 control-label">自定义字段7:</label>--> | ||
221 | + <!--<div class="col-sm-8">--> | ||
222 | + <!--<input id="userDef7" name="userDef7" class="form-control" type="text">--> | ||
223 | + <!--</div>--> | ||
224 | + <!--</div>--> | ||
225 | + <!--<div class="form-group"> --> | ||
226 | + <!--<label class="col-sm-3 control-label">自定义字段8:</label>--> | ||
227 | + <!--<div class="col-sm-8">--> | ||
228 | + <!--<input id="userDef8" name="userDef8" class="form-control" type="text">--> | ||
229 | + <!--</div>--> | ||
230 | + <!--</div>--> | ||
231 | + <div class="form-group"> | ||
232 | + <div class="form-control-static col-sm-offset-9"> | ||
233 | + <button type="submit" class="btn btn-primary">提交</button> | ||
234 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | ||
235 | + </div> | ||
236 | + </div> | ||
237 | + </form> | ||
238 | +</div> | ||
239 | +<div th:include="include::footer"></div> | ||
240 | +<script type="text/javascript"> | ||
241 | + var prefix = ctx + "general/material"; | ||
242 | + $("#form-material-add").validate({ | ||
243 | + rules:{ | ||
244 | + code:{ | ||
245 | + required:true, | ||
270 | }, | 246 | }, |
271 | - submitHandler: function(form) { | ||
272 | - // $.operate.save(prefix + "/edit", $('#form-material-edit').serialize()); | ||
273 | - // var tableValue = $.common.getTableValue("#form-material-edit"); | ||
274 | - // $.operate.save(prefix + "/edit", tableValue); | ||
275 | - var tableValue = $("#form-material-edit").serialize(); | ||
276 | - tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked')); | ||
277 | - tableValue = formValueReplace(tableValue, "companyId", $("#company option:selected").val()); | ||
278 | - tableValue = formValueReplace(tableValue, "companyCode", $("#company option:selected").attr("code")); | ||
279 | - $.operate.save(prefix + "/edit", tableValue); | ||
280 | - } | ||
281 | - }); | ||
282 | - </script> | 247 | + name:{ |
248 | + required:true, | ||
249 | + } | ||
250 | + }, | ||
251 | + submitHandler: function(form) { | ||
252 | + // $.operate.save(prefix + "/add", $('#form-material-add').serialize()); | ||
253 | + // var tableValue = $.common.getTableValue("#form-material-add"); | ||
254 | + // $.operate.save(prefix + "/add", tableValue); | ||
255 | + var tableValue = $("#form-material-add").serialize(); | ||
256 | + tableValue = formValueReplace(tableValue, "enable", $("input[name='enable']").is(':checked')); | ||
257 | + $.operate.save(prefix + "/add", tableValue); | ||
258 | + } | ||
259 | + }); | ||
260 | +</script> | ||
283 | </body> | 261 | </body> |
284 | </html> | 262 | </html> |
src/main/resources/templates/general/material/material.html
@@ -80,23 +80,10 @@ | @@ -80,23 +80,10 @@ | ||
80 | field : 'id', | 80 | field : 'id', |
81 | title : 'id' | 81 | title : 'id' |
82 | }, | 82 | }, |
83 | - // { | ||
84 | - // field : 'warehouseCode', | ||
85 | - // title : '仓库编码' | ||
86 | - // }, | ||
87 | { | 83 | { |
88 | field : 'code', | 84 | field : 'code', |
89 | title : '物料编码' | 85 | title : '物料编码' |
90 | }, | 86 | }, |
91 | - { | ||
92 | - field : 'barcode', | ||
93 | - title : '条码', | ||
94 | - visible:false | ||
95 | - }, | ||
96 | - { | ||
97 | - field : 'userDef1', | ||
98 | - title : '存货代码', | ||
99 | - }, | ||
100 | { | 87 | { |
101 | field : 'type', | 88 | field : 'type', |
102 | title : '物料类别' , | 89 | title : '物料类别' , |
@@ -105,10 +92,11 @@ | @@ -105,10 +92,11 @@ | ||
105 | return $.table.selectDictLabel(mType, value); | 92 | return $.table.selectDictLabel(mType, value); |
106 | } | 93 | } |
107 | }, | 94 | }, |
108 | - { | ||
109 | - field : 'zoneCode', | ||
110 | - title : '库区编码' | ||
111 | - }, | 95 | + { |
96 | + field : 'abcClass', | ||
97 | + title : 'ABC分类' , | ||
98 | + align: 'center', | ||
99 | + }, | ||
112 | { | 100 | { |
113 | field : 'name', | 101 | field : 'name', |
114 | title : '名称' | 102 | title : '名称' |
@@ -123,58 +111,68 @@ | @@ -123,58 +111,68 @@ | ||
123 | visible:false | 111 | visible:false |
124 | }, | 112 | }, |
125 | { | 113 | { |
126 | - field : 'size', | ||
127 | - title : '尺码' , | 114 | + field : 'daysToExpire', |
115 | + title : '保质期(天)' , | ||
128 | visible:false | 116 | visible:false |
129 | }, | 117 | }, |
130 | { | 118 | { |
131 | - field : 'color', | ||
132 | - title : '颜色', | ||
133 | - visible:false | 119 | + field : 'locatingRule', |
120 | + title : '定位规则', | ||
134 | }, | 121 | }, |
135 | { | 122 | { |
136 | - field : 'placeOfOrigin', | ||
137 | - title : '产地' , | ||
138 | - visible:false | 123 | + field : 'allocationRule', |
124 | + title : '分配规则' , | ||
139 | }, | 125 | }, |
140 | { | 126 | { |
141 | - field : 'daysToExpire', | ||
142 | - title : '保质期(天)' , | ||
143 | - visible:false | 127 | + field : 'replenishmentRule', |
128 | + title : '补货规则' , | ||
144 | }, | 129 | }, |
145 | { | 130 | { |
146 | - field : 'expiringDays', | ||
147 | - title : '临期预警天数' , | ||
148 | - visible:false | 131 | + field : 'emptyLocRule', |
132 | + title : '空货位规则' , | ||
149 | }, | 133 | }, |
150 | { | 134 | { |
151 | - field : 'minShelfLifeDays', | ||
152 | - title : '收货预警天数' , | ||
153 | - visible:false | 135 | + field : 'receivingFlow', |
136 | + title : '入库流程' , | ||
154 | }, | 137 | }, |
155 | { | 138 | { |
156 | - field : 'costPrice', | ||
157 | - title : '成本', | ||
158 | - visible:false | 139 | + field : 'shippingFlow', |
140 | + title : '出库流程' , | ||
159 | }, | 141 | }, |
160 | { | 142 | { |
161 | - field : 'listPrice', | ||
162 | - title : '标价' , | 143 | + field : 'attributeTemplateCode', |
144 | + title : '属性模板' , | ||
145 | + }, | ||
146 | + { | ||
147 | + field : 'trackSerialNum', | ||
148 | + title : '记录序列号' , | ||
149 | + }, | ||
150 | + { | ||
151 | + field : 'autoGenSerialNum', | ||
152 | + title : '自动生成序列号' , | ||
153 | + }, | ||
154 | + { | ||
155 | + field : 'autoGenSerialNumFormat', | ||
156 | + title : '自动生成序列号表达式' , | ||
157 | + }, | ||
158 | + { | ||
159 | + field : 'snTemplateCode', | ||
160 | + title : '序列号模板' , | ||
161 | + }, | ||
162 | + { | ||
163 | + field : 'expiringDays', | ||
164 | + title : '临期预警天数' , | ||
163 | visible:false | 165 | visible:false |
164 | }, | 166 | }, |
165 | { | 167 | { |
166 | - field : 'netPrice', | ||
167 | - title : '净价', | 168 | + field : 'minShelfLifeDays', |
169 | + title : '收货预警天数' , | ||
168 | visible:false | 170 | visible:false |
169 | }, | 171 | }, |
170 | - // { | ||
171 | - // field : 'manufactureDate', | ||
172 | - // title : '出入库是否按照 生产日期 来匹配' | ||
173 | - // }, | ||
174 | - // { | ||
175 | - // field : 'receiptDate', | ||
176 | - // title : '出入库是否按照 入库时间 来匹配' | ||
177 | - // }, | 172 | + { |
173 | + field : "version", | ||
174 | + title: "数据版本" | ||
175 | + }, | ||
178 | { | 176 | { |
179 | field : 'created', | 177 | field : 'created', |
180 | title : '创建时间' | 178 | title : '创建时间' |
@@ -193,7 +191,7 @@ | @@ -193,7 +191,7 @@ | ||
193 | }, | 191 | }, |
194 | { | 192 | { |
195 | field : 'enable', | 193 | field : 'enable', |
196 | - title : '是否有效' , | 194 | + title : '状态' , |
197 | align: 'center', | 195 | align: 'center', |
198 | formatter: function(value, row, index) { | 196 | formatter: function(value, row, index) { |
199 | return $.table.selectDictLabel(datas, value); | 197 | return $.table.selectDictLabel(datas, value); |
@@ -204,8 +202,8 @@ | @@ -204,8 +202,8 @@ | ||
204 | align: 'center', | 202 | align: 'center', |
205 | formatter: function(value, row, index) { | 203 | formatter: function(value, row, index) { |
206 | var actions = []; | 204 | var actions = []; |
207 | - /*actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | ||
208 | - */actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | 205 | + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
206 | + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | ||
209 | return actions.join(''); | 207 | return actions.join(''); |
210 | } | 208 | } |
211 | }] | 209 | }] |
src/main/resources/templates/system/dict/data/data.html
@@ -54,7 +54,7 @@ | @@ -54,7 +54,7 @@ | ||
54 | <!--</div>--> | 54 | <!--</div>--> |
55 | 55 | ||
56 | <div class="btn-group hidden-xs" id="toolbar" role="group"> | 56 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
57 | - <a class="btn btn-outline btn-success btn-rounded" th:onclick="'javascript:$.operate.add(\''+${dict.dictType}+'\')'" | 57 | + <a class="btn btn-outline btn-success btn-rounded" th:value="${dict.dictType}" onclick="add()" id="add" |
58 | shiro:hasPermission="system:dict:add"> | 58 | shiro:hasPermission="system:dict:add"> |
59 | <i class="fa fa-plus"></i> 新增 | 59 | <i class="fa fa-plus"></i> 新增 |
60 | </a> | 60 | </a> |
@@ -149,6 +149,12 @@ | @@ -149,6 +149,12 @@ | ||
149 | dictType: $("#dictType").val() | 149 | dictType: $("#dictType").val() |
150 | }; | 150 | }; |
151 | } | 151 | } |
152 | + | ||
153 | + function add() { | ||
154 | + let id=$("#add").attr('value'); | ||
155 | + $.operate.add(id); | ||
156 | + } | ||
157 | + | ||
152 | </script> | 158 | </script> |
153 | </body> | 159 | </body> |
154 | </html> | 160 | </html> |
155 | \ No newline at end of file | 161 | \ No newline at end of file |