浏览代码

first commit

张延森 2 年前
当前提交
2eb7bb6deb
共有 74 个文件被更改,包括 3384 次插入0 次删除
  1. 33
    0
      .gitignore
  2. 二进制
      .mvn/wrapper/maven-wrapper.jar
  3. 2
    0
      .mvn/wrapper/maven-wrapper.properties
  4. 316
    0
      mvnw
  5. 188
    0
      mvnw.cmd
  6. 202
    0
      pom.xml
  7. 13
    0
      src/main/java/com/njyunzhi/invoice/InvoiceFillApplication.java
  8. 7
    0
      src/main/java/com/njyunzhi/invoice/common/BaseController.java
  9. 62
    0
      src/main/java/com/njyunzhi/invoice/common/Constants.java
  10. 56
    0
      src/main/java/com/njyunzhi/invoice/common/DateUtils.java
  11. 26
    0
      src/main/java/com/njyunzhi/invoice/common/ExcelUtils.java
  12. 85
    0
      src/main/java/com/njyunzhi/invoice/common/ResponseBean.java
  13. 131
    0
      src/main/java/com/njyunzhi/invoice/common/StringUtils.java
  14. 8
    0
      src/main/java/com/njyunzhi/invoice/config/MybatisPlusConfig.java
  15. 45
    0
      src/main/java/com/njyunzhi/invoice/config/SaTokenConfigure.java
  16. 24
    0
      src/main/java/com/njyunzhi/invoice/config/SwagggerConfig.java
  17. 119
    0
      src/main/java/com/njyunzhi/invoice/controller/SysBankController.java
  18. 119
    0
      src/main/java/com/njyunzhi/invoice/controller/SysOrgController.java
  19. 119
    0
      src/main/java/com/njyunzhi/invoice/controller/SysUserController.java
  20. 119
    0
      src/main/java/com/njyunzhi/invoice/controller/TaInvoiceDetailController.java
  21. 119
    0
      src/main/java/com/njyunzhi/invoice/controller/TaInvoiceFillController.java
  22. 119
    0
      src/main/java/com/njyunzhi/invoice/controller/TaInvoiceItemTplController.java
  23. 119
    0
      src/main/java/com/njyunzhi/invoice/controller/TaInvoiceOrgController.java
  24. 119
    0
      src/main/java/com/njyunzhi/invoice/controller/TaInvoicePersonController.java
  25. 119
    0
      src/main/java/com/njyunzhi/invoice/controller/TaPersonController.java
  26. 46
    0
      src/main/java/com/njyunzhi/invoice/entity/SysBank.java
  27. 52
    0
      src/main/java/com/njyunzhi/invoice/entity/SysOrg.java
  28. 49
    0
      src/main/java/com/njyunzhi/invoice/entity/SysUser.java
  29. 94
    0
      src/main/java/com/njyunzhi/invoice/entity/TaInvoiceDetail.java
  30. 46
    0
      src/main/java/com/njyunzhi/invoice/entity/TaInvoiceFill.java
  31. 49
    0
      src/main/java/com/njyunzhi/invoice/entity/TaInvoiceItemTpl.java
  32. 46
    0
      src/main/java/com/njyunzhi/invoice/entity/TaInvoiceOrg.java
  33. 55
    0
      src/main/java/com/njyunzhi/invoice/entity/TaInvoicePerson.java
  34. 52
    0
      src/main/java/com/njyunzhi/invoice/entity/TaPerson.java
  35. 30
    0
      src/main/java/com/njyunzhi/invoice/exception/GlobalExceptionHandler.java
  36. 18
    0
      src/main/java/com/njyunzhi/invoice/mapper/SysBankMapper.java
  37. 18
    0
      src/main/java/com/njyunzhi/invoice/mapper/SysOrgMapper.java
  38. 18
    0
      src/main/java/com/njyunzhi/invoice/mapper/SysUserMapper.java
  39. 18
    0
      src/main/java/com/njyunzhi/invoice/mapper/TaInvoiceDetailMapper.java
  40. 18
    0
      src/main/java/com/njyunzhi/invoice/mapper/TaInvoiceFillMapper.java
  41. 18
    0
      src/main/java/com/njyunzhi/invoice/mapper/TaInvoiceItemTplMapper.java
  42. 18
    0
      src/main/java/com/njyunzhi/invoice/mapper/TaInvoiceOrgMapper.java
  43. 18
    0
      src/main/java/com/njyunzhi/invoice/mapper/TaInvoicePersonMapper.java
  44. 18
    0
      src/main/java/com/njyunzhi/invoice/mapper/TaPersonMapper.java
  45. 16
    0
      src/main/java/com/njyunzhi/invoice/service/ISysBankService.java
  46. 16
    0
      src/main/java/com/njyunzhi/invoice/service/ISysOrgService.java
  47. 16
    0
      src/main/java/com/njyunzhi/invoice/service/ISysUserService.java
  48. 16
    0
      src/main/java/com/njyunzhi/invoice/service/ITaInvoiceDetailService.java
  49. 16
    0
      src/main/java/com/njyunzhi/invoice/service/ITaInvoiceFillService.java
  50. 16
    0
      src/main/java/com/njyunzhi/invoice/service/ITaInvoiceItemTplService.java
  51. 16
    0
      src/main/java/com/njyunzhi/invoice/service/ITaInvoiceOrgService.java
  52. 16
    0
      src/main/java/com/njyunzhi/invoice/service/ITaInvoicePersonService.java
  53. 16
    0
      src/main/java/com/njyunzhi/invoice/service/ITaPersonService.java
  54. 20
    0
      src/main/java/com/njyunzhi/invoice/service/impl/SysBankServiceImpl.java
  55. 20
    0
      src/main/java/com/njyunzhi/invoice/service/impl/SysOrgServiceImpl.java
  56. 20
    0
      src/main/java/com/njyunzhi/invoice/service/impl/SysUserServiceImpl.java
  57. 20
    0
      src/main/java/com/njyunzhi/invoice/service/impl/TaInvoiceDetailServiceImpl.java
  58. 20
    0
      src/main/java/com/njyunzhi/invoice/service/impl/TaInvoiceFillServiceImpl.java
  59. 20
    0
      src/main/java/com/njyunzhi/invoice/service/impl/TaInvoiceItemTplServiceImpl.java
  60. 20
    0
      src/main/java/com/njyunzhi/invoice/service/impl/TaInvoiceOrgServiceImpl.java
  61. 20
    0
      src/main/java/com/njyunzhi/invoice/service/impl/TaInvoicePersonServiceImpl.java
  62. 20
    0
      src/main/java/com/njyunzhi/invoice/service/impl/TaPersonServiceImpl.java
  63. 17
    0
      src/main/resources/application-dev.yml
  64. 3
    0
      src/main/resources/application-prod.yml
  65. 45
    0
      src/main/resources/application.yml
  66. 5
    0
      src/main/resources/mapper/SysBankMapper.xml
  67. 5
    0
      src/main/resources/mapper/SysOrgMapper.xml
  68. 5
    0
      src/main/resources/mapper/SysUserMapper.xml
  69. 5
    0
      src/main/resources/mapper/TaInvoiceDetailMapper.xml
  70. 5
    0
      src/main/resources/mapper/TaInvoiceFillMapper.xml
  71. 5
    0
      src/main/resources/mapper/TaInvoiceItemTplMapper.xml
  72. 5
    0
      src/main/resources/mapper/TaInvoiceOrgMapper.xml
  73. 5
    0
      src/main/resources/mapper/TaInvoicePersonMapper.xml
  74. 5
    0
      src/main/resources/mapper/TaPersonMapper.xml

+ 33
- 0
.gitignore 查看文件

@@ -0,0 +1,33 @@
1
+HELP.md
2
+target/
3
+!.mvn/wrapper/maven-wrapper.jar
4
+!**/src/main/**/target/
5
+!**/src/test/**/target/
6
+
7
+### STS ###
8
+.apt_generated
9
+.classpath
10
+.factorypath
11
+.project
12
+.settings
13
+.springBeans
14
+.sts4-cache
15
+
16
+### IntelliJ IDEA ###
17
+.idea
18
+*.iws
19
+*.iml
20
+*.ipr
21
+
22
+### NetBeans ###
23
+/nbproject/private/
24
+/nbbuild/
25
+/dist/
26
+/nbdist/
27
+/.nb-gradle/
28
+build/
29
+!**/src/main/**/build/
30
+!**/src/test/**/build/
31
+
32
+### VS Code ###
33
+.vscode/

二进制
.mvn/wrapper/maven-wrapper.jar 查看文件


+ 2
- 0
.mvn/wrapper/maven-wrapper.properties 查看文件

@@ -0,0 +1,2 @@
1
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
2
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

+ 316
- 0
mvnw 查看文件

@@ -0,0 +1,316 @@
1
+#!/bin/sh
2
+# ----------------------------------------------------------------------------
3
+# Licensed to the Apache Software Foundation (ASF) under one
4
+# or more contributor license agreements.  See the NOTICE file
5
+# distributed with this work for additional information
6
+# regarding copyright ownership.  The ASF licenses this file
7
+# to you under the Apache License, Version 2.0 (the
8
+# "License"); you may not use this file except in compliance
9
+# with the License.  You may obtain a copy of the License at
10
+#
11
+#    https://www.apache.org/licenses/LICENSE-2.0
12
+#
13
+# Unless required by applicable law or agreed to in writing,
14
+# software distributed under the License is distributed on an
15
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+# KIND, either express or implied.  See the License for the
17
+# specific language governing permissions and limitations
18
+# under the License.
19
+# ----------------------------------------------------------------------------
20
+
21
+# ----------------------------------------------------------------------------
22
+# Maven Start Up Batch script
23
+#
24
+# Required ENV vars:
25
+# ------------------
26
+#   JAVA_HOME - location of a JDK home dir
27
+#
28
+# Optional ENV vars
29
+# -----------------
30
+#   M2_HOME - location of maven2's installed home dir
31
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
+#     e.g. to debug Maven itself, use
33
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
+# ----------------------------------------------------------------------------
36
+
37
+if [ -z "$MAVEN_SKIP_RC" ] ; then
38
+
39
+  if [ -f /usr/local/etc/mavenrc ] ; then
40
+    . /usr/local/etc/mavenrc
41
+  fi
42
+
43
+  if [ -f /etc/mavenrc ] ; then
44
+    . /etc/mavenrc
45
+  fi
46
+
47
+  if [ -f "$HOME/.mavenrc" ] ; then
48
+    . "$HOME/.mavenrc"
49
+  fi
50
+
51
+fi
52
+
53
+# OS specific support.  $var _must_ be set to either true or false.
54
+cygwin=false;
55
+darwin=false;
56
+mingw=false
57
+case "`uname`" in
58
+  CYGWIN*) cygwin=true ;;
59
+  MINGW*) mingw=true;;
60
+  Darwin*) darwin=true
61
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
62
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
63
+    if [ -z "$JAVA_HOME" ]; then
64
+      if [ -x "/usr/libexec/java_home" ]; then
65
+        export JAVA_HOME="`/usr/libexec/java_home`"
66
+      else
67
+        export JAVA_HOME="/Library/Java/Home"
68
+      fi
69
+    fi
70
+    ;;
71
+esac
72
+
73
+if [ -z "$JAVA_HOME" ] ; then
74
+  if [ -r /etc/gentoo-release ] ; then
75
+    JAVA_HOME=`java-config --jre-home`
76
+  fi
77
+fi
78
+
79
+if [ -z "$M2_HOME" ] ; then
80
+  ## resolve links - $0 may be a link to maven's home
81
+  PRG="$0"
82
+
83
+  # need this for relative symlinks
84
+  while [ -h "$PRG" ] ; do
85
+    ls=`ls -ld "$PRG"`
86
+    link=`expr "$ls" : '.*-> \(.*\)$'`
87
+    if expr "$link" : '/.*' > /dev/null; then
88
+      PRG="$link"
89
+    else
90
+      PRG="`dirname "$PRG"`/$link"
91
+    fi
92
+  done
93
+
94
+  saveddir=`pwd`
95
+
96
+  M2_HOME=`dirname "$PRG"`/..
97
+
98
+  # make it fully qualified
99
+  M2_HOME=`cd "$M2_HOME" && pwd`
100
+
101
+  cd "$saveddir"
102
+  # echo Using m2 at $M2_HOME
103
+fi
104
+
105
+# For Cygwin, ensure paths are in UNIX format before anything is touched
106
+if $cygwin ; then
107
+  [ -n "$M2_HOME" ] &&
108
+    M2_HOME=`cygpath --unix "$M2_HOME"`
109
+  [ -n "$JAVA_HOME" ] &&
110
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
111
+  [ -n "$CLASSPATH" ] &&
112
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
113
+fi
114
+
115
+# For Mingw, ensure paths are in UNIX format before anything is touched
116
+if $mingw ; then
117
+  [ -n "$M2_HOME" ] &&
118
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
119
+  [ -n "$JAVA_HOME" ] &&
120
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
121
+fi
122
+
123
+if [ -z "$JAVA_HOME" ]; then
124
+  javaExecutable="`which javac`"
125
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
126
+    # readlink(1) is not available as standard on Solaris 10.
127
+    readLink=`which readlink`
128
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
129
+      if $darwin ; then
130
+        javaHome="`dirname \"$javaExecutable\"`"
131
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
132
+      else
133
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
134
+      fi
135
+      javaHome="`dirname \"$javaExecutable\"`"
136
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
137
+      JAVA_HOME="$javaHome"
138
+      export JAVA_HOME
139
+    fi
140
+  fi
141
+fi
142
+
143
+if [ -z "$JAVACMD" ] ; then
144
+  if [ -n "$JAVA_HOME"  ] ; then
145
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
146
+      # IBM's JDK on AIX uses strange locations for the executables
147
+      JAVACMD="$JAVA_HOME/jre/sh/java"
148
+    else
149
+      JAVACMD="$JAVA_HOME/bin/java"
150
+    fi
151
+  else
152
+    JAVACMD="`\\unset -f command; \\command -v java`"
153
+  fi
154
+fi
155
+
156
+if [ ! -x "$JAVACMD" ] ; then
157
+  echo "Error: JAVA_HOME is not defined correctly." >&2
158
+  echo "  We cannot execute $JAVACMD" >&2
159
+  exit 1
160
+fi
161
+
162
+if [ -z "$JAVA_HOME" ] ; then
163
+  echo "Warning: JAVA_HOME environment variable is not set."
164
+fi
165
+
166
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
167
+
168
+# traverses directory structure from process work directory to filesystem root
169
+# first directory with .mvn subdirectory is considered project base directory
170
+find_maven_basedir() {
171
+
172
+  if [ -z "$1" ]
173
+  then
174
+    echo "Path not specified to find_maven_basedir"
175
+    return 1
176
+  fi
177
+
178
+  basedir="$1"
179
+  wdir="$1"
180
+  while [ "$wdir" != '/' ] ; do
181
+    if [ -d "$wdir"/.mvn ] ; then
182
+      basedir=$wdir
183
+      break
184
+    fi
185
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
186
+    if [ -d "${wdir}" ]; then
187
+      wdir=`cd "$wdir/.."; pwd`
188
+    fi
189
+    # end of workaround
190
+  done
191
+  echo "${basedir}"
192
+}
193
+
194
+# concatenates all lines of a file
195
+concat_lines() {
196
+  if [ -f "$1" ]; then
197
+    echo "$(tr -s '\n' ' ' < "$1")"
198
+  fi
199
+}
200
+
201
+BASE_DIR=`find_maven_basedir "$(pwd)"`
202
+if [ -z "$BASE_DIR" ]; then
203
+  exit 1;
204
+fi
205
+
206
+##########################################################################################
207
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
208
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
209
+##########################################################################################
210
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
211
+    if [ "$MVNW_VERBOSE" = true ]; then
212
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
213
+    fi
214
+else
215
+    if [ "$MVNW_VERBOSE" = true ]; then
216
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
217
+    fi
218
+    if [ -n "$MVNW_REPOURL" ]; then
219
+      jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
220
+    else
221
+      jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
222
+    fi
223
+    while IFS="=" read key value; do
224
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
225
+      esac
226
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
227
+    if [ "$MVNW_VERBOSE" = true ]; then
228
+      echo "Downloading from: $jarUrl"
229
+    fi
230
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
231
+    if $cygwin; then
232
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
233
+    fi
234
+
235
+    if command -v wget > /dev/null; then
236
+        if [ "$MVNW_VERBOSE" = true ]; then
237
+          echo "Found wget ... using wget"
238
+        fi
239
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
240
+            wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
241
+        else
242
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
243
+        fi
244
+    elif command -v curl > /dev/null; then
245
+        if [ "$MVNW_VERBOSE" = true ]; then
246
+          echo "Found curl ... using curl"
247
+        fi
248
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
249
+            curl -o "$wrapperJarPath" "$jarUrl" -f
250
+        else
251
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
252
+        fi
253
+
254
+    else
255
+        if [ "$MVNW_VERBOSE" = true ]; then
256
+          echo "Falling back to using Java to download"
257
+        fi
258
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
259
+        # For Cygwin, switch paths to Windows format before running javac
260
+        if $cygwin; then
261
+          javaClass=`cygpath --path --windows "$javaClass"`
262
+        fi
263
+        if [ -e "$javaClass" ]; then
264
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
265
+                if [ "$MVNW_VERBOSE" = true ]; then
266
+                  echo " - Compiling MavenWrapperDownloader.java ..."
267
+                fi
268
+                # Compiling the Java class
269
+                ("$JAVA_HOME/bin/javac" "$javaClass")
270
+            fi
271
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
272
+                # Running the downloader
273
+                if [ "$MVNW_VERBOSE" = true ]; then
274
+                  echo " - Running MavenWrapperDownloader.java ..."
275
+                fi
276
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
277
+            fi
278
+        fi
279
+    fi
280
+fi
281
+##########################################################################################
282
+# End of extension
283
+##########################################################################################
284
+
285
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
286
+if [ "$MVNW_VERBOSE" = true ]; then
287
+  echo $MAVEN_PROJECTBASEDIR
288
+fi
289
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
290
+
291
+# For Cygwin, switch paths to Windows format before running java
292
+if $cygwin; then
293
+  [ -n "$M2_HOME" ] &&
294
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
295
+  [ -n "$JAVA_HOME" ] &&
296
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
297
+  [ -n "$CLASSPATH" ] &&
298
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
299
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
300
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
301
+fi
302
+
303
+# Provide a "standardized" way to retrieve the CLI args that will
304
+# work with both Windows and non-Windows executions.
305
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
306
+export MAVEN_CMD_LINE_ARGS
307
+
308
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
309
+
310
+exec "$JAVACMD" \
311
+  $MAVEN_OPTS \
312
+  $MAVEN_DEBUG_OPTS \
313
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
314
+  "-Dmaven.home=${M2_HOME}" \
315
+  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
316
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 188
- 0
mvnw.cmd 查看文件

@@ -0,0 +1,188 @@
1
+@REM ----------------------------------------------------------------------------
2
+@REM Licensed to the Apache Software Foundation (ASF) under one
3
+@REM or more contributor license agreements.  See the NOTICE file
4
+@REM distributed with this work for additional information
5
+@REM regarding copyright ownership.  The ASF licenses this file
6
+@REM to you under the Apache License, Version 2.0 (the
7
+@REM "License"); you may not use this file except in compliance
8
+@REM with the License.  You may obtain a copy of the License at
9
+@REM
10
+@REM    https://www.apache.org/licenses/LICENSE-2.0
11
+@REM
12
+@REM Unless required by applicable law or agreed to in writing,
13
+@REM software distributed under the License is distributed on an
14
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+@REM KIND, either express or implied.  See the License for the
16
+@REM specific language governing permissions and limitations
17
+@REM under the License.
18
+@REM ----------------------------------------------------------------------------
19
+
20
+@REM ----------------------------------------------------------------------------
21
+@REM Maven Start Up Batch script
22
+@REM
23
+@REM Required ENV vars:
24
+@REM JAVA_HOME - location of a JDK home dir
25
+@REM
26
+@REM Optional ENV vars
27
+@REM M2_HOME - location of maven2's installed home dir
28
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
30
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
+@REM     e.g. to debug Maven itself, use
32
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34
+@REM ----------------------------------------------------------------------------
35
+
36
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37
+@echo off
38
+@REM set title of command window
39
+title %0
40
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
41
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
42
+
43
+@REM set %HOME% to equivalent of $HOME
44
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
45
+
46
+@REM Execute a user defined script before this one
47
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
48
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
49
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
50
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
51
+:skipRcPre
52
+
53
+@setlocal
54
+
55
+set ERROR_CODE=0
56
+
57
+@REM To isolate internal variables from possible post scripts, we use another setlocal
58
+@setlocal
59
+
60
+@REM ==== START VALIDATION ====
61
+if not "%JAVA_HOME%" == "" goto OkJHome
62
+
63
+echo.
64
+echo Error: JAVA_HOME not found in your environment. >&2
65
+echo Please set the JAVA_HOME variable in your environment to match the >&2
66
+echo location of your Java installation. >&2
67
+echo.
68
+goto error
69
+
70
+:OkJHome
71
+if exist "%JAVA_HOME%\bin\java.exe" goto init
72
+
73
+echo.
74
+echo Error: JAVA_HOME is set to an invalid directory. >&2
75
+echo JAVA_HOME = "%JAVA_HOME%" >&2
76
+echo Please set the JAVA_HOME variable in your environment to match the >&2
77
+echo location of your Java installation. >&2
78
+echo.
79
+goto error
80
+
81
+@REM ==== END VALIDATION ====
82
+
83
+:init
84
+
85
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
86
+@REM Fallback to current working directory if not found.
87
+
88
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
89
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
90
+
91
+set EXEC_DIR=%CD%
92
+set WDIR=%EXEC_DIR%
93
+:findBaseDir
94
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
95
+cd ..
96
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
97
+set WDIR=%CD%
98
+goto findBaseDir
99
+
100
+:baseDirFound
101
+set MAVEN_PROJECTBASEDIR=%WDIR%
102
+cd "%EXEC_DIR%"
103
+goto endDetectBaseDir
104
+
105
+:baseDirNotFound
106
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
107
+cd "%EXEC_DIR%"
108
+
109
+:endDetectBaseDir
110
+
111
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
112
+
113
+@setlocal EnableExtensions EnableDelayedExpansion
114
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
115
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
116
+
117
+:endReadAdditionalConfig
118
+
119
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
121
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
122
+
123
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
124
+
125
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
126
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
127
+)
128
+
129
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
130
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
131
+if exist %WRAPPER_JAR% (
132
+    if "%MVNW_VERBOSE%" == "true" (
133
+        echo Found %WRAPPER_JAR%
134
+    )
135
+) else (
136
+    if not "%MVNW_REPOURL%" == "" (
137
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
138
+    )
139
+    if "%MVNW_VERBOSE%" == "true" (
140
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
141
+        echo Downloading from: %DOWNLOAD_URL%
142
+    )
143
+
144
+    powershell -Command "&{"^
145
+		"$webclient = new-object System.Net.WebClient;"^
146
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
147
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
148
+		"}"^
149
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
150
+		"}"
151
+    if "%MVNW_VERBOSE%" == "true" (
152
+        echo Finished downloading %WRAPPER_JAR%
153
+    )
154
+)
155
+@REM End of extension
156
+
157
+@REM Provide a "standardized" way to retrieve the CLI args that will
158
+@REM work with both Windows and non-Windows executions.
159
+set MAVEN_CMD_LINE_ARGS=%*
160
+
161
+%MAVEN_JAVA_EXE% ^
162
+  %JVM_CONFIG_MAVEN_PROPS% ^
163
+  %MAVEN_OPTS% ^
164
+  %MAVEN_DEBUG_OPTS% ^
165
+  -classpath %WRAPPER_JAR% ^
166
+  "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
167
+  %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
168
+if ERRORLEVEL 1 goto error
169
+goto end
170
+
171
+:error
172
+set ERROR_CODE=1
173
+
174
+:end
175
+@endlocal & set ERROR_CODE=%ERROR_CODE%
176
+
177
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
178
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
179
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
180
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
181
+:skipRcPost
182
+
183
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
184
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
185
+
186
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
187
+
188
+cmd /C exit /B %ERROR_CODE%

+ 202
- 0
pom.xml 查看文件

@@ -0,0 +1,202 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4
+	<modelVersion>4.0.0</modelVersion>
5
+	<parent>
6
+		<groupId>org.springframework.boot</groupId>
7
+		<artifactId>spring-boot-starter-parent</artifactId>
8
+		<version>2.7.1</version>
9
+		<relativePath/> <!-- lookup parent from repository -->
10
+	</parent>
11
+	<groupId>com.njyunzhi</groupId>
12
+	<artifactId>invoice</artifactId>
13
+	<version>0.0.1-SNAPSHOT</version>
14
+	<name>invoice-fill</name>
15
+	<description>发票填报</description>
16
+	<properties>
17
+		<java.version>1.8</java.version>
18
+		<maven.compiler.source>1.8</maven.compiler.source>
19
+		<maven.compiler.target>1.8</maven.compiler.target>
20
+	</properties>
21
+	<dependencies>
22
+		<dependency>
23
+			<groupId>org.springframework.boot</groupId>
24
+			<artifactId>spring-boot-starter-web</artifactId>
25
+		</dependency>
26
+
27
+		<dependency>
28
+			<groupId>mysql</groupId>
29
+			<artifactId>mysql-connector-java</artifactId>
30
+			<scope>runtime</scope>
31
+		</dependency>
32
+		<dependency>
33
+			<groupId>org.projectlombok</groupId>
34
+			<artifactId>lombok</artifactId>
35
+			<optional>true</optional>
36
+		</dependency>
37
+		<dependency>
38
+			<groupId>org.springframework.boot</groupId>
39
+			<artifactId>spring-boot-starter-test</artifactId>
40
+			<scope>test</scope>
41
+		</dependency>
42
+
43
+		<dependency>
44
+			<groupId>com.baomidou</groupId>
45
+			<artifactId>mybatis-plus-boot-starter</artifactId>
46
+			<version>3.5.1</version>
47
+		</dependency>
48
+
49
+		<!--excel start-->
50
+		<dependency>
51
+			<groupId>com.alibaba</groupId>
52
+			<artifactId>easyexcel</artifactId>
53
+			<version>2.0.4</version>
54
+		</dependency>
55
+		<!--excel end-->
56
+
57
+		<!--swagger start-->
58
+		<dependency>
59
+			<groupId>io.springfox</groupId>
60
+			<artifactId>springfox-boot-starter</artifactId>
61
+			<version>3.0.0</version>
62
+		</dependency>
63
+		<!--swagger end-->
64
+
65
+		<!-- Sa-Token 权限认证, 在线文档:http://sa-token.dev33.cn/ -->
66
+		<dependency>
67
+			<groupId>cn.dev33</groupId>
68
+			<artifactId>sa-token-spring-boot-starter</artifactId>
69
+			<version>1.30.0</version>
70
+		</dependency>
71
+
72
+		<!-- Sa-Token 整合 jwt -->
73
+		<dependency>
74
+			<groupId>cn.dev33</groupId>
75
+			<artifactId>sa-token-jwt</artifactId>
76
+			<version>1.30.0</version>
77
+		</dependency>
78
+
79
+	</dependencies>
80
+
81
+
82
+	<profiles>
83
+		<profile>
84
+			<id>dev</id>
85
+			<properties>
86
+				<profileActive>dev</profileActive>
87
+			</properties>
88
+			<activation>
89
+				<activeByDefault>true</activeByDefault>
90
+			</activation>
91
+
92
+			<build>
93
+				<plugins>
94
+					<plugin>
95
+						<groupId>org.springframework.boot</groupId>
96
+						<artifactId>spring-boot-maven-plugin</artifactId>
97
+						<configuration>
98
+							<includeSystemScope>true</includeSystemScope>
99
+							<excludes>
100
+								<exclude>
101
+									<groupId>org.springframework.boot</groupId>
102
+									<artifactId>spring-boot-configuration-processor</artifactId>
103
+								</exclude>
104
+							</excludes>
105
+						</configuration>
106
+					</plugin>
107
+					<plugin>
108
+						<groupId>org.apache.maven.plugins</groupId>
109
+						<artifactId>maven-resources-plugin</artifactId>
110
+						<configuration>
111
+							<encoding>UTF-8</encoding>
112
+							<nonFilteredFileExtensions>
113
+								<nonFilteredFileExtension>pem</nonFilteredFileExtension>
114
+								<nonFilteredFileExtension>pfx</nonFilteredFileExtension>
115
+								<nonFilteredFileExtension>p12</nonFilteredFileExtension>
116
+							</nonFilteredFileExtensions>
117
+						</configuration>
118
+					</plugin>
119
+				</plugins>
120
+				<resources>
121
+					<resource>
122
+						<directory>src/main/resources</directory>
123
+						<filtering>true</filtering>
124
+						<includes>
125
+							<include>**/*.xml</include>
126
+							<include>**/*.p12</include>
127
+							<include>**/*.pem</include>
128
+							<include>application.yml</include>
129
+							<include>application-${profileActive}.yml</include>
130
+						</includes>
131
+					</resource>
132
+				</resources>
133
+			</build>
134
+		</profile>
135
+
136
+		<profile>
137
+			<id>prod</id>
138
+			<properties>
139
+				<profileActive>prod</profileActive>
140
+			</properties>
141
+			<activation>
142
+				<activeByDefault>false</activeByDefault>
143
+			</activation>
144
+
145
+			<build>
146
+				<plugins>
147
+					<plugin>
148
+						<groupId>org.springframework.boot</groupId>
149
+						<artifactId>spring-boot-maven-plugin</artifactId>
150
+						<configuration>
151
+							<includeSystemScope>true</includeSystemScope>
152
+						</configuration>
153
+					</plugin>
154
+
155
+					<!-- 跳过测试 -->
156
+					<plugin>
157
+						<groupId>org.apache.maven.plugins</groupId>
158
+						<artifactId>maven-surefire-plugin</artifactId>
159
+						<configuration>
160
+							<skipTests>true</skipTests>
161
+							<testFailureIgnore>true</testFailureIgnore>
162
+						</configuration>
163
+					</plugin>
164
+					<plugin>
165
+						<groupId>org.apache.maven.plugins</groupId>
166
+						<artifactId>maven-resources-plugin</artifactId>
167
+						<configuration>
168
+							<encoding>UTF-8</encoding>
169
+							<nonFilteredFileExtensions>
170
+								<nonFilteredFileExtension>pem</nonFilteredFileExtension>
171
+								<nonFilteredFileExtension>pfx</nonFilteredFileExtension>
172
+								<nonFilteredFileExtension>p12</nonFilteredFileExtension>
173
+							</nonFilteredFileExtensions>
174
+						</configuration>
175
+					</plugin>
176
+				</plugins>
177
+				<resources>
178
+					<resource>
179
+						<directory>src/main/resources</directory>
180
+						<filtering>true</filtering>
181
+						<excludes>
182
+							<exclude>application.yml</exclude>
183
+							<exclude>application-*.yml</exclude>
184
+						</excludes>
185
+					</resource>
186
+					<resource>
187
+						<directory>src/main/resources</directory>
188
+						<filtering>true</filtering>
189
+						<includes>
190
+							<include>**/*.xml</include>
191
+							<include>**/*.p12</include>
192
+							<include>**/*.pem</include>
193
+							<include>application.yml</include>
194
+							<include>application-${profileActive}.yml</include>
195
+						</includes>
196
+						<targetPath>${project.build.directory}/config</targetPath>
197
+					</resource>
198
+				</resources>
199
+			</build>
200
+		</profile>
201
+	</profiles>
202
+</project>

+ 13
- 0
src/main/java/com/njyunzhi/invoice/InvoiceFillApplication.java 查看文件

@@ -0,0 +1,13 @@
1
+package com.njyunzhi.invoice;
2
+
3
+import org.springframework.boot.SpringApplication;
4
+import org.springframework.boot.autoconfigure.SpringBootApplication;
5
+
6
+@SpringBootApplication
7
+public class InvoiceFillApplication {
8
+
9
+	public static void main(String[] args) {
10
+		SpringApplication.run(InvoiceFillApplication.class, args);
11
+	}
12
+
13
+}

+ 7
- 0
src/main/java/com/njyunzhi/invoice/common/BaseController.java 查看文件

@@ -0,0 +1,7 @@
1
+package com.njyunzhi.invoice.common;
2
+
3
+import org.springframework.stereotype.Component;
4
+
5
+@Component
6
+public class BaseController {
7
+}

+ 62
- 0
src/main/java/com/njyunzhi/invoice/common/Constants.java 查看文件

@@ -0,0 +1,62 @@
1
+package com.njyunzhi.invoice.common;
2
+
3
+public class Constants {
4
+    // 超级管理员ID
5
+    public final static String ADMIN_ID = "1";
6
+    // 平台账户ID
7
+    public final static String SYSTEM_ACC_ID = "system";
8
+
9
+    public final static int STATUS_DELETE = -1;
10
+    public final static int STATUS_READY = 0;
11
+    public final static int STATUS_NORMAL = 1;
12
+
13
+    // 客户端类型
14
+    public final static String CLIENT_WORKER = "worker";    // 农机手
15
+    public final static String CLIENT_FARMER = "farmer";    // 农户
16
+
17
+    // 资源类型
18
+    public final static String TARGET_MACHINERY = "machinery";  // 农机
19
+    public final static String TARGET_NEWS = "news";    // 资讯
20
+
21
+    // 账户收支类型
22
+    public final static int ACCOUNT_INCOME = 1; // 收入
23
+    public final static int ACCOUNT_EXPEND = -1; // 支出
24
+
25
+    // 账户消费类型
26
+    public final static String ACCOUNT_ORDER_PAY = "order_pay"; // 订单支付
27
+    public final static String ACCOUNT_ORDER_REFUND = "order_refund"; // 订单退款
28
+    public final static String ACCOUNT_WITHDRAW = "withdraw"; // 提现
29
+
30
+    // 审批状态
31
+    public final static int AUDIT_READY = 0;    // 待审批
32
+    public final static int AUDIT_AGREE = 1;    // 审批通过
33
+    public final static int AUDIT_DISAGREE = 2;    // 审批不通过
34
+
35
+    // 订单状态
36
+    public final static int ORDER_CANCEL = 9;  // 待支付
37
+
38
+    // 支付状态
39
+    public final static int PAY_READY = 0;  // 待支付
40
+    public final static int PAY_PAID = 1;  // 已支付
41
+    public final static int PAY_FAIL = 2;  // 支付失败
42
+    public final static int PAY_REFUNDING = 3;  // 退款申请中
43
+    public final static int PAY_PROCESSING = 4;  // 支付中
44
+    public final static int PAY_REFUND = -1;  // 已退款
45
+
46
+    // 是否调度
47
+    public final static int DISPATCH_READY = 0; // 待调度
48
+    public final static int DISPATCH_DONE = 1; // 已调度
49
+
50
+    // 工作状态
51
+    public final static int WORK_READY = 0;   // 预备中
52
+    public final static int WORK_DOING = 1;   // 工作中
53
+    public final static int WORK_PAUSE = 2;   // 暂停
54
+    public final static int WORK_DONE = 3;   // 已完成
55
+
56
+    // 消息类型
57
+    public final static String MESSAGE_SMS = "sms"; // 短信
58
+    public final static String MESSAGE_MINIAPP = "miniapp"; // 小程序
59
+
60
+    public final static String MESSAGE_ORDER_NOTIFY = "order_notify";   // 订单通知
61
+    public final static String MESSAGE_ORDER_EXPIRE = "order_expire";   // 订单超时
62
+}

+ 56
- 0
src/main/java/com/njyunzhi/invoice/common/DateUtils.java 查看文件

@@ -0,0 +1,56 @@
1
+package com.njyunzhi.invoice.common;
2
+
3
+import java.time.*;
4
+import java.time.format.DateTimeFormatter;
5
+
6
+public class DateUtils {
7
+    public static LocalDateTime now() {
8
+        // 北京时间
9
+        return LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
10
+    }
11
+
12
+    public static LocalDateTime from(String str, DateTimeFormatter fmt) {
13
+        return LocalDateTime.parse(str, fmt);
14
+    }
15
+
16
+    public static LocalDateTime from(String str, String formater) {
17
+        DateTimeFormatter fmt = DateTimeFormatter.ofPattern(formater);
18
+        return LocalDateTime.parse(str, fmt);
19
+    }
20
+
21
+    public static long daysBetween(LocalDateTime dt1, LocalDateTime dt2) {
22
+        Duration duration = Duration.between(dt1, dt2);
23
+        return duration.toDays();
24
+    }
25
+
26
+    public static String toString(LocalDateTime dt, String formater) {
27
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(formater);
28
+        return dt.format(formatter);
29
+    }
30
+
31
+    public static String weekDay(LocalDateTime dt) {
32
+        String[] week = new String[]{"一", "二", "三", "四", "五", "六", "日"};
33
+        DayOfWeek dayOfWeek = dt.getDayOfWeek();
34
+        int inx = dayOfWeek.getValue() - 1;
35
+        return String.format("星期%s", week[inx]);
36
+    }
37
+
38
+    /**
39
+     * 毫秒转 UTC 时间
40
+     * @param milliseconds
41
+     * @return
42
+     */
43
+    public static LocalDateTime getDateTime(long milliseconds) {
44
+        return LocalDateTime.ofInstant(Instant.ofEpochMilli(milliseconds), ZoneOffset.UTC);
45
+    }
46
+
47
+    public static LocalDateTime getDayStart(String dt) {
48
+        if (dt == null || dt.equals("")) return null;
49
+        return from(dt + " 00:00:00", "yyyy-MM-dd HH:mm:ss");
50
+    }
51
+
52
+    public static LocalDateTime getDayEnd(String dt) {
53
+        if (dt == null || dt.equals("")) return null;
54
+        return from(dt + " 23:59:59", "yyyy-MM-dd HH:mm:ss");
55
+    }
56
+}

+ 26
- 0
src/main/java/com/njyunzhi/invoice/common/ExcelUtils.java 查看文件

@@ -0,0 +1,26 @@
1
+package com.njyunzhi.invoice.common;
2
+
3
+import com.alibaba.excel.EasyExcel;
4
+
5
+import javax.servlet.http.HttpServletResponse;
6
+import java.io.IOException;
7
+import java.util.List;
8
+
9
+public class ExcelUtils {
10
+
11
+    /**
12
+     * 发送 excel 到客户端
13
+     * 暂时只支持单 sheet 页
14
+     * @param response
15
+     * @param data
16
+     * @param fileName
17
+     * @throws IOException
18
+     */
19
+    public static void flush(HttpServletResponse response, Class dataClass, List data, String fileName) throws IOException {
20
+        response.setContentType("application/vnd.ms-excel");
21
+        response.setCharacterEncoding("utf-8");
22
+        response.setHeader("Content-disposition", "attachment;filename="+StringUtils.urlEncode(fileName)+".xlsx");
23
+
24
+        EasyExcel.write(response.getOutputStream(), dataClass).sheet("sheet1").doWrite(data);
25
+    }
26
+}

+ 85
- 0
src/main/java/com/njyunzhi/invoice/common/ResponseBean.java 查看文件

@@ -0,0 +1,85 @@
1
+package com.njyunzhi.invoice.common;
2
+
3
+import java.io.Serializable;
4
+
5
+/**
6
+ * 接口统一状态返回BEAN.
7
+ */
8
+public class ResponseBean<T> implements Serializable {
9
+
10
+    private static final long serialVersionUID = 3593827217136880822L;
11
+
12
+    public static final int CODE_SUCCESS = 1000;
13
+    public static final int ERROR_AUTH_FAIL = 1001;
14
+    public static final int ERROR_UNAUTHORIZED = 1002;
15
+    public static final int ERROR_MISSING_PARAMS = 1003;
16
+    public static final int ERROR_ILLEGAL_PARAMS = 1004;
17
+    public static final int ERROR_UNAVAILABLE = 1005;
18
+
19
+    private int code;
20
+    private String message;
21
+    private T data;
22
+
23
+    public ResponseBean() {
24
+        code = ResponseBean.CODE_SUCCESS;
25
+    }
26
+
27
+    public static <T> ResponseBean success(T data, String ...msgs) {
28
+        ResponseBean responseBean = new ResponseBean();
29
+        responseBean.code = ResponseBean.CODE_SUCCESS;
30
+        responseBean.data = data;
31
+
32
+        if (null != msgs && msgs.length > 0) {
33
+            responseBean.message = msgs[0];
34
+        }
35
+
36
+        return responseBean;
37
+    }
38
+
39
+
40
+    public static <T> ResponseBean error(String msg) {
41
+        ResponseBean responseBean = new ResponseBean();
42
+        responseBean.code = ERROR_ILLEGAL_PARAMS;
43
+        responseBean.message = msg;
44
+
45
+        return responseBean;
46
+    }
47
+
48
+    public static <T> ResponseBean error(String msg, int code, T ...datas) {
49
+        ResponseBean responseBean = new ResponseBean();
50
+        responseBean.code = code;
51
+        responseBean.message = msg;
52
+
53
+        if (null != datas && datas.length > 0) {
54
+            responseBean.data = datas[0];
55
+        }
56
+
57
+        return responseBean;
58
+    }
59
+
60
+    public int getCode() {
61
+        return code;
62
+    }
63
+    public void setCode(int code) {
64
+        this.code = code;
65
+    }
66
+
67
+    public String getMessage() {
68
+        return message;
69
+    }
70
+    public void setMessage(String message) {
71
+        this.message = message;
72
+    }
73
+
74
+    public T getData() {
75
+        return data;
76
+    }
77
+    public void setData(T data) {
78
+        this.data = data;
79
+    }
80
+    
81
+    @Override
82
+    public String toString() {
83
+        return  "{ code: "+code+", message: "+message+", data: <T> }";
84
+    }
85
+}

+ 131
- 0
src/main/java/com/njyunzhi/invoice/common/StringUtils.java 查看文件

@@ -0,0 +1,131 @@
1
+package com.njyunzhi.invoice.common;
2
+
3
+import java.io.UnsupportedEncodingException;
4
+import java.net.URLEncoder;
5
+import java.util.Random;
6
+import java.util.UUID;
7
+import java.util.regex.Matcher;
8
+import java.util.regex.Pattern;
9
+
10
+public class StringUtils {
11
+    private static Pattern humpPattern = Pattern.compile("[A-Z]");
12
+
13
+    public static boolean isEmpty(String str) {
14
+        return null == str || "".equals(str.trim()) || "null".equals(str) || "undefined".equals(str);
15
+    }
16
+
17
+    public static String trim(String src, String...st) {
18
+        if (null == src) return src;
19
+        if (null == st || st.length == 0) return src.trim();
20
+
21
+        String start = st[0];
22
+        if (!src.startsWith(start)) {
23
+            return src;
24
+        }
25
+
26
+        return src.substring(start.length());
27
+    }
28
+
29
+    public static String trimEnd(String src, String str) {
30
+        if (null == src || null == str) {
31
+            return src;
32
+        }
33
+
34
+        if (src.endsWith(str)) {
35
+            return src.substring(0, src.length() - str.length());
36
+        }
37
+
38
+        return src;
39
+    }
40
+
41
+    public static String ifNull(String src, String defaultVal) {
42
+        return isEmpty(src) ? defaultVal : src;
43
+    }
44
+
45
+    public static String like(String src) {
46
+        if (null == src) return null;
47
+        if ("".equals(src)) return src;
48
+        return "%" + src + "%";
49
+    }
50
+
51
+    public static String random(int length) {
52
+        String str="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
53
+        Random random = new Random();
54
+        StringBuffer sb = new StringBuffer();
55
+        for(int i=0;i<length;i++){
56
+            int number=random.nextInt(62);
57
+            sb.append(str.charAt(number));
58
+        }
59
+        return sb.toString();
60
+    }
61
+
62
+    public static String uuid() {
63
+        return UUID.randomUUID().toString().replaceAll("-", "");
64
+    }
65
+
66
+    public static String urlEncode(String str) {
67
+        try {
68
+            return URLEncoder.encode(str, "UTF-8");
69
+        } catch (UnsupportedEncodingException e) {
70
+            e.printStackTrace();
71
+            return str;
72
+        }
73
+    }
74
+
75
+    public static String humpToLine(String str) {
76
+        if (null == str || "".equals(str)) return "";
77
+
78
+        Matcher matcher = humpPattern.matcher(str);
79
+        StringBuffer sb = new StringBuffer();
80
+        while (matcher.find()) {
81
+            matcher.appendReplacement(sb, "_" + matcher.group(0).toLowerCase());
82
+        }
83
+        matcher.appendTail(sb);
84
+        return sb.toString();
85
+    }
86
+
87
+    public static String strToUnicode(String str) {
88
+        char[] chars = str.toCharArray();
89
+        String returnStr = "";
90
+        for (int i = 0; i < chars.length; i++) {
91
+            returnStr += "\\u" + Integer.toString(chars[i], 16);
92
+        }
93
+        return returnStr;
94
+    }
95
+
96
+    public static String repeat(String src, int len) {
97
+        if (null == src) {
98
+            return null;
99
+        }
100
+
101
+        if (len <= 0) {
102
+            return src;
103
+        }
104
+
105
+        String res = "";
106
+        for (int i = 0; i < len; i ++) {
107
+            res += src;
108
+        }
109
+
110
+        return res;
111
+    }
112
+
113
+    public static String lpad(String src, String padStr, int len) {
114
+        if (null == src) {
115
+            return null;
116
+        }
117
+
118
+        if (len <= 0 || src.length() >= len) {
119
+            return src;
120
+        }
121
+
122
+        if (null == padStr) {
123
+            padStr = "";
124
+        }
125
+
126
+        int padLen = len - src.length();
127
+        String prefix = repeat(padStr, padLen);
128
+        prefix = prefix.substring(0, padLen);
129
+        return prefix + src;
130
+    }
131
+}

+ 8
- 0
src/main/java/com/njyunzhi/invoice/config/MybatisPlusConfig.java 查看文件

@@ -0,0 +1,8 @@
1
+package com.njyunzhi.invoice.config;
2
+
3
+import org.springframework.context.annotation.Configuration;
4
+
5
+@Configuration
6
+public class MybatisPlusConfig {
7
+
8
+}

+ 45
- 0
src/main/java/com/njyunzhi/invoice/config/SaTokenConfigure.java 查看文件

@@ -0,0 +1,45 @@
1
+package com.njyunzhi.invoice.config;
2
+
3
+import cn.dev33.satoken.interceptor.SaRouteInterceptor;
4
+import cn.dev33.satoken.jwt.StpLogicJwtForStateless;
5
+import cn.dev33.satoken.stp.StpLogic;
6
+import org.springframework.context.annotation.Bean;
7
+import org.springframework.context.annotation.Configuration;
8
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
9
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
10
+
11
+import java.util.ArrayList;
12
+import java.util.List;
13
+
14
+@Configuration
15
+public class SaTokenConfigure implements WebMvcConfigurer {
16
+
17
+    // 注册拦截器
18
+    @Override
19
+    public void addInterceptors(InterceptorRegistry registry) {
20
+
21
+        List<String> anonList = new ArrayList<>();
22
+        anonList.add("/swagger-ui/**");
23
+        anonList.add("/swagger-resources/**");
24
+        anonList.add("/v2/**");
25
+        anonList.add("/wxpay/notify/**");
26
+        anonList.add("/alipay/notify/**");
27
+        anonList.add("/**/sms-captcha");
28
+        anonList.add("/**/**/sms-captcha");
29
+        anonList.add("/**/preload");
30
+        anonList.add("/**/login");
31
+        anonList.add("/**/**/login");
32
+
33
+        // 注册Sa-Token的路由拦截器
34
+        registry.addInterceptor(new SaRouteInterceptor())
35
+                .addPathPatterns("/**")
36
+                .excludePathPatterns(anonList.toArray(new String[0]));
37
+    }
38
+
39
+
40
+    // Sa-Token 整合 jwt (Style模式)
41
+    @Bean
42
+    public StpLogic getStpLogicJwt() {
43
+        return new StpLogicJwtForStateless();
44
+    }
45
+}

+ 24
- 0
src/main/java/com/njyunzhi/invoice/config/SwagggerConfig.java 查看文件

@@ -0,0 +1,24 @@
1
+package com.njyunzhi.invoice.config;
2
+
3
+import io.swagger.annotations.Api;
4
+import org.springframework.context.annotation.Bean;
5
+import org.springframework.context.annotation.Configuration;
6
+import springfox.documentation.builders.PathSelectors;
7
+import springfox.documentation.builders.RequestHandlerSelectors;
8
+import springfox.documentation.spi.DocumentationType;
9
+import springfox.documentation.spring.web.plugins.Docket;
10
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
11
+
12
+@Configuration
13
+@EnableSwagger2
14
+public class SwagggerConfig {
15
+    @Bean
16
+    public Docket docket() {
17
+        return new Docket(DocumentationType.SWAGGER_2)
18
+                .select()
19
+                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
20
+                .paths(PathSelectors.any())
21
+                .build();
22
+
23
+    }
24
+}

+ 119
- 0
src/main/java/com/njyunzhi/invoice/controller/SysBankController.java 查看文件

@@ -0,0 +1,119 @@
1
+package com.njyunzhi.invoice.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.invoice.common.BaseController;
7
+import com.njyunzhi.invoice.common.ResponseBean;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import io.swagger.annotations.ApiParam;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PathVariable;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import com.njyunzhi.invoice.service.ISysBankService;
20
+import com.njyunzhi.invoice.entity.SysBank;
21
+import org.springframework.web.bind.annotation.RestController;
22
+
23
+/**
24
+ * <p>
25
+    * 开户行 前端控制器
26
+    * </p>
27
+ *
28
+ * @author yansen
29
+ * @since 2022-07-04
30
+ */
31
+
32
+@Api(tags = "开户行")
33
+@RestController
34
+@RequestMapping("/")
35
+public class SysBankController extends BaseController {
36
+
37
+    private final Logger logger = LoggerFactory.getLogger(SysBankController.class);
38
+
39
+    @Autowired
40
+    public ISysBankService iSysBankService;
41
+
42
+
43
+    /**
44
+     * 分页查询列表
45
+     * @param pageNum
46
+     * @param pageSize
47
+     * @return
48
+     */
49
+    @RequestMapping(value="/sysBank",method= RequestMethod.GET)
50
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
51
+    public ResponseBean sysBankList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+									 @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
53
+
54
+		    IPage<SysBank> pg = new Page<>(pageNum, pageSize);
55
+            QueryWrapper<SysBank> queryWrapper = new QueryWrapper<>();
56
+            queryWrapper.orderByDesc("create_date");
57
+
58
+            IPage<SysBank> result = iSysBankService.page(pg, queryWrapper);
59
+            return ResponseBean.success(result);
60
+    }
61
+
62
+    /**
63
+     * 保存对象
64
+     * @param sysBank 实体对象
65
+     * @return
66
+     */
67
+    @RequestMapping(value="/sysBank",method= RequestMethod.POST)
68
+    @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
69
+    public ResponseBean sysBankAdd(@ApiParam("保存内容") @RequestBody SysBank sysBank) throws Exception{
70
+
71
+        if (iSysBankService.save(sysBank)){
72
+            return ResponseBean.success(sysBank);
73
+        }else {
74
+            return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
75
+        }
76
+    }
77
+
78
+    /**
79
+     * 根据id删除对象
80
+     * @param id  实体ID
81
+     */
82
+    @RequestMapping(value="/sysBank/{id}", method= RequestMethod.DELETE)
83
+    @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
84
+    public ResponseBean sysBankDelete(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
85
+        if(iSysBankService.removeById(id)){
86
+            return ResponseBean.success("success");
87
+        }else {
88
+            return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
89
+        }
90
+    }
91
+
92
+    /**
93
+     * 修改对象
94
+     * @param id  实体ID
95
+     * @param sysBank 实体对象
96
+     * @return
97
+     */
98
+    @RequestMapping(value="/sysBank/{id}",method= RequestMethod.PUT)
99
+    @ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
100
+    public ResponseBean sysBankUpdate(@ApiParam("对象ID") @PathVariable Integer id,
101
+                                        @ApiParam("更新内容") @RequestBody SysBank sysBank) throws Exception{
102
+
103
+        if (iSysBankService.updateById(sysBank)){
104
+            return ResponseBean.success(iSysBankService.getById(id));
105
+        }else {
106
+            return ResponseBean.error("修改失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
107
+        }
108
+    }
109
+
110
+    /**
111
+     * 根据id查询对象
112
+     * @param id  实体ID
113
+     */
114
+    @RequestMapping(value="/sysBank/{id}",method= RequestMethod.GET)
115
+    @ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
116
+    public ResponseBean sysBankGet(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
117
+        return ResponseBean.success(iSysBankService.getById(id));
118
+    }
119
+}

+ 119
- 0
src/main/java/com/njyunzhi/invoice/controller/SysOrgController.java 查看文件

@@ -0,0 +1,119 @@
1
+package com.njyunzhi.invoice.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.invoice.common.BaseController;
7
+import com.njyunzhi.invoice.common.ResponseBean;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import io.swagger.annotations.ApiParam;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PathVariable;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import com.njyunzhi.invoice.service.ISysOrgService;
20
+import com.njyunzhi.invoice.entity.SysOrg;
21
+import org.springframework.web.bind.annotation.RestController;
22
+
23
+/**
24
+ * <p>
25
+    * 单位表 前端控制器
26
+    * </p>
27
+ *
28
+ * @author yansen
29
+ * @since 2022-07-04
30
+ */
31
+
32
+@Api(tags = "单位表")
33
+@RestController
34
+@RequestMapping("/")
35
+public class SysOrgController extends BaseController {
36
+
37
+    private final Logger logger = LoggerFactory.getLogger(SysOrgController.class);
38
+
39
+    @Autowired
40
+    public ISysOrgService iSysOrgService;
41
+
42
+
43
+    /**
44
+     * 分页查询列表
45
+     * @param pageNum
46
+     * @param pageSize
47
+     * @return
48
+     */
49
+    @RequestMapping(value="/sysOrg",method= RequestMethod.GET)
50
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
51
+    public ResponseBean sysOrgList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+									 @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
53
+
54
+		    IPage<SysOrg> pg = new Page<>(pageNum, pageSize);
55
+            QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<>();
56
+            queryWrapper.orderByDesc("create_date");
57
+
58
+            IPage<SysOrg> result = iSysOrgService.page(pg, queryWrapper);
59
+            return ResponseBean.success(result);
60
+    }
61
+
62
+    /**
63
+     * 保存对象
64
+     * @param sysOrg 实体对象
65
+     * @return
66
+     */
67
+    @RequestMapping(value="/sysOrg",method= RequestMethod.POST)
68
+    @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
69
+    public ResponseBean sysOrgAdd(@ApiParam("保存内容") @RequestBody SysOrg sysOrg) throws Exception{
70
+
71
+        if (iSysOrgService.save(sysOrg)){
72
+            return ResponseBean.success(sysOrg);
73
+        }else {
74
+            return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
75
+        }
76
+    }
77
+
78
+    /**
79
+     * 根据id删除对象
80
+     * @param id  实体ID
81
+     */
82
+    @RequestMapping(value="/sysOrg/{id}", method= RequestMethod.DELETE)
83
+    @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
84
+    public ResponseBean sysOrgDelete(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
85
+        if(iSysOrgService.removeById(id)){
86
+            return ResponseBean.success("success");
87
+        }else {
88
+            return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
89
+        }
90
+    }
91
+
92
+    /**
93
+     * 修改对象
94
+     * @param id  实体ID
95
+     * @param sysOrg 实体对象
96
+     * @return
97
+     */
98
+    @RequestMapping(value="/sysOrg/{id}",method= RequestMethod.PUT)
99
+    @ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
100
+    public ResponseBean sysOrgUpdate(@ApiParam("对象ID") @PathVariable Integer id,
101
+                                        @ApiParam("更新内容") @RequestBody SysOrg sysOrg) throws Exception{
102
+
103
+        if (iSysOrgService.updateById(sysOrg)){
104
+            return ResponseBean.success(iSysOrgService.getById(id));
105
+        }else {
106
+            return ResponseBean.error("修改失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
107
+        }
108
+    }
109
+
110
+    /**
111
+     * 根据id查询对象
112
+     * @param id  实体ID
113
+     */
114
+    @RequestMapping(value="/sysOrg/{id}",method= RequestMethod.GET)
115
+    @ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
116
+    public ResponseBean sysOrgGet(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
117
+        return ResponseBean.success(iSysOrgService.getById(id));
118
+    }
119
+}

+ 119
- 0
src/main/java/com/njyunzhi/invoice/controller/SysUserController.java 查看文件

@@ -0,0 +1,119 @@
1
+package com.njyunzhi.invoice.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.invoice.common.BaseController;
7
+import com.njyunzhi.invoice.common.ResponseBean;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import io.swagger.annotations.ApiParam;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PathVariable;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import com.njyunzhi.invoice.service.ISysUserService;
20
+import com.njyunzhi.invoice.entity.SysUser;
21
+import org.springframework.web.bind.annotation.RestController;
22
+
23
+/**
24
+ * <p>
25
+    * 系统用户 前端控制器
26
+    * </p>
27
+ *
28
+ * @author yansen
29
+ * @since 2022-07-04
30
+ */
31
+
32
+@Api(tags = "系统用户")
33
+@RestController
34
+@RequestMapping("/")
35
+public class SysUserController extends BaseController {
36
+
37
+    private final Logger logger = LoggerFactory.getLogger(SysUserController.class);
38
+
39
+    @Autowired
40
+    public ISysUserService iSysUserService;
41
+
42
+
43
+    /**
44
+     * 分页查询列表
45
+     * @param pageNum
46
+     * @param pageSize
47
+     * @return
48
+     */
49
+    @RequestMapping(value="/sysUser",method= RequestMethod.GET)
50
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
51
+    public ResponseBean sysUserList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+									 @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
53
+
54
+		    IPage<SysUser> pg = new Page<>(pageNum, pageSize);
55
+            QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
56
+            queryWrapper.orderByDesc("create_date");
57
+
58
+            IPage<SysUser> result = iSysUserService.page(pg, queryWrapper);
59
+            return ResponseBean.success(result);
60
+    }
61
+
62
+    /**
63
+     * 保存对象
64
+     * @param sysUser 实体对象
65
+     * @return
66
+     */
67
+    @RequestMapping(value="/sysUser",method= RequestMethod.POST)
68
+    @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
69
+    public ResponseBean sysUserAdd(@ApiParam("保存内容") @RequestBody SysUser sysUser) throws Exception{
70
+
71
+        if (iSysUserService.save(sysUser)){
72
+            return ResponseBean.success(sysUser);
73
+        }else {
74
+            return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
75
+        }
76
+    }
77
+
78
+    /**
79
+     * 根据id删除对象
80
+     * @param id  实体ID
81
+     */
82
+    @RequestMapping(value="/sysUser/{id}", method= RequestMethod.DELETE)
83
+    @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
84
+    public ResponseBean sysUserDelete(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
85
+        if(iSysUserService.removeById(id)){
86
+            return ResponseBean.success("success");
87
+        }else {
88
+            return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
89
+        }
90
+    }
91
+
92
+    /**
93
+     * 修改对象
94
+     * @param id  实体ID
95
+     * @param sysUser 实体对象
96
+     * @return
97
+     */
98
+    @RequestMapping(value="/sysUser/{id}",method= RequestMethod.PUT)
99
+    @ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
100
+    public ResponseBean sysUserUpdate(@ApiParam("对象ID") @PathVariable Integer id,
101
+                                        @ApiParam("更新内容") @RequestBody SysUser sysUser) throws Exception{
102
+
103
+        if (iSysUserService.updateById(sysUser)){
104
+            return ResponseBean.success(iSysUserService.getById(id));
105
+        }else {
106
+            return ResponseBean.error("修改失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
107
+        }
108
+    }
109
+
110
+    /**
111
+     * 根据id查询对象
112
+     * @param id  实体ID
113
+     */
114
+    @RequestMapping(value="/sysUser/{id}",method= RequestMethod.GET)
115
+    @ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
116
+    public ResponseBean sysUserGet(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
117
+        return ResponseBean.success(iSysUserService.getById(id));
118
+    }
119
+}

+ 119
- 0
src/main/java/com/njyunzhi/invoice/controller/TaInvoiceDetailController.java 查看文件

@@ -0,0 +1,119 @@
1
+package com.njyunzhi.invoice.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.invoice.common.BaseController;
7
+import com.njyunzhi.invoice.common.ResponseBean;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import io.swagger.annotations.ApiParam;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PathVariable;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import com.njyunzhi.invoice.service.ITaInvoiceDetailService;
20
+import com.njyunzhi.invoice.entity.TaInvoiceDetail;
21
+import org.springframework.web.bind.annotation.RestController;
22
+
23
+/**
24
+ * <p>
25
+    * 报销明细 前端控制器
26
+    * </p>
27
+ *
28
+ * @author yansen
29
+ * @since 2022-07-04
30
+ */
31
+
32
+@Api(tags = "报销明细")
33
+@RestController
34
+@RequestMapping("/")
35
+public class TaInvoiceDetailController extends BaseController {
36
+
37
+    private final Logger logger = LoggerFactory.getLogger(TaInvoiceDetailController.class);
38
+
39
+    @Autowired
40
+    public ITaInvoiceDetailService iTaInvoiceDetailService;
41
+
42
+
43
+    /**
44
+     * 分页查询列表
45
+     * @param pageNum
46
+     * @param pageSize
47
+     * @return
48
+     */
49
+    @RequestMapping(value="/taInvoiceDetail",method= RequestMethod.GET)
50
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
51
+    public ResponseBean taInvoiceDetailList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+									 @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
53
+
54
+		    IPage<TaInvoiceDetail> pg = new Page<>(pageNum, pageSize);
55
+            QueryWrapper<TaInvoiceDetail> queryWrapper = new QueryWrapper<>();
56
+            queryWrapper.orderByDesc("create_date");
57
+
58
+            IPage<TaInvoiceDetail> result = iTaInvoiceDetailService.page(pg, queryWrapper);
59
+            return ResponseBean.success(result);
60
+    }
61
+
62
+    /**
63
+     * 保存对象
64
+     * @param taInvoiceDetail 实体对象
65
+     * @return
66
+     */
67
+    @RequestMapping(value="/taInvoiceDetail",method= RequestMethod.POST)
68
+    @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
69
+    public ResponseBean taInvoiceDetailAdd(@ApiParam("保存内容") @RequestBody TaInvoiceDetail taInvoiceDetail) throws Exception{
70
+
71
+        if (iTaInvoiceDetailService.save(taInvoiceDetail)){
72
+            return ResponseBean.success(taInvoiceDetail);
73
+        }else {
74
+            return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
75
+        }
76
+    }
77
+
78
+    /**
79
+     * 根据id删除对象
80
+     * @param id  实体ID
81
+     */
82
+    @RequestMapping(value="/taInvoiceDetail/{id}", method= RequestMethod.DELETE)
83
+    @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
84
+    public ResponseBean taInvoiceDetailDelete(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
85
+        if(iTaInvoiceDetailService.removeById(id)){
86
+            return ResponseBean.success("success");
87
+        }else {
88
+            return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
89
+        }
90
+    }
91
+
92
+    /**
93
+     * 修改对象
94
+     * @param id  实体ID
95
+     * @param taInvoiceDetail 实体对象
96
+     * @return
97
+     */
98
+    @RequestMapping(value="/taInvoiceDetail/{id}",method= RequestMethod.PUT)
99
+    @ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
100
+    public ResponseBean taInvoiceDetailUpdate(@ApiParam("对象ID") @PathVariable Integer id,
101
+                                        @ApiParam("更新内容") @RequestBody TaInvoiceDetail taInvoiceDetail) throws Exception{
102
+
103
+        if (iTaInvoiceDetailService.updateById(taInvoiceDetail)){
104
+            return ResponseBean.success(iTaInvoiceDetailService.getById(id));
105
+        }else {
106
+            return ResponseBean.error("修改失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
107
+        }
108
+    }
109
+
110
+    /**
111
+     * 根据id查询对象
112
+     * @param id  实体ID
113
+     */
114
+    @RequestMapping(value="/taInvoiceDetail/{id}",method= RequestMethod.GET)
115
+    @ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
116
+    public ResponseBean taInvoiceDetailGet(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
117
+        return ResponseBean.success(iTaInvoiceDetailService.getById(id));
118
+    }
119
+}

+ 119
- 0
src/main/java/com/njyunzhi/invoice/controller/TaInvoiceFillController.java 查看文件

@@ -0,0 +1,119 @@
1
+package com.njyunzhi.invoice.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.invoice.common.BaseController;
7
+import com.njyunzhi.invoice.common.ResponseBean;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import io.swagger.annotations.ApiParam;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PathVariable;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import com.njyunzhi.invoice.service.ITaInvoiceFillService;
20
+import com.njyunzhi.invoice.entity.TaInvoiceFill;
21
+import org.springframework.web.bind.annotation.RestController;
22
+
23
+/**
24
+ * <p>
25
+    * 报销主表 前端控制器
26
+    * </p>
27
+ *
28
+ * @author yansen
29
+ * @since 2022-07-04
30
+ */
31
+
32
+@Api(tags = "报销主表")
33
+@RestController
34
+@RequestMapping("/")
35
+public class TaInvoiceFillController extends BaseController {
36
+
37
+    private final Logger logger = LoggerFactory.getLogger(TaInvoiceFillController.class);
38
+
39
+    @Autowired
40
+    public ITaInvoiceFillService iTaInvoiceFillService;
41
+
42
+
43
+    /**
44
+     * 分页查询列表
45
+     * @param pageNum
46
+     * @param pageSize
47
+     * @return
48
+     */
49
+    @RequestMapping(value="/taInvoiceFill",method= RequestMethod.GET)
50
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
51
+    public ResponseBean taInvoiceFillList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+									 @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
53
+
54
+		    IPage<TaInvoiceFill> pg = new Page<>(pageNum, pageSize);
55
+            QueryWrapper<TaInvoiceFill> queryWrapper = new QueryWrapper<>();
56
+            queryWrapper.orderByDesc("create_date");
57
+
58
+            IPage<TaInvoiceFill> result = iTaInvoiceFillService.page(pg, queryWrapper);
59
+            return ResponseBean.success(result);
60
+    }
61
+
62
+    /**
63
+     * 保存对象
64
+     * @param taInvoiceFill 实体对象
65
+     * @return
66
+     */
67
+    @RequestMapping(value="/taInvoiceFill",method= RequestMethod.POST)
68
+    @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
69
+    public ResponseBean taInvoiceFillAdd(@ApiParam("保存内容") @RequestBody TaInvoiceFill taInvoiceFill) throws Exception{
70
+
71
+        if (iTaInvoiceFillService.save(taInvoiceFill)){
72
+            return ResponseBean.success(taInvoiceFill);
73
+        }else {
74
+            return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
75
+        }
76
+    }
77
+
78
+    /**
79
+     * 根据id删除对象
80
+     * @param id  实体ID
81
+     */
82
+    @RequestMapping(value="/taInvoiceFill/{id}", method= RequestMethod.DELETE)
83
+    @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
84
+    public ResponseBean taInvoiceFillDelete(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
85
+        if(iTaInvoiceFillService.removeById(id)){
86
+            return ResponseBean.success("success");
87
+        }else {
88
+            return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
89
+        }
90
+    }
91
+
92
+    /**
93
+     * 修改对象
94
+     * @param id  实体ID
95
+     * @param taInvoiceFill 实体对象
96
+     * @return
97
+     */
98
+    @RequestMapping(value="/taInvoiceFill/{id}",method= RequestMethod.PUT)
99
+    @ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
100
+    public ResponseBean taInvoiceFillUpdate(@ApiParam("对象ID") @PathVariable Integer id,
101
+                                        @ApiParam("更新内容") @RequestBody TaInvoiceFill taInvoiceFill) throws Exception{
102
+
103
+        if (iTaInvoiceFillService.updateById(taInvoiceFill)){
104
+            return ResponseBean.success(iTaInvoiceFillService.getById(id));
105
+        }else {
106
+            return ResponseBean.error("修改失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
107
+        }
108
+    }
109
+
110
+    /**
111
+     * 根据id查询对象
112
+     * @param id  实体ID
113
+     */
114
+    @RequestMapping(value="/taInvoiceFill/{id}",method= RequestMethod.GET)
115
+    @ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
116
+    public ResponseBean taInvoiceFillGet(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
117
+        return ResponseBean.success(iTaInvoiceFillService.getById(id));
118
+    }
119
+}

+ 119
- 0
src/main/java/com/njyunzhi/invoice/controller/TaInvoiceItemTplController.java 查看文件

@@ -0,0 +1,119 @@
1
+package com.njyunzhi.invoice.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.invoice.common.BaseController;
7
+import com.njyunzhi.invoice.common.ResponseBean;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import io.swagger.annotations.ApiParam;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PathVariable;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import com.njyunzhi.invoice.service.ITaInvoiceItemTplService;
20
+import com.njyunzhi.invoice.entity.TaInvoiceItemTpl;
21
+import org.springframework.web.bind.annotation.RestController;
22
+
23
+/**
24
+ * <p>
25
+    * 报销项目模板 前端控制器
26
+    * </p>
27
+ *
28
+ * @author yansen
29
+ * @since 2022-07-04
30
+ */
31
+
32
+@Api(tags = "报销项目模板")
33
+@RestController
34
+@RequestMapping("/")
35
+public class TaInvoiceItemTplController extends BaseController {
36
+
37
+    private final Logger logger = LoggerFactory.getLogger(TaInvoiceItemTplController.class);
38
+
39
+    @Autowired
40
+    public ITaInvoiceItemTplService iTaInvoiceItemTplService;
41
+
42
+
43
+    /**
44
+     * 分页查询列表
45
+     * @param pageNum
46
+     * @param pageSize
47
+     * @return
48
+     */
49
+    @RequestMapping(value="/taInvoiceItemTpl",method= RequestMethod.GET)
50
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
51
+    public ResponseBean taInvoiceItemTplList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+									 @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
53
+
54
+		    IPage<TaInvoiceItemTpl> pg = new Page<>(pageNum, pageSize);
55
+            QueryWrapper<TaInvoiceItemTpl> queryWrapper = new QueryWrapper<>();
56
+            queryWrapper.orderByDesc("create_date");
57
+
58
+            IPage<TaInvoiceItemTpl> result = iTaInvoiceItemTplService.page(pg, queryWrapper);
59
+            return ResponseBean.success(result);
60
+    }
61
+
62
+    /**
63
+     * 保存对象
64
+     * @param taInvoiceItemTpl 实体对象
65
+     * @return
66
+     */
67
+    @RequestMapping(value="/taInvoiceItemTpl",method= RequestMethod.POST)
68
+    @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
69
+    public ResponseBean taInvoiceItemTplAdd(@ApiParam("保存内容") @RequestBody TaInvoiceItemTpl taInvoiceItemTpl) throws Exception{
70
+
71
+        if (iTaInvoiceItemTplService.save(taInvoiceItemTpl)){
72
+            return ResponseBean.success(taInvoiceItemTpl);
73
+        }else {
74
+            return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
75
+        }
76
+    }
77
+
78
+    /**
79
+     * 根据id删除对象
80
+     * @param id  实体ID
81
+     */
82
+    @RequestMapping(value="/taInvoiceItemTpl/{id}", method= RequestMethod.DELETE)
83
+    @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
84
+    public ResponseBean taInvoiceItemTplDelete(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
85
+        if(iTaInvoiceItemTplService.removeById(id)){
86
+            return ResponseBean.success("success");
87
+        }else {
88
+            return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
89
+        }
90
+    }
91
+
92
+    /**
93
+     * 修改对象
94
+     * @param id  实体ID
95
+     * @param taInvoiceItemTpl 实体对象
96
+     * @return
97
+     */
98
+    @RequestMapping(value="/taInvoiceItemTpl/{id}",method= RequestMethod.PUT)
99
+    @ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
100
+    public ResponseBean taInvoiceItemTplUpdate(@ApiParam("对象ID") @PathVariable Integer id,
101
+                                        @ApiParam("更新内容") @RequestBody TaInvoiceItemTpl taInvoiceItemTpl) throws Exception{
102
+
103
+        if (iTaInvoiceItemTplService.updateById(taInvoiceItemTpl)){
104
+            return ResponseBean.success(iTaInvoiceItemTplService.getById(id));
105
+        }else {
106
+            return ResponseBean.error("修改失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
107
+        }
108
+    }
109
+
110
+    /**
111
+     * 根据id查询对象
112
+     * @param id  实体ID
113
+     */
114
+    @RequestMapping(value="/taInvoiceItemTpl/{id}",method= RequestMethod.GET)
115
+    @ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
116
+    public ResponseBean taInvoiceItemTplGet(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
117
+        return ResponseBean.success(iTaInvoiceItemTplService.getById(id));
118
+    }
119
+}

+ 119
- 0
src/main/java/com/njyunzhi/invoice/controller/TaInvoiceOrgController.java 查看文件

@@ -0,0 +1,119 @@
1
+package com.njyunzhi.invoice.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.invoice.common.BaseController;
7
+import com.njyunzhi.invoice.common.ResponseBean;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import io.swagger.annotations.ApiParam;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PathVariable;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import com.njyunzhi.invoice.service.ITaInvoiceOrgService;
20
+import com.njyunzhi.invoice.entity.TaInvoiceOrg;
21
+import org.springframework.web.bind.annotation.RestController;
22
+
23
+/**
24
+ * <p>
25
+    * 报销单位 前端控制器
26
+    * </p>
27
+ *
28
+ * @author yansen
29
+ * @since 2022-07-04
30
+ */
31
+
32
+@Api(tags = "报销单位")
33
+@RestController
34
+@RequestMapping("/")
35
+public class TaInvoiceOrgController extends BaseController {
36
+
37
+    private final Logger logger = LoggerFactory.getLogger(TaInvoiceOrgController.class);
38
+
39
+    @Autowired
40
+    public ITaInvoiceOrgService iTaInvoiceOrgService;
41
+
42
+
43
+    /**
44
+     * 分页查询列表
45
+     * @param pageNum
46
+     * @param pageSize
47
+     * @return
48
+     */
49
+    @RequestMapping(value="/taInvoiceOrg",method= RequestMethod.GET)
50
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
51
+    public ResponseBean taInvoiceOrgList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+									 @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
53
+
54
+		    IPage<TaInvoiceOrg> pg = new Page<>(pageNum, pageSize);
55
+            QueryWrapper<TaInvoiceOrg> queryWrapper = new QueryWrapper<>();
56
+            queryWrapper.orderByDesc("create_date");
57
+
58
+            IPage<TaInvoiceOrg> result = iTaInvoiceOrgService.page(pg, queryWrapper);
59
+            return ResponseBean.success(result);
60
+    }
61
+
62
+    /**
63
+     * 保存对象
64
+     * @param taInvoiceOrg 实体对象
65
+     * @return
66
+     */
67
+    @RequestMapping(value="/taInvoiceOrg",method= RequestMethod.POST)
68
+    @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
69
+    public ResponseBean taInvoiceOrgAdd(@ApiParam("保存内容") @RequestBody TaInvoiceOrg taInvoiceOrg) throws Exception{
70
+
71
+        if (iTaInvoiceOrgService.save(taInvoiceOrg)){
72
+            return ResponseBean.success(taInvoiceOrg);
73
+        }else {
74
+            return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
75
+        }
76
+    }
77
+
78
+    /**
79
+     * 根据id删除对象
80
+     * @param id  实体ID
81
+     */
82
+    @RequestMapping(value="/taInvoiceOrg/{id}", method= RequestMethod.DELETE)
83
+    @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
84
+    public ResponseBean taInvoiceOrgDelete(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
85
+        if(iTaInvoiceOrgService.removeById(id)){
86
+            return ResponseBean.success("success");
87
+        }else {
88
+            return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
89
+        }
90
+    }
91
+
92
+    /**
93
+     * 修改对象
94
+     * @param id  实体ID
95
+     * @param taInvoiceOrg 实体对象
96
+     * @return
97
+     */
98
+    @RequestMapping(value="/taInvoiceOrg/{id}",method= RequestMethod.PUT)
99
+    @ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
100
+    public ResponseBean taInvoiceOrgUpdate(@ApiParam("对象ID") @PathVariable Integer id,
101
+                                        @ApiParam("更新内容") @RequestBody TaInvoiceOrg taInvoiceOrg) throws Exception{
102
+
103
+        if (iTaInvoiceOrgService.updateById(taInvoiceOrg)){
104
+            return ResponseBean.success(iTaInvoiceOrgService.getById(id));
105
+        }else {
106
+            return ResponseBean.error("修改失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
107
+        }
108
+    }
109
+
110
+    /**
111
+     * 根据id查询对象
112
+     * @param id  实体ID
113
+     */
114
+    @RequestMapping(value="/taInvoiceOrg/{id}",method= RequestMethod.GET)
115
+    @ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
116
+    public ResponseBean taInvoiceOrgGet(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
117
+        return ResponseBean.success(iTaInvoiceOrgService.getById(id));
118
+    }
119
+}

+ 119
- 0
src/main/java/com/njyunzhi/invoice/controller/TaInvoicePersonController.java 查看文件

@@ -0,0 +1,119 @@
1
+package com.njyunzhi.invoice.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.invoice.common.BaseController;
7
+import com.njyunzhi.invoice.common.ResponseBean;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import io.swagger.annotations.ApiParam;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PathVariable;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import com.njyunzhi.invoice.service.ITaInvoicePersonService;
20
+import com.njyunzhi.invoice.entity.TaInvoicePerson;
21
+import org.springframework.web.bind.annotation.RestController;
22
+
23
+/**
24
+ * <p>
25
+    * 报销人员 前端控制器
26
+    * </p>
27
+ *
28
+ * @author yansen
29
+ * @since 2022-07-04
30
+ */
31
+
32
+@Api(tags = "报销人员")
33
+@RestController
34
+@RequestMapping("/")
35
+public class TaInvoicePersonController extends BaseController {
36
+
37
+    private final Logger logger = LoggerFactory.getLogger(TaInvoicePersonController.class);
38
+
39
+    @Autowired
40
+    public ITaInvoicePersonService iTaInvoicePersonService;
41
+
42
+
43
+    /**
44
+     * 分页查询列表
45
+     * @param pageNum
46
+     * @param pageSize
47
+     * @return
48
+     */
49
+    @RequestMapping(value="/taInvoicePerson",method= RequestMethod.GET)
50
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
51
+    public ResponseBean taInvoicePersonList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+									 @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
53
+
54
+		    IPage<TaInvoicePerson> pg = new Page<>(pageNum, pageSize);
55
+            QueryWrapper<TaInvoicePerson> queryWrapper = new QueryWrapper<>();
56
+            queryWrapper.orderByDesc("create_date");
57
+
58
+            IPage<TaInvoicePerson> result = iTaInvoicePersonService.page(pg, queryWrapper);
59
+            return ResponseBean.success(result);
60
+    }
61
+
62
+    /**
63
+     * 保存对象
64
+     * @param taInvoicePerson 实体对象
65
+     * @return
66
+     */
67
+    @RequestMapping(value="/taInvoicePerson",method= RequestMethod.POST)
68
+    @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
69
+    public ResponseBean taInvoicePersonAdd(@ApiParam("保存内容") @RequestBody TaInvoicePerson taInvoicePerson) throws Exception{
70
+
71
+        if (iTaInvoicePersonService.save(taInvoicePerson)){
72
+            return ResponseBean.success(taInvoicePerson);
73
+        }else {
74
+            return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
75
+        }
76
+    }
77
+
78
+    /**
79
+     * 根据id删除对象
80
+     * @param id  实体ID
81
+     */
82
+    @RequestMapping(value="/taInvoicePerson/{id}", method= RequestMethod.DELETE)
83
+    @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
84
+    public ResponseBean taInvoicePersonDelete(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
85
+        if(iTaInvoicePersonService.removeById(id)){
86
+            return ResponseBean.success("success");
87
+        }else {
88
+            return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
89
+        }
90
+    }
91
+
92
+    /**
93
+     * 修改对象
94
+     * @param id  实体ID
95
+     * @param taInvoicePerson 实体对象
96
+     * @return
97
+     */
98
+    @RequestMapping(value="/taInvoicePerson/{id}",method= RequestMethod.PUT)
99
+    @ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
100
+    public ResponseBean taInvoicePersonUpdate(@ApiParam("对象ID") @PathVariable Integer id,
101
+                                        @ApiParam("更新内容") @RequestBody TaInvoicePerson taInvoicePerson) throws Exception{
102
+
103
+        if (iTaInvoicePersonService.updateById(taInvoicePerson)){
104
+            return ResponseBean.success(iTaInvoicePersonService.getById(id));
105
+        }else {
106
+            return ResponseBean.error("修改失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
107
+        }
108
+    }
109
+
110
+    /**
111
+     * 根据id查询对象
112
+     * @param id  实体ID
113
+     */
114
+    @RequestMapping(value="/taInvoicePerson/{id}",method= RequestMethod.GET)
115
+    @ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
116
+    public ResponseBean taInvoicePersonGet(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
117
+        return ResponseBean.success(iTaInvoicePersonService.getById(id));
118
+    }
119
+}

+ 119
- 0
src/main/java/com/njyunzhi/invoice/controller/TaPersonController.java 查看文件

@@ -0,0 +1,119 @@
1
+package com.njyunzhi.invoice.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.invoice.common.BaseController;
7
+import com.njyunzhi.invoice.common.ResponseBean;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiOperation;
10
+import io.swagger.annotations.ApiParam;
11
+import org.slf4j.Logger;
12
+import org.slf4j.LoggerFactory;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PathVariable;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RequestMethod;
18
+import org.springframework.web.bind.annotation.RequestParam;
19
+import com.njyunzhi.invoice.service.ITaPersonService;
20
+import com.njyunzhi.invoice.entity.TaPerson;
21
+import org.springframework.web.bind.annotation.RestController;
22
+
23
+/**
24
+ * <p>
25
+    * 报销人 前端控制器
26
+    * </p>
27
+ *
28
+ * @author yansen
29
+ * @since 2022-07-04
30
+ */
31
+
32
+@Api(tags = "报销人")
33
+@RestController
34
+@RequestMapping("/")
35
+public class TaPersonController extends BaseController {
36
+
37
+    private final Logger logger = LoggerFactory.getLogger(TaPersonController.class);
38
+
39
+    @Autowired
40
+    public ITaPersonService iTaPersonService;
41
+
42
+
43
+    /**
44
+     * 分页查询列表
45
+     * @param pageNum
46
+     * @param pageSize
47
+     * @return
48
+     */
49
+    @RequestMapping(value="/taPerson",method= RequestMethod.GET)
50
+    @ApiOperation(value="列表", notes = "列表", httpMethod = "GET", response = ResponseBean.class)
51
+    public ResponseBean taPersonList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+									 @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
53
+
54
+		    IPage<TaPerson> pg = new Page<>(pageNum, pageSize);
55
+            QueryWrapper<TaPerson> queryWrapper = new QueryWrapper<>();
56
+            queryWrapper.orderByDesc("create_date");
57
+
58
+            IPage<TaPerson> result = iTaPersonService.page(pg, queryWrapper);
59
+            return ResponseBean.success(result);
60
+    }
61
+
62
+    /**
63
+     * 保存对象
64
+     * @param taPerson 实体对象
65
+     * @return
66
+     */
67
+    @RequestMapping(value="/taPerson",method= RequestMethod.POST)
68
+    @ApiOperation(value="保存", notes = "保存", httpMethod = "POST", response = ResponseBean.class)
69
+    public ResponseBean taPersonAdd(@ApiParam("保存内容") @RequestBody TaPerson taPerson) throws Exception{
70
+
71
+        if (iTaPersonService.save(taPerson)){
72
+            return ResponseBean.success(taPerson);
73
+        }else {
74
+            return ResponseBean.error("保存失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
75
+        }
76
+    }
77
+
78
+    /**
79
+     * 根据id删除对象
80
+     * @param id  实体ID
81
+     */
82
+    @RequestMapping(value="/taPerson/{id}", method= RequestMethod.DELETE)
83
+    @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
84
+    public ResponseBean taPersonDelete(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
85
+        if(iTaPersonService.removeById(id)){
86
+            return ResponseBean.success("success");
87
+        }else {
88
+            return ResponseBean.error("删除失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
89
+        }
90
+    }
91
+
92
+    /**
93
+     * 修改对象
94
+     * @param id  实体ID
95
+     * @param taPerson 实体对象
96
+     * @return
97
+     */
98
+    @RequestMapping(value="/taPerson/{id}",method= RequestMethod.PUT)
99
+    @ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
100
+    public ResponseBean taPersonUpdate(@ApiParam("对象ID") @PathVariable Integer id,
101
+                                        @ApiParam("更新内容") @RequestBody TaPerson taPerson) throws Exception{
102
+
103
+        if (iTaPersonService.updateById(taPerson)){
104
+            return ResponseBean.success(iTaPersonService.getById(id));
105
+        }else {
106
+            return ResponseBean.error("修改失败, 请重试", ResponseBean.ERROR_UNAVAILABLE);
107
+        }
108
+    }
109
+
110
+    /**
111
+     * 根据id查询对象
112
+     * @param id  实体ID
113
+     */
114
+    @RequestMapping(value="/taPerson/{id}",method= RequestMethod.GET)
115
+    @ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
116
+    public ResponseBean taPersonGet(@ApiParam("对象ID") @PathVariable Integer id) throws Exception{
117
+        return ResponseBean.success(iTaPersonService.getById(id));
118
+    }
119
+}

+ 46
- 0
src/main/java/com/njyunzhi/invoice/entity/SysBank.java 查看文件

@@ -0,0 +1,46 @@
1
+package com.njyunzhi.invoice.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import java.time.LocalDateTime;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import java.io.Serializable;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 开户行
16
+ * </p>
17
+ *
18
+ * @author yansen
19
+ * @since 2022-07-04
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@ApiModel(value="SysBank对象", description="开户行")
25
+public class SysBank implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    @ApiModelProperty(value = "银行ID")
30
+    @TableId(value = "bank_id", type = IdType.INPUT)
31
+    private String bankId;
32
+
33
+    @ApiModelProperty(value = "名称")
34
+    private String name;
35
+
36
+    @ApiModelProperty(value = "账号")
37
+    private String cardNo;
38
+
39
+    @ApiModelProperty(value = "状态")
40
+    private Integer status;
41
+
42
+    @ApiModelProperty(value = "创建日期")
43
+    private LocalDateTime createDate;
44
+
45
+
46
+}

+ 52
- 0
src/main/java/com/njyunzhi/invoice/entity/SysOrg.java 查看文件

@@ -0,0 +1,52 @@
1
+package com.njyunzhi.invoice.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import java.time.LocalDateTime;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import java.io.Serializable;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 单位表
16
+ * </p>
17
+ *
18
+ * @author yansen
19
+ * @since 2022-07-04
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@ApiModel(value="SysOrg对象", description="单位表")
25
+public class SysOrg implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    @ApiModelProperty(value = "企业ID")
30
+    @TableId(value = "org_id", type = IdType.INPUT)
31
+    private String orgId;
32
+
33
+    @ApiModelProperty(value = "名称")
34
+    private String name;
35
+
36
+    @ApiModelProperty(value = "税号")
37
+    private String taxNo;
38
+
39
+    @ApiModelProperty(value = "地址")
40
+    private String address;
41
+
42
+    @ApiModelProperty(value = "电话")
43
+    private String phone;
44
+
45
+    @ApiModelProperty(value = "状态")
46
+    private Integer status;
47
+
48
+    @ApiModelProperty(value = "创建日期")
49
+    private LocalDateTime createDate;
50
+
51
+
52
+}

+ 49
- 0
src/main/java/com/njyunzhi/invoice/entity/SysUser.java 查看文件

@@ -0,0 +1,49 @@
1
+package com.njyunzhi.invoice.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import java.time.LocalDateTime;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import java.io.Serializable;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 系统用户
16
+ * </p>
17
+ *
18
+ * @author yansen
19
+ * @since 2022-07-04
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@ApiModel(value="SysUser对象", description="系统用户")
25
+public class SysUser implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    @ApiModelProperty(value = "用户ID")
30
+    @TableId(value = "user_id", type = IdType.INPUT)
31
+    private String userId;
32
+
33
+    @ApiModelProperty(value = "名称")
34
+    private String name;
35
+
36
+    @ApiModelProperty(value = "登录ID")
37
+    private String loginId;
38
+
39
+    @ApiModelProperty(value = "登录密码")
40
+    private String password;
41
+
42
+    @ApiModelProperty(value = "状态")
43
+    private Integer status;
44
+
45
+    @ApiModelProperty(value = "创建日期")
46
+    private LocalDateTime createDate;
47
+
48
+
49
+}

+ 94
- 0
src/main/java/com/njyunzhi/invoice/entity/TaInvoiceDetail.java 查看文件

@@ -0,0 +1,94 @@
1
+package com.njyunzhi.invoice.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import java.time.LocalDateTime;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import java.io.Serializable;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 报销明细
16
+ * </p>
17
+ *
18
+ * @author yansen
19
+ * @since 2022-07-04
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@ApiModel(value="TaInvoiceDetail对象", description="报销明细")
25
+public class TaInvoiceDetail implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    @ApiModelProperty(value = "明细ID")
30
+    @TableId(value = "detail_id", type = IdType.INPUT)
31
+    private String detailId;
32
+
33
+    @ApiModelProperty(value = "报销ID")
34
+    private String invoiceId;
35
+
36
+    @ApiModelProperty(value = "人员ID")
37
+    private String invoicePersonId;
38
+
39
+    @ApiModelProperty(value = "映射人员ID")
40
+    private String personId;
41
+
42
+    @ApiModelProperty(value = "人员名称")
43
+    private String personName;
44
+
45
+    @ApiModelProperty(value = "开票单位ID")
46
+    private String invoiceOrgId;
47
+
48
+    @ApiModelProperty(value = "开票单位ID")
49
+    private String orgId;
50
+
51
+    @ApiModelProperty(value = "单位名称")
52
+    private String orgName;
53
+
54
+    @ApiModelProperty(value = "税号")
55
+    private String taxNo;
56
+
57
+    @ApiModelProperty(value = "地址")
58
+    private String address;
59
+
60
+    @ApiModelProperty(value = "电话")
61
+    private String phone;
62
+
63
+    @ApiModelProperty(value = "银行ID")
64
+    private String bankId;
65
+
66
+    @ApiModelProperty(value = "银行名称")
67
+    private String bankName;
68
+
69
+    @ApiModelProperty(value = "开户行账号")
70
+    private String cardNo;
71
+
72
+    @ApiModelProperty(value = "报销项目ID")
73
+    private Integer invoiceItemTplId;
74
+
75
+    @ApiModelProperty(value = "报销项目")
76
+    private String itemName;
77
+
78
+    @ApiModelProperty(value = "开票金额")
79
+    private String charge;
80
+
81
+    @ApiModelProperty(value = "合开备注")
82
+    private String mergeRemark;
83
+
84
+    @ApiModelProperty(value = "住宿清单")
85
+    private String stayRemark;
86
+
87
+    @ApiModelProperty(value = "状态")
88
+    private Integer status;
89
+
90
+    @ApiModelProperty(value = "创建日期")
91
+    private LocalDateTime createDate;
92
+
93
+
94
+}

+ 46
- 0
src/main/java/com/njyunzhi/invoice/entity/TaInvoiceFill.java 查看文件

@@ -0,0 +1,46 @@
1
+package com.njyunzhi.invoice.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import java.time.LocalDateTime;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import java.io.Serializable;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 报销主表
16
+ * </p>
17
+ *
18
+ * @author yansen
19
+ * @since 2022-07-04
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@ApiModel(value="TaInvoiceFill对象", description="报销主表")
25
+public class TaInvoiceFill implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    @ApiModelProperty(value = "报销ID")
30
+    @TableId(value = "invoice_id", type = IdType.INPUT)
31
+    private String invoiceId;
32
+
33
+    @ApiModelProperty(value = "名称")
34
+    private String name;
35
+
36
+    @ApiModelProperty(value = "结束时间")
37
+    private LocalDateTime endDate;
38
+
39
+    @ApiModelProperty(value = "状态")
40
+    private Integer status;
41
+
42
+    @ApiModelProperty(value = "创建日期")
43
+    private LocalDateTime createDate;
44
+
45
+
46
+}

+ 49
- 0
src/main/java/com/njyunzhi/invoice/entity/TaInvoiceItemTpl.java 查看文件

@@ -0,0 +1,49 @@
1
+package com.njyunzhi.invoice.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import java.time.LocalDateTime;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import java.io.Serializable;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 报销项目模板
16
+ * </p>
17
+ *
18
+ * @author yansen
19
+ * @since 2022-07-04
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@ApiModel(value="TaInvoiceItemTpl对象", description="报销项目模板")
25
+public class TaInvoiceItemTpl implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    @ApiModelProperty(value = "项目ID")
30
+    @TableId(value = "invoice_item_tpl_id", type = IdType.INPUT)
31
+    private Integer invoiceItemTplId;
32
+
33
+    @ApiModelProperty(value = "报销ID")
34
+    private String invoiceId;
35
+
36
+    @ApiModelProperty(value = "项目名称")
37
+    private String name;
38
+
39
+    @ApiModelProperty(value = "开票额")
40
+    private Integer charge;
41
+
42
+    @ApiModelProperty(value = "状态")
43
+    private Integer status;
44
+
45
+    @ApiModelProperty(value = "创建日期")
46
+    private LocalDateTime createDate;
47
+
48
+
49
+}

+ 46
- 0
src/main/java/com/njyunzhi/invoice/entity/TaInvoiceOrg.java 查看文件

@@ -0,0 +1,46 @@
1
+package com.njyunzhi.invoice.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import java.time.LocalDateTime;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import java.io.Serializable;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 报销单位
16
+ * </p>
17
+ *
18
+ * @author yansen
19
+ * @since 2022-07-04
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@ApiModel(value="TaInvoiceOrg对象", description="报销单位")
25
+public class TaInvoiceOrg implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    @ApiModelProperty(value = "单位ID")
30
+    @TableId(value = "invoice_org_id", type = IdType.INPUT)
31
+    private String invoiceOrgId;
32
+
33
+    @ApiModelProperty(value = "映射ID")
34
+    private String orgId;
35
+
36
+    @ApiModelProperty(value = "单位抬头")
37
+    private String name;
38
+
39
+    @ApiModelProperty(value = "状态")
40
+    private Integer status;
41
+
42
+    @ApiModelProperty(value = "创建日期")
43
+    private LocalDateTime createDate;
44
+
45
+
46
+}

+ 55
- 0
src/main/java/com/njyunzhi/invoice/entity/TaInvoicePerson.java 查看文件

@@ -0,0 +1,55 @@
1
+package com.njyunzhi.invoice.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import java.time.LocalDateTime;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import java.io.Serializable;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 报销人员
16
+ * </p>
17
+ *
18
+ * @author yansen
19
+ * @since 2022-07-04
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@ApiModel(value="TaInvoicePerson对象", description="报销人员")
25
+public class TaInvoicePerson implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    @ApiModelProperty(value = "人员ID")
30
+    @TableId(value = "invoice_person_id", type = IdType.INPUT)
31
+    private String invoicePersonId;
32
+
33
+    @ApiModelProperty(value = "映射人员ID")
34
+    private String personId;
35
+
36
+    @ApiModelProperty(value = "所属单位")
37
+    private String invoiceOrgId;
38
+
39
+    @ApiModelProperty(value = "所属单位")
40
+    private String orgId;
41
+
42
+    @ApiModelProperty(value = "名称")
43
+    private String name;
44
+
45
+    @ApiModelProperty(value = "人员手机号")
46
+    private String phone;
47
+
48
+    @ApiModelProperty(value = "状态")
49
+    private Integer status;
50
+
51
+    @ApiModelProperty(value = "创建日期")
52
+    private LocalDateTime createDate;
53
+
54
+
55
+}

+ 52
- 0
src/main/java/com/njyunzhi/invoice/entity/TaPerson.java 查看文件

@@ -0,0 +1,52 @@
1
+package com.njyunzhi.invoice.entity;
2
+
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import java.time.LocalDateTime;
5
+import com.baomidou.mybatisplus.annotation.TableId;
6
+import java.io.Serializable;
7
+import io.swagger.annotations.ApiModel;
8
+import io.swagger.annotations.ApiModelProperty;
9
+import lombok.Data;
10
+import lombok.EqualsAndHashCode;
11
+import lombok.experimental.Accessors;
12
+
13
+/**
14
+ * <p>
15
+ * 报销人
16
+ * </p>
17
+ *
18
+ * @author yansen
19
+ * @since 2022-07-04
20
+ */
21
+@Data
22
+@EqualsAndHashCode(callSuper = false)
23
+@Accessors(chain = true)
24
+@ApiModel(value="TaPerson对象", description="报销人")
25
+public class TaPerson implements Serializable {
26
+
27
+    private static final long serialVersionUID = 1L;
28
+
29
+    @ApiModelProperty(value = "人员ID")
30
+    @TableId(value = "person_id", type = IdType.INPUT)
31
+    private String personId;
32
+
33
+    @ApiModelProperty(value = "openid")
34
+    private String openid;
35
+
36
+    @ApiModelProperty(value = "名称")
37
+    private String name;
38
+
39
+    @ApiModelProperty(value = "手机号")
40
+    private String phone;
41
+
42
+    @ApiModelProperty(value = "所属单位")
43
+    private String orgId;
44
+
45
+    @ApiModelProperty(value = "状态")
46
+    private Integer status;
47
+
48
+    @ApiModelProperty(value = "创建日期")
49
+    private LocalDateTime createDate;
50
+
51
+
52
+}

+ 30
- 0
src/main/java/com/njyunzhi/invoice/exception/GlobalExceptionHandler.java 查看文件

@@ -0,0 +1,30 @@
1
+package com.njyunzhi.invoice.exception;
2
+
3
+import cn.dev33.satoken.exception.SaTokenException;
4
+import com.njyunzhi.invoice.common.ResponseBean;
5
+import lombok.extern.slf4j.Slf4j;
6
+import org.springframework.web.bind.annotation.ExceptionHandler;
7
+import org.springframework.web.bind.annotation.ResponseBody;
8
+import org.springframework.web.bind.annotation.RestControllerAdvice;
9
+
10
+@Slf4j
11
+@RestControllerAdvice
12
+public class GlobalExceptionHandler {
13
+
14
+    @ResponseBody
15
+    @ExceptionHandler(Exception.class)
16
+    public ResponseBean handleException(Exception e){
17
+        e.printStackTrace();
18
+
19
+        if (e instanceof SaTokenException) {
20
+            return ResponseBean.error("暂无权限进行当前操作", ResponseBean.ERROR_UNAUTHORIZED);
21
+        }
22
+
23
+        String err = e.getMessage();
24
+        if (err.contains("java")) {
25
+            err = "系统内部异常";
26
+        }
27
+
28
+        return ResponseBean.error(err, ResponseBean.ERROR_UNAVAILABLE);
29
+    }
30
+}

+ 18
- 0
src/main/java/com/njyunzhi/invoice/mapper/SysBankMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.njyunzhi.invoice.mapper;
2
+
3
+import com.njyunzhi.invoice.entity.SysBank;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 开户行 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author yansen
13
+ * @since 2022-07-04
14
+ */
15
+@Mapper
16
+public interface SysBankMapper extends BaseMapper<SysBank> {
17
+
18
+}

+ 18
- 0
src/main/java/com/njyunzhi/invoice/mapper/SysOrgMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.njyunzhi.invoice.mapper;
2
+
3
+import com.njyunzhi.invoice.entity.SysOrg;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 单位表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author yansen
13
+ * @since 2022-07-04
14
+ */
15
+@Mapper
16
+public interface SysOrgMapper extends BaseMapper<SysOrg> {
17
+
18
+}

+ 18
- 0
src/main/java/com/njyunzhi/invoice/mapper/SysUserMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.njyunzhi.invoice.mapper;
2
+
3
+import com.njyunzhi.invoice.entity.SysUser;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 系统用户 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author yansen
13
+ * @since 2022-07-04
14
+ */
15
+@Mapper
16
+public interface SysUserMapper extends BaseMapper<SysUser> {
17
+
18
+}

+ 18
- 0
src/main/java/com/njyunzhi/invoice/mapper/TaInvoiceDetailMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.njyunzhi.invoice.mapper;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceDetail;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 报销明细 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author yansen
13
+ * @since 2022-07-04
14
+ */
15
+@Mapper
16
+public interface TaInvoiceDetailMapper extends BaseMapper<TaInvoiceDetail> {
17
+
18
+}

+ 18
- 0
src/main/java/com/njyunzhi/invoice/mapper/TaInvoiceFillMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.njyunzhi.invoice.mapper;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceFill;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 报销主表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author yansen
13
+ * @since 2022-07-04
14
+ */
15
+@Mapper
16
+public interface TaInvoiceFillMapper extends BaseMapper<TaInvoiceFill> {
17
+
18
+}

+ 18
- 0
src/main/java/com/njyunzhi/invoice/mapper/TaInvoiceItemTplMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.njyunzhi.invoice.mapper;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceItemTpl;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 报销项目模板 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author yansen
13
+ * @since 2022-07-04
14
+ */
15
+@Mapper
16
+public interface TaInvoiceItemTplMapper extends BaseMapper<TaInvoiceItemTpl> {
17
+
18
+}

+ 18
- 0
src/main/java/com/njyunzhi/invoice/mapper/TaInvoiceOrgMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.njyunzhi.invoice.mapper;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceOrg;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 报销单位 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author yansen
13
+ * @since 2022-07-04
14
+ */
15
+@Mapper
16
+public interface TaInvoiceOrgMapper extends BaseMapper<TaInvoiceOrg> {
17
+
18
+}

+ 18
- 0
src/main/java/com/njyunzhi/invoice/mapper/TaInvoicePersonMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.njyunzhi.invoice.mapper;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoicePerson;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 报销人员 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author yansen
13
+ * @since 2022-07-04
14
+ */
15
+@Mapper
16
+public interface TaInvoicePersonMapper extends BaseMapper<TaInvoicePerson> {
17
+
18
+}

+ 18
- 0
src/main/java/com/njyunzhi/invoice/mapper/TaPersonMapper.java 查看文件

@@ -0,0 +1,18 @@
1
+package com.njyunzhi.invoice.mapper;
2
+
3
+import com.njyunzhi.invoice.entity.TaPerson;
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 报销人 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author yansen
13
+ * @since 2022-07-04
14
+ */
15
+@Mapper
16
+public interface TaPersonMapper extends BaseMapper<TaPerson> {
17
+
18
+}

+ 16
- 0
src/main/java/com/njyunzhi/invoice/service/ISysBankService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.invoice.service;
2
+
3
+import com.njyunzhi.invoice.entity.SysBank;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 开户行 服务类
9
+ * </p>
10
+ *
11
+ * @author yansen
12
+ * @since 2022-07-04
13
+ */
14
+public interface ISysBankService extends IService<SysBank> {
15
+
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/invoice/service/ISysOrgService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.invoice.service;
2
+
3
+import com.njyunzhi.invoice.entity.SysOrg;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 单位表 服务类
9
+ * </p>
10
+ *
11
+ * @author yansen
12
+ * @since 2022-07-04
13
+ */
14
+public interface ISysOrgService extends IService<SysOrg> {
15
+
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/invoice/service/ISysUserService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.invoice.service;
2
+
3
+import com.njyunzhi.invoice.entity.SysUser;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 系统用户 服务类
9
+ * </p>
10
+ *
11
+ * @author yansen
12
+ * @since 2022-07-04
13
+ */
14
+public interface ISysUserService extends IService<SysUser> {
15
+
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/invoice/service/ITaInvoiceDetailService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.invoice.service;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceDetail;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 报销明细 服务类
9
+ * </p>
10
+ *
11
+ * @author yansen
12
+ * @since 2022-07-04
13
+ */
14
+public interface ITaInvoiceDetailService extends IService<TaInvoiceDetail> {
15
+
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/invoice/service/ITaInvoiceFillService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.invoice.service;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceFill;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 报销主表 服务类
9
+ * </p>
10
+ *
11
+ * @author yansen
12
+ * @since 2022-07-04
13
+ */
14
+public interface ITaInvoiceFillService extends IService<TaInvoiceFill> {
15
+
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/invoice/service/ITaInvoiceItemTplService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.invoice.service;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceItemTpl;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 报销项目模板 服务类
9
+ * </p>
10
+ *
11
+ * @author yansen
12
+ * @since 2022-07-04
13
+ */
14
+public interface ITaInvoiceItemTplService extends IService<TaInvoiceItemTpl> {
15
+
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/invoice/service/ITaInvoiceOrgService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.invoice.service;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceOrg;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 报销单位 服务类
9
+ * </p>
10
+ *
11
+ * @author yansen
12
+ * @since 2022-07-04
13
+ */
14
+public interface ITaInvoiceOrgService extends IService<TaInvoiceOrg> {
15
+
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/invoice/service/ITaInvoicePersonService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.invoice.service;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoicePerson;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 报销人员 服务类
9
+ * </p>
10
+ *
11
+ * @author yansen
12
+ * @since 2022-07-04
13
+ */
14
+public interface ITaInvoicePersonService extends IService<TaInvoicePerson> {
15
+
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/invoice/service/ITaPersonService.java 查看文件

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.invoice.service;
2
+
3
+import com.njyunzhi.invoice.entity.TaPerson;
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+
6
+/**
7
+ * <p>
8
+ * 报销人 服务类
9
+ * </p>
10
+ *
11
+ * @author yansen
12
+ * @since 2022-07-04
13
+ */
14
+public interface ITaPersonService extends IService<TaPerson> {
15
+
16
+}

+ 20
- 0
src/main/java/com/njyunzhi/invoice/service/impl/SysBankServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.njyunzhi.invoice.service.impl;
2
+
3
+import com.njyunzhi.invoice.entity.SysBank;
4
+import com.njyunzhi.invoice.mapper.SysBankMapper;
5
+import com.njyunzhi.invoice.service.ISysBankService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 开户行 服务实现类
12
+ * </p>
13
+ *
14
+ * @author yansen
15
+ * @since 2022-07-04
16
+ */
17
+@Service
18
+public class SysBankServiceImpl extends ServiceImpl<SysBankMapper, SysBank> implements ISysBankService {
19
+
20
+}

+ 20
- 0
src/main/java/com/njyunzhi/invoice/service/impl/SysOrgServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.njyunzhi.invoice.service.impl;
2
+
3
+import com.njyunzhi.invoice.entity.SysOrg;
4
+import com.njyunzhi.invoice.mapper.SysOrgMapper;
5
+import com.njyunzhi.invoice.service.ISysOrgService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 单位表 服务实现类
12
+ * </p>
13
+ *
14
+ * @author yansen
15
+ * @since 2022-07-04
16
+ */
17
+@Service
18
+public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> implements ISysOrgService {
19
+
20
+}

+ 20
- 0
src/main/java/com/njyunzhi/invoice/service/impl/SysUserServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.njyunzhi.invoice.service.impl;
2
+
3
+import com.njyunzhi.invoice.entity.SysUser;
4
+import com.njyunzhi.invoice.mapper.SysUserMapper;
5
+import com.njyunzhi.invoice.service.ISysUserService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 系统用户 服务实现类
12
+ * </p>
13
+ *
14
+ * @author yansen
15
+ * @since 2022-07-04
16
+ */
17
+@Service
18
+public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService {
19
+
20
+}

+ 20
- 0
src/main/java/com/njyunzhi/invoice/service/impl/TaInvoiceDetailServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.njyunzhi.invoice.service.impl;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceDetail;
4
+import com.njyunzhi.invoice.mapper.TaInvoiceDetailMapper;
5
+import com.njyunzhi.invoice.service.ITaInvoiceDetailService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 报销明细 服务实现类
12
+ * </p>
13
+ *
14
+ * @author yansen
15
+ * @since 2022-07-04
16
+ */
17
+@Service
18
+public class TaInvoiceDetailServiceImpl extends ServiceImpl<TaInvoiceDetailMapper, TaInvoiceDetail> implements ITaInvoiceDetailService {
19
+
20
+}

+ 20
- 0
src/main/java/com/njyunzhi/invoice/service/impl/TaInvoiceFillServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.njyunzhi.invoice.service.impl;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceFill;
4
+import com.njyunzhi.invoice.mapper.TaInvoiceFillMapper;
5
+import com.njyunzhi.invoice.service.ITaInvoiceFillService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 报销主表 服务实现类
12
+ * </p>
13
+ *
14
+ * @author yansen
15
+ * @since 2022-07-04
16
+ */
17
+@Service
18
+public class TaInvoiceFillServiceImpl extends ServiceImpl<TaInvoiceFillMapper, TaInvoiceFill> implements ITaInvoiceFillService {
19
+
20
+}

+ 20
- 0
src/main/java/com/njyunzhi/invoice/service/impl/TaInvoiceItemTplServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.njyunzhi.invoice.service.impl;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceItemTpl;
4
+import com.njyunzhi.invoice.mapper.TaInvoiceItemTplMapper;
5
+import com.njyunzhi.invoice.service.ITaInvoiceItemTplService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 报销项目模板 服务实现类
12
+ * </p>
13
+ *
14
+ * @author yansen
15
+ * @since 2022-07-04
16
+ */
17
+@Service
18
+public class TaInvoiceItemTplServiceImpl extends ServiceImpl<TaInvoiceItemTplMapper, TaInvoiceItemTpl> implements ITaInvoiceItemTplService {
19
+
20
+}

+ 20
- 0
src/main/java/com/njyunzhi/invoice/service/impl/TaInvoiceOrgServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.njyunzhi.invoice.service.impl;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoiceOrg;
4
+import com.njyunzhi.invoice.mapper.TaInvoiceOrgMapper;
5
+import com.njyunzhi.invoice.service.ITaInvoiceOrgService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 报销单位 服务实现类
12
+ * </p>
13
+ *
14
+ * @author yansen
15
+ * @since 2022-07-04
16
+ */
17
+@Service
18
+public class TaInvoiceOrgServiceImpl extends ServiceImpl<TaInvoiceOrgMapper, TaInvoiceOrg> implements ITaInvoiceOrgService {
19
+
20
+}

+ 20
- 0
src/main/java/com/njyunzhi/invoice/service/impl/TaInvoicePersonServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.njyunzhi.invoice.service.impl;
2
+
3
+import com.njyunzhi.invoice.entity.TaInvoicePerson;
4
+import com.njyunzhi.invoice.mapper.TaInvoicePersonMapper;
5
+import com.njyunzhi.invoice.service.ITaInvoicePersonService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 报销人员 服务实现类
12
+ * </p>
13
+ *
14
+ * @author yansen
15
+ * @since 2022-07-04
16
+ */
17
+@Service
18
+public class TaInvoicePersonServiceImpl extends ServiceImpl<TaInvoicePersonMapper, TaInvoicePerson> implements ITaInvoicePersonService {
19
+
20
+}

+ 20
- 0
src/main/java/com/njyunzhi/invoice/service/impl/TaPersonServiceImpl.java 查看文件

@@ -0,0 +1,20 @@
1
+package com.njyunzhi.invoice.service.impl;
2
+
3
+import com.njyunzhi.invoice.entity.TaPerson;
4
+import com.njyunzhi.invoice.mapper.TaPersonMapper;
5
+import com.njyunzhi.invoice.service.ITaPersonService;
6
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7
+import org.springframework.stereotype.Service;
8
+
9
+/**
10
+ * <p>
11
+ * 报销人 服务实现类
12
+ * </p>
13
+ *
14
+ * @author yansen
15
+ * @since 2022-07-04
16
+ */
17
+@Service
18
+public class TaPersonServiceImpl extends ServiceImpl<TaPersonMapper, TaPerson> implements ITaPersonService {
19
+
20
+}

+ 17
- 0
src/main/resources/application-dev.yml 查看文件

@@ -0,0 +1,17 @@
1
+
2
+###
3
+spring:
4
+  servlet:
5
+    multipart:
6
+      max-file-size: 10MB
7
+      max-request-size: 50MB
8
+  datasource:
9
+    url: jdbc:mysql://110.40.183.156:3306/invoice_fill?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
10
+    username: invoice_fill
11
+    password: invoice_fill@ABCD1234
12
+
13
+###
14
+logging:
15
+  level:
16
+    root: info
17
+    springfox: info

+ 3
- 0
src/main/resources/application-prod.yml 查看文件

@@ -0,0 +1,3 @@
1
+
2
+server:
3
+  port: 9000

+ 45
- 0
src/main/resources/application.yml 查看文件

@@ -0,0 +1,45 @@
1
+
2
+server:
3
+  port: 7081
4
+  servlet:
5
+    context-path: /api
6
+
7
+###
8
+mybatis-plus:
9
+  configuration:
10
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
11
+    call-setters-on-nulls: true
12
+  mapper-locations: classpath:mapper/**/*.xml
13
+
14
+
15
+# Sa-Token配置
16
+sa-token:
17
+  # jwt秘钥
18
+  jwt-secret-key: eK2pLcWeT5pdPcooK6FzPGmPkJJPuSIV
19
+  # token名称 (同时也是cookie名称)
20
+  token-name: Authorization
21
+  # token有效期,单位s 默认30天, -1代表永不过期
22
+  timeout: 2592000
23
+  # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
24
+  activity-timeout: -1
25
+  # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
26
+  is-concurrent: true
27
+  # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
28
+  is-share: false
29
+  # token风格
30
+  token-style: uuid
31
+  # 是否输出操作日志
32
+  is-log: false
33
+
34
+###
35
+spring:
36
+  application:
37
+    name: demo
38
+  mvc:
39
+    pathmatch:
40
+      matching-strategy: ANT_PATH_MATCHER
41
+  #  jackson:
42
+  #    date-format: yyyy-MM-dd HH:mm:ss
43
+  #    time-zone: GMT+8
44
+  profiles:
45
+    active: @profileActive@

+ 5
- 0
src/main/resources/mapper/SysBankMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.njyunzhi.invoice.mapper.SysBankMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/SysOrgMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.njyunzhi.invoice.mapper.SysOrgMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/SysUserMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.njyunzhi.invoice.mapper.SysUserMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/TaInvoiceDetailMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.njyunzhi.invoice.mapper.TaInvoiceDetailMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/TaInvoiceFillMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.njyunzhi.invoice.mapper.TaInvoiceFillMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/TaInvoiceItemTplMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.njyunzhi.invoice.mapper.TaInvoiceItemTplMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/TaInvoiceOrgMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.njyunzhi.invoice.mapper.TaInvoiceOrgMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/TaInvoicePersonMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.njyunzhi.invoice.mapper.TaInvoicePersonMapper">
4
+
5
+</mapper>

+ 5
- 0
src/main/resources/mapper/TaPersonMapper.xml 查看文件

@@ -0,0 +1,5 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.njyunzhi.invoice.mapper.TaPersonMapper">
4
+
5
+</mapper>