diff --git a/.gitignore b/.gitignore
index a232a040..adea9e85 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,21 @@
-# Generated by Cargo
-# will have compiled files and executables
-**/target/
+*.class
-# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
-# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
-Cargo.lock
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
-# These are backup files generated by rustfmt
-**/*.rs.bk
+*.iml
+# Package Files #
+*.jar
+*.war
+*.ear
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
.idea
+/target
+/logs.home_IS_UNDEFINED
+
+**/*.iml
+.gitattributes
-**/log/
diff --git a/LICENSE-APACHE b/LICENSE-APACHE
deleted file mode 100644
index 16fe87b0..00000000
--- a/LICENSE-APACHE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
-2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
-3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
-4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
-5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
-6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
-7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
-8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
-9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
-END OF TERMS AND CONDITIONS
-
-APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
-Copyright [yyyy] [name of copyright owner]
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
diff --git a/LICENSE-MIT b/LICENSE-MIT
deleted file mode 100644
index e143790b..00000000
--- a/LICENSE-MIT
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2023 Wansen Tech
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/api/pom.xml b/api/pom.xml
deleted file mode 100644
index d4a76ec6..00000000
--- a/api/pom.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
- wansnenerp
- wansentech
- 0.0.1-SNAPSHOT
-
- 4.0.0
- jar
- api
-
-
- 17
- 17
-
-
-
-
- mysql
- mysql-connector-java
- 8.0.26
-
-
- javax.servlet
- javax.servlet-api
- 4.0.1
- provided
-
-
-
- wansentech
- domain
- 0.0.1-SNAPSHOT
-
-
-
- wansentech
- service
- 0.0.1-SNAPSHOT
-
-
-
- wansentech
- utils
- 0.0.1-SNAPSHOT
-
-
-
-
-
-
- src/main/java
-
- **/*.xml
-
-
-
- src/main/resources
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
- wansenerp
-
-
- org.projectlombok
- lombok
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/api/src/main/java/com/wansentech/Application.java b/api/src/main/java/com/wansentech/Application.java
deleted file mode 100644
index 5daf7c2b..00000000
--- a/api/src/main/java/com/wansentech/Application.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech;
-
-import org.mybatis.spring.annotation.MapperScan;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.scheduling.annotation.EnableScheduling;
-
-@SpringBootApplication
-@EnableScheduling
-public class Application {
- public static void main(String[] args) {
- SpringApplication.run(Application.class, args);
- }
-}
diff --git a/api/src/main/java/com/wansentech/controller/TestController.java b/api/src/main/java/com/wansentech/controller/TestController.java
deleted file mode 100644
index f9bad7e2..00000000
--- a/api/src/main/java/com/wansentech/controller/TestController.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.controller;
-
-public class TestController {
-}
diff --git a/api/src/main/java/com/wansentech/controller/UserController.java b/api/src/main/java/com/wansentech/controller/UserController.java
deleted file mode 100644
index 96c5aac0..00000000
--- a/api/src/main/java/com/wansentech/controller/UserController.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.controller;
-
-import com.wansentech.Response;
-import com.wansentech.api.dto.UserRegisterDto;
-import com.wansentech.enums.CodeEnum;
-import com.wansentech.service.bo.UserRegisterBo;
-import com.wansentech.user.UserService;
-import jakarta.annotation.Resource;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-@RequestMapping("/user")
-public class UserController {
-
- private final UserService userService;
-
- public UserController(UserService userService) {
- this.userService = userService;
- }
-
- @PostMapping("/register")
- public Response UserRegister(@RequestBody UserRegisterDto userRegisterDto){
- var userRegisterBo = UserRegisterBo.builder()
- .name(userRegisterDto.getUserName())
- .userName(userRegisterDto.getUserName())
- .password(userRegisterDto.getPassword())
- .email(userRegisterDto.getEmail())
- .phoneNumber(userRegisterDto.getPhoneNumber()).build();
-
- return userService.addUser(userRegisterBo);
- }
-}
diff --git a/api/src/main/resources/application-dev.yml b/api/src/main/resources/application-dev.yml
deleted file mode 100644
index 888a1fda..00000000
--- a/api/src/main/resources/application-dev.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-spring:
- datasource:
- url: jdbc:mysql://localhost:3306/wansenerp?useUnicode=true&characterEncoding=utf-8&useSSL=false
- username: root
- password: PaSsw0Rd
- dynamic:
- druid:
- max-wait: 60000
- initial-size: 5
- min-idle: 5
- max-active: 20
\ No newline at end of file
diff --git a/api/src/main/resources/application-prod.yml b/api/src/main/resources/application-prod.yml
deleted file mode 100644
index afe2c85f..00000000
--- a/api/src/main/resources/application-prod.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-spring:
- datasource:
- druid:
- username: 123456
- password: 123456
- url: jdbc:mysql://1.2.3.4:3306/123456?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
- driver-class-name: com.mysql.jdbc.Driver
- type: com.alibaba.druid.pool.DruidDataSource
- initial-size: 5
- min-idle: 5
- max-active: 20
- # 配置获取连接等待超时的时间
- max-wait: 60000
\ No newline at end of file
diff --git a/api/src/main/resources/application.yml b/api/src/main/resources/application.yml
deleted file mode 100644
index 237409ca..00000000
--- a/api/src/main/resources/application.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-server:
- port: 8090
- servlet:
- context-path: /
-
-spring:
- profiles:
- active: dev
-
- mvc:
- pathmatch:
- matching-strategy: ant_path_matcher
-
- servlet:
- multipart:
- max-file-size: 1024MB
- max-request-size: 100MB
-
- jackson:
- date-format: yyyy-MM-dd HH:mm:ss
- time-zone: GMT+8
- default-property-inclusion: always
- property-naming-strategy: SNAKE_CASE
-
-logging:
- config: classpath:logback-spring.xml
-
-mybatis-plus:
- mapper-locations: classpath:./mapper_xml/*Mapper.xml
- type-aliases-package: com.wansentech.dao.entity
- global-config:
- id-type: 0
- #驼峰下划线转换
- db-column-underline: true
- #刷新mapper 调试神器
- refresh-mapper: true
\ No newline at end of file
diff --git a/api/src/main/resources/logback-spring.xml b/api/src/main/resources/logback-spring.xml
deleted file mode 100644
index a086757f..00000000
--- a/api/src/main/resources/logback-spring.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
-
-
-
-
-
-
- logback
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- debug
-
-
- ${CONSOLE_LOG_PATTERN}
-
- UTF-8
-
-
-
-
-
-
-
-
-
- ${log.path}/log_debug.log
-
-
- %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
- UTF-8
-
-
-
-
- ${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log
-
- 100MB
-
-
- 15
-
-
-
- debug
- ACCEPT
- DENY
-
-
-
-
-
-
- ${log.path}/log_info.log
-
-
- %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
- UTF-8
-
-
-
-
- ${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log
-
- 100MB
-
-
- 15
-
-
-
- info
- ACCEPT
- DENY
-
-
-
-
-
-
- ${log.path}/log_warn.log
-
-
- %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
- UTF-8
-
-
-
- ${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log
-
- 100MB
-
-
- 15
-
-
-
- warn
- ACCEPT
- DENY
-
-
-
-
-
-
-
- ${log.path}/log_error.log
-
-
- %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
- UTF-8
-
-
-
- ${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log
-
- 100MB
-
-
- 15
-
-
-
- ERROR
- ACCEPT
- DENY
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/api/src/test/java/com/wansentech/UserSampleTest.java b/api/src/test/java/com/wansentech/UserSampleTest.java
deleted file mode 100644
index 94b4b925..00000000
--- a/api/src/test/java/com/wansentech/UserSampleTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.wansentech;/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-@SpringBootTest(classes = Application.class)
-public class UserSampleTest {
-
- @Test
- public void testSelect() {
- System.out.println(("----- selectAll method test ------"));
- }
-}
diff --git a/dao/pom.xml b/dao/pom.xml
deleted file mode 100644
index b24a3693..00000000
--- a/dao/pom.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
- wansnenerp
- wansentech
- 0.0.1-SNAPSHOT
-
- 4.0.0
- dao
-
-
- 17
- 17
-
-
-
-
- wansentech
- domain
- 0.0.1-SNAPSHOT
-
-
- wansentech
- utils
- 0.0.1-SNAPSHOT
-
-
-
\ No newline at end of file
diff --git a/dao/src/main/java/com/wansentech/aggregateservice/UserAggregate.java b/dao/src/main/java/com/wansentech/aggregateservice/UserAggregate.java
deleted file mode 100644
index 592901e9..00000000
--- a/dao/src/main/java/com/wansentech/aggregateservice/UserAggregate.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.aggregateservice;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.wansentech.Response;
-import com.wansentech.dao.entity.User;
-import com.wansentech.dao.po.UserRegisterPo;
-
-public interface UserAggregate extends IService {
-
- boolean insertUser(UserRegisterPo userRegisterPo);
-
- boolean existUser(String userName);
-}
diff --git a/dao/src/main/java/com/wansentech/aggregateservice/impl/UserAggregateImpl.java b/dao/src/main/java/com/wansentech/aggregateservice/impl/UserAggregateImpl.java
deleted file mode 100644
index 6bbe0a67..00000000
--- a/dao/src/main/java/com/wansentech/aggregateservice/impl/UserAggregateImpl.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.aggregateservice.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.wansentech.aggregateservice.UserAggregate;
-import com.wansentech.dao.entity.User;
-import com.wansentech.dao.po.UserRegisterPo;
-import com.wansentech.mappers.UserMapper;
-import org.springframework.stereotype.Service;
-
-@Service
-public class UserAggregateImpl extends ServiceImpl implements UserAggregate{
-
- private UserMapper userMapper;
-
- public UserAggregateImpl(UserMapper userMapper) {
- this.userMapper = userMapper;
- }
-
- @Override
- public boolean insertUser(UserRegisterPo userRegisterPo) {
-
- User user = new User();
- user.setId(userRegisterPo.getId());
- user.setName(userRegisterPo.getName());
- user.setUserName(userRegisterPo.getUserName());
- user.setPassword(userRegisterPo.getPassword());
- user.setEmail(userRegisterPo.getEmail());
- user.setPhoneNumber(userRegisterPo.getPhoneNumber());
- user.setStatus(0);
- user.setRemark(userRegisterPo.getRemark());
- user.setTenantId(0L);
-
- return save(user);
- }
-
- @Override
- public boolean existUser(String userName) {
- LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(User::getUserName, userName);
-
- return userMapper.exists(queryWrapper);
- }
-}
diff --git a/dao/src/main/java/com/wansentech/mappers/UserMapper.java b/dao/src/main/java/com/wansentech/mappers/UserMapper.java
deleted file mode 100644
index a0ba5676..00000000
--- a/dao/src/main/java/com/wansentech/mappers/UserMapper.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.mappers;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-import com.wansentech.dao.entity.User;
-import org.apache.ibatis.annotations.Mapper;
-
-@Mapper
-public interface UserMapper extends BaseMapper {
-}
diff --git a/dao/src/main/resources/mapper_xml/UserMapper.xml b/dao/src/main/resources/mapper_xml/UserMapper.xml
deleted file mode 100644
index 23cf720f..00000000
--- a/dao/src/main/resources/mapper_xml/UserMapper.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
diff --git a/docs/wansenerp.sql b/docs/wansenerp.sql
new file mode 100644
index 00000000..899dd634
--- /dev/null
+++ b/docs/wansenerp.sql
@@ -0,0 +1,1017 @@
+/*
+Navicat MySQL Data Transfer
+
+Source Server : 127.0.0.1
+Source Server Version : 50704
+Source Host : 127.0.0.1:3306
+Source Database : jsh_erp
+
+Target Server Type : MYSQL
+Target Server Version : 50704
+File Encoding : 65001
+
+Date: 2023-06-21 19:00:09
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for jsh_account
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_account`;
+CREATE TABLE `jsh_account` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(50) DEFAULT NULL COMMENT '名称',
+ `serial_no` varchar(50) DEFAULT NULL COMMENT '编号',
+ `initial_amount` decimal(24,6) DEFAULT NULL COMMENT '期初金额',
+ `current_amount` decimal(24,6) DEFAULT NULL COMMENT '当前余额',
+ `remark` varchar(100) DEFAULT NULL COMMENT '备注',
+ `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+ `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+ `is_default` bit(1) DEFAULT NULL COMMENT '是否默认',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='账户信息';
+
+-- ----------------------------
+-- Records of jsh_account
+-- ----------------------------
+INSERT INTO `jsh_account` VALUES ('17', '账户1', 'zzz111', '100.000000', '829.000000', 'aabb', '', null, '', '63', '0');
+INSERT INTO `jsh_account` VALUES ('18', '账户2', '1234131324', '200.000000', '-1681.000000', 'bbbb', '', null, '\0', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_account_head
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_account_head`;
+CREATE TABLE `jsh_account_head` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `type` varchar(50) DEFAULT NULL COMMENT '类型(支出/收入/收款/付款/转账)',
+ `organ_id` bigint(20) DEFAULT NULL COMMENT '单位Id(收款/付款单位)',
+ `hands_person_id` bigint(20) DEFAULT NULL COMMENT '经手人id',
+ `creator` bigint(20) DEFAULT NULL COMMENT '操作员',
+ `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(优惠/收款/付款/实付)',
+ `discount_money` decimal(24,6) DEFAULT NULL COMMENT '优惠金额',
+ `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额',
+ `account_id` bigint(20) DEFAULT NULL COMMENT '账户(收款/付款)',
+ `bill_no` varchar(50) DEFAULT NULL COMMENT '单据编号',
+ `bill_time` datetime DEFAULT NULL COMMENT '单据日期',
+ `remark` varchar(1000) DEFAULT NULL COMMENT '备注',
+ `file_name` varchar(500) DEFAULT NULL COMMENT '附件名称',
+ `status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、9审核中',
+ `source` varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`),
+ KEY `FK9F4C0D8DB610FC06` (`organ_id`),
+ KEY `FK9F4C0D8DAAE50527` (`account_id`),
+ KEY `FK9F4C0D8DC4170B37` (`hands_person_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=utf8 COMMENT='财务主表';
+
+-- ----------------------------
+-- Records of jsh_account_head
+-- ----------------------------
+INSERT INTO `jsh_account_head` VALUES ('118', '收入', '58', '16', '63', '55.000000', null, '55.000000', '17', 'SR00000000643', '2021-06-02 00:24:49', null, null, '1', '0', '63', '0');
+INSERT INTO `jsh_account_head` VALUES ('119', '支出', '68', '16', '63', '-66.000000', null, '-66.000000', '17', 'ZC00000000644', '2021-06-02 00:25:01', null, null, '0', '0', '63', '0');
+INSERT INTO `jsh_account_head` VALUES ('122', '转账', null, '17', '63', '-11.000000', null, '-11.000000', '17', 'ZZ00000000647', '2021-06-02 00:25:32', null, null, '0', '0', '63', '0');
+INSERT INTO `jsh_account_head` VALUES ('124', '收预付款', '60', '17', '63', '80.000000', '0.000000', '80.000000', null, 'SYF00000000649', '2021-07-06 23:43:48', null, null, '0', '0', '63', '0');
+INSERT INTO `jsh_account_head` VALUES ('125', '收款', '58', '17', '63', '10.000000', '0.000000', '10.000000', '17', 'SK00000000653', '2021-07-06 23:46:38', null, null, '0', '0', '63', '0');
+INSERT INTO `jsh_account_head` VALUES ('126', '付款', '57', '17', '63', '-50.000000', '0.000000', '-50.000000', '17', 'FK00000000654', '2021-07-06 23:47:23', null, null, '0', '0', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_account_item
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_account_item`;
+CREATE TABLE `jsh_account_item` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `header_id` bigint(20) NOT NULL COMMENT '表头Id',
+ `account_id` bigint(20) DEFAULT NULL COMMENT '账户Id',
+ `in_out_item_id` bigint(20) DEFAULT NULL COMMENT '收支项目Id',
+ `bill_id` bigint(20) DEFAULT NULL COMMENT '单据id',
+ `need_debt` decimal(24,6) DEFAULT NULL COMMENT '应收欠款',
+ `finish_debt` decimal(24,6) DEFAULT NULL COMMENT '已收欠款',
+ `each_amount` decimal(24,6) DEFAULT NULL COMMENT '单项金额',
+ `remark` varchar(100) DEFAULT NULL COMMENT '单据备注',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`),
+ KEY `FK9F4CBAC0AAE50527` (`account_id`),
+ KEY `FK9F4CBAC0C5FE6007` (`header_id`),
+ KEY `FK9F4CBAC0D203EDC5` (`in_out_item_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=152 DEFAULT CHARSET=utf8 COMMENT='财务子表';
+
+-- ----------------------------
+-- Records of jsh_account_item
+-- ----------------------------
+INSERT INTO `jsh_account_item` VALUES ('143', '118', null, '23', null, null, null, '55.000000', '', '63', '0');
+INSERT INTO `jsh_account_item` VALUES ('144', '119', null, '21', null, null, null, '66.000000', '', '63', '0');
+INSERT INTO `jsh_account_item` VALUES ('147', '122', '17', null, null, null, null, '11.000000', '', '63', '0');
+INSERT INTO `jsh_account_item` VALUES ('149', '124', '17', null, null, null, null, '80.000000', '', '63', '0');
+INSERT INTO `jsh_account_item` VALUES ('150', '125', null, null, '272', '20.000000', '0.000000', '10.000000', '', '63', '0');
+INSERT INTO `jsh_account_item` VALUES ('151', '126', null, null, '271', '60.000000', '0.000000', '-50.000000', '', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_depot
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_depot`;
+CREATE TABLE `jsh_depot` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(20) DEFAULT NULL COMMENT '仓库名称',
+ `address` varchar(50) DEFAULT NULL COMMENT '仓库地址',
+ `warehousing` decimal(24,6) DEFAULT NULL COMMENT '仓储费',
+ `truckage` decimal(24,6) DEFAULT NULL COMMENT '搬运费',
+ `type` int(10) DEFAULT NULL COMMENT '类型',
+ `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+ `remark` varchar(100) DEFAULT NULL COMMENT '描述',
+ `principal` bigint(20) DEFAULT NULL COMMENT '负责人',
+ `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ `is_default` bit(1) DEFAULT NULL COMMENT '是否默认',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='仓库表';
+
+-- ----------------------------
+-- Records of jsh_depot
+-- ----------------------------
+INSERT INTO `jsh_depot` VALUES ('14', '仓库1', 'dizhi', '12.000000', '12.000000', '0', '1', '描述', '131', '', '63', '0', '');
+INSERT INTO `jsh_depot` VALUES ('15', '仓库2', '地址100', '555.000000', '666.000000', '0', '2', 'dfdf', '131', '', '63', '0', '\0');
+INSERT INTO `jsh_depot` VALUES ('17', '仓库3', '123123', '123.000000', '123.000000', '0', '3', '123', '131', '', '63', '0', '\0');
+
+-- ----------------------------
+-- Table structure for jsh_depot_head
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_depot_head`;
+CREATE TABLE `jsh_depot_head` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `type` varchar(50) DEFAULT NULL COMMENT '类型(出库/入库)',
+ `sub_type` varchar(50) DEFAULT NULL COMMENT '出入库分类',
+ `default_number` varchar(50) DEFAULT NULL COMMENT '初始票据号',
+ `number` varchar(50) DEFAULT NULL COMMENT '票据号',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `oper_time` datetime DEFAULT NULL COMMENT '出入库时间',
+ `organ_id` bigint(20) DEFAULT NULL COMMENT '供应商id',
+ `creator` bigint(20) DEFAULT NULL COMMENT '操作员',
+ `account_id` bigint(20) DEFAULT NULL COMMENT '账户id',
+ `change_amount` decimal(24,6) DEFAULT NULL COMMENT '变动金额(收款/付款)',
+ `back_amount` decimal(24,6) DEFAULT NULL COMMENT '找零金额',
+ `total_price` decimal(24,6) DEFAULT NULL COMMENT '合计金额',
+ `pay_type` varchar(50) DEFAULT NULL COMMENT '付款类型(现金、记账等)',
+ `bill_type` varchar(50) DEFAULT NULL COMMENT '单据类型',
+ `remark` varchar(1000) DEFAULT NULL COMMENT '备注',
+ `file_name` varchar(1000) DEFAULT NULL COMMENT '附件名称',
+ `sales_man` varchar(50) DEFAULT NULL COMMENT '业务员(可以多个)',
+ `account_id_list` varchar(50) DEFAULT NULL COMMENT '多账户ID列表',
+ `account_money_list` varchar(200) DEFAULT NULL COMMENT '多账户金额列表',
+ `discount` decimal(24,6) DEFAULT NULL COMMENT '优惠率',
+ `discount_money` decimal(24,6) DEFAULT NULL COMMENT '优惠金额',
+ `discount_last_money` decimal(24,6) DEFAULT NULL COMMENT '优惠后金额',
+ `other_money` decimal(24,6) DEFAULT NULL COMMENT '销售或采购费用合计',
+ `deposit` decimal(24,6) DEFAULT NULL COMMENT '订金',
+ `status` varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2完成采购|销售、3部分采购|销售、9审核中',
+ `purchase_status` varchar(1) DEFAULT NULL COMMENT '采购状态,0未采购、2完成采购、3部分采购',
+ `source` varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机',
+ `link_number` varchar(50) DEFAULT NULL COMMENT '关联订单号',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`),
+ KEY `FK2A80F214B610FC06` (`organ_id`),
+ KEY `FK2A80F214AAE50527` (`account_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=274 DEFAULT CHARSET=utf8 COMMENT='单据主表';
+
+-- ----------------------------
+-- Records of jsh_depot_head
+-- ----------------------------
+INSERT INTO `jsh_depot_head` VALUES ('258', '其它', '采购订单', 'CGDD00000000630', 'CGDD00000000630', '2021-06-02 00:21:54', '2021-06-02 00:21:44', '57', '63', null, null, null, '-110.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '2', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('259', '入库', '采购', 'CGRK00000000631', 'CGRK00000000631', '2021-06-02 00:22:23', '2021-06-02 00:22:05', '57', '63', '17', '-110.000000', null, '-110.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '110.000000', '0.000000', null, '0', '0', '0', 'CGDD00000000630', '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('260', '出库', '采购退货', 'CGTH00000000632', 'CGTH00000000632', '2021-06-02 00:22:35', '2021-06-02 00:22:26', '57', '63', '17', '22.000000', null, '22.000000', '现付', null, null, null, null, null, null, '0.000000', '0.000000', '22.000000', '0.000000', null, '0', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('261', '其它', '销售订单', 'XSDD00000000633', 'XSDD00000000633', '2021-06-02 00:22:48', '2021-06-02 00:22:39', '58', '63', null, null, null, '44.000000', '现付', null, null, null, '', null, null, null, null, null, null, null, '2', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('262', '出库', '销售', 'XSCK00000000634', 'XSCK00000000634', '2021-06-02 00:23:03', '2021-06-02 00:22:54', '58', '63', '17', '44.000000', null, '44.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '44.000000', '0.000000', null, '0', '0', '0', 'XSDD00000000633', '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('263', '入库', '销售退货', 'XSTH00000000635', 'XSTH00000000635', '2021-06-02 00:23:12', '2021-06-02 00:23:05', '71', '63', '17', '-22.000000', null, '-22.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '22.000000', '0.000000', null, '0', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('264', '出库', '零售', 'LSCK00000000636', 'LSCK00000000636', '2021-06-02 00:23:21', '2021-06-02 00:23:14', '60', '63', '17', '22.000000', null, '22.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('265', '入库', '零售退货', 'LSTH00000000637', 'LSTH00000000637', '2021-06-02 00:23:29', '2021-06-02 00:23:23', '60', '63', '17', '-22.000000', null, '-22.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('266', '入库', '其它', 'QTRK00000000638', 'QTRK00000000638', '2021-06-02 00:23:48', '2021-06-02 00:23:36', '57', '63', null, null, null, '-55.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '1', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('267', '出库', '其它', 'QTCK00000000639', 'QTCK00000000639', '2021-06-02 00:23:59', '2021-06-02 00:23:50', '58', '63', null, null, null, '30.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('268', '出库', '调拨', 'DBCK00000000640', 'DBCK00000000640', '2021-06-02 00:24:09', '2021-06-02 00:24:00', null, '63', null, null, null, '11.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('269', '其它', '组装单', 'ZZD00000000641', 'ZZD00000000641', '2021-06-02 00:24:29', '2021-06-02 00:24:11', null, '63', null, null, null, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('270', '其它', '拆卸单', 'CXD00000000642', 'CXD00000000642', '2021-06-02 00:24:45', '2021-06-02 00:24:32', null, '63', null, null, null, '0.000000', '现付', null, null, null, null, null, null, null, null, null, null, null, '0', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('271', '入库', '采购', 'CGRK00000000651', 'CGRK00000000651', '2021-07-06 23:45:20', '2021-07-06 23:44:45', '57', '63', '17', '-20.000000', null, '-80.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '80.000000', '0.000000', null, '0', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('272', '出库', '销售', 'XSCK00000000652', 'XSCK00000000652', '2021-07-06 23:46:07', '2021-07-06 23:45:24', '58', '63', '17', '8.000000', null, '28.000000', '现付', null, null, null, '', '', '', '0.000000', '0.000000', '28.000000', '0.000000', null, '0', '0', '0', null, '63', '0');
+INSERT INTO `jsh_depot_head` VALUES ('273', '入库', '采购', 'CGRK00000000658', 'CGRK00000000658', '2021-07-28 00:58:12', '2021-07-28 00:58:02', '57', '63', '17', '-60.000000', null, '-60.000000', '现付', null, null, null, null, '', '', '0.000000', '0.000000', '60.000000', '0.000000', null, '0', '0', '0', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_depot_item
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_depot_item`;
+CREATE TABLE `jsh_depot_item` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `header_id` bigint(20) NOT NULL COMMENT '表头Id',
+ `material_id` bigint(20) NOT NULL COMMENT '商品Id',
+ `material_extend_id` bigint(20) DEFAULT NULL COMMENT '商品扩展id',
+ `material_unit` varchar(20) DEFAULT NULL COMMENT '商品计量单位',
+ `sku` varchar(50) DEFAULT NULL COMMENT '多属性',
+ `oper_number` decimal(24,6) DEFAULT NULL COMMENT '数量',
+ `basic_number` decimal(24,6) DEFAULT NULL COMMENT '基础数量,如kg、瓶',
+ `unit_price` decimal(24,6) DEFAULT NULL COMMENT '单价',
+ `purchase_unit_price` decimal(24,6) DEFAULT NULL COMMENT '采购单价',
+ `tax_unit_price` decimal(24,6) DEFAULT NULL COMMENT '含税单价',
+ `all_price` decimal(24,6) DEFAULT NULL COMMENT '金额',
+ `remark` varchar(200) DEFAULT NULL COMMENT '备注',
+ `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库ID',
+ `another_depot_id` bigint(20) DEFAULT NULL COMMENT '调拨时,对方仓库Id',
+ `tax_rate` decimal(24,6) DEFAULT NULL COMMENT '税率',
+ `tax_money` decimal(24,6) DEFAULT NULL COMMENT '税额',
+ `tax_last_money` decimal(24,6) DEFAULT NULL COMMENT '价税合计',
+ `material_type` varchar(20) DEFAULT NULL COMMENT '商品类型',
+ `sn_list` varchar(2000) DEFAULT NULL COMMENT '序列号列表',
+ `batch_number` varchar(100) DEFAULT NULL COMMENT '批号',
+ `expiration_date` datetime DEFAULT NULL COMMENT '有效日期',
+ `link_id` bigint(20) DEFAULT NULL COMMENT '关联明细id',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`),
+ KEY `FK2A819F475D61CCF7` (`material_id`),
+ KEY `FK2A819F474BB6190E` (`header_id`),
+ KEY `FK2A819F479485B3F5` (`depot_id`),
+ KEY `FK2A819F47729F5392` (`another_depot_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=331 DEFAULT CHARSET=utf8 COMMENT='单据子表';
+
+-- ----------------------------
+-- Records of jsh_depot_item
+-- ----------------------------
+INSERT INTO `jsh_depot_item` VALUES ('312', '258', '588', '10', '个', null, '10.000000', '10.000000', '11.000000', null, null, '110.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('313', '259', '588', '10', '个', null, '10.000000', '10.000000', '11.000000', null, null, '110.000000', null, '14', null, null, '0.000000', '110.000000', null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('314', '260', '588', '10', '个', null, '2.000000', '2.000000', '11.000000', null, '11.000000', '22.000000', null, '14', null, '0.000000', '0.000000', '22.000000', null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('315', '261', '588', '10', '个', null, '2.000000', '2.000000', '22.000000', null, null, '44.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('316', '262', '588', '10', '个', null, '2.000000', '2.000000', '22.000000', null, null, '44.000000', null, '14', null, null, '0.000000', '44.000000', null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('317', '263', '588', '10', '个', null, '1.000000', '1.000000', '22.000000', null, '22.000000', '22.000000', null, '14', null, '0.000000', '0.000000', '22.000000', null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('318', '264', '588', '10', '个', null, '1.000000', '1.000000', '22.000000', null, null, '22.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('319', '265', '588', '10', '个', null, '1.000000', '1.000000', '22.000000', null, null, '22.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('320', '266', '568', '2', '个', null, '5.000000', '5.000000', '11.000000', null, null, '55.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('321', '267', '568', '2', '个', null, '2.000000', '2.000000', '15.000000', null, null, '30.000000', null, '14', null, null, null, null, null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('322', '268', '568', '2', '个', null, '1.000000', '1.000000', '11.000000', null, null, '11.000000', null, '14', '15', null, null, null, null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('323', '269', '588', '10', '个', null, '1.000000', '1.000000', '0.000000', null, null, '0.000000', null, '14', null, null, null, null, '组合件', null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('324', '269', '568', '2', '个', null, '1.000000', '1.000000', '0.000000', null, null, '0.000000', null, '14', null, null, null, null, '普通子件', null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('325', '270', '588', '10', '个', null, '1.000000', '1.000000', '0.000000', null, null, '0.000000', null, '14', null, null, null, null, '组合件', null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('326', '270', '568', '2', '个', null, '1.000000', '1.000000', '0.000000', null, null, '0.000000', null, '14', null, null, null, null, '普通子件', null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('327', '271', '570', '4', '个', null, '10.000000', '10.000000', '8.000000', null, '8.000000', '80.000000', null, '14', null, '0.000000', '0.000000', '80.000000', null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('328', '272', '570', '4', '个', null, '2.000000', '2.000000', '14.000000', null, '14.000000', '28.000000', null, '14', null, '0.000000', '0.000000', '28.000000', null, null, null, null, null, '63', '0');
+INSERT INTO `jsh_depot_item` VALUES ('330', '273', '619', '37', '件', '橙色,L', '5.000000', '5.000000', '12.000000', null, '12.000000', '60.000000', null, '14', null, '0.000000', '0.000000', '60.000000', null, null, null, null, null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_function
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_function`;
+CREATE TABLE `jsh_function` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `number` varchar(50) DEFAULT NULL COMMENT '编号',
+ `name` varchar(50) DEFAULT NULL COMMENT '名称',
+ `parent_number` varchar(50) DEFAULT NULL COMMENT '上级编号',
+ `url` varchar(100) DEFAULT NULL COMMENT '链接',
+ `component` varchar(100) DEFAULT NULL COMMENT '组件',
+ `state` bit(1) DEFAULT NULL COMMENT '收缩',
+ `sort` varchar(50) DEFAULT NULL COMMENT '排序',
+ `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+ `type` varchar(50) DEFAULT NULL COMMENT '类型',
+ `push_btn` varchar(50) DEFAULT NULL COMMENT '功能按钮',
+ `icon` varchar(50) DEFAULT NULL COMMENT '图标',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `url` (`url`)
+) ENGINE=InnoDB AUTO_INCREMENT=260 DEFAULT CHARSET=utf8 COMMENT='功能模块表';
+
+-- ----------------------------
+-- Records of jsh_function
+-- ----------------------------
+INSERT INTO `jsh_function` VALUES ('1', '0001', '系统管理', '0', '/system', '/layouts/TabLayout', '', '0910', '', '电脑版', '', 'setting', '0');
+INSERT INTO `jsh_function` VALUES ('13', '000102', '角色管理', '0001', '/system/role', '/system/RoleList', '\0', '0130', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('14', '000103', '用户管理', '0001', '/system/user', '/system/UserList', '\0', '0140', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('15', '000104', '日志管理', '0001', '/system/log', '/system/LogList', '\0', '0160', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('16', '000105', '功能管理', '0001', '/system/function', '/system/FunctionList', '\0', '0166', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('18', '000109', '租户管理', '0001', '/system/tenant', '/system/TenantList', '\0', '0167', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('21', '0101', '商品管理', '0', '/material', '/layouts/TabLayout', '\0', '0620', '', '电脑版', null, 'shopping', '0');
+INSERT INTO `jsh_function` VALUES ('22', '010101', '商品类别', '0101', '/material/material_category', '/material/MaterialCategoryList', '\0', '0230', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('23', '010102', '商品信息', '0101', '/material/material', '/material/MaterialList', '\0', '0240', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('24', '0102', '基本资料', '0', '/systemA', '/layouts/TabLayout', '\0', '0750', '', '电脑版', null, 'appstore', '0');
+INSERT INTO `jsh_function` VALUES ('25', '01020101', '供应商信息', '0102', '/system/vendor', '/system/VendorList', '\0', '0260', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('26', '010202', '仓库信息', '0102', '/system/depot', '/system/DepotList', '\0', '0270', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('31', '010206', '经手人管理', '0102', '/system/person', '/system/PersonList', '\0', '0284', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('32', '0502', '采购管理', '0', '/bill', '/layouts/TabLayout', '\0', '0330', '', '电脑版', '', 'retweet', '0');
+INSERT INTO `jsh_function` VALUES ('33', '050201', '采购入库', '0502', '/bill/purchase_in', '/bill/PurchaseInList', '\0', '0340', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('38', '0603', '销售管理', '0', '/billB', '/layouts/TabLayout', '\0', '0390', '', '电脑版', '', 'shopping-cart', '0');
+INSERT INTO `jsh_function` VALUES ('40', '080107', '调拨出库', '0801', '/bill/allocation_out', '/bill/AllocationOutList', '\0', '0807', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('41', '060303', '销售出库', '0603', '/bill/sale_out', '/bill/SaleOutList', '\0', '0394', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('44', '0704', '财务管理', '0', '/financial', '/layouts/TabLayout', '\0', '0450', '', '电脑版', '', 'money-collect', '0');
+INSERT INTO `jsh_function` VALUES ('59', '030101', '进销存统计', '0301', '/report/in_out_stock_report', '/report/InOutStockReport', '\0', '0658', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('194', '010204', '收支项目', '0102', '/system/in_out_item', '/system/InOutItemList', '\0', '0282', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('195', '010205', '结算账户', '0102', '/system/account', '/system/AccountList', '\0', '0283', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('197', '070402', '收入单', '0704', '/financial/item_in', '/financial/ItemInList', '\0', '0465', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('198', '0301', '报表查询', '0', '/report', '/layouts/TabLayout', '\0', '0570', '', '电脑版', null, 'pie-chart', '0');
+INSERT INTO `jsh_function` VALUES ('199', '050204', '采购退货', '0502', '/bill/purchase_back', '/bill/PurchaseBackList', '\0', '0345', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('200', '060305', '销售退货', '0603', '/bill/sale_back', '/bill/SaleBackList', '\0', '0396', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('201', '080103', '其它入库', '0801', '/bill/other_in', '/bill/OtherInList', '\0', '0803', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('202', '080105', '其它出库', '0801', '/bill/other_out', '/bill/OtherOutList', '\0', '0805', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('203', '070403', '支出单', '0704', '/financial/item_out', '/financial/ItemOutList', '\0', '0470', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('204', '070404', '收款单', '0704', '/financial/money_in', '/financial/MoneyInList', '\0', '0475', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('205', '070405', '付款单', '0704', '/financial/money_out', '/financial/MoneyOutList', '\0', '0480', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('206', '070406', '转账单', '0704', '/financial/giro', '/financial/GiroList', '\0', '0490', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('207', '030102', '账户统计', '0301', '/report/account_report', '/report/AccountReport', '\0', '0610', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('208', '030103', '采购统计', '0301', '/report/buy_in_report', '/report/BuyInReport', '\0', '0620', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('209', '030104', '销售统计', '0301', '/report/sale_out_report', '/report/SaleOutReport', '\0', '0630', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('210', '040102', '零售出库', '0401', '/bill/retail_out', '/bill/RetailOutList', '\0', '0405', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('211', '040104', '零售退货', '0401', '/bill/retail_back', '/bill/RetailBackList', '\0', '0407', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('212', '070407', '收预付款', '0704', '/financial/advance_in', '/financial/AdvanceInList', '\0', '0495', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('217', '01020102', '客户信息', '0102', '/system/customer', '/system/CustomerList', '\0', '0262', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('218', '01020103', '会员信息', '0102', '/system/member', '/system/MemberList', '\0', '0263', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('220', '010103', '计量单位', '0101', '/system/unit', '/system/UnitList', '\0', '0245', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('225', '0401', '零售管理', '0', '/billC', '/layouts/TabLayout', '\0', '0101', '', '电脑版', '', 'gift', '0');
+INSERT INTO `jsh_function` VALUES ('226', '030106', '入库明细', '0301', '/report/in_detail', '/report/InDetail', '\0', '0640', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('227', '030107', '出库明细', '0301', '/report/out_detail', '/report/OutDetail', '\0', '0645', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('228', '030108', '入库汇总', '0301', '/report/in_material_count', '/report/InMaterialCount', '\0', '0650', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('229', '030109', '出库汇总', '0301', '/report/out_material_count', '/report/OutMaterialCount', '\0', '0655', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('232', '080109', '组装单', '0801', '/bill/assemble', '/bill/AssembleList', '\0', '0809', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('233', '080111', '拆卸单', '0801', '/bill/disassemble', '/bill/DisassembleList', '\0', '0811', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('234', '000105', '系统配置', '0001', '/system/system_config', '/system/SystemConfigList', '\0', '0165', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('235', '030110', '客户对账', '0301', '/report/customer_account', '/report/CustomerAccount', '\0', '0660', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('236', '000106', '商品属性', '0001', '/material/material_property', '/material/MaterialPropertyList', '\0', '0168', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('237', '030111', '供应商对账', '0301', '/report/vendor_account', '/report/VendorAccount', '\0', '0665', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('239', '0801', '仓库管理', '0', '/billD', '/layouts/TabLayout', '\0', '0420', '', '电脑版', '', 'hdd', '0');
+INSERT INTO `jsh_function` VALUES ('241', '050202', '采购订单', '0502', '/bill/purchase_order', '/bill/PurchaseOrderList', '\0', '0335', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('242', '060301', '销售订单', '0603', '/bill/sale_order', '/bill/SaleOrderList', '\0', '0392', '', '电脑版', '1,2,7', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('243', '000108', '机构管理', '0001', '/system/organization', '/system/OrganizationList', '', '0150', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('244', '030112', '库存预警', '0301', '/report/stock_warning_report', '/report/StockWarningReport', '\0', '0670', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('245', '000107', '插件管理', '0001', '/system/plugin', '/system/PluginList', '\0', '0170', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('246', '030113', '商品库存', '0301', '/report/material_stock', '/report/MaterialStock', '\0', '0605', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('247', '010105', '多属性', '0101', '/material/material_attribute', '/material/MaterialAttributeList', '\0', '0250', '', '电脑版', '1', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('248', '030150', '调拨明细', '0301', '/report/allocation_detail', '/report/AllocationDetail', '\0', '0646', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('258', '000112', '平台配置', '0001', '/system/platform_config', '/system/PlatformConfigList', '\0', '0175', '', '电脑版', '', 'profile', '0');
+INSERT INTO `jsh_function` VALUES ('259', '030105', '零售统计', '0301', '/report/retail_out_report', '/report/RetailOutReport', '\0', '0615', '', '电脑版', '', 'profile', '0');
+
+-- ----------------------------
+-- Table structure for jsh_in_out_item
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_in_out_item`;
+CREATE TABLE `jsh_in_out_item` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(50) DEFAULT NULL COMMENT '名称',
+ `type` varchar(20) DEFAULT NULL COMMENT '类型',
+ `remark` varchar(100) DEFAULT NULL COMMENT '备注',
+ `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+ `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COMMENT='收支项目';
+
+-- ----------------------------
+-- Records of jsh_in_out_item
+-- ----------------------------
+INSERT INTO `jsh_in_out_item` VALUES ('21', '快递费', '支出', '', '', null, '63', '0');
+INSERT INTO `jsh_in_out_item` VALUES ('22', '房租收入', '收入', '', '', null, '63', '0');
+INSERT INTO `jsh_in_out_item` VALUES ('23', '利息收入', '收入', '收入', '', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_log
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_log`;
+CREATE TABLE `jsh_log` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `user_id` bigint(20) DEFAULT NULL COMMENT '用户id',
+ `operation` varchar(500) DEFAULT NULL COMMENT '操作模块名称',
+ `client_ip` varchar(200) DEFAULT NULL COMMENT '客户端IP',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `status` tinyint(4) DEFAULT NULL COMMENT '操作状态 0==成功,1==失败',
+ `content` varchar(5000) DEFAULT NULL COMMENT '详情',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ PRIMARY KEY (`id`),
+ KEY `FKF2696AA13E226853` (`user_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=7559 DEFAULT CHARSET=utf8 COMMENT='操作日志';
+
+-- ----------------------------
+-- Records of jsh_log
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for jsh_material
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material`;
+CREATE TABLE `jsh_material` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `category_id` bigint(20) DEFAULT NULL COMMENT '产品类型id',
+ `name` varchar(100) DEFAULT NULL COMMENT '名称',
+ `mfrs` varchar(50) DEFAULT NULL COMMENT '制造商',
+ `model` varchar(100) DEFAULT NULL COMMENT '型号',
+ `standard` varchar(100) DEFAULT NULL COMMENT '规格',
+ `color` varchar(50) DEFAULT NULL COMMENT '颜色',
+ `unit` varchar(50) DEFAULT NULL COMMENT '单位-单个',
+ `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+ `img_name` varchar(1000) DEFAULT NULL COMMENT '图片名称',
+ `unit_id` bigint(20) DEFAULT NULL COMMENT '计量单位Id',
+ `expiry_num` int(10) DEFAULT NULL COMMENT '保质期天数',
+ `weight` decimal(24,6) DEFAULT NULL COMMENT '基础重量(kg)',
+ `enabled` bit(1) DEFAULT NULL COMMENT '启用 0-禁用 1-启用',
+ `other_field1` varchar(50) DEFAULT NULL COMMENT '自定义1',
+ `other_field2` varchar(50) DEFAULT NULL COMMENT '自定义2',
+ `other_field3` varchar(50) DEFAULT NULL COMMENT '自定义3',
+ `enable_serial_number` varchar(1) DEFAULT '0' COMMENT '是否开启序列号,0否,1是',
+ `enable_batch_number` varchar(1) DEFAULT '0' COMMENT '是否开启批号,0否,1是',
+ `position` varchar(100) DEFAULT NULL COMMENT '仓位货架',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`),
+ KEY `FK675951272AB6672C` (`category_id`),
+ KEY `UnitId` (`unit_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=620 DEFAULT CHARSET=utf8 COMMENT='产品表';
+
+-- ----------------------------
+-- Records of jsh_material
+-- ----------------------------
+INSERT INTO `jsh_material` VALUES ('568', '17', '商品1', '制1', 'sp1', '', '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('569', '17', '商品2', '', 'sp2', '', '', '只', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('570', '17', '商品3', '', 'sp3', '', '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('577', null, '商品8', '', 'sp8', '', '', '', '', null, '15', null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('579', '21', '商品17', '', 'sp17', '', '', '', '', null, '15', null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('586', '17', '序列号商品测试', '', 'xlh123', '', '', '个', '', null, null, null, null, '', '', '', '', '1', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('587', '17', '商品test1', '南通中远', '', 'test1', '', '个', '', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('588', '21', '商品200', 'fafda', 'weqwe', '300ml', '红色', '个', 'aaaabbbbb', null, null, null, null, '', '', '', '', '0', '0', null, '63', '0');
+INSERT INTO `jsh_material` VALUES ('619', null, '衣服', null, null, null, null, '件', null, '', null, null, null, '', null, null, null, '0', '0', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_material_attribute
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_attribute`;
+CREATE TABLE `jsh_material_attribute` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `attribute_name` varchar(50) DEFAULT NULL COMMENT '属性名',
+ `attribute_value` varchar(500) DEFAULT NULL COMMENT '属性值',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='产品属性表';
+
+-- ----------------------------
+-- Records of jsh_material_attribute
+-- ----------------------------
+INSERT INTO `jsh_material_attribute` VALUES ('1', '多颜色', '红色|橙色|黄色|绿色|蓝色|紫色', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('2', '多尺寸', 'S|M|L|XL|XXL|XXXL', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('3', '自定义1', '小米|华为', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('4', '自定义2', null, '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('5', '自定义3', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_material_category
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_category`;
+CREATE TABLE `jsh_material_category` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(50) DEFAULT NULL COMMENT '名称',
+ `category_level` smallint(6) DEFAULT NULL COMMENT '等级',
+ `parent_id` bigint(20) DEFAULT NULL COMMENT '上级id',
+ `sort` varchar(10) DEFAULT NULL COMMENT '显示顺序',
+ `serial_no` varchar(100) DEFAULT NULL COMMENT '编号',
+ `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`),
+ KEY `FK3EE7F725237A77D8` (`parent_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COMMENT='产品类型表';
+
+-- ----------------------------
+-- Records of jsh_material_category
+-- ----------------------------
+INSERT INTO `jsh_material_category` VALUES ('17', '目录1', null, null, '11', 'wae12', 'eee', '2019-04-10 22:18:12', '2021-02-17 15:11:35', '63', '0');
+INSERT INTO `jsh_material_category` VALUES ('21', '目录2', null, '17', '22', 'ada112', 'ddd', '2020-07-20 23:08:44', '2020-07-20 23:08:44', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_material_current_stock
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_current_stock`;
+CREATE TABLE `jsh_material_current_stock` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `material_id` bigint(20) DEFAULT NULL COMMENT '产品id',
+ `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
+ `current_number` decimal(24,6) DEFAULT NULL COMMENT '当前库存数量',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品当前库存';
+
+-- ----------------------------
+-- Records of jsh_material_current_stock
+-- ----------------------------
+INSERT INTO `jsh_material_current_stock` VALUES ('19', '588', '14', '7.000000', '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('20', '568', '14', '2.000000', '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('21', '568', '15', '1.000000', '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('22', '570', '14', '8.000000', '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('23', '619', '14', '5.000000', '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('24', '619', '15', '0.000000', '63', '0');
+INSERT INTO `jsh_material_current_stock` VALUES ('25', '619', '17', '0.000000', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_material_extend
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_extend`;
+CREATE TABLE `jsh_material_extend` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `material_id` bigint(20) DEFAULT NULL COMMENT '商品id',
+ `bar_code` varchar(50) DEFAULT NULL COMMENT '商品条码',
+ `commodity_unit` varchar(50) DEFAULT NULL COMMENT '商品单位',
+ `sku` varchar(50) DEFAULT NULL COMMENT '多属性',
+ `purchase_decimal` decimal(24,6) DEFAULT NULL COMMENT '采购价格',
+ `commodity_decimal` decimal(24,6) DEFAULT NULL COMMENT '零售价格',
+ `wholesale_decimal` decimal(24,6) DEFAULT NULL COMMENT '销售价格',
+ `low_decimal` decimal(24,6) DEFAULT NULL COMMENT '最低售价',
+ `default_flag` varchar(1) DEFAULT '1' COMMENT '是否为默认单位,1是,0否',
+ `create_time` datetime DEFAULT NULL COMMENT '创建日期',
+ `create_serial` varchar(50) DEFAULT NULL COMMENT '创建人编码',
+ `update_serial` varchar(50) DEFAULT NULL COMMENT '更新人编码',
+ `update_time` bigint(20) DEFAULT NULL COMMENT '更新时间戳',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品价格扩展';
+
+-- ----------------------------
+-- Records of jsh_material_extend
+-- ----------------------------
+INSERT INTO `jsh_material_extend` VALUES ('1', '587', '1000', '个', null, '11.000000', '22.000000', '22.000000', '22.000000', '1', '2020-02-20 23:22:03', 'jsh', 'jsh', '1595263657135', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('2', '568', '1001', '个', null, '11.000000', '15.000000', '15.000000', '15.000000', '1', '2020-02-20 23:44:57', 'jsh', 'jsh', '1595265439418', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('3', '569', '1002', '只', null, '10.000000', '15.000000', '15.000000', '13.000000', '1', '2020-02-20 23:45:15', 'jsh', 'jsh', '1582213514731', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('4', '570', '1003', '个', null, '8.000000', '15.000000', '14.000000', '13.000000', '1', '2020-02-20 23:45:37', 'jsh', 'jsh', '1587657604430', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('5', '577', '1004', '个', null, '10.000000', '20.000000', '20.000000', '20.000000', '1', '2020-02-20 23:46:36', 'jsh', 'jsh', '1582213596494', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('6', '577', '1005', '箱', null, '120.000000', '240.000000', '240.000000', '240.000000', '0', '2020-02-20 23:46:36', 'jsh', 'jsh', '1582213596497', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('7', '579', '1006', '个', null, '20.000000', '30.000000', '30.000000', '30.000000', '1', '2020-02-20 23:47:04', 'jsh', 'jsh', '1595264270458', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('8', '579', '1007', '箱', null, '240.000000', '360.000000', '360.000000', '360.000000', '0', '2020-02-20 23:47:04', 'jsh', 'jsh', '1595264270466', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('9', '586', '1008', '个', null, '12.000000', '15.000000', '15.000000', '15.000000', '1', '2020-02-20 23:47:23', 'jsh', 'jsh', '1595254981896', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('10', '588', '1009', '个', null, '11.000000', '22.000000', '22.000000', '22.000000', '1', '2020-07-21 00:58:15', 'jsh', 'jsh', '1614699799073', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('36', '619', '1014', '件', '橙色,M', '12.000000', '15.000000', '14.000000', null, '1', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220316', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('37', '619', '1015', '件', '橙色,L', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220327', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('38', '619', '1016', '件', '绿色,M', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220336', '63', '0');
+INSERT INTO `jsh_material_extend` VALUES ('39', '619', '1017', '件', '绿色,L', '12.000000', '15.000000', '14.000000', null, '0', '2021-07-28 01:00:20', 'jsh', 'jsh', '1627405220346', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_material_initial_stock
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_initial_stock`;
+CREATE TABLE `jsh_material_initial_stock` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `material_id` bigint(20) DEFAULT NULL COMMENT '产品id',
+ `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
+ `number` decimal(24,6) DEFAULT NULL COMMENT '初始库存数量',
+ `low_safe_stock` decimal(24,6) DEFAULT NULL COMMENT '最低库存数量',
+ `high_safe_stock` decimal(24,6) DEFAULT NULL COMMENT '最高库存数量',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=205 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='产品初始库存';
+
+-- ----------------------------
+-- Records of jsh_material_initial_stock
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for jsh_material_property
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_material_property`;
+CREATE TABLE `jsh_material_property` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `native_name` varchar(50) DEFAULT NULL COMMENT '原始名称',
+ `enabled` bit(1) DEFAULT NULL COMMENT '是否启用',
+ `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+ `another_name` varchar(50) DEFAULT NULL COMMENT '别名',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='产品扩展字段表';
+
+-- ----------------------------
+-- Records of jsh_material_property
+-- ----------------------------
+INSERT INTO `jsh_material_property` VALUES ('1', '制造商', '', '01', '制造商', '0');
+INSERT INTO `jsh_material_property` VALUES ('2', '自定义1', '', '02', '自定义1', '0');
+INSERT INTO `jsh_material_property` VALUES ('3', '自定义2', '', '03', '自定义2', '0');
+INSERT INTO `jsh_material_property` VALUES ('4', '自定义3', '', '04', '自定义3', '0');
+
+-- ----------------------------
+-- Table structure for jsh_msg
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_msg`;
+CREATE TABLE `jsh_msg` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `msg_title` varchar(100) DEFAULT NULL COMMENT '消息标题',
+ `msg_content` varchar(500) DEFAULT NULL COMMENT '消息内容',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `type` varchar(20) DEFAULT NULL COMMENT '消息类型',
+ `user_id` bigint(20) DEFAULT NULL COMMENT '接收人id',
+ `status` varchar(1) DEFAULT NULL COMMENT '状态,1未读 2已读',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='消息表';
+
+-- ----------------------------
+-- Records of jsh_msg
+-- ----------------------------
+INSERT INTO `jsh_msg` VALUES ('2', '标题1', '内容1', '2019-09-10 00:11:39', '类型1', '63', '2', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_organization
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_organization`;
+CREATE TABLE `jsh_organization` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `org_no` varchar(20) DEFAULT NULL COMMENT '机构编号',
+ `org_abr` varchar(20) DEFAULT NULL COMMENT '机构简称',
+ `parent_id` bigint(20) DEFAULT NULL COMMENT '父机构id',
+ `sort` varchar(20) DEFAULT NULL COMMENT '机构显示顺序',
+ `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='机构表';
+
+-- ----------------------------
+-- Records of jsh_organization
+-- ----------------------------
+INSERT INTO `jsh_organization` VALUES ('12', '001', '测试机构', null, '2', 'aaaa2', '2019-12-28 12:13:01', '2019-12-28 12:13:01', '63', '0');
+INSERT INTO `jsh_organization` VALUES ('13', 'jg1', '机构1', '12', '3', '', '2020-07-21 00:09:57', '2020-07-21 00:10:22', '63', '0');
+INSERT INTO `jsh_organization` VALUES ('14', '12', '机构2', '13', '4', '', '2020-07-21 22:45:42', '2021-02-15 22:18:30', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_orga_user_rel
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_orga_user_rel`;
+CREATE TABLE `jsh_orga_user_rel` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `orga_id` bigint(20) NOT NULL COMMENT '机构id',
+ `user_id` bigint(20) NOT NULL COMMENT '用户id',
+ `user_blng_orga_dspl_seq` varchar(20) DEFAULT NULL COMMENT '用户在所属机构中显示顺序',
+ `delete_flag` char(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `creator` bigint(20) DEFAULT NULL COMMENT '创建人',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='机构用户关系表';
+
+-- ----------------------------
+-- Records of jsh_orga_user_rel
+-- ----------------------------
+INSERT INTO `jsh_orga_user_rel` VALUES ('10', '13', '131', '2', '0', '2019-12-28 12:13:15', '63', '2021-03-18 22:33:19', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('11', '12', '63', '15', '0', '2020-09-13 18:42:45', '63', '2021-03-19 00:11:40', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('12', '13', '135', '9', '0', '2021-03-18 22:24:25', '63', '2021-03-19 00:09:23', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('13', '13', '134', '1', '0', '2021-03-18 22:31:39', '63', '2021-03-18 23:59:55', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('14', '22', '133', '22', '0', '2021-03-18 22:31:44', '63', '2021-03-18 22:32:04', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('15', '12', '144', null, '0', '2021-03-19 00:00:40', '63', '2021-03-19 00:08:07', '63', '63');
+INSERT INTO `jsh_orga_user_rel` VALUES ('16', '12', '145', null, '0', '2021-03-19 00:03:44', '63', '2021-03-19 00:03:44', '63', '63');
+
+-- ----------------------------
+-- Table structure for jsh_person
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_person`;
+CREATE TABLE `jsh_person` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `type` varchar(20) DEFAULT NULL COMMENT '类型',
+ `name` varchar(50) DEFAULT NULL COMMENT '姓名',
+ `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+ `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='经手人表';
+
+-- ----------------------------
+-- Records of jsh_person
+-- ----------------------------
+INSERT INTO `jsh_person` VALUES ('14', '业务员', '小李', '', null, '63', '0');
+INSERT INTO `jsh_person` VALUES ('15', '仓管员', '小军', '', null, '63', '0');
+INSERT INTO `jsh_person` VALUES ('16', '财务员', '小夏', '', null, '63', '0');
+INSERT INTO `jsh_person` VALUES ('17', '财务员', '小曹', '', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_platform_config
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_platform_config`;
+CREATE TABLE `jsh_platform_config` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `platform_key` varchar(100) DEFAULT NULL COMMENT '关键词',
+ `platform_key_info` varchar(100) DEFAULT NULL COMMENT '关键词名称',
+ `platform_value` varchar(200) DEFAULT NULL COMMENT '值',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='平台参数';
+
+-- ----------------------------
+-- Records of jsh_platform_config
+-- ----------------------------
+INSERT INTO `jsh_platform_config` VALUES ('1', 'platform_name', '平台名称', '华夏ERP');
+INSERT INTO `jsh_platform_config` VALUES ('2', 'activation_code', '激活码', '');
+INSERT INTO `jsh_platform_config` VALUES ('3', 'platform_url', '官方网站', 'http://www.huaxiaerp.com/');
+INSERT INTO `jsh_platform_config` VALUES ('4', 'bill_print_flag', '三联打印启用标记', '0');
+INSERT INTO `jsh_platform_config` VALUES ('5', 'bill_print_url', '三联打印地址', '');
+INSERT INTO `jsh_platform_config` VALUES ('6', 'pay_fee_url', '租户续费地址', '');
+INSERT INTO `jsh_platform_config` VALUES ('7', 'register_flag', '注册启用标记', '1');
+INSERT INTO `jsh_platform_config` VALUES ('8', 'app_activation_code', '手机端激活码', '');
+INSERT INTO `jsh_platform_config` VALUES ('9', 'send_workflow_url', '发起流程地址', '');
+INSERT INTO `jsh_platform_config` VALUES ('10', 'weixinUrl', '微信url', '');
+INSERT INTO `jsh_platform_config` VALUES ('11', 'weixinAppid', '微信appid', '');
+INSERT INTO `jsh_platform_config` VALUES ('12', 'weixinSecret', '微信secret', '');
+INSERT INTO `jsh_platform_config` VALUES ('13', 'aliOss_endpoint', '阿里OSS-endpoint', '');
+INSERT INTO `jsh_platform_config` VALUES ('14', 'aliOss_accessKeyId', '阿里OSS-accessKeyId', '');
+INSERT INTO `jsh_platform_config` VALUES ('15', 'aliOss_accessKeySecret', '阿里OSS-accessKeySecret', '');
+INSERT INTO `jsh_platform_config` VALUES ('16', 'aliOss_bucketName', '阿里OSS-bucketName', '');
+INSERT INTO `jsh_platform_config` VALUES ('17', 'aliOss_linkUrl', '阿里OSS-linkUrl', '');
+INSERT INTO `jsh_platform_config` VALUES ('18', 'bill_excel_url', '单据Excel地址', '');
+
+-- ----------------------------
+-- Table structure for jsh_role
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_role`;
+CREATE TABLE `jsh_role` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(50) DEFAULT NULL COMMENT '名称',
+ `type` varchar(50) DEFAULT NULL COMMENT '类型',
+ `price_limit` varchar(50) DEFAULT NULL COMMENT '价格屏蔽 1-屏蔽采购价 2-屏蔽零售价 3-屏蔽销售价',
+ `value` varchar(200) DEFAULT NULL COMMENT '值',
+ `description` varchar(100) DEFAULT NULL COMMENT '描述',
+ `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+ `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COMMENT='角色表';
+
+-- ----------------------------
+-- Records of jsh_role
+-- ----------------------------
+INSERT INTO `jsh_role` VALUES ('4', '管理员', '全部数据', null, null, null, '', null, null, '0');
+INSERT INTO `jsh_role` VALUES ('10', '租户', '全部数据', null, null, '', '', null, null, '0');
+INSERT INTO `jsh_role` VALUES ('16', '销售经理', '全部数据', null, null, 'ddd', '', null, '63', '0');
+INSERT INTO `jsh_role` VALUES ('17', '销售代表', '个人数据', null, null, 'rrr', '', null, '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_sequence
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_sequence`;
+CREATE TABLE `jsh_sequence` (
+ `seq_name` varchar(50) NOT NULL COMMENT '序列名称',
+ `min_value` bigint(20) NOT NULL COMMENT '最小值',
+ `max_value` bigint(20) NOT NULL COMMENT '最大值',
+ `current_val` bigint(20) NOT NULL COMMENT '当前值',
+ `increment_val` int(11) NOT NULL DEFAULT '1' COMMENT '增长步数',
+ `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+ PRIMARY KEY (`seq_name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='单据编号表';
+
+-- ----------------------------
+-- Records of jsh_sequence
+-- ----------------------------
+INSERT INTO `jsh_sequence` VALUES ('depot_number_seq', '1', '999999999999999999', '660', '1', '单据编号sequence');
+
+-- ----------------------------
+-- Table structure for jsh_serial_number
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_serial_number`;
+CREATE TABLE `jsh_serial_number` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `material_id` bigint(20) DEFAULT NULL COMMENT '产品表id',
+ `depot_id` bigint(20) DEFAULT NULL COMMENT '仓库id',
+ `serial_number` varchar(64) DEFAULT NULL COMMENT '序列号',
+ `is_sell` varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出',
+ `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `creator` bigint(20) DEFAULT NULL COMMENT '创建人',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
+ `in_bill_no` varchar(50) DEFAULT NULL COMMENT '入库单号',
+ `out_bill_no` varchar(50) DEFAULT NULL COMMENT '出库单号',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COMMENT='序列号表';
+
+-- ----------------------------
+-- Records of jsh_serial_number
+-- ----------------------------
+INSERT INTO `jsh_serial_number` VALUES ('105', '586', '14', '12312323423223', '0', 'abab', '0', '2019-12-28 12:14:39', '63', '2020-07-21 00:30:32', '63', null, null, '63');
+INSERT INTO `jsh_serial_number` VALUES ('108', '586', '14', '3215952626621201', '0', '', '0', '2020-07-21 00:31:02', '63', '2020-07-21 00:31:02', '63', null, null, '63');
+INSERT INTO `jsh_serial_number` VALUES ('109', '586', '14', '3215952626621202', '0', '', '0', '2020-07-21 00:31:02', '63', '2020-07-21 00:31:02', '63', null, null, '63');
+
+-- ----------------------------
+-- Table structure for jsh_supplier
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_supplier`;
+CREATE TABLE `jsh_supplier` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `supplier` varchar(255) NOT NULL COMMENT '供应商名称',
+ `contacts` varchar(100) DEFAULT NULL COMMENT '联系人',
+ `phone_num` varchar(30) DEFAULT NULL COMMENT '联系电话',
+ `email` varchar(50) DEFAULT NULL COMMENT '电子邮箱',
+ `description` varchar(500) DEFAULT NULL COMMENT '备注',
+ `isystem` tinyint(4) DEFAULT NULL COMMENT '是否系统自带 0==系统 1==非系统',
+ `type` varchar(20) DEFAULT NULL COMMENT '类型',
+ `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+ `advance_in` decimal(24,6) DEFAULT '0.000000' COMMENT '预收款',
+ `begin_need_get` decimal(24,6) DEFAULT NULL COMMENT '期初应收',
+ `begin_need_pay` decimal(24,6) DEFAULT NULL COMMENT '期初应付',
+ `all_need_get` decimal(24,6) DEFAULT NULL COMMENT '累计应收',
+ `all_need_pay` decimal(24,6) DEFAULT NULL COMMENT '累计应付',
+ `fax` varchar(30) DEFAULT NULL COMMENT '传真',
+ `telephone` varchar(30) DEFAULT NULL COMMENT '手机',
+ `address` varchar(50) DEFAULT NULL COMMENT '地址',
+ `tax_num` varchar(50) DEFAULT NULL COMMENT '纳税人识别号',
+ `bank_name` varchar(50) DEFAULT NULL COMMENT '开户行',
+ `account_number` varchar(50) DEFAULT NULL COMMENT '账号',
+ `tax_rate` decimal(24,6) DEFAULT NULL COMMENT '税率',
+ `sort` varchar(10) DEFAULT NULL COMMENT '排序',
+ `creator` bigint(20) DEFAULT NULL COMMENT '操作员',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8 COMMENT='供应商/客户信息表';
+
+-- ----------------------------
+-- Records of jsh_supplier
+-- ----------------------------
+INSERT INTO `jsh_supplier` VALUES ('57', '供应商1', '小军', '12345678', '', '', null, '供应商', '', '0.000000', '0.000000', '0.000000', '0.000000', '4.000000', '', '15000000000', '地址1', '', '', '', '12.000000', null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('58', '客户1', '小李', '12345678', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '-100.000000', null, '', '', '', '', '', '', '12.000000', null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('59', '客户2', '小陈', '', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '0.000000', null, '', '', '', '', '', '', null, null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('60', '12312666', '小曹', '', '', '', null, '会员', '', '970.000000', '0.000000', '0.000000', null, null, '', '13000000000', '', '', '', '', null, null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('68', '供应商3', '晓丽', '12345678', '', 'fasdfadf', null, '供应商', '', '0.000000', '0.000000', '0.000000', '0.000000', '-35.000000', '', '13000000000', 'aaaa', '1341324', '', '', '13.000000', null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('71', '客户3', '小周', '', '', '', null, '客户', '', '0.000000', '0.000000', '0.000000', '0.000000', null, '', '', '', '', '', '', null, null, '63', '63', '0');
+INSERT INTO `jsh_supplier` VALUES ('74', '供应商5', '小季', '77779999', '', '', null, '供应商', '', '0.000000', '0.000000', '5.000000', '0.000000', '5.000000', '', '15806283912', '', '', '', '', '3.000000', null, '63', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_system_config
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_system_config`;
+CREATE TABLE `jsh_system_config` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `company_name` varchar(50) DEFAULT NULL COMMENT '公司名称',
+ `company_contacts` varchar(20) DEFAULT NULL COMMENT '公司联系人',
+ `company_address` varchar(50) DEFAULT NULL COMMENT '公司地址',
+ `company_tel` varchar(20) DEFAULT NULL COMMENT '公司电话',
+ `company_fax` varchar(20) DEFAULT NULL COMMENT '公司传真',
+ `company_post_code` varchar(20) DEFAULT NULL COMMENT '公司邮编',
+ `sale_agreement` varchar(500) DEFAULT NULL COMMENT '销售协议',
+ `depot_flag` varchar(1) DEFAULT '0' COMMENT '仓库启用标记,0未启用,1启用',
+ `customer_flag` varchar(1) DEFAULT '0' COMMENT '客户启用标记,0未启用,1启用',
+ `minus_stock_flag` varchar(1) DEFAULT '0' COMMENT '负库存启用标记,0未启用,1启用',
+ `purchase_by_sale_flag` varchar(1) DEFAULT '0' COMMENT '以销定购启用标记,0未启用,1启用',
+ `multi_level_approval_flag` varchar(1) DEFAULT '0' COMMENT '多级审核启用标记,0未启用,1启用',
+ `multi_bill_type` varchar(200) DEFAULT NULL COMMENT '流程类型,可多选',
+ `force_approval_flag` varchar(1) DEFAULT '0' COMMENT '强审核启用标记,0未启用,1启用',
+ `update_unit_price_flag` varchar(1) DEFAULT '1' COMMENT '更新单价启用标记,0未启用,1启用',
+ `over_link_bill_flag` varchar(1) DEFAULT '0' COMMENT '超出关联单据启用标记,0未启用,1启用',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统参数';
+
+-- ----------------------------
+-- Records of jsh_system_config
+-- ----------------------------
+INSERT INTO `jsh_system_config` VALUES ('11', '公司test', '小李', '地址1', '12345678', null, null, '注:本单为我公司与客户约定账期内结款的依据,由客户或其单位员工签字生效,并承担法律责任。', '0', '0', '1', '0', '0', '', '0', '1', '0', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_tenant
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_tenant`;
+CREATE TABLE `jsh_tenant` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '用户id',
+ `login_name` varchar(255) DEFAULT NULL COMMENT '登录名',
+ `user_num_limit` int(11) DEFAULT NULL COMMENT '用户数量限制',
+ `type` varchar(1) DEFAULT '0' COMMENT '租户类型,0免费租户,1付费租户',
+ `enabled` bit(1) DEFAULT b'1' COMMENT '启用 0-禁用 1-启用',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `expire_time` datetime DEFAULT NULL COMMENT '到期时间',
+ `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='租户';
+
+-- ----------------------------
+-- Records of jsh_tenant
+-- ----------------------------
+INSERT INTO `jsh_tenant` VALUES ('13', '63', 'jsh', '2000', '1', '', '2021-02-17 23:19:17', '2099-02-17 23:19:17', null);
+
+-- ----------------------------
+-- Table structure for jsh_unit
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_unit`;
+CREATE TABLE `jsh_unit` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(50) DEFAULT NULL COMMENT '名称,支持多单位',
+ `basic_unit` varchar(50) DEFAULT NULL COMMENT '基础单位',
+ `other_unit` varchar(50) DEFAULT NULL COMMENT '副单位',
+ `other_unit_two` varchar(50) DEFAULT NULL COMMENT '副单位2',
+ `other_unit_three` varchar(50) DEFAULT NULL COMMENT '副单位3',
+ `ratio` decimal(24,3) DEFAULT NULL COMMENT '比例',
+ `ratio_two` decimal(24,3) DEFAULT NULL COMMENT '比例2',
+ `ratio_three` decimal(24,3) DEFAULT NULL COMMENT '比例3',
+ `enabled` bit(1) DEFAULT NULL COMMENT '启用',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 COMMENT='多单位表';
+
+-- ----------------------------
+-- Records of jsh_unit
+-- ----------------------------
+INSERT INTO `jsh_unit` VALUES ('15', '个/(箱=12个)', '个', '箱', null, null, '12.000', null, null, '', '63', '0');
+INSERT INTO `jsh_unit` VALUES ('19', '个/(盒=15个)', '个', '盒', null, null, '15.000', null, null, '', '63', '0');
+INSERT INTO `jsh_unit` VALUES ('20', '盒/(箱=8盒)', '盒', '箱', null, null, '8.000', null, null, '', '63', '0');
+INSERT INTO `jsh_unit` VALUES ('21', '瓶/(箱=12瓶)', '瓶', '箱', null, null, '12.000', null, null, '', '63', '0');
+
+-- ----------------------------
+-- Table structure for jsh_user
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_user`;
+CREATE TABLE `jsh_user` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `username` varchar(255) NOT NULL COMMENT '用户姓名--例如张三',
+ `login_name` varchar(255) NOT NULL COMMENT '登录用户名',
+ `password` varchar(50) DEFAULT NULL COMMENT '登陆密码',
+ `leader_flag` varchar(1) DEFAULT '0' COMMENT '是否经理,0否,1是',
+ `position` varchar(200) DEFAULT NULL COMMENT '职位',
+ `department` varchar(255) DEFAULT NULL COMMENT '所属部门',
+ `email` varchar(100) DEFAULT NULL COMMENT '电子邮箱',
+ `phonenum` varchar(100) DEFAULT NULL COMMENT '手机号码',
+ `ismanager` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否为管理者 0==管理者 1==员工',
+ `isystem` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否系统自带数据 ',
+ `Status` tinyint(4) DEFAULT '0' COMMENT '状态,0:正常,1:删除,2封禁',
+ `description` varchar(500) DEFAULT NULL COMMENT '用户描述信息',
+ `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+ `weixin_open_id` varchar(100) DEFAULT NULL COMMENT '微信绑定',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=utf8 COMMENT='用户表';
+
+-- ----------------------------
+-- Records of jsh_user
+-- ----------------------------
+INSERT INTO `jsh_user` VALUES ('63', '测试用户', 'jsh', 'e10adc3949ba59abbe56e057f20f883e', '0', '主管', null, '666666@qq.com', '1123123123132', '1', '1', '0', '', null, null, '63');
+INSERT INTO `jsh_user` VALUES ('120', '管理员', 'admin', 'e10adc3949ba59abbe56e057f20f883e', '0', null, null, null, null, '1', '0', '0', null, null, null, '0');
+INSERT INTO `jsh_user` VALUES ('131', 'test123', 'test123', 'e10adc3949ba59abbe56e057f20f883e', '0', '总监', null, '7777777@qq.com', '', '1', '0', '0', '', null, null, '63');
+
+-- ----------------------------
+-- Table structure for jsh_user_business
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_user_business`;
+CREATE TABLE `jsh_user_business` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `type` varchar(50) DEFAULT NULL COMMENT '类别',
+ `key_id` varchar(50) DEFAULT NULL COMMENT '主id',
+ `value` varchar(10000) DEFAULT NULL COMMENT '值',
+ `btn_str` varchar(2000) DEFAULT NULL COMMENT '按钮权限',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8 COMMENT='用户/角色/模块关系表';
+
+-- ----------------------------
+-- Records of jsh_user_business
+-- ----------------------------
+INSERT INTO `jsh_user_business` VALUES ('5', 'RoleFunctions', '4', '[210][225][211][241][32][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][207][208][209][226][227][228][229][59][235][237][244][22][21][23][220][240][247][25][24][217][218][26][194][195][31][13][1][14][243][15][234][16][18][236][245][248][198][258][259]', '[{\"funId\":13,\"btnStr\":\"1\"},{\"funId\":14,\"btnStr\":\"1\"},{\"funId\":243,\"btnStr\":\"1\"},{\"funId\":234,\"btnStr\":\"1\"},{\"funId\":16,\"btnStr\":\"1\"},{\"funId\":18,\"btnStr\":\"1\"},{\"funId\":236,\"btnStr\":\"1\"},{\"funId\":245,\"btnStr\":\"1\"},{\"funId\":22,\"btnStr\":\"1\"},{\"funId\":23,\"btnStr\":\"1\"},{\"funId\":220,\"btnStr\":\"1\"},{\"funId\":240,\"btnStr\":\"1\"},{\"funId\":247,\"btnStr\":\"1\"},{\"funId\":25,\"btnStr\":\"1\"},{\"funId\":217,\"btnStr\":\"1\"},{\"funId\":218,\"btnStr\":\"1\"},{\"funId\":26,\"btnStr\":\"1\"},{\"funId\":194,\"btnStr\":\"1\"},{\"funId\":195,\"btnStr\":\"1\"},{\"funId\":31,\"btnStr\":\"1\"},{\"funId\":241,\"btnStr\":\"1,2,7\"},{\"funId\":33,\"btnStr\":\"1,2,7\"},{\"funId\":199,\"btnStr\":\"1,2,7\"},{\"funId\":242,\"btnStr\":\"1,2,7\"},{\"funId\":41,\"btnStr\":\"1,2,7\"},{\"funId\":200,\"btnStr\":\"1,2,7\"},{\"funId\":210,\"btnStr\":\"1,2,7\"},{\"funId\":211,\"btnStr\":\"1,2,7\"},{\"funId\":197,\"btnStr\":\"1,7,2\"},{\"funId\":203,\"btnStr\":\"1,7,2\"},{\"funId\":204,\"btnStr\":\"1,7,2\"},{\"funId\":205,\"btnStr\":\"1,7,2\"},{\"funId\":206,\"btnStr\":\"1,2,7\"},{\"funId\":212,\"btnStr\":\"1,7,2\"},{\"funId\":201,\"btnStr\":\"1,2,7\"},{\"funId\":202,\"btnStr\":\"1,2,7\"},{\"funId\":40,\"btnStr\":\"1,2,7\"},{\"funId\":232,\"btnStr\":\"1,2,7\"},{\"funId\":233,\"btnStr\":\"1,2,7\"}]', null, '0');
+INSERT INTO `jsh_user_business` VALUES ('6', 'RoleFunctions', '5', '[22][23][25][26][194][195][31][33][200][201][41][199][202]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('7', 'RoleFunctions', '6', '[22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]', '[{\"funId\":\"33\",\"btnStr\":\"4\"}]', null, '0');
+INSERT INTO `jsh_user_business` VALUES ('9', 'RoleFunctions', '7', '[168][13][12][16][14][15][189][18][19][132]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('10', 'RoleFunctions', '8', '[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][247]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('11', 'RoleFunctions', '9', '[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][188]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('12', 'UserRole', '1', '[5]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('13', 'UserRole', '2', '[6][7]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('14', 'UserDepot', '2', '[1][2][6][7]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('15', 'UserDepot', '1', '[1][2][5][6][7][10][12][14][15][17]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('16', 'UserRole', '63', '[10]', null, '63', '0');
+INSERT INTO `jsh_user_business` VALUES ('18', 'UserDepot', '63', '[14][15]', null, '63', '0');
+INSERT INTO `jsh_user_business` VALUES ('19', 'UserDepot', '5', '[6][45][46][50]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('20', 'UserRole', '5', '[5]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('21', 'UserRole', '64', '[13]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('22', 'UserDepot', '64', '[1]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('23', 'UserRole', '65', '[5]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('24', 'UserDepot', '65', '[1]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('25', 'UserCustomer', '64', '[5][2]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('26', 'UserCustomer', '65', '[6]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('27', 'UserCustomer', '63', '[58]', null, '63', '0');
+INSERT INTO `jsh_user_business` VALUES ('28', 'UserDepot', '96', '[7]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('29', 'UserRole', '96', '[6]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('30', 'UserRole', '113', '[10]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('32', 'RoleFunctions', '10', '[210][225][211][241][32][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][207][208][209][226][227][228][229][59][235][237][244][22][21][23][220][240][247][25][24][217][218][26][194][195][31][13][14][243][15][234][248][198][259]', '[{\"funId\":13,\"btnStr\":\"1\"},{\"funId\":14,\"btnStr\":\"1\"},{\"funId\":243,\"btnStr\":\"1\"},{\"funId\":234,\"btnStr\":\"1\"},{\"funId\":22,\"btnStr\":\"1\"},{\"funId\":23,\"btnStr\":\"1\"},{\"funId\":220,\"btnStr\":\"1\"},{\"funId\":240,\"btnStr\":\"1\"},{\"funId\":247,\"btnStr\":\"1\"},{\"funId\":25,\"btnStr\":\"1\"},{\"funId\":217,\"btnStr\":\"1\"},{\"funId\":218,\"btnStr\":\"1\"},{\"funId\":26,\"btnStr\":\"1\"},{\"funId\":194,\"btnStr\":\"1\"},{\"funId\":195,\"btnStr\":\"1\"},{\"funId\":31,\"btnStr\":\"1\"},{\"funId\":241,\"btnStr\":\"1,2,7\"},{\"funId\":33,\"btnStr\":\"1,2,7\"},{\"funId\":199,\"btnStr\":\"1,7,2\"},{\"funId\":242,\"btnStr\":\"1,2,7\"},{\"funId\":41,\"btnStr\":\"1,2,7\"},{\"funId\":200,\"btnStr\":\"1,2,7\"},{\"funId\":210,\"btnStr\":\"1,2,7\"},{\"funId\":211,\"btnStr\":\"1,2,7\"},{\"funId\":197,\"btnStr\":\"1,2,7\"},{\"funId\":203,\"btnStr\":\"1,7,2\"},{\"funId\":204,\"btnStr\":\"1,7,2\"},{\"funId\":205,\"btnStr\":\"1,2,7\"},{\"funId\":206,\"btnStr\":\"1,7,2\"},{\"funId\":212,\"btnStr\":\"1,2,7\"},{\"funId\":201,\"btnStr\":\"1,2,7\"},{\"funId\":202,\"btnStr\":\"1,2,7\"},{\"funId\":40,\"btnStr\":\"1,2,7\"},{\"funId\":232,\"btnStr\":\"1,2,7\"},{\"funId\":233,\"btnStr\":\"1,2,7\"}]', null, '0');
+INSERT INTO `jsh_user_business` VALUES ('34', 'UserRole', '115', '[10]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('35', 'UserRole', '117', '[10]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('36', 'UserDepot', '117', '[8][9]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('37', 'UserCustomer', '117', '[52]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('38', 'UserRole', '120', '[4]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('41', 'RoleFunctions', '12', '', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('48', 'RoleFunctions', '13', '[59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('51', 'UserRole', '74', '[10]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('52', 'UserDepot', '121', '[13]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('54', 'UserDepot', '115', '[13]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('56', 'UserCustomer', '115', '[56]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('57', 'UserCustomer', '121', '[56]', null, null, '0');
+INSERT INTO `jsh_user_business` VALUES ('67', 'UserRole', '131', '[17]', null, '63', '0');
+INSERT INTO `jsh_user_business` VALUES ('68', 'RoleFunctions', '16', '[210]', null, '63', '0');
+INSERT INTO `jsh_user_business` VALUES ('69', 'RoleFunctions', '17', '[210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]', '[{\"funId\":\"241\",\"btnStr\":\"1,2\"},{\"funId\":\"33\",\"btnStr\":\"1,2\"},{\"funId\":\"199\",\"btnStr\":\"1,2\"},{\"funId\":\"242\",\"btnStr\":\"1,2\"},{\"funId\":\"41\",\"btnStr\":\"1,2\"},{\"funId\":\"200\",\"btnStr\":\"1,2\"},{\"funId\":\"210\",\"btnStr\":\"1,2\"},{\"funId\":\"211\",\"btnStr\":\"1,2\"},{\"funId\":\"197\",\"btnStr\":\"1\"},{\"funId\":\"203\",\"btnStr\":\"1\"},{\"funId\":\"204\",\"btnStr\":\"1\"},{\"funId\":\"205\",\"btnStr\":\"1\"},{\"funId\":\"206\",\"btnStr\":\"1\"},{\"funId\":\"212\",\"btnStr\":\"1\"},{\"funId\":\"201\",\"btnStr\":\"1,2\"},{\"funId\":\"202\",\"btnStr\":\"1,2\"},{\"funId\":\"40\",\"btnStr\":\"1,2\"},{\"funId\":\"232\",\"btnStr\":\"1,2\"},{\"funId\":\"233\",\"btnStr\":\"1,2\"}]', '63', '0');
diff --git "a/docs/\346\225\260\346\215\256\345\272\223\346\233\264\346\226\260\350\256\260\345\275\225-\351\246\226\346\254\241\345\256\211\350\243\205\350\257\267\345\213\277\344\275\277\347\224\250.txt" "b/docs/\346\225\260\346\215\256\345\272\223\346\233\264\346\226\260\350\256\260\345\275\225-\351\246\226\346\254\241\345\256\211\350\243\205\350\257\267\345\213\277\344\275\277\347\224\250.txt"
new file mode 100644
index 00000000..d6d815c0
--- /dev/null
+++ "b/docs/\346\225\260\346\215\256\345\272\223\346\233\264\346\226\260\350\256\260\345\275\225-\351\246\226\346\254\241\345\256\211\350\243\205\350\257\267\345\213\277\344\275\277\347\224\250.txt"
@@ -0,0 +1,1527 @@
+---------------------------------------------------------------------------------------------------
+****注意第一次初始化数据库不需要执行下面的内容,该文档会随着代码更新持续更新,方便大家手动升级数据库****
+****注意第一次初始化数据库不需要执行下面的内容,该文档会随着代码更新持续更新,方便大家手动升级数据库****
+****注意第一次初始化数据库不需要执行下面的内容,该文档会随着代码更新持续更新,方便大家手动升级数据库****
+---------------------------------------------------------------------------------------------------
+
+
+-- ----------------------------
+-- 时间:2019年1月21日
+-- version:1.0.0
+-- 此次更新添加序列号功能
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+
+-- ----------------------------
+-- 添加序列号表
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_serial_number`;
+CREATE TABLE `jsh_serial_number` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `material_Id` bigint(20) DEFAULT NULL COMMENT '产品表id',
+ `serial_Number` varchar(64) DEFAULT NULL COMMENT '序列号',
+ `is_Sell` bit(1) DEFAULT 0 COMMENT '是否卖出,0未卖出,1卖出',
+ `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+ `delete_Flag` bit(1) DEFAULT 0 COMMENT '删除标记,0未删除,1删除',
+ `create_Time` datetime DEFAULT NULL COMMENT '创建时间',
+ `creator` bigint(20) DEFAULT NULL COMMENT '创建人',
+ `update_Time` datetime DEFAULT NULL COMMENT '更新时间',
+ `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
+ PRIMARY KEY (`Id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='序列号表';
+
+-- ----------------------------
+-- 产品表新增字段是否启用序列号
+-- ----------------------------
+alter table jsh_material add enableSerialNumber bit(1) DEFAULT 0 COMMENT '是否开启序列号,0否,1是';
+-- ----------------------------
+-- 时间:2019年1月24日
+-- version:1.0.1
+-- 此次更新添加序列号菜单
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 添加序列号菜单
+-- ----------------------------
+delete from `jsh_functions` where Name='序列号';
+INSERT INTO `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`) VALUES ('010104', '序列号', '0101', '../manage/serialNumber.html', b'0', '0246', b'1', '电脑版', '');
+-- ----------------------------
+-- 删除单据主表供应商id字段对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_depot_head DROP FOREIGN KEY jsh_depot_head_ibfk_3;
+-- ----------------------------
+-- 序列号表添加单据主表id字段,用于跟踪序列号流向
+-- ----------------------------
+alter table jsh_serial_number add depothead_Id bigint(20) DEFAULT null COMMENT '单据主表id,用于跟踪序列号流向';
+-- ----------------------------
+-- 修改商品表enableSerialNumber字段类型为varchar(1)
+-- ----------------------------
+alter table jsh_material change enableSerialNumber enableSerialNumber varchar(1) DEFAULT '0' COMMENT '是否开启序列号,0否,1是';
+-- ----------------------------
+-- 修改序列号表is_Sell字段类型为varchar(1)
+-- 修改序列号表delete_Flag字段类型为varchar(1)
+-- ----------------------------
+alter table jsh_serial_number change is_Sell is_Sell varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出';
+alter table jsh_serial_number change delete_Flag delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- ----------------------------
+-- 删除单据子表单据主表id字段对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_depot_item DROP FOREIGN KEY jsh_depot_item_ibfk_1;
+-- ----------------------------
+-- 时间:2019年2月1日
+-- version:1.0.2
+-- 此次更新添加sequence表,用于获取一个唯一的数值
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 添加表tbl_sequence
+-- ----------------------------
+DROP TABLE IF EXISTS `tbl_sequence`;
+CREATE TABLE tbl_sequence (
+ seq_name VARCHAR(50) NOT NULL COMMENT '序列名称',
+ min_value bigint(20) NOT NULL COMMENT '最小值',
+ max_value bigint(20) NOT NULL COMMENT '最大值',
+ current_val bigint(20) NOT NULL COMMENT '当前值',
+ increment_val INT DEFAULT '1' NOT NULL COMMENT '增长步数',
+ remark VARCHAR(500) DEFAULT null COMMENT '备注',
+ PRIMARY KEY (seq_name)
+ )ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='sequence表';
+
+-- ----------------------------
+-- 添加表单据编号sequence
+-- 插入数据前判断,防止数据重复插入
+-- ----------------------------
+insert into tbl_sequence (seq_name, min_value, max_value, current_val, increment_val,remark)
+select 'depot_number_seq', 1, 999999999999999999, 1, 1,'单据编号sequence' from dual where not exists
+(select * from tbl_sequence where seq_name='depot_number_seq');
+-- ----------------------------
+-- 创建function _nextval() 用于获取当前序列号
+-- ----------------------------
+DROP FUNCTION IF EXISTS `_nextval`;
+DELIMITER ;;
+CREATE FUNCTION `_nextval`(name varchar(50)) RETURNS mediumtext CHARSET utf8
+begin
+declare _cur bigint;
+declare _maxvalue bigint; -- 接收最大值
+declare _increment int; -- 接收增长步数
+set _increment = (select increment_val from tbl_sequence where seq_name = name);
+set _maxvalue = (select max_value from tbl_sequence where seq_name = name);
+set _cur = (select current_val from tbl_sequence where seq_name = name for update);
+update tbl_sequence -- 更新当前值
+ set current_val = _cur + increment_val
+ where seq_name = name ;
+if(_cur + _increment >= _maxvalue) then -- 判断是都达到最大值
+ update tbl_sequence
+ set current_val = minvalue
+ where seq_name = name ;
+end if;
+return _cur;
+end
+;;
+DELIMITER ;
+
+-- ----------------------------
+-- 时间:2019年2月18日
+-- version:1.0.3
+-- 此次更新修改产品类型表jsh_materialcategory,添加一些字段
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 产品类型表添加字段sort,显示顺序
+-- ----------------------------
+alter table jsh_materialcategory add sort varchar(10) DEFAULT null COMMENT '显示顺序';
+-- ----------------------------
+-- 产品类型表添加字段status,状态,0系统默认,1启用,2删除
+-- ----------------------------
+alter table jsh_materialcategory add status varchar(1) DEFAULT '0' COMMENT '状态,0系统默认,1启用,2删除';
+-- ----------------------------
+-- 产品类型表添加字段serial_no,编号
+-- ----------------------------
+alter table jsh_materialcategory add serial_no varchar(100) DEFAULT null COMMENT '编号';
+-- ----------------------------
+-- 产品类型表添加字段remark,备注
+-- ----------------------------
+alter table jsh_materialcategory add remark varchar(1024) DEFAULT null COMMENT '备注';
+-- ----------------------------
+-- 产品类型表添加字段create_time,创建时间
+-- ----------------------------
+alter table jsh_materialcategory add create_time datetime DEFAULT null COMMENT '创建时间';
+-- ----------------------------
+-- 产品类型表添加字段creator,创建人
+-- ----------------------------
+alter table jsh_materialcategory add creator bigint(20) DEFAULT null COMMENT '创建人';
+-- ----------------------------
+-- 产品类型表添加字段update_time,更新时间
+-- ----------------------------
+alter table jsh_materialcategory add update_time datetime DEFAULT null COMMENT '更新时间';
+-- ----------------------------
+-- 产品类型表添加字段updater,更新人
+-- ----------------------------
+alter table jsh_materialcategory add updater bigint(20) DEFAULT null COMMENT '更新人';
+
+-- ----------------------------
+-- 去掉jsh_materialcategory外键
+-- ----------------------------
+ALTER TABLE jsh_materialcategory DROP FOREIGN KEY FK3EE7F725237A77D8;
+
+-- ----------------------------
+-- 修改根目录父节点id为-1
+-- 设置根目录编号为1
+-- ----------------------------
+update jsh_materialcategory set ParentId='-1' where id='1';
+
+-- ----------------------------
+-- 删除礼品卡管理、礼品充值、礼品销售、礼品卡统计的功能数据
+-- ----------------------------
+delete from jsh_functions where id in (213,214,215,216);
+
+-- ----------------------------
+-- 新增采购订单、销售订单的功能数据
+-- 主键自增长,直接指定主键插入数据的方式可能会和本地数据冲突
+-- 插入数据前判断,防止数据重复插入
+-- ----------------------------
+insert into `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`)
+select '050202', '采购订单', '0502', '../materials/purchase_orders_list.html', b'0', '0335',b'1', '电脑版', '' from dual where not exists
+(select * from jsh_functions where Number='050202' and PNumber='0502');
+insert into `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`)
+select '060301', '销售订单', '0603', '../materials/sale_orders_list.html', b'0', '0392', b'1', '电脑版', '' from dual where not exists
+(select * from jsh_functions where Number='060301' and PNumber='0603');
+
+-- ----------------------------
+-- 改管理员的功能权限
+-- ----------------------------
+update jsh_userbusiness SET Type = 'RoleFunctions', KeyId = '4',
+Value = '[13][12][16][14][15][234][236][22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][242][33][199][243][41][200][201][202][40][232][233][197][203][204][205][206][212]'
+where Id = 5;
+
+-- ----------------------------
+-- 时间:2019年2月25日
+-- version:1.0.4
+-- 此次更新仓库添加负责人信息,负责人信息从用户表获取
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 仓库表添加字段principal,负责人
+-- ----------------------------
+alter table jsh_depot add principal bigint(20) DEFAULT null COMMENT '负责人';
+
+-- ----------------------------
+-- 时间:2019年3月6日
+-- version:1.0.5
+-- 此次更新
+-- 1、添加机构表
+-- 2、添加机构用户关系表
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- ----------------------------
+-- 添加机构表
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_organization`;
+CREATE TABLE `jsh_organization` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `org_no` varchar(20) DEFAULT NULL COMMENT '机构编号',
+ `org_full_name` varchar(500) DEFAULT NULL COMMENT '机构全称',
+ `org_abr` varchar(20) DEFAULT NULL COMMENT '机构简称',
+ `org_tpcd` varchar(9) DEFAULT NULL COMMENT '机构类型',
+ `org_stcd` char(1) DEFAULT NULL COMMENT '机构状态,1未营业、2正常营业、3暂停营业、4终止营业、5已除名',
+ `org_parent_no` varchar(20) DEFAULT NULL COMMENT '机构父节点编号',
+ `sort` varchar(20) DEFAULT NULL COMMENT '机构显示顺序',
+ remark VARCHAR(500) DEFAULT null COMMENT '备注',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `creator` bigint(20) DEFAULT NULL COMMENT '创建人',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
+ `org_create_time` datetime DEFAULT NULL COMMENT '机构创建时间',
+ `org_stop_time` datetime DEFAULT NULL COMMENT '机构停运时间',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='机构表';
+-- ----------------------------
+-- 添加机构用户关系表
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_orga_user_rel`;
+CREATE TABLE `jsh_orga_user_rel` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `orga_id` bigint(20) NOT NULL COMMENT '机构id',
+ `user_id` bigint(20) NOT NULL COMMENT '用户id',
+ `user_blng_orga_dspl_seq` varchar(20) DEFAULT NULL COMMENT '用户在所属机构中显示顺序',
+ `delete_flag` char(1) DEFAULT 0 COMMENT '删除标记,0未删除,1删除',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `creator` bigint(20) DEFAULT NULL COMMENT '创建人',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `updater` bigint(20) DEFAULT NULL COMMENT '更新人',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='机构用户关系表';
+-- ----------------------------
+-- 添加机构管理菜单
+-- 插入数据前判断,防止数据重复插入
+-- ----------------------------
+INSERT INTO `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`)
+select '000108', '机构管理', '0001', '../manage/organization.html', b'1', '0139', b'1', '电脑版', '' from dual where not exists
+(select * from jsh_functions where Number='000108' and PNumber='0001');
+-- ----------------------------
+-- 添加根机构
+-- 插入时判断对应数据是否存在,防止多次执行产生重复数据
+-- ----------------------------
+INSERT INTO jsh_organization (org_no, org_full_name, org_abr, org_tpcd, org_stcd, org_parent_no, sort, remark, create_time, creator, update_time, updater, org_create_time, org_stop_time)
+select '01', '根机构', '根机构', NULL, '2', '-1', '1', '根机构,初始化存在', NULL, NULL, NULL, NULL, NULL, NULL from dual where not exists
+(select * from jsh_organization where org_no='01' and org_abr='根机构' and org_parent_no='-1' );
+-- ----------------------------
+-- 时间:2019年3月9日
+-- version:1.0.6
+-- 此次更新
+-- 整改jsh_systemconfig表的字段
+-- ----------------------------
+alter table jsh_systemconfig drop type;
+alter table jsh_systemconfig drop name;
+alter table jsh_systemconfig drop value;
+alter table jsh_systemconfig drop description;
+alter table jsh_systemconfig add company_name varchar(50) DEFAULT null COMMENT '公司名称';
+alter table jsh_systemconfig add company_contacts varchar(20) DEFAULT null COMMENT '公司联系人';
+alter table jsh_systemconfig add company_address varchar(50) DEFAULT null COMMENT '公司地址';
+alter table jsh_systemconfig add company_tel varchar(20) DEFAULT null COMMENT '公司电话';
+alter table jsh_systemconfig add company_fax varchar(20) DEFAULT null COMMENT '公司传真';
+alter table jsh_systemconfig add company_post_code varchar(20) DEFAULT null COMMENT '公司邮编';
+delete from jsh_systemconfig;
+insert into jsh_systemconfig (`company_name`, `company_contacts`, `company_address`, `company_tel`, `company_fax`, `company_post_code`) values("南通jshERP公司","张三","南通市通州区某某路","0513-10101010","0513-18181818","226300");
+
+-- ----------------------------
+-- 时间:2019年3月9日
+-- version:1.0.7
+-- 改管理员的功能权限
+-- ----------------------------
+update jsh_userbusiness SET
+Value = '[13][12][16][243][14][15][234][236][22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]'
+where Id = 5;
+-- ----------------------------
+-- 给订单功能加审核和反审核的功能按钮权限
+-- ----------------------------
+update jsh_functions SET PushBtn = '3' where Number = '050202' and PNumber = '0502';
+update jsh_functions SET PushBtn = '3' where Number = '060301' and PNumber = '0603';
+-- ----------------------------
+-- 改管理员的按钮权限
+-- ----------------------------
+update jsh_userbusiness SET
+BtnStr = '[{"funId":"25","btnStr":"1"},{"funId":"217","btnStr":"1"},{"funId":"218","btnStr":"1"},{"funId":"241","btnStr":"3"},{"funId":"242","btnStr":"3"}]'
+where Id = 5;
+
+-- ----------------------------
+-- 时间:2019年3月10日
+-- version:1.0.8
+-- 改状态字段的类型,增加关联单据字段
+-- ----------------------------
+alter table jsh_depot_head change Status Status varchar(1) DEFAULT '0' COMMENT '状态,0未审核、1已审核、2已转采购|销售';
+alter table jsh_depot_head add `LinkNumber` varchar(50) DEFAULT null COMMENT '关联订单号';
+-- ----------------------------
+-- 时间:2019年3月12日
+-- version:1.0.9
+-- 此次更新
+-- 1、根据本地用户表中现有部门生成机构表数据,同时重建机构和用户的关联关系
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+DROP FUNCTION IF EXISTS `_buildOrgAndOrgUserRel`;
+DELIMITER ;;
+CREATE FUNCTION `_buildOrgAndOrgUserRel` (name varchar(50)) RETURNS mediumtext CHARSET utf8
+begin
+
+declare _org_full_name varchar(500); -- 机构全称
+declare _org_abr varchar(20); -- 机构简称
+declare _sort int default 0;
+declare _success_msg varchar(50) default '重建机构及机构用户关系成功'; -- 机构全称
+ -- 遍历数据结束标志
+declare done int DEFAULT 0;
+-- 获取用户表中唯一的部门信息列表
+declare orgCur cursor for select distinct department from jsh_user where department!='' and department is not null;
+
+ -- 将结束标志绑定到游标
+declare continue handler for not found set done = 1;
+ -- 循环部门信息列表在机构表插入数据
+ -- 打开游标
+ open orgCur;
+ -- 开始循环
+ read_loop: loop
+ -- 提取游标里的数据,这里只有一个,多个的话也一样;
+ fetch orgCur into _org_full_name;
+ -- 声明结束的时候
+ if done=1 then
+ leave read_loop;
+ end if;
+ -- 这里做你想做的循环的事件
+ if length(_org_full_name)<=20 then
+ set _org_abr=_org_full_name;
+ else
+ set _org_abr=left(_org_full_name,20);
+ end if;
+ set _sort=_sort+1;
+ insert into jsh_organization (org_full_name, org_abr, org_stcd, org_parent_no, sort, remark)
+ values (_org_full_name,_org_abr, '1', '01', _sort, '机构表初始化');
+ begin
+ declare _userId bigint;
+ declare _orgId bigint;
+ -- 遍历数据结束标志
+ declare ogrUserRelDone int DEFAULT 0;
+ -- 根据用户表和机构表部门关联关系,重建用户和机构关联关系
+ declare ogrUserRelCur cursor for select user.id as userId,org.id as orgId from jsh_user user,jsh_organization org
+ where 1=1 and user.department=org.org_full_name and user.department =_org_full_name;
+ -- 将结束标志绑定到游标
+ declare continue handler for not found set ogrUserRelDone = 1;
+ -- 打开游标
+ open ogrUserRelCur;
+ -- 开始循环
+ rel_read_loop: loop
+ -- 提取游标里的数据,这里只有一个,多个的话也一样;
+ fetch ogrUserRelCur into _userId,_orgId;
+ -- 声明结束的时候
+ if ogrUserRelDone=1 then
+ leave rel_read_loop;
+ end if;
+ insert into `jsh_orga_user_rel`(`orga_id`, `user_id`, `delete_flag`) VALUES (_orgId,_userId,'0');
+
+ end loop rel_read_loop;
+ -- 关闭游标
+ close ogrUserRelCur;
+ end;
+
+ end loop read_loop;
+ -- 关闭游标
+ close orgCur;
+
+-- 清空用户表中的部门信息
+update jsh_user set department=null;
+
+return _success_msg;
+end
+;;
+DELIMITER ;
+-- ----------------------------
+-- 初始化机构数据,重建机构用户关系
+-- ----------------------------
+select _buildOrgAndOrgUserRel('初始化机构数据,重建机构用户关系') from dual;
+-- ----------------------------
+-- 删除一次性函数
+-- ----------------------------
+DROP FUNCTION _buildOrgAndOrgUserRel;
+
+-- ----------------------------
+-- 时间:2019年3月13日
+-- version:1.0.10
+-- 此次更新
+-- 1、设置用户表的用户状态status默认值为0
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+
+alter table jsh_user change Status Status tinyint(4) DEFAULT '0' COMMENT '状态,0:正常,1:删除,2封禁';
+update jsh_user set status='0' where status is null;
+-- ----------------------------
+-- 设置根目录编号为1
+-- ----------------------------
+update jsh_materialcategory set serial_no='1' where id='1';
+
+-- ----------------------------
+-- 时间:2019年3月18日
+-- version:1.0.11
+-- 此次更新
+-- 1、批量增加大部分表的tenant_id租户字段
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+alter table jsh_account add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_accounthead add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_accountitem add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_asset add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_assetcategory add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_assetname add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_depot add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_depot_head add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_depot_item add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_inoutitem add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_log add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_material add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_materialcategory add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_orga_user_rel add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_organization add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_person add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_role add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_serial_number add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_supplier add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_systemconfig add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_unit add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+alter table jsh_user add tenant_id bigint(20) DEFAULT null COMMENT '租户id';
+
+-- ----------------------------
+-- 时间:2019年3月27日
+-- version:1.0.12
+-- 此次更新
+-- 添加删除标记,将物理删除修改为逻辑删除
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+-- 角色表 jsh_role
+alter table jsh_role add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 用户 角色 模块关系表 jsh_userbusiness
+alter table jsh_userbusiness add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 功能模块表 jsh_functions
+alter table jsh_functions add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 应用表 jsh_app
+alter table jsh_app add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 产品表 jsh_material
+alter table jsh_material add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 产品扩展字段表 jsh_materialproperty
+alter table jsh_materialproperty add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 经手人表 jsh_person
+alter table jsh_person add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 供应商 客户信息表 jsh_supplier
+alter table jsh_supplier add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 系统参数表 jsh_systemconfig
+alter table jsh_systemconfig add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 多单位表 jsh_unit
+alter table jsh_unit add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 仓库表 jsh_depot
+alter table jsh_depot add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 账户信息表 jsh_account
+alter table jsh_account add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 财务主表 jsh_accounthead
+alter table jsh_accounthead add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 财务子表 jsh_accountitem
+alter table jsh_accountitem add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 资产记录表 jsh_asset
+alter table jsh_asset add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 资产类型表 jsh_assetcategory
+alter table jsh_assetcategory add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 资产信息表 jsh_assetname
+alter table jsh_assetname add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 单据主表 jsh_depot_head
+alter table jsh_depot_head add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 单据子表 jsh_depot_item
+alter table jsh_depot_item add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+-- 收支项目表 jsh_inoutitem
+alter table jsh_inoutitem add delete_Flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+-- ----------------------------
+-- 时间:2019年4月11日
+-- version:1.0.13
+-- 此次更新
+-- 删除所有外键
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+
+-- ----------------------------
+-- 删除财务主表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_accounthead DROP FOREIGN KEY FK9F4C0D8DAAE50527;
+ALTER TABLE jsh_accounthead DROP FOREIGN KEY FK9F4C0D8DB610FC06;
+ALTER TABLE jsh_accounthead DROP FOREIGN KEY FK9F4C0D8DC4170B37;
+-- ----------------------------
+-- 删除财务子表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_accountitem DROP FOREIGN KEY FK9F4CBAC0AAE50527;
+ALTER TABLE jsh_accountitem DROP FOREIGN KEY FK9F4CBAC0C5FE6007;
+ALTER TABLE jsh_accountitem DROP FOREIGN KEY FK9F4CBAC0D203EDC5;
+-- ----------------------------
+-- 删除资产记录表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_asset DROP FOREIGN KEY FK353690ED27D23FE4;
+ALTER TABLE jsh_asset DROP FOREIGN KEY FK353690ED3E226853;
+ALTER TABLE jsh_asset DROP FOREIGN KEY FK353690ED61FE182C;
+ALTER TABLE jsh_asset DROP FOREIGN KEY FK353690ED9B6CB285;
+ALTER TABLE jsh_asset DROP FOREIGN KEY FK353690EDAD45B659;
+-- ----------------------------
+-- 删除资产信息表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_assetname DROP FOREIGN KEY FKA4ADCCF866BC8AD3;
+-- ----------------------------
+-- 删除单据主表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_depot_head DROP FOREIGN KEY FK2A80F214AAE50527;
+ALTER TABLE jsh_depot_head DROP FOREIGN KEY jsh_depot_head_ibfk_1;
+ALTER TABLE jsh_depot_head DROP FOREIGN KEY jsh_depot_head_ibfk_4;
+ALTER TABLE jsh_depot_head DROP FOREIGN KEY jsh_depot_head_ibfk_5;
+-- ----------------------------
+-- 删除单据子表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_depot_item DROP FOREIGN KEY FK2A819F47729F5392;
+ALTER TABLE jsh_depot_item DROP FOREIGN KEY FK2A819F479485B3F5;
+ALTER TABLE jsh_depot_item DROP FOREIGN KEY jsh_depot_item_ibfk_2;
+-- ----------------------------
+-- 删除操作日志表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_log DROP FOREIGN KEY FKF2696AA13E226853;
+-- ----------------------------
+-- 删除产品表对应外键约束
+-- ----------------------------
+ALTER TABLE jsh_material DROP FOREIGN KEY FK675951272AB6672C;
+ALTER TABLE jsh_material DROP FOREIGN KEY jsh_material_ibfk_1;
+
+-- ----------------------------
+-- 时间:2019年4月30日
+-- version:1.0.14
+-- 此次更新
+-- 增加仓库默认功能 增加库存预警功能
+-- 特别提醒:之后的sql都是在之前基础上迭代,可以对已存在的系统进行数据保留更新
+-- ----------------------------
+alter table jsh_depot add is_default bit(1) DEFAULT NULL COMMENT '是否默认';
+insert into `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`)
+select '030112', '库存预警', '0301', '../reports/stock_warning_report.html', b'0', '0670', b'1', '电脑版', '' from dual where not exists
+(select * from jsh_functions where Number='030112' and PNumber='0301');
+
+-- ----------------------------
+-- 改管理员的功能权限
+-- ----------------------------
+update jsh_userbusiness SET Type = 'RoleFunctions', KeyId = '4',
+Value = '[13][12][16][243][14][15][234][236][22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][244][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]'
+where Id = 5;
+
+-- ----------------------------
+-- 给app的功能增加代号 在功能表增加个人信息
+-- ----------------------------
+update jsh_app SET Number = '02' where name='个人信息';
+insert into `jsh_functions`(`Number`, `Name`, `PNumber`, `URL`, `State`, `Sort`, `Enabled`, `Type`, `PushBtn`)
+select '02', '个人信息', '0', '', b'1', '0005', b'1', '电脑版', '' from dual where not exists
+(select * from jsh_functions where Number='02' and PNumber='0');
+
+-- ----------------------------
+-- 时间:2019年6月23日
+-- 增加新手引导模块
+-- ----------------------------
+INSERT INTO `jsh_app` VALUES ('28', '09', '新手引导', 'app', 'userHelp.png', '../user/userHelp.html', '1000', '500', '\0', '\0', '\0', 'dock', '210', '', '', '0');
+INSERT INTO `jsh_functions` VALUES ('246', '09', '新手引导', '0', '', '', '0115', '', '电脑版', '', '0');
+update jsh_userbusiness SET Value = '[3][6][7][22][23][24][25][26][27][28]'
+where Type = 'RoleAPP' and (KeyId = '4' or KeyId = '10');
+update jsh_userbusiness SET
+Value = '[245][13][12][16][243][14][15][234][236][22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][244][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212][246]'
+where Type = 'RoleFunctions' and KeyId = '4';
+update jsh_userbusiness SET
+Value = '[245][13][243][14][15][234][22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][244][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212][246]'
+where Type = 'RoleFunctions' and KeyId = '10';
+
+
+-- ----------------------------
+-- 时间:2019年6月26日
+-- 删除多余的资产相关表
+-- ----------------------------
+drop table jsh_asset;
+drop table jsh_assetcategory;
+drop table jsh_assetname;
+
+
+-- ----------------------------
+-- 时间:2019年6月27日
+-- 增加租户表
+-- ----------------------------
+DROP TABLE IF EXISTS `jsh_tenant`;
+CREATE TABLE `jsh_tenant` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '用户id',
+ `login_name` varchar(255) DEFAULT NULL COMMENT '登录名',
+ `user_num_limit` int(11) DEFAULT NULL COMMENT '用户数量限制',
+ `bills_num_limit` int(11) DEFAULT NULL COMMENT '单据数量限制',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8 COMMENT='租户';
+
+-- ----------------------------
+-- 时间:2019年6月27日
+-- 给租户表增加数据
+-- ----------------------------
+INSERT INTO `jsh_tenant` VALUES ('13', '63', 'jsh', '20', '2000', null);
+
+-- ----------------------------
+-- 时间:2019年7月10日
+-- 删除函数
+-- ----------------------------
+DROP FUNCTION IF EXISTS `_nextval`;
+
+-- ----------------------------
+-- 时间:2019年8月1日
+-- 增加仓库和客户的启用标记
+-- ----------------------------
+alter table jsh_systemconfig add customer_flag varchar(1) DEFAULT '0' COMMENT '客户启用标记,0未启用,1启用' after company_post_code;
+alter table jsh_systemconfig add depot_flag varchar(1) DEFAULT '0' COMMENT '仓库启用标记,0未启用,1启用' after company_post_code;
+
+-- ----------------------------
+-- 时间:2019年9月13日
+-- 给功能表增加icon字段
+-- ----------------------------
+alter table jsh_functions add icon varchar(50) DEFAULT NULL COMMENT '图标' after PushBtn;
+
+-- ----------------------------
+-- 时间:2019年9月13日
+-- 创建消息表
+-- ----------------------------
+CREATE TABLE `jsh_msg` (
+`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
+`msg_title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息标题' ,
+`msg_content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息内容' ,
+`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间' ,
+`type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '消息类型' ,
+`status` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态,1未读 2已读' ,
+`tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户id' ,
+`delete_Flag` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除' ,
+PRIMARY KEY (`id`)
+)
+ENGINE=InnoDB
+DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
+COMMENT='消息表'
+AUTO_INCREMENT=2
+ROW_FORMAT=COMPACT
+;
+
+-- ----------------------------
+-- 时间:2019年9月13日
+-- 删除表 jsh_app databasechangelog databasechangeloglock
+-- ----------------------------
+drop table databasechangelog;
+drop table databasechangeloglock;
+drop table jsh_app;
+
+-- ----------------------------
+-- 时间:2019年11月28日
+-- 单据编号表-改表名
+-- ----------------------------
+ALTER TABLE tbl_sequence RENAME TO jsh_sequence;
+
+-- ----------------------------
+-- 增加产品初始库存表
+-- 时间 2019-11-28
+-- by jishenghua
+-- ----------------------------
+CREATE TABLE `jsh_material_stock` (
+`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
+`material_id` bigint(20) NULL DEFAULT NULL COMMENT '产品id' ,
+`depot_id` bigint(20) NULL DEFAULT NULL COMMENT '仓库id' ,
+`number` decimal(24,6) NULL DEFAULT NULL COMMENT '初始库存数量' ,
+`tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户id' ,
+`delete_fag` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除' ,
+PRIMARY KEY (`id`)
+)
+ENGINE=InnoDB
+DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
+COMMENT='产品初始库存'
+AUTO_INCREMENT=48
+ROW_FORMAT=COMPACT
+;
+
+-- ----------------------------
+-- 增加商品扩展信息表
+-- 时间 2020-02-15
+-- by jishenghua
+-- ----------------------------
+CREATE TABLE `jsh_material_extend` (
+`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
+`material_id` bigint(20) NULL DEFAULT NULL COMMENT '商品id' ,
+`bar_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品条码' ,
+`commodity_unit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品单位' ,
+`purchase_decimal` decimal(24,6) NULL DEFAULT NULL COMMENT '采购价格' ,
+`commodity_decimal` decimal(24,6) NULL DEFAULT NULL COMMENT '零售价格' ,
+`wholesale_decimal` decimal(24,6) NULL DEFAULT NULL COMMENT '销售价格' ,
+`low_decimal` decimal(24,6) NULL DEFAULT NULL COMMENT '最低售价' ,
+`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期' ,
+`create_serial` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人编码' ,
+`update_serial` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人编码' ,
+`update_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间戳' ,
+`tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户id' ,
+`delete_Flag` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除' ,
+PRIMARY KEY (`id`)
+)
+ENGINE=InnoDB
+DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
+COMMENT='产品价格扩展'
+AUTO_INCREMENT=1
+ROW_FORMAT=COMPACT
+;
+
+-- ----------------------------
+-- 给单据明细表增加商品扩展id
+-- 时间 2020-02-16
+-- by jishenghua
+-- ----------------------------
+alter table jsh_depot_item add material_extend_id bigint(20) DEFAULT NULL COMMENT '商品扩展id' after MaterialId;
+
+-- ----------------------------
+-- 给单据主表删除字段ProjectId 和 AllocationProjectId
+-- 时间 2020-02-18
+-- by jishenghua
+-- ----------------------------
+alter table jsh_depot_head drop column ProjectId;
+alter table jsh_depot_head drop column AllocationProjectId;
+
+-- ----------------------------
+-- 给计量单位表增加基础单位、副单位、比例三个字段
+-- 时间 2020-03-24
+-- by jishenghua
+-- ----------------------------
+alter table jsh_unit add basic_unit varchar(50) DEFAULT NULL COMMENT '基础单位' after UName;
+alter table jsh_unit add other_unit varchar(50) DEFAULT NULL COMMENT '副单位' after basic_unit;
+alter table jsh_unit add ratio INT DEFAULT NULL COMMENT '比例' after other_unit;
+
+-- ----------------------------
+-- 时间:2020年03月31日
+-- by jishenghua
+-- 给用户表增加 登录用户名 字段
+-- ----------------------------
+alter table jsh_user change loginame login_name varchar(255) NOT NULL COMMENT '登录用户名';
+
+-- ----------------------------
+-- 时间:2020年04月12日
+-- by jishenghua
+-- 给功能表增加插件管理
+-- ----------------------------
+INSERT INTO `jsh_functions` VALUES (245,'000107', '插件管理', '0001', '/pages/manage/plugin.html', '\0', '0170', '', '电脑版', '', 'icon-notebook', '0');
+
+-- ----------------------------
+-- 时间:2020年04月25日
+-- by jishenghua
+-- 给商品扩展表增加 是否默认基础单位 字段
+-- ----------------------------
+alter table jsh_material_extend add default_flag VARCHAR(1) DEFAULT 1 COMMENT '是否为默认单位,1是,0否' after low_decimal;
+
+-- ----------------------------
+-- 时间:2020年05月04日
+-- by jishenghua
+-- 删除商品表的多价格相关的字段
+-- ----------------------------
+alter table jsh_material drop Packing;
+alter table jsh_material drop RetailPrice;
+alter table jsh_material drop LowPrice;
+alter table jsh_material drop PresetPriceOne;
+alter table jsh_material drop PresetPriceTwo;
+alter table jsh_material drop FirstOutUnit;
+alter table jsh_material drop FirstInUnit;
+alter table jsh_material drop PriceStrategy;
+
+-- ----------------------------
+-- 时间:2020年6月18日
+-- 增加负库存的启用标记
+-- ----------------------------
+alter table jsh_systemconfig add minus_stock_flag varchar(1) DEFAULT '0' COMMENT '负库存启用标记,0未启用,1启用' after customer_flag;
+
+-- ----------------------------
+-- 时间 2020年07月13日
+-- by jishenghua
+-- 增加产品当前库存表
+-- ----------------------------
+CREATE TABLE `jsh_material_current_stock` (
+`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键' ,
+`material_id` bigint(20) NULL DEFAULT NULL COMMENT '产品id' ,
+`depot_id` bigint(20) NULL DEFAULT NULL COMMENT '仓库id' ,
+`current_number` decimal(24,6) NULL DEFAULT NULL COMMENT '当前库存数量' ,
+`tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户id' ,
+`delete_flag` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除' ,
+PRIMARY KEY (`id`)
+)
+ENGINE=InnoDB
+DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
+COMMENT='产品当前库存'
+AUTO_INCREMENT=1
+ROW_FORMAT=COMPACT
+;
+
+-- --------------------------------------------------------
+-- 时间 2020年07月13日
+-- by jishenghua
+-- 修改jsh_material_stock的表名为jsh_material_initial_stock
+-- 修改jsh_material_initial_stock表的删除字段
+-- --------------------------------------------------------
+alter table jsh_material_stock rename to jsh_material_initial_stock;
+alter table jsh_material_initial_stock change delete_fag delete_flag varchar(1) NULL DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+-- --------------------------------------------------------
+-- 时间 2020年07月20日
+-- by jishenghua
+-- 优化表和字段的格式
+-- --------------------------------------------------------
+alter table jsh_log change userID user_id bigint(20) DEFAULT NULL COMMENT '用户id';
+alter table jsh_log change clientIP client_ip varchar(50) DEFAULT NULL COMMENT '客户端IP';
+alter table jsh_log change createtime create_time datetime DEFAULT NULL COMMENT '创建时间';
+alter table jsh_log change contentdetails content varchar(1000) DEFAULT NULL COMMENT '详情';
+alter table jsh_log drop column remark;
+
+alter table jsh_materialcategory rename to jsh_material_category;
+alter table jsh_material_category change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_material_category change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_material_category change CategoryLevel category_level smallint(6) DEFAULT NULL COMMENT '等级';
+alter table jsh_material_category change ParentId parent_id bigint(20) DEFAULT NULL COMMENT '上级id';
+
+alter table jsh_materialproperty rename to jsh_material_property;
+alter table jsh_material_property change nativeName native_name varchar(50) DEFAULT NULL COMMENT '原始名称';
+alter table jsh_material_property change anotherName another_name varchar(50) DEFAULT NULL COMMENT '别名';
+alter table jsh_material_property change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_role change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_role change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_role change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_person change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_person change Type type varchar(20) DEFAULT NULL COMMENT '类型';
+alter table jsh_person change Name name varchar(50) DEFAULT NULL COMMENT '姓名';
+alter table jsh_person change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_systemconfig rename to jsh_system_config;
+alter table jsh_system_config change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_account change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_account change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_account change SerialNo serial_no varchar(50) DEFAULT NULL COMMENT '编号';
+alter table jsh_account change InitialAmount initial_amount decimal(24,6) DEFAULT NULL COMMENT '期初金额';
+alter table jsh_account change CurrentAmount current_amount decimal(24,6) DEFAULT NULL COMMENT '当前余额';
+alter table jsh_account change Remark remark varchar(100) DEFAULT NULL COMMENT '备注';
+alter table jsh_account change IsDefault is_default bit(1) DEFAULT NULL COMMENT '是否默认';
+alter table jsh_account change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_functions rename to jsh_function;
+alter table jsh_function change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_function change Number number varchar(50) DEFAULT NULL COMMENT '编号';
+alter table jsh_function change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_function change PNumber parent_number varchar(50) DEFAULT NULL COMMENT '上级编号';
+alter table jsh_function change URL url varchar(100) DEFAULT NULL COMMENT '链接';
+alter table jsh_function change State state bit(1) DEFAULT NULL COMMENT '收缩';
+alter table jsh_function change Sort sort varchar(50) DEFAULT NULL COMMENT '排序';
+alter table jsh_function change Enabled enabled bit(1) DEFAULT NULL COMMENT '启用';
+alter table jsh_function change Type type varchar(50) DEFAULT NULL COMMENT '类型';
+alter table jsh_function change PushBtn push_btn varchar(50) DEFAULT NULL COMMENT '功能按钮';
+alter table jsh_function change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_userbusiness rename to jsh_user_business;
+alter table jsh_user_business change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_user_business change Type type varchar(50) DEFAULT NULL COMMENT '类别';
+alter table jsh_user_business change KeyId key_id varchar(50) DEFAULT NULL COMMENT '主id';
+alter table jsh_user_business change Value value varchar(10000) DEFAULT NULL COMMENT '值';
+alter table jsh_user_business change BtnStr btn_str varchar(2000) DEFAULT NULL COMMENT '按钮权限';
+alter table jsh_user_business change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_unit change UName name varchar(50) DEFAULT NULL COMMENT '名称,支持多单位';
+alter table jsh_unit change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_inoutitem rename to jsh_in_out_item;
+alter table jsh_in_out_item change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_in_out_item change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_in_out_item change Type type varchar(20) DEFAULT NULL COMMENT '类型';
+alter table jsh_in_out_item change Remark remark varchar(100) DEFAULT NULL COMMENT '备注';
+alter table jsh_in_out_item change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_serial_number change material_Id material_id bigint(20) DEFAULT NULL COMMENT '产品表id';
+alter table jsh_serial_number change serial_Number serial_number varchar(64) DEFAULT NULL COMMENT '序列号';
+alter table jsh_serial_number change is_Sell is_sell varchar(1) DEFAULT '0' COMMENT '是否卖出,0未卖出,1卖出';
+alter table jsh_serial_number change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+alter table jsh_serial_number change create_Time create_time datetime DEFAULT NULL COMMENT '创建时间';
+alter table jsh_serial_number change update_Time update_time datetime DEFAULT NULL COMMENT '更新时间';
+alter table jsh_serial_number change depothead_Id depot_head_id bigint(20) DEFAULT NULL COMMENT '单据主表id,用于跟踪序列号流向';
+
+alter table jsh_supplier change phonenum phone_num varchar(30) DEFAULT NULL COMMENT '联系电话';
+alter table jsh_supplier change AdvanceIn advance_in decimal(24,6) DEFAULT '0.000000' COMMENT '预收款';
+alter table jsh_supplier change BeginNeedGet begin_need_get decimal(24,6) DEFAULT NULL COMMENT '期初应收';
+alter table jsh_supplier change BeginNeedPay begin_need_pay decimal(24,6) DEFAULT NULL COMMENT '期初应付';
+alter table jsh_supplier change AllNeedGet all_need_get decimal(24,6) DEFAULT NULL COMMENT '累计应收';
+alter table jsh_supplier change AllNeedPay all_need_pay decimal(24,6) DEFAULT NULL COMMENT '累计应付';
+alter table jsh_supplier change taxNum tax_num varchar(50) DEFAULT NULL COMMENT '纳税人识别号';
+alter table jsh_supplier change bankName bank_name varchar(50) DEFAULT NULL COMMENT '开户行';
+alter table jsh_supplier change accountNumber account_number varchar(50) DEFAULT NULL COMMENT '账号';
+alter table jsh_supplier change taxRate tax_rate decimal(24,6) DEFAULT NULL COMMENT '税率';
+alter table jsh_supplier change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_accounthead rename to jsh_account_head;
+alter table jsh_account_head change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_account_head change Type type varchar(50) DEFAULT NULL COMMENT '类型(支出/收入/收款/付款/转账)';
+alter table jsh_account_head change OrganId organ_id bigint(20) DEFAULT NULL COMMENT '单位Id(收款/付款单位)';
+alter table jsh_account_head change HandsPersonId hands_person_id bigint(20) DEFAULT NULL COMMENT '经手人id';
+alter table jsh_account_head change ChangeAmount change_amount decimal(24,6) DEFAULT NULL COMMENT '变动金额(优惠/收款/付款/实付)';
+alter table jsh_account_head change TotalPrice total_price decimal(24,6) DEFAULT NULL COMMENT '合计金额';
+alter table jsh_account_head change AccountId account_id bigint(20) DEFAULT NULL COMMENT '账户(收款/付款)';
+alter table jsh_account_head change BillNo bill_no varchar(50) DEFAULT NULL COMMENT '单据编号';
+alter table jsh_account_head change BillTime bill_time datetime DEFAULT NULL COMMENT '单据日期';
+alter table jsh_account_head change Remark remark varchar(100) DEFAULT NULL COMMENT '备注';
+alter table jsh_account_head change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_accountitem rename to jsh_account_item;
+alter table jsh_account_item change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_account_item change HeaderId header_id bigint(20) NOT NULL COMMENT '表头Id';
+alter table jsh_account_item change AccountId account_id bigint(20) DEFAULT NULL COMMENT '账户Id';
+alter table jsh_account_item change InOutItemId in_out_item_id bigint(20) DEFAULT NULL COMMENT '收支项目Id';
+alter table jsh_account_item change EachAmount each_amount decimal(24,6) DEFAULT NULL COMMENT '单项金额';
+alter table jsh_account_item change Remark remark varchar(100) DEFAULT NULL COMMENT '单据备注';
+alter table jsh_account_item change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_material change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_material change CategoryId category_id bigint(20) DEFAULT NULL COMMENT '产品类型id';
+alter table jsh_material change Name name varchar(50) DEFAULT NULL COMMENT '名称';
+alter table jsh_material change Mfrs mfrs varchar(50) DEFAULT NULL COMMENT '制造商';
+alter table jsh_material change SafetyStock safety_stock decimal(24,6) DEFAULT NULL COMMENT '安全存量(KG)';
+alter table jsh_material change Model model varchar(50) DEFAULT NULL COMMENT '型号';
+alter table jsh_material change Standard standard varchar(50) DEFAULT NULL COMMENT '规格';
+alter table jsh_material change Color color varchar(50) DEFAULT NULL COMMENT '颜色';
+alter table jsh_material change Unit unit varchar(50) DEFAULT NULL COMMENT '单位-单个';
+alter table jsh_material change Remark remark varchar(100) DEFAULT NULL COMMENT '备注';
+alter table jsh_material change UnitId unit_id bigint(20) DEFAULT NULL COMMENT '计量单位Id';
+alter table jsh_material change Enabled enabled bit(1) DEFAULT NULL COMMENT '启用 0-禁用 1-启用';
+alter table jsh_material change OtherField1 other_field1 varchar(50) DEFAULT NULL COMMENT '自定义1';
+alter table jsh_material change OtherField2 other_field2 varchar(50) DEFAULT NULL COMMENT '自定义2';
+alter table jsh_material change OtherField3 other_field3 varchar(50) DEFAULT NULL COMMENT '自定义3';
+alter table jsh_material change enableSerialNumber enable_serial_number varchar(1) DEFAULT '0' COMMENT '是否开启序列号,0否,1是';
+alter table jsh_material change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_depothead rename to jsh_depot_head;
+alter table jsh_depot_head change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_depot_head change Type type varchar(50) DEFAULT NULL COMMENT '类型(出库/入库)';
+alter table jsh_depot_head change SubType sub_type varchar(50) DEFAULT NULL COMMENT '出入库分类';
+alter table jsh_depot_head change DefaultNumber default_number varchar(50) DEFAULT NULL COMMENT '初始票据号';
+alter table jsh_depot_head change Number number varchar(50) DEFAULT NULL COMMENT '票据号';
+alter table jsh_depot_head change OperPersonName oper_person_name varchar(50) DEFAULT NULL COMMENT '操作员名字';
+alter table jsh_depot_head change CreateTime create_time datetime DEFAULT NULL COMMENT '创建时间';
+alter table jsh_depot_head change OperTime oper_time datetime DEFAULT NULL COMMENT '出入库时间';
+alter table jsh_depot_head change OrganId organ_id bigint(20) DEFAULT NULL COMMENT '供应商id';
+alter table jsh_depot_head change HandsPersonId hands_person_id bigint(20) DEFAULT NULL COMMENT '采购/领料-经手人id';
+alter table jsh_depot_head change AccountId account_id bigint(20) DEFAULT NULL COMMENT '账户id';
+alter table jsh_depot_head change ChangeAmount change_amount decimal(24,6) DEFAULT NULL COMMENT '变动金额(收款/付款)';
+alter table jsh_depot_head change TotalPrice total_price decimal(24,6) DEFAULT NULL COMMENT '合计金额';
+alter table jsh_depot_head change PayType pay_type varchar(50) DEFAULT NULL COMMENT '付款类型(现金、记账等)';
+alter table jsh_depot_head change Remark remark varchar(1000) DEFAULT NULL COMMENT '备注';
+alter table jsh_depot_head change Salesman sales_man varchar(50) DEFAULT NULL COMMENT '业务员(可以多个)';
+alter table jsh_depot_head change AccountIdList account_id_list varchar(50) DEFAULT NULL COMMENT '多账户ID列表';
+alter table jsh_depot_head change AccountMoneyList account_money_list varchar(200) DEFAULT NULL COMMENT '多账户金额列表';
+alter table jsh_depot_head change Discount discount decimal(24,6) DEFAULT NULL COMMENT '优惠率';
+alter table jsh_depot_head change DiscountMoney discount_money decimal(24,6) DEFAULT NULL COMMENT '优惠金额';
+alter table jsh_depot_head change DiscountLastMoney discount_last_money decimal(24,6) DEFAULT NULL COMMENT '优惠后金额';
+alter table jsh_depot_head change OtherMoney other_money decimal(24,6) DEFAULT NULL COMMENT '销售或采购费用合计';
+alter table jsh_depot_head change OtherMoneyList other_money_list varchar(200) DEFAULT NULL COMMENT '销售或采购费用涉及项目Id数组(包括快递、招待等)';
+alter table jsh_depot_head change OtherMoneyItem other_money_item varchar(200) DEFAULT NULL COMMENT '销售或采购费用涉及项目(包括快递、招待等)';
+alter table jsh_depot_head change AccountDay account_day int(10) DEFAULT NULL COMMENT '结算天数';
+alter table jsh_depot_head change Status status varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2已转采购|销售';
+alter table jsh_depot_head change LinkNumber link_number varchar(50) DEFAULT NULL COMMENT '关联订单号';
+alter table jsh_depot_head change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+alter table jsh_depotitem rename to jsh_depot_item;
+alter table jsh_depot_item change Id id bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键';
+alter table jsh_depot_item change HeaderId header_id bigint(20) NOT NULL COMMENT '表头Id';
+alter table jsh_depot_item change MaterialId material_id bigint(20) NOT NULL COMMENT '商品Id';
+alter table jsh_depot_item change MUnit material_unit varchar(20) DEFAULT NULL COMMENT '商品计量单位';
+alter table jsh_depot_item change OperNumber oper_number decimal(24,6) DEFAULT NULL COMMENT '数量';
+alter table jsh_depot_item change BasicNumber basic_number decimal(24,6) DEFAULT NULL COMMENT '基础数量,如kg、瓶';
+alter table jsh_depot_item change UnitPrice unit_price decimal(24,6) DEFAULT NULL COMMENT '单价';
+alter table jsh_depot_item change TaxUnitPrice tax_unit_price decimal(24,6) DEFAULT NULL COMMENT '含税单价';
+alter table jsh_depot_item change AllPrice all_price decimal(24,6) DEFAULT NULL COMMENT '金额';
+alter table jsh_depot_item change Remark remark varchar(200) DEFAULT NULL COMMENT '备注';
+alter table jsh_depot_item change Img img varchar(50) DEFAULT NULL COMMENT '图片';
+alter table jsh_depot_item change Incidentals incidentals decimal(24,6) DEFAULT NULL COMMENT '运杂费';
+alter table jsh_depot_item change DepotId depot_id bigint(20) DEFAULT NULL COMMENT '仓库ID';
+alter table jsh_depot_item change AnotherDepotId another_depot_id bigint(20) DEFAULT NULL COMMENT '调拨时,对方仓库Id';
+alter table jsh_depot_item change TaxRate tax_rate decimal(24,6) DEFAULT NULL COMMENT '税率';
+alter table jsh_depot_item change TaxMoney tax_money decimal(24,6) DEFAULT NULL COMMENT '税额';
+alter table jsh_depot_item change TaxLastMoney tax_last_money decimal(24,6) DEFAULT NULL COMMENT '价税合计';
+alter table jsh_depot_item change OtherField1 other_field1 varchar(50) DEFAULT NULL COMMENT '自定义字段1-名称';
+alter table jsh_depot_item change OtherField2 other_field2 varchar(50) DEFAULT NULL COMMENT '自定义字段2-型号';
+alter table jsh_depot_item change OtherField3 other_field3 varchar(50) DEFAULT NULL COMMENT '自定义字段3-制造商';
+alter table jsh_depot_item change OtherField4 other_field4 varchar(50) DEFAULT NULL COMMENT '自定义字段4-名称';
+alter table jsh_depot_item change OtherField5 other_field5 varchar(50) DEFAULT NULL COMMENT '自定义字段5-名称';
+alter table jsh_depot_item change MType material_type varchar(20) DEFAULT NULL COMMENT '商品类型';
+alter table jsh_depot_item change delete_Flag delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+
+-- --------------------------------------------------------
+-- 时间 2020年09月13日
+-- by jishenghua
+-- 给单据表增加操作员字段,去掉经手头姓名字段
+-- --------------------------------------------------------
+alter table jsh_depot_head add creator bigint(20) DEFAULT NULL COMMENT '操作员' after hands_person_id;
+alter table jsh_account_head add creator bigint(20) DEFAULT NULL COMMENT '操作员' after hands_person_id;
+alter table jsh_depot_head drop column oper_person_name;
+update jsh_depot_head set creator=hands_person_id;
+
+
+-- --------------------------------------------------------
+-- 时间 2020年10月17日
+-- by jishenghua
+-- 增加平台表
+-- --------------------------------------------------------
+DROP TABLE IF EXISTS `jsh_platform_config`;
+CREATE TABLE `jsh_platform_config` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `platform_key` varchar(100) DEFAULT NULL COMMENT '关键词',
+ `platform_key_info` varchar(100) DEFAULT NULL COMMENT '关键词名称',
+ `platform_value` varchar(200) DEFAULT NULL COMMENT '值',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='平台参数';
+
+INSERT INTO `jsh_platform_config` VALUES ('1', 'platform_name', '平台名称', '华夏ERP');
+INSERT INTO `jsh_platform_config` VALUES ('2', 'activation_code', '激活码', null);
+
+-- --------------------------------------------------------
+-- 时间 2020年11月24日
+-- by jishenghua
+-- 给单据主表增加单据类型字段bill_type
+-- --------------------------------------------------------
+alter table jsh_depot_head add bill_type varchar(50) DEFAULT NULL COMMENT '单据类型' after pay_type;
+
+-- --------------------------------------------------------
+-- 时间 2021年1月19日
+-- by jishenghua
+-- 给功能表增加组件字段component
+-- --------------------------------------------------------
+alter table jsh_function add component varchar(100) DEFAULT NULL COMMENT '组件' after url;
+
+-- --------------------------------------------------------
+-- 时间 2021年2月13日
+-- by jishenghua
+-- 优化机构和商品类型表的字段
+-- --------------------------------------------------------
+alter table jsh_organization change org_parent_no parent_id bigint(20) DEFAULT NULL COMMENT '父机构id';
+alter table jsh_organization change org_stcd delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+alter table jsh_organization drop column org_tpcd;
+alter table jsh_organization drop column org_create_time;
+alter table jsh_organization drop column org_stop_time;
+alter table jsh_organization drop column creator;
+alter table jsh_organization drop column updater;
+alter table jsh_material_category drop column creator;
+alter table jsh_material_category drop column updater;
+alter table jsh_material_category change status delete_flag varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除';
+update jsh_material_category set delete_flag='0';
+
+-- --------------------------------------------------------
+-- 时间 2021年6月1日
+-- by jishenghua
+-- 增加租户管理菜单
+-- --------------------------------------------------------
+INSERT INTO `jsh_function` (`id`, `number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`) VALUES ('18', '000109', '租户管理', '0001', '/system/tenant', '/system/TenantList', b'0', '0167', b'1', '电脑版', '1', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2021年6月19日
+-- by jishenghua
+-- 更新jsh_platform_config数据
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` (`id`, `platform_key`, `platform_key_info`, `platform_value`) VALUES ('3', 'platform_url', '官方网站', 'http://www.huaxiaerp.com/');
+
+-- --------------------------------------------------------
+-- 时间 2021年6月20日
+-- by jishenghua
+-- 将库存状态报表改为进销存统计报表
+-- --------------------------------------------------------
+update jsh_function set name='进销存统计', sort='0658' where id=59;
+
+-- --------------------------------------------------------
+-- 时间 2021年6月20日
+-- by jishenghua
+-- 增加商品库存报表
+-- --------------------------------------------------------
+INSERT INTO `jsh_function` (`number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`) VALUES ('030113', '商品库存', '0301', '/report/material_stock', '/report/MaterialStock', b'0', '0605', b'1', '电脑版', '', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2021年6月29日
+-- by jishenghua
+-- 给jsh_account_item增加字段进销存单据id 应收欠款 已收欠款
+-- 给jsh_depot_head增加附件字段附件名称
+-- 给jsh_account_head增加附件字段附件名称 优惠金额
+-- --------------------------------------------------------
+alter table jsh_account_item add bill_id bigint(20) DEFAULT NULL COMMENT '进销存单据id' after in_out_item_id;
+alter table jsh_account_item add need_debt decimal(24,6) DEFAULT NULL COMMENT '应收欠款' after bill_id;
+alter table jsh_account_item add finish_debt decimal(24,6) DEFAULT NULL COMMENT '已收欠款' after need_debt;
+alter table jsh_depot_head add file_name varchar(1000) DEFAULT NULL COMMENT '附件名称' after remark;
+alter table jsh_account_head add file_name varchar(500) DEFAULT NULL COMMENT '附件名称' after remark;
+alter table jsh_account_head add discount_money decimal(24,6) DEFAULT NULL COMMENT '优惠金额' after change_amount;
+
+-- --------------------------------------------------------
+-- 时间 2021年7月1日
+-- by jishenghua
+-- 给商品表增加附件名称字段
+-- --------------------------------------------------------
+alter table jsh_material add img_name varchar(1000) DEFAULT NULL COMMENT '图片名称' after remark;
+
+-- --------------------------------------------------------
+-- 时间 2021年7月6日
+-- by jishenghua
+-- 给租户表增加字段enabled
+-- --------------------------------------------------------
+alter table jsh_tenant add enabled bit(1) DEFAULT 1 COMMENT '启用 0-禁用 1-启用' after bills_num_limit;
+
+-- --------------------------------------------------------
+-- 时间 2021年7月21日
+-- by jishenghua
+-- 增加商品属性表
+-- --------------------------------------------------------
+DROP TABLE IF EXISTS `jsh_material_attribute`;
+CREATE TABLE `jsh_material_attribute` (
+ `id` bigint(20) NOT NULL AUTO_INCREMENT,
+ `attribute_field` varchar(50) DEFAULT NULL COMMENT '属性字段',
+ `attribute_name` varchar(50) DEFAULT NULL COMMENT '属性名',
+ `attribute_value` varchar(500) DEFAULT NULL COMMENT '属性值',
+ `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id',
+ `delete_flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='产品属性表';
+
+INSERT INTO `jsh_material_attribute` VALUES ('1', 'manyColor', '多颜色', '红色|橙色|黄色|绿色|蓝色|紫色', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('2', 'manySize', '多尺寸', 'S|M|L|XL|XXL|XXXL', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('3', 'other1', '自定义1', '小米|华为', '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('4', 'other2', '自定义2', null, '63', '0');
+INSERT INTO `jsh_material_attribute` VALUES ('5', 'other3', '自定义3', null, '63', '0');
+
+-- --------------------------------------------------------
+-- 时间 2021年7月22日
+-- by jishenghua
+-- 增加多属性设置菜单
+-- --------------------------------------------------------
+INSERT INTO `jsh_function` (`id`, `number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`) VALUES ('247', '010105', '多属性', '0101', '/material/material_attribute', '/material/MaterialAttributeList', '\0', '0250', '', '电脑版', '1', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2021年7月22日
+-- by jishenghua
+-- 移除机构表的全名字段
+-- 给商品扩展表加sku字段
+-- 给单据主表移除多余字段
+-- 给单据子表移除多余字段
+-- --------------------------------------------------------
+alter table jsh_organization drop column org_full_name;
+alter table jsh_material_extend add sku varchar(50) DEFAULT NULL COMMENT '多属性' after commodity_unit;
+alter table jsh_depot_head drop column hands_person_id;
+alter table jsh_depot_head drop column other_money_list;
+alter table jsh_depot_head drop column other_money_item;
+alter table jsh_depot_head drop column account_day;
+alter table jsh_depot_item drop column img;
+alter table jsh_depot_item drop column incidentals;
+alter table jsh_depot_item drop column other_field1;
+alter table jsh_depot_item drop column other_field2;
+alter table jsh_depot_item drop column other_field3;
+alter table jsh_depot_item drop column other_field4;
+alter table jsh_depot_item drop column other_field5;
+
+-- --------------------------------------------------------
+-- 时间 2021年7月27日
+-- by jishenghua
+-- 给单据子表加sku字段
+-- --------------------------------------------------------
+alter table jsh_depot_item add sku varchar(50) DEFAULT NULL COMMENT '多属性' after material_unit;
+
+-- --------------------------------------------------------
+-- 时间 2021年7月29日
+-- by jishenghua
+-- 增加调拨明细菜单
+-- --------------------------------------------------------
+INSERT INTO `jsh_function` VALUES ('248', '030150', '调拨明细', '0301', '/report/allocation_detail', '/report/AllocationDetail', '\0', '0646', '', '电脑版', '', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2021年8月24日
+-- by jishenghua
+-- 给租户表加sku字段
+-- 给租户表移除单据数量限制字段
+-- --------------------------------------------------------
+alter table jsh_tenant add type varchar(1) DEFAULT '0' COMMENT '租户类型,0免费租户,1付费租户' after bills_num_limit;
+alter table jsh_tenant drop column bills_num_limit;
+alter table jsh_tenant add expire_time datetime DEFAULT NULL COMMENT '到期时间' after create_time;
+
+-- --------------------------------------------------------
+-- 时间 2021年8月29日
+-- by jishenghua
+-- 给日志表的ip字段改长度
+-- --------------------------------------------------------
+alter table jsh_log change client_ip client_ip varchar(200) DEFAULT NULL COMMENT '客户端IP';
+
+-- --------------------------------------------------------
+-- 时间 2021年9月5日
+-- by jishenghua
+-- 给财务表增加状态字段,给历史数据赋值为0
+-- --------------------------------------------------------
+alter table jsh_account_head add status varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核' after file_name;
+update jsh_account_head set status=0;
+
+-- --------------------------------------------------------
+-- 时间 2021年9月12日
+-- by jishenghua
+-- 插入jsh_platform_config数据,控制是否显示三联打印
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` (`id`, `platform_key`, `platform_key_info`, `platform_value`) VALUES ('4', 'bill_print_flag', '三联打印启用标记', '0');
+INSERT INTO `jsh_platform_config` (`id`, `platform_key`, `platform_key_info`, `platform_value`) VALUES ('5', 'bill_print_url', '三联打印地址', '');
+
+-- --------------------------------------------------------
+-- 时间 2021年9月24日
+-- by jishenghua
+-- 修改单据主表的状态字段描述
+-- --------------------------------------------------------
+alter table jsh_depot_head change status status varchar(1) DEFAULT NULL COMMENT '状态,0未审核、1已审核、2完成采购|销售、3部分采购|销售';
+
+-- --------------------------------------------------------
+-- 时间 2021年9月27日
+-- by jishenghua
+-- 给商品表和单据字表增加字段
+-- --------------------------------------------------------
+alter table jsh_material add enable_batch_number varchar(1) DEFAULT 0 COMMENT '是否开启批号,0否,1是' after enable_serial_number;
+alter table jsh_material add expiry_num int(10) DEFAULT NULL COMMENT '保质期天数' after unit_id;
+alter table jsh_depot_item add sn_list varchar(2000) DEFAULT NULL COMMENT '序列号列表' after material_type;
+alter table jsh_depot_item add batch_number varchar(100) DEFAULT NULL COMMENT '批号' after sn_list;
+alter table jsh_depot_item add expiration_date datetime DEFAULT NULL COMMENT '有效日期' after batch_number;
+
+-- --------------------------------------------------------
+-- 时间 2021年9月27日
+-- by jishenghua
+-- 插入jsh_platform_config数据,配置租户续费地址
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('pay_fee_url', '租户续费地址', '');
+
+-- --------------------------------------------------------
+-- 时间 2021年9月28日
+-- by jishenghua
+-- 给序列号表增加仓库id
+-- --------------------------------------------------------
+alter table jsh_serial_number add depot_id bigint(20) DEFAULT NULL COMMENT '仓库id' after material_Id;
+
+-- --------------------------------------------------------
+-- 时间 2021年10月4日
+-- by jishenghua
+-- 给序列号表增加入库单号和出库单号字段,另外去掉单据id字段
+-- 移除序列号菜单
+-- --------------------------------------------------------
+alter table jsh_serial_number add in_bill_no varchar(50) DEFAULT NULL COMMENT '入库单号' after updater;
+alter table jsh_serial_number add out_bill_no varchar(50) DEFAULT NULL COMMENT '出库单号' after in_bill_no;
+alter table jsh_serial_number drop column depot_head_id;
+delete from jsh_function where number='010104';
+
+-- --------------------------------------------------------
+-- 时间 2021年10月12日
+-- by jishenghua
+-- 给租户表增加备注字段
+-- --------------------------------------------------------
+alter table jsh_tenant add remark varchar(500) DEFAULT NULL COMMENT '备注' after expire_time;
+
+-- --------------------------------------------------------
+-- 时间 2021年10月29日
+-- by jishenghua
+-- 给商品初始库存表增加最低库存数量、最高库存数量字段
+-- 给商品表增加基础重量字段
+-- 给商品表移除安全库存字段
+-- --------------------------------------------------------
+alter table jsh_material_initial_stock add low_safe_stock decimal(24,6) DEFAULT NULL COMMENT '最低库存数量' after number;
+alter table jsh_material_initial_stock add high_safe_stock decimal(24,6) DEFAULT NULL COMMENT '最高库存数量' after low_safe_stock;
+alter table jsh_material add weight decimal(24,6) DEFAULT NULL COMMENT '基础重量(kg)' after expiry_num;
+alter table jsh_material drop column safety_stock;
+
+-- --------------------------------------------------------
+-- 时间 2021年11月5日
+-- by jishenghua
+-- 给用户/角色/模块关系表增加租户字段
+-- 给用户/角色/模块关系表的租户字段赋值
+-- --------------------------------------------------------
+alter table jsh_user_business add tenant_id bigint(20) DEFAULT null COMMENT '租户id' after btn_str;
+update jsh_user_business ub left join jsh_user u on ub.key_id=u.id set ub.tenant_id=u.tenant_id
+where (ub.type='UserRole' or ub.type='UserDepot' or ub.type='UserCustomer') and u.tenant_id!=0;
+update jsh_user_business ub left join jsh_role r on ub.key_id=r.id set ub.tenant_id=r.tenant_id
+where (ub.type='RoleFunctions') and r.tenant_id is not null;
+
+-- --------------------------------------------------------
+-- 时间 2021年11月30日
+-- by jishenghua
+-- 给计量单位表增加副单位2、副单位3、比例2、比例3 四个字段
+-- --------------------------------------------------------
+alter table jsh_unit add other_unit_two varchar(50) DEFAULT NULL COMMENT '副单位2' after other_unit;
+alter table jsh_unit add other_unit_three varchar(50) DEFAULT NULL COMMENT '副单位3' after other_unit_two;
+alter table jsh_unit add ratio_two int(11) DEFAULT NULL COMMENT '比例2' after ratio;
+alter table jsh_unit add ratio_three int(11) DEFAULT NULL COMMENT '比例3' after ratio_two;
+
+-- --------------------------------------------------------
+-- 时间 2021年12月07日
+-- by jishenghua
+-- 更新菜单名称-进货统计改为采购统计
+-- 增加平台配置菜单
+-- 给平台配置增加注册启用标记
+-- 更新消息表中已有信息的状态
+-- --------------------------------------------------------
+update jsh_function set name='采购统计' where name='进货统计';
+insert into `jsh_function`(`number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`)
+ values ('000112', '平台配置', '0001', '/system/platform_config', '/system/PlatformConfigList', '\0', '0175', '', '电脑版', '', 'profile', '0');
+insert into `jsh_platform_config`(`platform_key`, `platform_key_info`, `platform_value`)
+ values ('register_flag', '注册启用标记', '1');
+update jsh_msg set status='2' where id=2;
+
+-- --------------------------------------------------------
+-- 时间 2021年12月12日
+-- by jishenghua
+-- 给单据表增加找零字段backAmount
+-- --------------------------------------------------------
+alter table jsh_depot_head add back_amount decimal(24,6) DEFAULT NULL COMMENT '找零金额' after change_amount;
+
+-- --------------------------------------------------------
+-- 时间 2022年04月21日
+-- by jishenghua
+-- 修改商品表的名称字段的长度
+-- --------------------------------------------------------
+alter table jsh_material change name name varchar(100) DEFAULT NULL COMMENT '名称';
+
+-- --------------------------------------------------------
+-- 时间 2022年05月03日
+-- by jishenghua
+-- 给系统参数表增加销售协议字段
+-- --------------------------------------------------------
+alter table jsh_system_config add sale_agreement varchar(500) DEFAULT NULL COMMENT '销售协议' after company_post_code;
+
+-- --------------------------------------------------------
+-- 时间 2022年05月17日
+-- by jishenghua
+-- 给单据主表增加采购状态字段
+-- 给系统参数表增加以销定购开关字段
+-- --------------------------------------------------------
+alter table jsh_depot_head add purchase_status varchar(1) DEFAULT NULL COMMENT '采购状态,0未采购、2完成采购、3部分采购' after status;
+alter table jsh_system_config add purchase_by_sale_flag varchar(1) DEFAULT '0' COMMENT '以销定购启用标记,0未启用,1启用' after minus_stock_flag;
+update jsh_depot_head set purchase_status='0';
+
+-- --------------------------------------------------------
+-- 时间 2022年05月28日
+-- by jishenghua
+-- 给单据子表增加关联明细id
+-- 给单据主表增加订金字段
+-- --------------------------------------------------------
+alter table jsh_depot_item add link_id bigint(20) DEFAULT NULL COMMENT '关联明细id' after expiration_date;
+alter table jsh_depot_head add deposit decimal(24,6) DEFAULT NULL COMMENT '订金' after other_money;
+
+-- --------------------------------------------------------
+-- 时间 2022年07月25日
+-- by jishenghua
+-- 给平台参数表添加手机端激活码
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` VALUES ('8', 'app_activation_code', '手机端激活码', '');
+
+-- --------------------------------------------------------
+-- 时间 2022年08月25日
+-- by jishenghua
+-- 给部分表增加启用状态和排序字段
+-- --------------------------------------------------------
+alter table jsh_unit add enabled bit(1) DEFAULT NULL COMMENT '启用' after ratio_three;
+update jsh_unit set enabled=1;
+alter table jsh_supplier add sort varchar(10) DEFAULT NULL COMMENT '排序' after tax_rate;
+alter table jsh_depot add enabled bit(1) DEFAULT NULL COMMENT '启用' after principal;
+update jsh_depot set enabled=1;
+alter table jsh_in_out_item add enabled bit(1) DEFAULT NULL COMMENT '启用' after remark;
+alter table jsh_in_out_item add sort varchar(10) DEFAULT NULL COMMENT '排序' after enabled;
+update jsh_in_out_item set enabled=1;
+alter table jsh_account add enabled bit(1) DEFAULT NULL COMMENT '启用' after remark;
+alter table jsh_account add sort varchar(10) DEFAULT NULL COMMENT '排序' after enabled;
+update jsh_account set enabled=1;
+alter table jsh_person add enabled bit(1) DEFAULT NULL COMMENT '启用' after name;
+alter table jsh_person add sort varchar(10) DEFAULT NULL COMMENT '排序' after enabled;
+update jsh_person set enabled=1;
+alter table jsh_role add enabled bit(1) DEFAULT NULL COMMENT '启用' after description;
+alter table jsh_role add sort varchar(10) DEFAULT NULL COMMENT '排序' after enabled;
+update jsh_role set enabled=1;
+
+-- --------------------------------------------------------
+-- 时间 2022年08月30日
+-- by jishenghua
+-- 给产品属性表移除属性字段
+-- --------------------------------------------------------
+alter table jsh_material_attribute drop column attribute_field;
+
+-- --------------------------------------------------------
+-- 时间 2022年09月13日
+-- by jishenghua
+-- 给商品和财务单据的备注修改字段长度
+-- --------------------------------------------------------
+alter table jsh_material change remark remark varchar(500) DEFAULT NULL COMMENT '备注';
+alter table jsh_account_head change remark remark varchar(1000) DEFAULT NULL COMMENT '备注';
+
+-- --------------------------------------------------------
+-- 时间 2022年10月2日
+-- by jishenghua
+-- 给单据明细增加采购单价字段
+-- --------------------------------------------------------
+alter table jsh_depot_item add purchase_unit_price decimal(24,6) DEFAULT NULL COMMENT '采购单价' after unit_price;
+
+-- --------------------------------------------------------
+-- 时间 2022年10月23日
+-- by jishenghua
+-- 给角色表增加价格屏蔽字段
+-- --------------------------------------------------------
+alter table jsh_role add price_limit varchar(50) DEFAULT NULL COMMENT '价格屏蔽 1-屏蔽采购价 2-屏蔽零售价 3-屏蔽销售价' after type;
+
+-- --------------------------------------------------------
+-- 时间 2023年02月19日
+-- by jishenghua
+-- 给系统参数表增加多级审核开关字段
+-- 给用户表增加是否经理字段,默认为否
+-- 给平台配置表增加发起流程地址
+-- --------------------------------------------------------
+alter table jsh_system_config add multi_level_approval_flag varchar(1) DEFAULT '0' COMMENT '多级审核启用标记,0未启用,1启用' after purchase_by_sale_flag;
+alter table jsh_user add leader_flag varchar(1) DEFAULT '0' COMMENT '是否经理,0否,1是' after password;
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('send_workflow_url', '发起流程地址', '');
+
+-- --------------------------------------------------------
+-- 时间 2023年02月25日
+-- by jishenghua
+-- 给消息表增加接收人字段
+-- 更新接收人id字段的值
+-- 给系统参数表增加流程类型
+-- --------------------------------------------------------
+alter table jsh_msg add user_id bigint(20) DEFAULT NULL COMMENT '接收人id' after type;
+update jsh_msg set user_id=tenant_id where user_id is null;
+alter table jsh_system_config add multi_bill_type varchar(200) DEFAULT NULL COMMENT '流程类型,可多选' after multi_level_approval_flag;
+
+-- --------------------------------------------------------
+-- 时间 2023年03月08日
+-- by jishenghua
+-- 给计量单位表修改比例的字段类型
+-- 给系统参数表增加金额审核启用标记
+-- 给单据增加来源字段
+-- --------------------------------------------------------
+alter table jsh_unit change ratio ratio decimal(24,3) DEFAULT NULL COMMENT '比例';
+alter table jsh_unit change ratio_two ratio_two decimal(24,3) DEFAULT NULL COMMENT '比例2';
+alter table jsh_unit change ratio_three ratio_three decimal(24,3) DEFAULT NULL COMMENT '比例3';
+alter table jsh_system_config add amount_approval_flag varchar(1) DEFAULT '0' COMMENT '金额审核启用标记,0未启用,1启用' after multi_bill_type;
+alter table jsh_depot_head add source varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机' after purchase_status;
+alter table jsh_account_head add source varchar(1) DEFAULT '0' COMMENT '单据来源,0-pc,1-手机' after status;
+
+-- --------------------------------------------------------
+-- 时间 2023年03月16日
+-- by jishenghua
+-- 将系统参数表的金额审核启用标记改为强审核标记
+-- 增加零售统计菜单
+-- --------------------------------------------------------
+alter table jsh_system_config change amount_approval_flag force_approval_flag varchar(1) DEFAULT '0' COMMENT '强审核启用标记,0未启用,1启用';
+insert into `jsh_function` (`number`, `name`, `parent_number`, `url`, `component`, `state`, `sort`, `enabled`, `type`, `push_btn`, `icon`, `delete_flag`) VALUES ('030105', '零售统计', '0301', '/report/retail_out_report', '/report/RetailOutReport', b'0', '0615', b'1', '电脑版', '', 'profile', '0');
+
+-- --------------------------------------------------------
+-- 时间 2023年03月08日
+-- by jishenghua
+-- 给系统参数表增加更新单价启用标记
+-- --------------------------------------------------------
+alter table jsh_system_config add update_unit_price_flag varchar(1) DEFAULT '1' COMMENT '更新单价启用标记,0未启用,1启用' after force_approval_flag;
+
+-- --------------------------------------------------------
+-- 时间 2023年05月10日
+-- by jishenghua
+-- 给系统参数表增加超出关联单据启用标记
+-- --------------------------------------------------------
+alter table jsh_system_config add over_link_bill_flag varchar(1) DEFAULT '0' COMMENT '超出关联单据启用标记,0未启用,1启用' after update_unit_price_flag;
+
+-- --------------------------------------------------------
+-- 时间 2023年05月19日
+-- by jishenghua
+-- 给商品主表增加仓位货架
+-- --------------------------------------------------------
+alter table jsh_material add position varchar(100) DEFAULT NULL COMMENT '仓位货架' after enable_batch_number;
+
+-- --------------------------------------------------------
+-- 时间 2023年05月28日
+-- by jishenghua
+-- 给用户表增加微信绑定字段
+-- 给平台表增加微信登录的相关信息
+-- --------------------------------------------------------
+alter table jsh_user add weixin_open_id varchar(100) DEFAULT NULL COMMENT '微信绑定' after remark;
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('weixinUrl', '微信url', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('weixinAppid', '微信appid', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('weixinSecret', '微信secret', '');
+
+-- --------------------------------------------------------
+-- 时间 2023年06月05日
+-- by jishenghua
+-- 给平台表增加阿里云OSS的相关信息
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('aliOss_endpoint', '阿里OSS-endpoint', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('aliOss_accessKeyId', '阿里OSS-accessKeyId', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('aliOss_accessKeySecret', '阿里OSS-accessKeySecret', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('aliOss_bucketName', '阿里OSS-bucketName', '');
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('aliOss_linkUrl', '阿里OSS-linkUrl', '');
+
+-- --------------------------------------------------------
+-- 时间 2023年06月21日
+-- by jishenghua
+-- 给商家表增加操作员字段,并给该字段赋默认值
+-- --------------------------------------------------------
+alter table jsh_supplier add creator bigint(20) DEFAULT NULL COMMENT '操作员' after sort;
+update jsh_supplier set creator=tenant_id;
+
+-- --------------------------------------------------------
+-- 时间 2023年08月15日
+-- by jishenghua
+-- 给平台配置表增加单据Excel地址
+-- --------------------------------------------------------
+INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('bill_excel_url', '单据Excel地址', '');
\ No newline at end of file
diff --git a/domain/pom.xml b/domain/pom.xml
deleted file mode 100644
index ad5e5dfa..00000000
--- a/domain/pom.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- wansnenerp
- wansentech
- 0.0.1-SNAPSHOT
-
- 4.0.0
- domain
-
-
- 17
- 17
-
-
-
\ No newline at end of file
diff --git a/domain/src/main/java/com/wansentech/api/dto/UserRegisterDto.java b/domain/src/main/java/com/wansentech/api/dto/UserRegisterDto.java
deleted file mode 100644
index 1ae4f05b..00000000
--- a/domain/src/main/java/com/wansentech/api/dto/UserRegisterDto.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.api.dto;
-
-import lombok.Data;
-
-@Data
-public class UserRegisterDto {
-
- private String userName;
-
- private String password;
-
- private String email;
-
- private String phoneNumber;
-}
diff --git a/domain/src/main/java/com/wansentech/api/package-info.java b/domain/src/main/java/com/wansentech/api/package-info.java
deleted file mode 100644
index 2ffed911..00000000
--- a/domain/src/main/java/com/wansentech/api/package-info.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * package wansentech.entity;
- *
- * This package store data object, Note: Naming specification (Dto, Vo)
- *
- * dto: Data Transfer Object
- * vo: View Object
- *
- */
-package com.wansentech.api;
\ No newline at end of file
diff --git a/domain/src/main/java/com/wansentech/dao/entity/User.java b/domain/src/main/java/com/wansentech/dao/entity/User.java
deleted file mode 100644
index b6e43c43..00000000
--- a/domain/src/main/java/com/wansentech/dao/entity/User.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.dao.entity;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-/**
- * @author jameszow
- */
-@Data
-public class User implements Serializable {
-
- private static final long serialVersionUID = -7992197375083373335L;
-
- private Long id;
-
- private String name;
-
- private String userName;
-
- private String password;
-
- private String email;
-
- private String phoneNumber;
-
- private int status;
-
- private String remark;
-
- private Long tenantId;
-
-}
diff --git a/domain/src/main/java/com/wansentech/dao/package-info.java b/domain/src/main/java/com/wansentech/dao/package-info.java
deleted file mode 100644
index 03582f18..00000000
--- a/domain/src/main/java/com/wansentech/dao/package-info.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * package wansentech.entity;
- *
- * This package store data object, Note: Naming specification (datatable field name, Po)
- *
- * entity: Directly corresponding to database native fields And database field 1 to 1
- * po: Persistence layer object, do not operate the database directly
- *
- */
-package com.wansentech.dao;
\ No newline at end of file
diff --git a/domain/src/main/java/com/wansentech/dao/po/UserRegisterPo.java b/domain/src/main/java/com/wansentech/dao/po/UserRegisterPo.java
deleted file mode 100644
index 87c6cd97..00000000
--- a/domain/src/main/java/com/wansentech/dao/po/UserRegisterPo.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.dao.po;
-
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-@Data
-@Builder
-@NoArgsConstructor
-@AllArgsConstructor
-public class UserRegisterPo {
-
- private Long id;
-
- private String name;
-
- private String userName;
-
- private String password;
-
- private String email;
-
- private String phoneNumber;
-
- private int status;
-
- private String remark;
-
- private Long tenantId;
-}
diff --git a/domain/src/main/java/com/wansentech/service/bo/UserRegisterBo.java b/domain/src/main/java/com/wansentech/service/bo/UserRegisterBo.java
deleted file mode 100644
index d5c4139d..00000000
--- a/domain/src/main/java/com/wansentech/service/bo/UserRegisterBo.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.service.bo;
-
-import lombok.Builder;
-import lombok.Data;
-
-@Data
-@Builder
-public class UserRegisterBo {
-
- private Long id;
-
- private String name;
-
- private String userName;
-
- private String password;
-
- private String email;
-
- private String phoneNumber;
-
- private int status;
-
- private String remark;
-
- private Long tenantId;
-}
diff --git a/domain/src/main/java/com/wansentech/service/package-info.java b/domain/src/main/java/com/wansentech/service/package-info.java
deleted file mode 100644
index 63037dfc..00000000
--- a/domain/src/main/java/com/wansentech/service/package-info.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * package wansentech.entity;
- *
- * This package store data object, Note: Naming specification (Bo, do)
- *
- * bo: Business Object, Assembly of multiple persistence layer objects.
- * do: Domain Object, The corresponding entity of the receiving database has some mapping relationship with the database
- *
- * Note: Currently, the domain object has not been used, which does not mean that it will not be used later
- */
-package com.wansentech.service;
\ No newline at end of file
diff --git a/mvnw b/mvnw
deleted file mode 100755
index 8a8fb228..00000000
--- a/mvnw
+++ /dev/null
@@ -1,316 +0,0 @@
-#!/bin/sh
-# ----------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# ----------------------------------------------------------------------------
-
-# ----------------------------------------------------------------------------
-# Maven Start Up Batch script
-#
-# Required ENV vars:
-# ------------------
-# JAVA_HOME - location of a JDK home dir
-#
-# Optional ENV vars
-# -----------------
-# M2_HOME - location of maven2's installed home dir
-# MAVEN_OPTS - parameters passed to the Java VM when running Maven
-# e.g. to debug Maven itself, use
-# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-# ----------------------------------------------------------------------------
-
-if [ -z "$MAVEN_SKIP_RC" ] ; then
-
- if [ -f /usr/local/etc/mavenrc ] ; then
- . /usr/local/etc/mavenrc
- fi
-
- if [ -f /etc/mavenrc ] ; then
- . /etc/mavenrc
- fi
-
- if [ -f "$HOME/.mavenrc" ] ; then
- . "$HOME/.mavenrc"
- fi
-
-fi
-
-# OS specific support. $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-mingw=false
-case "`uname`" in
- CYGWIN*) cygwin=true ;;
- MINGW*) mingw=true;;
- Darwin*) darwin=true
- # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
- # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
- if [ -z "$JAVA_HOME" ]; then
- if [ -x "/usr/libexec/java_home" ]; then
- export JAVA_HOME="`/usr/libexec/java_home`"
- else
- export JAVA_HOME="/Library/Java/Home"
- fi
- fi
- ;;
-esac
-
-if [ -z "$JAVA_HOME" ] ; then
- if [ -r /etc/gentoo-release ] ; then
- JAVA_HOME=`java-config --jre-home`
- fi
-fi
-
-if [ -z "$M2_HOME" ] ; then
- ## resolve links - $0 may be a link to maven's home
- PRG="$0"
-
- # need this for relative symlinks
- while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG="`dirname "$PRG"`/$link"
- fi
- done
-
- saveddir=`pwd`
-
- M2_HOME=`dirname "$PRG"`/..
-
- # make it fully qualified
- M2_HOME=`cd "$M2_HOME" && pwd`
-
- cd "$saveddir"
- # echo Using m2 at $M2_HOME
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --unix "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-# For Mingw, ensure paths are in UNIX format before anything is touched
-if $mingw ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME="`(cd "$M2_HOME"; pwd)`"
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
-fi
-
-if [ -z "$JAVA_HOME" ]; then
- javaExecutable="`which javac`"
- if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
- # readlink(1) is not available as standard on Solaris 10.
- readLink=`which readlink`
- if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
- if $darwin ; then
- javaHome="`dirname \"$javaExecutable\"`"
- javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
- else
- javaExecutable="`readlink -f \"$javaExecutable\"`"
- fi
- javaHome="`dirname \"$javaExecutable\"`"
- javaHome=`expr "$javaHome" : '\(.*\)/bin'`
- JAVA_HOME="$javaHome"
- export JAVA_HOME
- fi
- fi
-fi
-
-if [ -z "$JAVACMD" ] ; then
- if [ -n "$JAVA_HOME" ] ; then
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
- # IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD="`\\unset -f command; \\command -v java`"
- fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly." >&2
- echo " We cannot execute $JAVACMD" >&2
- exit 1
-fi
-
-if [ -z "$JAVA_HOME" ] ; then
- echo "Warning: JAVA_HOME environment variable is not set."
-fi
-
-CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
-
-# traverses directory structure from process work directory to filesystem root
-# first directory with .mvn subdirectory is considered project base directory
-find_maven_basedir() {
-
- if [ -z "$1" ]
- then
- echo "Path not specified to find_maven_basedir"
- return 1
- fi
-
- basedir="$1"
- wdir="$1"
- while [ "$wdir" != '/' ] ; do
- if [ -d "$wdir"/.mvn ] ; then
- basedir=$wdir
- break
- fi
- # workaround for JBEAP-8937 (on Solaris 10/Sparc)
- if [ -d "${wdir}" ]; then
- wdir=`cd "$wdir/.."; pwd`
- fi
- # end of workaround
- done
- echo "${basedir}"
-}
-
-# concatenates all lines of a file
-concat_lines() {
- if [ -f "$1" ]; then
- echo "$(tr -s '\n' ' ' < "$1")"
- fi
-}
-
-BASE_DIR=`find_maven_basedir "$(pwd)"`
-if [ -z "$BASE_DIR" ]; then
- exit 1;
-fi
-
-##########################################################################################
-# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
-# This allows using the maven wrapper in projects that prohibit checking in binary data.
-##########################################################################################
-if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found .mvn/wrapper/maven-wrapper.jar"
- fi
-else
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
- fi
- if [ -n "$MVNW_REPOURL" ]; then
- jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
- else
- jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
- fi
- while IFS="=" read key value; do
- case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
- esac
- done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Downloading from: $jarUrl"
- fi
- wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
- if $cygwin; then
- wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
- fi
-
- if command -v wget > /dev/null; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found wget ... using wget"
- fi
- if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
- wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
- else
- wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
- fi
- elif command -v curl > /dev/null; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found curl ... using curl"
- fi
- if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
- curl -o "$wrapperJarPath" "$jarUrl" -f
- else
- curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
- fi
-
- else
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Falling back to using Java to download"
- fi
- javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
- # For Cygwin, switch paths to Windows format before running javac
- if $cygwin; then
- javaClass=`cygpath --path --windows "$javaClass"`
- fi
- if [ -e "$javaClass" ]; then
- if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo " - Compiling MavenWrapperDownloader.java ..."
- fi
- # Compiling the Java class
- ("$JAVA_HOME/bin/javac" "$javaClass")
- fi
- if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
- # Running the downloader
- if [ "$MVNW_VERBOSE" = true ]; then
- echo " - Running MavenWrapperDownloader.java ..."
- fi
- ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
- fi
- fi
- fi
-fi
-##########################################################################################
-# End of extension
-##########################################################################################
-
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
-if [ "$MVNW_VERBOSE" = true ]; then
- echo $MAVEN_PROJECTBASEDIR
-fi
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --path --windows "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- [ -n "$MAVEN_PROJECTBASEDIR" ] &&
- MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
-fi
-
-# Provide a "standardized" way to retrieve the CLI args that will
-# work with both Windows and non-Windows executions.
-MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
-export MAVEN_CMD_LINE_ARGS
-
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-exec "$JAVACMD" \
- $MAVEN_OPTS \
- $MAVEN_DEBUG_OPTS \
- -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
- "-Dmaven.home=${M2_HOME}" \
- "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
- ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
deleted file mode 100644
index 1d8ab018..00000000
--- a/mvnw.cmd
+++ /dev/null
@@ -1,188 +0,0 @@
-@REM ----------------------------------------------------------------------------
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM https://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-@REM ----------------------------------------------------------------------------
-
-@REM ----------------------------------------------------------------------------
-@REM Maven Start Up Batch script
-@REM
-@REM Required ENV vars:
-@REM JAVA_HOME - location of a JDK home dir
-@REM
-@REM Optional ENV vars
-@REM M2_HOME - location of maven2's installed home dir
-@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
-@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
-@REM e.g. to debug Maven itself, use
-@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-@REM ----------------------------------------------------------------------------
-
-@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
-@echo off
-@REM set title of command window
-title %0
-@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
-@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
-
-@REM set %HOME% to equivalent of $HOME
-if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
-
-@REM Execute a user defined script before this one
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
-@REM check for pre script, once with legacy .bat ending and once with .cmd ending
-if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
-if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
-:skipRcPre
-
-@setlocal
-
-set ERROR_CODE=0
-
-@REM To isolate internal variables from possible post scripts, we use another setlocal
-@setlocal
-
-@REM ==== START VALIDATION ====
-if not "%JAVA_HOME%" == "" goto OkJHome
-
-echo.
-echo Error: JAVA_HOME not found in your environment. >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
-
-:OkJHome
-if exist "%JAVA_HOME%\bin\java.exe" goto init
-
-echo.
-echo Error: JAVA_HOME is set to an invalid directory. >&2
-echo JAVA_HOME = "%JAVA_HOME%" >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
-
-@REM ==== END VALIDATION ====
-
-:init
-
-@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
-@REM Fallback to current working directory if not found.
-
-set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
-IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
-
-set EXEC_DIR=%CD%
-set WDIR=%EXEC_DIR%
-:findBaseDir
-IF EXIST "%WDIR%"\.mvn goto baseDirFound
-cd ..
-IF "%WDIR%"=="%CD%" goto baseDirNotFound
-set WDIR=%CD%
-goto findBaseDir
-
-:baseDirFound
-set MAVEN_PROJECTBASEDIR=%WDIR%
-cd "%EXEC_DIR%"
-goto endDetectBaseDir
-
-:baseDirNotFound
-set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
-cd "%EXEC_DIR%"
-
-:endDetectBaseDir
-
-IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
-
-@setlocal EnableExtensions EnableDelayedExpansion
-for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
-@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
-
-:endReadAdditionalConfig
-
-SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
-set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
-set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
-
-FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
- IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
-)
-
-@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
-@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
-if exist %WRAPPER_JAR% (
- if "%MVNW_VERBOSE%" == "true" (
- echo Found %WRAPPER_JAR%
- )
-) else (
- if not "%MVNW_REPOURL%" == "" (
- SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
- )
- if "%MVNW_VERBOSE%" == "true" (
- echo Couldn't find %WRAPPER_JAR%, downloading it ...
- echo Downloading from: %DOWNLOAD_URL%
- )
-
- powershell -Command "&{"^
- "$webclient = new-object System.Net.WebClient;"^
- "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
- "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
- "}"^
- "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
- "}"
- if "%MVNW_VERBOSE%" == "true" (
- echo Finished downloading %WRAPPER_JAR%
- )
-)
-@REM End of extension
-
-@REM Provide a "standardized" way to retrieve the CLI args that will
-@REM work with both Windows and non-Windows executions.
-set MAVEN_CMD_LINE_ARGS=%*
-
-%MAVEN_JAVA_EXE% ^
- %JVM_CONFIG_MAVEN_PROPS% ^
- %MAVEN_OPTS% ^
- %MAVEN_DEBUG_OPTS% ^
- -classpath %WRAPPER_JAR% ^
- "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
- %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
-if ERRORLEVEL 1 goto error
-goto end
-
-:error
-set ERROR_CODE=1
-
-:end
-@endlocal & set ERROR_CODE=%ERROR_CODE%
-
-if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
-if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
-:skipRcPost
-
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%"=="on" pause
-
-if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
-
-cmd /C exit /B %ERROR_CODE%
diff --git a/plugs/pom.xml b/plugs/pom.xml
deleted file mode 100644
index e2f86109..00000000
--- a/plugs/pom.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- wansnenerp
- wansentech
- 0.0.1-SNAPSHOT
-
- 4.0.0
- jar
- plugs
-
-
- 17
- 17
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 0de8ac86..7ff1dff3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,58 +1,158 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ com.wansensoft
+ WanSenERP
+ 1.0-SNAPSHOT
+ jar
+
+ WanSenERP
+ 万森ERP
+
org.springframework.boot
spring-boot-starter-parent
- 3.0.3
-
+ 3.1.3
- wansentech
- wansnenerp
- pom
- 0.0.1-SNAPSHOT
- wansnenerp
- WanSen erp system
+
- 17
- true
+ UTF-8
+ UTF-8
+ 17
+ 17
-
- domain
- utils
- plugs
- service
- dao
- api
-
+
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
test
-
-
- org.slf4j
- slf4j-simple
- 1.7.32
- compile
-
-
-
- org.projectlombok
- lombok
- 1.18.24
- provided
-
-
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ javax.servlet
+ javax.servlet-api
+ 4.0.1
+ provided
+
+
+ com.alibaba
+ fastjson
+ 1.2.83
+
+
+ mysql
+ mysql-connector-java
+ 8.0.32
+
+
+
+ org.apache.httpcomponents
+ httpclient
+ 4.5.14
+
+
+ net.sourceforge.jexcelapi
+ jxl
+ 2.6.12
+
+
+
+ org.projectlombok
+ lombok
+ 1.18.24
+ provided
+
+
+
+ javax.mail
+ javax.mail-api
+ 1.5.6
+
+
+
+ org.apache.logging.log4j
+ log4j-to-slf4j
+ 2.15.0
+ compile
+
+
+ org.slf4j
+ jul-to-slf4j
+ 1.7.25
+ compile
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ 3.5.3.1
+
+
+ com.baomidou
+ dynamic-datasource-spring-boot-starter
+ 3.4.1
+
+
+ io.springfox
+ springfox-boot-starter
+ 3.0.0
+
+
+
+
+
+
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ 3.16.3
+
-
+
+ WanSenERP
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ build-info
+ generate-sources
+
+ build-info
+
+
+
+ repackage
+ package
+
+ repackage
+
+
+ com.wansensoft.erp.ErpApplication
+
+
+
+
+
+ org.mybatis.generator
+ mybatis-generator-maven-plugin
+ 1.4.0
+
+ ${basedir}/src/test/resources/generatorConfig.xml
+ true
+ true
+
+
+
+
diff --git a/service/pom.xml b/service/pom.xml
deleted file mode 100644
index 9ccb2f31..00000000
--- a/service/pom.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
- wansnenerp
- wansentech
- 0.0.1-SNAPSHOT
-
- 4.0.0
- jar
- service
-
-
- 17
- 17
-
-
-
-
- wansentech
- domain
- 0.0.1-SNAPSHOT
-
-
-
- wansentech
- dao
- 0.0.1-SNAPSHOT
-
-
-
\ No newline at end of file
diff --git a/service/src/main/java/com/wansentech/user/UserService.java b/service/src/main/java/com/wansentech/user/UserService.java
deleted file mode 100644
index caef1137..00000000
--- a/service/src/main/java/com/wansentech/user/UserService.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.user;
-
-import com.wansentech.Response;
-import com.wansentech.service.bo.UserRegisterBo;
-
-public interface UserService {
-
- Response addUser(UserRegisterBo userRegisterBo);
-}
diff --git a/service/src/main/java/com/wansentech/user/impl/UserServiceImpl.java b/service/src/main/java/com/wansentech/user/impl/UserServiceImpl.java
deleted file mode 100644
index 8c58c49b..00000000
--- a/service/src/main/java/com/wansentech/user/impl/UserServiceImpl.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2023 wansentech.com, Inc. or its affiliates. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.wansentech.user.impl;
-
-import com.wansentech.Response;
-import com.wansentech.SnowflakeIdUtil;
-import com.wansentech.aggregateservice.UserAggregate;
-import com.wansentech.dao.po.UserRegisterPo;
-import com.wansentech.enums.CodeEnum;
-import com.wansentech.mappers.UserMapper;
-import com.wansentech.service.bo.UserRegisterBo;
-import com.wansentech.user.UserService;
-import jakarta.annotation.Resource;
-import lombok.extern.slf4j.Slf4j;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-/**
- * user interface (Service layer)
- */
-@Service
-@Slf4j
-public class UserServiceImpl implements UserService {
-
- private final UserMapper userMapper;
- private final UserAggregate userAggregate;
-
- public UserServiceImpl(UserMapper userMapper, UserAggregate userAggregate) {
- this.userMapper = userMapper;
- this.userAggregate = userAggregate;
- }
-
- @Override
- public Response addUser(UserRegisterBo userRegisterBo) {
- // check exist user
- boolean existUserName = userAggregate.existUser(userRegisterBo.getUserName());
- if (existUserName) {
- return Response.responseMsg(CodeEnum.USER_EXISTS);
- }
-
- UserRegisterPo userRegisterPo = UserRegisterPo.builder()
- .id(SnowflakeIdUtil.nextId())
- .name(userRegisterBo.getName())
- .userName(userRegisterBo.getUserName())
- .password(userRegisterBo.getPassword())
- .email(userRegisterBo.getEmail())
- .phoneNumber(userRegisterBo.getPhoneNumber()).
- status(0).
- remark(userRegisterBo.getRemark()).
- tenantId(userRegisterBo.getTenantId()).build();
-
- boolean result = userAggregate.insertUser(userRegisterPo);
- if (result) {
- return Response.responseMsg(CodeEnum.REGISTER_SUCCESS);
- }
-
- return Response.fail();
- }
-}
diff --git a/src/main/assembly/assembly.xml b/src/main/assembly/assembly.xml
new file mode 100644
index 00000000..1478080c
--- /dev/null
+++ b/src/main/assembly/assembly.xml
@@ -0,0 +1,67 @@
+
+
+
+ bin
+
+
+ zip
+
+
+ true
+
+
+
+ ${project.basedir}/target
+
+ *.jar
+
+ /lib
+
+
+ ${project.basedir}/src/main/resources
+
+ *.properties
+ *.yml
+ *.yaml
+ *.xml
+
+ /config
+
+
+ ${project.basedir}/src/main/bin
+ /bin
+
+ run-manage.sh
+
+ unix
+
+
+ ${project.basedir}/src/main/bin/
+ /
+
+ start.bat
+ restart.sh
+ start.sh
+ stop.sh
+ status.sh
+
+
+
+ docs
+ /docs
+
+
+ ${project.basedir}
+
+ *.md
+ *.txt
+
+ /
+
+
+
\ No newline at end of file
diff --git a/src/main/bin/restart.sh b/src/main/bin/restart.sh
new file mode 100644
index 00000000..70c0be15
--- /dev/null
+++ b/src/main/bin/restart.sh
@@ -0,0 +1 @@
+./bin/run-manage.sh restart
\ No newline at end of file
diff --git a/src/main/bin/run-manage.sh b/src/main/bin/run-manage.sh
new file mode 100644
index 00000000..45d493de
--- /dev/null
+++ b/src/main/bin/run-manage.sh
@@ -0,0 +1,131 @@
+SERVER_NAME=jshERP
+readonly APP_HOME=${FILE_PATH:-$(dirname $(cd `dirname $0`; pwd))}
+#readonly JAVA_HOME=""
+readonly CONFIG_HOME="$APP_HOME/config/"
+readonly LIB_HOME="$APP_HOME/lib"
+readonly LOGS_HOME="$APP_HOME/logs"
+readonly PID_FILE="$LOGS_HOME/application.pid"
+readonly APP_MAIN_CLASS="jshERP.jar"
+readonly LOG_CONFIG="$CONFIG_HOME/logback-spring.xml"
+readonly JAVA_RUN="-Dlogs.home=$LOGS_HOME -Dlogging.config=$LOG_CONFIG -Dspring.config.location=file:$CONFIG_HOME -Dspring.pid.file=$PID_FILE -Dspring.pid.fail-on-write-error=true"
+readonly JAVA_OPTS="-server -Xms128m -Xmx320m -XX:PermSize=128M -XX:MaxPermSize=256M $JAVA_RUN"
+readonly JAVA="java"
+PID=0
+if [ ! -x "$LOGS_HOME" ]
+then
+ mkdir $LOGS_HOME
+fi
+chmod +x -R "$JAVA_HOME/bin/"
+functions="/etc/functions.sh"
+if test -f $functions ; then
+ . $functions
+else
+ success()
+ {
+ echo " SUCCESS! $@"
+ }
+ failure()
+ {
+ echo " ERROR! $@"
+ }
+ warning()
+ {
+ echo "WARNING! $@"
+ }
+fi
+function checkpid() {
+ PID=$(ps -ef | grep $APP_MAIN_CLASS | grep -v 'grep' | awk '{print int($2)}')
+ if [[ -n "$PID" ]]
+ then
+ return 0
+ else
+ return 1
+ fi
+}
+function start() {
+ checkpid
+ if [[ $? -eq 0 ]]
+ then
+ warning "[$APP_MAIN_CLASS]: already started! (PID=$PID)"
+ else
+ echo -n "[$APP_MAIN_CLASS]: Starting ..."
+ JAVA_CMD="nohup $JAVA $JAVA_OPTS -jar $LIB_HOME/$APP_MAIN_CLASS > /dev/null 2>&1 &"
+ # echo "Exec cmmand : $JAVA_CMD"
+ sh -c "$JAVA_CMD"
+ sleep 3
+ checkpid
+ if [[ $? -eq 0 ]]
+ then
+ success "(PID=$PID) "
+ else
+ failure " "
+ fi
+ fi
+}
+function stop() {
+ checkpid
+ if [[ $? -eq 0 ]];
+ then
+ echo -n "[$APP_MAIN_CLASS]: Shutting down ...(PID=$PID) "
+ kill -9 $PID
+ if [[ $? -eq 0 ]];
+ then
+ echo 0 > $PID_FILE
+ success " "
+ else
+ failure " "
+ fi
+ else
+ warning "[$APP_MAIN_CLASS]: is not running ..."
+ fi
+}
+function status() {
+ checkpid
+ if [[ $? -eq 0 ]]
+ then
+ success "[$APP_MAIN_CLASS]: is running! (PID=$PID)"
+ return 0
+ else
+ failure "[$APP_MAIN_CLASS]: is not running"
+ return 1
+ fi
+}
+function info() {
+ echo "System Information:"
+ echo
+ echo "****************************"
+ echo `head -n 1 /etc/issue`
+ echo `uname -a`
+ echo
+ echo "JAVA_HOME=$JAVA_HOME"
+ echo
+ echo "JAVA Environment Information:"
+ echo `$JAVA -version`
+ echo
+ echo "APP_HOME=$APP_HOME"
+ echo "APP_MAIN_CLASS=$APP_MAIN_CLASS"
+ echo
+ echo "****************************"
+}
+case "$1" in
+ 'start')
+ start
+ ;;
+ 'stop')
+ stop
+ ;;
+ 'restart')
+ stop
+ start
+ ;;
+ 'status')
+ status
+ ;;
+ 'info')
+ info
+ ;;
+ *)
+ echo "Usage: $0 {help|start|stop|restart|status|info}"
+ ;;
+esac
+exit 0
\ No newline at end of file
diff --git a/src/main/bin/start.bat b/src/main/bin/start.bat
new file mode 100644
index 00000000..37b8bb51
--- /dev/null
+++ b/src/main/bin/start.bat
@@ -0,0 +1,6 @@
+@echo off
+
+title jshERP
+
+java -Xms1000m -Xmx2000m -jar .\lib\jshERP.jar
+pause over
\ No newline at end of file
diff --git a/src/main/bin/start.sh b/src/main/bin/start.sh
new file mode 100644
index 00000000..d0bf0677
--- /dev/null
+++ b/src/main/bin/start.sh
@@ -0,0 +1 @@
+./bin/run-manage.sh start
\ No newline at end of file
diff --git a/src/main/bin/status.sh b/src/main/bin/status.sh
new file mode 100644
index 00000000..46d65372
--- /dev/null
+++ b/src/main/bin/status.sh
@@ -0,0 +1 @@
+./bin/run-manage.sh status
\ No newline at end of file
diff --git a/src/main/bin/stop.sh b/src/main/bin/stop.sh
new file mode 100644
index 00000000..8f3414e7
--- /dev/null
+++ b/src/main/bin/stop.sh
@@ -0,0 +1 @@
+./bin/run-manage.sh stop
\ No newline at end of file
diff --git a/src/main/java/com/wansensoft/erp/ErpApplication.java b/src/main/java/com/wansensoft/erp/ErpApplication.java
new file mode 100644
index 00000000..451df396
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/ErpApplication.java
@@ -0,0 +1,26 @@
+package com.wansensoft.erp;
+
+import com.wansensoft.erp.utils.ComputerInfo;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.core.env.Environment;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+import java.io.IOException;
+
+@SpringBootApplication
+@MapperScan(basePackages = {"com.wansensoft.erp.datasource.mappers"})
+@ServletComponentScan
+@EnableScheduling
+public class ErpApplication{
+ public static void main(String[] args) throws IOException {
+ ConfigurableApplicationContext context = SpringApplication.run(ErpApplication.class, args);
+ Environment environment = context.getBean(Environment.class);
+ System.out.println("启动成功,后端服务API地址:http://" + ComputerInfo.getIpAddr() + ":"
+ + environment.getProperty("server.port") + "/wansenerp/doc.html");
+ System.out.println("您还需启动前端服务,启动命令:yarn run serve 或 npm run serve,测试用户:jsh,密码:123456");
+ }
+}
diff --git a/src/main/java/com/wansensoft/erp/config/Swagger2Config.java b/src/main/java/com/wansensoft/erp/config/Swagger2Config.java
new file mode 100644
index 00000000..efeadcc9
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/config/Swagger2Config.java
@@ -0,0 +1,44 @@
+package com.wansensoft.erp.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * 插件集成配置
+ *
+ * @author jishenghua
+ * @version 1.0
+ */
+@Configuration
+@EnableSwagger2
+public class Swagger2Config {
+
+ @Bean
+ public Docket createRestApi() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .apiInfo(this.apiInfo())
+ .select()
+ .apis(RequestHandlerSelectors.any())
+ .paths(PathSelectors.any())
+ .build();
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder()
+ .title("华夏ERP Restful Api")
+ .description("华夏ERP接口描述")
+ .termsOfServiceUrl("http://127.0.0.1")
+ .contact(new Contact("jishenghua", "", ""))
+ .version("3.0")
+ .build();
+ }
+
+}
diff --git a/src/main/java/com/wansensoft/erp/config/TenantConfig.java b/src/main/java/com/wansensoft/erp/config/TenantConfig.java
new file mode 100644
index 00000000..a763b9f1
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/config/TenantConfig.java
@@ -0,0 +1,112 @@
+package com.wansensoft.erp.config;
+
+import com.baomidou.mybatisplus.core.parser.ISqlParser;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
+import com.baomidou.mybatisplus.core.plugins.*;
+import com.wansensoft.erp.utils.Tools;
+import jakarta.servlet.http.HttpServletRequest;
+import net.sf.jsqlparser.expression.Expression;
+import net.sf.jsqlparser.expression.LongValue;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.reflection.MetaObject;
+import org.mybatis.spring.mapper.MapperScannerConfigurer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.stereotype.Service;
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class TenantConfig {
+
+// @Bean
+// public PaginationInnerInterceptor paginationInterceptor(HttpServletRequest request) {
+// PaginationInnerInterceptor paginationInterceptor = new PaginationInnerInterceptor();
+// List sqlParserList = new ArrayList<>();
+// TenantSqlParser tenantSqlParser = new TenantSqlParser();
+// tenantSqlParser.setTenantHandler(new TenantHandler() {
+// @Override
+// public Expression getTenantId() {
+// String token = request.getHeader("X-Access-Token");
+// Long tenantId = Tools.getTenantIdByToken(token);
+// if (tenantId!=0L) {
+// return new LongValue(tenantId);
+// } else {
+// //超管
+// return null;
+// }
+// }
+//
+// @Override
+// public String getTenantIdColumn() {
+// return "tenant_id";
+// }
+//
+// @Override
+// public boolean doTableFilter(String tableName) {
+// //获取开启状态
+// Boolean res = true;
+// String token = request.getHeader("X-Access-Token");
+// Long tenantId = Tools.getTenantIdByToken(token);
+// if (tenantId!=0L) {
+// // 这里可以判断是否过滤表
+// if ("jsh_material_property".equals(tableName) || "jsh_sequence".equals(tableName)
+// || "jsh_user_business".equals(tableName) || "jsh_function".equals(tableName)
+// || "jsh_platform_config".equals(tableName) || "jsh_tenant".equals(tableName)) {
+// res = true;
+// } else {
+// res = false;
+// }
+// }
+// return res;
+// }
+// });
+//
+// sqlParserList.add(tenantSqlParser);
+// paginationInterceptor.setSqlParserList(sqlParserList);
+// paginationInterceptor.setSqlParserFilter(new ISqlParserFilter() {
+// @Override
+// public boolean doFilter(MetaObject metaObject) {
+// MappedStatement ms = SqlParserHelper.getMappedStatement(metaObject);
+// // 过滤自定义查询此时无租户信息约束出现
+// if ("com.jsh.erp.datasource.mappers.UserMapperEx.getUserByWeixinOpenId".equals(ms.getId())) {
+// return true;
+// } else if ("com.jsh.erp.datasource.mappers.UserMapperEx.updateUserWithWeixinOpenId".equals(ms.getId())) {
+// return true;
+// } else if ("com.jsh.erp.datasource.mappers.UserMapperEx.getUserListByUserNameOrLoginName".equals(ms.getId())) {
+// return true;
+// } else if ("com.jsh.erp.datasource.mappers.UserMapperEx.disableUserByLimit".equals(ms.getId())) {
+// return true;
+// } else if ("com.jsh.erp.datasource.mappers.RoleMapperEx.getRoleWithoutTenant".equals(ms.getId())) {
+// return true;
+// } else if ("com.jsh.erp.datasource.mappers.LogMapperEx.insertLogWithUserId".equals(ms.getId())) {
+// return true;
+// }
+// return false;
+// }
+// });
+// return paginationInterceptor;
+// }
+
+ /**
+ * 相当于顶部的:
+ * {@code @MapperScan("com.wansensoft.erp.datasource.mappers*")}
+ * 这里可以扩展,比如使用配置文件来配置扫描Mapper的路径
+ */
+ @Bean
+ public MapperScannerConfigurer mapperScannerConfigurer() {
+ MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer();
+ scannerConfigurer.setBasePackage("com.wansensoft.erp.datasource.mappers*");
+ return scannerConfigurer;
+ }
+
+ /**
+ * 性能分析拦截器,不建议生产使用
+ */
+// @Bean
+// public PerformanceInterceptor performanceInterceptor(){
+// return new PerformanceInterceptor();
+// }
+
+
+}
diff --git a/src/main/java/com/wansensoft/erp/constants/BusinessConstants.java b/src/main/java/com/wansensoft/erp/constants/BusinessConstants.java
new file mode 100644
index 00000000..f218bfb3
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/constants/BusinessConstants.java
@@ -0,0 +1,213 @@
+package com.wansensoft.erp.constants;
+
+/**
+ * @ClassName:BusinessConstants
+ * @Description 业务字典类
+ * @Author qiankunpingtai
+ * @Date 2019-3-6 17:58
+ * @Version 1.0
+ **/
+public class BusinessConstants {
+
+ /**
+ * 默认的日期格式
+ */
+ public static final String DEFAULT_DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
+ /**
+ * 一天的初始时间
+ */
+ public static final String DAY_FIRST_TIME = " 00:00:00";
+ /**
+ * 一天的结束时间
+ */
+ public static final String DAY_LAST_TIME = " 23:59:59";
+ /**
+ * 默认的分页起始页页码
+ */
+ public static final Integer DEFAULT_PAGINATION_PAGE_NUMBER = 1;
+ /**
+ * 无数据时列表返回的默认数据条数
+ */
+ public static final Long DEFAULT_LIST_NULL_NUMBER = 0L;
+ /**
+ * 默认的分页条数
+ */
+ public static final Integer DEFAULT_PAGINATION_PAGE_SIZE = 10;
+ /**
+ * 单据主表出入库类型 type 入库 出库 其它
+ * depothead
+ * */
+ public static final String DEPOTHEAD_TYPE_IN = "入库";
+ public static final String DEPOTHEAD_TYPE_OUT = "出库";
+ public static final String DEPOTHEAD_TYPE_OTHER = "其它";
+ /**
+ * 付款类型 payType //现付/预付款
+ * */
+ public static final String PAY_TYPE_PREPAID = "预付款";
+ public static final String PAY_TYPE_BY_CASH = "现付";
+ /**
+ * 删除标记 deleteFlag '0'未删除 '1'已删除
+ * */
+ public static final String DELETE_FLAG_DELETED = "1";
+ public static final String DELETE_FLAG_EXISTS = "0";
+ /**
+ * 是否卖出 isSell '0'未卖出 '1'已卖出
+ * */
+ public static final String IS_SELL_SELLED = "1";
+ public static final String IS_SELL_HOLD = "0";
+ /**
+ * 商品是否开启序列号标识enableSerialNumber '0'未启用 '1'启用
+ * */
+ public static final String ENABLE_SERIAL_NUMBER_ENABLED = "1";
+ public static final String ENABLE_SERIAL_NUMBER_NOT_ENABLED = "0";
+ /**
+ * 商品是否开启批号标识enableBatchNumber '0'未启用 '1'启用
+ * */
+ public static final String ENABLE_BATCH_NUMBER_ENABLED = "1";
+ public static final String ENABLE_BATCH_NUMBER_NOT_ENABLED = "0";
+ /**
+ * 单据状态 billsStatus '0'未审核 '1'审核 '2'完成采购|销售 '3'部分采购|销售
+ * */
+ public static final String BILLS_STATUS_UN_AUDIT = "0";
+ public static final String BILLS_STATUS_AUDIT = "1";
+ public static final String BILLS_STATUS_SKIPED = "2";
+ public static final String BILLS_STATUS_SKIPING = "3";
+ /**
+ * 单据-采购状态 purchaseStatus '0'未采购、'2'完成采购、'3'部分采购
+ * */
+ public static final String PURCHASE_STATUS_UN_AUDIT = "0";
+ public static final String PURCHASE_STATUS_SKIPED = "2";
+ public static final String PURCHASE_STATUS_SKIPING = "3";
+ /**
+ * 出入库分类
+ *采购、采购退货、其它、零售、销售、调拨、盘点复盘等
+ * */
+ public static final String SUB_TYPE_PURCHASE_ORDER = "采购订单";
+ public static final String SUB_TYPE_PURCHASE = "采购";
+ public static final String SUB_TYPE_PURCHASE_RETURN = "采购退货";
+ public static final String SUB_TYPE_OTHER = "其它";
+ public static final String SUB_TYPE_RETAIL = "零售";
+ public static final String SUB_TYPE_RETAIL_RETURN = "零售退货";
+ public static final String SUB_TYPE_SALES_ORDER = "销售订单";
+ public static final String SUB_TYPE_SALES = "销售";
+ public static final String SUB_TYPE_SALES_RETURN = "销售退货";
+ public static final String SUB_TYPE_TRANSFER = "调拨";
+ public static final String SUB_TYPE_CHECK_ENTER = "盘点录入";
+ public static final String SUB_TYPE_REPLAY = "盘点复盘";
+ public static final String SUB_TYPE_ASSEMBLE = "组装单";
+ public static final String SUB_TYPE_DISASSEMBLE = "拆卸单";
+ /**
+ * 财务单据分类
+ * 收款、付款
+ * */
+ public static final String TYPE_MONEY_IN = "收款";
+ public static final String TYPE_MONEY_OUT = "付款";
+ /**
+ * 批量插入sql时最大的数据条数
+ * */
+ public static final int BATCH_INSERT_MAX_NUMBER = 500;
+ /**
+ * sequence名称
+ * */
+ //sequence返回字符串的最小长度
+ public static final Long SEQ_TO_STRING_MIN_LENGTH = 10000000000L;
+ //sequence长度小于基准长度时前追加基础值
+ public static final String SEQ_TO_STRING_LESS_INSERT = "0";
+ //单据编号
+ public static final String DEPOT_NUMBER_SEQ = "depot_number_seq";
+ /**
+ * 商品类别根目录id
+ * */
+ /**
+ * create by: qiankunpingtai
+ * create time: 2019/3/14 11:41
+ * description:
+ * 为了使用户可以自己建初始目录,设定根目录的父级目录id为-1
+ *
+ */
+ public static final Long MATERIAL_CATEGORY_ROOT_PARENT_ID = -1L;
+ /**
+ * 商品类别状态
+ * 0系统默认,1启用,2删除
+ * */
+ public static final String MATERIAL_CATEGORY_STATUS_DEFAULT = "0";
+ public static final String MATERIAL_CATEGORY_STATUS_ENABLE = "1";
+ public static final String MATERIAL_CATEGORY_STATUS_DELETE = "2";
+ /**
+ * 机构状态
+ * 1未营业、2正常营业、3暂停营业、4终止营业,5已除名
+ * */
+ public static final String ORGANIZATION_STCD_NOT_OPEN = "1";
+ public static final String ORGANIZATION_STCD_OPEN = "2";
+ public static final String ORGANIZATION_STCD_BUSINESS_SUSPENDED = "3";
+ public static final String ORGANIZATION_STCD_BUSINESS_TERMINATED = "4";
+ public static final String ORGANIZATION_STCD_REMOVED = "5";
+ /**
+ * 根机构父级编号
+ * 根机父级构编号默认为-1
+ * */
+ public static final String ORGANIZATION_ROOT_PARENT_NO = "-1";
+ /**
+ * 新增用户默认密码
+ * */
+ public static final String USER_DEFAULT_PASSWORD = "123456";
+ /**
+ * 用户是否系统自带
+ * 0、非系统自带,1系统自带
+ * */
+ public static final byte USER_NOT_SYSTEM = 0;
+ public static final byte USER_IS_SYSTEM = 1;
+ /**
+ * 用户是否为管理者
+ * 0、管理者,1员工
+ * */
+ public static final byte USER_IS_MANAGER = 0;
+ public static final byte USER_NOT_MANAGER = 1;
+ /**
+ * 用户状态
+ * 0:正常,1:删除,2封禁
+ * */
+ public static final byte USER_STATUS_NORMAL = 0;
+ public static final byte USER_STATUS_DELETE = 1;
+ public static final byte USER_STATUS_BANNED = 2;
+ /**
+ * 日志操作
+ * 新增、修改、删除、登录、导入
+ * */
+ public static final String LOG_OPERATION_TYPE_ADD = "新增";
+ public static final String LOG_OPERATION_TYPE_BATCH_ADD = "批量新增";
+ public static final String LOG_OPERATION_TYPE_EDIT = "修改";
+ public static final String LOG_OPERATION_TYPE_DELETE = "删除";
+ public static final String LOG_OPERATION_TYPE_LOGIN = "登录";
+ public static final String LOG_OPERATION_TYPE_IMPORT = "导入";
+ public static final String LOG_OPERATION_TYPE_ENABLED = "更新状态";
+
+ /**
+ * 数据数量单位
+ * 条
+ * */
+ public static final String LOG_DATA_UNIT = "条";
+
+ /**
+ * 删除类型
+ * 1正常删除
+ * 2强制删除
+ * */
+ public static final String DELETE_TYPE_NORMAL = "1";
+ public static final String DELETE_TYPE_FORCE = "2";
+
+ /**
+ * 默认管理员账号
+ */
+ public static final String DEFAULT_MANAGER = "admin";
+
+ public static final String ROLE_TYPE_PRIVATE = "个人数据";
+
+ public static final String ROLE_TYPE_THIS_ORG = "本机构数据";
+
+ /**
+ * redis相关
+ * */
+ //session的生命周期,秒
+ public static final Long MAX_SESSION_IN_SECONDS=60*60*24*3L;
+}
diff --git a/src/main/java/com/wansensoft/erp/constants/ExceptionConstants.java b/src/main/java/com/wansensoft/erp/constants/ExceptionConstants.java
new file mode 100644
index 00000000..02c72dac
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/constants/ExceptionConstants.java
@@ -0,0 +1,542 @@
+package com.wansensoft.erp.constants;
+
+import com.alibaba.fastjson.JSONObject;
+
+public class ExceptionConstants {
+ /**
+ * code 格式 type+五位数字,例如3500000
+ * ResourceInfo(value = "inOutItem", type = 35)
+ *
+ * */
+
+ public static final String GLOBAL_RETURNS_CODE = "code";
+ public static final String GLOBAL_RETURNS_MESSAGE = "msg";
+ public static final String GLOBAL_RETURNS_DATA = "data";
+
+ /**
+ * 正常返回/操作成功
+ **/
+ public static final int SERVICE_SUCCESS_CODE = 200;
+ public static final String SERVICE_SUCCESS_MSG = "操作成功";
+ /**
+ * 数据查询异常
+ */
+ public static final int DATA_READ_FAIL_CODE = 300;
+ public static final String DATA_READ_FAIL_MSG = "数据查询异常";
+ /**
+ * 数据写入异常
+ */
+ public static final int DATA_WRITE_FAIL_CODE = 301;
+ public static final String DATA_WRITE_FAIL_MSG = "数据写入异常";
+
+ /**
+ * 系统运行时未知错误
+ **/
+ public static final int SERVICE_SYSTEM_ERROR_CODE = 500;
+ public static final String SERVICE_SYSTEM_ERROR_MSG = "未知异常";
+ /**
+ * 检测到存在依赖数据,是否强制删除?
+ **/
+ public static final int DELETE_FORCE_CONFIRM_CODE = 601;
+ public static final String DELETE_FORCE_CONFIRM_MSG = "检测到存在依赖数据,不能删除!";
+ /**
+ * 用户信息
+ * type = 5
+ * */
+ //添加用户信息失败
+ public static final int USER_ADD_FAILED_CODE = 500000;
+ public static final String USER_ADD_FAILED_MSG = "添加用户信息失败";
+ //删除用户信息失败
+ public static final int USER_DELETE_FAILED_CODE = 500001;
+ public static final String USER_DELETE_FAILED_MSG = "删除用户信息失败";
+ //修改用户信息失败
+ public static final int USER_EDIT_FAILED_CODE = 500002;
+ public static final String USER_EDIT_FAILED_MSG = "修改用户信息失败";
+ //登录名已存在
+ public static final int USER_LOGIN_NAME_ALREADY_EXISTS_CODE = 500003;
+ public static final String USER_LOGIN_NAME_ALREADY_EXISTS_MSG = "登录名在本系统已存在";
+ //用户录入数量超出限制
+ public static final int USER_OVER_LIMIT_FAILED_CODE = 500004;
+ public static final String USER_OVER_LIMIT_FAILED_MSG = "用户录入数量超出限制,请联系平台管理员";
+ //此用户名限制使用
+ public static final int USER_NAME_LIMIT_USE_CODE = 500005;
+ public static final String USER_NAME_LIMIT_USE_MSG = "此用户名限制使用";
+ //启用的用户数量超出限制
+ public static final int USER_ENABLE_OVER_LIMIT_FAILED_CODE = 500006;
+ public static final String USER_ENABLE_OVER_LIMIT_FAILED_MSG = "启用的用户数量超出限制,请联系平台管理员";
+ //租户不能被删除
+ public static final int USER_LIMIT_TENANT_DELETE_CODE = 500008;
+ public static final String USER_LIMIT_TENANT_DELETE_MSG = "抱歉,租户不能被删除";
+ //当前机构已经存在经理
+ public static final int USER_LEADER_IS_EXIST_CODE = 500009;
+ public static final String USER_LEADER_IS_EXIST_MSG = "抱歉,当前机构已经存在经理";
+
+ /**
+ * 角色信息
+ * type = 10
+ * */
+ //添加角色信息失败
+ public static final int ROLE_ADD_FAILED_CODE = 1000000;
+ public static final String ROLE_ADD_FAILED_MSG = "添加角色信息失败";
+ //删除角色信息失败
+ public static final int ROLE_DELETE_FAILED_CODE = 1000001;
+ public static final String ROLE_DELETE_FAILED_MSG = "删除角色信息失败";
+ //修改角色信息失败
+ public static final int ROLE_EDIT_FAILED_CODE = 1000002;
+ public static final String ROLE_EDIT_FAILED_MSG = "修改角色信息失败";
+ /**
+ * 应用信息
+ * type = 15
+ * */
+ //添加角色信息失败
+ public static final int APP_ADD_FAILED_CODE = 1500000;
+ public static final String APP_ADD_FAILED_MSG = "添加应用信息失败";
+ //删除角色信息失败
+ public static final int APP_DELETE_FAILED_CODE = 1500001;
+ public static final String APP_DELETE_FAILED_MSG = "删除应用信息失败";
+ //修改角色信息失败
+ public static final int APP_EDIT_FAILED_CODE = 1500002;
+ public static final String APP_EDIT_FAILED_MSG = "修改应用信息失败";
+ /**
+ * 仓库信息
+ * type = 20
+ * */
+ //添加仓库信息失败
+ public static final int DEPOT_ADD_FAILED_CODE = 2000000;
+ public static final String DEPOT_ADD_FAILED_MSG = "添加仓库信息失败";
+ //删除仓库信息失败
+ public static final int DEPOT_DELETE_FAILED_CODE = 2000001;
+ public static final String DEPOT_DELETE_FAILED_MSG = "删除仓库信息失败";
+ //修改仓库信息失败
+ public static final int DEPOT_EDIT_FAILED_CODE = 2000002;
+ public static final String DEPOT_EDIT_FAILED_MSG = "修改仓库信息失败";
+
+ /**
+ * 功能模块信息
+ * type = 30
+ * */
+ //添加角色信息失败
+ public static final int FUNCTIONS_ADD_FAILED_CODE = 3000000;
+ public static final String FUNCTIONS_ADD_FAILED_MSG = "添加功能模块信息失败";
+ //删除角色信息失败
+ public static final int FUNCTIONS_DELETE_FAILED_CODE = 3000001;
+ public static final String FUNCTIONS_DELETE_FAILED_MSG = "删除功能模块信息失败";
+ //修改角色信息失败
+ public static final int FUNCTIONS_EDIT_FAILED_CODE = 3000002;
+ public static final String FUNCTIONS_EDIT_FAILED_MSG = "修改功能模块信息失败";
+ /**
+ * 收支项目信息
+ * type = 35
+ * */
+ //添加收支项目信息失败
+ public static final int IN_OUT_ITEM_ADD_FAILED_CODE = 3500000;
+ public static final String IN_OUT_ITEM_ADD_FAILED_MSG = "添加收支项目信息失败";
+ //删除收支项目信息失败
+ public static final int IN_OUT_ITEM_DELETE_FAILED_CODE = 3500001;
+ public static final String IN_OUT_ITEM_DELETE_FAILED_MSG = "删除收支项目信息失败";
+ //修改收支项目信息失败
+ public static final int IN_OUT_ITEM_EDIT_FAILED_CODE = 3500002;
+ public static final String IN_OUT_ITEM_EDIT_FAILED_MSG = "修改收支项目信息失败";
+ /**
+ * 多单位信息
+ * type = 40
+ * */
+ //添加多单位信息失败
+ public static final int UNIT_ADD_FAILED_CODE = 4000000;
+ public static final String UNIT_ADD_FAILED_MSG = "添加多单位信息失败";
+ //删除多单位信息失败
+ public static final int UNIT_DELETE_FAILED_CODE = 4000001;
+ public static final String UNIT_DELETE_FAILED_MSG = "删除多单位信息失败";
+ //修改多单位信息失败
+ public static final int UNIT_EDIT_FAILED_CODE = 4000002;
+ public static final String UNIT_EDIT_FAILED_MSG = "修改多单位信息失败";
+ /**
+ * 经手人信息
+ * type = 45
+ * */
+ //添加经手人信息失败
+ public static final int PERSON_ADD_FAILED_CODE = 4500000;
+ public static final String PERSON_ADD_FAILED_MSG = "添加经手人信息失败";
+ //删除经手人信息失败
+ public static final int PERSON_DELETE_FAILED_CODE = 4500001;
+ public static final String PERSON_DELETE_FAILED_MSG = "删除经手人信息失败";
+ //修改经手人信息失败
+ public static final int PERSON_EDIT_FAILED_CODE = 4500002;
+ public static final String PERSON_EDIT_FAILED_MSG = "修改经手人信息失败";
+ /**
+ * 用户角色模块关系信息
+ * type = 50
+ * */
+ //添加用户角色模块关系信息失败
+ public static final int USER_BUSINESS_ADD_FAILED_CODE = 5000000;
+ public static final String USER_BUSINESS_ADD_FAILED_MSG = "添加用户角色模块关系信息失败";
+ //删除用户角色模块关系信息失败
+ public static final int USER_BUSINESS_DELETE_FAILED_CODE = 5000001;
+ public static final String USER_BUSINESS_DELETE_FAILED_MSG = "删除用户角色模块关系信息失败";
+ //修改用户角色模块关系信息失败
+ public static final int USER_BUSINESS_EDIT_FAILED_CODE = 5000002;
+ public static final String USER_BUSINESS_EDIT_FAILED_MSG = "修改用户角色模块关系信息失败";
+ /**
+ * 系统参数信息
+ * type = 55
+ * */
+ //添加系统参数信息失败
+ public static final int SYSTEM_CONFIG_ADD_FAILED_CODE = 5500000;
+ public static final String SYSTEM_CONFIG_ADD_FAILED_MSG = "添加系统参数信息失败";
+ //删除系统参数信息失败
+ public static final int SYSTEM_CONFIG_DELETE_FAILED_CODE = 5500001;
+ public static final String SYSTEM_CONFIG_DELETE_FAILED_MSG = "删除系统参数信息失败";
+ //修改系统参数信息失败
+ public static final int SYSTEM_CONFIG_EDIT_FAILED_CODE = 5500002;
+ public static final String SYSTEM_CONFIG_EDIT_FAILED_MSG = "修改系统参数信息失败";
+ /**
+ * 商品扩展信息
+ * type = 60
+ * */
+ //添加商品扩展信息失败
+ public static final int MATERIAL_PROPERTY_ADD_FAILED_CODE = 6000000;
+ public static final String MATERIAL_PROPERTY_ADD_FAILED_MSG = "添加商品扩展信息失败";
+ //删除商品扩展信息失败
+ public static final int MATERIAL_PROPERTY_DELETE_FAILED_CODE = 6000001;
+ public static final String MATERIAL_PROPERTY_DELETE_FAILED_MSG = "删除商品扩展信息失败";
+ //修改商品扩展信息失败
+ public static final int MATERIAL_PROPERTY_EDIT_FAILED_CODE = 6000002;
+ public static final String MATERIAL_PROPERTY_EDIT_FAILED_MSG = "修改商品扩展信息失败";
+ /**
+ * 账户信息
+ * type = 65
+ * */
+ //添加账户信息失败
+ public static final int ACCOUNT_ADD_FAILED_CODE = 6500000;
+ public static final String ACCOUNT_ADD_FAILED_MSG = "添加账户信息失败";
+ //删除账户信息失败
+ public static final int ACCOUNT_DELETE_FAILED_CODE = 6500001;
+ public static final String ACCOUNT_DELETE_FAILED_MSG = "删除账户信息失败";
+ //修改账户信息失败
+ public static final int ACCOUNT_EDIT_FAILED_CODE = 6500002;
+ public static final String ACCOUNT_EDIT_FAILED_MSG = "修改账户信息失败";
+ /**
+ * 供应商信息
+ * type = 70
+ * */
+ //添加供应商信息失败
+ public static final int SUPPLIER_ADD_FAILED_CODE = 7000000;
+ public static final String SUPPLIER_ADD_FAILED_MSG = "添加供应商信息失败";
+ //删除供应商信息失败
+ public static final int SUPPLIER_DELETE_FAILED_CODE = 7000001;
+ public static final String SUPPLIER_DELETE_FAILED_MSG = "删除供应商信息失败";
+ //修改供应商信息失败
+ public static final int SUPPLIER_EDIT_FAILED_CODE = 7000002;
+ public static final String SUPPLIER_EDIT_FAILED_MSG = "修改供应商信息失败";
+ /**
+ * 商品类别信息
+ * type = 75
+ * */
+ //添加商品类别信息失败
+ public static final int MATERIAL_CATEGORY_ADD_FAILED_CODE = 7500000;
+ public static final String MATERIAL_CATEGORY_ADD_FAILED_MSG = "添加商品类别信息失败";
+ //删除商品类别信息失败
+ public static final int MATERIAL_CATEGORY_DELETE_FAILED_CODE = 7500001;
+ public static final String MATERIAL_CATEGORY_DELETE_FAILED_MSG = "删除商品类别信息失败";
+ //修改商品类别信息失败
+ public static final int MATERIAL_CATEGORY_EDIT_FAILED_CODE = 7500002;
+ public static final String MATERIAL_CATEGORY_EDIT_FAILED_MSG = "修改商品类别信息失败";
+ //商品类别编号已存在
+ public static final int MATERIAL_CATEGORY_SERIAL_ALREADY_EXISTS_CODE = 7500003;
+ public static final String MATERIAL_CATEGORY_SERIAL_ALREADY_EXISTS_MSG = "商品类别编号已存在";
+ //根类别不支持修改
+ public static final int MATERIAL_CATEGORY_ROOT_NOT_SUPPORT_EDIT_CODE = 7500004;
+ public static final String MATERIAL_CATEGORY_ROOT_NOT_SUPPORT_EDIT_MSG = "根类别不支持修改";
+ //根类别不支持删除
+ public static final int MATERIAL_CATEGORY_ROOT_NOT_SUPPORT_DELETE_CODE = 7500005;
+ public static final String MATERIAL_CATEGORY_ROOT_NOT_SUPPORT_DELETE_MSG = "根类别不支持删除";
+ //该类别存在下级不允许删除
+ public static final int MATERIAL_CATEGORY_CHILD_NOT_SUPPORT_DELETE_CODE = 7500006;
+ public static final String MATERIAL_CATEGORY_CHILD_NOT_SUPPORT_DELETE_MSG = "该类别存在下级不允许删除";
+ /**
+ * 商品信息
+ * type = 80
+ * */
+ //商品信息不存在
+ public static final int MATERIAL_NOT_EXISTS_CODE = 8000000;
+ public static final String MATERIAL_NOT_EXISTS_MSG = "商品信息不存在";
+ //商品信息不唯一
+ public static final int MATERIAL_NOT_ONLY_CODE = 8000001;
+ public static final String MATERIAL_NOT_ONLY_MSG = "商品信息不唯一";
+ //该商品未开启序列号
+ public static final int MATERIAL_NOT_ENABLE_SERIAL_NUMBER_CODE = 8000002;
+ public static final String MATERIAL_NOT_ENABLE_SERIAL_NUMBER_MSG = "该商品未开启序列号功能";
+ //商品的序列号不能为空
+ public static final int MATERIAL_SERIAL_NUMBERE_EMPTY_CODE = 8000003;
+ public static final String MATERIAL_SERIAL_NUMBERE_EMPTY_MSG = "抱歉,商品条码:%s的序列号不能为空";
+ //商品库存不足
+ public static final int MATERIAL_STOCK_NOT_ENOUGH_CODE = 8000004;
+ public static final String MATERIAL_STOCK_NOT_ENOUGH_MSG = "商品:%s库存不足";
+ //商品条码重复
+ public static final int MATERIAL_BARCODE_EXISTS_CODE = 8000005;
+ public static final String MATERIAL_BARCODE_EXISTS_MSG = "商品条码:%s重复";
+ //商品-单位匹配不上
+ public static final int MATERIAL_UNIT_MATE_CODE = 8000006;
+ public static final String MATERIAL_UNIT_MATE_MSG = "抱歉,商品条码:%s的单位匹配不上,请完善计量单位信息!";
+ //商品条码长度应该为4到40位
+ public static final int MATERIAL_BARCODE_LENGTH_ERROR_CODE = 8000007;
+ public static final String MATERIAL_BARCODE_LENGTH_ERROR_MSG = "商品条码长度应该为4到40位";
+ //序列号和批号只能有一项
+ public static final int MATERIAL_ENABLE_MUST_ONE_CODE = 8000008;
+ public static final String MATERIAL_ENABLE_MUST_ONE_MSG = "抱歉,商品条码:%s的序列号和批号不能同时填1";
+ //抱歉,文件扩展名必须为xls
+ public static final int MATERIAL_EXTENSION_ERROR_CODE = 8000009;
+ public static final String MATERIAL_EXTENSION_ERROR_MSG = "抱歉,文件扩展名必须为xls";
+ //名称为空
+ public static final int MATERIAL_NAME_EMPTY_CODE = 8000010;
+ public static final String MATERIAL_NAME_EMPTY_MSG = "第%s行名称为空";
+ //基本单位为空
+ public static final int MATERIAL_UNIT_EMPTY_CODE = 8000011;
+ public static final String MATERIAL_UNIT_EMPTY_MSG = "第%s行基本单位为空";
+ //状态格式错误
+ public static final int MATERIAL_ENABLED_ERROR_CODE = 8000012;
+ public static final String MATERIAL_ENABLED_ERROR_MSG = "第%s行状态格式错误";
+ //单次导入超出1000条
+ public static final int MATERIAL_IMPORT_OVER_LIMIT_CODE = 8000013;
+ public static final String MATERIAL_IMPORT_OVER_LIMIT_MSG = "抱歉,单次导入不能超出1000条";
+ //基础重量格式错误
+ public static final int MATERIAL_WEIGHT_NOT_DECIMAL_CODE = 8000014;
+ public static final String MATERIAL_WEIGHT_NOT_DECIMAL_MSG = "第%s行基础重量格式错误";
+ //保质期格式错误
+ public static final int MATERIAL_EXPIRY_NUM_NOT_INTEGER_CODE = 8000015;
+ public static final String MATERIAL_EXPIRY_NUM_NOT_INTEGER_MSG = "第%s行保质期格式错误";
+ //比例格式错误
+ public static final int MATERIAL_RATIO_NOT_INTEGER_CODE = 8000016;
+ public static final String MATERIAL_RATIO_NOT_INTEGER_MSG = "第%s行比例格式错误";
+ //组装拆卸单不能选择批号或序列号商品
+ public static final int MATERIAL_ASSEMBLE_SELECT_ERROR_CODE = 80000017;
+ public static final String MATERIAL_ASSEMBLE_SELECT_ERROR_MSG = "抱歉,组装拆卸单不能选择批号或序列号商品:%s";
+ //调拨单不能选择批号或序列号商品
+ public static final int MATERIAL_TRANSFER_SELECT_ERROR_CODE = 80000018;
+ public static final String MATERIAL_TRANSFER_SELECT_ERROR_MSG = "抱歉,调拨单不能选择批号或序列号商品:%s,建议走其它入库和出库单";
+ //盘点业务不能选择批号或序列号商品
+ public static final int MATERIAL_STOCK_CHECK_ERROR_CODE = 80000019;
+ public static final String MATERIAL_STOCK_CHECK_ERROR_MSG = "抱歉,盘点业务不能选择批号或序列号商品:%s,建议走其它入库和出库单";
+ //EXCEL中存在重复的商品
+ public static final int MATERIAL_EXCEL_IMPORT_EXIST_CODE = 80000020;
+ public static final String MATERIAL_EXCEL_IMPORT_EXIST_MSG = "抱歉,EXCEL中存在重复的商品,具体信息为:%s";
+ //EXCEL中存在重复的条码
+ public static final int MATERIAL_EXCEL_IMPORT_BARCODE_EXIST_CODE = 80000021;
+ public static final String MATERIAL_EXCEL_IMPORT_BARCODE_EXIST_MSG = "抱歉,EXCEL中存在重复的条码,具体条码为:%s";
+ //名称长度超出
+ public static final int MATERIAL_NAME_OVER_CODE = 8000022;
+ public static final String MATERIAL_NAME_OVER_MSG = "第%s行名称长度超出100个字符";
+ //规格长度超出
+ public static final int MATERIAL_STANDARD_OVER_CODE = 8000023;
+ public static final String MATERIAL_STANDARD_OVER_MSG = "第%s行规格长度超出100个字符";
+ //型号长度超出
+ public static final int MATERIAL_MODEL_OVER_CODE = 8000024;
+ public static final String MATERIAL_MODEL_OVER_MSG = "第%s行型号长度超出100个字符";
+ //多属性商品不能输入库存,建议进行盘点录入
+ public static final int MATERIAL_SKU_BEGIN_STOCK_FAILED_CODE = 8000025;
+ public static final String MATERIAL_SKU_BEGIN_STOCK_FAILED_MSG = "多属性商品%s不能输入库存,建议进行盘点录入";
+ //商品条码不存在,请重新选择
+ public static final int MATERIAL_BARCODE_IS_NOT_EXIST_CODE = 8000026;
+ public static final String MATERIAL_BARCODE_IS_NOT_EXIST_MSG = "商品条码%s不存在,请重新选择";
+
+ /**
+ * 单据信息
+ * type = 85
+ * */
+ //添加单据信息失败
+ public static final int DEPOT_HEAD_ADD_FAILED_CODE = 8500000;
+ public static final String DEPOT_HEAD_ADD_FAILED_MSG = "添加单据信息失败";
+ //删除单据信息失败
+ public static final int DEPOT_HEAD_DELETE_FAILED_CODE = 8500001;
+ public static final String DEPOT_HEAD_DELETE_FAILED_MSG = "删除单据信息失败";
+ //修改单据信息失败
+ public static final int DEPOT_HEAD_EDIT_FAILED_CODE = 8500002;
+ public static final String DEPOT_HEAD_EDIT_FAILED_MSG = "修改单据信息失败";
+ //单据录入-仓库不能为空
+ public static final int DEPOT_HEAD_DEPOT_FAILED_CODE = 8500004;
+ public static final String DEPOT_HEAD_DEPOT_FAILED_MSG = "仓库不能为空";
+ //单据录入-调入仓库不能为空
+ public static final int DEPOT_HEAD_ANOTHER_DEPOT_FAILED_CODE = 8500005;
+ public static final String DEPOT_HEAD_ANOTHER_DEPOT_FAILED_MSG = "调入仓库不能为空";
+ //单据录入-明细不能为空
+ public static final int DEPOT_HEAD_ROW_FAILED_CODE = 8500006;
+ public static final String DEPOT_HEAD_ROW_FAILED_MSG = "单据明细不能为空";
+ //单据录入-账户不能为空
+ public static final int DEPOT_HEAD_ACCOUNT_FAILED_CODE = 8500007;
+ public static final String DEPOT_HEAD_ACCOUNT_FAILED_MSG = "结算账户不能为空";
+ //单据录入-请修改多账户的结算金额
+ public static final int DEPOT_HEAD_MANY_ACCOUNT_FAILED_CODE = 8500008;
+ public static final String DEPOT_HEAD_MANY_ACCOUNT_FAILED_MSG = "请修改多账户的结算金额";
+ //单据录入-调入仓库与原仓库不能重复
+ public static final int DEPOT_HEAD_ANOTHER_DEPOT_EQUAL_FAILED_CODE = 8500010;
+ public static final String DEPOT_HEAD_ANOTHER_DEPOT_EQUAL_FAILED_MSG = "调入仓库与原仓库不能重复";
+ //单据删除-只有未审核的单据才能删除
+ public static final int DEPOT_HEAD_UN_AUDIT_DELETE_FAILED_CODE = 8500011;
+ public static final String DEPOT_HEAD_UN_AUDIT_DELETE_FAILED_MSG = "抱歉,只有未审核的单据才能删除";
+ //单据审核-只有未审核的单据才能审核
+ public static final int DEPOT_HEAD_UN_AUDIT_TO_AUDIT_FAILED_CODE = 8500012;
+ public static final String DEPOT_HEAD_UN_AUDIT_TO_AUDIT_FAILED_MSG = "抱歉,只有未审核的单据才能审核";
+ //单据反审核-只有已审核的单据才能反审核
+ public static final int DEPOT_HEAD_AUDIT_TO_UN_AUDIT_FAILED_CODE = 8500013;
+ public static final String DEPOT_HEAD_AUDIT_TO_UN_AUDIT_FAILED_MSG = "抱歉,只有已审核的单据才能反审核";
+ //单据录入-商品条码XXX的数量需要修改下
+ public static final int DEPOT_HEAD_NUMBER_NEED_EDIT_FAILED_CODE = 85000014;
+ public static final String DEPOT_HEAD_NUMBER_NEED_EDIT_FAILED_MSG = "商品条码%s的数量需要修改下";
+ //单据录入-商品的批号不能为空
+ public static final int DEPOT_HEAD_BATCH_NUMBERE_EMPTY_CODE = 8500015;
+ public static final String DEPOT_HEAD_BATCH_NUMBERE_EMPTY_MSG = "抱歉,商品条码:%s的批号不能为空";
+ //单据录入-会员预付款余额不足
+ public static final int DEPOT_HEAD_MEMBER_PAY_LACK_CODE = 8500016;
+ public static final String DEPOT_HEAD_MEMBER_PAY_LACK_MSG = "抱歉,会员预付款余额不足";
+ //单据录入-累计订金超出原订单中的订金
+ public static final int DEPOT_HEAD_DEPOSIT_OVER_PRE_CODE = 8500017;
+ public static final String DEPOT_HEAD_DEPOSIT_OVER_PRE_MSG = "抱歉,累计订金超出原订单中的订金";
+ //单据录入-商品条码XXX的单价低于最低售价
+ public static final int DEPOT_HEAD_UNIT_PRICE_LOW_CODE = 8500018;
+ public static final String DEPOT_HEAD_UNIT_PRICE_LOW_MSG = "商品条码%s的单价低于最低售价";
+ //单据录入-单据明细中必须要有组合件和普通子件
+ public static final int DEPOT_HEAD_CHECK_ASSEMBLE_EMPTY_CODE = 8500020;
+ public static final String DEPOT_HEAD_CHECK_ASSEMBLE_EMPTY_MSG = "抱歉,单据明细中必须要有组合件和普通子件";
+ //单据录入-商品条码XXX的数量与序列号不一致
+ public static final int DEPOT_HEAD_SN_NUMBERE_FAILED_CODE = 8500021;
+ public static final String DEPOT_HEAD_SN_NUMBERE_FAILED_MSG = "抱歉,商品条码:%s的数量与序列号不一致";
+ //单据录入-单据编号已经存在
+ public static final int DEPOT_HEAD_BILL_NUMBER_EXIST_CODE = 8500022;
+ public static final String DEPOT_HEAD_BILL_NUMBER_EXIST_MSG = "抱歉,单据编号已经存在";
+ //单据录入-单据当前状态下不能修改
+ public static final int DEPOT_HEAD_BILL_CANNOT_EDIT_CODE = 8500023;
+ public static final String DEPOT_HEAD_BILL_CANNOT_EDIT_MSG = "抱歉,单据当前状态下不能修改";
+ //单据删除-单据中的序列号已经出库,不能删除
+ public static final int DEPOT_HEAD_SERIAL_IS_SELL_CODE = 8500024;
+ public static final String DEPOT_HEAD_SERIAL_IS_SELL_MSG = "抱歉,单据%s的序列号已经出库,不能删除";
+ //单据录入-单据附件不能超过规定数量
+ public static final int DEPOT_HEAD_FILE_NUM_LIMIT_CODE = 8500025;
+ public static final String DEPOT_HEAD_FILE_NUM_LIMIT_MSG = "抱歉,单据附件不能超过%s份";
+
+ /**
+ * 单据明细信息
+ * type = 90
+ * */
+ //添加单据明细信息失败
+ public static final int DEPOT_ITEM_ADD_FAILED_CODE = 9000000;
+ public static final String DEPOT_ITEM_ADD_FAILED_MSG = "添加单据明细信息失败";
+ //删除单据明细信息失败
+ public static final int DEPOT_ITEM_DELETE_FAILED_CODE = 9000001;
+ public static final String DEPOT_ITEM_DELETE_FAILED_MSG = "删除单据明细信息失败";
+ //修改单据明细信息失败
+ public static final int DEPOT_ITEM_EDIT_FAILED_CODE = 9000002;
+ public static final String DEPOT_ITEM_EDIT_FAILED_MSG = "修改单据明细信息失败";
+ //单据明细-明细中商品不存在
+ public static final int DEPOT_ITEM_BARCODE_IS_NOT_EXIST_CODE = 9000003;
+ public static final String DEPOT_ITEM_BARCODE_IS_NOT_EXIST_MSG = "抱歉,商品条码:%s在商品管理中不存在";
+
+ /**
+ * 财务信息
+ * type = 95
+ * */
+ //添加财务信息失败
+ public static final int ACCOUNT_HEAD_ADD_FAILED_CODE = 9500000;
+ public static final String ACCOUNT_HEAD_ADD_FAILED_MSG = "添加财务信息失败";
+ //删除财务信息失败
+ public static final int ACCOUNT_HEAD_DELETE_FAILED_CODE = 9500001;
+ public static final String ACCOUNT_HEAD_DELETE_FAILED_MSG = "删除财务信息失败";
+ //修改财务信息失败
+ public static final int ACCOUNT_HEAD_EDIT_FAILED_CODE = 9500002;
+ public static final String ACCOUNT_HEAD_EDIT_FAILED_MSG = "修改财务信息失败";
+ //单据录入-明细不能为空
+ public static final int ACCOUNT_HEAD_ROW_FAILED_CODE = 9500003;
+ public static final String ACCOUNT_HEAD_ROW_FAILED_MSG = "单据明细不能为空";
+ //单据删除-只有未审核的单据才能删除
+ public static final int ACCOUNT_HEAD_UN_AUDIT_DELETE_FAILED_CODE = 9500004;
+ public static final String ACCOUNT_HEAD_UN_AUDIT_DELETE_FAILED_MSG = "抱歉,只有未审核的单据才能删除";
+ //财务信息录入-单据编号已经存在
+ public static final int ACCOUNT_HEAD_BILL_NO_EXIST_CODE = 9500005;
+ public static final String ACCOUNT_HEAD_BILL_NO_EXIST_MSG = "抱歉,单据编号已经存在";
+ /**
+ * 财务明细信息
+ * type = 100
+ * */
+ //添加财务明细信息失败
+ public static final int ACCOUNT_ITEM_ADD_FAILED_CODE = 10000000;
+ public static final String ACCOUNT_ITEM_ADD_FAILED_MSG = "添加财务明细信息失败";
+ //删除财务明细信息失败
+ public static final int ACCOUNT_ITEM_DELETE_FAILED_CODE = 10000001;
+ public static final String ACCOUNT_ITEM_DELETE_FAILED_MSG = "删除财务明细信息失败";
+ //修改财务明细信息失败
+ public static final int ACCOUNT_ITEM_EDIT_FAILED_CODE = 10000002;
+ public static final String ACCOUNT_ITEM_EDIT_FAILED_MSG = "修改财务明细信息失败";
+ /**
+ * 序列号
+ * type = 105
+ * */
+ /**序列号已存在*/
+ public static final int SERIAL_NUMBERE_ALREADY_EXISTS_CODE = 10500000;
+ public static final String SERIAL_NUMBERE_ALREADY_EXISTS_MSG = "序列号:%s已存在";
+ /**序列号不能为为空*/
+ public static final int SERIAL_NUMBERE_NOT_BE_EMPTY_CODE = 10500001;
+ public static final String SERIAL_NUMBERE_NOT_BE_EMPTY_MSG = "序列号不能为为空";
+ /**商品%s下序列号不充足,请补充后重试*/
+ public static final int MATERIAL_SERIAL_NUMBERE_NOT_ENOUGH_CODE = 10500002;
+ public static final String MATERIAL_SERIAL_NUMBERE_NOT_ENOUGH_MSG = "商品:%s下序列号不充足,请补充后重试";
+ /**删序列号信息失败*/
+ public static final int SERIAL_NUMBERE_DELETE_FAILED_CODE = 10500003;
+ public static final String SERIAL_NUMBERE_DELETE_FAILED_MSG = "删序列号信息失败";
+ /**
+ * 机构信息
+ * type = 110
+ * */
+ //添加机构信息失败
+ public static final int ORGANIZATION_ADD_FAILED_CODE = 11000000;
+ public static final String ORGANIZATION_ADD_FAILED_MSG = "添加机构信息失败";
+ //删除机构信息失败
+ public static final int ORGANIZATION_DELETE_FAILED_CODE = 11000001;
+ public static final String ORGANIZATION_DELETE_FAILED_MSG = "删除机构信息失败";
+ //修改机构信息失败
+ public static final int ORGANIZATION_EDIT_FAILED_CODE = 11000002;
+ public static final String ORGANIZATION_EDIT_FAILED_MSG = "修改机构信息失败";
+ //机构编号已存在
+ public static final int ORGANIZATION_NO_ALREADY_EXISTS_CODE = 11000003;
+ public static final String ORGANIZATION_NO_ALREADY_EXISTS_MSG = "机构编号已存在";
+ //根机构不允许删除
+ public static final int ORGANIZATION_ROOT_NOT_ALLOWED_DELETE_CODE = 11000004;
+ public static final String ORGANIZATION_ROOT_NOT_ALLOWED_DELETE_MSG = "根机构不允许删除";
+ //根机构不允许修改
+ public static final int ORGANIZATION_ROOT_NOT_ALLOWED_EDIT_CODE = 11000005;
+ public static final String ORGANIZATION_ROOT_NOT_ALLOWED_EDIT_MSG = "根机构不允许修改";
+ //该机构存在下级不允许删除
+ public static final int ORGANIZATION_CHILD_NOT_ALLOWED_DELETE_CODE = 11000006;
+ public static final String ORGANIZATION_CHILD_NOT_ALLOWED_DELETE_MSG = "该机构存在下级不允许删除";
+ /**
+ * 机构用户关联关系
+ * type = 115
+ * */
+ //添加机构用户关联关系失败
+ public static final int ORGA_USER_REL_ADD_FAILED_CODE = 11500000;
+ public static final String ORGA_USER_REL_ADD_FAILED_MSG = "添加机构用户关联关系失败";
+ //删除机构用户关联关系失败
+ public static final int ORGA_USER_REL_DELETE_FAILED_CODE = 11500001;
+ public static final String ORGA_USER_REL_DELETE_FAILED_MSG = "删除机构用户关联关系失败";
+ //修改机构用户关联关系失败
+ public static final int ORGA_USER_REL_EDIT_FAILED_CODE = 11500002;
+ public static final String ORGA_USER_REL_EDIT_FAILED_MSG = "修改机构用户关联关系失败";
+
+ //进销存统计,如果有权限的仓库数量太多则提示要选择仓库
+ public static final int REPORT_TWO_MANY_DEPOT_FAILED_CODE = 510;
+ public static final String REPORT_TWO_MANY_DEPOT_FAILED_MSG = "请选择仓库,再进行查询";
+
+ //演示用户禁止操作
+ public static final int SYSTEM_CONFIG_TEST_USER_CODE = -1;
+ public static final String SYSTEM_CONFIG_TEST_USER_MSG = "演示用户禁止操作";
+
+
+ /**
+ * 标准正常返回/操作成功返回
+ * @return
+ */
+ public static JSONObject standardSuccess () {
+ JSONObject success = new JSONObject();
+ success.put(GLOBAL_RETURNS_CODE, SERVICE_SUCCESS_CODE);
+ success.put(GLOBAL_RETURNS_MESSAGE, SERVICE_SUCCESS_MSG);
+ return success;
+ }
+}
diff --git a/src/main/java/com/wansensoft/erp/controller/AccountController.java b/src/main/java/com/wansensoft/erp/controller/AccountController.java
new file mode 100644
index 00000000..bc1a1292
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/controller/AccountController.java
@@ -0,0 +1,204 @@
+package com.wansensoft.erp.controller;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.wansensoft.erp.datasource.entities.Account;
+import com.wansensoft.erp.datasource.vo.AccountVo4InOutList;
+import com.wansensoft.erp.service.account.AccountService;
+import com.wansensoft.erp.service.systemConfig.SystemConfigService;
+import com.wansensoft.erp.utils.BaseResponseInfo;
+import com.wansensoft.erp.utils.ErpInfo;
+import com.wansensoft.erp.utils.ResponseJsonUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.*;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author jishenghua 75271*8920
+ */
+@RestController
+@RequestMapping(value = "/account")
+@Api(tags = {"账户管理"})
+public class AccountController {
+ private Logger logger = LoggerFactory.getLogger(AccountController.class);
+
+ @Resource
+ private AccountService accountService;
+
+ @Resource
+ private SystemConfigService systemConfigService;
+
+ /**
+ * 查找结算账户信息-下拉框
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/findBySelect")
+ @ApiOperation(value = "查找结算账户信息-下拉框")
+ public String findBySelect(HttpServletRequest request) throws Exception {
+ String res = null;
+ try {
+ List dataList = accountService.findBySelect();
+ //存放数据json数组
+ JSONArray dataArray = new JSONArray();
+ if (null != dataList) {
+ for (Account account : dataList) {
+ JSONObject item = new JSONObject();
+ item.put("Id", account.getId());
+ //结算账户名称
+ item.put("AccountName", account.getName());
+ dataArray.add(item);
+ }
+ }
+ res = dataArray.toJSONString();
+ } catch(Exception e){
+ e.printStackTrace();
+ res = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 获取所有结算账户
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/getAccount")
+ @ApiOperation(value = "获取所有结算账户")
+ public BaseResponseInfo getAccount(HttpServletRequest request) throws Exception {
+ BaseResponseInfo res = new BaseResponseInfo();
+ Map map = new HashMap();
+ try {
+ List accountList = accountService.getAccount();
+ map.put("accountList", accountList);
+ res.code = 200;
+ res.data = map;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 账户流水信息
+ * @param currentPage
+ * @param pageSize
+ * @param accountId
+ * @param initialAmount
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/findAccountInOutList")
+ @ApiOperation(value = "账户流水信息")
+ public BaseResponseInfo findAccountInOutList(@RequestParam("currentPage") Integer currentPage,
+ @RequestParam("pageSize") Integer pageSize,
+ @RequestParam("accountId") Long accountId,
+ @RequestParam("initialAmount") BigDecimal initialAmount,
+ HttpServletRequest request) throws Exception{
+ BaseResponseInfo res = new BaseResponseInfo();
+ Map map = new HashMap();
+ try {
+ List dataList = accountService.findAccountInOutList(accountId, (currentPage-1)*pageSize, pageSize);
+ int total = accountService.findAccountInOutListCount(accountId);
+ map.put("total", total);
+ //存放数据json数组
+ JSONArray dataArray = new JSONArray();
+ if (null != dataList) {
+ Boolean forceFlag = systemConfigService.getForceApprovalFlag();
+ for (AccountVo4InOutList aEx : dataList) {
+ String type = aEx.getType().replace("其它", "");
+ aEx.setType(type);
+ String timeStr = aEx.getOperTime().toString();
+ BigDecimal balance = accountService.getAccountSum(accountId, timeStr, "date", forceFlag).add(accountService.getAccountSumByHead(accountId, timeStr, "date", forceFlag))
+ .add(accountService.getAccountSumByDetail(accountId, timeStr, "date", forceFlag)).add(accountService.getManyAccountSum(accountId, timeStr, "date", forceFlag)).add(initialAmount);
+ aEx.setBalance(balance);
+ aEx.setAccountId(accountId);
+ dataArray.add(aEx);
+ }
+ }
+ map.put("rows", dataArray);
+ res.code = 200;
+ res.data = map;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 更新默认账户
+ * @param object
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @PostMapping(value = "/updateIsDefault")
+ @ApiOperation(value = "更新默认账户")
+ public String updateIsDefault(@RequestBody JSONObject object,
+ HttpServletRequest request) throws Exception{
+ Long accountId = object.getLong("id");
+ Map objectMap = new HashMap<>();
+ int res = accountService.updateIsDefault(accountId);
+ if(res > 0) {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
+ } else {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
+ }
+ }
+
+ /**
+ * 结算账户的统计
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/getStatistics")
+ @ApiOperation(value = "结算账户的统计")
+ public BaseResponseInfo getStatistics(@RequestParam("name") String name,
+ @RequestParam("serialNo") String serialNo,
+ HttpServletRequest request) throws Exception {
+ BaseResponseInfo res = new BaseResponseInfo();
+ try {
+ Map map = accountService.getStatistics(name, serialNo);
+ res.code = 200;
+ res.data = map;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 批量设置状态-启用或者禁用
+ * @param jsonObject
+ * @param request
+ * @return
+ */
+ @PostMapping(value = "/batchSetStatus")
+ @ApiOperation(value = "批量设置状态")
+ public String batchSetStatus(@RequestBody JSONObject jsonObject,
+ HttpServletRequest request)throws Exception {
+ Boolean status = jsonObject.getBoolean("status");
+ String ids = jsonObject.getString("ids");
+ Map objectMap = new HashMap<>();
+ int res = accountService.batchSetStatus(status, ids);
+ if(res > 0) {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
+ } else {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
+ }
+ }
+}
diff --git a/src/main/java/com/wansensoft/erp/controller/AccountHeadController.java b/src/main/java/com/wansensoft/erp/controller/AccountHeadController.java
new file mode 100644
index 00000000..0bb0075f
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/controller/AccountHeadController.java
@@ -0,0 +1,139 @@
+package com.wansensoft.erp.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.wansensoft.erp.constants.ExceptionConstants;
+import com.wansensoft.erp.datasource.entities.AccountHead;
+import com.wansensoft.erp.datasource.entities.AccountHeadVo4Body;
+import com.wansensoft.erp.datasource.entities.AccountHeadVo4ListEx;
+import com.wansensoft.erp.service.accountHead.AccountHeadService;
+import com.wansensoft.erp.utils.BaseResponseInfo;
+import com.wansensoft.erp.utils.ErpInfo;
+import com.wansensoft.erp.utils.ResponseJsonUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.*;
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author jishenghua 752*718*920
+ */
+@RestController
+@RequestMapping(value = "/accountHead")
+@Api(tags = {"财务管理"})
+public class AccountHeadController {
+ private Logger logger = LoggerFactory.getLogger(AccountHeadController.class);
+
+ @Resource
+ private AccountHeadService accountHeadService;
+
+ /**
+ * 批量设置状态-审核或者反审核
+ * @param jsonObject
+ * @param request
+ * @return
+ */
+ @PostMapping(value = "/batchSetStatus")
+ @ApiOperation(value = "批量设置状态-审核或者反审核")
+ public String batchSetStatus(@RequestBody JSONObject jsonObject,
+ HttpServletRequest request) throws Exception{
+ Map objectMap = new HashMap<>();
+ String status = jsonObject.getString("status");
+ String ids = jsonObject.getString("ids");
+ int res = accountHeadService.batchSetStatus(status, ids);
+ if(res > 0) {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
+ } else {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
+ }
+ }
+
+ /**
+ * 新增财务主表及财务子表信息
+ * @param body
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @PostMapping(value = "/addAccountHeadAndDetail")
+ @ApiOperation(value = "新增财务主表及财务子表信息")
+ public Object addAccountHeadAndDetail(@RequestBody AccountHeadVo4Body body, HttpServletRequest request) throws Exception{
+ JSONObject result = ExceptionConstants.standardSuccess();
+ String beanJson = body.getInfo();
+ String rows = body.getRows();
+ accountHeadService.addAccountHeadAndDetail(beanJson,rows, request);
+ return result;
+ }
+
+ /**
+ * 更新财务主表及财务子表信息
+ * @param body
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @PutMapping(value = "/updateAccountHeadAndDetail")
+ @ApiOperation(value = "更新财务主表及财务子表信息")
+ public Object updateAccountHeadAndDetail(@RequestBody AccountHeadVo4Body body, HttpServletRequest request) throws Exception{
+ JSONObject result = ExceptionConstants.standardSuccess();
+ String beanJson = body.getInfo();
+ String rows = body.getRows();
+ accountHeadService.updateAccountHeadAndDetail(beanJson,rows,request);
+ return result;
+ }
+
+ /**
+ * 根据编号查询单据信息
+ * @param billNo
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/getDetailByNumber")
+ @ApiOperation(value = "根据编号查询单据信息")
+ public BaseResponseInfo getDetailByNumber(@RequestParam("billNo") String billNo,
+ HttpServletRequest request)throws Exception {
+ BaseResponseInfo res = new BaseResponseInfo();
+ AccountHeadVo4ListEx ahl = new AccountHeadVo4ListEx();
+ try {
+ List list = accountHeadService.getDetailByNumber(billNo);
+ if(list.size()>0) {
+ ahl = list.get(0);
+ }
+ res.code = 200;
+ res.data = ahl;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 根据出入库单据id查询收付款单号
+ * @param billId
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/getFinancialBillNoByBillId")
+ @ApiOperation(value = "根据编号查询单据信息")
+ public BaseResponseInfo getFinancialBillNoByBillId(@RequestParam("billId") Long billId,
+ HttpServletRequest request)throws Exception {
+ BaseResponseInfo res = new BaseResponseInfo();
+ try {
+ List list = accountHeadService.getFinancialBillNoByBillId(billId);
+ res.code = 200;
+ res.data = list;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+}
diff --git a/src/main/java/com/wansensoft/erp/controller/AccountItemController.java b/src/main/java/com/wansensoft/erp/controller/AccountItemController.java
new file mode 100644
index 00000000..3b9cdd50
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/controller/AccountItemController.java
@@ -0,0 +1,93 @@
+package com.wansensoft.erp.controller;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.wansensoft.erp.constants.BusinessConstants;
+import com.wansensoft.erp.datasource.vo.AccountItemVo4List;
+import com.wansensoft.erp.service.accountHead.AccountHeadService;
+import com.wansensoft.erp.service.accountItem.AccountItemService;
+import com.wansensoft.erp.utils.BaseResponseInfo;
+import com.wansensoft.erp.utils.StringUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author ji sheng hua 752*718*920
+ */
+@RestController
+@RequestMapping(value = "/accountItem")
+@Api(tags = {"财务明细"})
+public class AccountItemController {
+ private Logger logger = LoggerFactory.getLogger(AccountItemController.class);
+
+ @Resource
+ private AccountItemService accountItemService;
+
+ @Resource
+ private AccountHeadService accountHeadService;
+
+ @GetMapping(value = "/getDetailList")
+ @ApiOperation(value = "明细列表")
+ public BaseResponseInfo getDetailList(@RequestParam("headerId") Long headerId,
+ HttpServletRequest request)throws Exception {
+ BaseResponseInfo res = new BaseResponseInfo();
+ try {
+ String type = null;
+ List dataList = new ArrayList<>();
+ if(headerId != 0) {
+ dataList = accountItemService.getDetailList(headerId);
+ type = accountHeadService.getAccountHead(headerId).getType();
+ }
+ JSONObject outer = new JSONObject();
+ outer.put("total", dataList.size());
+ //存放数据json数组
+ JSONArray dataArray = new JSONArray();
+ if (null != dataList) {
+ for (AccountItemVo4List ai : dataList) {
+ JSONObject item = new JSONObject();
+ item.put("accountId", ai.getAccountId());
+ item.put("accountName", ai.getAccountName());
+ item.put("inOutItemId", ai.getInOutItemId());
+ item.put("inOutItemName", ai.getInOutItemName());
+ if(StringUtil.isNotEmpty(ai.getBillNumber())) {
+ item.put("billNumber", ai.getBillNumber());
+ } else {
+ item.put("billNumber", "QiChu");
+ }
+ item.put("needDebt", ai.getNeedDebt());
+ item.put("finishDebt", ai.getFinishDebt());
+ BigDecimal eachAmount = ai.getEachAmount();
+ if(BusinessConstants.TYPE_MONEY_IN.equals(type)) {
+ item.put("eachAmount", eachAmount);
+ } else if(BusinessConstants.TYPE_MONEY_OUT.equals(type)) {
+ item.put("eachAmount", BigDecimal.ZERO.subtract(eachAmount));
+ } else {
+ item.put("eachAmount", (eachAmount.compareTo(BigDecimal.ZERO))==-1 ? BigDecimal.ZERO.subtract(eachAmount): eachAmount);
+ }
+ item.put("remark", ai.getRemark());
+ dataArray.add(item);
+ }
+ }
+ outer.put("rows", dataArray);
+ res.code = 200;
+ res.data = outer;
+ } catch (Exception e) {
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+}
diff --git a/src/main/java/com/wansensoft/erp/controller/DepotController.java b/src/main/java/com/wansensoft/erp/controller/DepotController.java
new file mode 100644
index 00000000..c0905e12
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/controller/DepotController.java
@@ -0,0 +1,219 @@
+package com.wansensoft.erp.controller;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.wansensoft.erp.datasource.entities.Depot;
+import com.wansensoft.erp.datasource.entities.DepotEx;
+import com.wansensoft.erp.datasource.entities.MaterialInitialStock;
+import com.wansensoft.erp.service.depot.DepotService;
+import com.wansensoft.erp.service.material.MaterialService;
+import com.wansensoft.erp.service.userBusiness.UserBusinessService;
+import com.wansensoft.erp.utils.*;
+import com.wansensoft.erp.utils.BaseResponseInfo;
+import com.wansensoft.erp.utils.ErpInfo;
+import com.wansensoft.erp.utils.ResponseJsonUtil;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.*;
+
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.util.*;
+
+/**
+ * @author ji sheng hua 752*718*920
+ */
+@RestController
+@RequestMapping(value = "/depot")
+@Api(tags = {"仓库管理"})
+public class DepotController {
+ private Logger logger = LoggerFactory.getLogger(DepotController.class);
+
+ @Resource
+ private DepotService depotService;
+
+ @Resource
+ private UserBusinessService userBusinessService;
+
+ @Resource
+ private MaterialService materialService;
+
+ /**
+ * 仓库列表
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @GetMapping(value = "/getAllList")
+ @ApiOperation(value = "仓库列表")
+ public BaseResponseInfo getAllList(HttpServletRequest request) throws Exception{
+ BaseResponseInfo res = new BaseResponseInfo();
+ try {
+ List depotList = depotService.getAllList();
+ res.code = 200;
+ res.data = depotList;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 用户对应仓库显示
+ * @param type
+ * @param keyId
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/findUserDepot")
+ @ApiOperation(value = "用户对应仓库显示")
+ public JSONArray findUserDepot(@RequestParam("UBType") String type, @RequestParam("UBKeyId") String keyId,
+ HttpServletRequest request) throws Exception{
+ JSONArray arr = new JSONArray();
+ try {
+ //获取权限信息
+ String ubValue = userBusinessService.getUBValueByTypeAndKeyId(type, keyId);
+ List dataList = depotService.findUserDepot();
+ //开始拼接json数据
+ JSONObject outer = new JSONObject();
+ outer.put("id", 0);
+ outer.put("key", 0);
+ outer.put("value", 0);
+ outer.put("title", "仓库列表");
+ outer.put("attributes", "仓库列表");
+ //存放数据json数组
+ JSONArray dataArray = new JSONArray();
+ if (null != dataList) {
+ for (Depot depot : dataList) {
+ JSONObject item = new JSONObject();
+ item.put("id", depot.getId());
+ item.put("key", depot.getId());
+ item.put("value", depot.getId());
+ item.put("title", depot.getName());
+ item.put("attributes", depot.getName());
+ Boolean flag = ubValue.contains("[" + depot.getId().toString() + "]");
+ if (flag) {
+ item.put("checked", true);
+ }
+ dataArray.add(item);
+ }
+ }
+ outer.put("children", dataArray);
+ arr.add(outer);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return arr;
+ }
+
+ /**
+ * 获取当前用户拥有权限的仓库列表
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @GetMapping(value = "/findDepotByCurrentUser")
+ @ApiOperation(value = "获取当前用户拥有权限的仓库列表")
+ public BaseResponseInfo findDepotByCurrentUser(HttpServletRequest request) throws Exception{
+ BaseResponseInfo res = new BaseResponseInfo();
+ try {
+ JSONArray arr = depotService.findDepotByCurrentUser();
+ res.code = 200;
+ res.data = arr;
+ } catch (Exception e) {
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 更新默认仓库
+ * @param object
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @PostMapping(value = "/updateIsDefault")
+ @ApiOperation(value = "更新默认仓库")
+ public String updateIsDefault(@RequestBody JSONObject object,
+ HttpServletRequest request) throws Exception{
+ Long depotId = object.getLong("id");
+ Map objectMap = new HashMap<>();
+ int res = depotService.updateIsDefault(depotId);
+ if(res > 0) {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
+ } else {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
+ }
+ }
+
+ /**
+ * 仓库列表-带库存
+ * @param mId
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/getAllListWithStock")
+ @ApiOperation(value = "仓库列表-带库存")
+ public BaseResponseInfo getAllList(@RequestParam("mId") Long mId,
+ HttpServletRequest request) {
+ BaseResponseInfo res = new BaseResponseInfo();
+ try {
+ List list = depotService.getAllList();
+ List depotList = new ArrayList();
+ for(Depot depot: list) {
+ DepotEx de = new DepotEx();
+ if(mId!=0) {
+ BigDecimal initStock = materialService.getInitStock(mId, depot.getId());
+ BigDecimal currentStock = materialService.getCurrentStockByMaterialIdAndDepotId(mId, depot.getId());
+ de.setInitStock(initStock);
+ de.setCurrentStock(currentStock);
+ MaterialInitialStock materialInitialStock = materialService.getSafeStock(mId, depot.getId());
+ de.setLowSafeStock(materialInitialStock.getLowSafeStock());
+ de.setHighSafeStock(materialInitialStock.getHighSafeStock());
+ } else {
+ de.setInitStock(BigDecimal.ZERO);
+ de.setCurrentStock(BigDecimal.ZERO);
+ }
+ de.setId(depot.getId());
+ de.setName(depot.getName());
+ depotList.add(de);
+ }
+ res.code = 200;
+ res.data = depotList;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 批量设置状态-启用或者禁用
+ * @param jsonObject
+ * @param request
+ * @return
+ */
+ @PostMapping(value = "/batchSetStatus")
+ @ApiOperation(value = "批量设置状态")
+ public String batchSetStatus(@RequestBody JSONObject jsonObject,
+ HttpServletRequest request)throws Exception {
+ Boolean status = jsonObject.getBoolean("status");
+ String ids = jsonObject.getString("ids");
+ Map objectMap = new HashMap<>();
+ int res = depotService.batchSetStatus(status, ids);
+ if(res > 0) {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
+ } else {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
+ }
+ }
+}
diff --git a/src/main/java/com/wansensoft/erp/controller/DepotHeadController.java b/src/main/java/com/wansensoft/erp/controller/DepotHeadController.java
new file mode 100644
index 00000000..f82d4db6
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/controller/DepotHeadController.java
@@ -0,0 +1,539 @@
+package com.wansensoft.erp.controller;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.wansensoft.erp.constants.BusinessConstants;
+import com.wansensoft.erp.constants.ExceptionConstants;
+import com.wansensoft.erp.datasource.entities.DepotHead;
+import com.wansensoft.erp.datasource.entities.DepotHeadVo4Body;
+import com.wansensoft.erp.datasource.vo.DepotHeadVo4InDetail;
+import com.wansensoft.erp.datasource.vo.DepotHeadVo4InOutMCount;
+import com.wansensoft.erp.datasource.vo.DepotHeadVo4List;
+import com.wansensoft.erp.datasource.vo.DepotHeadVo4StatementAccount;
+import com.wansensoft.erp.service.depot.DepotService;
+import com.wansensoft.erp.service.depotHead.DepotHeadService;
+import com.wansensoft.erp.service.redis.RedisService;
+import com.wansensoft.erp.service.systemConfig.SystemConfigService;
+import com.wansensoft.erp.utils.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.*;
+
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author ji-sheng-hua 752*718*920
+ */
+@RestController
+@RequestMapping(value = "/depotHead")
+@Api(tags = {"单据管理"})
+public class DepotHeadController {
+ private Logger logger = LoggerFactory.getLogger(DepotHeadController.class);
+
+ @Resource
+ private DepotHeadService depotHeadService;
+
+ @Resource
+ private DepotService depotService;
+
+ @Resource
+ private SystemConfigService systemConfigService;
+
+ @Resource
+ private RedisService redisService;
+
+ /**
+ * 批量设置状态-审核或者反审核
+ * @param jsonObject
+ * @param request
+ * @return
+ */
+ @PostMapping(value = "/batchSetStatus")
+ @ApiOperation(value = "批量设置状态-审核或者反审核")
+ public String batchSetStatus(@RequestBody JSONObject jsonObject,
+ HttpServletRequest request) throws Exception{
+ Map objectMap = new HashMap<>();
+ String status = jsonObject.getString("status");
+ String ids = jsonObject.getString("ids");
+ int res = depotHeadService.batchSetStatus(status, ids);
+ if(res > 0) {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
+ } else {
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
+ }
+ }
+
+ /**
+ * 入库出库明细接口
+ * @param currentPage
+ * @param pageSize
+ * @param oId
+ * @param number
+ * @param materialParam
+ * @param depotId
+ * @param beginTime
+ * @param endTime
+ * @param type
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/findInOutDetail")
+ @ApiOperation(value = "入库出库明细接口")
+ public BaseResponseInfo findInOutDetail(@RequestParam("currentPage") Integer currentPage,
+ @RequestParam("pageSize") Integer pageSize,
+ @RequestParam(value = "organId", required = false) Integer oId,
+ @RequestParam("number") String number,
+ @RequestParam("materialParam") String materialParam,
+ @RequestParam(value = "depotId", required = false) Long depotId,
+ @RequestParam("beginTime") String beginTime,
+ @RequestParam("endTime") String endTime,
+ @RequestParam(value = "roleType", required = false) String roleType,
+ @RequestParam("type") String type,
+ @RequestParam(value = "creator", required = false) Long creator,
+ @RequestParam("remark") String remark,
+ HttpServletRequest request)throws Exception {
+ BaseResponseInfo res = new BaseResponseInfo();
+ Map map = new HashMap();
+ try {
+ List depotList = new ArrayList<>();
+ if(depotId != null) {
+ depotList.add(depotId);
+ } else {
+ //未选择仓库时默认为当前用户有权限的仓库
+ JSONArray depotArr = depotService.findDepotByCurrentUser();
+ for(Object obj: depotArr) {
+ JSONObject object = JSONObject.parseObject(obj.toString());
+ depotList.add(object.getLong("id"));
+ }
+ }
+ List resList = new ArrayList();
+ String [] creatorArray = depotHeadService.getCreatorArray(roleType);
+ String subType = "出库".equals(type)? "销售" : "";
+ String [] organArray = depotHeadService.getOrganArray(subType, "");
+ beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
+ endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
+ Boolean forceFlag = systemConfigService.getForceApprovalFlag();
+ List list = depotHeadService.findInOutDetail(beginTime, endTime, type, creatorArray, organArray, forceFlag,
+ StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), creator, remark, (currentPage-1)*pageSize, pageSize);
+ int total = depotHeadService.findInOutDetailCount(beginTime, endTime, type, creatorArray, organArray, forceFlag,
+ StringUtil.toNull(materialParam), depotList, oId, StringUtil.toNull(number), creator, remark);
+ map.put("total", total);
+ //存放数据json数组
+ if (null != list) {
+ for (DepotHeadVo4InDetail dhd : list) {
+ resList.add(dhd);
+ }
+ }
+ map.put("rows", resList);
+ res.code = 200;
+ res.data = map;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 入库出库统计接口
+ * @param currentPage
+ * @param pageSize
+ * @param oId
+ * @param materialParam
+ * @param depotId
+ * @param beginTime
+ * @param endTime
+ * @param type
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/findInOutMaterialCount")
+ @ApiOperation(value = "入库出库统计接口")
+ public BaseResponseInfo findInOutMaterialCount(@RequestParam("currentPage") Integer currentPage,
+ @RequestParam("pageSize") Integer pageSize,
+ @RequestParam(value = "organId", required = false) Integer oId,
+ @RequestParam("materialParam") String materialParam,
+ @RequestParam(value = "depotId", required = false) Long depotId,
+ @RequestParam("beginTime") String beginTime,
+ @RequestParam("endTime") String endTime,
+ @RequestParam("type") String type,
+ @RequestParam(value = "roleType", required = false) String roleType,
+ HttpServletRequest request)throws Exception {
+ BaseResponseInfo res = new BaseResponseInfo();
+ Map map = new HashMap();
+ try {
+ List depotList = new ArrayList<>();
+ if(depotId != null) {
+ depotList.add(depotId);
+ } else {
+ //未选择仓库时默认为当前用户有权限的仓库
+ JSONArray depotArr = depotService.findDepotByCurrentUser();
+ for(Object obj: depotArr) {
+ JSONObject object = JSONObject.parseObject(obj.toString());
+ depotList.add(object.getLong("id"));
+ }
+ }
+ beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
+ endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
+ Boolean forceFlag = systemConfigService.getForceApprovalFlag();
+ List list = depotHeadService.findInOutMaterialCount(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam),
+ depotList, oId, roleType, (currentPage-1)*pageSize, pageSize);
+ int total = depotHeadService.findInOutMaterialCountTotal(beginTime, endTime, type, forceFlag, StringUtil.toNull(materialParam),
+ depotList, oId, roleType);
+ map.put("total", total);
+ map.put("rows", list);
+ res.code = 200;
+ res.data = map;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 调拨明细统计
+ * @param currentPage
+ * @param pageSize
+ * @param number
+ * @param materialParam
+ * @param depotIdF 调出仓库
+ * @param depotId 调入仓库
+ * @param beginTime
+ * @param endTime
+ * @param subType
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/findAllocationDetail")
+ @ApiOperation(value = "调拨明细统计")
+ public BaseResponseInfo findallocationDetail(@RequestParam("currentPage") Integer currentPage,
+ @RequestParam("pageSize") Integer pageSize,
+ @RequestParam("number") String number,
+ @RequestParam("materialParam") String materialParam,
+ @RequestParam(value = "depotId", required = false) Long depotId,
+ @RequestParam(value = "depotIdF", required = false) Long depotIdF,
+ @RequestParam("beginTime") String beginTime,
+ @RequestParam("endTime") String endTime,
+ @RequestParam("subType") String subType,
+ @RequestParam(value = "roleType", required = false) String roleType,
+ @RequestParam("remark") String remark,
+ HttpServletRequest request)throws Exception {
+ BaseResponseInfo res = new BaseResponseInfo();
+ Map map = new HashMap();
+ try {
+ List depotList = new ArrayList<>();
+ List depotFList = new ArrayList<>();
+ if(depotId != null) {
+ depotList.add(depotId);
+ } else {
+ //未选择仓库时默认为当前用户有权限的仓库
+ JSONArray depotArr = depotService.findDepotByCurrentUser();
+ for(Object obj: depotArr) {
+ JSONObject object = JSONObject.parseObject(obj.toString());
+ depotList.add(object.getLong("id"));
+ }
+ }
+ if(depotIdF != null) {
+ depotFList.add(depotIdF);
+ } else {
+ //未选择仓库时默认为当前用户有权限的仓库
+ JSONArray depotArr = depotService.findDepotByCurrentUser();
+ for(Object obj: depotArr) {
+ JSONObject object = JSONObject.parseObject(obj.toString());
+ depotFList.add(object.getLong("id"));
+ }
+ }
+ String [] creatorArray = depotHeadService.getCreatorArray(roleType);
+ beginTime = Tools.parseDayToTime(beginTime, BusinessConstants.DAY_FIRST_TIME);
+ endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
+ Boolean forceFlag = systemConfigService.getForceApprovalFlag();
+ List list = depotHeadService.findAllocationDetail(beginTime, endTime, subType, StringUtil.toNull(number),
+ creatorArray, forceFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark, (currentPage-1)*pageSize, pageSize);
+ int total = depotHeadService.findAllocationDetailCount(beginTime, endTime, subType, StringUtil.toNull(number),
+ creatorArray, forceFlag, StringUtil.toNull(materialParam), depotList, depotFList, remark);
+ map.put("rows", list);
+ map.put("total", total);
+ res.code = 200;
+ res.data = map;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 对账单接口
+ * @param currentPage
+ * @param pageSize
+ * @param beginTime
+ * @param endTime
+ * @param organId
+ * @param supplierType
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/getStatementAccount")
+ @ApiOperation(value = "对账单接口")
+ public BaseResponseInfo getStatementAccount(@RequestParam("currentPage") Integer currentPage,
+ @RequestParam("pageSize") Integer pageSize,
+ @RequestParam("beginTime") String beginTime,
+ @RequestParam("endTime") String endTime,
+ @RequestParam(value = "organId", required = false) Integer organId,
+ @RequestParam("supplierType") String supplierType,
+ HttpServletRequest request) throws Exception{
+ BaseResponseInfo res = new BaseResponseInfo();
+ Map map = new HashMap();
+ try {
+ String type = "";
+ String subType = "";
+ String typeBack = "";
+ String subTypeBack = "";
+ String billType = "";
+ if (("供应商").equals(supplierType)) {
+ type = "入库";
+ subType = "采购";
+ typeBack = "出库";
+ subTypeBack = "采购退货";
+ billType = "付款";
+ } else if (("客户").equals(supplierType)) {
+ type = "出库";
+ subType = "销售";
+ typeBack = "入库";
+ subTypeBack = "销售退货";
+ billType = "收款";
+ }
+ String [] organArray = depotHeadService.getOrganArray(subType, "");
+ beginTime = Tools.parseDayToTime(beginTime,BusinessConstants.DAY_FIRST_TIME);
+ endTime = Tools.parseDayToTime(endTime,BusinessConstants.DAY_LAST_TIME);
+ List list = depotHeadService.getStatementAccount(beginTime, endTime, organId, organArray,
+ supplierType, type, subType,typeBack, subTypeBack, billType, (currentPage-1)*pageSize, pageSize);
+ int total = depotHeadService.getStatementAccountCount(beginTime, endTime, organId, organArray,
+ supplierType, type, subType,typeBack, subTypeBack, billType);
+ for(DepotHeadVo4StatementAccount item: list) {
+ //期初 = 起始期初金额+上期欠款金额-上期退货的欠款金额-上期收付款
+ BigDecimal preNeed = item.getBeginNeed().add(item.getPreDebtMoney()).subtract(item.getPreReturnDebtMoney()).subtract(item.getPreBackMoney());
+ item.setPreNeed(preNeed);
+ //实际欠款 = 本期欠款-本期退货的欠款金额
+ BigDecimal realDebtMoney = item.getDebtMoney().subtract(item.getReturnDebtMoney());
+ item.setDebtMoney(realDebtMoney);
+ //期末 = 期初+实际欠款-本期收款
+ BigDecimal allNeedGet = preNeed.add(realDebtMoney).subtract(item.getBackMoney());
+ item.setAllNeed(allNeedGet);
+ }
+ map.put("rows", list);
+ map.put("total", total);
+ List totalPayList = depotHeadService.getStatementAccountTotalPay(beginTime, endTime, organId, organArray,
+ supplierType, type, subType, typeBack, subTypeBack, billType);
+ if(totalPayList.size()>0) {
+ DepotHeadVo4StatementAccount totalPayItem = totalPayList.get(0);
+ BigDecimal firstMoney = BigDecimal.ZERO;
+ BigDecimal lastMoney = BigDecimal.ZERO;
+ if(totalPayItem!=null) {
+ //期初 = 起始期初金额+上期欠款金额-上期退货的欠款金额-上期收付款
+ firstMoney = totalPayItem.getBeginNeed().add(totalPayItem.getPreDebtMoney()).subtract(totalPayItem.getPreReturnDebtMoney()).subtract(totalPayItem.getPreBackMoney());
+ //期末 = 期初+本期欠款-本期退货的欠款金额-本期收款
+ lastMoney = firstMoney.add(totalPayItem.getDebtMoney()).subtract(totalPayItem.getReturnDebtMoney()).subtract(totalPayItem.getBackMoney());
+ }
+ map.put("firstMoney", firstMoney); //期初
+ map.put("lastMoney", lastMoney); //期末
+ }
+ res.code = 200;
+ res.data = map;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 根据编号查询单据信息
+ * @param number
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/getDetailByNumber")
+ @ApiOperation(value = "根据编号查询单据信息")
+ public BaseResponseInfo getDetailByNumber(@RequestParam("number") String number,
+ HttpServletRequest request)throws Exception {
+ BaseResponseInfo res = new BaseResponseInfo();
+ DepotHeadVo4List dhl = new DepotHeadVo4List();
+ try {
+ List list = depotHeadService.getDetailByNumber(number, request);
+ if(list.size()>0) {
+ dhl = list.get(0);
+ }
+ res.code = 200;
+ res.data = dhl;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 根据原单号查询关联的单据列表
+ * @param number
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/getBillListByLinkNumber")
+ @ApiOperation(value = "根据原单号查询关联的单据列表")
+ public BaseResponseInfo getBillListByLinkNumber(@RequestParam("number") String number,
+ HttpServletRequest request)throws Exception {
+ BaseResponseInfo res = new BaseResponseInfo();
+ DepotHead dh = new DepotHead();
+ try {
+ List list = depotHeadService.getBillListByLinkNumber(number);
+ res.code = 200;
+ res.data = list;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 新增单据主表及单据子表信息
+ * @param body
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @PostMapping(value = "/addDepotHeadAndDetail")
+ @ApiOperation(value = "新增单据主表及单据子表信息")
+ public Object addDepotHeadAndDetail(@RequestBody DepotHeadVo4Body body, HttpServletRequest request) throws Exception{
+ JSONObject result = ExceptionConstants.standardSuccess();
+ String beanJson = body.getInfo();
+ String rows = body.getRows();
+ depotHeadService.addDepotHeadAndDetail(beanJson, rows, request);
+ return result;
+ }
+
+ /**
+ * 更新单据主表及单据子表信息
+ * @param body
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @PutMapping(value = "/updateDepotHeadAndDetail")
+ @ApiOperation(value = "更新单据主表及单据子表信息")
+ public Object updateDepotHeadAndDetail(@RequestBody DepotHeadVo4Body body, HttpServletRequest request) throws Exception{
+ JSONObject result = ExceptionConstants.standardSuccess();
+ String beanJson = body.getInfo();
+ String rows = body.getRows();
+ depotHeadService.updateDepotHeadAndDetail(beanJson,rows,request);
+ return result;
+ }
+
+ /**
+ * 统计今日采购额、昨日采购额、本月采购额、今年采购额|销售额|零售额
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/getBuyAndSaleStatistics")
+ @ApiOperation(value = "统计今日采购额、昨日采购额、本月采购额、今年采购额|销售额|零售额")
+ public BaseResponseInfo getBuyAndSaleStatistics(@RequestParam(value = "roleType", required = false) String roleType,
+ HttpServletRequest request) {
+ BaseResponseInfo res = new BaseResponseInfo();
+ try {
+ String today = Tools.getNow() + BusinessConstants.DAY_FIRST_TIME;
+ String monthFirstDay = Tools.firstDayOfMonth(Tools.getCurrentMonth()) + BusinessConstants.DAY_FIRST_TIME;
+ String yesterdayBegin = Tools.getYesterday() + BusinessConstants.DAY_FIRST_TIME;
+ String yesterdayEnd = Tools.getYesterday() + BusinessConstants.DAY_LAST_TIME;
+ String yearBegin = Tools.getYearBegin() + BusinessConstants.DAY_FIRST_TIME;
+ String yearEnd = Tools.getYearEnd() + BusinessConstants.DAY_LAST_TIME;
+ Map map = depotHeadService.getBuyAndSaleStatistics(today, monthFirstDay,
+ yesterdayBegin, yesterdayEnd, yearBegin, yearEnd, roleType, request);
+ res.code = 200;
+ res.data = map;
+ } catch(Exception e){
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 根据当前用户获取操作员数组,用于控制当前用户的数据权限,限制可以看到的单据范围
+ * 注意:该接口提供给部分插件使用,勿删
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/getCreatorByCurrentUser")
+ @ApiOperation(value = "根据当前用户获取操作员数组")
+ public BaseResponseInfo getCreatorByRoleType(HttpServletRequest request) {
+ BaseResponseInfo res = new BaseResponseInfo();
+ Map map = new HashMap();
+ try {
+ String creator = "";
+ String roleType = redisService.getObjectFromSessionByKey(request,"roleType").toString();
+ if(StringUtil.isNotEmpty(roleType)) {
+ creator = depotHeadService.getCreatorByRoleType(roleType);
+ }
+ res.code = 200;
+ res.data = creator;
+ } catch (Exception e) {
+ e.printStackTrace();
+ res.code = 500;
+ res.data = "获取数据失败";
+ }
+ return res;
+ }
+
+ /**
+ * 查询存在欠款的单据
+ * @param search
+ * @param request
+ * @return
+ * @throws Exception
+ */
+ @GetMapping(value = "/debtList")
+ @ApiOperation(value = "查询存在欠款的单据")
+ public String debtList(@RequestParam(value = Constants.SEARCH, required = false) String search,
+ @RequestParam("currentPage") Integer currentPage,
+ @RequestParam("pageSize") Integer pageSize,
+ HttpServletRequest request)throws Exception {
+ Map objectMap = new HashMap<>();
+ String organIdStr = StringUtil.getInfo(search, "organId");
+ Long organId = Long.parseLong(organIdStr);
+ String materialParam = StringUtil.getInfo(search, "materialParam");
+ String number = StringUtil.getInfo(search, "number");
+ String beginTime = StringUtil.getInfo(search, "beginTime");
+ String endTime = StringUtil.getInfo(search, "endTime");
+ String roleType = StringUtil.getInfo(search, "roleType");
+ String status = StringUtil.getInfo(search, "status");
+ List list = depotHeadService.debtList(organId, materialParam, number, beginTime, endTime, roleType,
+ status, (currentPage-1)*pageSize, pageSize);
+ int total = depotHeadService.debtListCount(organId, materialParam, number, beginTime, endTime, roleType, status);
+ if (list != null) {
+ objectMap.put("rows", list);
+ objectMap.put("total", total);
+ return ResponseJsonUtil.returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
+ } else {
+ objectMap.put("rows", new ArrayList<>());
+ objectMap.put("total", 0);
+ return ResponseJsonUtil.returnJson(objectMap, "查找不到数据", ErpInfo.OK.code);
+ }
+ }
+}
diff --git a/src/main/java/com/wansensoft/erp/controller/DepotItemController.java b/src/main/java/com/wansensoft/erp/controller/DepotItemController.java
new file mode 100644
index 00000000..88fa3fad
--- /dev/null
+++ b/src/main/java/com/wansensoft/erp/controller/DepotItemController.java
@@ -0,0 +1,973 @@
+package com.wansensoft.erp.controller;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.wansensoft.erp.constants.BusinessConstants;
+import com.wansensoft.erp.constants.ExceptionConstants;
+import com.wansensoft.erp.datasource.entities.*;
+import com.wansensoft.erp.datasource.vo.DepotItemStockWarningCount;
+import com.wansensoft.erp.datasource.vo.DepotItemVoBatchNumberList;
+import com.wansensoft.erp.exception.BusinessRunTimeException;
+import com.wansensoft.erp.service.depot.DepotService;
+import com.wansensoft.erp.service.depotHead.DepotHeadService;
+import com.wansensoft.erp.service.depotItem.DepotItemService;
+import com.wansensoft.erp.service.material.MaterialService;
+import com.wansensoft.erp.service.role.RoleService;
+import com.wansensoft.erp.service.systemConfig.SystemConfigService;
+import com.wansensoft.erp.service.unit.UnitService;
+import com.wansensoft.erp.service.user.UserService;
+import com.wansensoft.erp.utils.*;
+import com.wansensoft.erp.datasource.entities.*;
+import com.wansensoft.erp.utils.*;
+import com.wansensoft.erp.datasource.entities.*;
+import com.wansensoft.erp.utils.*;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import jxl.Sheet;
+import jxl.Workbook;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import jakarta.annotation.Resource;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author ji-sheng-hua 华夏erp
+ */
+@RestController
+@RequestMapping(value = "/depotItem")
+@Api(tags = {"单据明细"})
+public class DepotItemController {
+ private Logger logger = LoggerFactory.getLogger(DepotItemController.class);
+
+ @Resource
+ private DepotHeadService depotHeadService;
+
+ @Resource
+ private DepotItemService depotItemService;
+
+ @Resource
+ private MaterialService materialService;
+
+ @Resource
+ private UnitService unitService;
+
+ @Resource
+ private DepotService depotService;
+
+ @Resource
+ private RoleService roleService;
+
+ @Resource
+ private UserService userService;
+
+ @Resource
+ private SystemConfigService systemConfigService;
+
+ @Value(value="${file.uploadType}")
+ private Long fileUploadType;
+
+ /**
+ * 根据仓库和商品查询单据列表
+ * @param mId
+ * @param request
+ * @return
+ */
+ @GetMapping(value = "/findDetailByDepotIdsAndMaterialId")
+ @ApiOperation(value = "根据仓库和商品查询单据列表")
+ public String findDetailByDepotIdsAndMaterialId(
+ @RequestParam(value = Constants.PAGE_SIZE, required = false) Integer pageSize,
+ @RequestParam(value = Constants.CURRENT_PAGE, required = false) Integer currentPage,
+ @RequestParam(value = "depotIds",required = false) String depotIds,
+ @RequestParam(value = "sku",required = false) String sku,
+ @RequestParam(value = "batchNumber",required = false) String batchNumber,
+ @RequestParam(value = "number",required = false) String number,
+ @RequestParam(value = "beginTime",required = false) String beginTime,
+ @RequestParam(value = "endTime",required = false) String endTime,
+ @RequestParam("materialId") Long mId,
+ HttpServletRequest request)throws Exception {
+ Map objectMap = new HashMap<>();
+ if(StringUtil.isNotEmpty(beginTime)) {
+ beginTime = beginTime + BusinessConstants.DAY_FIRST_TIME;
+ }
+ if(StringUtil.isNotEmpty(endTime)) {
+ endTime = endTime + BusinessConstants.DAY_LAST_TIME;
+ }
+ Boolean forceFlag = systemConfigService.getForceApprovalFlag();
+ List list = depotItemService.findDetailByDepotIdsAndMaterialIdList(depotIds, forceFlag, sku,
+ batchNumber, StringUtil.toNull(number), beginTime, endTime, mId, (currentPage-1)*pageSize, pageSize);
+ JSONArray dataArray = new JSONArray();
+ if (list != null) {
+ for (DepotItemVo4DetailByTypeAndMId d: list) {
+ JSONObject item = new JSONObject();
+ item.put("number", d.getNumber()); //编号
+ item.put("barCode", d.getBarCode()); //条码
+ item.put("materialName", d.getMaterialName()); //名称
+ String type = d.getType();
+ String subType = d.getSubType();
+ if(("其它").equals(type)) {
+ item.put("type", subType); //进出类型
+ } else {
+ item.put("type", subType + type); //进出类型
+ }
+ item.put("depotName", d.getDepotName()); //仓库名称
+ item.put("basicNumber", d.getBnum()); //数量
+ item.put("operTime", Tools.getCenternTime(d.getOtime())); //时间
+ dataArray.add(item);
+ }
+ }
+ if (list == null) {
+ objectMap.put("rows", new ArrayList