init
This commit is contained in:
commit
7fd6432158
|
|
@ -0,0 +1,14 @@
|
|||
# These are supported funding model platforms
|
||||
|
||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: eairp
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
||||
polar: # Replace with a single Polar username
|
||||
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
name: Classify Issue
|
||||
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
- opened
|
||||
|
||||
jobs:
|
||||
classify:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Classify Issue
|
||||
uses: actions/github-script@v4
|
||||
with:
|
||||
github-token: ${{ secrets.WANSEN_AI_TOKEN }}
|
||||
script: |
|
||||
const issue = context.payload.issue;
|
||||
const labelsToAdd = ['status: waiting-for-triage'];
|
||||
|
||||
if (issue.title && issue.title.includes('java')) {
|
||||
labelsToAdd.push('theme: java-21');
|
||||
}
|
||||
if (issue.title && issue.title.includes('kotlin')) {
|
||||
labelsToAdd.push('theme: kotlin');
|
||||
}
|
||||
|
||||
await github.issues.addLabels({
|
||||
owner: 'wansenai',
|
||||
repo: 'eairp',
|
||||
issue_number: issue.number,
|
||||
labels: labelsToAdd
|
||||
});
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# Dependency Review Action
|
||||
#
|
||||
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
|
||||
#
|
||||
# Source repository: https://github.com/actions/dependency-review-action
|
||||
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
|
||||
name: 'Dependency Review'
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
dependency-review:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 'Checkout Repository'
|
||||
uses: actions/checkout@v3
|
||||
- name: 'Dependency Review'
|
||||
uses: actions/dependency-review-action@v2
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
name: Java CI with Maven
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "dev" ]
|
||||
pull_request:
|
||||
branches: [ "master", "dev" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, macos-latest, ubuntu-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up JDK 20.0.2
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '20.0.2'
|
||||
distribution: 'temurin'
|
||||
cache: maven
|
||||
|
||||
- name: clean with Maven
|
||||
run: mvn -f core/pom.xml clean install
|
||||
|
||||
- name: Build with Maven
|
||||
run: mvn -f core/pom.xml -B package --file pom.xml
|
||||
|
||||
- name: Run tests and generate coverage report
|
||||
run: mvn -f core/pom.xml test
|
||||
|
||||
# - name: Upload coverage reports to Codecov
|
||||
# uses: codecov/codecov-action@v3
|
||||
# env:
|
||||
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
|
||||
# - name: Update dependency graph
|
||||
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, dev]
|
||||
pull_request:
|
||||
branches: [master, dev]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18.x, 20.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install pnpm
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd web
|
||||
pnpm install
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd web
|
||||
pnpm build
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
|
||||
#
|
||||
# You can adjust the behavior by modifying this file.
|
||||
# For more information, see:
|
||||
# https://github.com/actions/stale
|
||||
name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 2 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v5
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'Stale issue message'
|
||||
stale-pr-message: 'Stale pull request message'
|
||||
stale-issue-label: 'no-issue-activity'
|
||||
stale-pr-label: 'no-pr-activity'
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
*.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
|
||||
|
||||
/api/src/main/resources/application-prod.yml
|
||||
/api/src/main/resources/application-dev.yml
|
||||
|
||||
/log
|
||||
**/log/
|
||||
|
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, February 2023
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
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 2023-2033 WanSen AI Team, Inc. 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.
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (C) 2023-2033 WanSen AI Team
|
||||
|
||||
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.
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<h1 align="center"><a href="#" target="_blank">Enterprise AI Resource Planning</a></h1>
|
||||
<div align="center">
|
||||
<strong>
|
||||
Next generation artificial intelligent ERP system
|
||||
</strong>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div align="center">
|
||||
<!-- Crates version -->
|
||||
<a href="https://spring.io/projects/spring-boot#learn">
|
||||
<img alt="Static Badge" src="https://img.shields.io/badge/spring-boot?label=Spring%20Boot%203.1.3">
|
||||
</a>
|
||||
<a href="https://codecov.io/gh/wansenai/eairp" >
|
||||
<img src="https://codecov.io/gh/wansenai/eairp/graph/badge.svg?token=6OO8JX0ZVV"/>
|
||||
</a>
|
||||
<a href="#">
|
||||
<img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/wansenai/wansenerp/maven.yml">
|
||||
</a>
|
||||
<!-- commits -->
|
||||
<a href="#">
|
||||
<img alt="GitHub last commit (branch)" src="https://img.shields.io/github/last-commit/wansenai/wansenerp/master">
|
||||
</a>
|
||||
<a href="">
|
||||
<img src="https://img.shields.io/github/repo-size/wansenai/eairp"/>
|
||||
</a>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
On the basis of ERP business, we have expanded GPT-3.5. individually or company can fine tune your model through our system.
|
||||
You can provide fully automated business form submission operations through your simple description, and you can chat, interact, and consult information with GPT.
|
||||
You can deploy through Docker to quickly start and use.
|
||||
|
||||
It's completely free, if this project is helpful to you, please click on Star. Thank you.
|
||||
|
||||
## Project
|
||||
[Enginsh](https://github.com/wansenai/eairp/blob/master/README.md) / [简体中文](https://github.com/wansenai/eairp/blob/master/README_ZH.md)
|
||||
|
||||
## Online preview
|
||||
- If you are in Chinese Mainland, please visit [eairp.cn](https://eairp.cn/)
|
||||
- Otherwise, please visit [erp.wansenai.com](https://erp.wansenai.com/)
|
||||
- test account (测试账号): admin
|
||||
- test password (测试密码): 123456
|
||||
|
||||
Some functional modules are being developed and improved, please refer to our [to-do list](https://github.com/wansenai/eairp/issues/118) / [开发清单](https://github.com/wansenai/eairp/issues/124). It's not easy to generate electricity with love.
|
||||
|
||||
## Quick Start
|
||||
We provide a more comprehensive Docker deployment method, which can be found in [eairp-docker repository](https://github.com/wansenai/eairp-docker/)
|
||||
|
||||
## System screenshot (only part)
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## Other Repository
|
||||
- [eairp-app](https://github.com/wansenai/eairp-app) **Note:** (The application currently needs to wait for the web side to be fully developed before proceeding)
|
||||
|
||||
## License
|
||||
|
||||
Licensed under either of
|
||||
|
||||
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://opensource.wansenai.com/)
|
||||
- MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.wansenai.com/mit)
|
||||
|
||||
at your option.
|
||||
|
||||
## Community
|
||||
微信群: 请添加微信`wansenai`备注ERP开源.
|
||||
|
||||
## Contribution
|
||||
We welcome every contributor, both in terms of code and documentation.
|
||||
|
||||
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the
|
||||
work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
|
||||
additional terms or conditions.
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<h1 align="center"><a href="#" target="_blank">企业资源计划系统</a></h1>
|
||||
<div align="center">
|
||||
<strong>
|
||||
下一代智能ERP系统
|
||||
</strong>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div align="center">
|
||||
<!-- Crates version -->
|
||||
<a href="https://spring.io/projects/spring-boot#learn">
|
||||
<img alt="Static Badge" src="https://img.shields.io/badge/spring-boot?label=Spring%20Boot%203.1.3">
|
||||
</a>
|
||||
<a href="https://codecov.io/gh/wansenai/eairp" >
|
||||
<img src="https://codecov.io/gh/wansenai/eairp/graph/badge.svg?token=6OO8JX0ZVV"/>
|
||||
</a>
|
||||
<a href="#">
|
||||
<img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/wansenai/wansenerp/maven.yml">
|
||||
</a>
|
||||
<!-- commits -->
|
||||
<a href="#">
|
||||
<img alt="GitHub last commit (branch)" src="https://img.shields.io/github/last-commit/wansenai/wansenerp/master">
|
||||
</a>
|
||||
<a href="">
|
||||
<img src="https://img.shields.io/github/repo-size/wansenai/eairp"/>
|
||||
</a>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
在ERP业务的基础上,我们扩展了GPT-3.5。个人或公司可以通过我们的系统对您的模型进行微调。
|
||||
您可以通过简单的描述提供完全自动化的业务表单提交操作,还可以与GPT聊天、交互和查阅信息。
|
||||
您可以通过Docker进行部署,以快速启动和使用。
|
||||
|
||||
它是完全免费的,如果这个项目对你有帮助,请点击Star。非常感谢。
|
||||
|
||||
## Project
|
||||
[Enginsh](https://github.com/wansenai/eairp/blob/master/README.md) / [简体中文](https://github.com/wansenai/eairp/blob/master/README_ZH.md)
|
||||
|
||||
## Online preview
|
||||
- [eairp preview / 在线预览](https://erp.wansen.cloud/)
|
||||
- 测试账号: wansen
|
||||
- 测试密码: 123456
|
||||
|
||||
一些功能模块正在开发和改进中,请参阅我们的待办事项列表[开发清单](https://github.com/wansenai/eairp/issues/124)。
|
||||
|
||||
## 快速开始
|
||||
```shell
|
||||
docker pull wansenai/eairp:2.1.1
|
||||
|
||||
docker pull wansenai/eairp-web:2.1.1
|
||||
```
|
||||
## 运行服务
|
||||
您可以自定义和修改端口8080,请确保您的前端监控的服务端口一致。
|
||||
如果要部署到您的域名,则需要将本地主机修改为您的域名。
|
||||
|
||||
我们将使用Docker Compose方法进行集成和部署,下一步它很快就会到来:)
|
||||
|
||||
```shell
|
||||
docker run --name eairp -d -p 8080:8088 wansenai/eairp:2.1.1
|
||||
|
||||
docker run --name eairp-web -d -p 3000:80 -e API_BASE_URL=http://localhost:8080/erp-api wansenai/eairp-web:2.1.1
|
||||
```
|
||||
|
||||
## 系统展示图
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 其他项目
|
||||
- [eairp-app](https://github.com/wansenai/eairp-app) **注意:** (该应用程序当前需要等待web端完全开发后才能继续)
|
||||
|
||||
## License
|
||||
|
||||
根据以下任一许可证之一,对本项目中的代码和文档进行许可:
|
||||
|
||||
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or https://opensource.wansenai.com/)
|
||||
- MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.wansenai.com/mit)
|
||||
|
||||
根据您的选择。
|
||||
|
||||
## 社区
|
||||
微信群: 请添加微信`wansenai`备注ERP开源.
|
||||
|
||||
## 贡献
|
||||
我们欢迎每一位贡献者,无论是在代码还是文档方面。
|
||||
|
||||
除非您另有明确说明,否则有意提交以纳入 根据Apache-2.0许可证的定义,您的作品应具有上述双重许可,没有任何附加条款或条件。
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
# API Module
|
||||
|
||||
This module is mainly used to encapsulate external request able **API(application program interfaces)**, It includes the following functions:
|
||||
|
||||
1. account: Account management and financial management, as well as financial detail management.
|
||||
2. depot: Warehouse management and warehouse entry and exit documents.
|
||||
3. Function management (**note:** this `API` is unstable and may need to be adjusted later)
|
||||
4. Management interface for revenue and expenditure.
|
||||
5. Some management interfaces for products (product attributes, classifications) include extension interfaces.
|
||||
6. Interface for message notification management, some functions for querying messages and updating status
|
||||
7. General management of institutional organizations.
|
||||
8. Operator Management Interface.
|
||||
9. Some interfaces on the system platform side
|
||||
10. Interface related to platform role management
|
||||
11. Document number management (**note:** this interface may be integrated later and will no longer be independent as a module)
|
||||
12. Serial number management interface, similar to the same as above.
|
||||
13. The interface for supplier management, which includes the interface for querying and operating supplier data
|
||||
14. System interface, including restrictions on general file upload and download, image compression preview, etc.
|
||||
15. Interface for multiple tenant management classes.
|
||||
16. Unit management interface.
|
||||
17. User management interface and interface management that includes the corresponding relationship between users and roles.
|
||||
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.wansenai.eairp</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>api</artifactId>
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.wansenai.eairp</groupId>
|
||||
<artifactId>utils</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.wansenai.eairp</groupId>
|
||||
<artifactId>plugins</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.wansenai.eairp</groupId>
|
||||
<artifactId>middleware</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.wansenai.eairp</groupId>
|
||||
<artifactId>service</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.wansenai.eairp</groupId>
|
||||
<artifactId>domain</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.wansenai.eairp</groupId>
|
||||
<artifactId>dao</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>3.1.4</version>
|
||||
<configuration>
|
||||
<finalName>eairp-core</finalName>
|
||||
<mainClass>com.wansenai.api.ErpApplication</mainClass>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api;
|
||||
|
||||
import com.wansenai.utils.ComputerInfo;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@EnableScheduling
|
||||
@MapperScan("com.wansenai.mappers")
|
||||
@ComponentScan("com.wansenai")
|
||||
@SpringBootApplication
|
||||
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("您还需启动前端服务,启动命令:pnpm serve ,测试用户:wansenerp,密码:123456");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api;
|
||||
|
||||
|
||||
public class RateLimitException extends RuntimeException {
|
||||
private String errorCode;
|
||||
private String errorMessage;
|
||||
|
||||
public RateLimitException(String errorCode, String errorMessage) {
|
||||
super(errorMessage);
|
||||
this.errorCode = errorCode;
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 供应商/客户信息表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sysSupplier")
|
||||
public class SystemSupplierController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.basic;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.basic.AddOrUpdateIncomeExpenseDTO;
|
||||
import com.wansenai.dto.basic.QueryIncomeExpenseDTO;
|
||||
import com.wansenai.service.basic.IncomeExpenseService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.basic.IncomeExpenseVO;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/basic/incomeExpense")
|
||||
public class IncomeExpenseController {
|
||||
|
||||
private final IncomeExpenseService incomeExpenseService;
|
||||
|
||||
public IncomeExpenseController(IncomeExpenseService incomeExpenseService) {
|
||||
this.incomeExpenseService = incomeExpenseService;
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<IncomeExpenseVO>> getIncomeExpensePageList(@RequestBody QueryIncomeExpenseDTO queryIncomeExpenseDTO) {
|
||||
return incomeExpenseService.getIncomeExpensePageList(queryIncomeExpenseDTO);
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateIncomeExpense(@RequestBody AddOrUpdateIncomeExpenseDTO addOrUpdateIncomeExpenseDTO) {
|
||||
return incomeExpenseService.addOrUpdateIncomeExpense(addOrUpdateIncomeExpenseDTO);
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteBatch")
|
||||
public Response<String> deleteIncomeExpense(@RequestParam("ids") List<Long> ids) {
|
||||
return incomeExpenseService.deleteBatchIncomeExpense(ids);
|
||||
}
|
||||
|
||||
@PostMapping("updateStatus")
|
||||
public Response<String> updateIncomeExpenseStatus(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return incomeExpenseService.updateIncomeExpenseStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("list/{type}")
|
||||
public Response<List<IncomeExpenseVO>> getIncomeExpenseList(@PathVariable("type") String type) {
|
||||
return incomeExpenseService.getIncomeExpenseListByType(type);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.basic;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.basic.AddOrUpdateOperatorDTO;
|
||||
import com.wansenai.dto.basic.QueryOperatorDTO;
|
||||
import com.wansenai.service.basic.IOperatorService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.basic.OperatorVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/basic/operator")
|
||||
public class OperatorController {
|
||||
|
||||
private final IOperatorService operatorService;
|
||||
|
||||
public OperatorController(IOperatorService operatorService) {
|
||||
this.operatorService = operatorService;
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<OperatorVO>> getOperatorPageList(@RequestBody QueryOperatorDTO queryOperatorDTO) {
|
||||
return operatorService.getOperatorPageList(queryOperatorDTO);
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateOperator(@RequestBody AddOrUpdateOperatorDTO addOrUpdateOperatorDTO) {
|
||||
return operatorService.addOrUpdateOperator(addOrUpdateOperatorDTO);
|
||||
}
|
||||
|
||||
@DeleteMapping("delete")
|
||||
public Response<String> deleteOperator(@RequestParam("ids") List<Long> ids) {
|
||||
return operatorService.deleteBatchOperator(ids);
|
||||
}
|
||||
|
||||
@PostMapping("updateStatus")
|
||||
public Response<String> updateOperatorStatus(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return operatorService.updateOperatorStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("list/{type}")
|
||||
public Response<List<OperatorVO>> getOperatorList(@PathVariable("type") String type) {
|
||||
return operatorService.getOperatorListByType(type);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.common;
|
||||
|
||||
import com.wansenai.api.RateLimitException;
|
||||
import com.wansenai.api.config.RateLimiter;
|
||||
import com.wansenai.service.common.CommonService;
|
||||
import com.wansenai.utils.enums.LimitType;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.utils.constants.ApiVersionConstants;
|
||||
import com.wansenai.utils.enums.BaseCodeEnum;
|
||||
import com.wansenai.vo.CaptchaVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping(ApiVersionConstants.API_CLASS_VERSION_V2 + "common")
|
||||
@Slf4j
|
||||
public class CommonController {
|
||||
|
||||
private final CommonService commonService;
|
||||
|
||||
public CommonController(CommonService commonService) {
|
||||
this.commonService = commonService;
|
||||
}
|
||||
|
||||
@GetMapping( "captcha")
|
||||
public Response<CaptchaVO> getCaptcha() {
|
||||
CaptchaVO captchaVo = commonService.getCaptcha();
|
||||
if(captchaVo == null) {
|
||||
return Response.responseMsg(BaseCodeEnum.ERROR);
|
||||
}
|
||||
return Response.responseData(captchaVo);
|
||||
}
|
||||
|
||||
@ExceptionHandler(RateLimitException.class)
|
||||
public Response<String> handleRateLimitException(RateLimitException ex) {
|
||||
return Response.responseMsg(BaseCodeEnum.FREQUENT_SYSTEM_ACCESS);
|
||||
}
|
||||
|
||||
@GetMapping("sms/{type}/{phoneNumber}")
|
||||
@RateLimiter(key = "sms", time = 120, count = 1, limitType = LimitType.IP)
|
||||
public Response<String> sendSmsCode(@PathVariable Integer type, @PathVariable String phoneNumber) {
|
||||
boolean result = commonService.sendSmsCode(type, phoneNumber);
|
||||
if(!result) {
|
||||
return Response.responseMsg(BaseCodeEnum.PHONE_NUMBER_FORMAT_ERROR);
|
||||
}
|
||||
return Response.responseMsg(BaseCodeEnum.SMS_VERIFY_SEND_SUCCESS);
|
||||
}
|
||||
|
||||
@GetMapping("email/{type}/{email}")
|
||||
public Response<String> sendEmailCode(@PathVariable Integer type, @PathVariable String email) {
|
||||
return commonService.sendEmailCode(type, email);
|
||||
}
|
||||
|
||||
@PostMapping("upload/excel")
|
||||
public Response<String> uploadExclsData(@RequestParam("file") MultipartFile file) {
|
||||
return commonService.uploadExclsData(file);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("upload/productCoverUpload")
|
||||
public Response<String> productCoverUpload(@RequestParam("file") MultipartFile file, @RequestParam("type") Integer type) {
|
||||
return commonService.productCoverUpload(file, type);
|
||||
}
|
||||
|
||||
@PostMapping("uploadOss")
|
||||
public Response<List<String>> uploadOss(@RequestParam("files") List<MultipartFile> files) {
|
||||
return commonService.uploadOss(files);
|
||||
}
|
||||
|
||||
@GetMapping("nextId/{type}")
|
||||
public Response<String> nextId(@PathVariable String type) {
|
||||
return commonService.generateSnowflakeId(type);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
import org.springframework.web.filter.CorsFilter;
|
||||
|
||||
@Configuration
|
||||
public class CorsConfig {
|
||||
|
||||
/**
|
||||
* 当前跨域请求最大有效时长。这里默认1天
|
||||
*/
|
||||
private static final long MAX_AGE = 24 * 60 * 60;
|
||||
|
||||
@Bean
|
||||
public CorsFilter corsFilter() {
|
||||
//1. 添加 CORS配置信息
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
//放行哪些原始域
|
||||
//config.addAllowedOrigin("*");
|
||||
//原本是addAllowedOrigin,改为addAllowedOriginPattern
|
||||
config.addAllowedOriginPattern("*");
|
||||
//是否发送 Cookie
|
||||
config.setAllowCredentials(true);
|
||||
//放行哪些请求方式
|
||||
config.addAllowedMethod("*");
|
||||
//放行哪些原始请求头部信息
|
||||
config.addAllowedHeader("*");
|
||||
//暴露哪些头部信息
|
||||
config.addExposedHeader("*");
|
||||
//2. 添加映射路径
|
||||
UrlBasedCorsConfigurationSource corsConfigurationSource = new UrlBasedCorsConfigurationSource();
|
||||
corsConfigurationSource.registerCorsConfiguration("/**",config);
|
||||
//3. 返回新的CorsFilter
|
||||
return new CorsFilter(corsConfigurationSource);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.config;
|
||||
|
||||
import org.flowable.spring.SpringProcessEngineConfiguration;
|
||||
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class FlowableConfig implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
|
||||
/**
|
||||
* 防止生成的流程图中文乱码
|
||||
* @param springProcessEngineConfiguration
|
||||
*/
|
||||
@Override
|
||||
public void configure(SpringProcessEngineConfiguration springProcessEngineConfiguration) {
|
||||
springProcessEngineConfiguration.setActivityFontName("宋体");
|
||||
springProcessEngineConfiguration.setLabelFontName("宋体");
|
||||
springProcessEngineConfiguration.setAnnotationFontName("宋体");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
|
||||
import com.wansenai.utils.redis.RedisUtil;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import net.sf.jsqlparser.expression.Expression;
|
||||
import net.sf.jsqlparser.expression.LongValue;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
@Configuration
|
||||
@MapperScan("com.wansenai.mappers")
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
public final RedisUtil redisUtil;
|
||||
|
||||
public MybatisPlusConfig(RedisUtil redisUtil) {
|
||||
this.redisUtil = redisUtil;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据token截取租户id
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
public Long getTenantIdByToken(String token) {
|
||||
long tenantId = -1L;
|
||||
if(StringUtils.hasText(token)) {
|
||||
tenantId = Long.parseLong(redisUtil.getString(token + ":tenantId"));
|
||||
}
|
||||
return tenantId;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor(HttpServletRequest request) {
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
interceptor.addInnerInterceptor(new TenantLineInnerInterceptor(new TenantLineHandler() {
|
||||
@Override
|
||||
public Expression getTenantId() {
|
||||
String token = request.getHeader("Authorization");
|
||||
Long tenantId = getTenantIdByToken(token);
|
||||
if (tenantId!=0L) {
|
||||
return new LongValue(tenantId);
|
||||
} else {
|
||||
//超管
|
||||
return new LongValue(0);
|
||||
}
|
||||
}
|
||||
|
||||
// 这是 default 方法,默认返回 false 表示所有表都需要拼多租户条件
|
||||
@Override
|
||||
public boolean ignoreTable(String tableName) {
|
||||
return "sys_user".equalsIgnoreCase(tableName) || "sys_menu".equalsIgnoreCase(tableName)
|
||||
|| "sys_user_role_rel".equalsIgnoreCase(tableName) || "sys_user_dept_rel".equalsIgnoreCase(tableName)
|
||||
|| "sys_role_menu_rel".equalsIgnoreCase(tableName) || "sys_platform_config".equalsIgnoreCase(tableName)
|
||||
|| "sys_tenant".equalsIgnoreCase(tableName);
|
||||
}
|
||||
}));
|
||||
|
||||
// 如果用了分页插件注意先 add TenantLineInnerInterceptor 再 add PaginationInnerInterceptor
|
||||
// 用了分页插件必须设置 MybatisConfiguration#useDeprecatedExecutor = false
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||
return interceptor;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
//package com.wansenai.api.config;
|
||||
//
|
||||
//import com.gitee.starblues.core.RuntimeMode;
|
||||
//import com.gitee.starblues.integration.DefaultIntegrationConfiguration;
|
||||
//import org.springframework.beans.factory.annotation.Value;
|
||||
//import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
//import org.springframework.stereotype.Component;
|
||||
///**
|
||||
// *
|
||||
// */
|
||||
//@Component
|
||||
//@ConfigurationProperties(prefix = "plugin")
|
||||
//public class PluginConfiguration extends DefaultIntegrationConfiguration {
|
||||
// /**
|
||||
// * 运行模式
|
||||
// * 开发环境: development、dev
|
||||
// * 生产/部署 环境: deployment、prod
|
||||
// */
|
||||
// @Value("${runMode:dev}")
|
||||
// private String runMode;
|
||||
//
|
||||
// @Value("${pluginPath:plugins}")
|
||||
// private String pluginPath;
|
||||
//
|
||||
// @Value("${pluginConfigFilePath:pluginConfigs}")
|
||||
// private String pluginConfigFilePath;
|
||||
//
|
||||
// @Override
|
||||
// public RuntimeMode environment() {
|
||||
// return RuntimeMode.byName(runMode);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String mainPackage() {
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// public String getRunMode() {
|
||||
// return runMode;
|
||||
// }
|
||||
//
|
||||
// public void setRunMode(String runMode) {
|
||||
// this.runMode = runMode;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public String getPluginPath() {
|
||||
// return pluginPath;
|
||||
// }
|
||||
//
|
||||
// public void setPluginPath(String pluginPath) {
|
||||
// this.pluginPath = pluginPath;
|
||||
// }
|
||||
//
|
||||
// public String getPluginConfigFilePath() {
|
||||
// return pluginConfigFilePath;
|
||||
// }
|
||||
//
|
||||
// public void setPluginConfigFilePath(String pluginConfigFilePath) {
|
||||
// this.pluginConfigFilePath = pluginConfigFilePath;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return "PluginArgConfiguration{" +
|
||||
// "runMode='" + runMode + '\'' +
|
||||
// ", pluginPath='" + pluginPath + '\'' +
|
||||
// ", pluginConfigFilePath='" + pluginConfigFilePath + '\'' +
|
||||
// '}';
|
||||
// }
|
||||
//}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.wansenai.api.config;
|
||||
|
||||
import com.wansenai.utils.enums.LimitType;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Target(ElementType.METHOD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface RateLimiter {
|
||||
/**
|
||||
* 限流key
|
||||
*/
|
||||
String key() default "rate_limit:";
|
||||
|
||||
/**
|
||||
* 限流时间,单位秒
|
||||
*/
|
||||
int time() default 60;
|
||||
|
||||
/**
|
||||
* 限流次数
|
||||
*/
|
||||
int count() default 100;
|
||||
|
||||
/**
|
||||
* 限流类型
|
||||
*/
|
||||
LimitType limitType() default LimitType.DEFAULT;
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.config;
|
||||
|
||||
import com.wansenai.api.RateLimitException;
|
||||
import com.wansenai.utils.IpUtils;
|
||||
import com.wansenai.utils.enums.BaseCodeEnum;
|
||||
import com.wansenai.utils.enums.LimitType;
|
||||
import com.wansenai.utils.redis.RedisUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import org.aspectj.lang.reflect.MethodSignature;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Aspect
|
||||
@Slf4j
|
||||
public class RateLimiterAspect {
|
||||
|
||||
private final RedisUtil redisUtil;
|
||||
|
||||
public RateLimiterAspect(RedisUtil redisUtil) {
|
||||
this.redisUtil = redisUtil;
|
||||
}
|
||||
|
||||
|
||||
@Before("@annotation(rateLimiter)")
|
||||
public void doBefore(JoinPoint point, RateLimiter rateLimiter) {
|
||||
String key = rateLimiter.key();
|
||||
int time = rateLimiter.time();
|
||||
int count = rateLimiter.count();
|
||||
|
||||
String combineKey = getCombineKey(rateLimiter, point);
|
||||
List<String> keys = Collections.singletonList(combineKey);
|
||||
try {
|
||||
if (redisUtil.get(keys.get(0)) != null) {
|
||||
long number = redisUtil.incr(keys.get(0), 1);
|
||||
if ((int) number > count) {
|
||||
throw new RateLimitException(BaseCodeEnum.FREQUENT_SYSTEM_ACCESS.getCode(), BaseCodeEnum.FREQUENT_SYSTEM_ACCESS.getMsg());
|
||||
}
|
||||
log.info("限制请求'{}',当前请求'{}',缓存key'{}'", count, (int) number, keys.get(0));
|
||||
} else {
|
||||
redisUtil.set(keys.get(0), 1, time);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RateLimitException(BaseCodeEnum.SYSTEM_BUSY.getCode(), BaseCodeEnum.SYSTEM_BUSY.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取ip为key
|
||||
* @param rateLimiter
|
||||
* @param point
|
||||
* @return
|
||||
*/
|
||||
public String getCombineKey(RateLimiter rateLimiter, JoinPoint point) {
|
||||
StringBuilder stringBuffer = new StringBuilder(rateLimiter.key());
|
||||
if (rateLimiter.limitType() == LimitType.IP) {
|
||||
stringBuffer.append(
|
||||
IpUtils.getIpAddr(((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes())
|
||||
.getRequest()))
|
||||
.append("-");
|
||||
}
|
||||
MethodSignature signature = (MethodSignature) point.getSignature();
|
||||
Method method = signature.getMethod();
|
||||
Class<?> targetClass = method.getDeclaringClass();
|
||||
stringBuffer.append(targetClass.getName()).append("-").append(method.getName());
|
||||
return stringBuffer.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.financial;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.financial.AddOrUpdateCollectionDTO;
|
||||
import com.wansenai.dto.financial.QueryCollectionDTO;
|
||||
import com.wansenai.service.financial.CollectionReceiptService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.financial.CollectionDetailVO;
|
||||
import com.wansenai.vo.financial.CollectionVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/financial/collection")
|
||||
public class CollectionReceiptController {
|
||||
|
||||
private final CollectionReceiptService collectionReceiptService;
|
||||
|
||||
public CollectionReceiptController(CollectionReceiptService collectionReceiptService) {
|
||||
this.collectionReceiptService = collectionReceiptService;
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateCollectionReceipt(@RequestBody AddOrUpdateCollectionDTO addOrUpdateCollectionDTO) {
|
||||
return collectionReceiptService.addOrUpdateCollectionReceipt(addOrUpdateCollectionDTO);
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<CollectionVO>> getCollectionReceiptPageList(@RequestBody QueryCollectionDTO queryCollectionDTO) {
|
||||
return collectionReceiptService.getCollectionReceiptPageList(queryCollectionDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
public Response<CollectionDetailVO> getCollectionReceiptDetailById(@PathVariable("id") Long id) {
|
||||
return collectionReceiptService.getCollectionReceiptDetail(id);
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
public Response<String> deleteCollectionReceiptByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return collectionReceiptService.deleteBatchCollectionReceipt(ids);
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
public Response<String> updateCollectionReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return collectionReceiptService.updateCollectionReceiptStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportCollectionReceipt(@ModelAttribute QueryCollectionDTO queryCollectionDTO, HttpServletResponse response) {
|
||||
collectionReceiptService.exportCollectionReceipt(queryCollectionDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
public void exportCollectionReceiptDetail(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) {
|
||||
collectionReceiptService.exportCollectionReceiptDetail(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.financial;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.financial.AddOrUpdateExpenseDTO;
|
||||
import com.wansenai.dto.financial.QueryExpenseDTO;
|
||||
import com.wansenai.service.financial.ExpenseReceiptService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.financial.ExpenseDetailVO;
|
||||
import com.wansenai.vo.financial.ExpenseVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/financial/expense")
|
||||
public class ExpenseReceiptController {
|
||||
|
||||
private final ExpenseReceiptService expenseReceiptService;
|
||||
|
||||
public ExpenseReceiptController(ExpenseReceiptService expenseReceiptService) {
|
||||
this.expenseReceiptService = expenseReceiptService;
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateExpenseReceipt(@RequestBody AddOrUpdateExpenseDTO addOrUpdateExpenseDTO) {
|
||||
return expenseReceiptService.addOrUpdateExpenseReceipt(addOrUpdateExpenseDTO);
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<ExpenseVO>> getExpenseReceiptPageList(@RequestBody QueryExpenseDTO queryExpenseDTO) {
|
||||
return expenseReceiptService.getExpenseReceiptPageList(queryExpenseDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
public Response<ExpenseDetailVO> getExpenseReceiptDetailById(@PathVariable("id") Long id) {
|
||||
return expenseReceiptService.getExpenseReceiptDetail(id);
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
public Response<String> deleteExpenseReceiptByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return expenseReceiptService.deleteBatchExpenseReceipt(ids);
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
public Response<String> updateExpenseReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return expenseReceiptService.updateExpenseReceiptStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportExpenseReceipt(@ModelAttribute QueryExpenseDTO queryExpenseDTO, HttpServletResponse response) {
|
||||
expenseReceiptService.exportExpenseReceipt(queryExpenseDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
public void exportExpenseReceiptDetail(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) {
|
||||
expenseReceiptService.exportExpenseReceiptDetail(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.financial;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.financial.AddOrUpdateAccountDTO;
|
||||
import com.wansenai.dto.financial.QueryAccountDTO;
|
||||
import com.wansenai.service.financial.IFinancialAccountService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.financial.AccountVO;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/financial/account")
|
||||
public class FinancialAccountController {
|
||||
|
||||
private final IFinancialAccountService accountService;
|
||||
|
||||
public FinancialAccountController(IFinancialAccountService accountService) {
|
||||
this.accountService = accountService;
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<AccountVO>> getAccountPageList(@RequestBody QueryAccountDTO queryAccountDTO) {
|
||||
return accountService.getAccountPageList(queryAccountDTO);
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateAccount(@RequestBody AddOrUpdateAccountDTO addOrUpdateAccountDTO) {
|
||||
return accountService.addOrUpdateAccount(addOrUpdateAccountDTO);
|
||||
}
|
||||
|
||||
@DeleteMapping("delete")
|
||||
public Response<String> deleteAccount(@RequestParam("ids") List<Long> ids) {
|
||||
return accountService.deleteBatchAccount(ids);
|
||||
}
|
||||
|
||||
@PostMapping("updateStatus")
|
||||
public Response<String> updateAccountStatus(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return accountService.updateAccountStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public Response<List<AccountVO>> getAccountList() {
|
||||
return accountService.getAccountList();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.financial;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.financial.AddOrUpdateIncomeDTO;
|
||||
import com.wansenai.dto.financial.QueryIncomeDTO;
|
||||
import com.wansenai.service.financial.IncomeReceiptService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.financial.IncomeDetailVO;
|
||||
import com.wansenai.vo.financial.IncomeVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/financial/income")
|
||||
public class IncomeReceiptController {
|
||||
|
||||
private final IncomeReceiptService incomeReceiptService;
|
||||
|
||||
public IncomeReceiptController(IncomeReceiptService incomeReceiptService) {
|
||||
this.incomeReceiptService = incomeReceiptService;
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateIncomeReceipt(@RequestBody AddOrUpdateIncomeDTO addOrUpdateIncomeDTO) {
|
||||
return incomeReceiptService.addOrUpdateIncomeReceipt(addOrUpdateIncomeDTO);
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<IncomeVO>> getIncomeReceiptPageList(@RequestBody QueryIncomeDTO queryIncomeDTO) {
|
||||
return incomeReceiptService.getIncomeReceiptPageList(queryIncomeDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
public Response<IncomeDetailVO> getIncomeReceiptDetailById(@PathVariable("id") Long id) {
|
||||
return incomeReceiptService.getIncomeReceiptDetail(id);
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
public Response<String> deleteIncomeReceiptByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return incomeReceiptService.deleteBatchIncomeReceipt(ids);
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
public Response<String> updateIncomeReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return incomeReceiptService.updateIncomeReceiptStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportIncomeReceipt(@ModelAttribute QueryIncomeDTO queryIncomeDTO, HttpServletResponse response) {
|
||||
incomeReceiptService.exportIncomeReceipt(queryIncomeDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
public void exportIncomeReceiptDetail(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) {
|
||||
incomeReceiptService.exportIncomeReceiptDetail(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.financial;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.financial.AddOrUpdatePaymentDTO;
|
||||
import com.wansenai.dto.financial.QueryPaymentDTO;
|
||||
import com.wansenai.service.financial.PaymentReceiptService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.financial.PaymentDetailVO;
|
||||
import com.wansenai.vo.financial.PaymentVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/financial/payment")
|
||||
public class PaymentReceiptController {
|
||||
|
||||
private final PaymentReceiptService paymentReceiptService;
|
||||
|
||||
public PaymentReceiptController(PaymentReceiptService paymentReceiptService) {
|
||||
this.paymentReceiptService = paymentReceiptService;
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdatePaymentReceipt(@RequestBody AddOrUpdatePaymentDTO addOrUpdatePaymentDTO) {
|
||||
return paymentReceiptService.addOrUpdatePaymentReceipt(addOrUpdatePaymentDTO);
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<PaymentVO>> getPaymentReceiptPageList(@RequestBody QueryPaymentDTO queryPaymentDTO) {
|
||||
return paymentReceiptService.getPaymentReceiptPageList(queryPaymentDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
public Response<PaymentDetailVO> getPaymentReceiptDetailById(@PathVariable("id") Long id) {
|
||||
return paymentReceiptService.getPaymentReceiptDetail(id);
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
public Response<String> deletePaymentReceiptByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return paymentReceiptService.deleteBatchPaymentReceipt(ids);
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
public Response<String> updatePaymentReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return paymentReceiptService.updatePaymentReceiptStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportPaymentReceipt(@ModelAttribute QueryPaymentDTO queryPaymentDTO, HttpServletResponse response) {
|
||||
paymentReceiptService.exportPaymentReceipt(queryPaymentDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
public void exportPaymentReceiptDetail(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) {
|
||||
paymentReceiptService.exportPaymentReceiptDetail(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.financial;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.financial.AddOrUpdateTransferDTO;
|
||||
import com.wansenai.dto.financial.QueryTransferDTO;
|
||||
import com.wansenai.service.financial.TransferReceiptService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.financial.TransferDetailVO;
|
||||
import com.wansenai.vo.financial.TransferVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/financial/transfer")
|
||||
public class TransferReceiptController {
|
||||
|
||||
private final TransferReceiptService transferReceiptService;
|
||||
|
||||
public TransferReceiptController(TransferReceiptService transferReceiptService) {
|
||||
this.transferReceiptService = transferReceiptService;
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateTransferReceipt(@RequestBody AddOrUpdateTransferDTO addOrUpdateTransferDTO) {
|
||||
return transferReceiptService.addOrUpdateTransferReceipt(addOrUpdateTransferDTO);
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<TransferVO>> getTransferReceiptPageList(@RequestBody QueryTransferDTO queryTransferDTO) {
|
||||
return transferReceiptService.getTransferReceiptPageList(queryTransferDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
public Response<TransferDetailVO> getTransferReceiptDetailById(@PathVariable("id") Long id) {
|
||||
return transferReceiptService.getTransferReceiptDetail(id);
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
public Response<String> deleteTransferReceiptByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return transferReceiptService.deleteBatchTransferReceipt(ids);
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
public Response<String> updateTransferReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return transferReceiptService.updateTransferReceiptStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportTransferReceipt(@ModelAttribute QueryTransferDTO queryTransferDTO, HttpServletResponse response) {
|
||||
transferReceiptService.exportTransferReceipt(queryTransferDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
public void exportTransferReceiptDetail(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) {
|
||||
transferReceiptService.exportTransferReceiptDetail(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.product;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.product.AddOrUpdateProductDTO;
|
||||
import com.wansenai.dto.product.QueryProductDTO;
|
||||
import com.wansenai.dto.product.UpdateBatchProductDTO;
|
||||
import com.wansenai.service.product.ProductStockKeepUnitService;
|
||||
import com.wansenai.service.product.ProductService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.product.ProductDetailVO;
|
||||
import com.wansenai.vo.product.ProductVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/product")
|
||||
public class ProductController {
|
||||
|
||||
private final ProductService productService;
|
||||
|
||||
private final ProductStockKeepUnitService extendPriceService;
|
||||
|
||||
public ProductController(ProductService productService, ProductStockKeepUnitService extendPriceService) {
|
||||
this.productService = productService;
|
||||
this.extendPriceService = extendPriceService;
|
||||
}
|
||||
|
||||
@GetMapping("getProductCode")
|
||||
public Response<String> getProductCode() {
|
||||
return extendPriceService.getProductCode();
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdateProduct")
|
||||
public Response<String> addOrUpdateProduct(@RequestBody AddOrUpdateProductDTO addOrUpdateProductDTO) {
|
||||
return productService.addOrUpdateProduct(addOrUpdateProductDTO);
|
||||
}
|
||||
|
||||
@PostMapping("getProductInfo")
|
||||
public Response<Page<ProductVO>> getProductInfo(@RequestBody QueryProductDTO queryProductDTO) {
|
||||
return productService.getProductInfo(queryProductDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getProductInfoDetail/{productId}")
|
||||
public Response<ProductDetailVO> getProductInfoDetail(@PathVariable Long productId) {
|
||||
return productService.getProductInfoDetail(productId);
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteProduct/{productIds}")
|
||||
public Response<String> deleteProduct(@PathVariable List<Long> productIds) {
|
||||
return productService.deleteProduct(productIds);
|
||||
}
|
||||
|
||||
@PutMapping("updateProductStatus/{productIds}/{status}")
|
||||
public Response<String> updateProductStatus(@PathVariable List<Long> productIds, @PathVariable Integer status) {
|
||||
return productService.updateProductStatus(productIds, status);
|
||||
}
|
||||
|
||||
@PutMapping("updateBatchProductInfo")
|
||||
public Response<String> updateBatchProductInfo(@RequestBody UpdateBatchProductDTO updateBatchProductDTO) {
|
||||
return productService.updateBatchProductInfo(updateBatchProductDTO);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportProductExcel(@ModelAttribute QueryProductDTO queryProductDTO , HttpServletResponse response) throws Exception {
|
||||
productService.exportProductExcel(queryProductDTO, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.product;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品当前库存 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/product-inventory-current")
|
||||
public class ProductInventoryCurrentController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.product;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品初始库存 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/product-inventory-initial")
|
||||
public class ProductInventoryInitialController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.product;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品扩展字段表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/product/property")
|
||||
public class ProductPropertyController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.product;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.wansenai.dto.product.QueryProductStockKeepUnitDTO;
|
||||
import com.wansenai.dto.report.QueryProductStockDTO;
|
||||
import com.wansenai.service.product.ProductStockService;
|
||||
import com.wansenai.utils.enums.BaseCodeEnum;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.product.ProductStockKeepUnitVO;
|
||||
import com.wansenai.vo.report.ProductStockSkuVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品价格扩展 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/product/sku")
|
||||
public class ProductStockKeepUnitController {
|
||||
|
||||
private final ProductStockService productStockService;
|
||||
|
||||
public ProductStockKeepUnitController(ProductStockService productStockService) {
|
||||
this.productStockService = productStockService;
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<IPage<ProductStockKeepUnitVO>> getProductExtendPrice(@RequestBody QueryProductStockKeepUnitDTO priceDTO) {
|
||||
var result = productStockService.getProductExtendPriceInfo(priceDTO);
|
||||
if(result != null) {
|
||||
return Response.responseData(result);
|
||||
}
|
||||
return Response.responseMsg(BaseCodeEnum.QUERY_DATA_EMPTY);
|
||||
}
|
||||
|
||||
@GetMapping("getProduct/{barCode}/{warehouseId}")
|
||||
public Response<ProductStockKeepUnitVO> getProductByBarCode(@PathVariable("barCode") String barCode, @PathVariable("warehouseId")Long warehouseId) {
|
||||
return productStockService.getProductByBarCode(barCode, warehouseId);
|
||||
}
|
||||
|
||||
@PostMapping("productStockSku")
|
||||
public Response<List<ProductStockSkuVO>> getProductStockInfo() {
|
||||
return productStockService.getProductStockSkuList();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,167 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.receipt;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.receipt.purchase.*;
|
||||
import com.wansenai.service.receipt.ReceiptPurchaseService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.receipt.purchase.*;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("purchase")
|
||||
public class PurchaseController {
|
||||
|
||||
private final ReceiptPurchaseService purchaseService;
|
||||
|
||||
public PurchaseController(ReceiptPurchaseService purchaseService) {
|
||||
this.purchaseService = purchaseService;
|
||||
}
|
||||
|
||||
@GetMapping("/order/pageList")
|
||||
public Response<Page<PurchaseOrderVO>> pageList(@ModelAttribute QueryPurchaseOrderDTO queryPurchaseOrderDTO) {
|
||||
return purchaseService.getPurchaseOrderPage(queryPurchaseOrderDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/order/addOrUpdate")
|
||||
public Response<String> addOrUpdate(@RequestBody PurchaseOrderDTO purchaseOrderDTO) {
|
||||
return purchaseService.addOrUpdatePurchaseOrder(purchaseOrderDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/order/detail/{id}")
|
||||
public Response<PurchaseOrderDetailVO> detail(@PathVariable("id") Long id) {
|
||||
return purchaseService.getPurchaseOrderDetail(id);
|
||||
}
|
||||
|
||||
@GetMapping("/order/getLinkOrderDetail/{receiptNumber}")
|
||||
public Response<PurchaseOrderDetailVO> getLinkPurchaseOrderDetail(@PathVariable("receiptNumber") String receiptNumber) {
|
||||
return purchaseService.getLinkPurchaseOrderDetail(receiptNumber);
|
||||
}
|
||||
|
||||
@PutMapping("/order/updateStatus/{ids}/{status}")
|
||||
public Response<String> updateStatus(@PathVariable("ids") List<Long> ids, @PathVariable("status") Integer status) {
|
||||
return purchaseService.updatePurchaseOrderStatus(ids, status);
|
||||
}
|
||||
|
||||
@PutMapping("/order/delete/{ids}")
|
||||
public Response<String> delete(@PathVariable("ids") List<Long> ids) {
|
||||
return purchaseService.deletePurchaseOrder(ids);
|
||||
}
|
||||
|
||||
@GetMapping("/storage/pageList")
|
||||
public Response<Page<PurchaseStorageVO>> getPurchaseStoragePageList(@ModelAttribute QueryPurchaseStorageDTO queryPurchaseStorageDTO) {
|
||||
return purchaseService.getPurchaseStoragePage(queryPurchaseStorageDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/storage/addOrUpdate")
|
||||
public Response<String> addOrUpdatePurchaseStorage(@RequestBody PurchaseStorageDTO purchaseStorageDTO) {
|
||||
return purchaseService.addOrUpdatePurchaseStorage(purchaseStorageDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/storage/detail/{id}")
|
||||
public Response<PurchaseStorageDetailVO> purchaseStorageDetail(@PathVariable("id") Long id) {
|
||||
return purchaseService.getPurchaseStorageDetail(id);
|
||||
}
|
||||
|
||||
@GetMapping("/storage/getLinkStorageDetail/{receiptNumber}")
|
||||
public Response<PurchaseStorageDetailVO> getLinkPurchaseStorageDetail(@PathVariable("receiptNumber") String receiptNumber) {
|
||||
return purchaseService.getLinkPurchaseStorageDetail(receiptNumber);
|
||||
}
|
||||
|
||||
@PutMapping("/storage/updateStatus/{ids}/{status}")
|
||||
public Response<String> updatePurchaseStorageStatus(@PathVariable("ids") List<Long> ids, @PathVariable("status") Integer status) {
|
||||
return purchaseService.updatePurchaseStorageStatus(ids, status);
|
||||
}
|
||||
|
||||
@PutMapping("/storage/delete/{ids}")
|
||||
public Response<String> deletePurchaseStorage(@PathVariable("ids") List<Long> ids) {
|
||||
return purchaseService.deletePurchaseStorage(ids);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/pageList")
|
||||
public Response<Page<PurchaseRefundVO>> getPurchaseRefundPageList(@ModelAttribute QueryPurchaseRefundDTO queryPurchaseRefundDTO) {
|
||||
return purchaseService.getPurchaseRefundPage(queryPurchaseRefundDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/refund/addOrUpdate")
|
||||
public Response<String> addOrUpdatePurchaseRefund(@RequestBody PurchaseRefundDTO purchaseRefundDTO) {
|
||||
return purchaseService.addOrUpdatePurchaseRefund(purchaseRefundDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/detail/{id}")
|
||||
public Response<PurchaseRefundDetailVO> purchaseRefundDetail(@PathVariable("id") Long id) {
|
||||
return purchaseService.getPurchaseRefundDetail(id);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/getLinkRefundDetail/{receiptNumber}")
|
||||
public Response<PurchaseRefundDetailVO> getLinkPurchaseRefundDetail(@PathVariable("receiptNumber") String receiptNumber) {
|
||||
return purchaseService.getLinkPurchaseRefundDetail(receiptNumber);
|
||||
}
|
||||
|
||||
@PutMapping("/refund/updateStatus/{ids}/{status}")
|
||||
public Response<String> updatePurchaseRefundStatus(@PathVariable("ids") List<Long> ids, @PathVariable("status") Integer status) {
|
||||
return purchaseService.updatePurchaseRefundStatus(ids, status);
|
||||
}
|
||||
|
||||
@PutMapping("/refund/delete/{ids}")
|
||||
public Response<String> deletePurchaseRefund(@PathVariable("ids") List<Long> ids) {
|
||||
return purchaseService.deletePurchaseRefund(ids);
|
||||
}
|
||||
|
||||
@PostMapping("/arrears/pageList")
|
||||
public Response<Page<PurchaseArrearsVO>> arrearsPageList(@RequestBody QueryPurchaseArrearsDTO arrearsDTO) {
|
||||
return purchaseService.getPurchaseArrearsPage(arrearsDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/order/export")
|
||||
public void exportOrderExcel(@ModelAttribute QueryPurchaseOrderDTO queryPurchaseOrderDTO, HttpServletResponse response) throws Exception {
|
||||
purchaseService.exportPurchaseOrderExcel(queryPurchaseOrderDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/order/exportDetail/{receiptNumber}")
|
||||
public void exportOrderDetailExcel(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
purchaseService.exportPurchaseOrderDetailExcel(receiptNumber, response);
|
||||
}
|
||||
|
||||
@GetMapping("/storage/export")
|
||||
public void exportStorageExcel(@ModelAttribute QueryPurchaseStorageDTO queryPurchaseStorageDTO, HttpServletResponse response) throws Exception {
|
||||
purchaseService.exportPurchaseStorageExcel(queryPurchaseStorageDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/storage/exportDetail/{receiptNumber}")
|
||||
public void exportStorageDetailExcel(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
purchaseService.exportPurchaseStorageDetailExcel(receiptNumber, response);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/export")
|
||||
public void exportRefundExcel(@ModelAttribute QueryPurchaseRefundDTO queryPurchaseRefundDTO, HttpServletResponse response) throws Exception {
|
||||
purchaseService.exportPurchaseRefundExcel(queryPurchaseRefundDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/exportDetail/{receiptNumber}")
|
||||
public void exportRefundDetailExcel(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
purchaseService.exportPurchaseRefundDetailExcel(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.receipt;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.receipt.QueryReceiptDTO;
|
||||
import com.wansenai.service.receipt.ReceiptRetailService;
|
||||
import com.wansenai.service.receipt.ReceiptService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.receipt.ReceiptDetailVO;
|
||||
import com.wansenai.vo.receipt.ReceiptRetailDetailVO;
|
||||
import com.wansenai.vo.receipt.ReceiptVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/receipt")
|
||||
public class ReceiptController {
|
||||
|
||||
private final ReceiptRetailService receiptRetailService;
|
||||
|
||||
private final ReceiptService receiptService;
|
||||
|
||||
public ReceiptController(ReceiptRetailService receiptRetailService, ReceiptService receiptService) {
|
||||
this.receiptRetailService = receiptRetailService;
|
||||
this.receiptService = receiptService;
|
||||
}
|
||||
|
||||
@GetMapping("otherReceipt")
|
||||
public Response<Page<ReceiptVO>> getOtherReceipt(@ModelAttribute QueryReceiptDTO queryReceiptDTO) {
|
||||
return receiptService.otherReceipt(queryReceiptDTO);
|
||||
}
|
||||
|
||||
@GetMapping("otherReceiptDetail")
|
||||
public Response<Page<ReceiptDetailVO>> getOtherDetail(@ModelAttribute QueryReceiptDTO queryReceiptDTO) {
|
||||
return receiptService.getOtherDetail(queryReceiptDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/detail/{id}")
|
||||
@Deprecated(since = "2021-11-09", forRemoval = true)
|
||||
public Response<List<ReceiptRetailDetailVO>> getRetailDetail(@PathVariable("id") Long id) {
|
||||
return receiptRetailService.retailDetail(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.receipt;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.receipt.retail.QueryRetailRefundDTO;
|
||||
import com.wansenai.dto.receipt.retail.QueryShipmentsDTO;
|
||||
import com.wansenai.dto.receipt.retail.RetailRefundDTO;
|
||||
import com.wansenai.dto.receipt.retail.RetailShipmentsDTO;
|
||||
import com.wansenai.service.receipt.ReceiptRetailService;
|
||||
import com.wansenai.utils.excel.ExcelUtils;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.receipt.retail.RetailRefundDetailVO;
|
||||
import com.wansenai.vo.receipt.retail.RetailRefundVO;
|
||||
import com.wansenai.vo.receipt.retail.RetailShipmentsDetailVO;
|
||||
import com.wansenai.vo.receipt.retail.RetailShipmentsVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/retail")
|
||||
public class RetailController {
|
||||
|
||||
private final ReceiptRetailService receiptRetailService;
|
||||
|
||||
public RetailController(ReceiptRetailService receiptRetailService) {
|
||||
this.receiptRetailService = receiptRetailService;
|
||||
}
|
||||
|
||||
@PostMapping("/shipments/pageList")
|
||||
public Response<Page<RetailShipmentsVO>> pageList(@RequestBody QueryShipmentsDTO queryShipmentsDTO) {
|
||||
return receiptRetailService.getRetailShipmentsPage(queryShipmentsDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/shipments/list")
|
||||
public Response<List<RetailShipmentsVO>> getList(@RequestBody QueryShipmentsDTO queryShipmentsDTO) {
|
||||
return receiptRetailService.getRetailShipmentsList(queryShipmentsDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/shipments/addOrUpdate")
|
||||
public Response<String> addOrUpdate(@RequestBody RetailShipmentsDTO retailShipmentsDTO) {
|
||||
return receiptRetailService.addOrUpdateRetailShipments(retailShipmentsDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/shipments/deleteByIds")
|
||||
public Response<String> deleteByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return receiptRetailService.deleteRetailShipments(ids);
|
||||
}
|
||||
|
||||
@PutMapping("/shipments/updateStatus")
|
||||
public Response<String> updateStatus(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return receiptRetailService.updateRetailShipmentsStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("/shipments/detail/{id}")
|
||||
public Response<RetailShipmentsDetailVO> detail(@PathVariable("id") Long id) {
|
||||
return receiptRetailService.getRetailShipmentsDetail(id);
|
||||
}
|
||||
|
||||
@GetMapping("/shipments/getLinkShipmentDetail/{otherReceipt}")
|
||||
public Response<RetailShipmentsDetailVO> getLinkShipmentDetail(@PathVariable("otherReceipt") String otherReceipt) {
|
||||
return receiptRetailService.getLinkRetailShipmentsDetail(otherReceipt);
|
||||
}
|
||||
|
||||
@PostMapping("/refund/pageList")
|
||||
public Response<Page<RetailRefundVO>> refundPageList(@RequestBody QueryRetailRefundDTO refundDTO) {
|
||||
return receiptRetailService.getRetailRefund(refundDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/refund/addOrUpdate")
|
||||
public Response<String> refundAddOrUpdate(@RequestBody RetailRefundDTO refundDTO) {
|
||||
return receiptRetailService.addOrUpdateRetailRefund(refundDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/detail/{id}")
|
||||
public Response<RetailRefundDetailVO> refundDetail(@PathVariable("id") Long id) {
|
||||
return receiptRetailService.getRetailRefundDetail(id);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/getLinkRefundDetail/{otherReceipt}")
|
||||
public Response<RetailRefundDetailVO> getLinkRefundDetail(@PathVariable("otherReceipt") String otherReceipt) {
|
||||
return receiptRetailService.getLinkRetailRefundDetail(otherReceipt);
|
||||
}
|
||||
|
||||
@PostMapping("/refund/deleteByIds")
|
||||
public Response<String> refundDeleteByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return receiptRetailService.deleteRetailRefund(ids);
|
||||
}
|
||||
|
||||
@PutMapping("/refund/updateStatus")
|
||||
public Response<String> refundUpdateStatus(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return receiptRetailService.updateRetailRefundStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("/shipments/export")
|
||||
public void exportShipmentsExcel(@ModelAttribute QueryShipmentsDTO queryShipmentsDTO, HttpServletResponse response) throws Exception {
|
||||
receiptRetailService.exportRetailShipmentsExcel(queryShipmentsDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/shipments/exportDetail/{receiptNumber}")
|
||||
public void exportShipmentsDetailExcel(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws IOException {
|
||||
receiptRetailService.exportShipmentsDetailExcel(receiptNumber, response);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/export")
|
||||
public void exportRefundExcel(@ModelAttribute QueryRetailRefundDTO queryRetailRefundDTO, HttpServletResponse response) throws Exception {
|
||||
receiptRetailService.exportRetailRefundExcel(queryRetailRefundDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/exportDetail/{receiptNumber}")
|
||||
public void exportRefundDetailExcel(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws IOException {
|
||||
receiptRetailService.exportRefundDetailExcel(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.receipt;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.receipt.sale.*;
|
||||
import com.wansenai.service.receipt.ReceiptSaleService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.receipt.sale.*;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("sale")
|
||||
public class SalesController {
|
||||
|
||||
private final ReceiptSaleService receiptSaleService;
|
||||
|
||||
public SalesController(ReceiptSaleService receiptSaleService) {
|
||||
this.receiptSaleService = receiptSaleService;
|
||||
}
|
||||
|
||||
@GetMapping("/order/pageList")
|
||||
public Response<Page<SaleOrderVO>> pageList(@ModelAttribute QuerySaleOrderDTO querySaleOrderDTO) {
|
||||
return receiptSaleService.getSaleOrderPage(querySaleOrderDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/order/addOrUpdate")
|
||||
public Response<String> addOrUpdate(@RequestBody SaleOrderDTO saleOrderDTO) {
|
||||
return receiptSaleService.addOrUpdateSaleOrder(saleOrderDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/order/detail/{id}")
|
||||
public Response<SaleOrderDetailVO> detail(@PathVariable("id") Long id) {
|
||||
return receiptSaleService.getSaleOrderDetail(id);
|
||||
}
|
||||
|
||||
@GetMapping("/order/getLinkOrderDetail/{receiptNumber}")
|
||||
public Response<SaleOrderDetailVO> getLinkOrderDetail(@PathVariable("receiptNumber") String receiptNumber) {
|
||||
return receiptSaleService.getLinkSaleOrderDetail(receiptNumber);
|
||||
}
|
||||
|
||||
@PutMapping("/order/updateStatus/{ids}/{status}")
|
||||
public Response<String> updateStatus(@PathVariable("ids") List<Long> ids, @PathVariable("status") Integer status) {
|
||||
return receiptSaleService.updateSaleOrderStatus(ids, status);
|
||||
}
|
||||
|
||||
@PutMapping("/order/delete/{ids}")
|
||||
public Response<String> delete(@PathVariable("ids") List<Long> ids) {
|
||||
return receiptSaleService.deleteSaleOrder(ids);
|
||||
}
|
||||
|
||||
@GetMapping("/shipments/pageList")
|
||||
public Response<Page<SaleShipmentsVO>> shipmentsPageList(@ModelAttribute QuerySaleShipmentsDTO shipmentsDTO) {
|
||||
return receiptSaleService.getSaleShipmentsPage(shipmentsDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/shipments/addOrUpdate")
|
||||
public Response<String> addOrUpdateShipments(@RequestBody SaleShipmentsDTO shipmentsDTO) {
|
||||
return receiptSaleService.addOrUpdateSaleShipments(shipmentsDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/shipments/detail/{id}")
|
||||
public Response<SaleShipmentsDetailVO> shipmentsDetail(@PathVariable("id") Long id) {
|
||||
return receiptSaleService.getSaleShipmentsDetail(id);
|
||||
}
|
||||
|
||||
@GetMapping("/shipments/getLinkShipmentDetail/{receiptNumber}")
|
||||
public Response<SaleShipmentsDetailVO> getLinkShipmentDetail(@PathVariable("receiptNumber") String receiptNumber) {
|
||||
return receiptSaleService.getLinkSaleShipmentsDetail(receiptNumber);
|
||||
}
|
||||
|
||||
@PutMapping("/shipments/updateStatus/{ids}/{status}")
|
||||
public Response<String> updateShipmentsStatus(@PathVariable("ids") List<Long> ids, @PathVariable("status") Integer status) {
|
||||
return receiptSaleService.updateSaleShipmentsStatus(ids, status);
|
||||
}
|
||||
|
||||
@PutMapping("/shipments/delete/{ids}")
|
||||
public Response<String> deleteShipments(@PathVariable("ids") List<Long> ids) {
|
||||
return receiptSaleService.deleteSaleShipments(ids);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/pageList")
|
||||
public Response<Page<SaleRefundVO>> refundPageList(@ModelAttribute QuerySaleRefundDTO refundDTO) {
|
||||
return receiptSaleService.getSaleRefundPage(refundDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/refund/addOrUpdate")
|
||||
public Response<String> addOrUpdateRefund(@RequestBody SaleRefundDTO refundDTO) {
|
||||
return receiptSaleService.addOrUpdateSaleRefund(refundDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/detail/{id}")
|
||||
public Response<SaleRefundDetailVO> refundDetail(@PathVariable("id") Long id) {
|
||||
return receiptSaleService.getSaleRefundDetail(id);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/getLinkRefundDetail/{receiptNumber}")
|
||||
public Response<SaleRefundDetailVO> getLinkRefundDetail(@PathVariable("receiptNumber") String receiptNumber) {
|
||||
return receiptSaleService.getLinkSaleRefundDetail(receiptNumber);
|
||||
}
|
||||
|
||||
@PutMapping("/refund/updateStatus/{ids}/{status}")
|
||||
public Response<String> updateRefundStatus(@PathVariable("ids") List<Long> ids, @PathVariable("status") Integer status) {
|
||||
return receiptSaleService.updateSaleRefundStatus(ids, status);
|
||||
}
|
||||
|
||||
@PutMapping("/refund/delete/{ids}")
|
||||
public Response<String> deleteRefund(@PathVariable("ids") List<Long> ids) {
|
||||
return receiptSaleService.deleteSaleRefund(ids);
|
||||
}
|
||||
|
||||
@PostMapping("/arrears/pageList")
|
||||
public Response<Page<SaleArrearsVO>> arrearsPageList(@RequestBody QuerySaleArrearsDTO arrearsDTO) {
|
||||
return receiptSaleService.getSaleArrearsPage(arrearsDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/order/export")
|
||||
public void exportOrderExcel(@ModelAttribute QuerySaleOrderDTO querySaleOrderDTO, HttpServletResponse response) throws Exception {
|
||||
receiptSaleService.exportSaleOrderExcel(querySaleOrderDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/order/exportDetail/{receiptNumber}")
|
||||
public void exportSaleOrderDetailExcel(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
receiptSaleService.exportSaleOrderDetailExcel(receiptNumber, response);
|
||||
}
|
||||
|
||||
@GetMapping("/shipments/export")
|
||||
public void exportSaleShipmentsExcel(@ModelAttribute QuerySaleShipmentsDTO querySaleShipmentsDTO, HttpServletResponse response) throws Exception {
|
||||
receiptSaleService.exportSaleShipmentsExcel(querySaleShipmentsDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/shipments/exportDetail/{receiptNumber}")
|
||||
public void exportSaleShipmentsDetailExcel(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
receiptSaleService.exportSaleShipmentsDetailExcel(receiptNumber, response);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/refund/export")
|
||||
public void exportRefundExcel(@ModelAttribute QuerySaleRefundDTO querySaleRefundDTO, HttpServletResponse response) throws Exception {
|
||||
receiptSaleService.exportSaleRefundExcel(querySaleRefundDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/refund/exportDetail/{receiptNumber}")
|
||||
public void exportSaleRefundDetailExcel(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
receiptSaleService.exportSaleRefundDetailExcel(receiptNumber, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,196 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.report;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.report.*;
|
||||
import com.wansenai.service.receipt.ReceiptService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.receipt.retail.StatisticalDataVO;
|
||||
import com.wansenai.vo.report.*;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/report")
|
||||
public class ReportController {
|
||||
|
||||
private final ReceiptService receiptService;
|
||||
|
||||
public ReportController(ReceiptService receiptService) {
|
||||
this.receiptService = receiptService;
|
||||
}
|
||||
|
||||
@GetMapping("homePage/statistics")
|
||||
public Response<StatisticalDataVO> getStatisticalData() {
|
||||
return receiptService.getStatisticalData();
|
||||
}
|
||||
|
||||
@PostMapping("productStock")
|
||||
public Response<IPage<ProductStockSkuVO>> getProductStock(@RequestBody QueryProductStockDTO queryProductStockDTO) {
|
||||
return receiptService.getProductStock(queryProductStockDTO);
|
||||
}
|
||||
|
||||
@PostMapping("productStockFlow")
|
||||
public Response<Page<StockFlowVO>> getStockFlow(@RequestBody QueryStockFlowDTO stockFlowDTO) {
|
||||
return receiptService.getStockFlow(stockFlowDTO);
|
||||
}
|
||||
|
||||
@PostMapping("accountStatistics")
|
||||
public Response<Page<AccountStatisticsVO>> getAccountStatistics(@RequestBody QueryAccountStatisticsDTO accountStatisticsDTO) {
|
||||
return receiptService.getAccountStatistics(accountStatisticsDTO);
|
||||
}
|
||||
|
||||
@GetMapping("accountFlow")
|
||||
public Response<Page<AccountFlowVO>> getAccountFlow(
|
||||
@RequestParam("accountId") Long accountId,
|
||||
@RequestParam(value = "page", defaultValue = "1") Long page,
|
||||
@RequestParam(value = "size", defaultValue = "10") Long pageSize
|
||||
) {
|
||||
return receiptService.getAccountFlow(accountId, page, pageSize);
|
||||
}
|
||||
|
||||
@PostMapping("retailStatistics")
|
||||
public Response<Page<RetailReportVO>> getRetailStatistics(@RequestBody QueryRetailReportDTO queryRetailReportDTO) {
|
||||
return receiptService.getRetailStatistics(queryRetailReportDTO);
|
||||
}
|
||||
|
||||
@PostMapping("purchaseStatistics")
|
||||
public Response<Page<PurchaseReportVO>> getPurchaseStatistics(@RequestBody QueryPurchaseReportDTO queryPurchaseReportDTO) {
|
||||
return receiptService.getPurchaseStatistics(queryPurchaseReportDTO);
|
||||
}
|
||||
|
||||
@PostMapping("salesStatistics")
|
||||
public Response<Page<SalesReportVO>> getSalesStatistics(@RequestBody QuerySalesReportDTO querySalesReportDTO) {
|
||||
return receiptService.getSalesStatistics(querySalesReportDTO);
|
||||
}
|
||||
|
||||
@GetMapping("relatedPerson")
|
||||
public Response<List<RelatedPersonVO>> getRelatedPerson() {
|
||||
return receiptService.getRelatedPerson();
|
||||
}
|
||||
|
||||
@PostMapping("shipmentsDetail")
|
||||
public Response<Page<ShipmentsDetailVO>> getShipmentsDetail(@RequestBody QueryShipmentsDetailDTO queryShipmentsDetailDTO) {
|
||||
return receiptService.getShipmentsDetail(queryShipmentsDetailDTO);
|
||||
}
|
||||
|
||||
@PostMapping("storageDetail")
|
||||
public Response<Page<StorageDetailVO>> getStorageDetail(@RequestBody QueryStorageDetailDTO queryStorageDetailDTO) {
|
||||
return receiptService.getStorageDetail(queryStorageDetailDTO);
|
||||
}
|
||||
|
||||
@PostMapping("shipmentsSummary")
|
||||
public Response<Page<ShipmentsSummaryVO>> getShipmentsSummary(@RequestBody QueryShipmentsSummaryDTO queryShipmentsSummaryDTO) {
|
||||
return receiptService.getShipmentsSummary(queryShipmentsSummaryDTO);
|
||||
}
|
||||
|
||||
@PostMapping("storageSummary")
|
||||
public Response<Page<StorageSummaryVO>> getStorageSummary(@RequestBody QueryStorageSummaryDTO queryStorageSummaryDTO) {
|
||||
return receiptService.getStorageSummary(queryStorageSummaryDTO);
|
||||
}
|
||||
|
||||
@PostMapping("customerBill")
|
||||
public Response<Page<CustomerBillVO>> getCustomerBill(@RequestBody QueryCustomerBillDTO queryCustomerBillDTO) {
|
||||
return receiptService.getCustomerBill(queryCustomerBillDTO);
|
||||
}
|
||||
|
||||
@PostMapping("customerBillDetail")
|
||||
public Response<Page<CustomerBillDetailVO>> getCustomerBillDetail(@RequestBody QueryCustomerBillDetailDTO queryCustomerBillDetailDTO) {
|
||||
return receiptService.getCustomerBillDetail(queryCustomerBillDetailDTO);
|
||||
}
|
||||
|
||||
@PostMapping("supplierBill")
|
||||
public Response<Page<SupplierBillVO>> getSupplierBill(@RequestBody QuerySupplierBillDTO querySupplierBillDTO) {
|
||||
return receiptService.getSupplierBill(querySupplierBillDTO);
|
||||
}
|
||||
|
||||
@PostMapping("supplierBillDetail")
|
||||
public Response<Page<SupplierBillDetailVO>> getSupplierBillDetail(@RequestBody QuerySupplierBillDetailDTO querySupplierBillDetailDTO) {
|
||||
return receiptService.getSupplierBillDetail(querySupplierBillDetailDTO);
|
||||
}
|
||||
|
||||
@GetMapping("/productStock/export")
|
||||
public void exportProductStockExcel(@ModelAttribute QueryProductStockDTO queryProductStockDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportProductStockExcel(queryProductStockDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/accountStatistics/export")
|
||||
public void exportAccountStatisticsExcel(@ModelAttribute QueryAccountStatisticsDTO queryAccountStatisticsDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportAccountStatisticsExcel(queryAccountStatisticsDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/retailStatistics/export")
|
||||
public void exportRetailStatisticsExcel(@ModelAttribute QueryRetailReportDTO queryRetailReportDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportRetailStatisticsExcel(queryRetailReportDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/purchaseStatistics/export")
|
||||
public void exportPurchaseStatisticsExcel(@ModelAttribute QueryPurchaseReportDTO queryPurchaseReportDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportPurchaseStatisticsExcel(queryPurchaseReportDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/salesStatistics/export")
|
||||
public void exportSalesStatisticsExcel(@ModelAttribute QuerySalesReportDTO querySalesReportDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportSalesStatisticsExcel(querySalesReportDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/shipmentsDetail/export")
|
||||
public void exportShipmentsDetailExcel(@ModelAttribute QueryShipmentsDetailDTO queryShipmentsDetailDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportShipmentsDetailExcel(queryShipmentsDetailDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/storageDetail/export")
|
||||
public void exportStorageDetailExcel(@ModelAttribute QueryStorageDetailDTO queryStorageDetailDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportStorageDetailExcel(queryStorageDetailDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/shipmentsSummary/export")
|
||||
public void exportShipmentsSummaryExcel(@ModelAttribute QueryShipmentsSummaryDTO queryShipmentsSummaryDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportShipmentsSummaryExcel(queryShipmentsSummaryDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/storageSummary/export")
|
||||
public void exportStorageSummaryExcel(@ModelAttribute QueryStorageSummaryDTO queryStorageSummaryDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportStorageSummaryExcel(queryStorageSummaryDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/customerBill/export")
|
||||
public void exportCustomerBillExcel(@ModelAttribute QueryCustomerBillDTO queryCustomerBillDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportCustomerBillExcel(queryCustomerBillDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/supplierBill/export")
|
||||
public void exportSupplierBillExcel(@ModelAttribute QuerySupplierBillDTO querySupplierBillDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportSupplierBillExcel(querySupplierBillDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/productStockFlow/export")
|
||||
public void exportProductStockFlowExcel(@ModelAttribute QueryStockFlowDTO queryStockFlowDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportProductStockFlowExcel(queryStockFlowDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/customerBillDetail/export")
|
||||
public void exportCustomerBillDetailExcel(@ModelAttribute QueryCustomerBillDetailDTO queryCustomerBillDetailDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportCustomerBillDetailExcel(queryCustomerBillDetailDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("/supplierBillDetail/export")
|
||||
public void exportSupplierBillDetailExcel(@ModelAttribute QuerySupplierBillDetailDTO querySupplierBillDetailDTO, HttpServletResponse response) throws IOException {
|
||||
receiptService.exportSupplierBillDetailExcel(querySupplierBillDetailDTO, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.role;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.role.AddOrUpdateRoleDTO;
|
||||
import com.wansenai.dto.role.RoleListDTO;
|
||||
import com.wansenai.dto.role.RolePermissionDTO;
|
||||
import com.wansenai.service.role.SysRoleService;
|
||||
import com.wansenai.service.system.SysMenuService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.RoleVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("sysRole")
|
||||
public class SysRoleController {
|
||||
|
||||
private final SysMenuService menuService;
|
||||
|
||||
private final SysRoleService sysRoleService;
|
||||
|
||||
public SysRoleController(SysMenuService menuService, SysRoleService sysRoleService) {
|
||||
this.menuService = menuService;
|
||||
this.sysRoleService = sysRoleService;
|
||||
}
|
||||
|
||||
@GetMapping("menu")
|
||||
public Response<JSONObject> queryMenu() {
|
||||
return menuService.menuList();
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public Response<List<RoleVO>> getRoleList() {
|
||||
return sysRoleService.roleList();
|
||||
}
|
||||
|
||||
@PostMapping("PageList")
|
||||
public Response<Page<RoleVO>> getRolePageList(@RequestBody RoleListDTO roleListDTO) {
|
||||
return sysRoleService.rolePageList(roleListDTO);
|
||||
}
|
||||
|
||||
@PostMapping("updateStatus")
|
||||
public Response<String> updateStatus(@RequestParam(value = "id") String id, @RequestParam(value = "status") Integer status) {
|
||||
return sysRoleService.updateStatus(id, status);
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdateRole")
|
||||
public Response<String> addOrUpdateRole(@RequestBody AddOrUpdateRoleDTO addOrUpdateRoleDTO) {
|
||||
return sysRoleService.addOrUpdateRole(addOrUpdateRoleDTO);
|
||||
}
|
||||
|
||||
@PostMapping("deleteRole")
|
||||
public Response<String> deleteRole(@RequestParam(value = "id") String id) {
|
||||
return sysRoleService.deleteRole(id);
|
||||
}
|
||||
|
||||
@PostMapping("permission")
|
||||
public Response<String> rolePermission(@RequestBody RolePermissionDTO rolePermissionDTO) {
|
||||
return sysRoleService.rolePermission(rolePermissionDTO);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.role;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色菜单关系表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sysRoleMenu")
|
||||
public class SysRoleMenuRelController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.system;
|
||||
|
||||
import com.wansenai.dto.system.SystemConfigDTO;
|
||||
import com.wansenai.service.system.SysConfigService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.SystemConfigVO;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/sys/config")
|
||||
public class SysConfigController {
|
||||
|
||||
private final SysConfigService sysConfigService;
|
||||
|
||||
public SysConfigController(SysConfigService sysConfigService) {
|
||||
this.sysConfigService = sysConfigService;
|
||||
}
|
||||
|
||||
@GetMapping("getCompanyInfo")
|
||||
public Response<SystemConfigVO> getSystemConfigInfo() {
|
||||
return sysConfigService.getSystemConfigInfo();
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateCompanyInfo(@RequestBody SystemConfigDTO systemConfigDTO) {
|
||||
return sysConfigService.addOrUpdateCompanyInfo(systemConfigDTO);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.system;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 操作日志 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sys-log")
|
||||
public class SysLogController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.system;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.system.UpdateSystemMessageDTO;
|
||||
import com.wansenai.service.system.ISysMsgService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.SystemMessageVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 消息表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sys/message")
|
||||
public class SysMsgController {
|
||||
|
||||
private final ISysMsgService sysMsgService;
|
||||
|
||||
public SysMsgController(ISysMsgService sysMsgService) {
|
||||
this.sysMsgService = sysMsgService;
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public Response<List<SystemMessageVO>> messagePageList() {
|
||||
return sysMsgService.getMessagePageList();
|
||||
}
|
||||
|
||||
@PostMapping("read")
|
||||
public Response<String> readMessage(@RequestBody UpdateSystemMessageDTO updateSystemMessageDTO) {
|
||||
return sysMsgService.updateMessageStatus(updateSystemMessageDTO);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.system;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 平台参数 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sys-platform-config")
|
||||
public class SysPlatformConfigController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.system;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 序列号表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sys-serial-number")
|
||||
public class SysSerialNumberController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.tenant;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.tenant.AddOrUpdateTenantDTO;
|
||||
import com.wansenai.dto.tenant.TenantListDTO;
|
||||
import com.wansenai.service.tenant.ISysTenantService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.TenantInfoVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 租户 前端控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tenant")
|
||||
public class SysTenantController {
|
||||
|
||||
private final ISysTenantService tenantService;
|
||||
|
||||
public SysTenantController(ISysTenantService tenantService) {
|
||||
this.tenantService = tenantService;
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
public Response<Page<TenantInfoVO>> tenantList(@RequestBody TenantListDTO tenantListDTO) {
|
||||
return tenantService.tenantList(tenantListDTO);
|
||||
}
|
||||
|
||||
@PostMapping(value = "addOrUpdate")
|
||||
public Response<String> addOrUpdate(@RequestBody AddOrUpdateTenantDTO addOrUpdateTenantDTO) {
|
||||
return tenantService.addOrUpdate(addOrUpdateTenantDTO);
|
||||
}
|
||||
|
||||
@GetMapping(value = "checkAddUser")
|
||||
public Response<String> checkAddUser() {
|
||||
return tenantService.checkAddUser();
|
||||
}
|
||||
|
||||
@PostMapping(value= "update")
|
||||
public Response<String> update(@RequestBody AddOrUpdateTenantDTO updateDTO) {
|
||||
return tenantService.update(updateDTO);
|
||||
}
|
||||
|
||||
@PostMapping(value = "delete")
|
||||
public Response<String> delete(@RequestParam(value = "tenantId") String tenantId) {
|
||||
return tenantService.delete(tenantId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.user;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户/角色/模块关系表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sysUserBusiness")
|
||||
public class SysUserBusinessController {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.user;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.user.*;
|
||||
import com.wansenai.dto.user.*;
|
||||
import com.wansenai.service.user.ISysUserService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.UserInfoVO;
|
||||
import com.wansenai.vo.UserListVO;
|
||||
import com.wansenai.vo.UserRoleVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author James Zow
|
||||
* @since 2023-09-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user")
|
||||
public class SysUserController {
|
||||
|
||||
private final ISysUserService userService;
|
||||
|
||||
public SysUserController(ISysUserService userService) {
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
@PostMapping("register")
|
||||
public Response<String> accountRegister(@RequestBody AccountRegisterDTO accountRegisterDto) {
|
||||
return userService.accountRegister(accountRegisterDto);
|
||||
}
|
||||
|
||||
@PostMapping(value = "login")
|
||||
public Response<UserInfoVO> accountLogin(@RequestBody AccountLoginDTO accountLoginDto) {
|
||||
return userService.accountLogin(accountLoginDto);
|
||||
}
|
||||
|
||||
@PostMapping(value = "mobileLogin")
|
||||
public Response<UserInfoVO> mobileLogin(@RequestBody MobileLoginDTO mobileLoginDto) {
|
||||
return userService.mobileLogin(mobileLoginDto);
|
||||
}
|
||||
|
||||
@PostMapping(value = "emailLogin")
|
||||
public Response<UserInfoVO> emailLogin(@RequestBody EmailLoginDTO emailLoginDTO) {
|
||||
return userService.emailLogin(emailLoginDTO);
|
||||
}
|
||||
|
||||
@PostMapping(value = "updatePassword")
|
||||
public Response<String> updatePasswordByPhone(@RequestBody UpdatePasswordDto updatePasswordDto) {
|
||||
return userService.updatePassword(updatePasswordDto);
|
||||
}
|
||||
|
||||
@PostMapping(value = "updatePasswordByEmail")
|
||||
public Response<String> updatePasswordByEmail(@RequestBody UpdatePasswordByEmailDto updatePasswordByEmailDto) {
|
||||
return userService.updatePasswordByEmail(updatePasswordByEmailDto);
|
||||
}
|
||||
|
||||
@PutMapping(value = "userUpdatePassword")
|
||||
public Response<String> userUpdatePassword(@RequestBody ResetPasswordDTO resetPasswordDTO) {
|
||||
return userService.resetPassword(resetPasswordDTO);
|
||||
}
|
||||
|
||||
@GetMapping(value = "operator")
|
||||
public Response<List<UserInfoVO>> operator() {
|
||||
return userService.operator();
|
||||
}
|
||||
|
||||
@GetMapping(value = "info")
|
||||
public Response<UserInfoVO> info() {
|
||||
return userService.userInfo();
|
||||
}
|
||||
|
||||
@GetMapping(value = "perm")
|
||||
public Response<List<UserRoleVO>> permission() {
|
||||
return userService.userRole();
|
||||
}
|
||||
|
||||
@GetMapping(value = "logout")
|
||||
public Response<String> logout() {
|
||||
return userService.userLogout();
|
||||
}
|
||||
|
||||
@PostMapping(value = "list")
|
||||
public Response<Page<UserListVO>> list(@RequestBody UserListDTO userListDto) {
|
||||
return userService.userList(userListDto);
|
||||
}
|
||||
|
||||
@GetMapping(value = "listAll")
|
||||
public Response<List<UserListVO>> listAll() {
|
||||
return userService.userListAll();
|
||||
}
|
||||
|
||||
@PostMapping(value = "update")
|
||||
public Response<String> update(@RequestBody UpdateUserDTO updateUserDTO) {
|
||||
return userService.updateUser(updateUserDTO);
|
||||
}
|
||||
|
||||
@PostMapping(value = "updateStatus")
|
||||
public Response<String> updateStatus(@RequestBody UpdateUserDTO updateUserDTO) {
|
||||
return userService.updateStatus(updateUserDTO);
|
||||
}
|
||||
|
||||
@PostMapping("uploadAvatar")
|
||||
public Response<String> uploadAvatar(@RequestParam("file") MultipartFile file, @RequestParam("userId") Long userId, @RequestParam("name") String name) {
|
||||
return userService.uploadAvatar(file, userId, name);
|
||||
}
|
||||
|
||||
@PostMapping(value = "addOrUpdate")
|
||||
public Response<String> addOrUpdate(@RequestBody AddOrUpdateUserDTO addOrUpdateUserDTO) {
|
||||
return userService.addOrUpdate(addOrUpdateUserDTO);
|
||||
}
|
||||
|
||||
@PostMapping(value = "delete")
|
||||
public Response<String> deleteUser(@RequestParam(value = "ids") List<Long> ids) {
|
||||
return userService.deleteUser(ids);
|
||||
}
|
||||
|
||||
@PostMapping(value = "resetPassword")
|
||||
public Response<String> resetPassword(@RequestParam(value = "id") Long id) {
|
||||
return userService.resetPassword(id);
|
||||
}
|
||||
|
||||
@PutMapping(value = "resetPhoneNumber")
|
||||
public Response<String> resetPhoneNumber(@RequestBody ResetPhoneDTO resetPhoneDTO) {
|
||||
return userService.resetPhoneNumber(resetPhoneDTO);
|
||||
}
|
||||
|
||||
@PutMapping(value = "resetEmail")
|
||||
public Response<String> resetEmail(@RequestBody ResetEmailDTO resetEmailDTO) {
|
||||
return userService.resetEmail(resetEmailDTO);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.warehouse;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.warehouse.AllotReceiptDTO;
|
||||
import com.wansenai.dto.warehouse.QueryAllotReceiptDTO;
|
||||
import com.wansenai.service.warehouse.AllotShipmentsService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.warehouse.AllotReceiptDetailVO;
|
||||
import com.wansenai.vo.warehouse.AllotReceiptVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("warehouse/allotShipments")
|
||||
public class AllotShipmentsController {
|
||||
|
||||
private final AllotShipmentsService allotShipmentsService;
|
||||
|
||||
public AllotShipmentsController(AllotShipmentsService allotShipmentsService) {
|
||||
this.allotShipmentsService = allotShipmentsService;
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateAllotShipments(@RequestBody AllotReceiptDTO allotReceiptDTO) {
|
||||
return allotShipmentsService.addOrUpdateAllotReceipt(allotReceiptDTO);
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<AllotReceiptVO>> getAllotShipmentsPageList(@RequestBody QueryAllotReceiptDTO queryAllotReceiptDTO) {
|
||||
return allotShipmentsService.getAllotReceiptPageList(queryAllotReceiptDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
public Response<AllotReceiptDetailVO> getAllotShipmentsDetailById(@PathVariable("id") Long id) {
|
||||
return allotShipmentsService.getAllotReceiptDetail(id);
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
public Response<String> deleteAllotShipmentsByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return allotShipmentsService.deleteBatchAllotReceipt(ids);
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
public Response<String> updateAllotShipmentsStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return allotShipmentsService.updateAllotReceiptStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportAllotShipments(@ModelAttribute QueryAllotReceiptDTO queryAllotReceiptDTO, HttpServletResponse response) throws Exception {
|
||||
allotShipmentsService.exportAllotReceipt(queryAllotReceiptDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
public void exportAllotShipmentsDetail(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
allotShipmentsService.exportAllotReceiptDetail(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.warehouse;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.warehouse.AssembleReceiptDTO;
|
||||
import com.wansenai.dto.warehouse.QueryAssembleReceiptDTO;
|
||||
import com.wansenai.service.warehouse.AssembleReceiptService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.warehouse.AssembleReceiptDetailVO;
|
||||
import com.wansenai.vo.warehouse.AssembleReceiptVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("warehouse/assemble")
|
||||
public class AssembleController {
|
||||
|
||||
private final AssembleReceiptService assembleService;
|
||||
|
||||
public AssembleController(AssembleReceiptService assembleService) {
|
||||
this.assembleService = assembleService;
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateAssembleReceipt(@RequestBody AssembleReceiptDTO assembleReceiptDTO) {
|
||||
return assembleService.addOrUpdateAssembleReceipt(assembleReceiptDTO);
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<AssembleReceiptVO>> getAssembleReceiptPageList(@RequestBody QueryAssembleReceiptDTO queryAssembleReceiptDTO) {
|
||||
return assembleService.getAssembleReceiptPageList(queryAssembleReceiptDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
public Response<AssembleReceiptDetailVO> getAssembleReceiptDetailById(@PathVariable("id") Long id) {
|
||||
return assembleService.getAssembleReceiptDetail(id);
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
public Response<String> deleteAssembleReceiptByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return assembleService.deleteBatchAssembleReceipt(ids);
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
public Response<String> updateAssembleReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return assembleService.updateAssembleReceiptStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportAssembleReceipt(@ModelAttribute QueryAssembleReceiptDTO queryAssembleReceiptDTO, HttpServletResponse response) throws Exception {
|
||||
assembleService.exportAssembleReceipt(queryAssembleReceiptDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
public void exportAssembleReceiptDetail(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
assembleService.exportAssembleReceiptDetail(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.warehouse;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.warehouse.DisassembleReceiptDTO;
|
||||
import com.wansenai.dto.warehouse.QueryDisassembleReceiptDTO;
|
||||
import com.wansenai.service.warehouse.DisassembleReceiptService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.warehouse.DisassembleReceiptDetailVO;
|
||||
import com.wansenai.vo.warehouse.DisassembleReceiptVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("warehouse/disassemble")
|
||||
public class DisAssembleController {
|
||||
|
||||
private final DisassembleReceiptService disassembleService;
|
||||
|
||||
public DisAssembleController(DisassembleReceiptService disassembleService) {
|
||||
this.disassembleService = disassembleService;
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateDisAssembleReceipt(@RequestBody DisassembleReceiptDTO disassembleReceiptDTO) {
|
||||
return disassembleService.addOrUpdateDisassembleReceipt(disassembleReceiptDTO);
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<DisassembleReceiptVO>> getDisAssembleReceiptPageList(@RequestBody QueryDisassembleReceiptDTO queryDisassembleReceiptDTO) {
|
||||
return disassembleService.getDisassembleReceiptPageList(queryDisassembleReceiptDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
public Response<DisassembleReceiptDetailVO> getDisAssembleReceiptDetailById(@PathVariable("id") Long id) {
|
||||
return disassembleService.getDisassembleReceiptDetail(id);
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
public Response<String> deleteDisAssembleReceiptByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return disassembleService.deleteBatchDisassembleReceipt(ids);
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
public Response<String> updateDisAssembleReceiptStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return disassembleService.updateDisassembleReceiptStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportDisAssembleReceipt(@ModelAttribute QueryDisassembleReceiptDTO queryDisassembleReceiptDTO, HttpServletResponse response) throws Exception {
|
||||
disassembleService.exportDisAssembleReceipt(queryDisassembleReceiptDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
public void exportDisAssembleReceiptDetail(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
disassembleService.exportDisAssembleReceiptDetail(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.warehouse;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.warehouse.OtherShipmentDTO;
|
||||
import com.wansenai.dto.warehouse.QueryOtherShipmentDTO;
|
||||
import com.wansenai.service.warehouse.OtherShipmentsService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.warehouse.OtherShipmentDetailVO;
|
||||
import com.wansenai.vo.warehouse.OtherShipmentVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("warehouse/otherShipments")
|
||||
public class OtherShipmentsController {
|
||||
|
||||
private final OtherShipmentsService otherShipmentsService;
|
||||
|
||||
public OtherShipmentsController(OtherShipmentsService otherShipmentsService) {
|
||||
this.otherShipmentsService = otherShipmentsService;
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateOtherShipments(@RequestBody OtherShipmentDTO otherShipmentDTO) {
|
||||
return otherShipmentsService.addOrUpdateOtherShipments(otherShipmentDTO);
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<OtherShipmentVO>> getOtherShipmentsPageList(@RequestBody QueryOtherShipmentDTO queryOtherShipmentDTO) {
|
||||
return otherShipmentsService.getOtherShipmentsPageList(queryOtherShipmentDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
public Response<OtherShipmentDetailVO> getOtherShipmentsDetailById(@PathVariable("id") Long id) {
|
||||
return otherShipmentsService.getOtherShipmentsDetail(id);
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
public Response<String> deleteOtherShipmentsByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return otherShipmentsService.deleteBatchOtherShipments(ids);
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
public Response<String> updateOtherShipmentsStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return otherShipmentsService.updateOtherShipmentsStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportOtherShipments(@ModelAttribute QueryOtherShipmentDTO queryOtherShipmentDTO, HttpServletResponse response) throws Exception {
|
||||
otherShipmentsService.exportOtherShipments(queryOtherShipmentDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
public void exportOtherShipmentsDetail(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
otherShipmentsService.exportOtherShipmentsDetail(receiptNumber, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.warehouse;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.warehouse.OtherStorageDTO;
|
||||
import com.wansenai.dto.warehouse.QueryOtherStorageDTO;
|
||||
import com.wansenai.service.warehouse.OtherStorageService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.warehouse.OtherStorageDetailVO;
|
||||
import com.wansenai.vo.warehouse.OtherStorageVO;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("warehouse/otherStorage")
|
||||
public class OtherStorageController {
|
||||
|
||||
private final OtherStorageService otherStorageService;
|
||||
|
||||
public OtherStorageController(OtherStorageService otherStorageService) {
|
||||
this.otherStorageService = otherStorageService;
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateOtherStorage(@RequestBody OtherStorageDTO otherStorageDTO) {
|
||||
return otherStorageService.addOrUpdateOtherStorage(otherStorageDTO);
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<OtherStorageVO>> getOtherStoragePageList(@RequestBody QueryOtherStorageDTO queryOtherStorageDTO) {
|
||||
return otherStorageService.getOtherStoragePageList(queryOtherStorageDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
public Response<OtherStorageDetailVO> getOtherStorageDetailById(@PathVariable("id") Long id) {
|
||||
return otherStorageService.getOtherStorageDetail(id);
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
public Response<String> deleteOtherStorageByIds(@RequestParam("ids") List<Long> ids) {
|
||||
return otherStorageService.deleteBatchOtherStorage(ids);
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
public Response<String> updateOtherStorageStatusByIds(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return otherStorageService.updateOtherStorageStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public void exportOtherStorage(@ModelAttribute QueryOtherStorageDTO queryOtherStorageDTO, HttpServletResponse response) throws Exception {
|
||||
otherStorageService.exportOtherStorage(queryOtherStorageDTO, response);
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
public void exportOtherStorageDetail(@PathVariable("receiptNumber") String receiptNumber, HttpServletResponse response) throws Exception {
|
||||
otherStorageService.exportOtherStorageDetail(receiptNumber, response);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.warehouse;
|
||||
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.basic.AddOrUpdateWarehouseDTO;
|
||||
import com.wansenai.dto.basic.QueryWarehouseDTO;
|
||||
import com.wansenai.service.warehouse.WarehouseService;
|
||||
import com.wansenai.utils.response.Response;
|
||||
import com.wansenai.vo.warehouse.WarehouseVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/basic/warehouse")
|
||||
public class WarehouseController {
|
||||
|
||||
private final WarehouseService warehouseService;
|
||||
|
||||
public WarehouseController(WarehouseService warehouseService) {
|
||||
this.warehouseService = warehouseService;
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
public Response<Page<WarehouseVO>> getWarehousePageList(@RequestBody QueryWarehouseDTO warehouseDTO) {
|
||||
return warehouseService.getWarehousePageList(warehouseDTO);
|
||||
}
|
||||
|
||||
@GetMapping("getWarehouse")
|
||||
public Response<List<WarehouseVO>> getWarehouse() {
|
||||
return warehouseService.getWarehouse();
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
public Response<String> addOrUpdateWarehouse(@RequestBody AddOrUpdateWarehouseDTO warehouseDTO) {
|
||||
return warehouseService.addOrUpdateWarehouse(warehouseDTO);
|
||||
}
|
||||
|
||||
@DeleteMapping("delete")
|
||||
public Response<String> deleteWarehouse(@RequestParam("ids") List<Long> ids) {
|
||||
return warehouseService.deleteBatch(ids);
|
||||
}
|
||||
|
||||
@PostMapping("updateStatus")
|
||||
public Response<String> updateStatus(@RequestParam("ids") List<Long> ids, @RequestParam("status") Integer status) {
|
||||
return warehouseService.updateBatchStatus(ids, status);
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public Response<List<WarehouseVO>> getWarehouseList() {
|
||||
return warehouseService.getWarehouseList();
|
||||
}
|
||||
|
||||
@GetMapping("getDefaultWarehouse")
|
||||
public Response<WarehouseVO> getDefaultWarehouse() {
|
||||
return warehouseService.getDefaultWarehouse();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.basic
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
|
||||
import com.wansenai.dto.basic.QueryCustomerDTO
|
||||
import com.wansenai.dto.basic.AddOrUpdateCustomerDTO
|
||||
import com.wansenai.service.basic.CustomerService
|
||||
import com.wansenai.utils.response.Response
|
||||
import com.wansenai.vo.basic.CustomerVO
|
||||
import jakarta.servlet.http.HttpServletResponse
|
||||
import org.springframework.web.bind.annotation.DeleteMapping
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
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.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import org.springframework.web.bind.annotation.ModelAttribute
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/basic/customer")
|
||||
class CustomerController (private val customerService: CustomerService){
|
||||
|
||||
@PostMapping("/pageList")
|
||||
fun customerPageList(@RequestBody queryCustomerDTO: QueryCustomerDTO?) : Response<Page<CustomerVO>> {
|
||||
return customerService.getCustomerPageList(queryCustomerDTO)
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
fun customerList() : Response<List<CustomerVO>> {
|
||||
return customerService.getCustomerList(null)
|
||||
}
|
||||
|
||||
@PostMapping("/addOrUpdate")
|
||||
fun addOrUpdateCustomer(@RequestBody addOrUpdateCustomerDTO: AddOrUpdateCustomerDTO) : Response<String> {
|
||||
return customerService.addOrUpdateCustomer(addOrUpdateCustomerDTO)
|
||||
}
|
||||
|
||||
@DeleteMapping("/deleteBatch")
|
||||
fun deleteBatchCustomer(@RequestParam ids: List<Long>?) : Response<String> {
|
||||
return customerService.deleteCustomer(ids)
|
||||
}
|
||||
|
||||
@PostMapping("/updateStatus")
|
||||
fun updateCustomerStatus(@RequestParam("ids") ids: List<Long>?, @RequestParam("status") status: Int?) : Response<String> {
|
||||
return customerService.updateCustomerStatus(ids, status)
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
fun export(@ModelAttribute queryCustomerDTO: QueryCustomerDTO, response: HttpServletResponse) {
|
||||
customerService.exportCustomerData(queryCustomerDTO, response)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.basic
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
|
||||
import com.wansenai.dto.basic.AddOrUpdateMemberDTO
|
||||
import com.wansenai.dto.basic.QueryMemberDTO
|
||||
import com.wansenai.service.basic.MemberService
|
||||
import com.wansenai.utils.response.Response
|
||||
import com.wansenai.vo.basic.MemberVO
|
||||
import jakarta.servlet.http.HttpServletResponse
|
||||
import org.springframework.web.bind.annotation.PostMapping
|
||||
import org.springframework.web.bind.annotation.DeleteMapping
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import org.springframework.web.bind.annotation.RequestBody
|
||||
import org.springframework.web.bind.annotation.RequestParam
|
||||
import org.springframework.web.bind.annotation.ModelAttribute
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/basic/member")
|
||||
class MemberController (private val memberService: MemberService){
|
||||
|
||||
@PostMapping("/pageList")
|
||||
fun getMemberPageList(@RequestBody memberDTO: QueryMemberDTO) : Response<Page<MemberVO>> {
|
||||
return memberService.getMemberPageList(memberDTO)
|
||||
}
|
||||
|
||||
@PostMapping("/addOrUpdate")
|
||||
fun addOrUpdateMember(@RequestBody memberDTO: AddOrUpdateMemberDTO) : Response<String> {
|
||||
return memberService.addOrUpdateMember(memberDTO)
|
||||
}
|
||||
|
||||
@DeleteMapping("/deleteBatch")
|
||||
fun deleteBatchMembers(@RequestParam ids: List<Long>) : Response<String> {
|
||||
return memberService.deleteBatchMember(ids)
|
||||
}
|
||||
|
||||
@PostMapping("/updateStatus")
|
||||
fun updateMemberStatus(@RequestParam("ids") ids: List<Long>, @RequestParam("status") status: Int) : Response<String> {
|
||||
return memberService.updateMemberStatus(ids, status)
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
fun getMemberList() : Response<List<MemberVO>> {
|
||||
return memberService.getMemberList(null)
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
fun export(@ModelAttribute queryMemberDTO: QueryMemberDTO, response: HttpServletResponse) {
|
||||
memberService.exportMemberData(queryMemberDTO, response)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.basic
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
|
||||
import com.wansenai.dto.basic.AddSupplierDTO
|
||||
import com.wansenai.dto.basic.QuerySupplierDTO
|
||||
import com.wansenai.dto.basic.UpdateSupplierDTO
|
||||
import com.wansenai.dto.basic.UpdateSupplierStatusDTO
|
||||
import com.wansenai.service.basic.SupplierService
|
||||
import com.wansenai.utils.response.Response
|
||||
import com.wansenai.vo.basic.SupplierVO
|
||||
import jakarta.servlet.http.HttpServletResponse
|
||||
import org.springframework.web.bind.annotation.DeleteMapping
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
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.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import org.springframework.web.bind.annotation.ModelAttribute
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/basic/supplier")
|
||||
class SupplierController (private val supplierService: SupplierService){
|
||||
|
||||
@PostMapping("/pageList")
|
||||
fun supplierPageList(@RequestBody querySupplierDTO: QuerySupplierDTO) : Response<Page<SupplierVO>> {
|
||||
return supplierService.getSupplierPageList(querySupplierDTO)
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
fun supplierList() : Response<List<SupplierVO>> {
|
||||
return supplierService.getSupplierList(null)
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
fun addSupplier(@RequestBody addSupplierDTO: AddSupplierDTO) : Response<String> {
|
||||
return supplierService.addSupplier(addSupplierDTO)
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
fun updateSupplier(@RequestBody updateSupplierDTO: UpdateSupplierDTO) : Response<String> {
|
||||
return supplierService.updateSupplier(updateSupplierDTO)
|
||||
}
|
||||
|
||||
@DeleteMapping("/deleteBatch")
|
||||
fun deleteSupplier(@RequestParam ids: List<Long>) : Response<String> {
|
||||
return supplierService.deleteSupplier(ids)
|
||||
}
|
||||
|
||||
@PostMapping("/updateStatus")
|
||||
fun updateSupplierStatus(@RequestBody updateSupplierStatusDTO: UpdateSupplierStatusDTO) : Response<String> {
|
||||
return supplierService.updateSupplierStatus(updateSupplierStatusDTO)
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
fun export(@ModelAttribute querySupplierDTO: QuerySupplierDTO, response: HttpServletResponse) {
|
||||
supplierService.exportSupplierData(querySupplierDTO, response)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.financial
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.PostMapping
|
||||
import org.springframework.web.bind.annotation.RequestBody
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.PathVariable
|
||||
import org.springframework.web.bind.annotation.PutMapping
|
||||
import org.springframework.web.bind.annotation.RequestParam
|
||||
import org.springframework.web.bind.annotation.ModelAttribute
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
|
||||
import com.wansenai.dto.financial.AddOrUpdateAdvanceChargeDTO
|
||||
import com.wansenai.dto.financial.QueryAdvanceChargeDTO
|
||||
import com.wansenai.service.financial.AdvanceChargeService
|
||||
import com.wansenai.utils.response.Response
|
||||
import com.wansenai.vo.financial.AdvanceChargeDetailVO
|
||||
import com.wansenai.vo.financial.AdvanceChargeVO
|
||||
import jakarta.servlet.http.HttpServletResponse
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/financial/advance-charge")
|
||||
class AdvanceChargeController(private val advanceChargeService: AdvanceChargeService) {
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
fun addOrUpdateAdvanceCharge(@RequestBody advanceChargeDTO: AddOrUpdateAdvanceChargeDTO): Response<String> {
|
||||
return advanceChargeService.addOrUpdateAdvanceCharge(advanceChargeDTO)
|
||||
}
|
||||
|
||||
@PostMapping("pageList")
|
||||
fun getAdvanceChargePageList(@RequestBody advanceChargeDTO: QueryAdvanceChargeDTO) : Response<Page<AdvanceChargeVO>> {
|
||||
return advanceChargeService.getAdvanceChargePageList(advanceChargeDTO)
|
||||
}
|
||||
|
||||
@GetMapping("getDetailById/{id}")
|
||||
fun getDetailById(@PathVariable id: Long) : Response<AdvanceChargeDetailVO> {
|
||||
return advanceChargeService.getAdvanceChargeDetailById(id)
|
||||
}
|
||||
|
||||
@PutMapping("deleteByIds")
|
||||
fun deleteByIds(@RequestParam("ids") ids: List<Long>) : Response<String> {
|
||||
return advanceChargeService.deleteAdvanceChargeById(ids)
|
||||
}
|
||||
|
||||
@PutMapping("updateStatusByIds")
|
||||
fun updateStatus(@RequestParam("ids") ids: List<Long>, @RequestParam("status") status: Int) : Response<String> {
|
||||
return advanceChargeService.updateAdvanceChargeStatusById(ids, status)
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
fun export(@ModelAttribute advanceChargeDTO: QueryAdvanceChargeDTO, response: HttpServletResponse) {
|
||||
advanceChargeService.exportAdvanceCharge(advanceChargeDTO, response)
|
||||
}
|
||||
|
||||
@GetMapping("exportDetail/{receiptNumber}")
|
||||
fun exportDetail(@PathVariable receiptNumber: String, response: HttpServletResponse) {
|
||||
advanceChargeService.exportAdvanceChargeDetail(receiptNumber, response)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.product
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
|
||||
import com.wansenai.dto.product.AddOrUpdateProductAttributeDTO
|
||||
import com.wansenai.dto.product.ProductAttributeQueryDTO
|
||||
import com.wansenai.service.product.ProductAttributeService
|
||||
import com.wansenai.utils.response.Response
|
||||
import com.wansenai.vo.product.ProductAttributeNameVO
|
||||
import com.wansenai.vo.product.ProductAttributeVO
|
||||
import org.springframework.web.bind.annotation.DeleteMapping
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
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.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/product/attribute")
|
||||
class ProductAttributeController(private val productAttributeService: ProductAttributeService) {
|
||||
|
||||
@PostMapping("/list")
|
||||
fun productAttributeList(@RequestBody productAttributeQueryDTO: ProductAttributeQueryDTO): Response<Page<ProductAttributeVO>> {
|
||||
return productAttributeService.productAttributeList(productAttributeQueryDTO)
|
||||
}
|
||||
|
||||
@PostMapping("/addOrUpdate")
|
||||
fun addOrUpdateProductAttribute(@RequestBody productAttributeDTO: AddOrUpdateProductAttributeDTO): Response<String> {
|
||||
return productAttributeService.addOrUpdateProductAttribute(productAttributeDTO)
|
||||
}
|
||||
|
||||
@DeleteMapping("/deleteBatch")
|
||||
fun deleteProductAttribute(@RequestParam ids: List<Long>): Response<String> {
|
||||
return productAttributeService.batchDeleteProductAttribute(ids)
|
||||
}
|
||||
|
||||
@GetMapping("/getValuesById")
|
||||
fun getAttributeValuesById(@RequestParam("id") id: Long?): List<ProductAttributeNameVO> {
|
||||
return productAttributeService.getAttributeValuesById(id)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.product
|
||||
|
||||
import com.wansenai.dto.product.AddOrUpdateProductCategoryDTO
|
||||
import com.wansenai.service.product.ProductCategoryService
|
||||
import com.wansenai.utils.response.Response
|
||||
import com.wansenai.vo.product.ProductCategoryVO
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
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.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/product/category")
|
||||
class ProductCategoryController(private val productCategoryService: ProductCategoryService) {
|
||||
|
||||
@GetMapping("/list")
|
||||
fun productCategoryList(): Response<List<ProductCategoryVO>> {
|
||||
return productCategoryService.productCategoryList()
|
||||
}
|
||||
|
||||
@PostMapping("/addOrUpdate")
|
||||
fun addOrUpdateProductCategory(@RequestBody productCategory: AddOrUpdateProductCategoryDTO): Response<String> {
|
||||
return productCategoryService.addOrUpdateProductCategory(productCategory)
|
||||
}
|
||||
|
||||
@PostMapping("/deleteBatch")
|
||||
fun deleteProductCategory(@RequestParam ids: List<Long>): Response<String> {
|
||||
return productCategoryService.deleteProductCategory(ids)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.product
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
|
||||
import com.wansenai.dto.product.AddOrUpdateProductUnitDTO
|
||||
import com.wansenai.dto.product.ProductUnitQueryDTO
|
||||
import com.wansenai.dto.product.ProductUnitStatusDTO
|
||||
import com.wansenai.service.product.ProductUnitService
|
||||
import com.wansenai.utils.response.Response
|
||||
import com.wansenai.vo.product.ProductUnitVO
|
||||
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.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import org.springframework.web.bind.annotation.DeleteMapping
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/product/unit")
|
||||
class ProductUnitController(private val productUnitService: ProductUnitService) {
|
||||
|
||||
@PostMapping("/list")
|
||||
fun productUnitList(@RequestBody productUnitQuery: ProductUnitQueryDTO): Response<Page<ProductUnitVO>> {
|
||||
return productUnitService.productUnitList(productUnitQuery)
|
||||
}
|
||||
|
||||
@PostMapping("/addOrUpdate")
|
||||
fun addOrUpdateProductUnit(@RequestBody productUnit: AddOrUpdateProductUnitDTO): Response<String> {
|
||||
return productUnitService.addOrUpdateProductUnit(productUnit)
|
||||
}
|
||||
|
||||
@DeleteMapping("/deleteBatch")
|
||||
fun deleteProductUnit(@RequestParam ids: List<Long>): Response<String> {
|
||||
return productUnitService.deleteProductUnit(ids)
|
||||
}
|
||||
|
||||
@PostMapping("/updateUnitStatus")
|
||||
fun updateUnitStatus(@RequestBody productUnitStatus: ProductUnitStatusDTO): Response<String> {
|
||||
return productUnitService.updateUnitStatus(productUnitStatus)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.system
|
||||
|
||||
import com.wansenai.dto.department.AddOrUpdateDeptDTO
|
||||
import com.wansenai.service.system.SysDepartmentService
|
||||
import com.wansenai.utils.response.Response
|
||||
import com.wansenai.vo.DeptListVO
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
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.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/dept")
|
||||
class SysDepartmentController(private val departmentService: SysDepartmentService) {
|
||||
|
||||
@GetMapping("list")
|
||||
fun getDeptList(@RequestParam(value = "deptName", required = false) deptName: String?): Response<List<DeptListVO>> {
|
||||
return departmentService.getDeptList(deptName)
|
||||
}
|
||||
|
||||
@GetMapping("userBindDept")
|
||||
fun userDept(): Response<List<DeptListVO>> {
|
||||
return departmentService.userDept()
|
||||
}
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
fun addOrUpdate(@RequestBody addOrUpdateDeptDTO: AddOrUpdateDeptDTO?): Response<String> {
|
||||
return departmentService.addOrSaveDept(addOrUpdateDeptDTO)
|
||||
}
|
||||
|
||||
@PostMapping("delete")
|
||||
fun deleteDept(@RequestParam(value = "id", required = true) id: String?): Response<String> {
|
||||
return departmentService.deleteDept(id)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.api.system
|
||||
|
||||
import com.wansenai.dto.menu.AddOrUpdateMenuDTO
|
||||
import com.wansenai.service.system.SysMenuService
|
||||
import com.wansenai.utils.response.Response
|
||||
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
|
||||
import org.springframework.web.bind.annotation.RequestParam
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/menu")
|
||||
class SysMenuController(private val menuService: SysMenuService) {
|
||||
|
||||
@PostMapping("addOrUpdate")
|
||||
fun addOrUpdate(@RequestBody addOrUpdateDeptDTO: AddOrUpdateMenuDTO?): Response<String> {
|
||||
return menuService.addOrSaveMenu(addOrUpdateDeptDTO)
|
||||
}
|
||||
|
||||
@PostMapping("delete")
|
||||
fun deleteMenu(@RequestParam(value = "id", required = true) id: Int?): Response<String> {
|
||||
return menuService.deleteMenu(id)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://58.49.150.163:3306/eairp?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: Clunt@12345
|
||||
dynamic:
|
||||
druid:
|
||||
max-wait: 60000
|
||||
initial-size: 5
|
||||
min-idle: 5
|
||||
max-active: 20
|
||||
data:
|
||||
redis:
|
||||
host: 58.49.150.163
|
||||
port: 6379
|
||||
password: Clunt@12345
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 20
|
||||
max-wait: 100
|
||||
max-idle: 20
|
||||
min-idle: 5
|
||||
timeout: 10000
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
spring:
|
||||
datasource:
|
||||
url: ${SPRING_DATASOURCE_URL}
|
||||
username: ${SPRING_DATASOURCE_USERNAME}
|
||||
password: ${SPRING_DATASOURCE_PASSWORD}
|
||||
dynamic:
|
||||
druid:
|
||||
max-wait: 60000
|
||||
initial-size: 5
|
||||
min-idle: 5
|
||||
max-active: 20
|
||||
data:
|
||||
redis:
|
||||
host: ${SPRING_REDIS_HOST}
|
||||
port: ${SPRING_REDIS_PORT:6379}
|
||||
password: ${SPRING_REDIS_PASSWORD}
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 20
|
||||
max-wait: 100
|
||||
max-idle: 20
|
||||
min-idle: 5
|
||||
timeout: 10000
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
server:
|
||||
port: 8088
|
||||
servlet:
|
||||
context-path: /erp-api
|
||||
|
||||
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
|
||||
|
||||
logging:
|
||||
config: classpath:logback-spring.xml
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:/mapper_xml/**/*.xml
|
||||
type-aliases-package: com.wansenai.entities
|
||||
global-config:
|
||||
id-type: 0
|
||||
#刷新mapper 调试神器
|
||||
refresh-mapper: true
|
||||
configuration:
|
||||
# log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
|
@ -0,0 +1,184 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
|
||||
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
|
||||
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
|
||||
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
|
||||
<configuration scan="true" scanPeriod="10 seconds">
|
||||
|
||||
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
|
||||
|
||||
<contextName>logback</contextName>
|
||||
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
|
||||
<property name="log.path" value="log/"/>
|
||||
|
||||
<!-- 彩色日志 -->
|
||||
<!-- 彩色日志依赖的渲染类 -->
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
|
||||
<conversionRule conversionWord="wex"
|
||||
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
|
||||
<conversionRule conversionWord="wEx"
|
||||
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
|
||||
<!-- 彩色日志格式 -->
|
||||
<property name="CONSOLE_LOG_PATTERN"
|
||||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||
|
||||
|
||||
<!--输出到控制台-->
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>debug</level>
|
||||
</filter>
|
||||
<encoder>
|
||||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
|
||||
<!-- 设置字符集 -->
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<!--输出到文件-->
|
||||
|
||||
<!-- 时间滚动输出 level为 DEBUG 日志 -->
|
||||
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文件的路径及文件名 -->
|
||||
<file>${log.path}/log_debug.log</file>
|
||||
<!--日志文件输出格式-->
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset> <!-- 设置字符集 -->
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志归档 -->
|
||||
<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文件只记录debug级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>debug</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 时间滚动输出 level为 INFO 日志 -->
|
||||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文件的路径及文件名 -->
|
||||
<file>${log.path}/log_info.log</file>
|
||||
<!--日志文件输出格式-->
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 每天日志归档路径以及格式 -->
|
||||
<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文件只记录info级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>info</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 时间滚动输出 level为 WARN 日志 -->
|
||||
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文件的路径及文件名 -->
|
||||
<file>${log.path}/log_warn.log</file>
|
||||
<!--日志文件输出格式-->
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文件只记录warn级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>warn</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- 时间滚动输出 level为 ERROR 日志 -->
|
||||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<!-- 正在记录的日志文件的路径及文件名 -->
|
||||
<file>${log.path}/log_error.log</file>
|
||||
<!--日志文件输出格式-->
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
|
||||
</encoder>
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
<!--日志文件保留天数-->
|
||||
<maxHistory>15</maxHistory>
|
||||
</rollingPolicy>
|
||||
<!-- 此日志文件只记录ERROR级别的 -->
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<springProfile name="dev">
|
||||
<logger name="erp-api-logger" level="debug"/>
|
||||
</springProfile>
|
||||
|
||||
<springProfile name="docker">
|
||||
<logger name="erp-api-logger" level="debug"/>
|
||||
</springProfile>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
<appender-ref ref="DEBUG_FILE"/>
|
||||
<appender-ref ref="INFO_FILE"/>
|
||||
<appender-ref ref="WARN_FILE"/>
|
||||
<appender-ref ref="ERROR_FILE"/>
|
||||
</root>
|
||||
|
||||
<!-- 生产环境:输出到文件-->
|
||||
<!-- <springProfile name="prod">-->
|
||||
<!-- <root level="info">-->
|
||||
<!-- <appender-ref ref="CONSOLE" />-->
|
||||
<!-- <appender-ref ref="DEBUG_FILE" />-->
|
||||
<!-- <appender-ref ref="INFO_FILE" />-->
|
||||
<!-- <appender-ref ref="ERROR_FILE" />-->
|
||||
<!-- <appender-ref ref="WARN_FILE" />-->
|
||||
<!-- </root>-->
|
||||
<!-- </springProfile>-->
|
||||
<springProfile name="docker">
|
||||
<root level="info">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
<appender-ref ref="DEBUG_FILE" />
|
||||
<appender-ref ref="INFO_FILE" />
|
||||
<appender-ref ref="ERROR_FILE" />
|
||||
<appender-ref ref="WARN_FILE" />
|
||||
</root>
|
||||
</springProfile>
|
||||
</configuration>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class TotalPriceTest {
|
||||
|
||||
@Test
|
||||
public void testTotalPrice() {
|
||||
var a = BigDecimal.valueOf(83.75);
|
||||
var b = BigDecimal.valueOf(21.352).negate();
|
||||
|
||||
System.out.println(a);
|
||||
System.out.println(b);
|
||||
System.out.println(a.add(b));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# Dao Module
|
||||
|
||||
Data Access Objects separate data access logic from business logic to provide access and operations to data persistent storage.
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>com.wansenai</groupId>
|
||||
<artifactId>dao</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
```
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.wansenai.eairp</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dao</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.wansenai.eairp</groupId>
|
||||
<artifactId>domain</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.wansenai.eairp</groupId>
|
||||
<artifactId>utils</artifactId>
|
||||
<version>2.0.4-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers;
|
||||
|
||||
import com.wansenai.entities.IncomeExpense;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 收支项目 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface IncomeExpenseMapper extends BaseMapper<IncomeExpense> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers;
|
||||
|
||||
import com.wansenai.entities.basic.Operator;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 经手人表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface OperatorMapper extends BaseMapper<Operator> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.basic;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.entities.basic.Customer;
|
||||
|
||||
public interface CustomerMapper extends BaseMapper<Customer> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.basic;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.entities.basic.Member;
|
||||
|
||||
public interface MemberMapper extends BaseMapper<Member> {
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.basic;
|
||||
|
||||
import com.wansenai.entities.basic.Supplier;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 供应商/客户信息表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface SystemSupplierMapper extends BaseMapper<Supplier> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.financial;
|
||||
|
||||
import com.wansenai.entities.financial.FinancialAccount;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 账户信息 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface FinancialAccountMapper extends BaseMapper<FinancialAccount> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.financial;
|
||||
|
||||
import com.wansenai.entities.financial.FinancialMain;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 财务主表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface FinancialMainMapper extends BaseMapper<FinancialMain> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.financial;
|
||||
|
||||
import com.wansenai.entities.financial.FinancialSub;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 财务子表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface FinancialSubMapper extends BaseMapper<FinancialSub> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.product;
|
||||
|
||||
import com.wansenai.entities.product.ProductAttribute;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品属性表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface ProductAttributeMapper extends BaseMapper<ProductAttribute> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.product;
|
||||
|
||||
import com.wansenai.entities.product.ProductCategory;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品类型表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface ProductCategoryMapper extends BaseMapper<ProductCategory> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.product;
|
||||
|
||||
import com.wansenai.entities.product.ProductProperty;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品扩展字段表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface ProductExtendPropertyMapper extends BaseMapper<ProductProperty> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.wansenai.mappers.product;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.entities.product.ProductImage;
|
||||
|
||||
public interface ProductImageMapper extends BaseMapper<ProductImage> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.product;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.entities.product.ProductStock;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品当前库存 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface ProductInventoryCurrentMapper extends BaseMapper<ProductStock> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.product;
|
||||
|
||||
import com.wansenai.entities.product.Product;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface ProductMapper extends BaseMapper<Product> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.product;
|
||||
import com.wansenai.entities.product.ProductStockKeepUnit;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品价格扩展 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface ProductStockKeepUnitMapper extends BaseMapper<ProductStockKeepUnit> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.product;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.wansenai.dto.product.QueryProductStockKeepUnitDTO;
|
||||
import com.wansenai.dto.report.QueryProductStockDTO;
|
||||
import com.wansenai.entities.product.ProductStock;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.vo.product.ProductStockKeepUnitVO;
|
||||
import com.wansenai.vo.report.ProductStockSkuVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 产品初始库存 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface ProductStockMapper extends BaseMapper<ProductStock> {
|
||||
|
||||
IPage<ProductStockKeepUnitVO> getProductSkuList(IPage<QueryProductStockKeepUnitDTO> pageObject, QueryProductStockKeepUnitDTO queryProductStockKeepUnitDTO);
|
||||
|
||||
ProductStockKeepUnitVO getProductSkuByBarCode(String barCode, Long warehouseId);
|
||||
|
||||
ProductStockKeepUnitVO getProductSkuDetail(Long productId, Long warehouseId, String barCode);
|
||||
|
||||
Page<ProductStockSkuVO> getProductStock(IPage<QueryProductStockDTO> pageObject, QueryProductStockDTO queryProductStockDTO);
|
||||
|
||||
List<ProductStockSkuVO> getProductStockListByTerms(QueryProductStockDTO queryProductStockDTO);
|
||||
|
||||
List<ProductStockSkuVO> getProductStockList();
|
||||
|
||||
// 检查商品是否存在
|
||||
Boolean productStockExist(Long productSkuId, Long warehouseId);
|
||||
|
||||
Boolean saveBatch(List<ProductStock> productStockList);
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.product;
|
||||
|
||||
import com.wansenai.entities.product.ProductUnit;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 多单位表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface ProductUnitMapper extends BaseMapper<ProductUnit> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.receipt;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.entities.receipt.ReceiptPurchaseMain;
|
||||
|
||||
public interface ReceiptPurchaseMainMapper extends BaseMapper<ReceiptPurchaseMain> {
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.receipt;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.entities.receipt.ReceiptPurchaseSub;
|
||||
|
||||
public interface ReceiptPurchaseSubMapper extends BaseMapper<ReceiptPurchaseSub> {
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.receipt;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.entities.receipt.ReceiptRetailMain;
|
||||
|
||||
public interface ReceiptRetailMainMapper extends BaseMapper<ReceiptRetailMain> {
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.receipt;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.entities.receipt.ReceiptRetailSub;
|
||||
|
||||
public interface ReceiptRetailSubMapper extends BaseMapper<ReceiptRetailSub> {
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.receipt;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.entities.receipt.ReceiptSaleMain;
|
||||
|
||||
public interface ReceiptSaleMainMapper extends BaseMapper<ReceiptSaleMain> {
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.receipt;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.wansenai.entities.receipt.ReceiptSaleSub;
|
||||
|
||||
public interface ReceiptSaleSubMapper extends BaseMapper<ReceiptSaleSub> {
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.role;
|
||||
|
||||
import com.wansenai.entities.role.SysRole;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface SysRoleMapper extends BaseMapper<SysRole> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.role;
|
||||
|
||||
import com.wansenai.entities.role.SysRoleMenuRel;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色菜单关系表 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface SysRoleMenuRelMapper extends BaseMapper<SysRoleMenuRel> {
|
||||
|
||||
List<SysRoleMenuRel> listByRoleId(@Param("roleIds") List<Long> roleIds);
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright 2023-2033 WanSen AI Team, Inc. 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. A copy of the License is located at
|
||||
*
|
||||
* http://opensource.wansenai.com/apache2.0/
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file 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.wansenai.mappers.system;
|
||||
|
||||
import com.wansenai.entities.system.SysConfig;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统参数 Mapper 接口
|
||||
* </p>
|
||||
*/
|
||||
public interface SysConfigMapper extends BaseMapper<SysConfig> {
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue