Commit fab6c9ab9f98fd7c0c44ce3fb8b18a7e08522261
0 parents
feat(tax-central): 初始化税务代理核心模块
- 添加.gitignore文件忽略IDEA配置、编译输出和Maven构建目录 - 创建抽象处理器基类AbstractProcessor实现通用处理逻辑 - 配置Spring Boot应用属性,集成Nacos服务发现与配置中心 - 实现ApplicationContext持有者单例模式便于全局访问Bean - 定义审计类型枚举AuditType支持审核状态管理- 新增银行账号转换器BankCardNumberConverter用于字段映射- 创建基础单据BaseBill抽象类及客户信息BaseCustomer实体类 - 建立基础文档BaseDocument、映射BaseMapping和代理BaseProxy基类- 设计建造者模式抽象类Builder支持不同类型文档构建 - 实现业务类型BusinessTypeConverter等多种字段转换器 - 配置CentralConfig组件扫描包路径统一管理中央模块 - 添加费用项目ChargeItemConverter及相关部门转换器 - 定义连接标识接口ConnectionIdentity支持多数据源场景 - 创建联系人Contact实体类并关联至客户信息结构 - 构建上下文Context对象封装请求处理所需参数 - 配置ConvConfig启用mapping模块组件扫描功能- 实现Converter注解支持运行时动态字段转换配置 - 初始化ConverterContext容器注册所有转换器实例 - 添加币别CurrencyConverter及其他客户相关转换器 - 创建客户信息构建器CustomerBuilder解析标准客户数据 - 实现客户联系人CustomerContactConverter等专用转换逻辑 - 完善客户国家、创建组织等维度转换器实现 - 开发子项转换器CustomerItemConverter处理集合类型映射- 定义金蝶客户映射模型CustomerMapping支持JSON序列化 - 创建客户代理CustomerProxy承载第三方系统返回结果 - 实现客户发送器CustomerSender对接金蝶API完成同步 - 开发客户转换器CustomerTransformer支撑文档到映射的变换
Showing
191 changed files
with
8102 additions
and
0 deletions
.gitignore
0 → 100644
.mvn/wrapper/maven-wrapper.jar
0 → 100644
No preview for this file type
.mvn/wrapper/maven-wrapper.properties
0 → 100644
| 1 | +++ a/.mvn/wrapper/maven-wrapper.properties | ||
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one | ||
| 2 | +# or more contributor license agreements. See the NOTICE file | ||
| 3 | +# distributed with this work for additional information | ||
| 4 | +# regarding copyright ownership. The ASF licenses this file | ||
| 5 | +# to you under the Apache License, Version 2.0 (the | ||
| 6 | +# "License"); you may not use this file except in compliance | ||
| 7 | +# with the License. You may obtain a copy of the License at | ||
| 8 | +# | ||
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | +# | ||
| 11 | +# Unless required by applicable law or agreed to in writing, | ||
| 12 | +# software distributed under the License is distributed on an | ||
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| 14 | +# KIND, either express or implied. See the License for the | ||
| 15 | +# specific language governing permissions and limitations | ||
| 16 | +# under the License. | ||
| 17 | +wrapperVersion=3.3.2 | ||
| 18 | +distributionType=source | ||
| 19 | +distributionUrl=https://maven.aliyun.com/repository/public/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip | ||
| 20 | +wrapperUrl=https://maven.aliyun.com/repository/public/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar |
mvnw
0 → 100644
| 1 | +++ a/mvnw | ||
| 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 | +# http://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 | +# Apache Maven Wrapper startup batch script, version 3.3.2 | ||
| 23 | +# | ||
| 24 | +# Required ENV vars: | ||
| 25 | +# ------------------ | ||
| 26 | +# JAVA_HOME - location of a JDK home dir | ||
| 27 | +# | ||
| 28 | +# Optional ENV vars | ||
| 29 | +# ----------------- | ||
| 30 | +# MAVEN_OPTS - parameters passed to the Java VM when running Maven | ||
| 31 | +# e.g. to debug Maven itself, use | ||
| 32 | +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 | ||
| 33 | +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files | ||
| 34 | +# ---------------------------------------------------------------------------- | ||
| 35 | + | ||
| 36 | +if [ -z "$MAVEN_SKIP_RC" ]; then | ||
| 37 | + | ||
| 38 | + if [ -f /usr/local/etc/mavenrc ]; then | ||
| 39 | + . /usr/local/etc/mavenrc | ||
| 40 | + fi | ||
| 41 | + | ||
| 42 | + if [ -f /etc/mavenrc ]; then | ||
| 43 | + . /etc/mavenrc | ||
| 44 | + fi | ||
| 45 | + | ||
| 46 | + if [ -f "$HOME/.mavenrc" ]; then | ||
| 47 | + . "$HOME/.mavenrc" | ||
| 48 | + fi | ||
| 49 | + | ||
| 50 | +fi | ||
| 51 | + | ||
| 52 | +# OS specific support. $var _must_ be set to either true or false. | ||
| 53 | +cygwin=false | ||
| 54 | +darwin=false | ||
| 55 | +mingw=false | ||
| 56 | +case "$(uname)" in | ||
| 57 | +CYGWIN*) cygwin=true ;; | ||
| 58 | +MINGW*) mingw=true ;; | ||
| 59 | +Darwin*) | ||
| 60 | + 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 | + JAVA_HOME="$(/usr/libexec/java_home)" | ||
| 66 | + export JAVA_HOME | ||
| 67 | + else | ||
| 68 | + JAVA_HOME="/Library/Java/Home" | ||
| 69 | + export JAVA_HOME | ||
| 70 | + fi | ||
| 71 | + fi | ||
| 72 | + ;; | ||
| 73 | +esac | ||
| 74 | + | ||
| 75 | +if [ -z "$JAVA_HOME" ]; then | ||
| 76 | + if [ -r /etc/gentoo-release ]; then | ||
| 77 | + JAVA_HOME=$(java-config --jre-home) | ||
| 78 | + fi | ||
| 79 | +fi | ||
| 80 | + | ||
| 81 | +# For Cygwin, ensure paths are in UNIX format before anything is touched | ||
| 82 | +if $cygwin; then | ||
| 83 | + [ -n "$JAVA_HOME" ] \ | ||
| 84 | + && JAVA_HOME=$(cygpath --unix "$JAVA_HOME") | ||
| 85 | + [ -n "$CLASSPATH" ] \ | ||
| 86 | + && CLASSPATH=$(cygpath --path --unix "$CLASSPATH") | ||
| 87 | +fi | ||
| 88 | + | ||
| 89 | +# For Mingw, ensure paths are in UNIX format before anything is touched | ||
| 90 | +if $mingw; then | ||
| 91 | + [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] \ | ||
| 92 | + && JAVA_HOME="$( | ||
| 93 | + cd "$JAVA_HOME" || ( | ||
| 94 | + echo "cannot cd into $JAVA_HOME." >&2 | ||
| 95 | + exit 1 | ||
| 96 | + ) | ||
| 97 | + pwd | ||
| 98 | + )" | ||
| 99 | +fi | ||
| 100 | + | ||
| 101 | +if [ -z "$JAVA_HOME" ]; then | ||
| 102 | + javaExecutable="$(which javac)" | ||
| 103 | + if [ -n "$javaExecutable" ] && ! [ "$(expr "$javaExecutable" : '\([^ ]*\)')" = "no" ]; then | ||
| 104 | + # readlink(1) is not available as standard on Solaris 10. | ||
| 105 | + readLink=$(which readlink) | ||
| 106 | + if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then | ||
| 107 | + if $darwin; then | ||
| 108 | + javaHome="$(dirname "$javaExecutable")" | ||
| 109 | + javaExecutable="$(cd "$javaHome" && pwd -P)/javac" | ||
| 110 | + else | ||
| 111 | + javaExecutable="$(readlink -f "$javaExecutable")" | ||
| 112 | + fi | ||
| 113 | + javaHome="$(dirname "$javaExecutable")" | ||
| 114 | + javaHome=$(expr "$javaHome" : '\(.*\)/bin') | ||
| 115 | + JAVA_HOME="$javaHome" | ||
| 116 | + export JAVA_HOME | ||
| 117 | + fi | ||
| 118 | + fi | ||
| 119 | +fi | ||
| 120 | + | ||
| 121 | +if [ -z "$JAVACMD" ]; then | ||
| 122 | + if [ -n "$JAVA_HOME" ]; then | ||
| 123 | + if [ -x "$JAVA_HOME/jre/sh/java" ]; then | ||
| 124 | + # IBM's JDK on AIX uses strange locations for the executables | ||
| 125 | + JAVACMD="$JAVA_HOME/jre/sh/java" | ||
| 126 | + else | ||
| 127 | + JAVACMD="$JAVA_HOME/bin/java" | ||
| 128 | + fi | ||
| 129 | + else | ||
| 130 | + JAVACMD="$( | ||
| 131 | + \unset -f command 2>/dev/null | ||
| 132 | + \command -v java | ||
| 133 | + )" | ||
| 134 | + fi | ||
| 135 | +fi | ||
| 136 | + | ||
| 137 | +if [ ! -x "$JAVACMD" ]; then | ||
| 138 | + echo "Error: JAVA_HOME is not defined correctly." >&2 | ||
| 139 | + echo " We cannot execute $JAVACMD" >&2 | ||
| 140 | + exit 1 | ||
| 141 | +fi | ||
| 142 | + | ||
| 143 | +if [ -z "$JAVA_HOME" ]; then | ||
| 144 | + echo "Warning: JAVA_HOME environment variable is not set." >&2 | ||
| 145 | +fi | ||
| 146 | + | ||
| 147 | +# traverses directory structure from process work directory to filesystem root | ||
| 148 | +# first directory with .mvn subdirectory is considered project base directory | ||
| 149 | +find_maven_basedir() { | ||
| 150 | + if [ -z "$1" ]; then | ||
| 151 | + echo "Path not specified to find_maven_basedir" >&2 | ||
| 152 | + return 1 | ||
| 153 | + fi | ||
| 154 | + | ||
| 155 | + basedir="$1" | ||
| 156 | + wdir="$1" | ||
| 157 | + while [ "$wdir" != '/' ]; do | ||
| 158 | + if [ -d "$wdir"/.mvn ]; then | ||
| 159 | + basedir=$wdir | ||
| 160 | + break | ||
| 161 | + fi | ||
| 162 | + # workaround for JBEAP-8937 (on Solaris 10/Sparc) | ||
| 163 | + if [ -d "${wdir}" ]; then | ||
| 164 | + wdir=$( | ||
| 165 | + cd "$wdir/.." || exit 1 | ||
| 166 | + pwd | ||
| 167 | + ) | ||
| 168 | + fi | ||
| 169 | + # end of workaround | ||
| 170 | + done | ||
| 171 | + printf '%s' "$( | ||
| 172 | + cd "$basedir" || exit 1 | ||
| 173 | + pwd | ||
| 174 | + )" | ||
| 175 | +} | ||
| 176 | + | ||
| 177 | +# concatenates all lines of a file | ||
| 178 | +concat_lines() { | ||
| 179 | + if [ -f "$1" ]; then | ||
| 180 | + # Remove \r in case we run on Windows within Git Bash | ||
| 181 | + # and check out the repository with auto CRLF management | ||
| 182 | + # enabled. Otherwise, we may read lines that are delimited with | ||
| 183 | + # \r\n and produce $'-Xarg\r' rather than -Xarg due to word | ||
| 184 | + # splitting rules. | ||
| 185 | + tr -s '\r\n' ' ' <"$1" | ||
| 186 | + fi | ||
| 187 | +} | ||
| 188 | + | ||
| 189 | +log() { | ||
| 190 | + if [ "$MVNW_VERBOSE" = true ]; then | ||
| 191 | + printf '%s\n' "$1" | ||
| 192 | + fi | ||
| 193 | +} | ||
| 194 | + | ||
| 195 | +BASE_DIR=$(find_maven_basedir "$(dirname "$0")") | ||
| 196 | +if [ -z "$BASE_DIR" ]; then | ||
| 197 | + exit 1 | ||
| 198 | +fi | ||
| 199 | + | ||
| 200 | +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} | ||
| 201 | +export MAVEN_PROJECTBASEDIR | ||
| 202 | +log "$MAVEN_PROJECTBASEDIR" | ||
| 203 | + | ||
| 204 | +########################################################################################## | ||
| 205 | +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central | ||
| 206 | +# This allows using the maven wrapper in projects that prohibit checking in binary data. | ||
| 207 | +########################################################################################## | ||
| 208 | +wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" | ||
| 209 | +if [ -r "$wrapperJarPath" ]; then | ||
| 210 | + log "Found $wrapperJarPath" | ||
| 211 | +else | ||
| 212 | + log "Couldn't find $wrapperJarPath, downloading it ..." | ||
| 213 | + | ||
| 214 | + if [ -n "$MVNW_REPOURL" ]; then | ||
| 215 | + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar" | ||
| 216 | + else | ||
| 217 | + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar" | ||
| 218 | + fi | ||
| 219 | + while IFS="=" read -r key value; do | ||
| 220 | + # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) | ||
| 221 | + safeValue=$(echo "$value" | tr -d '\r') | ||
| 222 | + case "$key" in wrapperUrl) | ||
| 223 | + wrapperUrl="$safeValue" | ||
| 224 | + break | ||
| 225 | + ;; | ||
| 226 | + esac | ||
| 227 | + done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" | ||
| 228 | + log "Downloading from: $wrapperUrl" | ||
| 229 | + | ||
| 230 | + if $cygwin; then | ||
| 231 | + wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") | ||
| 232 | + fi | ||
| 233 | + | ||
| 234 | + if command -v wget >/dev/null; then | ||
| 235 | + log "Found wget ... using wget" | ||
| 236 | + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" | ||
| 237 | + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then | ||
| 238 | + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" | ||
| 239 | + else | ||
| 240 | + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" | ||
| 241 | + fi | ||
| 242 | + elif command -v curl >/dev/null; then | ||
| 243 | + log "Found curl ... using curl" | ||
| 244 | + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" | ||
| 245 | + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then | ||
| 246 | + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" | ||
| 247 | + else | ||
| 248 | + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" | ||
| 249 | + fi | ||
| 250 | + else | ||
| 251 | + log "Falling back to using Java to download" | ||
| 252 | + javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" | ||
| 253 | + javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" | ||
| 254 | + # For Cygwin, switch paths to Windows format before running javac | ||
| 255 | + if $cygwin; then | ||
| 256 | + javaSource=$(cygpath --path --windows "$javaSource") | ||
| 257 | + javaClass=$(cygpath --path --windows "$javaClass") | ||
| 258 | + fi | ||
| 259 | + if [ -e "$javaSource" ]; then | ||
| 260 | + if [ ! -e "$javaClass" ]; then | ||
| 261 | + log " - Compiling MavenWrapperDownloader.java ..." | ||
| 262 | + ("$JAVA_HOME/bin/javac" "$javaSource") | ||
| 263 | + fi | ||
| 264 | + if [ -e "$javaClass" ]; then | ||
| 265 | + log " - Running MavenWrapperDownloader.java ..." | ||
| 266 | + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" | ||
| 267 | + fi | ||
| 268 | + fi | ||
| 269 | + fi | ||
| 270 | +fi | ||
| 271 | +########################################################################################## | ||
| 272 | +# End of extension | ||
| 273 | +########################################################################################## | ||
| 274 | + | ||
| 275 | +# If specified, validate the SHA-256 sum of the Maven wrapper jar file | ||
| 276 | +wrapperSha256Sum="" | ||
| 277 | +while IFS="=" read -r key value; do | ||
| 278 | + case "$key" in wrapperSha256Sum) | ||
| 279 | + wrapperSha256Sum=$value | ||
| 280 | + break | ||
| 281 | + ;; | ||
| 282 | + esac | ||
| 283 | +done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" | ||
| 284 | +if [ -n "$wrapperSha256Sum" ]; then | ||
| 285 | + wrapperSha256Result=false | ||
| 286 | + if command -v sha256sum >/dev/null; then | ||
| 287 | + if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c >/dev/null 2>&1; then | ||
| 288 | + wrapperSha256Result=true | ||
| 289 | + fi | ||
| 290 | + elif command -v shasum >/dev/null; then | ||
| 291 | + if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c >/dev/null 2>&1; then | ||
| 292 | + wrapperSha256Result=true | ||
| 293 | + fi | ||
| 294 | + else | ||
| 295 | + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 | ||
| 296 | + echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." >&2 | ||
| 297 | + exit 1 | ||
| 298 | + fi | ||
| 299 | + if [ $wrapperSha256Result = false ]; then | ||
| 300 | + echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 | ||
| 301 | + echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 | ||
| 302 | + echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 | ||
| 303 | + exit 1 | ||
| 304 | + fi | ||
| 305 | +fi | ||
| 306 | + | ||
| 307 | +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" | ||
| 308 | + | ||
| 309 | +# For Cygwin, switch paths to Windows format before running java | ||
| 310 | +if $cygwin; then | ||
| 311 | + [ -n "$JAVA_HOME" ] \ | ||
| 312 | + && JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") | ||
| 313 | + [ -n "$CLASSPATH" ] \ | ||
| 314 | + && CLASSPATH=$(cygpath --path --windows "$CLASSPATH") | ||
| 315 | + [ -n "$MAVEN_PROJECTBASEDIR" ] \ | ||
| 316 | + && MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") | ||
| 317 | +fi | ||
| 318 | + | ||
| 319 | +# Provide a "standardized" way to retrieve the CLI args that will | ||
| 320 | +# work with both Windows and non-Windows executions. | ||
| 321 | +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" | ||
| 322 | +export MAVEN_CMD_LINE_ARGS | ||
| 323 | + | ||
| 324 | +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain | ||
| 325 | + | ||
| 326 | +# shellcheck disable=SC2086 # safe args | ||
| 327 | +exec "$JAVACMD" \ | ||
| 328 | + $MAVEN_OPTS \ | ||
| 329 | + $MAVEN_DEBUG_OPTS \ | ||
| 330 | + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ | ||
| 331 | + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ | ||
| 332 | + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" |
mvnw.cmd
0 → 100644
| 1 | +++ a/mvnw.cmd | ||
| 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 http://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 Apache Maven Wrapper startup batch script, version 3.3.2 | ||
| 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 MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands | ||
| 28 | +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending | ||
| 29 | +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven | ||
| 30 | +@REM e.g. to debug Maven itself, use | ||
| 31 | +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 | ||
| 32 | +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files | ||
| 33 | +@REM ---------------------------------------------------------------------------- | ||
| 34 | + | ||
| 35 | +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' | ||
| 36 | +@echo off | ||
| 37 | +@REM set title of command window | ||
| 38 | +title %0 | ||
| 39 | +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' | ||
| 40 | +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% | ||
| 41 | + | ||
| 42 | +@REM set %HOME% to equivalent of $HOME | ||
| 43 | +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") | ||
| 44 | + | ||
| 45 | +@REM Execute a user defined script before this one | ||
| 46 | +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre | ||
| 47 | +@REM check for pre script, once with legacy .bat ending and once with .cmd ending | ||
| 48 | +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* | ||
| 49 | +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* | ||
| 50 | +:skipRcPre | ||
| 51 | + | ||
| 52 | +@setlocal | ||
| 53 | + | ||
| 54 | +set ERROR_CODE=0 | ||
| 55 | + | ||
| 56 | +@REM To isolate internal variables from possible post scripts, we use another setlocal | ||
| 57 | +@setlocal | ||
| 58 | + | ||
| 59 | +@REM ==== START VALIDATION ==== | ||
| 60 | +if not "%JAVA_HOME%" == "" goto OkJHome | ||
| 61 | + | ||
| 62 | +echo. >&2 | ||
| 63 | +echo Error: JAVA_HOME not found in your environment. >&2 | ||
| 64 | +echo Please set the JAVA_HOME variable in your environment to match the >&2 | ||
| 65 | +echo location of your Java installation. >&2 | ||
| 66 | +echo. >&2 | ||
| 67 | +goto error | ||
| 68 | + | ||
| 69 | +:OkJHome | ||
| 70 | +if exist "%JAVA_HOME%\bin\java.exe" goto init | ||
| 71 | + | ||
| 72 | +echo. >&2 | ||
| 73 | +echo Error: JAVA_HOME is set to an invalid directory. >&2 | ||
| 74 | +echo JAVA_HOME = "%JAVA_HOME%" >&2 | ||
| 75 | +echo Please set the JAVA_HOME variable in your environment to match the >&2 | ||
| 76 | +echo location of your Java installation. >&2 | ||
| 77 | +echo. >&2 | ||
| 78 | +goto error | ||
| 79 | + | ||
| 80 | +@REM ==== END VALIDATION ==== | ||
| 81 | + | ||
| 82 | +:init | ||
| 83 | + | ||
| 84 | +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". | ||
| 85 | +@REM Fallback to current working directory if not found. | ||
| 86 | + | ||
| 87 | +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% | ||
| 88 | +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir | ||
| 89 | + | ||
| 90 | +set EXEC_DIR=%CD% | ||
| 91 | +set WDIR=%EXEC_DIR% | ||
| 92 | +:findBaseDir | ||
| 93 | +IF EXIST "%WDIR%"\.mvn goto baseDirFound | ||
| 94 | +cd .. | ||
| 95 | +IF "%WDIR%"=="%CD%" goto baseDirNotFound | ||
| 96 | +set WDIR=%CD% | ||
| 97 | +goto findBaseDir | ||
| 98 | + | ||
| 99 | +:baseDirFound | ||
| 100 | +set MAVEN_PROJECTBASEDIR=%WDIR% | ||
| 101 | +cd "%EXEC_DIR%" | ||
| 102 | +goto endDetectBaseDir | ||
| 103 | + | ||
| 104 | +:baseDirNotFound | ||
| 105 | +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% | ||
| 106 | +cd "%EXEC_DIR%" | ||
| 107 | + | ||
| 108 | +:endDetectBaseDir | ||
| 109 | + | ||
| 110 | +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig | ||
| 111 | + | ||
| 112 | +@setlocal EnableExtensions EnableDelayedExpansion | ||
| 113 | +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a | ||
| 114 | +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% | ||
| 115 | + | ||
| 116 | +:endReadAdditionalConfig | ||
| 117 | + | ||
| 118 | +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" | ||
| 119 | +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" | ||
| 120 | +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain | ||
| 121 | + | ||
| 122 | +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar" | ||
| 123 | + | ||
| 124 | +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( | ||
| 125 | + IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B | ||
| 126 | +) | ||
| 127 | + | ||
| 128 | +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central | ||
| 129 | +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. | ||
| 130 | +if exist %WRAPPER_JAR% ( | ||
| 131 | + if "%MVNW_VERBOSE%" == "true" ( | ||
| 132 | + echo Found %WRAPPER_JAR% | ||
| 133 | + ) | ||
| 134 | +) else ( | ||
| 135 | + if not "%MVNW_REPOURL%" == "" ( | ||
| 136 | + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar" | ||
| 137 | + ) | ||
| 138 | + if "%MVNW_VERBOSE%" == "true" ( | ||
| 139 | + echo Couldn't find %WRAPPER_JAR%, downloading it ... | ||
| 140 | + echo Downloading from: %WRAPPER_URL% | ||
| 141 | + ) | ||
| 142 | + | ||
| 143 | + powershell -Command "&{"^ | ||
| 144 | + "$webclient = new-object System.Net.WebClient;"^ | ||
| 145 | + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ | ||
| 146 | + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ | ||
| 147 | + "}"^ | ||
| 148 | + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ | ||
| 149 | + "}" | ||
| 150 | + if "%MVNW_VERBOSE%" == "true" ( | ||
| 151 | + echo Finished downloading %WRAPPER_JAR% | ||
| 152 | + ) | ||
| 153 | +) | ||
| 154 | +@REM End of extension | ||
| 155 | + | ||
| 156 | +@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file | ||
| 157 | +SET WRAPPER_SHA_256_SUM="" | ||
| 158 | +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( | ||
| 159 | + IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B | ||
| 160 | +) | ||
| 161 | +IF NOT %WRAPPER_SHA_256_SUM%=="" ( | ||
| 162 | + powershell -Command "&{"^ | ||
| 163 | + "Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash;"^ | ||
| 164 | + "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ | ||
| 165 | + "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ | ||
| 166 | + " Write-Error 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ | ||
| 167 | + " Write-Error 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ | ||
| 168 | + " Write-Error 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ | ||
| 169 | + " exit 1;"^ | ||
| 170 | + "}"^ | ||
| 171 | + "}" | ||
| 172 | + if ERRORLEVEL 1 goto error | ||
| 173 | +) | ||
| 174 | + | ||
| 175 | +@REM Provide a "standardized" way to retrieve the CLI args that will | ||
| 176 | +@REM work with both Windows and non-Windows executions. | ||
| 177 | +set MAVEN_CMD_LINE_ARGS=%* | ||
| 178 | + | ||
| 179 | +%MAVEN_JAVA_EXE% ^ | ||
| 180 | + %JVM_CONFIG_MAVEN_PROPS% ^ | ||
| 181 | + %MAVEN_OPTS% ^ | ||
| 182 | + %MAVEN_DEBUG_OPTS% ^ | ||
| 183 | + -classpath %WRAPPER_JAR% ^ | ||
| 184 | + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ | ||
| 185 | + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* | ||
| 186 | +if ERRORLEVEL 1 goto error | ||
| 187 | +goto end | ||
| 188 | + | ||
| 189 | +:error | ||
| 190 | +set ERROR_CODE=1 | ||
| 191 | + | ||
| 192 | +:end | ||
| 193 | +@endlocal & set ERROR_CODE=%ERROR_CODE% | ||
| 194 | + | ||
| 195 | +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost | ||
| 196 | +@REM check for post script, once with legacy .bat ending and once with .cmd ending | ||
| 197 | +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" | ||
| 198 | +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" | ||
| 199 | +:skipRcPost | ||
| 200 | + | ||
| 201 | +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' | ||
| 202 | +if "%MAVEN_BATCH_PAUSE%"=="on" pause | ||
| 203 | + | ||
| 204 | +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% | ||
| 205 | + | ||
| 206 | +cmd /C exit /B %ERROR_CODE% |
pom.xml
0 → 100644
| 1 | +++ a/pom.xml | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 5 | + <modelVersion>4.0.0</modelVersion> | ||
| 6 | + <groupId>com.diligrp</groupId> | ||
| 7 | + <artifactId>tax-agent</artifactId> | ||
| 8 | + <version>${revision}</version> | ||
| 9 | + <packaging>pom</packaging> | ||
| 10 | + | ||
| 11 | + <modules> | ||
| 12 | + <module>tax-boot</module> | ||
| 13 | + <module>tax-central</module> | ||
| 14 | + <module>tax-doc</module> | ||
| 15 | + <module>tax-map</module> | ||
| 16 | + <module>tax-proxy</module> | ||
| 17 | + <module>tax-storage</module> | ||
| 18 | + </modules> | ||
| 19 | + | ||
| 20 | + <properties> | ||
| 21 | + <revision>1.0.0</revision> | ||
| 22 | + <!-- Java版本 --> | ||
| 23 | + <java.version>21</java.version> | ||
| 24 | + <maven.compiler.source>${java.version}</maven.compiler.source> | ||
| 25 | + <maven.compiler.target>${java.version}</maven.compiler.target> | ||
| 26 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| 27 | + <!-- Spring相关版本 --> | ||
| 28 | + <spring-cloud.version>2025.0.0</spring-cloud.version> | ||
| 29 | + <spring-boot.version>3.5.7</spring-boot.version> | ||
| 30 | + <alibaba.cloud.version>2023.0.3.4</alibaba.cloud.version> | ||
| 31 | + <!-- 数据库相关 --> | ||
| 32 | + <mysql-connector.version>9.4.0</mysql-connector.version> | ||
| 33 | + <mybatis-plus.version>3.5.14</mybatis-plus.version> | ||
| 34 | + <!-- 工具类库 --> | ||
| 35 | + <lombok.version>1.18.42</lombok.version> | ||
| 36 | + </properties> | ||
| 37 | + | ||
| 38 | + <dependencyManagement> | ||
| 39 | + <dependencies> | ||
| 40 | + <dependency> | ||
| 41 | + <groupId>com.baomidou</groupId> | ||
| 42 | + <artifactId>mybatis-plus-spring-boot3-starter</artifactId> | ||
| 43 | + <version>${mybatis-plus.version}</version> | ||
| 44 | + </dependency> | ||
| 45 | + <dependency> | ||
| 46 | + <groupId>org.springframework.boot</groupId> | ||
| 47 | + <artifactId>spring-boot-dependencies</artifactId> | ||
| 48 | + <version>${spring-boot.version}</version> | ||
| 49 | + <type>pom</type> | ||
| 50 | + <scope>import</scope> | ||
| 51 | + </dependency> | ||
| 52 | + <dependency> | ||
| 53 | + <groupId>org.springframework.cloud</groupId> | ||
| 54 | + <artifactId>spring-cloud-dependencies</artifactId> | ||
| 55 | + <version>${spring-cloud.version}</version> | ||
| 56 | + <type>pom</type> | ||
| 57 | + <scope>import</scope> | ||
| 58 | + </dependency> | ||
| 59 | + <dependency> | ||
| 60 | + <groupId>com.alibaba.cloud</groupId> | ||
| 61 | + <artifactId>spring-cloud-alibaba-dependencies</artifactId> | ||
| 62 | + <version>${alibaba.cloud.version}</version> | ||
| 63 | + <type>pom</type> | ||
| 64 | + <scope>import</scope> | ||
| 65 | + </dependency> | ||
| 66 | + <dependency> | ||
| 67 | + <groupId>com.mysql</groupId> | ||
| 68 | + <artifactId>mysql-connector-j</artifactId> | ||
| 69 | + <version>${mysql-connector.version}</version> | ||
| 70 | + </dependency> | ||
| 71 | + </dependencies> | ||
| 72 | + </dependencyManagement> | ||
| 73 | + | ||
| 74 | + <build> | ||
| 75 | + <pluginManagement> | ||
| 76 | + <plugins> | ||
| 77 | + <plugin> | ||
| 78 | + <groupId>org.springframework.boot</groupId> | ||
| 79 | + <artifactId>spring-boot-maven-plugin</artifactId> | ||
| 80 | + <version>${spring-boot.version}</version> | ||
| 81 | + <executions> | ||
| 82 | + <execution> | ||
| 83 | + <goals> | ||
| 84 | + <goal>repackage</goal> | ||
| 85 | + </goals> | ||
| 86 | + </execution> | ||
| 87 | + </executions> | ||
| 88 | + </plugin> | ||
| 89 | + <plugin> | ||
| 90 | + <groupId>org.apache.maven.plugins</groupId> | ||
| 91 | + <artifactId>maven-compiler-plugin</artifactId> | ||
| 92 | + <configuration> | ||
| 93 | + <source>${maven.compiler.source}</source> | ||
| 94 | + <target>${maven.compiler.target}</target> | ||
| 95 | + <encoding>${project.build.sourceEncoding}</encoding> | ||
| 96 | + <annotationProcessorPaths> | ||
| 97 | + <path> | ||
| 98 | + <groupId>org.projectlombok</groupId> | ||
| 99 | + <artifactId>lombok</artifactId> | ||
| 100 | + <version>${lombok.version}</version> | ||
| 101 | + </path> | ||
| 102 | + </annotationProcessorPaths> | ||
| 103 | + </configuration> | ||
| 104 | + </plugin> | ||
| 105 | + </plugins> | ||
| 106 | + </pluginManagement> | ||
| 107 | + </build> | ||
| 108 | + | ||
| 109 | + <repositories> | ||
| 110 | + <repository> | ||
| 111 | + <id>aliyun</id> | ||
| 112 | + <url>https://maven.aliyun.com/repository/public</url> | ||
| 113 | + <layout>default</layout> | ||
| 114 | + <releases> | ||
| 115 | + <enabled>true</enabled> | ||
| 116 | + </releases> | ||
| 117 | + <snapshots> | ||
| 118 | + <enabled>false</enabled> | ||
| 119 | + </snapshots> | ||
| 120 | + </repository> | ||
| 121 | + <repository> | ||
| 122 | + <id>diligrp-mvn2</id> | ||
| 123 | + <name>libs-snapshot</name> | ||
| 124 | + <url>http://mvn2.diligrp.com/artifactory/libs-snapshot-local/</url> | ||
| 125 | + <layout>default</layout> | ||
| 126 | + <snapshots> | ||
| 127 | + <enabled>true</enabled> | ||
| 128 | + </snapshots> | ||
| 129 | + </repository> | ||
| 130 | + </repositories> | ||
| 131 | + <pluginRepositories> | ||
| 132 | + <pluginRepository> | ||
| 133 | + <id>aliyun</id> | ||
| 134 | + <url>https://maven.aliyun.com/repository/public</url> | ||
| 135 | + <releases> | ||
| 136 | + <enabled>true</enabled> | ||
| 137 | + </releases> | ||
| 138 | + <snapshots> | ||
| 139 | + <enabled>false</enabled> | ||
| 140 | + </snapshots> | ||
| 141 | + </pluginRepository> | ||
| 142 | + </pluginRepositories> | ||
| 143 | +</project> |
tax-boot/pom.xml
0 → 100644
| 1 | +++ a/tax-boot/pom.xml | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 5 | + <modelVersion>4.0.0</modelVersion> | ||
| 6 | + | ||
| 7 | + <artifactId>tax-boot</artifactId> | ||
| 8 | + <version>${revision}</version> | ||
| 9 | + <packaging>jar</packaging> | ||
| 10 | + | ||
| 11 | + <parent> | ||
| 12 | + <groupId>com.diligrp</groupId> | ||
| 13 | + <artifactId>tax-agent</artifactId> | ||
| 14 | + <version>${revision}</version> | ||
| 15 | + </parent> | ||
| 16 | + <dependencies> | ||
| 17 | + <dependency> | ||
| 18 | + <groupId>com.diligrp</groupId> | ||
| 19 | + <artifactId>tax-doc</artifactId> | ||
| 20 | + <version>${revision}</version> | ||
| 21 | + </dependency> | ||
| 22 | + <dependency> | ||
| 23 | + <groupId>com.diligrp</groupId> | ||
| 24 | + <artifactId>tax-map</artifactId> | ||
| 25 | + <version>${revision}</version> | ||
| 26 | + </dependency> | ||
| 27 | + <dependency> | ||
| 28 | + <groupId>com.diligrp</groupId> | ||
| 29 | + <artifactId>tax-proxy</artifactId> | ||
| 30 | + <version>${revision}</version> | ||
| 31 | + </dependency> | ||
| 32 | + <dependency> | ||
| 33 | + <groupId>com.diligrp</groupId> | ||
| 34 | + <artifactId>tax-storage</artifactId> | ||
| 35 | + <version>${revision}</version> | ||
| 36 | + </dependency> | ||
| 37 | + <dependency> | ||
| 38 | + <groupId>org.springframework.cloud</groupId> | ||
| 39 | + <artifactId>spring-cloud-starter-bootstrap</artifactId> | ||
| 40 | + </dependency> | ||
| 41 | + <dependency> | ||
| 42 | + <groupId>com.alibaba.cloud</groupId> | ||
| 43 | + <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> | ||
| 44 | + </dependency> | ||
| 45 | + <dependency> | ||
| 46 | + <groupId>com.alibaba.cloud</groupId> | ||
| 47 | + <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> | ||
| 48 | + </dependency> | ||
| 49 | + </dependencies> | ||
| 50 | + <build> | ||
| 51 | + <plugins> | ||
| 52 | + <plugin> | ||
| 53 | + <groupId>org.springframework.boot</groupId> | ||
| 54 | + <artifactId>spring-boot-maven-plugin</artifactId> | ||
| 55 | +<!-- <configuration>--> | ||
| 56 | +<!-- <jvmArguments>-XX:+UseCompressedOops -XX:+UseCompressedClassPointers</jvmArguments>--> | ||
| 57 | +<!-- </configuration>--> | ||
| 58 | + <executions> | ||
| 59 | + <execution> | ||
| 60 | + <goals> | ||
| 61 | + <goal>repackage</goal> | ||
| 62 | + </goals> | ||
| 63 | + </execution> | ||
| 64 | + </executions> | ||
| 65 | + </plugin> | ||
| 66 | + </plugins> | ||
| 67 | + </build> | ||
| 68 | +</project> |
tax-boot/src/main/java/com/diligrp/tax/boot/TaxApplication.java
0 → 100644
| 1 | +++ a/tax-boot/src/main/java/com/diligrp/tax/boot/TaxApplication.java | ||
| 1 | +package com.diligrp.tax.boot; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.diligrp.tax.central.CentralConfig; | ||
| 5 | +import com.diligrp.tax.central.process.Processor; | ||
| 6 | +import com.diligrp.tax.central.process.ProcessorChain; | ||
| 7 | +import com.diligrp.tax.central.type.SystemType; | ||
| 8 | +import com.diligrp.tax.doc.OrderConfig; | ||
| 9 | +import com.diligrp.tax.doc.process.kingdee.InitializeProcessor; | ||
| 10 | +import com.diligrp.tax.mapping.ConvConfig; | ||
| 11 | +import com.diligrp.tax.mapping.process.kingdee.MappingProcessor; | ||
| 12 | +import com.diligrp.tax.proxy.ProxyConfig; | ||
| 13 | +import com.diligrp.tax.proxy.process.kingdee.ProxyProcessor; | ||
| 14 | +import com.diligrp.tax.storage.StorageConfig; | ||
| 15 | +import org.springframework.boot.SpringApplication; | ||
| 16 | +import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
| 17 | +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | ||
| 18 | +import org.springframework.context.annotation.Bean; | ||
| 19 | +import org.springframework.context.annotation.Import; | ||
| 20 | + | ||
| 21 | +import java.util.Arrays; | ||
| 22 | +import java.util.List; | ||
| 23 | +import java.util.Map; | ||
| 24 | +import java.util.concurrent.ConcurrentHashMap; | ||
| 25 | + | ||
| 26 | +@SpringBootApplication | ||
| 27 | +@EnableDiscoveryClient | ||
| 28 | +@Import({CentralConfig.class, ConvConfig.class, OrderConfig.class, ProxyConfig.class, StorageConfig.class}) | ||
| 29 | +public class TaxApplication { | ||
| 30 | + public static void main(String[] args) { | ||
| 31 | + SpringApplication.run(TaxApplication.class, args); | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + @Bean | ||
| 35 | + public Map<SystemType, ProcessorChain> processorChainMap(InitializeProcessor initializeProcessor, MappingProcessor mappingProcessor, ProxyProcessor proxySendProcessor) { | ||
| 36 | + Map<SystemType, ProcessorChain> map = new ConcurrentHashMap<>(); | ||
| 37 | + List<Processor> processors = Arrays.asList( | ||
| 38 | + initializeProcessor, | ||
| 39 | + mappingProcessor, | ||
| 40 | + proxySendProcessor | ||
| 41 | + ); | ||
| 42 | + ProcessorChain processorChain = new ProcessorChain(processors); | ||
| 43 | + map.put(SystemType.KING_DEE, processorChain); | ||
| 44 | + return map; | ||
| 45 | + } | ||
| 46 | +} |
tax-boot/src/main/java/com/diligrp/tax/boot/queue/TaxAutoPush.java
0 → 100644
| 1 | +++ a/tax-boot/src/main/java/com/diligrp/tax/boot/queue/TaxAutoPush.java | ||
| 1 | +package com.diligrp.tax.boot.queue; | ||
| 2 | + | ||
| 3 | +import org.springframework.amqp.core.*; | ||
| 4 | +import org.springframework.beans.factory.annotation.Qualifier; | ||
| 5 | +import org.springframework.context.annotation.Bean; | ||
| 6 | +import org.springframework.context.annotation.Configuration; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @Author: zhangmeiyang | ||
| 10 | + * @CreateTime: 2024-09-02 15:51 | ||
| 11 | + * @Version: todo | ||
| 12 | + */ | ||
| 13 | +@Configuration | ||
| 14 | +public class TaxAutoPush { | ||
| 15 | + public static final String NORMAL_EXCHANGE = "tax-agent.exchange"; | ||
| 16 | + public static final String NORMAL_QUEUE = "tax-agent.queue"; | ||
| 17 | + public static final String NORMAL_ROUTING = "tax-agent.routing.process"; | ||
| 18 | + | ||
| 19 | + @Bean("normalExchange") | ||
| 20 | + public DirectExchange normalExchange() { | ||
| 21 | + return new DirectExchange(NORMAL_EXCHANGE, true, false); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + @Bean("normalQueue") | ||
| 25 | + public Queue normalQueue() { | ||
| 26 | + return new Queue(NORMAL_QUEUE); | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + @Bean("normalBinding") | ||
| 30 | + public Binding normalBinding(@Qualifier("normalQueue") Queue normalQueue, @Qualifier("normalExchange") DirectExchange normalExchange) { | ||
| 31 | + return BindingBuilder.bind(normalQueue).to(normalExchange).with(NORMAL_ROUTING); | ||
| 32 | + } | ||
| 33 | +} |
tax-boot/src/main/java/com/diligrp/tax/boot/receiver/TaxReceiver.java
0 → 100644
| 1 | +++ a/tax-boot/src/main/java/com/diligrp/tax/boot/receiver/TaxReceiver.java | ||
| 1 | +package com.diligrp.tax.boot.receiver; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.context.Context; | ||
| 4 | +import com.diligrp.tax.central.process.ProcessorChain; | ||
| 5 | +import com.diligrp.tax.central.type.StatusType; | ||
| 6 | +import com.diligrp.tax.central.type.SystemType; | ||
| 7 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 8 | +import com.rabbitmq.client.Channel; | ||
| 9 | +import jakarta.annotation.Resource; | ||
| 10 | +import lombok.extern.slf4j.Slf4j; | ||
| 11 | +import org.springframework.amqp.core.Message; | ||
| 12 | +import org.springframework.amqp.rabbit.annotation.Exchange; | ||
| 13 | +import org.springframework.amqp.rabbit.annotation.Queue; | ||
| 14 | +import org.springframework.amqp.rabbit.annotation.QueueBinding; | ||
| 15 | +import org.springframework.amqp.rabbit.annotation.RabbitListener; | ||
| 16 | +import org.springframework.stereotype.Component; | ||
| 17 | + | ||
| 18 | +import java.io.IOException; | ||
| 19 | +import java.io.PrintWriter; | ||
| 20 | +import java.io.StringWriter; | ||
| 21 | +import java.nio.charset.StandardCharsets; | ||
| 22 | +import java.util.Map; | ||
| 23 | +import java.util.Optional; | ||
| 24 | + | ||
| 25 | +import static com.diligrp.tax.boot.queue.TaxAutoPush.*; | ||
| 26 | + | ||
| 27 | + | ||
| 28 | +/** | ||
| 29 | + * @Author: zhangmeiyang | ||
| 30 | + * @CreateTime: 2024-09-02 16:32 | ||
| 31 | + * @Version: todo | ||
| 32 | + */ | ||
| 33 | +@Component | ||
| 34 | +@Slf4j | ||
| 35 | +public class TaxReceiver { | ||
| 36 | + | ||
| 37 | + @Resource | ||
| 38 | + private Map<SystemType, ProcessorChain> processorChainMap; | ||
| 39 | + | ||
| 40 | + @RabbitListener(bindings = | ||
| 41 | + @QueueBinding( | ||
| 42 | + value = @Queue(value = NORMAL_QUEUE, autoDelete = "false"), | ||
| 43 | + exchange = @Exchange(value = NORMAL_EXCHANGE), | ||
| 44 | + key = NORMAL_ROUTING), | ||
| 45 | + ackMode = "MANUAL" | ||
| 46 | + ) | ||
| 47 | + public void receiveMessage(Channel channel, Message message) throws IOException { | ||
| 48 | + var content = new String(message.getBody(), StandardCharsets.UTF_8); | ||
| 49 | + log.info("tax-agent收到消息:{}", content); | ||
| 50 | + Context ctx = JsonUtils.fromJsonString(content, Context.class); | ||
| 51 | + try { | ||
| 52 | + handle(ctx); | ||
| 53 | + channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); | ||
| 54 | + log.info("tax-agent消息处理成功:{}", content); | ||
| 55 | + } catch (Exception e) { | ||
| 56 | + channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); | ||
| 57 | + recordError(e, ctx); | ||
| 58 | + log.error("tax-agent消息处理失败:", e); | ||
| 59 | + } | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + private void handle(Context ctx) { | ||
| 63 | + Context context = processorChainMap.get(SystemType.from(ctx.getSystemType())).startProcess(ctx); | ||
| 64 | + context.setStatus(StatusType.SUCCESS.code); | ||
| 65 | + //TODO write to db | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + private void recordError(Exception e, Context ctx) { | ||
| 69 | + StringWriter sw = new StringWriter(); | ||
| 70 | + PrintWriter pw = new PrintWriter(sw); | ||
| 71 | + e.printStackTrace(pw); | ||
| 72 | + ctx.setError(sw.toString()); | ||
| 73 | + ctx.setStatus(StatusType.FAIL.code); | ||
| 74 | + //TODO write error to db | ||
| 75 | + } | ||
| 76 | +} |
tax-boot/src/main/resources/application.properties
0 → 100644
| 1 | +++ a/tax-boot/src/main/resources/application.properties | ||
| 1 | +server.port=9999 | ||
| 2 | +spring.profiles.active=dev | ||
| 3 | +spring.application.name=tax-agent | ||
| 4 | +spring.cloud.nacos.discovery.enabled=true | ||
| 5 | +spring.cloud.nacos.discovery.group=MICROSERVICE | ||
| 6 | +spring.cloud.nacos.discovery.server-addr=nacos.diligrp.com:8848 | ||
| 7 | +spring.cloud.nacos.discovery.namespace=54c39cfe-d1c4-4022-a94b-a3486c5927fc | ||
| 8 | +spring.cloud.nacos.config.enabled=true | ||
| 9 | +spring.cloud.nacos.config.group=MICROSERVICE | ||
| 10 | +spring.cloud.nacos.config.server-addr=nacos.diligrp.com:8848 | ||
| 11 | +spring.cloud.nacos.config.namespace=54c39cfe-d1c4-4022-a94b-a3486c5927fc | ||
| 12 | +spring.config.import[0]=nacos:${spring.application.name}.properties | ||
| 13 | +spring.config.import[1]=nacos:${spring.application.name}-${spring.profiles.active}.properties | ||
| 14 | +#mybatis-plus | ||
| 15 | +logging.config=classpath:logback-spring.xml | ||
| 16 | +mybatis-plus.mapper-locations=classpath*:com/diligrp/tax/**/repo/*.xml | ||
| 17 | +mybatis-plus.configuration.map-underscore-to-camel-case=true | ||
| 18 | +mybatis-plus.configuration.cache-enabled=true | ||
| 19 | +mybatis-plus.global-config.banner=false | ||
| 20 | +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver | ||
| 21 | +spring.datasource.url=jdbc:mysql://mysql.diligrp.com:3306/dili_tax?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT%2B8 | ||
| 22 | +spring.datasource.username=root | ||
| 23 | +spring.datasource.password=OTM0NjAwMTMyMjZlNzgy | ||
| 24 | +spring.datasource.type=com.zaxxer.hikari.HikariDataSource | ||
| 25 | +spring.datasource.hikari.pool-name=ErpHikariPool | ||
| 26 | +spring.datasource.hikari.minimum-idle=4 | ||
| 27 | +spring.datasource.hikari.maximum-pool-size=60 | ||
| 28 | +spring.datasource.hikari.idle-timeout=120000 | ||
| 29 | +spring.datasource.hikari.max-lifetime=900000 | ||
| 30 | +spring.datasource.hikari.connection-timeout=15000 | ||
| 31 | +spring.datasource.hikari.connection-test-query=SELECT 1 |
tax-boot/src/main/resources/logback-spring.xml
0 → 100644
| 1 | +++ a/tax-boot/src/main/resources/logback-spring.xml | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<configuration> | ||
| 3 | + <!-- 日志名称 --> | ||
| 4 | + <property name="LOG_NAME" value="tax-agent"/> | ||
| 5 | + <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径 --> | ||
| 6 | + <property name="LOG_HOME" value="logs"/> | ||
| 7 | + <!-- springProperty读取springboot配置属性 --> | ||
| 8 | + <springProperty scope="context" name="build.profile.id" source="spring.profiles.active"/> | ||
| 9 | + <statusListener class="ch.qos.logback.core.status.NopStatusListener"/> | ||
| 10 | + <!-- 日志控制台输出 --> | ||
| 11 | + <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||
| 12 | + <encoder> | ||
| 13 | + <pattern>%d %-5level [${LOG_NAME}-${build.profile.id}] [%t] [%c:%L] -| %msg%n</pattern> | ||
| 14 | + </encoder> | ||
| 15 | + </appender> | ||
| 16 | + <!-- 日志文件输出 --> | ||
| 17 | + <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | ||
| 18 | + <file>${LOG_HOME}/${LOG_NAME}.log</file> | ||
| 19 | + <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> | ||
| 20 | + <!--日志文件输出的文件名 --> | ||
| 21 | + <fileNamePattern>${LOG_HOME}/%d{yyyy-MM-dd}/${LOG_NAME}_%i.log.zip</fileNamePattern> | ||
| 22 | + <!--日志文件保留天数(FileNamePattern中的%d 格式有关,如果yyyy-MM-dd 则是天数) --> | ||
| 23 | + <maxHistory>30</maxHistory> | ||
| 24 | + <!--日志文件最大的大小 --> | ||
| 25 | + <maxFileSize>10MB</maxFileSize> | ||
| 26 | + </rollingPolicy> | ||
| 27 | + <encoder> | ||
| 28 | + <pattern>%d %-5level [${LOG_NAME}-${build.profile.id}] [%t] [%c:%L]-| %msg%n</pattern> | ||
| 29 | + </encoder> | ||
| 30 | + </appender> | ||
| 31 | + | ||
| 32 | + <logger name="com.diligrp.tax.storage.repo" level="DEBUG"> | ||
| 33 | + <appender-ref ref="CONSOLE"/> | ||
| 34 | + <appender-ref ref="FILE"/> | ||
| 35 | + </logger> | ||
| 36 | + | ||
| 37 | + <!-- 开发环境 --> | ||
| 38 | + <springProfile name="dev"> | ||
| 39 | + <root level="INFO"> | ||
| 40 | + <appender-ref ref="CONSOLE"/> | ||
| 41 | + <appender-ref ref="FILE"/> | ||
| 42 | + </root> | ||
| 43 | + <logger name="com.diligrp.tax" level="DEBUG" additivity="false"> | ||
| 44 | + <appender-ref ref="CONSOLE"/> | ||
| 45 | + <appender-ref ref="FILE"/> | ||
| 46 | + </logger> | ||
| 47 | + <logger name="com.alibaba" level="ERROR" additivity="false"> | ||
| 48 | + <appender-ref ref="CONSOLE"/> | ||
| 49 | + <appender-ref ref="FILE"/> | ||
| 50 | + </logger> | ||
| 51 | + </springProfile> | ||
| 52 | + | ||
| 53 | + <!-- 测试环境 --> | ||
| 54 | + <springProfile name="test"> | ||
| 55 | + <root level="INFO"> | ||
| 56 | + <appender-ref ref="CONSOLE"/> | ||
| 57 | + <appender-ref ref="FILE"/> | ||
| 58 | + </root> | ||
| 59 | + <logger name="com.diligrp.tax" level="DEBUG"> | ||
| 60 | + <appender-ref ref="CONSOLE"/> | ||
| 61 | + <appender-ref ref="FILE"/> | ||
| 62 | + </logger> | ||
| 63 | + | ||
| 64 | + <logger name="com.alibaba" level="ERROR" additivity="false"> | ||
| 65 | + <appender-ref ref="CONSOLE"/> | ||
| 66 | + <appender-ref ref="FILE"/> | ||
| 67 | + </logger> | ||
| 68 | + </springProfile> | ||
| 69 | + | ||
| 70 | + <!-- 灰度、生产环境 --> | ||
| 71 | + <springProfile name="pre,prod"> | ||
| 72 | + <root level="INFO"> | ||
| 73 | + <appender-ref ref="CONSOLE"/> | ||
| 74 | + <appender-ref ref="FILE"/> | ||
| 75 | + </root> | ||
| 76 | + <logger name="com.diligrp.tax" level="INFO"> | ||
| 77 | + <appender-ref ref="FILE"/> | ||
| 78 | + </logger> | ||
| 79 | + <logger name="com.alibaba" level="ERROR" additivity="false"> | ||
| 80 | + <appender-ref ref="CONSOLE"/> | ||
| 81 | + <appender-ref ref="FILE"/> | ||
| 82 | + </logger> | ||
| 83 | + </springProfile> | ||
| 84 | +</configuration> |
tax-central/pom.xml
0 → 100644
| 1 | +++ a/tax-central/pom.xml | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 5 | + <modelVersion>4.0.0</modelVersion> | ||
| 6 | + | ||
| 7 | + <artifactId>tax-central</artifactId> | ||
| 8 | + <version>${revision}</version> | ||
| 9 | + <packaging>jar</packaging> | ||
| 10 | + | ||
| 11 | + <parent> | ||
| 12 | + <groupId>com.diligrp</groupId> | ||
| 13 | + <artifactId>tax-agent</artifactId> | ||
| 14 | + <version>${revision}</version> | ||
| 15 | + </parent> | ||
| 16 | + <dependencies> | ||
| 17 | + <dependency> | ||
| 18 | + <groupId>org.projectlombok</groupId> | ||
| 19 | + <artifactId>lombok</artifactId> | ||
| 20 | + </dependency> | ||
| 21 | + <dependency> | ||
| 22 | + <groupId>org.springframework.boot</groupId> | ||
| 23 | + <artifactId>spring-boot-starter-web</artifactId> | ||
| 24 | + </dependency> | ||
| 25 | + <dependency> | ||
| 26 | + <groupId>org.springframework.boot</groupId> | ||
| 27 | + <artifactId>spring-boot-starter-amqp</artifactId> | ||
| 28 | + </dependency> | ||
| 29 | + <dependency> | ||
| 30 | + <groupId>org.springframework.boot</groupId> | ||
| 31 | + <artifactId>spring-boot-starter-validation</artifactId> | ||
| 32 | + </dependency> | ||
| 33 | + <dependency> | ||
| 34 | + <groupId>com.kingdee</groupId> | ||
| 35 | + <artifactId>k3cloud-webapi-sdk</artifactId> | ||
| 36 | + <version>8.0.6</version> | ||
| 37 | + <scope>system</scope> | ||
| 38 | + <systemPath>${project.basedir}/src/main/resources/lib/k3cloud-webapi-sdk8.0.6.jar</systemPath> | ||
| 39 | + </dependency> | ||
| 40 | + </dependencies> | ||
| 41 | + | ||
| 42 | +</project> |
tax-central/src/main/java/com/diligrp/tax/central/CentralConfig.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/CentralConfig.java | ||
| 1 | +package com.diligrp.tax.central; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import org.springframework.context.annotation.ComponentScan; | ||
| 5 | +import org.springframework.context.annotation.Configuration; | ||
| 6 | + | ||
| 7 | +@Configuration | ||
| 8 | +@ComponentScan(basePackages = "com.diligrp.tax.central") | ||
| 9 | +public class CentralConfig { | ||
| 10 | +} |
tax-central/src/main/java/com/diligrp/tax/central/context/Context.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/context/Context.java | ||
| 1 | +package com.diligrp.tax.central.context; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseDocument; | ||
| 4 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 5 | +import com.diligrp.tax.central.domain.BaseProxy; | ||
| 6 | +import lombok.Getter; | ||
| 7 | +import lombok.Setter; | ||
| 8 | + | ||
| 9 | +@Setter | ||
| 10 | +@Getter | ||
| 11 | +public class Context { | ||
| 12 | + /** | ||
| 13 | + * 开放 ID | ||
| 14 | + */ | ||
| 15 | + private String thirdPartyCode; | ||
| 16 | + /** | ||
| 17 | + * 租户 ID | ||
| 18 | + */ | ||
| 19 | + private String tenantId; | ||
| 20 | + /** | ||
| 21 | + * 消息信息 | ||
| 22 | + */ | ||
| 23 | + private String msgBody; | ||
| 24 | + /** | ||
| 25 | + * 公文 | ||
| 26 | + */ | ||
| 27 | + private BaseDocument documentObject; | ||
| 28 | + /** | ||
| 29 | + * 映射对象 | ||
| 30 | + */ | ||
| 31 | + private BaseMapping mappingObject; | ||
| 32 | + /** | ||
| 33 | + * 代理对象 | ||
| 34 | + */ | ||
| 35 | + private BaseProxy proxyObject; | ||
| 36 | + /** | ||
| 37 | + * 系统类型 | ||
| 38 | + */ | ||
| 39 | + private String systemType; | ||
| 40 | + /** | ||
| 41 | + * 文档类型 | ||
| 42 | + */ | ||
| 43 | + private String documentType; | ||
| 44 | + /** | ||
| 45 | + * 错误 | ||
| 46 | + */ | ||
| 47 | + private String error; | ||
| 48 | + /** | ||
| 49 | + * 成功标志 | ||
| 50 | + */ | ||
| 51 | + private Integer status; | ||
| 52 | +} |
tax-central/src/main/java/com/diligrp/tax/central/context/ConverterContext.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/context/ConverterContext.java | ||
| 1 | +package com.diligrp.tax.central.context; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.converter.ISubConverter; | ||
| 5 | +import jakarta.annotation.Resource; | ||
| 6 | +import org.springframework.beans.factory.DisposableBean; | ||
| 7 | +import org.springframework.beans.factory.InitializingBean; | ||
| 8 | +import org.springframework.stereotype.Component; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Map; | ||
| 12 | +import java.util.concurrent.ConcurrentHashMap; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * @Author: zhangmeiyang | ||
| 16 | + * @CreateTime: 2025-10-31 16:09 | ||
| 17 | + * @Version: todo | ||
| 18 | + */ | ||
| 19 | +@Component | ||
| 20 | +public class ConverterContext implements InitializingBean, DisposableBean { | ||
| 21 | + | ||
| 22 | + public static final Map<Class<?>, IConverter<?>> CONVERTER_MAP = new ConcurrentHashMap<>(); | ||
| 23 | + public static final Map<Class<?>, ISubConverter<?>> SUB_CONVERTER_MAP = new ConcurrentHashMap<>(); | ||
| 24 | + | ||
| 25 | + @Resource | ||
| 26 | + private List<IConverter<?>> converters; | ||
| 27 | + | ||
| 28 | + @Resource | ||
| 29 | + private List<ISubConverter<?>> subConverters; | ||
| 30 | + | ||
| 31 | + @Override | ||
| 32 | + public void destroy() throws Exception { | ||
| 33 | + | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + @Override | ||
| 37 | + public void afterPropertiesSet() throws Exception { | ||
| 38 | + converters.forEach(c -> CONVERTER_MAP.put(c.getClass(), c)); | ||
| 39 | + subConverters.forEach(c -> SUB_CONVERTER_MAP.put(c.getClass(), c)); | ||
| 40 | + } | ||
| 41 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/IConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/IConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * 转换器接口 | ||
| 5 | + * | ||
| 6 | + * @author zhangmeiyang | ||
| 7 | + * @date 2025/10/29 | ||
| 8 | + */ | ||
| 9 | +public interface IConverter<R> { | ||
| 10 | + /** | ||
| 11 | + * 转换 | ||
| 12 | + * | ||
| 13 | + * @param source 源 | ||
| 14 | + * @return {@link R } | ||
| 15 | + */ | ||
| 16 | + R convert(Object source); | ||
| 17 | + | ||
| 18 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/ISubConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/ISubConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2025-11-03 11:22 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public interface ISubConverter<R> { | ||
| 11 | + | ||
| 12 | + /** | ||
| 13 | + * 转换 | ||
| 14 | + * | ||
| 15 | + * @param sources 来源 | ||
| 16 | + * @return {@link R } | ||
| 17 | + */ | ||
| 18 | + R convert(List<?> sources); | ||
| 19 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/anno/Converter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/anno/Converter.java | ||
| 1 | +package com.diligrp.tax.central.converter.anno; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | + | ||
| 5 | +import java.lang.annotation.ElementType; | ||
| 6 | +import java.lang.annotation.Retention; | ||
| 7 | +import java.lang.annotation.RetentionPolicy; | ||
| 8 | +import java.lang.annotation.Target; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * 标注在字段上,表示该字段的值需要通过指定的Class作为转换器生成新对象 | ||
| 12 | + */ | ||
| 13 | +@Target(ElementType.FIELD) | ||
| 14 | +@Retention(RetentionPolicy.RUNTIME) | ||
| 15 | +public @interface Converter { | ||
| 16 | + /** | ||
| 17 | + * 指定转换器Class | ||
| 18 | + */ | ||
| 19 | + Class<? extends IConverter<?>> value(); | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 目标对象的字段名,默认为空表示字段名相同 | ||
| 24 | + */ | ||
| 25 | + String targetField(); | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/anno/SubConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/anno/SubConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.anno; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.ISubConverter; | ||
| 4 | + | ||
| 5 | +import java.lang.annotation.ElementType; | ||
| 6 | +import java.lang.annotation.Retention; | ||
| 7 | +import java.lang.annotation.RetentionPolicy; | ||
| 8 | +import java.lang.annotation.Target; | ||
| 9 | + | ||
| 10 | +@Target(ElementType.FIELD) | ||
| 11 | +@Retention(RetentionPolicy.RUNTIME) | ||
| 12 | +public @interface SubConverter { | ||
| 13 | + /** | ||
| 14 | + * 指定转换器Class | ||
| 15 | + */ | ||
| 16 | + Class<? extends ISubConverter> value(); | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + /** | ||
| 20 | + * 目标对象的字段名,默认为空表示字段名相同 | ||
| 21 | + */ | ||
| 22 | + String targetField(); | ||
| 23 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/BankCardNumberConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/BankCardNumberConverter.java | ||
| 1 | + | ||
| 2 | +package com.diligrp.tax.central.converter.impl; | ||
| 3 | + | ||
| 4 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FACCOUNTID; | ||
| 6 | +import org.springframework.stereotype.Component; | ||
| 7 | + | ||
| 8 | +import java.util.Objects; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-10-30 18:55 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +@Component | ||
| 16 | +public class BankCardNumberConverter implements IConverter<FACCOUNTID> { | ||
| 17 | + @Override | ||
| 18 | + public FACCOUNTID convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FACCOUNTID(); | ||
| 21 | + } | ||
| 22 | + FACCOUNTID faccountid = new FACCOUNTID(); | ||
| 23 | + faccountid.setFNumber((String) source); | ||
| 24 | + return faccountid; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/BusinessTypeConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/BusinessTypeConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FBillTypeID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-30 18:59 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class BusinessTypeConverter implements IConverter<FBillTypeID> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FBillTypeID convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FBillTypeID(); | ||
| 21 | + } | ||
| 22 | + FBillTypeID fBillTypeID = new FBillTypeID(); | ||
| 23 | + fBillTypeID.setFNUMBER((String) source); | ||
| 24 | + return fBillTypeID; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ChargeItemConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ChargeItemConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FCOSTID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-30 18:59 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ChargeItemConverter implements IConverter<FCOSTID> { | ||
| 16 | + @Override | ||
| 17 | + public FCOSTID convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FCOSTID(); | ||
| 20 | + } | ||
| 21 | + FCOSTID fcostid = new FCOSTID(); | ||
| 22 | + fcostid.setFNUMBER((String) source); | ||
| 23 | + return fcostid; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ChargeItemDeptConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ChargeItemDeptConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FCOSTDEPARTMENTID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-31 17:21 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ChargeItemDeptConverter implements IConverter<FCOSTDEPARTMENTID> { | ||
| 16 | + @Override | ||
| 17 | + public FCOSTDEPARTMENTID convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FCOSTDEPARTMENTID(); | ||
| 20 | + } | ||
| 21 | + FCOSTDEPARTMENTID fcostdepartmentid = new FCOSTDEPARTMENTID(); | ||
| 22 | + fcostdepartmentid.setFNUMBER((String) source); | ||
| 23 | + return fcostdepartmentid; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CurrencyConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CurrencyConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FCURRENCYID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-31 11:14 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class CurrencyConverter implements IConverter<FCURRENCYID> { | ||
| 16 | + @Override | ||
| 17 | + public FCURRENCYID convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FCURRENCYID(); | ||
| 20 | + } | ||
| 21 | + FCURRENCYID fcurrencyid = new FCURRENCYID(); | ||
| 22 | + fcurrencyid.setFNumber((String) source); | ||
| 23 | + return fcurrencyid; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerContactConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerContactConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FContactId; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-04 16:15 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class CustomerContactConverter implements IConverter<FContactId> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FContactId convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FContactId(); | ||
| 21 | + } | ||
| 22 | + FContactId fContactId = new FContactId(); | ||
| 23 | + fContactId.setFNUMBER((String) source); | ||
| 24 | + return fContactId; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerCountryConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerCountryConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FCOUNTRY; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FTRADINGCURRID; | ||
| 6 | +import org.springframework.stereotype.Component; | ||
| 7 | + | ||
| 8 | +import java.util.Objects; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-11-04 16:15 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +@Component | ||
| 16 | +public class CustomerCountryConverter implements IConverter<FCOUNTRY> { | ||
| 17 | + | ||
| 18 | + @Override | ||
| 19 | + public FCOUNTRY convert(Object source) { | ||
| 20 | + if (Objects.isNull(source)) { | ||
| 21 | + return new FCOUNTRY(); | ||
| 22 | + } | ||
| 23 | + FCOUNTRY fcountry = new FCOUNTRY(); | ||
| 24 | + fcountry.setFNumber((String) source); | ||
| 25 | + return fcountry; | ||
| 26 | + } | ||
| 27 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerCreateOrgConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerCreateOrgConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FCreateOrgId; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FGroup; | ||
| 6 | +import org.springframework.stereotype.Component; | ||
| 7 | + | ||
| 8 | +import java.util.Objects; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-11-04 16:15 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +@Component | ||
| 16 | +public class CustomerCreateOrgConverter implements IConverter<FCreateOrgId> { | ||
| 17 | + | ||
| 18 | + @Override | ||
| 19 | + public FCreateOrgId convert(Object source) { | ||
| 20 | + if (Objects.isNull(source)) { | ||
| 21 | + return new FCreateOrgId(); | ||
| 22 | + } | ||
| 23 | + FCreateOrgId fCreateOrgId = new FCreateOrgId(); | ||
| 24 | + fCreateOrgId.setFNumber((String) source); | ||
| 25 | + return fCreateOrgId; | ||
| 26 | + } | ||
| 27 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerCurrencyConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerCurrencyConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FContactId; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FTRADINGCURRID; | ||
| 6 | +import org.springframework.stereotype.Component; | ||
| 7 | + | ||
| 8 | +import java.util.Objects; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-11-04 16:15 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +@Component | ||
| 16 | +public class CustomerCurrencyConverter implements IConverter<FTRADINGCURRID> { | ||
| 17 | + | ||
| 18 | + @Override | ||
| 19 | + public FTRADINGCURRID convert(Object source) { | ||
| 20 | + if (Objects.isNull(source)) { | ||
| 21 | + return new FTRADINGCURRID(); | ||
| 22 | + } | ||
| 23 | + FTRADINGCURRID ftradingcurrid = new FTRADINGCURRID(); | ||
| 24 | + ftradingcurrid.setFNumber((String) source); | ||
| 25 | + return ftradingcurrid; | ||
| 26 | + } | ||
| 27 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerGroupConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerGroupConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FContactId; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FGroup; | ||
| 6 | +import org.springframework.stereotype.Component; | ||
| 7 | + | ||
| 8 | +import java.util.Objects; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-11-04 16:15 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +@Component | ||
| 16 | +public class CustomerGroupConverter implements IConverter<FGroup> { | ||
| 17 | + | ||
| 18 | + @Override | ||
| 19 | + public FGroup convert(Object source) { | ||
| 20 | + if (Objects.isNull(source)) { | ||
| 21 | + return new FGroup(); | ||
| 22 | + } | ||
| 23 | + FGroup fGroup = new FGroup(); | ||
| 24 | + fGroup.setFNumber((String) source); | ||
| 25 | + return fGroup; | ||
| 26 | + } | ||
| 27 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerItemConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerItemConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.ISubConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FRECEIVEBILLENTRY; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FT_BD_CUSTLOCATION; | ||
| 6 | +import com.diligrp.tax.central.utils.MappingUtils; | ||
| 7 | +import lombok.extern.slf4j.Slf4j; | ||
| 8 | +import org.springframework.stereotype.Component; | ||
| 9 | + | ||
| 10 | +import java.util.Collections; | ||
| 11 | +import java.util.List; | ||
| 12 | +import java.util.Objects; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * @Author: zhangmeiyang | ||
| 16 | + * @CreateTime: 2025-10-31 11:22 | ||
| 17 | + * @Version: todo | ||
| 18 | + */ | ||
| 19 | +@Component | ||
| 20 | +@Slf4j | ||
| 21 | +public class CustomerItemConverter implements ISubConverter<List<FT_BD_CUSTLOCATION>> { | ||
| 22 | + @Override | ||
| 23 | + public List<FT_BD_CUSTLOCATION> convert(List<?> sources) { | ||
| 24 | + if (Objects.isNull(sources)) { | ||
| 25 | + return Collections.emptyList(); | ||
| 26 | + } | ||
| 27 | + return sources.stream().map(MappingUtils.mappingObject(FT_BD_CUSTLOCATION.class)).toList(); | ||
| 28 | + } | ||
| 29 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerProvincialConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerProvincialConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FCOUNTRY; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FPROVINCIAL; | ||
| 6 | +import org.springframework.stereotype.Component; | ||
| 7 | + | ||
| 8 | +import java.util.Objects; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-11-04 16:15 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +@Component | ||
| 16 | +public class CustomerProvincialConverter implements IConverter<FPROVINCIAL> { | ||
| 17 | + | ||
| 18 | + @Override | ||
| 19 | + public FPROVINCIAL convert(Object source) { | ||
| 20 | + if (Objects.isNull(source)) { | ||
| 21 | + return new FPROVINCIAL(); | ||
| 22 | + } | ||
| 23 | + FPROVINCIAL fprovincial = new FPROVINCIAL(); | ||
| 24 | + fprovincial.setFNumber((String) source); | ||
| 25 | + return fprovincial; | ||
| 26 | + } | ||
| 27 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerUseOrgConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/CustomerUseOrgConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FCreateOrgId; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FUseOrgId; | ||
| 6 | +import org.springframework.stereotype.Component; | ||
| 7 | + | ||
| 8 | +import java.util.Objects; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-11-04 16:15 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +@Component | ||
| 16 | +public class CustomerUseOrgConverter implements IConverter<FUseOrgId> { | ||
| 17 | + | ||
| 18 | + @Override | ||
| 19 | + public FUseOrgId convert(Object source) { | ||
| 20 | + if (Objects.isNull(source)) { | ||
| 21 | + return new FUseOrgId(); | ||
| 22 | + } | ||
| 23 | + FUseOrgId fUseOrgId = new FUseOrgId(); | ||
| 24 | + fUseOrgId.setFNumber((String) source); | ||
| 25 | + return fUseOrgId; | ||
| 26 | + } | ||
| 27 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/PayOrgConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/PayOrgConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FPAYORGID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-30 19:00 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class PayOrgConverter implements IConverter<FPAYORGID> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FPAYORGID convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FPAYORGID(); | ||
| 21 | + } | ||
| 22 | + FPAYORGID fpayorgid = new FPAYORGID(); | ||
| 23 | + fpayorgid.setFNumber((String) source); | ||
| 24 | + return fpayorgid; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/PurposeUsedForConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/PurposeUsedForConverter.java | ||
| 1 | + | ||
| 2 | +package com.diligrp.tax.central.converter.impl; | ||
| 3 | + | ||
| 4 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FPURPOSEID; | ||
| 6 | +import org.springframework.stereotype.Component; | ||
| 7 | + | ||
| 8 | +import java.util.Objects; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-10-30 18:55 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +@Component | ||
| 16 | +public class PurposeUsedForConverter implements IConverter<FPURPOSEID> { | ||
| 17 | + @Override | ||
| 18 | + public FPURPOSEID convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FPURPOSEID(); | ||
| 21 | + } | ||
| 22 | + FPURPOSEID fpurposeid = new FPURPOSEID(); | ||
| 23 | + fpurposeid.setFNumber((String) source); | ||
| 24 | + return fpurposeid; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceiptContactConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceiptContactConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FCONTACTUNIT; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-30 18:59 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ReceiptContactConverter implements IConverter<FCONTACTUNIT> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FCONTACTUNIT convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FCONTACTUNIT(); | ||
| 21 | + } | ||
| 22 | + FCONTACTUNIT fcontactunit = new FCONTACTUNIT(); | ||
| 23 | + fcontactunit.setFNumber((String) source); | ||
| 24 | + return fcontactunit; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceiptItemConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceiptItemConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.ISubConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FRECEIVEBILLENTRY; | ||
| 5 | +import com.diligrp.tax.central.utils.MappingUtils; | ||
| 6 | +import lombok.extern.slf4j.Slf4j; | ||
| 7 | +import org.springframework.stereotype.Component; | ||
| 8 | + | ||
| 9 | +import java.util.*; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * @Author: zhangmeiyang | ||
| 13 | + * @CreateTime: 2025-10-31 11:22 | ||
| 14 | + * @Version: todo | ||
| 15 | + */ | ||
| 16 | +@Component | ||
| 17 | +@Slf4j | ||
| 18 | +public class ReceiptItemConverter implements ISubConverter<List<FRECEIVEBILLENTRY>> { | ||
| 19 | + @Override | ||
| 20 | + public List<FRECEIVEBILLENTRY> convert(List<?> sources) { | ||
| 21 | + if (Objects.isNull(sources)) { | ||
| 22 | + return Collections.emptyList(); | ||
| 23 | + } | ||
| 24 | + return sources.stream().map(MappingUtils.mappingObject(FRECEIVEBILLENTRY.class)).toList(); | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceiptPayContactConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceiptPayContactConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FPAYUNIT; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-31 11:14 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ReceiptPayContactConverter implements IConverter<FPAYUNIT> { | ||
| 16 | + @Override | ||
| 17 | + public FPAYUNIT convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FPAYUNIT(); | ||
| 20 | + } | ||
| 21 | + FPAYUNIT fpayunit = new FPAYUNIT(); | ||
| 22 | + fpayunit.setFNumber((String) source); | ||
| 23 | + return fpayunit; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceiptSettleCurrencyConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceiptSettleCurrencyConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FSETTLEMAINBOOKID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-31 11:14 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ReceiptSettleCurrencyConverter implements IConverter<FSETTLEMAINBOOKID> { | ||
| 16 | + @Override | ||
| 17 | + public FSETTLEMAINBOOKID convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FSETTLEMAINBOOKID(); | ||
| 20 | + } | ||
| 21 | + FSETTLEMAINBOOKID fsettlemainbookid = new FSETTLEMAINBOOKID(); | ||
| 22 | + fsettlemainbookid.setFNUMBER((String) source); | ||
| 23 | + return fsettlemainbookid; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableCardNumberConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableCardNumberConverter.java | ||
| 1 | + | ||
| 2 | +package com.diligrp.tax.central.converter.impl; | ||
| 3 | + | ||
| 4 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FASSETID; | ||
| 6 | +import org.springframework.stereotype.Component; | ||
| 7 | + | ||
| 8 | +import java.util.Objects; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-10-30 18:55 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +@Component | ||
| 16 | +public class ReceivableCardNumberConverter implements IConverter<FASSETID> { | ||
| 17 | + @Override | ||
| 18 | + public FASSETID convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FASSETID(); | ||
| 21 | + } | ||
| 22 | + FASSETID fassetid = new FASSETID(); | ||
| 23 | + fassetid.setFNUMBER((String) source); | ||
| 24 | + return fassetid; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableCustomerConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableCustomerConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FCUSTOMERID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-03 11:09 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ReceivableCustomerConverter implements IConverter<FCUSTOMERID> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FCUSTOMERID convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FCUSTOMERID(); | ||
| 21 | + } | ||
| 22 | + FCUSTOMERID fcustomerid = new FCUSTOMERID(); | ||
| 23 | + fcustomerid.setFNumber((String) source); | ||
| 24 | + return fcustomerid; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableItemConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableItemConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.ISubConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FEntityDetail; | ||
| 5 | +import com.diligrp.tax.central.utils.MappingUtils; | ||
| 6 | +import lombok.extern.slf4j.Slf4j; | ||
| 7 | +import org.springframework.stereotype.Component; | ||
| 8 | + | ||
| 9 | +import java.util.Collections; | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Objects; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-10-31 11:22 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@Component | ||
| 19 | +@Slf4j | ||
| 20 | +public class ReceivableItemConverter implements ISubConverter<List<FEntityDetail>> { | ||
| 21 | + @Override | ||
| 22 | + public List<FEntityDetail> convert(List<?> sources) { | ||
| 23 | + if (Objects.isNull(sources)) { | ||
| 24 | + return Collections.emptyList(); | ||
| 25 | + } | ||
| 26 | + return sources.stream().map(MappingUtils.mappingObject(FEntityDetail.class)).toList(); | ||
| 27 | + } | ||
| 28 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableOrdererConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableOrdererConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FORDERID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-03 11:09 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ReceivableOrdererConverter implements IConverter<FORDERID> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FORDERID convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FORDERID(); | ||
| 21 | + } | ||
| 22 | + FORDERID forderid = new FORDERID(); | ||
| 23 | + forderid.setFNumber((String) source); | ||
| 24 | + return forderid; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivablePayerConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivablePayerConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FChargeId; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-03 11:09 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ReceivablePayerConverter implements IConverter<FChargeId> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FChargeId convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FChargeId(); | ||
| 21 | + } | ||
| 22 | + FChargeId fChargeId = new FChargeId(); | ||
| 23 | + fChargeId.setFNumber((String) source); | ||
| 24 | + return fChargeId; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableReceiverConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableReceiverConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FTRANSFERID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-03 11:09 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ReceivableReceiverConverter implements IConverter<FTRANSFERID> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FTRANSFERID convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FTRANSFERID(); | ||
| 21 | + } | ||
| 22 | + FTRANSFERID ftransferid = new FTRANSFERID(); | ||
| 23 | + ftransferid.setFNumber((String) source); | ||
| 24 | + return ftransferid; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableSettleMethodConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableSettleMethodConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FSettleTypeID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-03 11:02 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ReceivableSettleMethodConverter implements IConverter<FSettleTypeID> { | ||
| 16 | + @Override | ||
| 17 | + public FSettleTypeID convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FSettleTypeID(); | ||
| 20 | + } | ||
| 21 | + FSettleTypeID fSettleTypeID = new FSettleTypeID(); | ||
| 22 | + fSettleTypeID.setFNumber((String) source); | ||
| 23 | + return fSettleTypeID; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableSettleNameConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableSettleNameConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.F_PZCW_Base_qtr; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-03 11:09 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ReceivableSettleNameConverter implements IConverter<F_PZCW_Base_qtr> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public F_PZCW_Base_qtr convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new F_PZCW_Base_qtr(); | ||
| 21 | + } | ||
| 22 | + F_PZCW_Base_qtr f_pzcw_base_qtr = new F_PZCW_Base_qtr(); | ||
| 23 | + f_pzcw_base_qtr.setFName((String) source); | ||
| 24 | + return f_pzcw_base_qtr; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableStandardCurrencyConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/ReceivableStandardCurrencyConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FMAINBOOKSTDCURRID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-03 11:02 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class ReceivableStandardCurrencyConverter implements IConverter<FMAINBOOKSTDCURRID> { | ||
| 16 | + @Override | ||
| 17 | + public FMAINBOOKSTDCURRID convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FMAINBOOKSTDCURRID(); | ||
| 20 | + } | ||
| 21 | + FMAINBOOKSTDCURRID fmainbookstdcurrid = new FMAINBOOKSTDCURRID(); | ||
| 22 | + fmainbookstdcurrid.setFNumber((String) source); | ||
| 23 | + return fmainbookstdcurrid; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/RefundContactConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/RefundContactConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FCONTACTUNIT; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-30 18:59 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class RefundContactConverter implements IConverter<FCONTACTUNIT> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FCONTACTUNIT convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FCONTACTUNIT(); | ||
| 21 | + } | ||
| 22 | + FCONTACTUNIT fcontactunit = new FCONTACTUNIT(); | ||
| 23 | + fcontactunit.setFNumber((String) source); | ||
| 24 | + return fcontactunit; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/RefundCurrencyConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/RefundCurrencyConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FSETTLEMAINBOOKID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-31 11:14 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class RefundCurrencyConverter implements IConverter<FSETTLEMAINBOOKID> { | ||
| 16 | + @Override | ||
| 17 | + public FSETTLEMAINBOOKID convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FSETTLEMAINBOOKID(); | ||
| 20 | + } | ||
| 21 | + FSETTLEMAINBOOKID fSettleMainBookID = new FSETTLEMAINBOOKID(); | ||
| 22 | + fSettleMainBookID.setFNUMBER((String) source); | ||
| 23 | + return fSettleMainBookID; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/RefundItemConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/RefundItemConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.ISubConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FREFUNDBILLENTRY; | ||
| 5 | +import com.diligrp.tax.central.utils.MappingUtils; | ||
| 6 | +import lombok.extern.slf4j.Slf4j; | ||
| 7 | +import org.springframework.stereotype.Component; | ||
| 8 | + | ||
| 9 | +import java.util.Collections; | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Objects; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-10-31 11:22 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@Component | ||
| 19 | +@Slf4j | ||
| 20 | +public class RefundItemConverter implements ISubConverter<List<FREFUNDBILLENTRY>> { | ||
| 21 | + @Override | ||
| 22 | + public List<FREFUNDBILLENTRY> convert(List<?> sources) { | ||
| 23 | + if (Objects.isNull(sources)) { | ||
| 24 | + return Collections.emptyList(); | ||
| 25 | + } | ||
| 26 | + return sources.stream().map(MappingUtils.mappingObject(FREFUNDBILLENTRY.class)).toList(); | ||
| 27 | + } | ||
| 28 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/RefundReceiveContactConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/RefundReceiveContactConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FRECTUNIT; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-30 18:59 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class RefundReceiveContactConverter implements IConverter<FRECTUNIT> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FRECTUNIT convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FRECTUNIT(); | ||
| 21 | + } | ||
| 22 | + FRECTUNIT frectunit = new FRECTUNIT(); | ||
| 23 | + frectunit.setFNumber((String) source); | ||
| 24 | + return frectunit; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/RefundSettleCurrencyConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/RefundSettleCurrencyConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FSETTLECUR; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-31 11:14 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class RefundSettleCurrencyConverter implements IConverter<FSETTLECUR> { | ||
| 16 | + @Override | ||
| 17 | + public FSETTLECUR convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FSETTLECUR(); | ||
| 20 | + } | ||
| 21 | + FSETTLECUR fsettlecur = new FSETTLECUR(); | ||
| 22 | + fsettlecur.setFNUMBER((String) source); | ||
| 23 | + return fsettlecur; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/SaleDeptConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/SaleDeptConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FSALEDEPTID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-31 11:10 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class SaleDeptConverter implements IConverter<FSALEDEPTID> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FSALEDEPTID convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FSALEDEPTID(); | ||
| 21 | + } | ||
| 22 | + FSALEDEPTID fsaledeptid = new FSALEDEPTID(); | ||
| 23 | + fsaledeptid.setFNumber((String) source); | ||
| 24 | + return fsaledeptid; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/SaleOrgConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/SaleOrgConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FSALEORGID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-31 11:05 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class SaleOrgConverter implements IConverter<FSALEORGID> { | ||
| 16 | + @Override | ||
| 17 | + public FSALEORGID convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FSALEORGID(); | ||
| 20 | + } | ||
| 21 | + FSALEORGID fsaleorgid = new FSALEORGID(); | ||
| 22 | + fsaleorgid.setFNumber((String) source); | ||
| 23 | + return fsaleorgid; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/SettleMethodConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/SettleMethodConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FSETTLETYPE; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-30 18:59 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class SettleMethodConverter implements IConverter<FSETTLETYPE> { | ||
| 16 | + @Override | ||
| 17 | + public FSETTLETYPE convert(Object source) { | ||
| 18 | + if (Objects.isNull(source)) { | ||
| 19 | + return new FSETTLETYPE(); | ||
| 20 | + } | ||
| 21 | + FSETTLETYPE fsettletype = new FSETTLETYPE(); | ||
| 22 | + fsettletype.setFNumber((String) source); | ||
| 23 | + return fsettletype; | ||
| 24 | + } | ||
| 25 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/SettleOrgConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/SettleOrgConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FSETTLEORGID; | ||
| 5 | +import org.springframework.stereotype.Component; | ||
| 6 | + | ||
| 7 | +import java.util.Objects; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-30 19:00 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Component | ||
| 15 | +public class SettleOrgConverter implements IConverter<FSETTLEORGID> { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + public FSETTLEORGID convert(Object source) { | ||
| 19 | + if (Objects.isNull(source)) { | ||
| 20 | + return new FSETTLEORGID(); | ||
| 21 | + } | ||
| 22 | + FSETTLEORGID fSettleOrgID = new FSETTLEORGID(); | ||
| 23 | + fSettleOrgID.setFNumber((String) source); | ||
| 24 | + return fSettleOrgID; | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/converter/impl/StringConverter.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/converter/impl/StringConverter.java | ||
| 1 | +package com.diligrp.tax.central.converter.impl; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 4 | +import org.springframework.stereotype.Component; | ||
| 5 | + | ||
| 6 | +import java.util.Objects; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @Author: zhangmeiyang | ||
| 10 | + * @CreateTime: 2025-10-30 18:55 | ||
| 11 | + * @Version: todo | ||
| 12 | + */ | ||
| 13 | +@Component | ||
| 14 | +public class StringConverter implements IConverter<String> { | ||
| 15 | + @Override | ||
| 16 | + public String convert(Object source) { | ||
| 17 | + if (Objects.isNull(source)) { | ||
| 18 | + return ""; | ||
| 19 | + } | ||
| 20 | + return (String) source; | ||
| 21 | + } | ||
| 22 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/BaseDocument.java
0 → 100644
tax-central/src/main/java/com/diligrp/tax/central/domain/BaseMapping.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/BaseMapping.java | ||
| 1 | +package com.diligrp.tax.central.domain; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | +import lombok.Setter; | ||
| 5 | + | ||
| 6 | +import java.util.Set; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @Author: zhangmeiyang | ||
| 10 | + * @CreateTime: 2025-10-30 17:25 | ||
| 11 | + * @Version: todo | ||
| 12 | + */ | ||
| 13 | +@Getter | ||
| 14 | +@Setter | ||
| 15 | +public abstract class BaseMapping { | ||
| 16 | + private String verifyInformation; | ||
| 17 | + private String returnKeys; | ||
| 18 | + private Set<String> accountSet; | ||
| 19 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/BaseProxy.java
0 → 100644
tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/BaseBill.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/BaseBill.java | ||
| 1 | +package com.diligrp.tax.central.domain.document.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.anno.Converter; | ||
| 4 | +import com.diligrp.tax.central.converter.impl.*; | ||
| 5 | +import com.diligrp.tax.central.domain.BaseDocument; | ||
| 6 | +import lombok.Getter; | ||
| 7 | +import lombok.Setter; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-10-29 15:02 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Setter | ||
| 15 | +@Getter | ||
| 16 | +public abstract class BaseBill extends BaseDocument { | ||
| 17 | + /** | ||
| 18 | + * 创造时间(FDATE) | ||
| 19 | + */ | ||
| 20 | + @Converter(value = StringConverter.class, targetField = "FDATE") | ||
| 21 | + private String createTime; | ||
| 22 | + /** | ||
| 23 | + * 业务类型(FBillTypeID) | ||
| 24 | + */ | ||
| 25 | + @Converter(value = BusinessTypeConverter.class, targetField = "FBillTypeID") | ||
| 26 | + private String businessType; | ||
| 27 | + /** | ||
| 28 | + * 结算组织(FSETTLEORGID) | ||
| 29 | + */ | ||
| 30 | + @Converter(value = SettleOrgConverter.class, targetField = "FSETTLEORGID") | ||
| 31 | + private String settleOrg; | ||
| 32 | + /** | ||
| 33 | + * 销售组织(FSALEORGID) | ||
| 34 | + */ | ||
| 35 | + @Converter(value = SaleOrgConverter.class, targetField = "FSALEORGID") | ||
| 36 | + private String saleOrg; | ||
| 37 | + /** | ||
| 38 | + * 销售部门(FSALEDEPTID) | ||
| 39 | + */ | ||
| 40 | + @Converter(value = SaleDeptConverter.class, targetField = "FSALEDEPTID") | ||
| 41 | + private String saleDept; | ||
| 42 | + /** | ||
| 43 | + * 支付组织(FPAYORGID) | ||
| 44 | + */ | ||
| 45 | + @Converter(value = PayOrgConverter.class, targetField = "FPAYORGID") | ||
| 46 | + private String payOrg; | ||
| 47 | + /** | ||
| 48 | + * 货币(FCURRENCYID) | ||
| 49 | + */ | ||
| 50 | + @Converter(value = StringConverter.class, targetField = "FCURRENCYID") | ||
| 51 | + private String currency; | ||
| 52 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/BaseCustomer.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/BaseCustomer.java | ||
| 1 | +package com.diligrp.tax.central.domain.document.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.anno.Converter; | ||
| 4 | +import com.diligrp.tax.central.converter.impl.*; | ||
| 5 | +import com.diligrp.tax.central.domain.BaseDocument; | ||
| 6 | +import lombok.Getter; | ||
| 7 | +import lombok.Setter; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-04 15:51 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Getter | ||
| 15 | +@Setter | ||
| 16 | +public abstract class BaseCustomer extends BaseDocument { | ||
| 17 | + /** | ||
| 18 | + * 系统数据 ID | ||
| 19 | + */ | ||
| 20 | + private String systemDataId; | ||
| 21 | + /** | ||
| 22 | + * 结算货币(FTRADINGCURRID) | ||
| 23 | + */ | ||
| 24 | + @Converter(value = CustomerCurrencyConverter.class, targetField = "FTRADINGCURRID") | ||
| 25 | + private String currency; | ||
| 26 | + /** | ||
| 27 | + * 客户 ID(FCUSTID) | ||
| 28 | + */ | ||
| 29 | + @Converter(value = StringConverter.class, targetField = "FCUSTID") | ||
| 30 | + private String customerId; | ||
| 31 | + /** | ||
| 32 | + * 客户编号 | ||
| 33 | + */ | ||
| 34 | + @Converter(value = StringConverter.class, targetField = "FNumber") | ||
| 35 | + private String customerCode; | ||
| 36 | + /** | ||
| 37 | + * 客户姓名(FName) | ||
| 38 | + */ | ||
| 39 | + @Converter(value = StringConverter.class, targetField = "FName") | ||
| 40 | + private String customerName; | ||
| 41 | + /** | ||
| 42 | + * 客户简称(FShortName) | ||
| 43 | + */ | ||
| 44 | + @Converter(value = StringConverter.class, targetField = "FShortName") | ||
| 45 | + private String customerShortName; | ||
| 46 | + /** | ||
| 47 | + * 客户发票抬头(FINVOICETITLE) | ||
| 48 | + */ | ||
| 49 | + @Converter(value = StringConverter.class, targetField = "FINVOICETITLE") | ||
| 50 | + private String customerInvoiceTitle; | ||
| 51 | + /** | ||
| 52 | + * 法人姓名(FLegalPerson) | ||
| 53 | + */ | ||
| 54 | + @Converter(value = StringConverter.class, targetField = "FLegalPerson") | ||
| 55 | + private String legalPerson; | ||
| 56 | + /** | ||
| 57 | + * 证件号(FSOCIALCRECODE) | ||
| 58 | + */ | ||
| 59 | + @Converter(value = StringConverter.class, targetField = "FSOCIALCRECODE") | ||
| 60 | + private String idNumber; | ||
| 61 | + /** | ||
| 62 | + * 国家(FCOUNTRY) | ||
| 63 | + */ | ||
| 64 | + @Converter(value = CustomerCountryConverter.class, targetField = "FCOUNTRY") | ||
| 65 | + private String country; | ||
| 66 | + /** | ||
| 67 | + * 区域组织(FPROVINCIAL) | ||
| 68 | + */ | ||
| 69 | + @Converter(value = CustomerProvincialConverter.class, targetField = "FPROVINCIAL") | ||
| 70 | + private String provincial; | ||
| 71 | + /** | ||
| 72 | + * 地址(FADDRESS) | ||
| 73 | + */ | ||
| 74 | + @Converter(value = StringConverter.class, targetField = "FADDRESS") | ||
| 75 | + private String address; | ||
| 76 | + /** | ||
| 77 | + * 注册地址(FRegisterAddress) | ||
| 78 | + */ | ||
| 79 | + @Converter(value = StringConverter.class, targetField = "FRegisterAddress") | ||
| 80 | + private String registerAddress; | ||
| 81 | + /** | ||
| 82 | + * 客户分组-配置数据(FGroup) | ||
| 83 | + */ | ||
| 84 | + @Converter(value = CustomerGroupConverter.class, targetField = "FGroup") | ||
| 85 | + private String customerGroup; | ||
| 86 | + /** | ||
| 87 | + * 创建组织(FCreateOrgId) | ||
| 88 | + */ | ||
| 89 | + @Converter(value = CustomerCreateOrgConverter.class, targetField = "FCreateOrgId") | ||
| 90 | + private String customerCreateOrg; | ||
| 91 | + /** | ||
| 92 | + * 使用组织 | ||
| 93 | + */ | ||
| 94 | + @Converter(value = CustomerUseOrgConverter.class, targetField = "FUseOrgId") | ||
| 95 | + private String customerUseOrg; | ||
| 96 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/basic/StandardCustomer.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/basic/StandardCustomer.java | ||
| 1 | +package com.diligrp.tax.central.domain.document.kingdee.basic; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.anno.SubConverter; | ||
| 4 | +import com.diligrp.tax.central.converter.impl.CustomerItemConverter; | ||
| 5 | +import com.diligrp.tax.central.domain.document.kingdee.BaseCustomer; | ||
| 6 | +import com.diligrp.tax.central.domain.document.kingdee.basic.item.Contact; | ||
| 7 | +import lombok.Getter; | ||
| 8 | +import lombok.Setter; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * @Author: zhangmeiyang | ||
| 14 | + * @CreateTime: 2025-11-04 16:04 | ||
| 15 | + * @Version: todo | ||
| 16 | + */ | ||
| 17 | +@Getter | ||
| 18 | +@Setter | ||
| 19 | +public class StandardCustomer extends BaseCustomer { | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * 联系人(FT_BD_CUSTLOCATION) | ||
| 23 | + */ | ||
| 24 | + @SubConverter(value = CustomerItemConverter.class, targetField = "FT_BD_CUSTLOCATION") | ||
| 25 | + private List<Contact> contacts; | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/basic/item/Contact.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/basic/item/Contact.java | ||
| 1 | +package com.diligrp.tax.central.domain.document.kingdee.basic.item; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.anno.Converter; | ||
| 4 | +import com.diligrp.tax.central.converter.impl.CustomerContactConverter; | ||
| 5 | +import com.diligrp.tax.central.converter.impl.StringConverter; | ||
| 6 | +import lombok.Getter; | ||
| 7 | +import lombok.Setter; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-04 16:05 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Getter | ||
| 15 | +@Setter | ||
| 16 | +public class Contact { | ||
| 17 | + /** | ||
| 18 | + * 联系人 ID(FContactId) | ||
| 19 | + */ | ||
| 20 | + @Converter(value = CustomerContactConverter.class, targetField = "FContactId") | ||
| 21 | + private String contactId; | ||
| 22 | + /** | ||
| 23 | + * 联系人名字(FName) | ||
| 24 | + */ | ||
| 25 | + @Converter(value = StringConverter.class, targetField = "FName") | ||
| 26 | + private String contactName; | ||
| 27 | + /** | ||
| 28 | + * 联系电话(FMOBILEPHONE) | ||
| 29 | + */ | ||
| 30 | + @Converter(value = StringConverter.class, targetField = "FMOBILEPHONE") | ||
| 31 | + private String contactPhone; | ||
| 32 | + /** | ||
| 33 | + * 联系地址(FBizAddress) | ||
| 34 | + */ | ||
| 35 | + @Converter(value = StringConverter.class, targetField = "FBizAddress") | ||
| 36 | + private String contactAddress; | ||
| 37 | + /** | ||
| 38 | + * 联系公司类型(FCompanyType) | ||
| 39 | + */ | ||
| 40 | + @Converter(value = StringConverter.class, targetField = "FCompanyType") | ||
| 41 | + private String contactCompanyType; | ||
| 42 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/ReceiptBill.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/ReceiptBill.java | ||
| 1 | +package com.diligrp.tax.central.domain.document.kingdee.bill; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.anno.Converter; | ||
| 4 | +import com.diligrp.tax.central.converter.anno.SubConverter; | ||
| 5 | +import com.diligrp.tax.central.converter.impl.*; | ||
| 6 | +import com.diligrp.tax.central.domain.document.kingdee.BaseBill; | ||
| 7 | +import com.diligrp.tax.central.domain.document.kingdee.bill.item.ReceiptItem; | ||
| 8 | +import lombok.Getter; | ||
| 9 | +import lombok.Setter; | ||
| 10 | + | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-10-29 16:27 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@Getter | ||
| 19 | +@Setter | ||
| 20 | +public class ReceiptBill extends BaseBill { | ||
| 21 | + /** | ||
| 22 | + * 备注(FREMARK) | ||
| 23 | + */ | ||
| 24 | + @Converter(value = StringConverter.class, targetField = "FREMARK") | ||
| 25 | + private String remark; | ||
| 26 | + /** | ||
| 27 | + * 业务卡号(F_ZDB_Text5) | ||
| 28 | + */ | ||
| 29 | + @Converter(value = StringConverter.class, targetField = "F_ZDB_Text5") | ||
| 30 | + private String businessCardNumber; | ||
| 31 | + /** | ||
| 32 | + * 货币(FCURRENCYID) | ||
| 33 | + */ | ||
| 34 | + @Converter(value = CurrencyConverter.class, targetField = "FCURRENCYID") | ||
| 35 | + private String currency; | ||
| 36 | + /** | ||
| 37 | + * 结算货币(FSETTLEMAINBOOKID) | ||
| 38 | + */ | ||
| 39 | + @Converter(value = ReceiptSettleCurrencyConverter.class, targetField = "FSETTLEMAINBOOKID") | ||
| 40 | + private String settleCurrency; | ||
| 41 | + /** | ||
| 42 | + * 往来单位类型(FCONTACTUNITTYPE) | ||
| 43 | + */ | ||
| 44 | + @Converter(value = StringConverter.class, targetField = "FCONTACTUNITTYPE") | ||
| 45 | + private String contactType; | ||
| 46 | + /** | ||
| 47 | + * 往来单位(FCONTACTUNIT) | ||
| 48 | + */ | ||
| 49 | + @Converter(value = ReceiptContactConverter.class, targetField = "FCONTACTUNIT") | ||
| 50 | + private String contact; | ||
| 51 | + /** | ||
| 52 | + * 付款单位类型(FPAYUNITTYPE) | ||
| 53 | + */ | ||
| 54 | + @Converter(value = StringConverter.class, targetField = "FPAYUNITTYPE") | ||
| 55 | + private String payContactType; | ||
| 56 | + /** | ||
| 57 | + * 付款单位(FPAYUNIT) | ||
| 58 | + */ | ||
| 59 | + @Converter(value = ReceiptPayContactConverter.class, targetField = "FPAYUNIT") | ||
| 60 | + private String payContact; | ||
| 61 | + /** | ||
| 62 | + * 收费项目(List<FRECEIVEBILLENTRY>) | ||
| 63 | + */ | ||
| 64 | + @SubConverter(value = ReceiptItemConverter.class, targetField = "FRECEIVEBILLENTRY") | ||
| 65 | + private List<ReceiptItem> receiptItems; | ||
| 66 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/ReceivableBill.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/ReceivableBill.java | ||
| 1 | +package com.diligrp.tax.central.domain.document.kingdee.bill; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.anno.Converter; | ||
| 4 | +import com.diligrp.tax.central.converter.anno.SubConverter; | ||
| 5 | +import com.diligrp.tax.central.converter.impl.*; | ||
| 6 | +import com.diligrp.tax.central.domain.document.kingdee.BaseBill; | ||
| 7 | +import com.diligrp.tax.central.domain.document.kingdee.bill.item.ReceivableItem; | ||
| 8 | +import lombok.Getter; | ||
| 9 | +import lombok.Setter; | ||
| 10 | + | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-10-29 15:38 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@Getter | ||
| 19 | +@Setter | ||
| 20 | +public class ReceivableBill extends BaseBill { | ||
| 21 | + /** | ||
| 22 | + * 结算方法(FSettleTypeID) | ||
| 23 | + */ | ||
| 24 | + @Converter(value = ReceivableSettleMethodConverter.class, targetField = "FSettleTypeID") | ||
| 25 | + private String settleMethod; | ||
| 26 | + /** | ||
| 27 | + * 业务卡号(F_PZCW_Text) | ||
| 28 | + */ | ||
| 29 | + @Converter(value = StringConverter.class, targetField = "F_ZDB_Text") | ||
| 30 | + private String businessCardNumber; | ||
| 31 | + /** | ||
| 32 | + * 备注(FAR_Remark) | ||
| 33 | + */ | ||
| 34 | + @Converter(value = StringConverter.class, targetField = "FAR_Remark") | ||
| 35 | + private String remark; | ||
| 36 | + /** | ||
| 37 | + * 客户(FCUSTOMERID) | ||
| 38 | + */ | ||
| 39 | + @Converter(value = ReceivableCustomerConverter.class, targetField = "FCUSTOMERID") | ||
| 40 | + private String customer; | ||
| 41 | + /** | ||
| 42 | + * 收货方(FTRANSFERID) | ||
| 43 | + */ | ||
| 44 | + @Converter(value = ReceivableReceiverConverter.class, targetField = "FTRANSFERID") | ||
| 45 | + private String receiver; | ||
| 46 | + /** | ||
| 47 | + * 订货方(FORDERID) | ||
| 48 | + */ | ||
| 49 | + @Converter(value = ReceivableOrdererConverter.class, targetField = "FORDERID") | ||
| 50 | + private String orderer; | ||
| 51 | + /** | ||
| 52 | + * 付款人(FChargeId) | ||
| 53 | + */ | ||
| 54 | + @Converter(value = ReceivablePayerConverter.class, targetField = "FChargeId") | ||
| 55 | + private String payer; | ||
| 56 | + /** | ||
| 57 | + * 结算人名称(F_PZCW_Base_qtr ) | ||
| 58 | + */ | ||
| 59 | + @Converter(value = ReceivableSettleNameConverter.class, targetField = "F_PZCW_Base_qtr") | ||
| 60 | + private String settleName; | ||
| 61 | + /** | ||
| 62 | + * 标准货币(FMAINBOOKSTDCURRID) | ||
| 63 | + */ | ||
| 64 | + @Converter(value = ReceivableStandardCurrencyConverter.class, targetField = "FMAINBOOKSTDCURRID") | ||
| 65 | + private String standardCurrency; | ||
| 66 | + /** | ||
| 67 | + * 接收项目(FEntityDetail) | ||
| 68 | + */ | ||
| 69 | + @SubConverter(value = ReceivableItemConverter.class, targetField = "FEntityDetail") | ||
| 70 | + private List<ReceivableItem> receivableItems; | ||
| 71 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/RefundBill.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/RefundBill.java | ||
| 1 | +package com.diligrp.tax.central.domain.document.kingdee.bill; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.anno.Converter; | ||
| 4 | +import com.diligrp.tax.central.converter.anno.SubConverter; | ||
| 5 | +import com.diligrp.tax.central.converter.impl.*; | ||
| 6 | +import com.diligrp.tax.central.domain.document.kingdee.BaseBill; | ||
| 7 | +import com.diligrp.tax.central.domain.document.kingdee.bill.item.RefundItem; | ||
| 8 | +import lombok.Getter; | ||
| 9 | +import lombok.Setter; | ||
| 10 | + | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-10-29 16:38 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@Getter | ||
| 19 | +@Setter | ||
| 20 | +public class RefundBill extends BaseBill { | ||
| 21 | + /** | ||
| 22 | + * 备注(FREMARK) | ||
| 23 | + */ | ||
| 24 | + @Converter(value = StringConverter.class, targetField = "FREMARK") | ||
| 25 | + private String remark; | ||
| 26 | + /** | ||
| 27 | + * 业务卡号(F_ZDB_Text5) | ||
| 28 | + */ | ||
| 29 | + @Converter(value = StringConverter.class, targetField = "F_ZDB_Text5") | ||
| 30 | + private String businessCardNumber; | ||
| 31 | + /** | ||
| 32 | + * 货币(FCURRENCYID) | ||
| 33 | + */ | ||
| 34 | + @Converter(value = CurrencyConverter.class, targetField = "FCURRENCYID") | ||
| 35 | + private String currency; | ||
| 36 | + /** | ||
| 37 | + * 结算货币(FSETTLECUR) | ||
| 38 | + */ | ||
| 39 | + @Converter(value = RefundSettleCurrencyConverter.class, targetField = "FSETTLECUR") | ||
| 40 | + private String settleCurrency; | ||
| 41 | + /** | ||
| 42 | + * 收款单位类型(FRECTUNITTYPE) | ||
| 43 | + */ | ||
| 44 | + @Converter(value = StringConverter.class, targetField = "FPAYUNITTYPE") | ||
| 45 | + private String receiveContactType; | ||
| 46 | + /** | ||
| 47 | + * 收款单位(FRECTUNIT) | ||
| 48 | + */ | ||
| 49 | + @Converter(value = RefundReceiveContactConverter.class, targetField = "FRECTUNIT") | ||
| 50 | + private String receiveContact; | ||
| 51 | + /** | ||
| 52 | + * 往来单位类型(FCONTACTUNITTYPE) | ||
| 53 | + */ | ||
| 54 | + @Converter(value = StringConverter.class, targetField = "FCONTACTUNITTYPE") | ||
| 55 | + private String contactType; | ||
| 56 | + /** | ||
| 57 | + * 往来单位(FCONTACTUNIT) | ||
| 58 | + */ | ||
| 59 | + @Converter(value = RefundContactConverter.class, targetField = "FCONTACTUNIT") | ||
| 60 | + private String contact; | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 退款项目(FREFUNDBILLENTRY) | ||
| 64 | + */ | ||
| 65 | + @SubConverter(value = RefundItemConverter.class, targetField = "FREFUNDBILLENTRY") | ||
| 66 | + private List<RefundItem> refundItems; | ||
| 67 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/item/ReceiptItem.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/item/ReceiptItem.java | ||
| 1 | +package com.diligrp.tax.central.domain.document.kingdee.bill.item; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.anno.Converter; | ||
| 4 | +import com.diligrp.tax.central.converter.impl.*; | ||
| 5 | +import lombok.Getter; | ||
| 6 | +import lombok.Setter; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @Author: zhangmeiyang | ||
| 10 | + * @CreateTime: 2025-10-29 16:32 | ||
| 11 | + * @Version: todo | ||
| 12 | + */ | ||
| 13 | +@Getter | ||
| 14 | +@Setter | ||
| 15 | +public class ReceiptItem { | ||
| 16 | + /** | ||
| 17 | + * 费用编码(FCOSTID) | ||
| 18 | + */ | ||
| 19 | + @Converter(value = ChargeItemConverter.class, targetField = "FCOSTID") | ||
| 20 | + private String chargeItem; | ||
| 21 | + /** | ||
| 22 | + * 结算方法(FSETTLETYPEID) | ||
| 23 | + */ | ||
| 24 | + @Converter(value = SettleMethodConverter.class, targetField = "FSETTLETYPEID") | ||
| 25 | + private String settleMethod; | ||
| 26 | + /** | ||
| 27 | + * 应收金额(FRECTOTALAMOUNTFOR) | ||
| 28 | + */ | ||
| 29 | + @Converter(value = StringConverter.class, targetField = "FRECTOTALAMOUNTFOR") | ||
| 30 | + private String amountReceivable; | ||
| 31 | + /** | ||
| 32 | + * 收款用途(FPURPOSEID) | ||
| 33 | + */ | ||
| 34 | + @Converter(value = PurposeUsedForConverter.class, targetField = "FPURPOSEID") | ||
| 35 | + private String receiveUsedFor; | ||
| 36 | + /** | ||
| 37 | + * 银行卡号(FACCOUNTID) | ||
| 38 | + */ | ||
| 39 | + @Converter(value = BankCardNumberConverter.class, targetField = "FACCOUNTID") | ||
| 40 | + private String bankCardNumber; | ||
| 41 | + /** | ||
| 42 | + * 费用部门(FCOSTDEPARTMENTID) | ||
| 43 | + */ | ||
| 44 | + @Converter(value = ChargeItemDeptConverter.class, targetField = "FCOSTDEPARTMENTID") | ||
| 45 | + private String chargeItemDept; | ||
| 46 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/item/ReceivableItem.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/item/ReceivableItem.java | ||
| 1 | +package com.diligrp.tax.central.domain.document.kingdee.bill.item; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.anno.Converter; | ||
| 4 | +import com.diligrp.tax.central.converter.impl.ChargeItemConverter; | ||
| 5 | +import com.diligrp.tax.central.converter.impl.ChargeItemDeptConverter; | ||
| 6 | +import com.diligrp.tax.central.converter.impl.StringConverter; | ||
| 7 | +import lombok.Getter; | ||
| 8 | +import lombok.Setter; | ||
| 9 | + | ||
| 10 | +import java.math.BigDecimal; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * @Author: zhangmeiyang | ||
| 14 | + * @CreateTime: 2025-10-29 16:06 | ||
| 15 | + * @Version: todo | ||
| 16 | + */ | ||
| 17 | +@Getter | ||
| 18 | +@Setter | ||
| 19 | +public class ReceivableItem { | ||
| 20 | + /** | ||
| 21 | + * 费用编码(FCOSTID) | ||
| 22 | + */ | ||
| 23 | + @Converter(value = ChargeItemConverter.class, targetField = "FCOSTID") | ||
| 24 | + private String chargeItem; | ||
| 25 | + /** | ||
| 26 | + * 卡号(FASSETID) | ||
| 27 | + */ | ||
| 28 | + @Converter(value = ChargeItemConverter.class, targetField = "FASSETID") | ||
| 29 | + private String cardNumber; | ||
| 30 | + /** | ||
| 31 | + * 报价数量(FPriceQty ) | ||
| 32 | + */ | ||
| 33 | + @Converter(value = StringConverter.class, targetField = "FPriceQty") | ||
| 34 | + private String quotedQuantity; | ||
| 35 | + /** | ||
| 36 | + * 含税单价(FTaxPrice) | ||
| 37 | + */ | ||
| 38 | + @Converter(value = StringConverter.class, targetField = "FTaxPrice") | ||
| 39 | + private String unitPriceIncludingTax; | ||
| 40 | + /** | ||
| 41 | + * 价格(FPrice) | ||
| 42 | + */ | ||
| 43 | + @Converter(value = StringConverter.class, targetField = "FPrice") | ||
| 44 | + private String price; | ||
| 45 | + /** | ||
| 46 | + * 不含税金额(FNoTaxAmountFor_D) | ||
| 47 | + */ | ||
| 48 | + @Converter(value = StringConverter.class, targetField = "FNoTaxAmountFor_D") | ||
| 49 | + private String amountExcludingTax; | ||
| 50 | + /** | ||
| 51 | + * 费用部门(FCOSTDEPARTMENTID) | ||
| 52 | + */ | ||
| 53 | + @Converter(value = ChargeItemDeptConverter.class, targetField = "FCOSTDEPARTMENTID") | ||
| 54 | + private String chargeItemDept; | ||
| 55 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/item/RefundItem.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/document/kingdee/bill/item/RefundItem.java | ||
| 1 | +package com.diligrp.tax.central.domain.document.kingdee.bill.item; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.converter.anno.Converter; | ||
| 4 | +import com.diligrp.tax.central.converter.impl.*; | ||
| 5 | +import lombok.Getter; | ||
| 6 | +import lombok.Setter; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @Author: zhangmeiyang | ||
| 10 | + * @CreateTime: 2025-10-29 16:32 | ||
| 11 | + * @Version: todo | ||
| 12 | + */ | ||
| 13 | +@Getter | ||
| 14 | +@Setter | ||
| 15 | +public class RefundItem { | ||
| 16 | + /** | ||
| 17 | + * 费用编码(FCOSTID) | ||
| 18 | + */ | ||
| 19 | + @Converter(value = ChargeItemConverter.class, targetField = "FCOSTID") | ||
| 20 | + private String chargeItem; | ||
| 21 | + /** | ||
| 22 | + * 结算方法(FSETTLETYPEID) | ||
| 23 | + */ | ||
| 24 | + @Converter(value = SettleMethodConverter.class, targetField = "FSETTLETYPEID") | ||
| 25 | + private String settleMethod; | ||
| 26 | + /** | ||
| 27 | + * 应退金额(FREFUNDAMOUNTFOR) | ||
| 28 | + */ | ||
| 29 | + @Converter(value = StringConverter.class, targetField = "FREFUNDAMOUNTFOR") | ||
| 30 | + private String amountRefundable; | ||
| 31 | + /** | ||
| 32 | + * 备注(FNOTE) | ||
| 33 | + */ | ||
| 34 | + @Converter(value = StringConverter.class, targetField = "FNOTE") | ||
| 35 | + private String remark; | ||
| 36 | + /** | ||
| 37 | + * 原收款用途(FPURPOSEID) | ||
| 38 | + */ | ||
| 39 | + @Converter(value = PurposeUsedForConverter.class, targetField = "FPURPOSEID") | ||
| 40 | + private String receiveUsedFor; | ||
| 41 | + /** | ||
| 42 | + * 银行卡号(FACCOUNTID) | ||
| 43 | + */ | ||
| 44 | + @Converter(value = BankCardNumberConverter.class, targetField = "FACCOUNTID") | ||
| 45 | + private String bankCardNumber; | ||
| 46 | + /** | ||
| 47 | + * 费用部门(FCOSTDEPARTMENTID) | ||
| 48 | + */ | ||
| 49 | + @Converter(value = ChargeItemDeptConverter.class, targetField = "FCOSTDEPARTMENTID") | ||
| 50 | + private String chargeItemDept; | ||
| 51 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/CustomerMapping.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/CustomerMapping.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.*; | ||
| 5 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 6 | + | ||
| 7 | +import java.util.List; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-04 16:11 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +public class CustomerMapping extends BaseMapping { | ||
| 15 | + private String FCUSTID; | ||
| 16 | + private String FNumber; | ||
| 17 | + private String FName; | ||
| 18 | + private String FDescription; | ||
| 19 | + private FCreateOrgId FCreateOrgId; | ||
| 20 | + private FUseOrgId FUseOrgId; | ||
| 21 | + private String FShortName; | ||
| 22 | + private FCOUNTRY FCOUNTRY; | ||
| 23 | + private FTRADINGCURRID FTRADINGCURRID; | ||
| 24 | + private FPROVINCIAL FPROVINCIAL; | ||
| 25 | + private String FADDRESS; | ||
| 26 | + private FGroup FGroup; | ||
| 27 | + private String FINVOICETITLE; | ||
| 28 | + private String FLegalPerson; | ||
| 29 | + private String FSOCIALCRECODE; | ||
| 30 | + private String FRegisterAddress; | ||
| 31 | + private List<FT_BD_CUSTLOCATION> FT_BD_CUSTLOCATION; | ||
| 32 | + | ||
| 33 | + @JsonProperty("FNumber") | ||
| 34 | + public String getFNumber() { | ||
| 35 | + return FNumber; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + public void setFNumber(String FNumber) { | ||
| 39 | + this.FNumber = FNumber; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + @JsonProperty("FName") | ||
| 43 | + public String getFName() { | ||
| 44 | + return FName; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public void setFName(String FName) { | ||
| 48 | + this.FName = FName; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + @JsonProperty("FDescription") | ||
| 52 | + public String getFDescription() { | ||
| 53 | + return FDescription; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public void setFDescription(String FDescription) { | ||
| 57 | + this.FDescription = FDescription; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + @JsonProperty("FCreateOrgId") | ||
| 61 | + public FCreateOrgId getFCreateOrgId() { | ||
| 62 | + return FCreateOrgId; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public void setFCreateOrgId(FCreateOrgId FCreateOrgId) { | ||
| 66 | + this.FCreateOrgId = FCreateOrgId; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + @JsonProperty("FUseOrgId") | ||
| 70 | + public FUseOrgId getFUseOrgId() { | ||
| 71 | + return FUseOrgId; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public void setFUseOrgId(FUseOrgId FUseOrgId) { | ||
| 75 | + this.FUseOrgId = FUseOrgId; | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + @JsonProperty("FCUSTID") | ||
| 79 | + public String getFCUSTID() { | ||
| 80 | + return FCUSTID; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + public void setFCUSTID(String FCUSTID) { | ||
| 84 | + this.FCUSTID = FCUSTID; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + @JsonProperty("FShortName") | ||
| 88 | + public String getFShortName() { | ||
| 89 | + return FShortName; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setFShortName(String FShortName) { | ||
| 93 | + this.FShortName = FShortName; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + @JsonProperty("FCOUNTRY") | ||
| 97 | + public FCOUNTRY getFCOUNTRY() { | ||
| 98 | + return FCOUNTRY; | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + public void setFCOUNTRY(FCOUNTRY FCOUNTRY) { | ||
| 102 | + this.FCOUNTRY = FCOUNTRY; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + @JsonProperty("FTRADINGCURRID") | ||
| 106 | + public FTRADINGCURRID getFTRADINGCURRID() { | ||
| 107 | + return FTRADINGCURRID; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public void setFTRADINGCURRID(FTRADINGCURRID FTRADINGCURRID) { | ||
| 111 | + this.FTRADINGCURRID = FTRADINGCURRID; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + @JsonProperty("FPROVINCIAL") | ||
| 115 | + public FPROVINCIAL getFPROVINCIAL() { | ||
| 116 | + return FPROVINCIAL; | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + public void setFPROVINCIAL(FPROVINCIAL FPROVINCIAL) { | ||
| 120 | + this.FPROVINCIAL = FPROVINCIAL; | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + @JsonProperty("FADDRESS") | ||
| 124 | + public String getFADDRESS() { | ||
| 125 | + return FADDRESS; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + public void setFADDRESS(String FADDRESS) { | ||
| 129 | + this.FADDRESS = FADDRESS; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + @JsonProperty("FGroup") | ||
| 133 | + public FGroup getFGroup() { | ||
| 134 | + return FGroup; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + public void setFGroup(FGroup FGroup) { | ||
| 138 | + this.FGroup = FGroup; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + @JsonProperty("FINVOICETITLE") | ||
| 142 | + public String getFINVOICETITLE() { | ||
| 143 | + return FINVOICETITLE; | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + public void setFINVOICETITLE(String FINVOICETITLE) { | ||
| 147 | + this.FINVOICETITLE = FINVOICETITLE; | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + @JsonProperty("FLegalPerson") | ||
| 151 | + public String getFLegalPerson() { | ||
| 152 | + return FLegalPerson; | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + public void setFLegalPerson(String FLegalPerson) { | ||
| 156 | + this.FLegalPerson = FLegalPerson; | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + @JsonProperty("FSOCIALCRECODE") | ||
| 160 | + public String getFSOCIALCRECODE() { | ||
| 161 | + return FSOCIALCRECODE; | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + public void setFSOCIALCRECODE(String FSOCIALCRECODE) { | ||
| 165 | + this.FSOCIALCRECODE = FSOCIALCRECODE; | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + @JsonProperty("FRegisterAddress") | ||
| 169 | + public String getFRegisterAddress() { | ||
| 170 | + return FRegisterAddress; | ||
| 171 | + } | ||
| 172 | + | ||
| 173 | + public void setFRegisterAddress(String FRegisterAddress) { | ||
| 174 | + this.FRegisterAddress = FRegisterAddress; | ||
| 175 | + } | ||
| 176 | + | ||
| 177 | + @JsonProperty("FT_BD_CUSTLOCATION") | ||
| 178 | + public List<FT_BD_CUSTLOCATION> getFT_BD_CUSTLOCATION() { | ||
| 179 | + return FT_BD_CUSTLOCATION; | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + public void setFT_BD_CUSTLOCATION(List<FT_BD_CUSTLOCATION> FT_BD_CUSTLOCATION) { | ||
| 183 | + this.FT_BD_CUSTLOCATION = FT_BD_CUSTLOCATION; | ||
| 184 | + } | ||
| 185 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/ReceiptMapping.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/ReceiptMapping.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.*; | ||
| 5 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 6 | + | ||
| 7 | +import java.io.Serializable; | ||
| 8 | +import java.util.List; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-11-04 15:20 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +public class ReceiptMapping extends BaseMapping implements Serializable { | ||
| 16 | + private String FREMARK; | ||
| 17 | + private String F_ZDB_Text5; | ||
| 18 | + private String FDATE; | ||
| 19 | + private FBillTypeID FBillTypeID; | ||
| 20 | + private FSETTLEMAINBOOKID FSETTLEMAINBOOKID; | ||
| 21 | + private FSALEDEPTID FSALEDEPTID; | ||
| 22 | + private FSETTLEORGID FSETTLEORGID; | ||
| 23 | + private FCURRENCYID FCURRENCYID; | ||
| 24 | + private FSALEORGID FSALEORGID; | ||
| 25 | + private FPAYORGID FPAYORGID; | ||
| 26 | + private String FCONTACTUNITTYPE; | ||
| 27 | + private FCONTACTUNIT FCONTACTUNIT; | ||
| 28 | + private String FPAYUNITTYPE; | ||
| 29 | + private FPAYUNIT FPAYUNIT; | ||
| 30 | + private List<FRECEIVEBILLENTRY> FRECEIVEBILLENTRY; | ||
| 31 | + | ||
| 32 | + @JsonProperty("FREMARK") | ||
| 33 | + public String getFREMARK() { | ||
| 34 | + return FREMARK; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public void setFREMARK(String FREMARK) { | ||
| 38 | + this.FREMARK = FREMARK; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + @JsonProperty("F_ZDB_Text5") | ||
| 42 | + public String getF_ZDB_Text5() { | ||
| 43 | + return F_ZDB_Text5; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public void setF_ZDB_Text5(String f_ZDB_Text5) { | ||
| 47 | + F_ZDB_Text5 = f_ZDB_Text5; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + @JsonProperty("FDATE") | ||
| 51 | + public String getFDATE() { | ||
| 52 | + return FDATE; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public void setFDATE(String FDATE) { | ||
| 56 | + this.FDATE = FDATE; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + @JsonProperty("FBillTypeID") | ||
| 60 | + public FBillTypeID getFBillTypeID() { | ||
| 61 | + return FBillTypeID; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + public void setFBillTypeID(FBillTypeID FBillTypeID) { | ||
| 65 | + this.FBillTypeID = FBillTypeID; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + @JsonProperty("FSETTLEMAINBOOKID") | ||
| 69 | + public FSETTLEMAINBOOKID getFSETTLEMAINBOOKID() { | ||
| 70 | + return FSETTLEMAINBOOKID; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public void setFSETTLEMAINBOOKID(FSETTLEMAINBOOKID FSETTLEMAINBOOKID) { | ||
| 74 | + this.FSETTLEMAINBOOKID = FSETTLEMAINBOOKID; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + @JsonProperty("FSALEDEPTID") | ||
| 78 | + public FSALEDEPTID getFSALEDEPTID() { | ||
| 79 | + return FSALEDEPTID; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + public void setFSALEDEPTID(FSALEDEPTID FSALEDEPTID) { | ||
| 83 | + this.FSALEDEPTID = FSALEDEPTID; | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + @JsonProperty("FSETTLEORGID") | ||
| 87 | + public FSETTLEORGID getFSETTLEORGID() { | ||
| 88 | + return FSETTLEORGID; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + public void setFSETTLEORGID(FSETTLEORGID FSETTLEORGID) { | ||
| 92 | + this.FSETTLEORGID = FSETTLEORGID; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + @JsonProperty("FCURRENCYID") | ||
| 96 | + public FCURRENCYID getFCURRENCYID() { | ||
| 97 | + return FCURRENCYID; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setFCURRENCYID(FCURRENCYID FCURRENCYID) { | ||
| 101 | + this.FCURRENCYID = FCURRENCYID; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + @JsonProperty("FSALEORGID") | ||
| 105 | + public FSALEORGID getFSALEORGID() { | ||
| 106 | + return FSALEORGID; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public void setFSALEORGID(FSALEORGID FSALEORGID) { | ||
| 110 | + this.FSALEORGID = FSALEORGID; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + @JsonProperty("FPAYORGID") | ||
| 114 | + public FPAYORGID getFPAYORGID() { | ||
| 115 | + return FPAYORGID; | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + public void setFPAYORGID(FPAYORGID FPAYORGID) { | ||
| 119 | + this.FPAYORGID = FPAYORGID; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + @JsonProperty("FCONTACTUNITTYPE") | ||
| 123 | + public String getFCONTACTUNITTYPE() { | ||
| 124 | + return FCONTACTUNITTYPE; | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + public void setFCONTACTUNITTYPE(String FCONTACTUNITTYPE) { | ||
| 128 | + this.FCONTACTUNITTYPE = FCONTACTUNITTYPE; | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + @JsonProperty("FCONTACTUNIT") | ||
| 132 | + public FCONTACTUNIT getFCONTACTUNIT() { | ||
| 133 | + return FCONTACTUNIT; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + public void setFCONTACTUNIT(FCONTACTUNIT FCONTACTUNIT) { | ||
| 137 | + this.FCONTACTUNIT = FCONTACTUNIT; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + @JsonProperty("FPAYUNITTYPE") | ||
| 141 | + public String getFPAYUNITTYPE() { | ||
| 142 | + return FPAYUNITTYPE; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + public void setFPAYUNITTYPE(String FPAYUNITTYPE) { | ||
| 146 | + this.FPAYUNITTYPE = FPAYUNITTYPE; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + @JsonProperty("FPAYUNIT") | ||
| 150 | + public FPAYUNIT getFPAYUNIT() { | ||
| 151 | + return FPAYUNIT; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + public void setFPAYUNIT(FPAYUNIT FPAYUNIT) { | ||
| 155 | + this.FPAYUNIT = FPAYUNIT; | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + @JsonProperty("FRECEIVEBILLENTRY") | ||
| 159 | + public List<FRECEIVEBILLENTRY> getFRECEIVEBILLENTRY() { | ||
| 160 | + return FRECEIVEBILLENTRY; | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + public void setFRECEIVEBILLENTRY(List<FRECEIVEBILLENTRY> FRECEIVEBILLENTRY) { | ||
| 164 | + this.FRECEIVEBILLENTRY = FRECEIVEBILLENTRY; | ||
| 165 | + } | ||
| 166 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/ReceivableMapping.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/ReceivableMapping.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.*; | ||
| 5 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 6 | + | ||
| 7 | +import java.io.Serializable; | ||
| 8 | +import java.util.List; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2024-10-22 18:34 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +public class ReceivableMapping extends BaseMapping implements Serializable { | ||
| 16 | + private String FAR_Remark; | ||
| 17 | + private String FDATE; | ||
| 18 | + private FBillTypeID FBillTypeID; | ||
| 19 | + private FSETTLEORGID FSETTLEORGID; | ||
| 20 | + private FSettleTypeID FSettleTypeID; | ||
| 21 | + private FCUSTOMERID FCUSTOMERID; | ||
| 22 | + private FSALEORGID FSALEORGID; | ||
| 23 | + private FSALEDEPTID FSALEDEPTID; | ||
| 24 | + private FPAYORGID FPAYORGID; | ||
| 25 | + private FTRANSFERID FTRANSFERID; | ||
| 26 | + private FORDERID FORDERID; | ||
| 27 | + private F_PZCW_Base_qtr F_PZCW_Base_qtr; | ||
| 28 | + private FChargeId FChargeId; | ||
| 29 | + private FMAINBOOKSTDCURRID FMAINBOOKSTDCURRID; | ||
| 30 | + private FCURRENCYID FCURRENCYID; | ||
| 31 | + private List<FEntityDetail> FEntityDetail; | ||
| 32 | + private String F_ZDB_Text; | ||
| 33 | + private String F_ZDB_Text1; | ||
| 34 | + private String F_ZDB_Text5; | ||
| 35 | + private String F_PZCW_Text; | ||
| 36 | + private String F_PZCW_Text1; | ||
| 37 | + private String F_ZDB_Text667; | ||
| 38 | + | ||
| 39 | + @JsonProperty("F_ZDB_Text") | ||
| 40 | + public String getF_ZDB_Text() { | ||
| 41 | + return F_ZDB_Text; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public void setF_ZDB_Text(String f_ZDB_Text) { | ||
| 45 | + F_ZDB_Text = f_ZDB_Text; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + @JsonProperty("F_ZDB_Text1") | ||
| 49 | + public String getF_ZDB_Text1() { | ||
| 50 | + return F_ZDB_Text1; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + public void setF_ZDB_Text1(String f_ZDB_Text1) { | ||
| 54 | + F_ZDB_Text1 = f_ZDB_Text1; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + @JsonProperty("F_ZDB_Text5") | ||
| 58 | + public String getF_ZDB_Text5() { | ||
| 59 | + return F_ZDB_Text5; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public void setF_ZDB_Text5(String f_ZDB_Text5) { | ||
| 63 | + F_ZDB_Text5 = f_ZDB_Text5; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + @JsonProperty("FAR_Remark") | ||
| 67 | + public String getFAR_Remark() { | ||
| 68 | + return FAR_Remark; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + public void setFAR_Remark(String FAR_Remark) { | ||
| 72 | + this.FAR_Remark = FAR_Remark; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + @JsonProperty("F_PZCW_Text") | ||
| 76 | + public String getF_PZCW_Text() { | ||
| 77 | + return F_PZCW_Text; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public void setF_PZCW_Text(String f_PZCW_Text) { | ||
| 81 | + F_PZCW_Text = f_PZCW_Text; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + @JsonProperty("F_PZCW_Text1") | ||
| 85 | + public String getF_PZCW_Text1() { | ||
| 86 | + return F_PZCW_Text1; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + public void setF_PZCW_Text1(String f_PZCW_Text1) { | ||
| 90 | + F_PZCW_Text1 = f_PZCW_Text1; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + @JsonProperty("FDATE") | ||
| 94 | + public String getFDATE() { | ||
| 95 | + return FDATE; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + public void setFDATE(String FDATE) { | ||
| 99 | + this.FDATE = FDATE; | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + @JsonProperty("FBillTypeID") | ||
| 103 | + public FBillTypeID getFBillTypeID() { | ||
| 104 | + return FBillTypeID; | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + public void setFBillTypeID(FBillTypeID FBillTypeID) { | ||
| 108 | + this.FBillTypeID = FBillTypeID; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + @JsonProperty("FSETTLEORGID") | ||
| 112 | + public FSETTLEORGID getFSETTLEORGID() { | ||
| 113 | + return FSETTLEORGID; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public void setFSETTLEORGID(FSETTLEORGID FSETTLEORGID) { | ||
| 117 | + this.FSETTLEORGID = FSETTLEORGID; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + @JsonProperty("FCURRENCYID") | ||
| 121 | + public FCURRENCYID getFCURRENCYID() { | ||
| 122 | + return FCURRENCYID; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + public void setFCURRENCYID(FCURRENCYID FCURRENCYID) { | ||
| 126 | + this.FCURRENCYID = FCURRENCYID; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + @JsonProperty("FCUSTOMERID") | ||
| 130 | + public FCUSTOMERID getFCUSTOMERID() { | ||
| 131 | + return FCUSTOMERID; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + public void setFCUSTOMERID(FCUSTOMERID FCUSTOMERID) { | ||
| 135 | + this.FCUSTOMERID = FCUSTOMERID; | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + @JsonProperty("FSALEORGID") | ||
| 139 | + public FSALEORGID getFSALEORGID() { | ||
| 140 | + return FSALEORGID; | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + public void setFSALEORGID(FSALEORGID FSALEORGID) { | ||
| 144 | + this.FSALEORGID = FSALEORGID; | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + @JsonProperty("FSALEDEPTID") | ||
| 148 | + public FSALEDEPTID getFSALEDEPTID() { | ||
| 149 | + return FSALEDEPTID; | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + public void setFSALEDEPTID(FSALEDEPTID FSALEDEPTID) { | ||
| 153 | + this.FSALEDEPTID = FSALEDEPTID; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + @JsonProperty("FPAYORGID") | ||
| 157 | + public FPAYORGID getFPAYORGID() { | ||
| 158 | + return FPAYORGID; | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + public void setFPAYORGID(FPAYORGID FPAYORGID) { | ||
| 162 | + this.FPAYORGID = FPAYORGID; | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + @JsonProperty("FTRANSFERID") | ||
| 166 | + public FTRANSFERID getFTRANSFERID() { | ||
| 167 | + return FTRANSFERID; | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + public void setFTRANSFERID(FTRANSFERID FTRANSFERID) { | ||
| 171 | + this.FTRANSFERID = FTRANSFERID; | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + @JsonProperty("FORDERID") | ||
| 175 | + public FORDERID getFORDERID() { | ||
| 176 | + return FORDERID; | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + public void setFORDERID(FORDERID FORDERID) { | ||
| 180 | + this.FORDERID = FORDERID; | ||
| 181 | + } | ||
| 182 | + | ||
| 183 | + @JsonProperty("F_PZCW_Base_qtr") | ||
| 184 | + public F_PZCW_Base_qtr getF_PZCW_Base_qtr() { | ||
| 185 | + return F_PZCW_Base_qtr; | ||
| 186 | + } | ||
| 187 | + | ||
| 188 | + public void setF_PZCW_Base_qtr(F_PZCW_Base_qtr f_PZCW_Base_qtr) { | ||
| 189 | + F_PZCW_Base_qtr = f_PZCW_Base_qtr; | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + @JsonProperty("FMAINBOOKSTDCURRID") | ||
| 193 | + public FMAINBOOKSTDCURRID getFMAINBOOKSTDCURRID() { | ||
| 194 | + return FMAINBOOKSTDCURRID; | ||
| 195 | + } | ||
| 196 | + | ||
| 197 | + public void setFMAINBOOKSTDCURRID(FMAINBOOKSTDCURRID FMAINBOOKSTDCURRID) { | ||
| 198 | + this.FMAINBOOKSTDCURRID = FMAINBOOKSTDCURRID; | ||
| 199 | + } | ||
| 200 | + | ||
| 201 | + @JsonProperty("FChargeId") | ||
| 202 | + public FChargeId getFChargeId() { | ||
| 203 | + return FChargeId; | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + public void setFChargeId(FChargeId FChargeId) { | ||
| 207 | + this.FChargeId = FChargeId; | ||
| 208 | + } | ||
| 209 | + | ||
| 210 | + @JsonProperty("FSettleTypeID") | ||
| 211 | + public FSettleTypeID getFSettleTypeID() { | ||
| 212 | + return FSettleTypeID; | ||
| 213 | + } | ||
| 214 | + | ||
| 215 | + public void setFSettleTypeID(FSettleTypeID FSettleTypeID) { | ||
| 216 | + this.FSettleTypeID = FSettleTypeID; | ||
| 217 | + } | ||
| 218 | + | ||
| 219 | + @JsonProperty("FEntityDetail") | ||
| 220 | + public List<FEntityDetail> getFEntityDetail() { | ||
| 221 | + return FEntityDetail; | ||
| 222 | + } | ||
| 223 | + | ||
| 224 | + public void setFEntityDetail(List<FEntityDetail> FEntityDetail) { | ||
| 225 | + this.FEntityDetail = FEntityDetail; | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + @JsonProperty("F_ZDB_Text667") | ||
| 229 | + public String getF_ZDB_Text667() { | ||
| 230 | + return F_ZDB_Text667; | ||
| 231 | + } | ||
| 232 | + | ||
| 233 | + public void setF_ZDB_Text667(String f_ZDB_Text667) { | ||
| 234 | + F_ZDB_Text667 = f_ZDB_Text667; | ||
| 235 | + } | ||
| 236 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/RefundMapping.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/RefundMapping.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.*; | ||
| 5 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 6 | + | ||
| 7 | +import java.io.Serializable; | ||
| 8 | +import java.util.List; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @Author: zhangmeiyang | ||
| 12 | + * @CreateTime: 2025-11-04 15:22 | ||
| 13 | + * @Version: todo | ||
| 14 | + */ | ||
| 15 | +public class RefundMapping extends BaseMapping implements Serializable { | ||
| 16 | + private String FDATE; | ||
| 17 | + private String FREMARK; | ||
| 18 | + private FBillTypeID FBillTypeID; | ||
| 19 | + private FSETTLEORGID FSETTLEORGID; | ||
| 20 | + private FSETTLECUR FSETTLECUR; | ||
| 21 | + private FSALEORGID FSALEORGID; | ||
| 22 | + private FSALEDEPTID FSALEDEPTID; | ||
| 23 | + private FPAYORGID FPAYORGID; | ||
| 24 | + private FCURRENCYID FCURRENCYID; | ||
| 25 | + private String FRECTUNITTYPE; | ||
| 26 | + private FRECTUNIT FRECTUNIT; | ||
| 27 | + private String FCONTACTUNITTYPE; | ||
| 28 | + private FCONTACTUNIT FCONTACTUNIT; | ||
| 29 | + private String F_ZDB_Text5; | ||
| 30 | + private List<FREFUNDBILLENTRY> FREFUNDBILLENTRY; | ||
| 31 | + | ||
| 32 | + @JsonProperty("FREMARK") | ||
| 33 | + public String getFREMARK() { | ||
| 34 | + return FREMARK; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public void setFREMARK(String FREMARK) { | ||
| 38 | + this.FREMARK = FREMARK; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + @JsonProperty("F_ZDB_Text5") | ||
| 42 | + public String getF_ZDB_Text5() { | ||
| 43 | + return F_ZDB_Text5; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public void setF_ZDB_Text5(String f_ZDB_Text5) { | ||
| 47 | + F_ZDB_Text5 = f_ZDB_Text5; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + @JsonProperty("FDATE") | ||
| 51 | + public String getFDATE() { | ||
| 52 | + return FDATE; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public void setFDATE(String FDATE) { | ||
| 56 | + this.FDATE = FDATE; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + @JsonProperty("FSETTLEORGID") | ||
| 60 | + public FSETTLEORGID getFSETTLEORGID() { | ||
| 61 | + return FSETTLEORGID; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + public void setFSETTLEORGID(FSETTLEORGID FSETTLEORGID) { | ||
| 65 | + this.FSETTLEORGID = FSETTLEORGID; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + @JsonProperty("FSALEORGID") | ||
| 69 | + public FSALEORGID getFSALEORGID() { | ||
| 70 | + return FSALEORGID; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public void setFSALEORGID(FSALEORGID FSALEORGID) { | ||
| 74 | + this.FSALEORGID = FSALEORGID; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + @JsonProperty("FBillTypeID") | ||
| 78 | + public FBillTypeID getFBillTypeID() { | ||
| 79 | + return FBillTypeID; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + public void setFBillTypeID(FBillTypeID FBillTypeID) { | ||
| 83 | + this.FBillTypeID = FBillTypeID; | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + @JsonProperty("FCURRENCYID") | ||
| 87 | + public FCURRENCYID getFCURRENCYID() { | ||
| 88 | + return FCURRENCYID; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + public void setFCURRENCYID(FCURRENCYID FCURRENCYID) { | ||
| 92 | + this.FCURRENCYID = FCURRENCYID; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + @JsonProperty("FSALEDEPTID") | ||
| 96 | + public FSALEDEPTID getFSALEDEPTID() { | ||
| 97 | + return FSALEDEPTID; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setFSALEDEPTID(FSALEDEPTID FSALEDEPTID) { | ||
| 101 | + this.FSALEDEPTID = FSALEDEPTID; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + @JsonProperty("FPAYORGID") | ||
| 105 | + public FPAYORGID getFPAYORGID() { | ||
| 106 | + return FPAYORGID; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public void setFPAYORGID(FPAYORGID FPAYORGID) { | ||
| 110 | + this.FPAYORGID = FPAYORGID; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + @JsonProperty("FSETTLECUR") | ||
| 114 | + public FSETTLECUR getFSETTLECUR() { | ||
| 115 | + return FSETTLECUR; | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + public void setFSETTLECUR(FSETTLECUR FSETTLECUR) { | ||
| 119 | + this.FSETTLECUR = FSETTLECUR; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + @JsonProperty("FRECTUNITTYPE") | ||
| 123 | + public String getFRECTUNITTYPE() { | ||
| 124 | + return FRECTUNITTYPE; | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + public void setFRECTUNITTYPE(String FRECTUNITTYPE) { | ||
| 128 | + this.FRECTUNITTYPE = FRECTUNITTYPE; | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + @JsonProperty("FRECTUNIT") | ||
| 132 | + public FRECTUNIT getFRECTUNIT() { | ||
| 133 | + return FRECTUNIT; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + public void setFRECTUNIT(FRECTUNIT FRECTUNIT) { | ||
| 137 | + this.FRECTUNIT = FRECTUNIT; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + @JsonProperty("FCONTACTUNITTYPE") | ||
| 141 | + public String getFCONTACTUNITTYPE() { | ||
| 142 | + return FCONTACTUNITTYPE; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + public void setFCONTACTUNITTYPE(String FCONTACTUNITTYPE) { | ||
| 146 | + this.FCONTACTUNITTYPE = FCONTACTUNITTYPE; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + @JsonProperty("FCONTACTUNIT") | ||
| 150 | + public FCONTACTUNIT getFCONTACTUNIT() { | ||
| 151 | + return FCONTACTUNIT; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + public void setFCONTACTUNIT(FCONTACTUNIT FCONTACTUNIT) { | ||
| 155 | + this.FCONTACTUNIT = FCONTACTUNIT; | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + @JsonProperty("FREFUNDBILLENTRY") | ||
| 159 | + public List<FREFUNDBILLENTRY> getFREFUNDBILLENTRY() { | ||
| 160 | + return FREFUNDBILLENTRY; | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + public void setFREFUNDBILLENTRY(List<FREFUNDBILLENTRY> FREFUNDBILLENTRY) { | ||
| 164 | + this.FREFUNDBILLENTRY = FREFUNDBILLENTRY; | ||
| 165 | + } | ||
| 166 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FACCOUNTID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FACCOUNTID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-11-25 15:27 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FACCOUNTID { | ||
| 11 | + | ||
| 12 | + private String FNumber; | ||
| 13 | + | ||
| 14 | + @JsonProperty("FNumber") | ||
| 15 | + public String getFNumber() { | ||
| 16 | + return FNumber; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + public void setFNumber(String FNumber) { | ||
| 20 | + this.FNumber = FNumber; | ||
| 21 | + } | ||
| 22 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FASSETID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FASSETID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:04 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FASSETID { | ||
| 11 | + private String FNUMBER; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNUMBER") | ||
| 14 | + public String getFNUMBER() { | ||
| 15 | + return FNUMBER; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNUMBER(String FNUMBER) { | ||
| 19 | + this.FNUMBER = FNUMBER; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FBillTypeID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FBillTypeID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-09 10:26 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FBillTypeID { | ||
| 11 | + private String FNUMBER; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNUMBER") | ||
| 14 | + public String getFNUMBER() { | ||
| 15 | + return FNUMBER; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNUMBER(String FNUMBER) { | ||
| 19 | + this.FNUMBER = FNUMBER; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCONTACTUNIT.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCONTACTUNIT.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-23 15:15 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FCONTACTUNIT { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCOSTDEPARTMENTID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCOSTDEPARTMENTID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:04 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FCOSTDEPARTMENTID { | ||
| 11 | + private String FNUMBER; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNUMBER") | ||
| 14 | + public String getFNUMBER() { | ||
| 15 | + return FNUMBER; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNUMBER(String FNUMBER) { | ||
| 19 | + this.FNUMBER = FNUMBER; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCOSTID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCOSTID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:03 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FCOSTID { | ||
| 11 | + private String FNUMBER; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNUMBER") | ||
| 14 | + public String getFNUMBER() { | ||
| 15 | + return FNUMBER; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNUMBER(String FNUMBER) { | ||
| 19 | + this.FNUMBER = FNUMBER; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCOUNTRY.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCOUNTRY.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-23 15:15 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FCOUNTRY { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCURRENCYID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCURRENCYID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-09 10:25 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FCURRENCYID { | ||
| 11 | + | ||
| 12 | + private String FNumber; | ||
| 13 | + | ||
| 14 | + @JsonProperty("FNumber") | ||
| 15 | + public String getFNumber() { | ||
| 16 | + return FNumber; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + public void setFNumber(String FNumber) { | ||
| 20 | + this.FNumber = FNumber; | ||
| 21 | + } | ||
| 22 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCUSTOMERID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCUSTOMERID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:00 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FCUSTOMERID { | ||
| 11 | + | ||
| 12 | + private String FNumber; | ||
| 13 | + | ||
| 14 | + @JsonProperty("FNumber") | ||
| 15 | + public String getFNumber() { | ||
| 16 | + return FNumber; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + public void setFNumber(String FNumber) { | ||
| 20 | + this.FNumber = FNumber; | ||
| 21 | + } | ||
| 22 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FChargeId.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FChargeId.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:06 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FChargeId { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FContactId.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FContactId.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-23 17:56 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FContactId { | ||
| 11 | + private String FNUMBER; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNUMBER") | ||
| 14 | + public String getFNUMBER() { | ||
| 15 | + return FNUMBER; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNUMBER(String FNUMBER) { | ||
| 19 | + this.FNUMBER = FNUMBER; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCreateOrgId.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FCreateOrgId.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-23 15:15 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FCreateOrgId { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FEntityDetail.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FEntityDetail.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +import java.math.BigDecimal; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2024-10-28 16:41 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +public class FEntityDetail { | ||
| 13 | + private FCOSTID FCOSTID; | ||
| 14 | + private FASSETID FASSETID; | ||
| 15 | + private String FPriceQty; | ||
| 16 | + private String FTaxPrice; | ||
| 17 | + private String FPrice; | ||
| 18 | + private String FNoTaxAmountFor_D; | ||
| 19 | + private FCOSTDEPARTMENTID FCOSTDEPARTMENTID; | ||
| 20 | + | ||
| 21 | + @JsonProperty("FCOSTID") | ||
| 22 | + public FCOSTID getFCOSTID() { | ||
| 23 | + return FCOSTID; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public void setFCOSTID(FCOSTID FCOSTID) { | ||
| 27 | + this.FCOSTID = FCOSTID; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + @JsonProperty("FASSETID") | ||
| 31 | + public FASSETID getFASSETID() { | ||
| 32 | + return FASSETID; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + public void setFASSETID(FASSETID FASSETID) { | ||
| 36 | + this.FASSETID = FASSETID; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + @JsonProperty("FPriceQty") | ||
| 40 | + public String getFPriceQty() { | ||
| 41 | + return FPriceQty; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public void setFPriceQty(String FPriceQty) { | ||
| 45 | + this.FPriceQty = FPriceQty; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + @JsonProperty("FTaxPrice") | ||
| 49 | + public String getFTaxPrice() { | ||
| 50 | + return FTaxPrice; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + public void setFTaxPrice(String FTaxPrice) { | ||
| 54 | + this.FTaxPrice = FTaxPrice; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + @JsonProperty("FPrice") | ||
| 58 | + public String getFPrice() { | ||
| 59 | + return FPrice; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public void setFPrice(String FPrice) { | ||
| 63 | + this.FPrice = FPrice; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + @JsonProperty("FNoTaxAmountFor_D") | ||
| 67 | + public String getFNoTaxAmountFor_D() { | ||
| 68 | + return FNoTaxAmountFor_D; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + public void setFNoTaxAmountFor_D(String FNoTaxAmountFor_D) { | ||
| 72 | + this.FNoTaxAmountFor_D = FNoTaxAmountFor_D; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + @JsonProperty("FCOSTDEPARTMENTID") | ||
| 76 | + public FCOSTDEPARTMENTID getFCOSTDEPARTMENTID() { | ||
| 77 | + return FCOSTDEPARTMENTID; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public void setFCOSTDEPARTMENTID(FCOSTDEPARTMENTID FCOSTDEPARTMENTID) { | ||
| 81 | + this.FCOSTDEPARTMENTID = FCOSTDEPARTMENTID; | ||
| 82 | + } | ||
| 83 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FGroup.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FGroup.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-23 15:15 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FGroup { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FMAINBOOKSTDCURRID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FMAINBOOKSTDCURRID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:06 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FMAINBOOKSTDCURRID { | ||
| 11 | + | ||
| 12 | + private String FNumber; | ||
| 13 | + | ||
| 14 | + @JsonProperty("FNumber") | ||
| 15 | + public String getFNumber() { | ||
| 16 | + return FNumber; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + public void setFNumber(String FNumber) { | ||
| 20 | + this.FNumber = FNumber; | ||
| 21 | + } | ||
| 22 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FORDERID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FORDERID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:06 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FORDERID { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FPAYORGID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FPAYORGID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:01 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FPAYORGID { | ||
| 11 | + | ||
| 12 | + private String FNumber; | ||
| 13 | + | ||
| 14 | + @JsonProperty("FNumber") | ||
| 15 | + public String getFNumber() { | ||
| 16 | + return FNumber; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + public void setFNumber(String FNumber) { | ||
| 20 | + this.FNumber = FNumber; | ||
| 21 | + } | ||
| 22 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FPAYUNIT.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FPAYUNIT.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-23 15:15 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FPAYUNIT { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FPROVINCIAL.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FPROVINCIAL.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-23 15:15 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FPROVINCIAL { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FPURPOSEID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FPURPOSEID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-23 15:15 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FPURPOSEID { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FRECEIVEBILLENTRY.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FRECEIVEBILLENTRY.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +import java.math.BigDecimal; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2024-11-25 10:10 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +public class FRECEIVEBILLENTRY { | ||
| 13 | + private FCOSTID FCOSTID; | ||
| 14 | + private FSETTLETYPE FSETTLETYPEID; | ||
| 15 | + private String FRECTOTALAMOUNTFOR; | ||
| 16 | + private FPURPOSEID FPURPOSEID; | ||
| 17 | + private FACCOUNTID FACCOUNTID; | ||
| 18 | + private FCOSTDEPARTMENTID FCOSTDEPARTMENTID; | ||
| 19 | + | ||
| 20 | + @JsonProperty("FCOSTID") | ||
| 21 | + public FCOSTID getFCOSTID() { | ||
| 22 | + return FCOSTID; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public void setFCOSTID(FCOSTID FCOSTID) { | ||
| 26 | + this.FCOSTID = FCOSTID; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + @JsonProperty("FSETTLETYPEID") | ||
| 30 | + public FSETTLETYPE getFSETTLETYPEID() { | ||
| 31 | + return FSETTLETYPEID; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + public void setFSETTLETYPEID(FSETTLETYPE FSETTLETYPEID) { | ||
| 35 | + this.FSETTLETYPEID = FSETTLETYPEID; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @JsonProperty("FRECTOTALAMOUNTFOR") | ||
| 39 | + public String getFRECTOTALAMOUNTFOR() { | ||
| 40 | + return FRECTOTALAMOUNTFOR; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + public void setFRECTOTALAMOUNTFOR(String FRECTOTALAMOUNTFOR) { | ||
| 44 | + this.FRECTOTALAMOUNTFOR = FRECTOTALAMOUNTFOR; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + @JsonProperty("FPURPOSEID") | ||
| 48 | + public FPURPOSEID getFPURPOSEID() { | ||
| 49 | + return FPURPOSEID; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public void setFPURPOSEID(FPURPOSEID FPURPOSEID) { | ||
| 53 | + this.FPURPOSEID = FPURPOSEID; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + @JsonProperty("FACCOUNTID") | ||
| 57 | + public FACCOUNTID getFACCOUNTID() { | ||
| 58 | + return FACCOUNTID; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + public void setFACCOUNTID(FACCOUNTID FACCOUNTID) { | ||
| 62 | + this.FACCOUNTID = FACCOUNTID; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + @JsonProperty("FCOSTDEPARTMENTID") | ||
| 66 | + public FCOSTDEPARTMENTID getFCOSTDEPARTMENTID() { | ||
| 67 | + return FCOSTDEPARTMENTID; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + public void setFCOSTDEPARTMENTID(FCOSTDEPARTMENTID FCOSTDEPARTMENTID) { | ||
| 71 | + this.FCOSTDEPARTMENTID = FCOSTDEPARTMENTID; | ||
| 72 | + } | ||
| 73 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FRECTUNIT.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FRECTUNIT.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-11-25 15:27 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FRECTUNIT { | ||
| 11 | + | ||
| 12 | + private String FNumber; | ||
| 13 | + | ||
| 14 | + @JsonProperty("FNumber") | ||
| 15 | + public String getFNumber() { | ||
| 16 | + return FNumber; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + public void setFNumber(String FNumber) { | ||
| 20 | + this.FNumber = FNumber; | ||
| 21 | + } | ||
| 22 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FREFUNDBILLENTRY.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FREFUNDBILLENTRY.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +import java.io.Serializable; | ||
| 6 | +import java.math.BigDecimal; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @Author: zhangmeiyang | ||
| 10 | + * @CreateTime: 2024-11-28 09:13 | ||
| 11 | + * @Version: todo | ||
| 12 | + */ | ||
| 13 | +public class FREFUNDBILLENTRY implements Serializable { | ||
| 14 | + private FCOSTID FCOSTID; | ||
| 15 | + private FSETTLETYPE FSETTLETYPEID; | ||
| 16 | + private String FREFUNDAMOUNTFOR; | ||
| 17 | + private String FNOTE; | ||
| 18 | + private FPURPOSEID FPURPOSEID; | ||
| 19 | + private FACCOUNTID FACCOUNTID; | ||
| 20 | + private FCOSTDEPARTMENTID FCOSTDEPARTMENTID; | ||
| 21 | + | ||
| 22 | + @JsonProperty("FCOSTID") | ||
| 23 | + public FCOSTID getFCOSTID() { | ||
| 24 | + return FCOSTID; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + public void setFCOSTID(FCOSTID FCOSTID) { | ||
| 28 | + this.FCOSTID = FCOSTID; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + @JsonProperty("FSETTLETYPEID") | ||
| 32 | + public FSETTLETYPE getFSETTLETYPEID() { | ||
| 33 | + return FSETTLETYPEID; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + public void setFSETTLETYPEID(FSETTLETYPE FSETTLETYPEID) { | ||
| 37 | + this.FSETTLETYPEID = FSETTLETYPEID; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + @JsonProperty("FREFUNDAMOUNTFOR") | ||
| 41 | + public String getFREFUNDAMOUNTFOR() { | ||
| 42 | + return FREFUNDAMOUNTFOR; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public void setFREFUNDAMOUNTFOR(String FREFUNDAMOUNTFOR) { | ||
| 46 | + this.FREFUNDAMOUNTFOR = FREFUNDAMOUNTFOR; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + @JsonProperty("FNOTE") | ||
| 50 | + public String getFNOTE() { | ||
| 51 | + return FNOTE; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public void setFNOTE(String FNOTE) { | ||
| 55 | + this.FNOTE = FNOTE; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + @JsonProperty("FPURPOSEID") | ||
| 59 | + public FPURPOSEID getFPURPOSEID() { | ||
| 60 | + return FPURPOSEID; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + public void setFPURPOSEID(FPURPOSEID FPURPOSEID) { | ||
| 64 | + this.FPURPOSEID = FPURPOSEID; | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @JsonProperty("FACCOUNTID") | ||
| 68 | + public FACCOUNTID getFACCOUNTID() { | ||
| 69 | + return FACCOUNTID; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public void setFACCOUNTID(FACCOUNTID FACCOUNTID) { | ||
| 73 | + this.FACCOUNTID = FACCOUNTID; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + @JsonProperty("FCOSTDEPARTMENTID") | ||
| 77 | + public FCOSTDEPARTMENTID getFCOSTDEPARTMENTID() { | ||
| 78 | + return FCOSTDEPARTMENTID; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + public void setFCOSTDEPARTMENTID(FCOSTDEPARTMENTID FCOSTDEPARTMENTID) { | ||
| 82 | + this.FCOSTDEPARTMENTID = FCOSTDEPARTMENTID; | ||
| 83 | + } | ||
| 84 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSALEDEPTID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSALEDEPTID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:01 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FSALEDEPTID { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSALEORGID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSALEORGID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:00 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FSALEORGID { | ||
| 11 | + | ||
| 12 | + private String FNumber; | ||
| 13 | + | ||
| 14 | + @JsonProperty("FNumber") | ||
| 15 | + public String getFNumber() { | ||
| 16 | + return FNumber; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + public void setFNumber(String FNumber) { | ||
| 20 | + this.FNumber = FNumber; | ||
| 21 | + } | ||
| 22 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSETTLECUR.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSETTLECUR.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:04 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FSETTLECUR { | ||
| 11 | + private String FNUMBER; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNUMBER") | ||
| 14 | + public String getFNUMBER() { | ||
| 15 | + return FNUMBER; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNUMBER(String FNUMBER) { | ||
| 19 | + this.FNUMBER = FNUMBER; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSETTLEMAINBOOKID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSETTLEMAINBOOKID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:03 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FSETTLEMAINBOOKID { | ||
| 11 | + private String FNUMBER; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNUMBER") | ||
| 14 | + public String getFNUMBER() { | ||
| 15 | + return FNUMBER; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNUMBER(String FNUMBER) { | ||
| 19 | + this.FNUMBER = FNUMBER; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSETTLEORGID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSETTLEORGID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-09 10:24 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FSETTLEORGID { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSETTLETYPE.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSETTLETYPE.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-11-25 15:29 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FSETTLETYPE { | ||
| 11 | + | ||
| 12 | + private String FNumber; | ||
| 13 | + | ||
| 14 | + @JsonProperty("FNumber") | ||
| 15 | + public String getFNumber() { | ||
| 16 | + return FNumber; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + public void setFNumber(String FNumber) { | ||
| 20 | + this.FNumber = FNumber; | ||
| 21 | + } | ||
| 22 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSettleTypeID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FSettleTypeID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:06 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FSettleTypeID { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FTRADINGCURRID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FTRADINGCURRID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-23 15:15 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FTRADINGCURRID { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FTRANSFERID.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FTRANSFERID.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-10 10:05 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FTRANSFERID { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FT_BD_CUSTLOCATION.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FT_BD_CUSTLOCATION.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * @Author: zhangmeiyang | ||
| 8 | + * @CreateTime: 2024-10-23 16:01 | ||
| 9 | + * @Version: todo | ||
| 10 | + */ | ||
| 11 | +public class FT_BD_CUSTLOCATION { | ||
| 12 | + private FContactId FContactId; | ||
| 13 | + private String FName; | ||
| 14 | + private String FMOBILEPHONE; | ||
| 15 | + private String FBizAddress; | ||
| 16 | + private String FCompanyType; | ||
| 17 | + | ||
| 18 | + @JsonProperty("FContactId") | ||
| 19 | + public FContactId getFContactId() { | ||
| 20 | + return FContactId; | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + public void setFContactId(FContactId FContactId) { | ||
| 24 | + this.FContactId = FContactId; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + @JsonProperty("FName") | ||
| 28 | + public String getFName() { | ||
| 29 | + return FName; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + public void setFName(String FName) { | ||
| 33 | + this.FName = FName; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + @JsonProperty("FMOBILEPHONE") | ||
| 37 | + public String getFMOBILEPHONE() { | ||
| 38 | + return FMOBILEPHONE; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + public void setFMOBILEPHONE(String FMOBILEPHONE) { | ||
| 42 | + this.FMOBILEPHONE = FMOBILEPHONE; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + @JsonProperty("FBizAddress") | ||
| 46 | + public String getFBizAddress() { | ||
| 47 | + return FBizAddress; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public void setFBizAddress(String FBizAddress) { | ||
| 51 | + this.FBizAddress = FBizAddress; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + @JsonProperty("FCompanyType") | ||
| 55 | + public String getFCompanyType() { | ||
| 56 | + return FCompanyType; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + public void setFCompanyType(String FCompanyType) { | ||
| 60 | + this.FCompanyType = FCompanyType; | ||
| 61 | + } | ||
| 62 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FUseOrgId.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FUseOrgId.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2024-10-23 15:15 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FUseOrgId { | ||
| 11 | + private String FNumber; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FNumber") | ||
| 14 | + public String getFNumber() { | ||
| 15 | + return FNumber; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFNumber(String FNumber) { | ||
| 19 | + this.FNumber = FNumber; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/F_PZCW_Base_qtr.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/F_PZCW_Base_qtr.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2025-09-19 14:53 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class F_PZCW_Base_qtr { | ||
| 11 | + private String FName; | ||
| 12 | + | ||
| 13 | + @JsonProperty("FName") | ||
| 14 | + public String getFName() { | ||
| 15 | + return FName; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setFName(String FName) { | ||
| 19 | + this.FName = FName; | ||
| 20 | + } | ||
| 21 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FsubHeadFinc.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FsubHeadFinc.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2025-01-15 15:34 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FsubHeadFinc { | ||
| 11 | + private FSettleTypeID FSettleTypeID; | ||
| 12 | + private FMAINBOOKSTDCURRID FMAINBOOKSTDCURRID; | ||
| 13 | + | ||
| 14 | + @JsonProperty("FSettleTypeID") | ||
| 15 | + public FSettleTypeID getFSettleTypeID() { | ||
| 16 | + return FSettleTypeID; | ||
| 17 | + } | ||
| 18 | + | ||
| 19 | + public void setFSettleTypeID(FSettleTypeID FSettleTypeID) { | ||
| 20 | + this.FSettleTypeID = FSettleTypeID; | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + @JsonProperty("FMAINBOOKSTDCURRID") | ||
| 24 | + public FMAINBOOKSTDCURRID getFMAINBOOKSTDCURRID() { | ||
| 25 | + return FMAINBOOKSTDCURRID; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + public void setFMAINBOOKSTDCURRID(FMAINBOOKSTDCURRID FMAINBOOKSTDCURRID) { | ||
| 29 | + this.FMAINBOOKSTDCURRID = FMAINBOOKSTDCURRID; | ||
| 30 | + } | ||
| 31 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FsubHeadSuppiler.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/mapping/kingdee/base/FsubHeadSuppiler.java | ||
| 1 | +package com.diligrp.tax.central.domain.mapping.kingdee.base; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * @Author: zhangmeiyang | ||
| 7 | + * @CreateTime: 2025-01-15 15:29 | ||
| 8 | + * @Version: todo | ||
| 9 | + */ | ||
| 10 | +public class FsubHeadSuppiler { | ||
| 11 | + private FORDERID FORDERID; | ||
| 12 | + private FTRANSFERID FTRANSFERID; | ||
| 13 | + private FChargeId FChargeId; | ||
| 14 | + | ||
| 15 | + @JsonProperty("FORDERID") | ||
| 16 | + public FORDERID getFORDERID() { | ||
| 17 | + return FORDERID; | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + public void setFORDERID(FORDERID FORDERID) { | ||
| 21 | + this.FORDERID = FORDERID; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + @JsonProperty("FChargeId") | ||
| 25 | + public FChargeId getFChargeId() { | ||
| 26 | + return FChargeId; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public void setFChargeId(FChargeId FChargeId) { | ||
| 30 | + this.FChargeId = FChargeId; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + @JsonProperty("FTRANSFERID") | ||
| 34 | + public FTRANSFERID getFTRANSFERID() { | ||
| 35 | + return FTRANSFERID; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + public void setFTRANSFERID(FTRANSFERID FTRANSFERID) { | ||
| 39 | + this.FTRANSFERID = FTRANSFERID; | ||
| 40 | + } | ||
| 41 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/proxy/kingdee/CustomerProxy.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/proxy/kingdee/CustomerProxy.java | ||
| 1 | +package com.diligrp.tax.central.domain.proxy.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseProxy; | ||
| 4 | +import lombok.Getter; | ||
| 5 | +import lombok.Setter; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2025-11-04 16:55 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +@Getter | ||
| 13 | +@Setter | ||
| 14 | +public class CustomerProxy extends BaseProxy { | ||
| 15 | + private String thirdPartyId; | ||
| 16 | + private String thirdPartyCode; | ||
| 17 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/proxy/kingdee/ReceiptProxy.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/proxy/kingdee/ReceiptProxy.java | ||
| 1 | +package com.diligrp.tax.central.domain.proxy.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseProxy; | ||
| 4 | +import lombok.Getter; | ||
| 5 | +import lombok.Setter; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2025-11-03 17:59 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +@Setter | ||
| 13 | +@Getter | ||
| 14 | +public class ReceiptProxy extends BaseProxy { | ||
| 15 | + private String thirdPartyId; | ||
| 16 | + private String thirdPartyCode; | ||
| 17 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/proxy/kingdee/ReceivableProxy.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/proxy/kingdee/ReceivableProxy.java | ||
| 1 | +package com.diligrp.tax.central.domain.proxy.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseProxy; | ||
| 4 | +import lombok.Getter; | ||
| 5 | +import lombok.Setter; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2025-11-03 17:59 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +@Setter | ||
| 13 | +@Getter | ||
| 14 | +public class ReceivableProxy extends BaseProxy { | ||
| 15 | + private String thirdPartyId; | ||
| 16 | + private String thirdPartyCode; | ||
| 17 | +} |
tax-central/src/main/java/com/diligrp/tax/central/domain/proxy/kingdee/RefundProxy.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/domain/proxy/kingdee/RefundProxy.java | ||
| 1 | +package com.diligrp.tax.central.domain.proxy.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseProxy; | ||
| 4 | +import lombok.Getter; | ||
| 5 | +import lombok.Setter; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2025-11-03 17:59 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +@Setter | ||
| 13 | +@Getter | ||
| 14 | +public class RefundProxy extends BaseProxy { | ||
| 15 | + private String thirdPartyId; | ||
| 16 | + private String thirdPartyCode; | ||
| 17 | +} |
tax-central/src/main/java/com/diligrp/tax/central/exception/TaxAgentServiceException.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/exception/TaxAgentServiceException.java | ||
| 1 | +package com.diligrp.tax.central.exception; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 5 | +import lombok.Getter; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 所有模块异常类的基类 | ||
| 9 | + */ | ||
| 10 | +@Getter | ||
| 11 | +public class TaxAgentServiceException extends RuntimeException { | ||
| 12 | + /** | ||
| 13 | + * 错误码 | ||
| 14 | + */ | ||
| 15 | + private int code; | ||
| 16 | + | ||
| 17 | + /** | ||
| 18 | + * 是否打印异常栈 | ||
| 19 | + */ | ||
| 20 | + private boolean stackTrace; | ||
| 21 | + | ||
| 22 | + public TaxAgentServiceException() { | ||
| 23 | + | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public TaxAgentServiceException(String message) { | ||
| 27 | + super(message); | ||
| 28 | + this.code = TaxSystemType.UNKNOWN_ERROR.code; | ||
| 29 | + this.stackTrace = true; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + public TaxAgentServiceException(TaxSystemType systemType) { | ||
| 33 | + super(systemType.message); | ||
| 34 | + this.code = systemType.code; | ||
| 35 | + this.stackTrace = true; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + public TaxAgentServiceException(TaxSystemType systemType, Throwable ex) { | ||
| 39 | + super(systemType.message, ex); | ||
| 40 | + this.code = systemType.code; | ||
| 41 | + this.stackTrace = true; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public TaxAgentServiceException(TaxSystemType systemType, String message) { | ||
| 45 | + super(message); | ||
| 46 | + this.code = systemType.code; | ||
| 47 | + this.stackTrace = true; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public TaxAgentServiceException(int code, String message) { | ||
| 51 | + super(message); | ||
| 52 | + this.code = code; | ||
| 53 | + this.stackTrace = true; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public TaxAgentServiceException(int code, String message, boolean stackTrace) { | ||
| 57 | + super(message); | ||
| 58 | + this.code = code; | ||
| 59 | + this.stackTrace = stackTrace; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public TaxAgentServiceException(int code, String message, Throwable ex) { | ||
| 63 | + super(message, ex); | ||
| 64 | + this.code = code; | ||
| 65 | + this.stackTrace = true; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + @Override | ||
| 69 | + public Throwable fillInStackTrace() { | ||
| 70 | + return stackTrace ? super.fillInStackTrace() : this; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | +} |
tax-central/src/main/java/com/diligrp/tax/central/process/AbstractProcessor.java
0 → 100644
tax-central/src/main/java/com/diligrp/tax/central/process/Processor.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/process/Processor.java | ||
| 1 | +package com.diligrp.tax.central.process; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.context.Context; | ||
| 4 | + | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * 处理器 | ||
| 8 | + * | ||
| 9 | + * @author zhangmeiyang | ||
| 10 | + * @date 2025/10/30 | ||
| 11 | + */ | ||
| 12 | +public interface Processor { | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * 处理请求 | ||
| 16 | + * | ||
| 17 | + * @param context 输入上下文 | ||
| 18 | + * @return 输出上下文 | ||
| 19 | + */ | ||
| 20 | + Context process(Context context); | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 获取序列 | ||
| 25 | + * | ||
| 26 | + * @return int | ||
| 27 | + */ | ||
| 28 | + default int getOrder() { | ||
| 29 | + return 0; | ||
| 30 | + } | ||
| 31 | +} |
tax-central/src/main/java/com/diligrp/tax/central/process/ProcessorChain.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/process/ProcessorChain.java | ||
| 1 | +package com.diligrp.tax.central.process; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.context.Context; | ||
| 4 | + | ||
| 5 | +import java.util.Comparator; | ||
| 6 | +import java.util.List; | ||
| 7 | +import java.util.stream.Collectors; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * 类型安全的财务处理责任链 | ||
| 11 | + */ | ||
| 12 | +public class ProcessorChain { | ||
| 13 | + | ||
| 14 | + private final List<Processor> processors; | ||
| 15 | + | ||
| 16 | + public ProcessorChain(List<Processor> processors) { | ||
| 17 | + this.processors = processors.stream() | ||
| 18 | + .sorted(Comparator.comparingInt(Processor::getOrder)) | ||
| 19 | + .collect(Collectors.toList()); | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + /** | ||
| 23 | + * 类型安全的流式处理 | ||
| 24 | + */ | ||
| 25 | + public Context startProcess(Context context) { | ||
| 26 | + return processors.stream().reduce(context, (ctx, processor) -> processor.process(ctx), (ctx1, ctx2) -> ctx2); | ||
| 27 | + } | ||
| 28 | +} |
tax-central/src/main/java/com/diligrp/tax/central/type/AuditType.java
0 → 100644
tax-central/src/main/java/com/diligrp/tax/central/type/DocumentType.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/type/DocumentType.java | ||
| 1 | +package com.diligrp.tax.central.type; | ||
| 2 | + | ||
| 3 | +public enum DocumentType { | ||
| 4 | + CUSTOMER_INFO("BD_Customer"), | ||
| 5 | + AR_RECEIVABLE("AR_receivable"), | ||
| 6 | + AR_RECEIVE_BILL("AR_RECEIVEBILL"), | ||
| 7 | + AR_REFUND_BILL("AR_REFUNDBILL"); | ||
| 8 | + | ||
| 9 | + public final String value; | ||
| 10 | + | ||
| 11 | + DocumentType(String value) { | ||
| 12 | + this.value = value; | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + public static DocumentType from(String value) { | ||
| 16 | + for (DocumentType type : values()) { | ||
| 17 | + if (type.value.equals(value)) { | ||
| 18 | + return type; | ||
| 19 | + } | ||
| 20 | + } | ||
| 21 | + throw new IllegalArgumentException("Invalid DocumentType value: " + value); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + public static void validateDocumentType(String value) { | ||
| 25 | + for (DocumentType type : values()) { | ||
| 26 | + if (type.value.equals(value)) { | ||
| 27 | + return; | ||
| 28 | + } | ||
| 29 | + } | ||
| 30 | + throw new IllegalArgumentException("Invalid DocumentType value: " + value); | ||
| 31 | + } | ||
| 32 | +} |
tax-central/src/main/java/com/diligrp/tax/central/type/ProcessType.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/type/ProcessType.java | ||
| 1 | +package com.diligrp.tax.central.type; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 5 | + | ||
| 6 | +public enum ProcessType { | ||
| 7 | + POSITIVE("1", "正向流程"), | ||
| 8 | + REVERSE("-1", "逆向流程"); | ||
| 9 | + | ||
| 10 | + public final String code; | ||
| 11 | + public final String name; | ||
| 12 | + | ||
| 13 | + ProcessType(String code, String name) { | ||
| 14 | + this.code = code; | ||
| 15 | + this.name = name; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public static ProcessType fromCode(String code) { | ||
| 19 | + for (ProcessType item : ProcessType.values()) { | ||
| 20 | + if (item.code.equals(code)) { | ||
| 21 | + return item; | ||
| 22 | + } | ||
| 23 | + } | ||
| 24 | + throw new TaxAgentServiceException(TaxSystemType.INCORRECT_BUSINESS_PROCESSES); | ||
| 25 | + } | ||
| 26 | +} |
tax-central/src/main/java/com/diligrp/tax/central/type/StatusType.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/type/StatusType.java | ||
| 1 | +package com.diligrp.tax.central.type; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * @Author: zhangmeiyang | ||
| 5 | + * @CreateTime: 2025-10-30 10:31 | ||
| 6 | + * @Version: todo | ||
| 7 | + */ | ||
| 8 | +public enum StatusType { | ||
| 9 | + | ||
| 10 | + SUCCESS(1, "成功"), | ||
| 11 | + FAIL(2, "失败"); | ||
| 12 | + | ||
| 13 | + public final int code; | ||
| 14 | + public final String name; | ||
| 15 | + | ||
| 16 | + StatusType(int code, String name) { | ||
| 17 | + this.code = code; | ||
| 18 | + this.name = name; | ||
| 19 | + } | ||
| 20 | +} |
tax-central/src/main/java/com/diligrp/tax/central/type/SystemType.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/type/SystemType.java | ||
| 1 | +package com.diligrp.tax.central.type; | ||
| 2 | + | ||
| 3 | +import java.util.Set; | ||
| 4 | + | ||
| 5 | +public enum SystemType { | ||
| 6 | + KING_DEE("kingdee", Set.of( | ||
| 7 | + DocumentType.AR_RECEIVABLE, | ||
| 8 | + DocumentType.AR_RECEIVE_BILL, | ||
| 9 | + DocumentType.AR_REFUND_BILL, | ||
| 10 | + DocumentType.CUSTOMER_INFO | ||
| 11 | + )), | ||
| 12 | + YONG_YOU("yongyou", Set.of()); | ||
| 13 | + | ||
| 14 | + public final String code; | ||
| 15 | + public final Set<DocumentType> documentTypes; | ||
| 16 | + | ||
| 17 | + SystemType(String code, Set<DocumentType> documentTypes) { | ||
| 18 | + this.code = code; | ||
| 19 | + this.documentTypes = documentTypes; | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + public static SystemType from(String code) { | ||
| 23 | + for (SystemType systemType : SystemType.values()) { | ||
| 24 | + if (systemType.code.equals(code)) { | ||
| 25 | + return systemType; | ||
| 26 | + } | ||
| 27 | + } | ||
| 28 | + throw new IllegalArgumentException("Invalid SystemType code: " + code); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public static void validateSystemCode(String code){ | ||
| 32 | + for (SystemType systemType : SystemType.values()){ | ||
| 33 | + if (systemType.code.equals(code)){ | ||
| 34 | + return; | ||
| 35 | + } | ||
| 36 | + } | ||
| 37 | + throw new IllegalArgumentException("Invalid SystemType code: " + code); | ||
| 38 | + } | ||
| 39 | +} |
tax-central/src/main/java/com/diligrp/tax/central/type/TaxSystemType.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/type/TaxSystemType.java | ||
| 1 | +package com.diligrp.tax.central.type; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * @Author: zhangmeiyang | ||
| 5 | + * @CreateTime: 2025-11-03 18:34 | ||
| 6 | + * @Version: todo | ||
| 7 | + */ | ||
| 8 | +public enum TaxSystemType { | ||
| 9 | + | ||
| 10 | + SUCCESS(200, "成功"), | ||
| 11 | + UNKNOWN_ERROR(5000, "未知错误"), | ||
| 12 | + ABNORMAL_PARAMETERS(5001, "参数异常"), | ||
| 13 | + REPEAT_SENDING(5002, "重复发送"), | ||
| 14 | + INCORRECT_BUSINESS_PROCESSES(5003, "业务流程不正确"), | ||
| 15 | + MISSING_BUSINESS_INFORMATION(5004, "业务信息缺失"), | ||
| 16 | + BUSINESS_MATCHES_ARE_INCORRECT(5005, "业务匹配不正确"), | ||
| 17 | + REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL(5006, "远程服务调用异常"), | ||
| 18 | + INVALID_HTTP_REQUEST_PARAMS(5007, "无效的http请求参数"), | ||
| 19 | + ; | ||
| 20 | + public final int code; | ||
| 21 | + public final String message; | ||
| 22 | + | ||
| 23 | + TaxSystemType(int code, String message) { | ||
| 24 | + this.code = code; | ||
| 25 | + this.message = message; | ||
| 26 | + } | ||
| 27 | +} |
tax-central/src/main/java/com/diligrp/tax/central/utils/ApplicationContextHolder.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/utils/ApplicationContextHolder.java | ||
| 1 | +package com.diligrp.tax.central.utils; | ||
| 2 | + | ||
| 3 | +import org.springframework.context.ApplicationContext; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * ApplicationContext 持有者 | ||
| 7 | + */ | ||
| 8 | +public enum ApplicationContextHolder { | ||
| 9 | + | ||
| 10 | + INSTANCE; | ||
| 11 | + | ||
| 12 | + private ApplicationContext applicationContext; | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * 赋值 | ||
| 16 | + * | ||
| 17 | + * @param applicationContext | ||
| 18 | + */ | ||
| 19 | + public void setApplicationContext(ApplicationContext applicationContext) { | ||
| 20 | + this.applicationContext = applicationContext; | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 获取bean | ||
| 25 | + * | ||
| 26 | + * @param cls | ||
| 27 | + * @return | ||
| 28 | + */ | ||
| 29 | + public <T> T getBean(Class<T> cls) { | ||
| 30 | + return this.applicationContext.getBean(cls); | ||
| 31 | + } | ||
| 32 | +} |
tax-central/src/main/java/com/diligrp/tax/central/utils/JsonUtils.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/utils/JsonUtils.java | ||
| 1 | +package com.diligrp.tax.central.utils; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonInclude; | ||
| 4 | +import com.fasterxml.jackson.core.JsonProcessingException; | ||
| 5 | +import com.fasterxml.jackson.core.type.TypeReference; | ||
| 6 | +import com.fasterxml.jackson.databind.DeserializationFeature; | ||
| 7 | +import com.fasterxml.jackson.databind.JavaType; | ||
| 8 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
| 9 | +import com.fasterxml.jackson.databind.SerializationFeature; | ||
| 10 | +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; | ||
| 11 | +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; | ||
| 12 | +import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer; | ||
| 13 | +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; | ||
| 14 | +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; | ||
| 15 | +import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer; | ||
| 16 | +import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; | ||
| 17 | + | ||
| 18 | +import java.text.SimpleDateFormat; | ||
| 19 | +import java.time.LocalDate; | ||
| 20 | +import java.time.LocalDateTime; | ||
| 21 | +import java.time.LocalTime; | ||
| 22 | +import java.time.ZoneOffset; | ||
| 23 | +import java.time.format.DateTimeFormatter; | ||
| 24 | +import java.util.TimeZone; | ||
| 25 | + | ||
| 26 | +public class JsonUtils { | ||
| 27 | + | ||
| 28 | + private static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss"; | ||
| 29 | + | ||
| 30 | + private static final String DATE_FORMAT = "yyyy-MM-dd"; | ||
| 31 | + | ||
| 32 | + private static final String TIME_FORMAT = "HH:mm:ss"; | ||
| 33 | + | ||
| 34 | + private static final ObjectMapper objectMapper = initObjectMapper(); | ||
| 35 | + | ||
| 36 | + private static ObjectMapper initObjectMapper() { | ||
| 37 | + Jackson2ObjectMapperBuilder jackson2ObjectMapperBuilder = new Jackson2ObjectMapperBuilder(); | ||
| 38 | + initObjectMapperBuilder(jackson2ObjectMapperBuilder); | ||
| 39 | + ObjectMapper objectMapper = jackson2ObjectMapperBuilder.createXmlMapper(false).build(); | ||
| 40 | + objectMapper.setSerializerFactory(objectMapper.getSerializerFactory()); | ||
| 41 | + return objectMapper; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public static void initObjectMapperBuilder(Jackson2ObjectMapperBuilder builder) { | ||
| 45 | + //序列化java.util.Date类型 | ||
| 46 | + builder.dateFormat(new SimpleDateFormat(DATE_TIME_FORMAT)); | ||
| 47 | + builder.timeZone(TimeZone.getTimeZone(ZoneOffset.of("+8"))); | ||
| 48 | + builder.serializationInclusion(JsonInclude.Include.NON_NULL); | ||
| 49 | + builder.featuresToDisable( | ||
| 50 | + DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, // Json串的属性无JavaBean字段对应时,避免抛出异常 | ||
| 51 | + DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, // JavaBean中primitive类型的字段无Json属性时,避免抛出异常 | ||
| 52 | + DeserializationFeature.FAIL_ON_NUMBERS_FOR_ENUMS, // Json串数字类型属性,赋值JavaBean中Enum字段时,避免抛出异常 | ||
| 53 | + SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, | ||
| 54 | + SerializationFeature.FAIL_ON_EMPTY_BEANS | ||
| 55 | + ); | ||
| 56 | + builder.featuresToEnable( | ||
| 57 | + DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, | ||
| 58 | + DeserializationFeature.USE_JAVA_ARRAY_FOR_JSON_ARRAY | ||
| 59 | + ); | ||
| 60 | + | ||
| 61 | + var dateTimeFormatter = DateTimeFormatter.ofPattern(DATE_TIME_FORMAT); | ||
| 62 | + var dateFormatter = DateTimeFormatter.ofPattern(DATE_FORMAT); | ||
| 63 | + var timeFormatter = DateTimeFormatter.ofPattern(TIME_FORMAT); | ||
| 64 | + // 添加自定义序列化 | ||
| 65 | + builder.serializerByType(LocalDateTime.class, new LocalDateTimeSerializer(dateTimeFormatter)); | ||
| 66 | + builder.serializerByType(LocalDate.class, new LocalDateSerializer(dateFormatter)); | ||
| 67 | + builder.serializerByType(LocalTime.class, new LocalTimeSerializer(timeFormatter)); | ||
| 68 | + // 添加自定义反序列化 | ||
| 69 | + builder.deserializerByType(LocalDateTime.class, new LocalDateTimeDeserializer(dateTimeFormatter)); | ||
| 70 | + builder.deserializerByType(LocalDate.class, new LocalDateDeserializer(dateFormatter)); | ||
| 71 | + builder.deserializerByType(LocalTime.class, new LocalTimeDeserializer(timeFormatter)); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public static <T> T fromJsonString(String json, Class<T> type) { | ||
| 75 | + try { | ||
| 76 | + return objectMapper.readValue(json, type); | ||
| 77 | + } catch (JsonProcessingException ex) { | ||
| 78 | + throw new IllegalArgumentException("Deserialize json exception", ex); | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + public static <T> T fromJsonString(String json, TypeReference<T> jsonTypeReference) { | ||
| 83 | + try { | ||
| 84 | + return objectMapper.readValue(json, jsonTypeReference); | ||
| 85 | + } catch (JsonProcessingException ex) { | ||
| 86 | + throw new IllegalArgumentException("Deserialize json array exception", ex); | ||
| 87 | + } | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + public static <T> T fromJsonString(String json, JavaType javaType) { | ||
| 91 | + try { | ||
| 92 | + return objectMapper.readValue(json, javaType); | ||
| 93 | + } catch (JsonProcessingException ex) { | ||
| 94 | + throw new IllegalArgumentException("Deserialize json array exception", ex); | ||
| 95 | + } | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + public static <T> String toJsonString(T object) { | ||
| 99 | + try { | ||
| 100 | + return objectMapper.writeValueAsString(object); | ||
| 101 | + } catch (JsonProcessingException ex) { | ||
| 102 | + throw new IllegalArgumentException("Serialize json exception", ex); | ||
| 103 | + } | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + public static <T> T convertValue(Object fromValue, Class<T> toValueType) { | ||
| 107 | + return objectMapper.convertValue(fromValue, toValueType); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public static <T> T convertValue(Object fromValue, TypeReference<T> toValueTypeRef) { | ||
| 111 | + return objectMapper.convertValue(fromValue, toValueTypeRef); | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + public static <T> T convertValue(Object fromValue, JavaType toValueType) { | ||
| 115 | + return objectMapper.convertValue(fromValue, toValueType); | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + public static <T> T deepCopy(T t, Class<T> cls) { | ||
| 119 | + return JsonUtils.fromJsonString(JsonUtils.toJsonString(t), cls); | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + | ||
| 123 | +} |
tax-central/src/main/java/com/diligrp/tax/central/utils/MappingUtils.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/utils/MappingUtils.java | ||
| 1 | +package com.diligrp.tax.central.utils; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.context.ConverterContext; | ||
| 4 | +import com.diligrp.tax.central.converter.IConverter; | ||
| 5 | +import com.diligrp.tax.central.converter.ISubConverter; | ||
| 6 | +import com.diligrp.tax.central.converter.anno.Converter; | ||
| 7 | +import com.diligrp.tax.central.converter.anno.SubConverter; | ||
| 8 | +import com.diligrp.tax.central.domain.BaseDocument; | ||
| 9 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 10 | +import com.diligrp.tax.central.domain.document.kingdee.BaseBill; | ||
| 11 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 12 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 13 | +import lombok.extern.slf4j.Slf4j; | ||
| 14 | + | ||
| 15 | +import java.lang.reflect.Field; | ||
| 16 | +import java.util.Arrays; | ||
| 17 | +import java.util.HashMap; | ||
| 18 | +import java.util.List; | ||
| 19 | +import java.util.Map; | ||
| 20 | +import java.util.function.Function; | ||
| 21 | + | ||
| 22 | +/** | ||
| 23 | + * @Author: zhangmeiyang | ||
| 24 | + * @CreateTime: 2025-11-03 11:32 | ||
| 25 | + * @Version: todo | ||
| 26 | + */ | ||
| 27 | +@Slf4j | ||
| 28 | +public class MappingUtils { | ||
| 29 | + public static <T> Function<Object, T> mappingObject(Class<T> clazz) { | ||
| 30 | + return item -> { | ||
| 31 | + Map<String, Object> map = new HashMap<>(); | ||
| 32 | + Arrays.stream(item.getClass().getDeclaredFields()).filter(field -> field.isAnnotationPresent(Converter.class)).forEach(field -> configureField(item, field, map)); | ||
| 33 | + return JsonUtils.convertValue(map, clazz); | ||
| 34 | + }; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public static void configureField(Object item, Field field, Map<String, Object> map) { | ||
| 38 | + try { | ||
| 39 | + field.setAccessible(true); | ||
| 40 | + Object val = field.get(item); | ||
| 41 | + Converter converter = field.getAnnotation(Converter.class); | ||
| 42 | + IConverter<?> IConverter = ConverterContext.CONVERTER_MAP.get(converter.value()); | ||
| 43 | + Object newVal = IConverter.convert(val); | ||
| 44 | + map.put(converter.targetField(), newVal); | ||
| 45 | + } catch (Exception e) { | ||
| 46 | + log.error("MappingUtils.configureField转换失败", e.fillInStackTrace()); | ||
| 47 | + throw new TaxAgentServiceException(TaxSystemType.ABNORMAL_PARAMETERS,e); | ||
| 48 | + } | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public static void configureSubField(Object item, Field field, Map<String, Object> map) { | ||
| 52 | + try { | ||
| 53 | + field.setAccessible(true); | ||
| 54 | + Object val = field.get(item); | ||
| 55 | + SubConverter converter = field.getAnnotation(SubConverter.class); | ||
| 56 | + ISubConverter<?> iSubConverter = ConverterContext.SUB_CONVERTER_MAP.get(converter.value()); | ||
| 57 | + Object newVal = iSubConverter.convert((List<?>) val); | ||
| 58 | + map.put(converter.targetField(), newVal); | ||
| 59 | + } catch (Exception e) { | ||
| 60 | + log.error("MappingUtils.configureSubField转换失败", e.fillInStackTrace()); | ||
| 61 | + throw new TaxAgentServiceException(TaxSystemType.ABNORMAL_PARAMETERS,e); | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public static <T extends BaseDocument, R extends BaseMapping> R convertValue(T t, Class<R> clazz) { | ||
| 66 | + Map<String, Object> map = new HashMap<>(); | ||
| 67 | + Arrays.stream(t.getClass().getDeclaredFields()).filter(field -> field.isAnnotationPresent(Converter.class)).forEach(field -> configureField(t, field, map)); | ||
| 68 | + Arrays.stream(t.getClass().getDeclaredFields()).filter(field -> field.isAnnotationPresent(SubConverter.class)).forEach(field -> configureSubField(t, field, map)); | ||
| 69 | + return JsonUtils.convertValue(map, clazz); | ||
| 70 | + } | ||
| 71 | +} |
tax-central/src/main/java/com/diligrp/tax/central/utils/ServiceEndpointSupport.java
0 → 100644
| 1 | +++ a/tax-central/src/main/java/com/diligrp/tax/central/utils/ServiceEndpointSupport.java | ||
| 1 | +package com.diligrp.tax.central.utils; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 4 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 5 | +import org.springframework.util.ObjectUtils; | ||
| 6 | + | ||
| 7 | +import javax.net.ssl.SSLContext; | ||
| 8 | +import javax.net.ssl.SSLParameters; | ||
| 9 | +import java.net.ConnectException; | ||
| 10 | +import java.net.URI; | ||
| 11 | +import java.net.http.*; | ||
| 12 | +import java.time.Duration; | ||
| 13 | +import java.util.*; | ||
| 14 | +import java.util.concurrent.Executor; | ||
| 15 | + | ||
| 16 | +public abstract class ServiceEndpointSupport { | ||
| 17 | + protected static final int MAX_CONNECT_TIMEOUT_TIME = 10000; | ||
| 18 | + | ||
| 19 | + protected static final int MAX_REQUEST_TIMEOUT_TIME = 30000; | ||
| 20 | + | ||
| 21 | + protected static final String CONTENT_TYPE = "Content-Type"; | ||
| 22 | + | ||
| 23 | + protected static final String CONTENT_TYPE_JSON = "application/json;charset=UTF-8"; | ||
| 24 | + | ||
| 25 | + protected static final String CONTENT_TYPE_FORM = "application/x-www-form-urlencoded;charset=UTF-8"; | ||
| 26 | + | ||
| 27 | + protected static final String CONTENT_TYPE_XML = "text/xml;charset=UTF-8"; | ||
| 28 | + | ||
| 29 | + protected volatile HttpClient httpClient; | ||
| 30 | + | ||
| 31 | + protected final Object lock = new Object(); | ||
| 32 | + | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 发送 | ||
| 36 | + * | ||
| 37 | + * @param requestUrl 请求网址 | ||
| 38 | + * @param body 身体 | ||
| 39 | + * @return {@link HttpResult } | ||
| 40 | + */ | ||
| 41 | + public HttpResult send(String requestUrl, String body) { | ||
| 42 | + return send(requestUrl, null, body); | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 发送 | ||
| 48 | + * | ||
| 49 | + * @param requestUrl 请求网址 | ||
| 50 | + * @param headers 头 | ||
| 51 | + * @param body 身体 | ||
| 52 | + * @return {@link HttpResult } | ||
| 53 | + */ | ||
| 54 | + public HttpResult send(String requestUrl, HttpHeader[] headers, String body) { | ||
| 55 | + if (ObjectUtils.isEmpty(requestUrl)) { | ||
| 56 | + throw new IllegalArgumentException("Invalid http request url, url=" + requestUrl); | ||
| 57 | + } | ||
| 58 | + HttpRequest.Builder request = HttpRequest.newBuilder() | ||
| 59 | + .uri(URI.create(requestUrl)) | ||
| 60 | + .version(HttpClient.Version.HTTP_2) | ||
| 61 | + .timeout(Duration.ofMillis(MAX_REQUEST_TIMEOUT_TIME)) | ||
| 62 | + .header(CONTENT_TYPE, CONTENT_TYPE_JSON) | ||
| 63 | + .POST(HttpRequest.BodyPublishers.ofString(body)); | ||
| 64 | + if (headers != null && headers.length > 0) { | ||
| 65 | + Arrays.stream(headers).filter(Objects::nonNull).forEach(h -> request.header(h.param, h.value)); | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + return execute(request.build()); | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + | ||
| 72 | + /** | ||
| 73 | + * 发送 | ||
| 74 | + * | ||
| 75 | + * @param requestUrl 请求网址 | ||
| 76 | + * @param params 参数 | ||
| 77 | + * @return {@link HttpResult } | ||
| 78 | + */ | ||
| 79 | + public HttpResult send(String requestUrl, HttpParam[] params) { | ||
| 80 | + return send(requestUrl, null, params); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + | ||
| 84 | + /** | ||
| 85 | + * 发送 | ||
| 86 | + * | ||
| 87 | + * @param requestUrl 请求网址 | ||
| 88 | + * @param headers 头 | ||
| 89 | + * @param params 参数 | ||
| 90 | + * @return {@link HttpResult } | ||
| 91 | + */ | ||
| 92 | + public HttpResult send(String requestUrl, HttpHeader[] headers, HttpParam[] params) { | ||
| 93 | + if (ObjectUtils.isEmpty(requestUrl)) { | ||
| 94 | + throw new IllegalArgumentException("Invalid http request url, url=" + requestUrl); | ||
| 95 | + } | ||
| 96 | + HttpRequest.Builder request = HttpRequest.newBuilder() | ||
| 97 | + .uri(URI.create(requestUrl)) | ||
| 98 | + .version(HttpClient.Version.HTTP_2) | ||
| 99 | + .timeout(Duration.ofMillis(MAX_REQUEST_TIMEOUT_TIME)) | ||
| 100 | + .header(CONTENT_TYPE, CONTENT_TYPE_FORM); | ||
| 101 | + // Wrap the HTTP headers | ||
| 102 | + if (headers != null && headers.length > 0) { | ||
| 103 | + Arrays.stream(headers).filter(Objects::nonNull).forEach(h -> request.header(h.param, h.value)); | ||
| 104 | + } | ||
| 105 | + if (params != null && params.length > 0) { | ||
| 106 | + String body = Arrays.stream(params) | ||
| 107 | + .filter(Objects::nonNull) | ||
| 108 | + .map(p -> "".concat(p.param).concat("=").concat(p.value)) | ||
| 109 | + .reduce((key, value) -> "".concat(key).concat("&").concat(value)) | ||
| 110 | + .orElseThrow(() -> new TaxAgentServiceException(TaxSystemType.INVALID_HTTP_REQUEST_PARAMS)); | ||
| 111 | + request.POST(HttpRequest.BodyPublishers.ofString(body)); | ||
| 112 | + } | ||
| 113 | + return execute(request.build()); | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + | ||
| 117 | + /** | ||
| 118 | + * 发送 XML | ||
| 119 | + * | ||
| 120 | + * @param requestUrl 请求网址 | ||
| 121 | + * @param headers 头 | ||
| 122 | + * @param xml xml | ||
| 123 | + * @return {@link HttpResult } | ||
| 124 | + */ | ||
| 125 | + public HttpResult sendXml(String requestUrl, HttpHeader[] headers, String xml) { | ||
| 126 | + if (ObjectUtils.isEmpty(requestUrl)) { | ||
| 127 | + throw new IllegalArgumentException("Invalid http request url, url=" + requestUrl); | ||
| 128 | + } | ||
| 129 | + HttpRequest.Builder request = HttpRequest.newBuilder().uri(URI.create(requestUrl)) | ||
| 130 | + .version(HttpClient.Version.HTTP_2) | ||
| 131 | + .timeout(Duration.ofMillis(MAX_REQUEST_TIMEOUT_TIME)) | ||
| 132 | + .header(CONTENT_TYPE, CONTENT_TYPE_XML) | ||
| 133 | + .POST(HttpRequest.BodyPublishers.ofString(xml)); | ||
| 134 | + // Wrap the HTTP headers | ||
| 135 | + if (headers != null && headers.length > 0) { | ||
| 136 | + Arrays.stream(headers).filter(Objects::nonNull).forEach(h -> request.header(h.param, h.value)); | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + return execute(request.build()); | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + protected HttpClient getHttpClient() { | ||
| 143 | + if (httpClient == null) { | ||
| 144 | + synchronized (lock) { | ||
| 145 | + // Double check for performance purpose | ||
| 146 | + if (httpClient == null) { | ||
| 147 | + HttpClient.Builder builder = HttpClient.newBuilder().version(HttpClient.Version.HTTP_2) | ||
| 148 | + // 认证,默认情况下Authenticator.getDefault()是null值,会报错 | ||
| 149 | +// .authenticator(Authenticator.getDefault()) | ||
| 150 | + // 缓存,默认情况下 CookieHandler.getDefault()是null值,会报错 | ||
| 151 | +// .cookieHandler(CookieHandler.getDefault()) | ||
| 152 | + .connectTimeout(Duration.ofMillis(MAX_CONNECT_TIMEOUT_TIME)) | ||
| 153 | + .followRedirects(HttpClient.Redirect.NEVER); | ||
| 154 | + // Build SSL | ||
| 155 | + Optional<SSLContext> sslContext = buildSSLContext(); | ||
| 156 | + sslContext.ifPresent(builder::sslContext); | ||
| 157 | + Optional<SSLParameters> parameters = buildSslParameters(); | ||
| 158 | + parameters.ifPresent(builder::sslParameters); | ||
| 159 | + // Build thread pool | ||
| 160 | + Optional<Executor> executor = buildThreadPool(); | ||
| 161 | + executor.ifPresent(builder::executor); | ||
| 162 | + httpClient = builder.build(); | ||
| 163 | + } | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + return httpClient; | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + protected Optional<SSLContext> buildSSLContext() { | ||
| 171 | + return Optional.empty(); | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + protected Optional<SSLParameters> buildSslParameters() { | ||
| 175 | + return Optional.empty(); | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + protected Optional<Executor> buildThreadPool() { | ||
| 179 | + return Optional.empty(); | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + | ||
| 183 | + /** | ||
| 184 | + * 执行 | ||
| 185 | + * | ||
| 186 | + * @param request 请求 | ||
| 187 | + * @return {@link HttpResult } | ||
| 188 | + */ | ||
| 189 | + protected HttpResult execute(HttpRequest request) { | ||
| 190 | + try { | ||
| 191 | + HttpResponse<String> response = getHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); | ||
| 192 | + | ||
| 193 | + HttpResult result = HttpResult.create(); | ||
| 194 | + result.statusCode = response.statusCode(); | ||
| 195 | + result.responseText = response.body(); | ||
| 196 | + result.headers = response.headers() == null ? null : response.headers().map(); | ||
| 197 | + return result; | ||
| 198 | + } catch (ConnectException | HttpConnectTimeoutException cex) { | ||
| 199 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL, cex); | ||
| 200 | + } catch (HttpTimeoutException hex) { | ||
| 201 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL, hex); | ||
| 202 | + } catch (Exception ex) { | ||
| 203 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL, ex); | ||
| 204 | + } | ||
| 205 | + } | ||
| 206 | + | ||
| 207 | + public static class HttpParam { | ||
| 208 | + public String param; | ||
| 209 | + public String value; | ||
| 210 | + | ||
| 211 | + private HttpParam(String param, String value) { | ||
| 212 | + this.param = param; | ||
| 213 | + this.value = value; | ||
| 214 | + } | ||
| 215 | + | ||
| 216 | + public static HttpParam create(String param, String value) { | ||
| 217 | + return new HttpParam(param, value); | ||
| 218 | + } | ||
| 219 | + } | ||
| 220 | + | ||
| 221 | + public static class HttpHeader { | ||
| 222 | + public String param; | ||
| 223 | + public String value; | ||
| 224 | + | ||
| 225 | + private HttpHeader(String param, String value) { | ||
| 226 | + this.param = param; | ||
| 227 | + this.value = value; | ||
| 228 | + } | ||
| 229 | + | ||
| 230 | + public static HttpHeader create(String param, String value) { | ||
| 231 | + return new HttpHeader(param, value); | ||
| 232 | + } | ||
| 233 | + } | ||
| 234 | + | ||
| 235 | + public static class HttpResult { | ||
| 236 | + public int statusCode = -1; | ||
| 237 | + public String responseText; | ||
| 238 | + public Map<String, List<String>> headers; | ||
| 239 | + | ||
| 240 | + public static HttpResult create() { | ||
| 241 | + return new HttpResult(); | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + public String header(String key) { | ||
| 245 | + if (headers == null) { | ||
| 246 | + return null; | ||
| 247 | + } | ||
| 248 | + | ||
| 249 | + List<String> values = headers.get(key); | ||
| 250 | + if (values == null || values.isEmpty()) { | ||
| 251 | + return null; | ||
| 252 | + } | ||
| 253 | + | ||
| 254 | + return values.getFirst(); | ||
| 255 | + } | ||
| 256 | + } | ||
| 257 | +} |
tax-central/src/main/resources/lib/k3cloud-webapi-sdk8.0.6.jar
0 → 100644
No preview for this file type
tax-doc/pom.xml
0 → 100644
| 1 | +++ a/tax-doc/pom.xml | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 5 | + <modelVersion>4.0.0</modelVersion> | ||
| 6 | + | ||
| 7 | + <artifactId>tax-doc</artifactId> | ||
| 8 | + <version>${revision}</version> | ||
| 9 | + <packaging>jar</packaging> | ||
| 10 | + | ||
| 11 | + <parent> | ||
| 12 | + <groupId>com.diligrp</groupId> | ||
| 13 | + <artifactId>tax-agent</artifactId> | ||
| 14 | + <version>${revision}</version> | ||
| 15 | + </parent> | ||
| 16 | + <dependencies> | ||
| 17 | + <dependency> | ||
| 18 | + <groupId>com.diligrp</groupId> | ||
| 19 | + <artifactId>tax-central</artifactId> | ||
| 20 | + <version>${revision}</version> | ||
| 21 | + </dependency> | ||
| 22 | + </dependencies> | ||
| 23 | +</project> |
tax-doc/src/main/java/com/diligrp/tax/doc/OrderConfig.java
0 → 100644
| 1 | +++ a/tax-doc/src/main/java/com/diligrp/tax/doc/OrderConfig.java | ||
| 1 | +package com.diligrp.tax.doc; | ||
| 2 | + | ||
| 3 | +import org.springframework.context.annotation.ComponentScan; | ||
| 4 | +import org.springframework.context.annotation.Configuration; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * @Author: zhangmeiyang | ||
| 8 | + * @CreateTime: 2025-10-28 14:47 | ||
| 9 | + * @Version: todo | ||
| 10 | + */ | ||
| 11 | +@Configuration | ||
| 12 | +@ComponentScan(basePackages = "com.diligrp.tax.doc") | ||
| 13 | +public class OrderConfig { | ||
| 14 | +} |
tax-doc/src/main/java/com/diligrp/tax/doc/context/DocumentContext.java
0 → 100644
| 1 | +++ a/tax-doc/src/main/java/com/diligrp/tax/doc/context/DocumentContext.java | ||
| 1 | +package com.diligrp.tax.doc.context; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 4 | +import com.diligrp.tax.doc.demarcate.Builder; | ||
| 5 | +import jakarta.annotation.Resource; | ||
| 6 | +import org.springframework.beans.factory.DisposableBean; | ||
| 7 | +import org.springframework.beans.factory.InitializingBean; | ||
| 8 | +import org.springframework.stereotype.Component; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.concurrent.ConcurrentHashMap; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-10-29 11:22 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@Component | ||
| 19 | +public class DocumentContext implements InitializingBean, DisposableBean { | ||
| 20 | + | ||
| 21 | + @Resource | ||
| 22 | + private List<Builder<?>> builders; | ||
| 23 | + | ||
| 24 | + public final static ConcurrentHashMap<DocumentType, Builder<?>> CONTEXT = new ConcurrentHashMap<>(); | ||
| 25 | + | ||
| 26 | + @Override | ||
| 27 | + public void destroy() throws Exception { | ||
| 28 | + | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + @Override | ||
| 32 | + public void afterPropertiesSet() throws Exception { | ||
| 33 | + builders.forEach(builder -> CONTEXT.put(builder.markDocument(), builder)); | ||
| 34 | + } | ||
| 35 | +} |
tax-doc/src/main/java/com/diligrp/tax/doc/demarcate/Builder.java
0 → 100644
| 1 | +++ a/tax-doc/src/main/java/com/diligrp/tax/doc/demarcate/Builder.java | ||
| 1 | +package com.diligrp.tax.doc.demarcate; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseDocument; | ||
| 4 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * @Author: zhangmeiyang | ||
| 8 | + * @CreateTime: 2025-10-30 10:33 | ||
| 9 | + * @Version: todo | ||
| 10 | + */ | ||
| 11 | +public abstract class Builder<T extends BaseDocument> { | ||
| 12 | + | ||
| 13 | + /** | ||
| 14 | + * 标记文档 | ||
| 15 | + * | ||
| 16 | + * @return {@link DocumentType } | ||
| 17 | + */ | ||
| 18 | + public abstract DocumentType markDocument(); | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 建 | ||
| 22 | + * | ||
| 23 | + * @param body 身体 | ||
| 24 | + * @return {@link T } | ||
| 25 | + */ | ||
| 26 | + public abstract T build(String body); | ||
| 27 | +} |
tax-doc/src/main/java/com/diligrp/tax/doc/demarcate/kingdee/CustomerBuilder.java
0 → 100644
| 1 | +++ a/tax-doc/src/main/java/com/diligrp/tax/doc/demarcate/kingdee/CustomerBuilder.java | ||
| 1 | +package com.diligrp.tax.doc.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.document.kingdee.basic.StandardCustomer; | ||
| 4 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 5 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 6 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 7 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 8 | +import com.diligrp.tax.doc.demarcate.Builder; | ||
| 9 | +import org.springframework.stereotype.Component; | ||
| 10 | + | ||
| 11 | +import java.util.Optional; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-11-04 16:33 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@Component | ||
| 19 | +public class CustomerBuilder extends Builder<StandardCustomer> { | ||
| 20 | + | ||
| 21 | + @Override | ||
| 22 | + public DocumentType markDocument() { | ||
| 23 | + return DocumentType.CUSTOMER_INFO; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + @Override | ||
| 27 | + public StandardCustomer build(String body) { | ||
| 28 | + StandardCustomer customer = JsonUtils.fromJsonString(body, StandardCustomer.class); | ||
| 29 | + Optional.ofNullable(customer.getContacts()).orElseThrow(() -> new TaxAgentServiceException(TaxSystemType.MISSING_BUSINESS_INFORMATION, "请完善联系人信息")); | ||
| 30 | + Optional.ofNullable(customer.getSystemDataId()).orElseThrow(() -> new TaxAgentServiceException(TaxSystemType.MISSING_BUSINESS_INFORMATION, "请填写系统数据ID")); | ||
| 31 | + //TODO 获取币别 | ||
| 32 | + | ||
| 33 | + //TODO 查询数据库的客户信息 如果存在 赋值id | ||
| 34 | + return customer; | ||
| 35 | + } | ||
| 36 | +} |
tax-doc/src/main/java/com/diligrp/tax/doc/demarcate/kingdee/ReceiptBuilder.java
0 → 100644
| 1 | +++ a/tax-doc/src/main/java/com/diligrp/tax/doc/demarcate/kingdee/ReceiptBuilder.java | ||
| 1 | +package com.diligrp.tax.doc.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.document.kingdee.bill.ReceiptBill; | ||
| 4 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 5 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 6 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 7 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 8 | +import com.diligrp.tax.doc.demarcate.Builder; | ||
| 9 | +import org.springframework.stereotype.Component; | ||
| 10 | + | ||
| 11 | +import java.time.LocalDateTime; | ||
| 12 | +import java.time.format.DateTimeFormatter; | ||
| 13 | +import java.util.Optional; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * @Author: zhangmeiyang | ||
| 17 | + * @CreateTime: 2025-11-04 15:17 | ||
| 18 | + * @Version: todo | ||
| 19 | + */ | ||
| 20 | +@Component | ||
| 21 | +public class ReceiptBuilder extends Builder<ReceiptBill> { | ||
| 22 | + @Override | ||
| 23 | + public DocumentType markDocument() { | ||
| 24 | + return DocumentType.AR_RECEIVE_BILL; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + @Override | ||
| 28 | + public ReceiptBill build(String body) { | ||
| 29 | + ReceiptBill bill = JsonUtils.fromJsonString(body, ReceiptBill.class); | ||
| 30 | + Optional.ofNullable(bill.getReceiptItems()).orElseThrow(() -> new TaxAgentServiceException(TaxSystemType.MISSING_BUSINESS_INFORMATION,"请填写收款项目")); | ||
| 31 | + bill.setCreateTime(Optional.ofNullable(bill.getCreateTime()).orElse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))); | ||
| 32 | + //TODO 获取币别 | ||
| 33 | + //TODO 获取组织 | ||
| 34 | + //TODO 部门转换 | ||
| 35 | + //TODO 业务类型转换 | ||
| 36 | + return bill; | ||
| 37 | + } | ||
| 38 | +} |
tax-doc/src/main/java/com/diligrp/tax/doc/demarcate/kingdee/ReceivableBuilder.java
0 → 100644
| 1 | +++ a/tax-doc/src/main/java/com/diligrp/tax/doc/demarcate/kingdee/ReceivableBuilder.java | ||
| 1 | +package com.diligrp.tax.doc.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 4 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 5 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 6 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 7 | +import com.diligrp.tax.doc.demarcate.Builder; | ||
| 8 | +import com.diligrp.tax.central.domain.document.kingdee.bill.ReceivableBill; | ||
| 9 | +import org.springframework.stereotype.Component; | ||
| 10 | + | ||
| 11 | +import java.time.LocalDateTime; | ||
| 12 | +import java.time.format.DateTimeFormatter; | ||
| 13 | +import java.util.Optional; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * @Author: zhangmeiyang | ||
| 17 | + * @CreateTime: 2025-10-30 18:13 | ||
| 18 | + * @Version: todo | ||
| 19 | + */ | ||
| 20 | +@Component | ||
| 21 | +public class ReceivableBuilder extends Builder<ReceivableBill> { | ||
| 22 | + | ||
| 23 | + @Override | ||
| 24 | + public DocumentType markDocument() { | ||
| 25 | + return DocumentType.AR_RECEIVABLE; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + @Override | ||
| 29 | + public ReceivableBill build(String body) { | ||
| 30 | + ReceivableBill bill = JsonUtils.fromJsonString(body, ReceivableBill.class); | ||
| 31 | + Optional.ofNullable(bill.getReceivableItems()).orElseThrow(() -> new TaxAgentServiceException(TaxSystemType.MISSING_BUSINESS_INFORMATION,"请填写收款项目")); | ||
| 32 | + bill.setCreateTime(Optional.ofNullable(bill.getCreateTime()).orElse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))); | ||
| 33 | + //TODO 获取币别 | ||
| 34 | + //TODO 获取组织 | ||
| 35 | + //TODO 部门转换 | ||
| 36 | + //TODO 业务类型转换 | ||
| 37 | + return bill; | ||
| 38 | + } | ||
| 39 | +} |
tax-doc/src/main/java/com/diligrp/tax/doc/demarcate/kingdee/RefundBuilder.java
0 → 100644
| 1 | +++ a/tax-doc/src/main/java/com/diligrp/tax/doc/demarcate/kingdee/RefundBuilder.java | ||
| 1 | +package com.diligrp.tax.doc.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.document.kingdee.bill.RefundBill; | ||
| 4 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 5 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 6 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 7 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 8 | +import com.diligrp.tax.doc.demarcate.Builder; | ||
| 9 | +import org.springframework.stereotype.Component; | ||
| 10 | + | ||
| 11 | +import java.time.LocalDateTime; | ||
| 12 | +import java.time.format.DateTimeFormatter; | ||
| 13 | +import java.util.Optional; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * @Author: zhangmeiyang | ||
| 17 | + * @CreateTime: 2025-10-30 18:13 | ||
| 18 | + * @Version: todo | ||
| 19 | + */ | ||
| 20 | +@Component | ||
| 21 | +public class RefundBuilder extends Builder<RefundBill> { | ||
| 22 | + | ||
| 23 | + @Override | ||
| 24 | + public DocumentType markDocument() { | ||
| 25 | + return DocumentType.AR_REFUND_BILL; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + @Override | ||
| 29 | + public RefundBill build(String body) { | ||
| 30 | + RefundBill bill = JsonUtils.fromJsonString(body, RefundBill.class); | ||
| 31 | + Optional.ofNullable(bill.getRefundItems()).orElseThrow(() -> new TaxAgentServiceException(TaxSystemType.MISSING_BUSINESS_INFORMATION, "请填写收款项目")); | ||
| 32 | + bill.setCreateTime(Optional.ofNullable(bill.getCreateTime()).orElse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))); | ||
| 33 | + //TODO 获取币别 | ||
| 34 | + //TODO 获取组织 | ||
| 35 | + //TODO 部门转换 | ||
| 36 | + //TODO 业务类型转换 | ||
| 37 | + return bill; | ||
| 38 | + } | ||
| 39 | +} |
tax-doc/src/main/java/com/diligrp/tax/doc/process/kingdee/InitializeProcessor.java
0 → 100644
| 1 | +++ a/tax-doc/src/main/java/com/diligrp/tax/doc/process/kingdee/InitializeProcessor.java | ||
| 1 | +package com.diligrp.tax.doc.process.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.context.Context; | ||
| 4 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 5 | +import com.diligrp.tax.central.process.AbstractProcessor; | ||
| 6 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 7 | +import com.diligrp.tax.central.type.SystemType; | ||
| 8 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 9 | +import com.diligrp.tax.doc.context.DocumentContext; | ||
| 10 | +import com.diligrp.tax.doc.demarcate.Builder; | ||
| 11 | +import lombok.extern.slf4j.Slf4j; | ||
| 12 | +import org.springframework.core.annotation.Order; | ||
| 13 | +import org.springframework.stereotype.Component; | ||
| 14 | + | ||
| 15 | + | ||
| 16 | +/** | ||
| 17 | + * 初始化处理器 | ||
| 18 | + * | ||
| 19 | + * @author zhangmeiyang | ||
| 20 | + * @date 2025/10/30 | ||
| 21 | + */ | ||
| 22 | +@Component | ||
| 23 | +@Order(1) | ||
| 24 | +@Slf4j | ||
| 25 | +public class InitializeProcessor extends AbstractProcessor { | ||
| 26 | + | ||
| 27 | + @Override | ||
| 28 | + public Context process(Context context) { | ||
| 29 | + DocumentType from = DocumentType.from(context.getDocumentType()); | ||
| 30 | + SystemType system = SystemType.from(context.getSystemType()); | ||
| 31 | + if (!system.documentTypes.contains(from)) { | ||
| 32 | + throw new TaxAgentServiceException(TaxSystemType.BUSINESS_MATCHES_ARE_INCORRECT); | ||
| 33 | + } | ||
| 34 | + Builder<?> builder = DocumentContext.CONTEXT.get(from); | ||
| 35 | + context.setDocumentObject(builder.build(context.getMsgBody())); | ||
| 36 | + return context; | ||
| 37 | + } | ||
| 38 | +} |
tax-map/pom.xml
0 → 100644
| 1 | +++ a/tax-map/pom.xml | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 5 | + <modelVersion>4.0.0</modelVersion> | ||
| 6 | + | ||
| 7 | + <artifactId>tax-map</artifactId> | ||
| 8 | + <version>${revision}</version> | ||
| 9 | + <packaging>jar</packaging> | ||
| 10 | + | ||
| 11 | + <parent> | ||
| 12 | + <groupId>com.diligrp</groupId> | ||
| 13 | + <artifactId>tax-agent</artifactId> | ||
| 14 | + <version>${revision}</version> | ||
| 15 | + </parent> | ||
| 16 | + <dependencies> | ||
| 17 | + <dependency> | ||
| 18 | + <groupId>com.diligrp</groupId> | ||
| 19 | + <artifactId>tax-central</artifactId> | ||
| 20 | + <version>${revision}</version> | ||
| 21 | + </dependency> | ||
| 22 | + </dependencies> | ||
| 23 | + | ||
| 24 | +</project> |
tax-map/src/main/java/com/diligrp/tax/mapping/ConvConfig.java
0 → 100644
| 1 | +++ a/tax-map/src/main/java/com/diligrp/tax/mapping/ConvConfig.java | ||
| 1 | +package com.diligrp.tax.mapping; | ||
| 2 | + | ||
| 3 | +import org.springframework.context.annotation.ComponentScan; | ||
| 4 | +import org.springframework.context.annotation.Configuration; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * @Author: zhangmeiyang | ||
| 8 | + * @CreateTime: 2025-10-28 14:46 | ||
| 9 | + * @Version: todo | ||
| 10 | + */ | ||
| 11 | +@Configuration | ||
| 12 | +@ComponentScan(basePackages = "com.diligrp.tax.mapping") | ||
| 13 | +public class ConvConfig { | ||
| 14 | +} |
tax-map/src/main/java/com/diligrp/tax/mapping/context/MappingContext.java
0 → 100644
| 1 | +++ a/tax-map/src/main/java/com/diligrp/tax/mapping/context/MappingContext.java | ||
| 1 | +package com.diligrp.tax.mapping.context; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 4 | +import com.diligrp.tax.mapping.demarcate.Transformer; | ||
| 5 | +import jakarta.annotation.Resource; | ||
| 6 | +import org.springframework.beans.factory.DisposableBean; | ||
| 7 | +import org.springframework.beans.factory.InitializingBean; | ||
| 8 | +import org.springframework.stereotype.Component; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.concurrent.ConcurrentHashMap; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-10-30 18:36 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@Component | ||
| 19 | +public class MappingContext implements InitializingBean, DisposableBean { | ||
| 20 | + @Resource | ||
| 21 | + private List<Transformer<?>> transformers; | ||
| 22 | + | ||
| 23 | + public final static ConcurrentHashMap<DocumentType, Transformer<?>> CONTEXT = new ConcurrentHashMap<>(); | ||
| 24 | + | ||
| 25 | + @Override | ||
| 26 | + public void destroy() throws Exception { | ||
| 27 | + | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + @Override | ||
| 31 | + public void afterPropertiesSet() throws Exception { | ||
| 32 | + transformers.forEach(transformer -> CONTEXT.put(transformer.markDocument(), transformer)); | ||
| 33 | + } | ||
| 34 | +} |
tax-map/src/main/java/com/diligrp/tax/mapping/demarcate/Transformer.java
0 → 100644
| 1 | +++ a/tax-map/src/main/java/com/diligrp/tax/mapping/demarcate/Transformer.java | ||
| 1 | +package com.diligrp.tax.mapping.demarcate; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseDocument; | ||
| 4 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 5 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2025-10-30 18:36 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +public abstract class Transformer<T extends BaseMapping> { | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * 标记文档 | ||
| 16 | + * | ||
| 17 | + * @return {@link DocumentType } | ||
| 18 | + */ | ||
| 19 | + public abstract DocumentType markDocument(); | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * 变换 | ||
| 23 | + * | ||
| 24 | + * @param document 公文 | ||
| 25 | + * @return {@link T } | ||
| 26 | + */ | ||
| 27 | + public abstract T transform(BaseDocument document); | ||
| 28 | +} |
tax-map/src/main/java/com/diligrp/tax/mapping/demarcate/kingdee/CustomerTransformer.java
0 → 100644
| 1 | +++ a/tax-map/src/main/java/com/diligrp/tax/mapping/demarcate/kingdee/CustomerTransformer.java | ||
| 1 | +package com.diligrp.tax.mapping.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseDocument; | ||
| 4 | +import com.diligrp.tax.central.domain.document.kingdee.basic.StandardCustomer; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.CustomerMapping; | ||
| 6 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 7 | +import com.diligrp.tax.central.utils.MappingUtils; | ||
| 8 | +import com.diligrp.tax.mapping.demarcate.Transformer; | ||
| 9 | +import org.springframework.stereotype.Component; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * @Author: zhangmeiyang | ||
| 13 | + * @CreateTime: 2025-11-04 16:50 | ||
| 14 | + * @Version: todo | ||
| 15 | + */ | ||
| 16 | +@Component | ||
| 17 | +public class CustomerTransformer extends Transformer<CustomerMapping> { | ||
| 18 | + | ||
| 19 | + @Override | ||
| 20 | + public DocumentType markDocument() { | ||
| 21 | + return DocumentType.CUSTOMER_INFO; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + @Override | ||
| 25 | + public CustomerMapping transform(BaseDocument document) { | ||
| 26 | + StandardCustomer customer = (StandardCustomer) document; | ||
| 27 | + CustomerMapping mapping = MappingUtils.convertValue(customer, CustomerMapping.class); | ||
| 28 | + //TODO 组装部分参数字段 | ||
| 29 | + return mapping; | ||
| 30 | + } | ||
| 31 | +} |
tax-map/src/main/java/com/diligrp/tax/mapping/demarcate/kingdee/ReceiptTransformer.java
0 → 100644
| 1 | +++ a/tax-map/src/main/java/com/diligrp/tax/mapping/demarcate/kingdee/ReceiptTransformer.java | ||
| 1 | +package com.diligrp.tax.mapping.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseDocument; | ||
| 4 | +import com.diligrp.tax.central.domain.document.kingdee.bill.ReceiptBill; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.ReceiptMapping; | ||
| 6 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 7 | +import com.diligrp.tax.central.utils.MappingUtils; | ||
| 8 | +import com.diligrp.tax.mapping.demarcate.Transformer; | ||
| 9 | +import org.springframework.stereotype.Component; | ||
| 10 | + | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * @Author: zhangmeiyang | ||
| 14 | + * @CreateTime: 2025-10-30 18:38 | ||
| 15 | + * @Version: todo | ||
| 16 | + */ | ||
| 17 | +@Component | ||
| 18 | +public class ReceiptTransformer extends Transformer<ReceiptMapping> { | ||
| 19 | + | ||
| 20 | + @Override | ||
| 21 | + public DocumentType markDocument() { | ||
| 22 | + return DocumentType.AR_RECEIVE_BILL; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + @Override | ||
| 26 | + public ReceiptMapping transform(BaseDocument document) { | ||
| 27 | + ReceiptBill bill = (ReceiptBill) document; | ||
| 28 | + ReceiptMapping mapping = MappingUtils.convertValue(bill,ReceiptMapping.class); | ||
| 29 | + var verifyInformation = "FBillTypeID.FNumber = 'scfyys-001' AND F_ZDB_text1 ='202510310900489' AND FALLAMOUNTFOR = '515.0' AND F_ZDB_Text667 = '正向流程' AND F_ZDB_Text5 ='666625013581'"; | ||
| 30 | + var returnKeys = "FID"; | ||
| 31 | + mapping.setVerifyInformation(verifyInformation); | ||
| 32 | + mapping.setReturnKeys(returnKeys); | ||
| 33 | + //TODO 组装部分参数字段 | ||
| 34 | + return mapping; | ||
| 35 | + } | ||
| 36 | +} |
tax-map/src/main/java/com/diligrp/tax/mapping/demarcate/kingdee/ReceivableTransformer.java
0 → 100644
| 1 | +++ a/tax-map/src/main/java/com/diligrp/tax/mapping/demarcate/kingdee/ReceivableTransformer.java | ||
| 1 | +package com.diligrp.tax.mapping.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseDocument; | ||
| 4 | +import com.diligrp.tax.central.domain.document.kingdee.bill.ReceivableBill; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.ReceivableMapping; | ||
| 6 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 7 | +import com.diligrp.tax.central.utils.MappingUtils; | ||
| 8 | +import com.diligrp.tax.mapping.demarcate.Transformer; | ||
| 9 | +import org.springframework.stereotype.Component; | ||
| 10 | + | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * @Author: zhangmeiyang | ||
| 14 | + * @CreateTime: 2025-10-30 18:38 | ||
| 15 | + * @Version: todo | ||
| 16 | + */ | ||
| 17 | +@Component | ||
| 18 | +public class ReceivableTransformer extends Transformer<ReceivableMapping> { | ||
| 19 | + | ||
| 20 | + @Override | ||
| 21 | + public DocumentType markDocument() { | ||
| 22 | + return DocumentType.AR_RECEIVABLE; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + @Override | ||
| 26 | + public ReceivableMapping transform(BaseDocument document) { | ||
| 27 | + ReceivableBill bill = (ReceivableBill) document; | ||
| 28 | + ReceivableMapping mapping = MappingUtils.convertValue(bill,ReceivableMapping.class); | ||
| 29 | + var verifyInformation = "FBillTypeID.FNumber = 'scfyys-001' AND F_ZDB_text1 ='202510310900489' AND FALLAMOUNTFOR = '515.0' AND F_ZDB_Text667 = '正向流程' AND F_ZDB_Text5 ='666625013581'"; | ||
| 30 | + var returnKeys = "FID"; | ||
| 31 | + mapping.setVerifyInformation(verifyInformation); | ||
| 32 | + mapping.setReturnKeys(returnKeys); | ||
| 33 | + //TODO 组装部分参数字段 | ||
| 34 | + return mapping; | ||
| 35 | + } | ||
| 36 | +} |
tax-map/src/main/java/com/diligrp/tax/mapping/demarcate/kingdee/RefundTransformer.java
0 → 100644
| 1 | +++ a/tax-map/src/main/java/com/diligrp/tax/mapping/demarcate/kingdee/RefundTransformer.java | ||
| 1 | +package com.diligrp.tax.mapping.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseDocument; | ||
| 4 | +import com.diligrp.tax.central.domain.document.kingdee.bill.RefundBill; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.RefundMapping; | ||
| 6 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 7 | +import com.diligrp.tax.central.utils.MappingUtils; | ||
| 8 | +import com.diligrp.tax.mapping.demarcate.Transformer; | ||
| 9 | +import org.springframework.stereotype.Component; | ||
| 10 | + | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * @Author: zhangmeiyang | ||
| 14 | + * @CreateTime: 2025-10-30 18:38 | ||
| 15 | + * @Version: todo | ||
| 16 | + */ | ||
| 17 | +@Component | ||
| 18 | +public class RefundTransformer extends Transformer<RefundMapping> { | ||
| 19 | + | ||
| 20 | + @Override | ||
| 21 | + public DocumentType markDocument() { | ||
| 22 | + return DocumentType.AR_REFUND_BILL; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + @Override | ||
| 26 | + public RefundMapping transform(BaseDocument document) { | ||
| 27 | + RefundBill bill = (RefundBill) document; | ||
| 28 | + RefundMapping mapping = MappingUtils.convertValue(bill,RefundMapping.class); | ||
| 29 | + var verifyInformation = "FBillTypeID.FNumber = 'scfyys-001' AND F_ZDB_text1 ='202510310900489' AND FALLAMOUNTFOR = '515.0' AND F_ZDB_Text667 = '正向流程' AND F_ZDB_Text5 ='666625013581'"; | ||
| 30 | + var returnKeys = "FID"; | ||
| 31 | + mapping.setVerifyInformation(verifyInformation); | ||
| 32 | + mapping.setReturnKeys(returnKeys); | ||
| 33 | + //TODO 组装部分参数字段 | ||
| 34 | + return mapping; | ||
| 35 | + } | ||
| 36 | +} |
tax-map/src/main/java/com/diligrp/tax/mapping/process/kingdee/MappingProcessor.java
0 → 100644
| 1 | +++ a/tax-map/src/main/java/com/diligrp/tax/mapping/process/kingdee/MappingProcessor.java | ||
| 1 | +package com.diligrp.tax.mapping.process.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.context.Context; | ||
| 4 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 5 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 6 | +import com.diligrp.tax.central.process.AbstractProcessor; | ||
| 7 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 8 | +import com.diligrp.tax.central.type.SystemType; | ||
| 9 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 10 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 11 | +import com.diligrp.tax.mapping.context.MappingContext; | ||
| 12 | +import com.diligrp.tax.mapping.demarcate.Transformer; | ||
| 13 | +import com.fasterxml.jackson.core.type.TypeReference; | ||
| 14 | +import lombok.extern.slf4j.Slf4j; | ||
| 15 | +import org.springframework.core.annotation.Order; | ||
| 16 | +import org.springframework.stereotype.Component; | ||
| 17 | + | ||
| 18 | +import java.util.Map; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * 转换处理器 | ||
| 22 | + * 将BaseDocument子类转换为Map<String, Object> | ||
| 23 | + */ | ||
| 24 | +@Component | ||
| 25 | +@Order(2) | ||
| 26 | +@Slf4j | ||
| 27 | +public class MappingProcessor extends AbstractProcessor { | ||
| 28 | + | ||
| 29 | + @Override | ||
| 30 | + public Context process(Context context) { | ||
| 31 | + DocumentType from = DocumentType.from(context.getDocumentType()); | ||
| 32 | + SystemType system = SystemType.from(context.getSystemType()); | ||
| 33 | + if (!system.documentTypes.contains(from)) { | ||
| 34 | + throw new TaxAgentServiceException(TaxSystemType.BUSINESS_MATCHES_ARE_INCORRECT); | ||
| 35 | + } | ||
| 36 | + Transformer<?> transformer = MappingContext.CONTEXT.get(from); | ||
| 37 | + BaseMapping transform = transformer.transform(context.getDocumentObject()); | ||
| 38 | + context.setMappingObject(transform); | ||
| 39 | + Map<String,Object> map = JsonUtils.convertValue(transform, new TypeReference<>() {}); | ||
| 40 | + log.info("转换结果,{}", JsonUtils.toJsonString(map)); | ||
| 41 | + return context; | ||
| 42 | + } | ||
| 43 | +} |
tax-proxy/pom.xml
0 → 100644
| 1 | +++ a/tax-proxy/pom.xml | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 5 | + <modelVersion>4.0.0</modelVersion> | ||
| 6 | + | ||
| 7 | + <artifactId>tax-proxy</artifactId> | ||
| 8 | + <version>${revision}</version> | ||
| 9 | + <packaging>jar</packaging> | ||
| 10 | + | ||
| 11 | + <parent> | ||
| 12 | + <groupId>com.diligrp</groupId> | ||
| 13 | + <artifactId>tax-agent</artifactId> | ||
| 14 | + <version>${revision}</version> | ||
| 15 | + </parent> | ||
| 16 | + | ||
| 17 | + <dependencies> | ||
| 18 | + <dependency> | ||
| 19 | + <groupId>com.diligrp</groupId> | ||
| 20 | + <artifactId>tax-central</artifactId> | ||
| 21 | + <version>${revision}</version> | ||
| 22 | + </dependency> | ||
| 23 | + <dependency> | ||
| 24 | + <groupId>com.google.code.gson</groupId> | ||
| 25 | + <artifactId>gson</artifactId> | ||
| 26 | + </dependency> | ||
| 27 | + </dependencies> | ||
| 28 | + | ||
| 29 | +</project> |
tax-proxy/src/main/java/com/diligrp/tax/proxy/ProxyConfig.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/ProxyConfig.java | ||
| 1 | +package com.diligrp.tax.proxy; | ||
| 2 | + | ||
| 3 | +import org.springframework.context.annotation.ComponentScan; | ||
| 4 | +import org.springframework.context.annotation.Configuration; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * @Author: zhangmeiyang | ||
| 8 | + * @CreateTime: 2025-10-28 14:48 | ||
| 9 | + * @Version: todo | ||
| 10 | + */ | ||
| 11 | +@Configuration | ||
| 12 | +@ComponentScan(basePackages = "com.diligrp.tax.proxy") | ||
| 13 | +public class ProxyConfig { | ||
| 14 | +} |
tax-proxy/src/main/java/com/diligrp/tax/proxy/context/ProxyContext.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/context/ProxyContext.java | ||
| 1 | +package com.diligrp.tax.proxy.context; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 4 | +import com.diligrp.tax.proxy.demarcate.Sender; | ||
| 5 | +import jakarta.annotation.Resource; | ||
| 6 | +import org.springframework.beans.factory.DisposableBean; | ||
| 7 | +import org.springframework.beans.factory.InitializingBean; | ||
| 8 | +import org.springframework.stereotype.Component; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.concurrent.ConcurrentHashMap; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-11-03 18:02 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@Component | ||
| 19 | +public class ProxyContext implements InitializingBean, DisposableBean { | ||
| 20 | + | ||
| 21 | + @Resource | ||
| 22 | + private List<Sender<?>> senders; | ||
| 23 | + | ||
| 24 | + public final static ConcurrentHashMap<DocumentType, Sender<?>> CONTEXT = new ConcurrentHashMap<>(); | ||
| 25 | + | ||
| 26 | + @Override | ||
| 27 | + public void destroy() throws Exception { | ||
| 28 | + | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + @Override | ||
| 32 | + public void afterPropertiesSet() throws Exception { | ||
| 33 | + senders.forEach(sender -> CONTEXT.put(sender.markDocument(), sender)); | ||
| 34 | + } | ||
| 35 | +} |
tax-proxy/src/main/java/com/diligrp/tax/proxy/demarcate/Sender.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/demarcate/Sender.java | ||
| 1 | +package com.diligrp.tax.proxy.demarcate; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 4 | +import com.diligrp.tax.central.domain.BaseProxy; | ||
| 5 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2025-11-03 17:55 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +public abstract class Sender<T extends BaseProxy> { | ||
| 13 | + /** | ||
| 14 | + * 标记文档 | ||
| 15 | + * | ||
| 16 | + * @return {@link DocumentType } | ||
| 17 | + */ | ||
| 18 | + public abstract DocumentType markDocument(); | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * 变换 | ||
| 22 | + * | ||
| 23 | + * @param mappingObject 映射对象 | ||
| 24 | + * @return {@link T } | ||
| 25 | + */ | ||
| 26 | + public abstract T send(BaseMapping mappingObject); | ||
| 27 | +} |
tax-proxy/src/main/java/com/diligrp/tax/proxy/demarcate/kingdee/CustomerSender.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/demarcate/kingdee/CustomerSender.java | ||
| 1 | +package com.diligrp.tax.proxy.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.CustomerMapping; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.base.FT_BD_CUSTLOCATION; | ||
| 6 | +import com.diligrp.tax.central.domain.proxy.kingdee.CustomerProxy; | ||
| 7 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 8 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 9 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 10 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 11 | +import com.diligrp.tax.proxy.demarcate.Sender; | ||
| 12 | +import com.diligrp.tax.proxy.helper.KingDeeHelper; | ||
| 13 | +import com.fasterxml.jackson.core.type.TypeReference; | ||
| 14 | +import com.kingdee.bos.webapi.entity.IdentifyInfo; | ||
| 15 | +import com.kingdee.bos.webapi.entity.RepoRet; | ||
| 16 | +import com.kingdee.bos.webapi.entity.SuccessEntity; | ||
| 17 | +import com.kingdee.bos.webapi.sdk.K3CloudApi; | ||
| 18 | +import org.springframework.stereotype.Component; | ||
| 19 | + | ||
| 20 | +import java.util.ArrayList; | ||
| 21 | +import java.util.List; | ||
| 22 | +import java.util.Map; | ||
| 23 | +import java.util.Optional; | ||
| 24 | + | ||
| 25 | +/** | ||
| 26 | + * @Author: zhangmeiyang | ||
| 27 | + * @CreateTime: 2025-11-04 16:54 | ||
| 28 | + * @Version: todo | ||
| 29 | + */ | ||
| 30 | +@Component | ||
| 31 | +public class CustomerSender extends Sender<CustomerProxy> { | ||
| 32 | + @Override | ||
| 33 | + public DocumentType markDocument() { | ||
| 34 | + return DocumentType.CUSTOMER_INFO; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + @Override | ||
| 38 | + public CustomerProxy send(BaseMapping mappingObject) { | ||
| 39 | + var identifyInfo = new IdentifyInfo(); | ||
| 40 | + identifyInfo.setAppId("293965_6+dDWztPVvgY1X1vX67BzbyEyLSc2tqL"); | ||
| 41 | + identifyInfo.setUserName("市场"); | ||
| 42 | + identifyInfo.setServerUrl("http://120.46.151.190/k3cloud/"); | ||
| 43 | + identifyInfo.setAppSecret("a384eaabf599461aa05d89ce4c366d27"); | ||
| 44 | + identifyInfo.setdCID("66435fe720f1d3"); | ||
| 45 | + K3CloudApi kingDeeApi = KingDeeHelper.getKingDeeApi(identifyInfo); | ||
| 46 | + //TODO 账套获取 | ||
| 47 | + CustomerMapping mapping = (CustomerMapping) mappingObject; | ||
| 48 | + List<FT_BD_CUSTLOCATION> contacts = mapping.getFT_BD_CUSTLOCATION(); | ||
| 49 | + contacts.forEach(contact -> { | ||
| 50 | + Map<String, Object> model = JsonUtils.convertValue(contact, new TypeReference<>() { | ||
| 51 | + }); | ||
| 52 | + RepoRet<?> repoRet = KingDeeHelper.nonAuditSend(model, kingDeeApi, "BD_CommonContact"); | ||
| 53 | + SuccessEntity first = repoRet.getResult().getResponseStatus().getSuccessEntitys().getFirst(); | ||
| 54 | + contact.getFContactId().setFNUMBER(first.getNumber()); | ||
| 55 | + }); | ||
| 56 | + // 联系人新增 | ||
| 57 | + Optional.ofNullable(mapping.getFCUSTID()) | ||
| 58 | + .filter(e -> !e.isEmpty()) | ||
| 59 | + .ifPresent(e -> KingDeeHelper.unAuditSend(e, kingDeeApi, markDocument().value)); | ||
| 60 | + RepoRet<?> repoRet = KingDeeHelper.auditSend(JsonUtils.convertValue(mapping, new TypeReference<>() { | ||
| 61 | + }), kingDeeApi, markDocument().value); | ||
| 62 | + //联系人新增和更新完成 | ||
| 63 | + ArrayList<SuccessEntity> successEntity = repoRet.getResult().getResponseStatus().getSuccessEntitys(); | ||
| 64 | + if (successEntity.isEmpty()) { | ||
| 65 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL); | ||
| 66 | + } | ||
| 67 | + SuccessEntity first = successEntity.getFirst(); | ||
| 68 | + var proxy = new CustomerProxy(); | ||
| 69 | + proxy.setThirdPartyId(first.getId()); | ||
| 70 | + proxy.setThirdPartyCode(first.getNumber()); | ||
| 71 | + return proxy; | ||
| 72 | + } | ||
| 73 | +} |
tax-proxy/src/main/java/com/diligrp/tax/proxy/demarcate/kingdee/ReceiptSender.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/demarcate/kingdee/ReceiptSender.java | ||
| 1 | +package com.diligrp.tax.proxy.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.ReceiptMapping; | ||
| 5 | +import com.diligrp.tax.central.domain.mapping.kingdee.ReceivableMapping; | ||
| 6 | +import com.diligrp.tax.central.domain.proxy.kingdee.ReceiptProxy; | ||
| 7 | +import com.diligrp.tax.central.domain.proxy.kingdee.ReceivableProxy; | ||
| 8 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 9 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 10 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 11 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 12 | +import com.diligrp.tax.proxy.demarcate.Sender; | ||
| 13 | +import com.diligrp.tax.proxy.helper.KingDeeHelper; | ||
| 14 | +import com.fasterxml.jackson.core.type.TypeReference; | ||
| 15 | +import com.kingdee.bos.webapi.entity.IdentifyInfo; | ||
| 16 | +import com.kingdee.bos.webapi.entity.RepoRet; | ||
| 17 | +import com.kingdee.bos.webapi.entity.SuccessEntity; | ||
| 18 | +import com.kingdee.bos.webapi.sdk.K3CloudApi; | ||
| 19 | +import org.springframework.stereotype.Component; | ||
| 20 | + | ||
| 21 | +import java.util.ArrayList; | ||
| 22 | +import java.util.List; | ||
| 23 | +import java.util.Map; | ||
| 24 | + | ||
| 25 | +/** | ||
| 26 | + * @Author: zhangmeiyang | ||
| 27 | + * @CreateTime: 2025-11-03 17:58 | ||
| 28 | + * @Version: todo | ||
| 29 | + */ | ||
| 30 | +@Component | ||
| 31 | +public class ReceiptSender extends Sender<ReceiptProxy> { | ||
| 32 | + | ||
| 33 | + @Override | ||
| 34 | + public DocumentType markDocument() { | ||
| 35 | + return DocumentType.AR_RECEIVE_BILL; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @Override | ||
| 39 | + public ReceiptProxy send(BaseMapping mappingObject) { | ||
| 40 | + ReceiptMapping mapping = (ReceiptMapping) mappingObject; | ||
| 41 | +// Set<String> accountSet = mapping.getAccountSet(); | ||
| 42 | + //TODO 获取账套信息并找到发送的IdentityInfo | ||
| 43 | + var identifyInfo = new IdentifyInfo(); | ||
| 44 | + identifyInfo.setAppId("293965_6+dDWztPVvgY1X1vX67BzbyEyLSc2tqL"); | ||
| 45 | + identifyInfo.setUserName("市场"); | ||
| 46 | + identifyInfo.setServerUrl("http://120.46.151.190/k3cloud/"); | ||
| 47 | + identifyInfo.setAppSecret("a384eaabf599461aa05d89ce4c366d27"); | ||
| 48 | + identifyInfo.setdCID("66435fe720f1d3"); | ||
| 49 | + K3CloudApi api = KingDeeHelper.getKingDeeApi(identifyInfo); | ||
| 50 | + List<Object> infos = KingDeeHelper.querySend(mapping, markDocument().value, identifyInfo); | ||
| 51 | + if (!infos.isEmpty()) { | ||
| 52 | + throw new TaxAgentServiceException(TaxSystemType.REPEAT_SENDING); | ||
| 53 | + } | ||
| 54 | + Map<String, Object> model = JsonUtils.convertValue(mapping, new TypeReference<>() { | ||
| 55 | + }); | ||
| 56 | + RepoRet<?> repoRet = KingDeeHelper.auditSend(model, api, markDocument().value); | ||
| 57 | + ArrayList<SuccessEntity> successEntity = repoRet.getResult().getResponseStatus().getSuccessEntitys(); | ||
| 58 | + if (successEntity.isEmpty()) { | ||
| 59 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL); | ||
| 60 | + } | ||
| 61 | + SuccessEntity first = successEntity.getFirst(); | ||
| 62 | + var proxy = new ReceiptProxy(); | ||
| 63 | + proxy.setThirdPartyId(first.getId()); | ||
| 64 | + proxy.setThirdPartyCode(first.getNumber()); | ||
| 65 | + return proxy; | ||
| 66 | + } | ||
| 67 | +} |
tax-proxy/src/main/java/com/diligrp/tax/proxy/demarcate/kingdee/ReceivableSender.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/demarcate/kingdee/ReceivableSender.java | ||
| 1 | +package com.diligrp.tax.proxy.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.ReceivableMapping; | ||
| 5 | +import com.diligrp.tax.central.domain.proxy.kingdee.ReceivableProxy; | ||
| 6 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 7 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 8 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 9 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 10 | +import com.diligrp.tax.proxy.demarcate.Sender; | ||
| 11 | +import com.diligrp.tax.proxy.helper.KingDeeHelper; | ||
| 12 | +import com.fasterxml.jackson.core.type.TypeReference; | ||
| 13 | +import com.kingdee.bos.webapi.entity.IdentifyInfo; | ||
| 14 | +import com.kingdee.bos.webapi.entity.RepoRet; | ||
| 15 | +import com.kingdee.bos.webapi.entity.SuccessEntity; | ||
| 16 | +import com.kingdee.bos.webapi.sdk.K3CloudApi; | ||
| 17 | +import org.springframework.stereotype.Component; | ||
| 18 | + | ||
| 19 | +import java.util.*; | ||
| 20 | + | ||
| 21 | +/** | ||
| 22 | + * @Author: zhangmeiyang | ||
| 23 | + * @CreateTime: 2025-11-03 17:58 | ||
| 24 | + * @Version: todo | ||
| 25 | + */ | ||
| 26 | +@Component | ||
| 27 | +public class ReceivableSender extends Sender<ReceivableProxy> { | ||
| 28 | + | ||
| 29 | + @Override | ||
| 30 | + public DocumentType markDocument() { | ||
| 31 | + return DocumentType.AR_RECEIVABLE; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + @Override | ||
| 35 | + public ReceivableProxy send(BaseMapping mappingObject) { | ||
| 36 | + ReceivableMapping mapping = (ReceivableMapping) mappingObject; | ||
| 37 | +// Set<String> accountSet = mapping.getAccountSet(); | ||
| 38 | + //TODO 获取账套信息并找到发送的IdentityInfo | ||
| 39 | + var identifyInfo = new IdentifyInfo(); | ||
| 40 | + identifyInfo.setAppId("293965_6+dDWztPVvgY1X1vX67BzbyEyLSc2tqL"); | ||
| 41 | + identifyInfo.setUserName("市场"); | ||
| 42 | + identifyInfo.setServerUrl("http://120.46.151.190/k3cloud/"); | ||
| 43 | + identifyInfo.setAppSecret("a384eaabf599461aa05d89ce4c366d27"); | ||
| 44 | + identifyInfo.setdCID("66435fe720f1d3"); | ||
| 45 | + K3CloudApi api = KingDeeHelper.getKingDeeApi(identifyInfo); | ||
| 46 | + List<Object> infos = KingDeeHelper.querySend(mapping, markDocument().value, identifyInfo); | ||
| 47 | + if (!infos.isEmpty()) { | ||
| 48 | + throw new TaxAgentServiceException(TaxSystemType.REPEAT_SENDING); | ||
| 49 | + } | ||
| 50 | + Map<String, Object> model = JsonUtils.convertValue(mapping, new TypeReference<>() { | ||
| 51 | + }); | ||
| 52 | + RepoRet<?> repoRet = KingDeeHelper.auditSend(model, api, markDocument().value); | ||
| 53 | + ArrayList<SuccessEntity> successEntity = repoRet.getResult().getResponseStatus().getSuccessEntitys(); | ||
| 54 | + if (successEntity.isEmpty()) { | ||
| 55 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL); | ||
| 56 | + } | ||
| 57 | + SuccessEntity first = successEntity.getFirst(); | ||
| 58 | + var proxy = new ReceivableProxy(); | ||
| 59 | + proxy.setThirdPartyId(first.getId()); | ||
| 60 | + proxy.setThirdPartyCode(first.getNumber()); | ||
| 61 | + return proxy; | ||
| 62 | + } | ||
| 63 | +} |
tax-proxy/src/main/java/com/diligrp/tax/proxy/demarcate/kingdee/RefundSender.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/demarcate/kingdee/RefundSender.java | ||
| 1 | +package com.diligrp.tax.proxy.demarcate.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 4 | +import com.diligrp.tax.central.domain.mapping.kingdee.RefundMapping; | ||
| 5 | +import com.diligrp.tax.central.domain.proxy.kingdee.RefundProxy; | ||
| 6 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 7 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 8 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 9 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 10 | +import com.diligrp.tax.proxy.demarcate.Sender; | ||
| 11 | +import com.diligrp.tax.proxy.helper.KingDeeHelper; | ||
| 12 | +import com.fasterxml.jackson.core.type.TypeReference; | ||
| 13 | +import com.kingdee.bos.webapi.entity.IdentifyInfo; | ||
| 14 | +import com.kingdee.bos.webapi.entity.RepoRet; | ||
| 15 | +import com.kingdee.bos.webapi.entity.SuccessEntity; | ||
| 16 | +import com.kingdee.bos.webapi.sdk.K3CloudApi; | ||
| 17 | +import org.springframework.stereotype.Component; | ||
| 18 | + | ||
| 19 | +import java.util.ArrayList; | ||
| 20 | +import java.util.List; | ||
| 21 | +import java.util.Map; | ||
| 22 | + | ||
| 23 | +/** | ||
| 24 | + * @Author: zhangmeiyang | ||
| 25 | + * @CreateTime: 2025-11-03 17:58 | ||
| 26 | + * @Version: todo | ||
| 27 | + */ | ||
| 28 | +@Component | ||
| 29 | +public class RefundSender extends Sender<RefundProxy> { | ||
| 30 | + | ||
| 31 | + @Override | ||
| 32 | + public DocumentType markDocument() { | ||
| 33 | + return DocumentType.AR_REFUND_BILL; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + @Override | ||
| 37 | + public RefundProxy send(BaseMapping mappingObject) { | ||
| 38 | + RefundMapping mapping = (RefundMapping) mappingObject; | ||
| 39 | +// Set<String> accountSet = mapping.getAccountSet(); | ||
| 40 | + //TODO 获取账套信息并找到发送的IdentityInfo | ||
| 41 | + var identifyInfo = new IdentifyInfo(); | ||
| 42 | + identifyInfo.setAppId("293965_6+dDWztPVvgY1X1vX67BzbyEyLSc2tqL"); | ||
| 43 | + identifyInfo.setUserName("市场"); | ||
| 44 | + identifyInfo.setServerUrl("http://120.46.151.190/k3cloud/"); | ||
| 45 | + identifyInfo.setAppSecret("a384eaabf599461aa05d89ce4c366d27"); | ||
| 46 | + identifyInfo.setdCID("66435fe720f1d3"); | ||
| 47 | + K3CloudApi api = KingDeeHelper.getKingDeeApi(identifyInfo); | ||
| 48 | + List<Object> infos = KingDeeHelper.querySend(mapping, markDocument().value, identifyInfo); | ||
| 49 | + if (!infos.isEmpty()) { | ||
| 50 | + throw new TaxAgentServiceException(TaxSystemType.REPEAT_SENDING); | ||
| 51 | + } | ||
| 52 | + Map<String, Object> model = JsonUtils.convertValue(mapping, new TypeReference<>() { | ||
| 53 | + }); | ||
| 54 | + RepoRet<?> repoRet = KingDeeHelper.auditSend(model, api, markDocument().value); | ||
| 55 | + ArrayList<SuccessEntity> successEntity = repoRet.getResult().getResponseStatus().getSuccessEntitys(); | ||
| 56 | + if (successEntity.isEmpty()) { | ||
| 57 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL); | ||
| 58 | + } | ||
| 59 | + SuccessEntity first = successEntity.getFirst(); | ||
| 60 | + var proxy = new RefundProxy(); | ||
| 61 | + proxy.setThirdPartyId(first.getId()); | ||
| 62 | + proxy.setThirdPartyCode(first.getNumber()); | ||
| 63 | + return proxy; | ||
| 64 | + } | ||
| 65 | +} |
tax-proxy/src/main/java/com/diligrp/tax/proxy/helper/KingDeeHelper.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/helper/KingDeeHelper.java | ||
| 1 | +package com.diligrp.tax.proxy.helper; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.domain.BaseMapping; | ||
| 4 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 5 | +import com.diligrp.tax.central.type.TaxSystemType; | ||
| 6 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 7 | +import com.diligrp.tax.proxy.message.KingDeeQuery; | ||
| 8 | +import com.diligrp.tax.proxy.message.KingDeeSubmit; | ||
| 9 | +import com.google.gson.Gson; | ||
| 10 | +import com.kingdee.bos.webapi.entity.*; | ||
| 11 | +import com.kingdee.bos.webapi.sdk.K3CloudApi; | ||
| 12 | +import lombok.extern.slf4j.Slf4j; | ||
| 13 | + | ||
| 14 | +import java.util.Collections; | ||
| 15 | +import java.util.List; | ||
| 16 | +import java.util.Map; | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * @Author: zhangmeiyang | ||
| 20 | + * @CreateTime: 2025-10-29 09:42 | ||
| 21 | + * @Version: todo | ||
| 22 | + */ | ||
| 23 | +@Slf4j | ||
| 24 | +public class KingDeeHelper { | ||
| 25 | + | ||
| 26 | + private static final Gson GSON = new Gson(); | ||
| 27 | + | ||
| 28 | + /** | ||
| 29 | + * 获取 King Dee API | ||
| 30 | + * | ||
| 31 | + * @param identifyInfo 识别信息 | ||
| 32 | + * @return {@link K3CloudApi } | ||
| 33 | + */ | ||
| 34 | + public static K3CloudApi getKingDeeApi(IdentifyInfo identifyInfo) { | ||
| 35 | + return new K3CloudApi(identifyInfo, false); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 获取 repo ret | ||
| 40 | + * | ||
| 41 | + * @param res 分辨率 | ||
| 42 | + * @return {@link RepoRet }<{@link ? }> | ||
| 43 | + */ | ||
| 44 | + private static RepoRet<?> getRepoRet(String res) { | ||
| 45 | + RepoRet<?> repoRet = GSON.fromJson(res, RepoRet.class); | ||
| 46 | + if (!repoRet.getResult().getResponseStatus().isIsSuccess()) { | ||
| 47 | + List<String> list = repoRet.getResult().getResponseStatus().getErrors().stream().map(RepoError::getMessage).toList(); | ||
| 48 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL, String.join(";", list)); | ||
| 49 | + } | ||
| 50 | + return repoRet; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + /** | ||
| 54 | + * 创建非审计机构 | ||
| 55 | + * | ||
| 56 | + * @param model 型 | ||
| 57 | + * @param api 应用程序接口 | ||
| 58 | + * @param formId 表单 ID | ||
| 59 | + * @return {@link RepoRet }<{@link ? }> | ||
| 60 | + */ | ||
| 61 | + public static RepoRet<?> nonAuditSend(Map<String, Object> model, K3CloudApi api, String formId) { | ||
| 62 | + var message = new KingDeeSubmit(); | ||
| 63 | + message.setModel(model); | ||
| 64 | + message.setIsAutoSubmitAndAudit(false); | ||
| 65 | + message.setIsAutoAdjustField(true); | ||
| 66 | + var body = JsonUtils.toJsonString(message); | ||
| 67 | + try { | ||
| 68 | + String res = api.save(formId, body); | ||
| 69 | + log.info("金蝶无需审核接口完成,formId={},res={}", formId, res); | ||
| 70 | + return getRepoRet(res); | ||
| 71 | + } catch (Exception e) { | ||
| 72 | + log.error("金蝶无需审核接口调用异常", e); | ||
| 73 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL, e); | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + | ||
| 78 | + /** | ||
| 79 | + * 审计发送 | ||
| 80 | + * | ||
| 81 | + * @param model 型 | ||
| 82 | + * @param api 应用程序接口 | ||
| 83 | + * @param formId 表单 ID | ||
| 84 | + * @return {@link RepoRet }<{@link ? }> | ||
| 85 | + */ | ||
| 86 | + public static RepoRet<?> auditSend(Map<String, Object> model, K3CloudApi api, String formId) { | ||
| 87 | + var message = new KingDeeSubmit(); | ||
| 88 | + message.setModel(model); | ||
| 89 | + message.setIsAutoSubmitAndAudit(true); | ||
| 90 | + message.setIsAutoAdjustField(true); | ||
| 91 | + var body = JsonUtils.toJsonString(message); | ||
| 92 | + try { | ||
| 93 | + String res; | ||
| 94 | + res = api.save(formId, body); | ||
| 95 | + log.info("金蝶审核接口完成,formId={},res={}", formId, res); | ||
| 96 | + return getRepoRet(res); | ||
| 97 | + } catch (Exception e) { | ||
| 98 | + log.error("金蝶审核接口调用异常", e); | ||
| 99 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL, e); | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + /** | ||
| 104 | + * 创建 un audit 参数 | ||
| 105 | + * | ||
| 106 | + * @param ids 身份证 | ||
| 107 | + * @param api 应用程序接口 | ||
| 108 | + * @param formId 表单 ID | ||
| 109 | + * @return {@link RepoRet }<{@link ? }> | ||
| 110 | + */ | ||
| 111 | + public static RepoRet<?> unAuditSend(String ids, K3CloudApi api, String formId) { | ||
| 112 | + var operateParam = new OperateParam(); | ||
| 113 | + operateParam.setIds(ids); | ||
| 114 | + try { | ||
| 115 | + RepoRet<?> repoRet = api.unAudit(formId, operateParam); | ||
| 116 | + if (!repoRet.getResult().getResponseStatus().isIsSuccess()) { | ||
| 117 | + List<String> list = repoRet.getResult().getResponseStatus().getErrors().stream().map(RepoError::getMessage).toList(); | ||
| 118 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL, String.join(";", list)); | ||
| 119 | + } | ||
| 120 | + return repoRet; | ||
| 121 | + } catch (Exception e) { | ||
| 122 | + log.error("金蝶反审核接口调用异常", e); | ||
| 123 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL, e); | ||
| 124 | + } | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + public static <T extends BaseMapping> List<Object> querySend(T t, String formId, IdentifyInfo identifyInfo) { | ||
| 128 | + var filterString = t.getVerifyInformation(); | ||
| 129 | + var fieldKeys = t.getReturnKeys(); | ||
| 130 | + K3CloudApi kingDeeApi = getKingDeeApi(identifyInfo); | ||
| 131 | + return querySend(formId, filterString, fieldKeys, kingDeeApi); | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * 创建查询参数 | ||
| 136 | + * | ||
| 137 | + * @param formId 表单 ID | ||
| 138 | + * @param filterString 过滤器字符串 | ||
| 139 | + * @param fieldKeys 字段键 | ||
| 140 | + * @param api 应用程序接口 | ||
| 141 | + * @return {@link List }<{@link List }<{@link Object }>> | ||
| 142 | + */ | ||
| 143 | + private static List<Object> querySend(String formId, String filterString, String fieldKeys, K3CloudApi api) { | ||
| 144 | + var query = new KingDeeQuery(); | ||
| 145 | + query.setFormId(formId); | ||
| 146 | + query.setFilterString(filterString); | ||
| 147 | + query.setFieldKeys(fieldKeys); | ||
| 148 | + try { | ||
| 149 | + List<List<Object>> lists = api.executeBillQuery(JsonUtils.toJsonString(query)); | ||
| 150 | + log.info("金蝶查证接口返回,formId={},json={}", formId, lists); | ||
| 151 | + if (lists.isEmpty()) { | ||
| 152 | + return Collections.emptyList(); | ||
| 153 | + } | ||
| 154 | + return lists.getFirst(); | ||
| 155 | + } catch (Exception e) { | ||
| 156 | + log.error("金蝶查证接口调用异常", e); | ||
| 157 | + throw new TaxAgentServiceException(TaxSystemType.REMOTE_SERVICE_CALLS_ARE_EXCEPTIONAL, e); | ||
| 158 | + } | ||
| 159 | + } | ||
| 160 | +} |
tax-proxy/src/main/java/com/diligrp/tax/proxy/message/KingDeeQuery.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/message/KingDeeQuery.java | ||
| 1 | +package com.diligrp.tax.proxy.message; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | +import lombok.Getter; | ||
| 5 | +import lombok.Setter; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2025-10-29 09:51 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +@Getter | ||
| 13 | +@Setter | ||
| 14 | +public class KingDeeQuery { | ||
| 15 | + /** | ||
| 16 | + * 表单 ID | ||
| 17 | + */ | ||
| 18 | + @JsonProperty("FormId") | ||
| 19 | + private String formId; | ||
| 20 | + /** | ||
| 21 | + * 过滤器字符串 | ||
| 22 | + */ | ||
| 23 | + @JsonProperty("FilterString") | ||
| 24 | + private String filterString; | ||
| 25 | + /** | ||
| 26 | + * 字段键 | ||
| 27 | + */ | ||
| 28 | + @JsonProperty("FieldKeys") | ||
| 29 | + private String fieldKeys; | ||
| 30 | +} |
tax-proxy/src/main/java/com/diligrp/tax/proxy/message/KingDeeSubmit.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/message/KingDeeSubmit.java | ||
| 1 | +package com.diligrp.tax.proxy.message; | ||
| 2 | + | ||
| 3 | +import com.fasterxml.jackson.annotation.JsonProperty; | ||
| 4 | +import lombok.Getter; | ||
| 5 | +import lombok.Setter; | ||
| 6 | + | ||
| 7 | +import java.util.Map; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2024-10-16 14:34 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Setter | ||
| 15 | +@Getter | ||
| 16 | +public class KingDeeSubmit { | ||
| 17 | + /** | ||
| 18 | + * 模型 | ||
| 19 | + */ | ||
| 20 | + @JsonProperty("Model") | ||
| 21 | + private Map<String, Object> model; | ||
| 22 | + /** | ||
| 23 | + * 是自动提交和审核 | ||
| 24 | + */ | ||
| 25 | + @JsonProperty("IsAutoSubmitAndAudit") | ||
| 26 | + private Boolean isAutoSubmitAndAudit; | ||
| 27 | + /** | ||
| 28 | + * 是自动调整字段 | ||
| 29 | + */ | ||
| 30 | + @JsonProperty("IsAutoAdjustField") | ||
| 31 | + private Boolean isAutoAdjustField; | ||
| 32 | +} |
tax-proxy/src/main/java/com/diligrp/tax/proxy/process/kingdee/ProxyProcessor.java
0 → 100644
| 1 | +++ a/tax-proxy/src/main/java/com/diligrp/tax/proxy/process/kingdee/ProxyProcessor.java | ||
| 1 | +package com.diligrp.tax.proxy.process.kingdee; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.context.Context; | ||
| 4 | +import com.diligrp.tax.central.domain.BaseProxy; | ||
| 5 | +import com.diligrp.tax.central.process.AbstractProcessor; | ||
| 6 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 7 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 8 | +import com.diligrp.tax.proxy.context.ProxyContext; | ||
| 9 | +import lombok.extern.slf4j.Slf4j; | ||
| 10 | +import org.springframework.core.annotation.Order; | ||
| 11 | +import org.springframework.stereotype.Component; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * 代理发送处理器 | ||
| 15 | + * 将Map<String, Object>发送到目标系统 | ||
| 16 | + */ | ||
| 17 | +@Component | ||
| 18 | +@Order(3) | ||
| 19 | +@Slf4j | ||
| 20 | +public class ProxyProcessor extends AbstractProcessor { | ||
| 21 | + | ||
| 22 | + @Override | ||
| 23 | + public Context process(Context context) { | ||
| 24 | + log.info("开始发送代理请求"); | ||
| 25 | + log.info("base-document,{}", JsonUtils.toJsonString(context.getDocumentObject())); | ||
| 26 | + log.info("base-mapping,{}", JsonUtils.toJsonString(context.getMappingObject())); | ||
| 27 | + DocumentType from = DocumentType.from(context.getDocumentType()); | ||
| 28 | + BaseProxy send = ProxyContext.CONTEXT.get(from).send(context.getMappingObject()); | ||
| 29 | + context.setProxyObject(send); | ||
| 30 | + return context; | ||
| 31 | + } | ||
| 32 | +} |
tax-storage/pom.xml
0 → 100644
| 1 | +++ a/tax-storage/pom.xml | ||
| 1 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 2 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| 3 | + <modelVersion>4.0.0</modelVersion> | ||
| 4 | + | ||
| 5 | + <artifactId>tax-storage</artifactId> | ||
| 6 | + <version>${revision}</version> | ||
| 7 | + <packaging>jar</packaging> | ||
| 8 | + | ||
| 9 | + <parent> | ||
| 10 | + <groupId>com.diligrp</groupId> | ||
| 11 | + <artifactId>tax-agent</artifactId> | ||
| 12 | + <version>${revision}</version> | ||
| 13 | + </parent> | ||
| 14 | + <dependencies> | ||
| 15 | + <dependency> | ||
| 16 | + <groupId>com.diligrp</groupId> | ||
| 17 | + <artifactId>tax-central</artifactId> | ||
| 18 | + <version>${revision}</version> | ||
| 19 | + </dependency> | ||
| 20 | + <dependency> | ||
| 21 | + <groupId>com.mysql</groupId> | ||
| 22 | + <artifactId>mysql-connector-j</artifactId> | ||
| 23 | + </dependency> | ||
| 24 | + <dependency> | ||
| 25 | + <groupId>com.baomidou</groupId> | ||
| 26 | + <artifactId>mybatis-plus-spring-boot3-starter</artifactId> | ||
| 27 | + </dependency> | ||
| 28 | + </dependencies> | ||
| 29 | +</project> |
tax-storage/src/main/java/com/diligrp/tax/storage/StorageConfig.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/StorageConfig.java | ||
| 1 | +package com.diligrp.tax.storage; | ||
| 2 | + | ||
| 3 | +import org.mybatis.spring.annotation.MapperScan; | ||
| 4 | +import org.springframework.context.annotation.ComponentScan; | ||
| 5 | +import org.springframework.context.annotation.Configuration; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2025-11-05 14:14 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +@Configuration | ||
| 13 | +@ComponentScan(basePackages = "com.diligrp.tax.storage") | ||
| 14 | +@MapperScan(basePackages = "com.diligrp.tax.storage.repo") | ||
| 15 | +public class StorageConfig { | ||
| 16 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/context/ConnectionIdentity.java
0 → 100644
tax-storage/src/main/java/com/diligrp/tax/storage/context/TenantPipeline.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/context/TenantPipeline.java | ||
| 1 | +package com.diligrp.tax.storage.context; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 4 | +import com.diligrp.tax.storage.model.vo.TaxPipelineConfigVO; | ||
| 5 | +import com.kingdee.bos.webapi.entity.IdentifyInfo; | ||
| 6 | +import lombok.Builder; | ||
| 7 | +import lombok.Getter; | ||
| 8 | +import lombok.Setter; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Map; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-11-06 10:56 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@Setter | ||
| 19 | +@Getter | ||
| 20 | +@Builder | ||
| 21 | +public class TenantPipeline implements ConnectionIdentity<IdentifyInfo> { | ||
| 22 | + private String name; | ||
| 23 | + private String code; | ||
| 24 | + private Map<String, Object> params; | ||
| 25 | + private List<TaxPipelineConfigVO> taxPipelineConfigs; | ||
| 26 | + | ||
| 27 | + @Override | ||
| 28 | + public IdentifyInfo getIdentity() { | ||
| 29 | + return JsonUtils.convertValue(params, IdentifyInfo.class); | ||
| 30 | + } | ||
| 31 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/context/TenantStorageContext.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/context/TenantStorageContext.java | ||
| 1 | +package com.diligrp.tax.storage.context; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.central.type.SystemType; | ||
| 4 | +import com.diligrp.tax.storage.model.vo.TaxPipelineVO; | ||
| 5 | +import com.diligrp.tax.storage.service.TaxPipelineConfigService; | ||
| 6 | +import com.diligrp.tax.storage.service.TaxPipelineService; | ||
| 7 | +import jakarta.annotation.Resource; | ||
| 8 | +import org.springframework.stereotype.Component; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Map; | ||
| 12 | +import java.util.Optional; | ||
| 13 | +import java.util.concurrent.ConcurrentHashMap; | ||
| 14 | +import java.util.concurrent.atomic.AtomicReference; | ||
| 15 | +import java.util.stream.Collectors; | ||
| 16 | + | ||
| 17 | +/** | ||
| 18 | + * @Author: zhangmeiyang | ||
| 19 | + * @CreateTime: 2025-11-06 10:53 | ||
| 20 | + * @Version: todo | ||
| 21 | + */ | ||
| 22 | +@Component | ||
| 23 | +public class TenantStorageContext { | ||
| 24 | + | ||
| 25 | + @Resource | ||
| 26 | + private TaxPipelineService taxPipelineService; | ||
| 27 | + | ||
| 28 | + @Resource | ||
| 29 | + private TaxPipelineConfigService taxPipelineConfigService; | ||
| 30 | + | ||
| 31 | + private static final ConcurrentHashMap<Long, Map<SystemType, Map<String, TenantPipeline>>> TENANT_PIPELINE_MAP = new ConcurrentHashMap<>(); | ||
| 32 | + | ||
| 33 | + public Optional<TenantPipeline> getTenantPipeline(Long tenantId, SystemType systemType, String pipelineCode) { | ||
| 34 | + AtomicReference<TenantPipeline> pipeline = new AtomicReference<>(); | ||
| 35 | + Map<SystemType, Map<String, TenantPipeline>> tenantPipelineMap = TENANT_PIPELINE_MAP.get(tenantId); | ||
| 36 | + Optional.ofNullable(tenantPipelineMap).ifPresent(map -> { | ||
| 37 | + Map<String, TenantPipeline> pipelineMap = map.get(systemType); | ||
| 38 | + Optional.ofNullable(pipelineMap).ifPresent(e -> { | ||
| 39 | + pipeline.set(pipelineMap.get(pipelineCode)); | ||
| 40 | + }); | ||
| 41 | + }); | ||
| 42 | + return Optional.of(pipeline.get()); | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + public void loadTenantPipeline() { | ||
| 47 | + List<TaxPipelineVO> taxPipelineVOS = taxPipelineService.listAllEnablePipeline(); | ||
| 48 | + Optional.ofNullable(taxPipelineVOS).ifPresent(pipelines -> { | ||
| 49 | + Map<Long, Map<SystemType, Map<String, TenantPipeline>>> tenantPipelineMap = pipelines.stream() | ||
| 50 | + .collect(Collectors.groupingBy( | ||
| 51 | + TaxPipelineVO::getTenantId, | ||
| 52 | + Collectors.groupingBy( | ||
| 53 | + e -> SystemType.from(e.getSystemCode()), | ||
| 54 | + Collectors.toMap( | ||
| 55 | + TaxPipelineVO::getCode, | ||
| 56 | + this::convert, | ||
| 57 | + (existing, replacement) -> existing | ||
| 58 | + ) | ||
| 59 | + ) | ||
| 60 | + )); | ||
| 61 | + TENANT_PIPELINE_MAP.clear(); | ||
| 62 | + TENANT_PIPELINE_MAP.putAll(tenantPipelineMap); | ||
| 63 | + }); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + | ||
| 67 | + private TenantPipeline convert(TaxPipelineVO taxPipelineVO) { | ||
| 68 | + return TenantPipeline.builder() | ||
| 69 | + .code(taxPipelineVO.getCode()) | ||
| 70 | + .name(taxPipelineVO.getName()) | ||
| 71 | + .params(taxPipelineVO.getParams()) | ||
| 72 | + .taxPipelineConfigs(taxPipelineConfigService.listByPipelineId(taxPipelineVO.getId())) | ||
| 73 | + .build(); | ||
| 74 | + } | ||
| 75 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/controller/TaxPipelineConfigController.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/controller/TaxPipelineConfigController.java | ||
| 1 | +package com.diligrp.tax.storage.controller; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.storage.message.Message; | ||
| 4 | +import com.diligrp.tax.storage.model.co.TaxPipelineConfigCO; | ||
| 5 | +import com.diligrp.tax.storage.service.TaxPipelineConfigService; | ||
| 6 | +import jakarta.annotation.Resource; | ||
| 7 | +import org.springframework.validation.annotation.Validated; | ||
| 8 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 10 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 11 | +import org.springframework.web.bind.annotation.RestController; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @Author: zhangmeiyang | ||
| 15 | + * @CreateTime: 2025-11-05 16:22 | ||
| 16 | + * @Version: todo | ||
| 17 | + */ | ||
| 18 | +@RestController | ||
| 19 | +@RequestMapping("/tax/tenant/pipeline/config") | ||
| 20 | +public class TaxPipelineConfigController { | ||
| 21 | + | ||
| 22 | + @Resource | ||
| 23 | + private TaxPipelineConfigService taxPipelineConfigService; | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 按管道 ID 和文档类型列出 | ||
| 28 | + * | ||
| 29 | + * @param pipelineId 管道 ID | ||
| 30 | + * @param documentType 文档类型 | ||
| 31 | + * @return {@link Message }<{@link ? }> | ||
| 32 | + */ | ||
| 33 | + @RequestMapping("/list/{pipelineId}/{documentType}") | ||
| 34 | + public Message<?> listByPipelineIdAndDocumentType(@PathVariable("pipelineId") Long pipelineId, @PathVariable("documentType") String documentType) { | ||
| 35 | + return Message.success(taxPipelineConfigService.listByPipelineIdAndDocumentType(pipelineId, documentType)); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 按管道 ID 列出 | ||
| 40 | + * | ||
| 41 | + * @param pipelineId 管道 ID | ||
| 42 | + * @return {@link Message }<{@link ? }> | ||
| 43 | + */ | ||
| 44 | + @RequestMapping("/list/{pipelineId}") | ||
| 45 | + public Message<?> listByPipelineId(@PathVariable("pipelineId") Long pipelineId) { | ||
| 46 | + return Message.success(taxPipelineConfigService.listByPipelineId(pipelineId)); | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 保存 | ||
| 52 | + * | ||
| 53 | + * @param taxPipelineConfig 税务管道配置 | ||
| 54 | + * @return {@link Message }<{@link ? }> | ||
| 55 | + */ | ||
| 56 | + @RequestMapping("/save") | ||
| 57 | + public Message<?> save(@RequestBody @Validated TaxPipelineConfigCO taxPipelineConfig) { | ||
| 58 | + taxPipelineConfigService.save(taxPipelineConfig); | ||
| 59 | + return Message.success(); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 删除 | ||
| 64 | + * | ||
| 65 | + * @param id id | ||
| 66 | + * @return {@link Message }<{@link ? }> | ||
| 67 | + */ | ||
| 68 | + @RequestMapping("/delete/{id}") | ||
| 69 | + public Message<?> delete(@PathVariable("id") Long id) { | ||
| 70 | + taxPipelineConfigService.delete(id); | ||
| 71 | + return Message.success(); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/controller/TaxPipelineController.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/controller/TaxPipelineController.java | ||
| 1 | +package com.diligrp.tax.storage.controller; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.storage.message.Message; | ||
| 4 | +import com.diligrp.tax.storage.model.co.TaxPipelineCO; | ||
| 5 | +import com.diligrp.tax.storage.service.TaxPipelineService; | ||
| 6 | +import com.diligrp.tax.storage.type.StateType; | ||
| 7 | +import jakarta.annotation.Resource; | ||
| 8 | +import org.springframework.validation.annotation.Validated; | ||
| 9 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 10 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 11 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 12 | +import org.springframework.web.bind.annotation.RestController; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * @Author: zhangmeiyang | ||
| 16 | + * @CreateTime: 2025-11-05 16:07 | ||
| 17 | + * @Version: todo | ||
| 18 | + */ | ||
| 19 | +@RestController | ||
| 20 | +@RequestMapping("/tax/tenant/pipeline") | ||
| 21 | +public class TaxPipelineController { | ||
| 22 | + | ||
| 23 | + @Resource | ||
| 24 | + private TaxPipelineService taxPipelineService; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 保存账套 | ||
| 28 | + * | ||
| 29 | + * @param taxPipeline 税务管道 | ||
| 30 | + * @return {@link Message }<{@link ? }> | ||
| 31 | + */ | ||
| 32 | + @RequestMapping("/save") | ||
| 33 | + public Message<?> save(@RequestBody @Validated TaxPipelineCO taxPipeline) { | ||
| 34 | + taxPipelineService.save(taxPipeline); | ||
| 35 | + return Message.success(); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 按租户列出 | ||
| 40 | + * | ||
| 41 | + * @param group 群 | ||
| 42 | + * @param entity 实体 | ||
| 43 | + * @return {@link Message }<{@link ? }> | ||
| 44 | + */ | ||
| 45 | + @RequestMapping("/listByTenant/{group}/{entity}") | ||
| 46 | + public Message<?> listByTenant(@PathVariable("group") String group, @PathVariable("entity") String entity) { | ||
| 47 | + return Message.success(taxPipelineService.listByTenant(group, entity)); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + /** | ||
| 52 | + * 获取 | ||
| 53 | + * | ||
| 54 | + * @param id id | ||
| 55 | + * @return {@link Message }<{@link ? }> | ||
| 56 | + */ | ||
| 57 | + @RequestMapping("/get/{id}") | ||
| 58 | + public Message<?> get(@PathVariable("id") Long id) { | ||
| 59 | + return Message.success(taxPipelineService.get(id)); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + /** | ||
| 63 | + * 禁用 | ||
| 64 | + * | ||
| 65 | + * @param id id | ||
| 66 | + * @return {@link Message }<{@link ? }> | ||
| 67 | + */ | ||
| 68 | + @RequestMapping("/disable/{id}") | ||
| 69 | + public Message<?> disable(@PathVariable("id") Long id) { | ||
| 70 | + taxPipelineService.updateState(id, StateType.DISABLE); | ||
| 71 | + return Message.success(); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 启用 | ||
| 76 | + * | ||
| 77 | + * @param id id | ||
| 78 | + * @return {@link Message }<{@link ? }> | ||
| 79 | + */ | ||
| 80 | + @RequestMapping("/enable/{id}") | ||
| 81 | + public Message<?> enable(@PathVariable("id") Long id) { | ||
| 82 | + taxPipelineService.updateState(id, StateType.ENABLE); | ||
| 83 | + return Message.success(); | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/controller/TaxTenantController.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/controller/TaxTenantController.java | ||
| 1 | +package com.diligrp.tax.storage.controller; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.storage.message.Message; | ||
| 4 | +import com.diligrp.tax.storage.model.co.TaxTenantCO; | ||
| 5 | +import com.diligrp.tax.storage.service.TaxTenantService; | ||
| 6 | +import jakarta.annotation.Resource; | ||
| 7 | +import org.springframework.validation.annotation.Validated; | ||
| 8 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestBody; | ||
| 10 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 11 | +import org.springframework.web.bind.annotation.RestController; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * 税务租户 | ||
| 15 | + * | ||
| 16 | + * @author zhangmeiyang | ||
| 17 | + * @date 2025/11/05 | ||
| 18 | + */ | ||
| 19 | +@RestController | ||
| 20 | +@RequestMapping("/tax/tenant") | ||
| 21 | +public class TaxTenantController { | ||
| 22 | + | ||
| 23 | + @Resource | ||
| 24 | + private TaxTenantService taxTenantService; | ||
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 获取 | ||
| 28 | + * | ||
| 29 | + * @param entity 实体 | ||
| 30 | + * @param group 群 | ||
| 31 | + * @return {@link Message }<{@link ? }> | ||
| 32 | + */ | ||
| 33 | + @RequestMapping("/get/{group}/{entity}") | ||
| 34 | + public Message<?> get(@PathVariable("group") String group, @PathVariable("entity") String entity) { | ||
| 35 | + return Message.success(taxTenantService.getTenant(group, entity)); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 保存 | ||
| 40 | + * | ||
| 41 | + * @param taxTenantCO 税务租户做 | ||
| 42 | + * @return {@link Message }<{@link ? }> | ||
| 43 | + */ | ||
| 44 | + @RequestMapping("/save") | ||
| 45 | + public Message<?> save(@RequestBody @Validated TaxTenantCO taxTenantCO) { | ||
| 46 | + taxTenantService.saveTenant(taxTenantCO); | ||
| 47 | + return Message.success(); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + /** | ||
| 51 | + * 分页查询 | ||
| 52 | + * | ||
| 53 | + * @param taxTenantCO 税务租户做 | ||
| 54 | + * @return {@link Message }<{@link ? }> | ||
| 55 | + */ | ||
| 56 | + @RequestMapping("page") | ||
| 57 | + public Message<?> page(@RequestBody TaxTenantCO taxTenantCO) { | ||
| 58 | + return Message.success(taxTenantService.findByNameAndState(taxTenantCO)); | ||
| 59 | + } | ||
| 60 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/domain/TaxPipeline.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/domain/TaxPipeline.java | ||
| 1 | +package com.diligrp.tax.storage.domain; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
| 7 | +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | ||
| 8 | +import lombok.Getter; | ||
| 9 | +import lombok.Setter; | ||
| 10 | + | ||
| 11 | +import java.time.LocalDateTime; | ||
| 12 | +import java.util.Map; | ||
| 13 | + | ||
| 14 | +@Getter | ||
| 15 | +@Setter | ||
| 16 | +@TableName(value = "tax_pipeline", autoResultMap = true) | ||
| 17 | +public class TaxPipeline { | ||
| 18 | + @TableId(type = IdType.AUTO) | ||
| 19 | + private Long id; | ||
| 20 | + | ||
| 21 | + @TableField("tenant_id") | ||
| 22 | + private Long tenantId; | ||
| 23 | + | ||
| 24 | + @TableField("system_code") | ||
| 25 | + private String systemCode; | ||
| 26 | + | ||
| 27 | + @TableField("name") | ||
| 28 | + private String name; | ||
| 29 | + | ||
| 30 | + @TableField("code") | ||
| 31 | + private String code; | ||
| 32 | + | ||
| 33 | + @TableField(value = "params", typeHandler = JacksonTypeHandler.class) | ||
| 34 | + private Map<String, Object> params; | ||
| 35 | + | ||
| 36 | + @TableField("state") | ||
| 37 | + private Integer state; | ||
| 38 | + | ||
| 39 | + @TableField("created_time") | ||
| 40 | + private LocalDateTime createdTime; | ||
| 41 | + | ||
| 42 | + @TableField("modified_time") | ||
| 43 | + private LocalDateTime modifiedTime; | ||
| 44 | + | ||
| 45 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/domain/TaxPipelineConfig.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/domain/TaxPipelineConfig.java | ||
| 1 | +package com.diligrp.tax.storage.domain; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
| 7 | +import lombok.Getter; | ||
| 8 | +import lombok.Setter; | ||
| 9 | + | ||
| 10 | +import java.time.Instant; | ||
| 11 | + | ||
| 12 | +@Getter | ||
| 13 | +@Setter | ||
| 14 | +@TableName("tax_pipeline_config") | ||
| 15 | +public class TaxPipelineConfig { | ||
| 16 | + @TableId(type = IdType.AUTO) | ||
| 17 | + private Long id; | ||
| 18 | + | ||
| 19 | + @TableField(value = "pipeline_id") | ||
| 20 | + private Long pipelineId; | ||
| 21 | + | ||
| 22 | + @TableField(value = "document_type") | ||
| 23 | + private String documentType; | ||
| 24 | + | ||
| 25 | + @TableField(value = "config_key") | ||
| 26 | + private String configKey; | ||
| 27 | + | ||
| 28 | + @TableField(value = "config_value") | ||
| 29 | + private String configValue; | ||
| 30 | + | ||
| 31 | + @TableField(value = "created_time") | ||
| 32 | + private Instant createdTime; | ||
| 33 | + | ||
| 34 | + @TableField(value = "modified_time") | ||
| 35 | + private Instant modifiedTime; | ||
| 36 | + | ||
| 37 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/domain/TaxPipelineMapping.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/domain/TaxPipelineMapping.java | ||
| 1 | +package com.diligrp.tax.storage.domain; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
| 7 | +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | ||
| 8 | +import lombok.Getter; | ||
| 9 | +import lombok.Setter; | ||
| 10 | + | ||
| 11 | +import java.time.LocalDateTime; | ||
| 12 | +import java.util.Map; | ||
| 13 | + | ||
| 14 | +@Getter | ||
| 15 | +@Setter | ||
| 16 | +@TableName(value = "tax_pipeline_mapping") | ||
| 17 | +public class TaxPipelineMapping { | ||
| 18 | + | ||
| 19 | + @TableId(type = IdType.AUTO) | ||
| 20 | + private Long id; | ||
| 21 | + | ||
| 22 | + @TableField(value = "pipeline_id") | ||
| 23 | + private Long pipelineId; | ||
| 24 | + | ||
| 25 | + @TableField(value = "document_type") | ||
| 26 | + private String documentType; | ||
| 27 | + | ||
| 28 | + @TableField(value = "system_data_id") | ||
| 29 | + private String systemDataId; | ||
| 30 | + | ||
| 31 | + @TableField(value = "pipeline_data_id") | ||
| 32 | + private String pipelineDataId; | ||
| 33 | + | ||
| 34 | + @TableField(value = "origin_data", typeHandler = JacksonTypeHandler.class) | ||
| 35 | + private Map<String, Object> originData; | ||
| 36 | + | ||
| 37 | + @TableField(value = "state") | ||
| 38 | + private Integer state; | ||
| 39 | + | ||
| 40 | + @TableField(value = "created_time") | ||
| 41 | + private LocalDateTime createdTime; | ||
| 42 | + | ||
| 43 | + @TableField(value = "modified_time") | ||
| 44 | + private LocalDateTime modifiedTime; | ||
| 45 | + | ||
| 46 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/domain/TaxTenant.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/domain/TaxTenant.java | ||
| 1 | +package com.diligrp.tax.storage.domain; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.annotation.IdType; | ||
| 4 | +import com.baomidou.mybatisplus.annotation.TableField; | ||
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | ||
| 6 | +import com.baomidou.mybatisplus.annotation.TableName; | ||
| 7 | +import lombok.Getter; | ||
| 8 | +import lombok.Setter; | ||
| 9 | + | ||
| 10 | +import java.time.LocalDateTime; | ||
| 11 | + | ||
| 12 | +@Getter | ||
| 13 | +@Setter | ||
| 14 | +@TableName(value = "tax_tenant") | ||
| 15 | +public class TaxTenant { | ||
| 16 | + @TableId(type = IdType.AUTO) | ||
| 17 | + private Long id; | ||
| 18 | + | ||
| 19 | + @TableField(value = "name") | ||
| 20 | + private String name; | ||
| 21 | + | ||
| 22 | + @TableField(value = "`group`") | ||
| 23 | + private String group; | ||
| 24 | + | ||
| 25 | + @TableField(value = "entity") | ||
| 26 | + private String entity; | ||
| 27 | + | ||
| 28 | + @TableField(value = "state") | ||
| 29 | + private Integer state; | ||
| 30 | + | ||
| 31 | + @TableField(value = "created_time") | ||
| 32 | + private LocalDateTime createdTime; | ||
| 33 | + | ||
| 34 | + @TableField(value = "modified_time") | ||
| 35 | + private LocalDateTime modifiedTime; | ||
| 36 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/event/RestoreTenantEvent.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/event/RestoreTenantEvent.java | ||
| 1 | +package com.diligrp.tax.storage.event; | ||
| 2 | + | ||
| 3 | +import org.springframework.context.ApplicationEvent; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 重新加载租户事件 | ||
| 7 | + * | ||
| 8 | + * @author zhangmeiyang | ||
| 9 | + * @date 2025/11/06 | ||
| 10 | + */ | ||
| 11 | +public class RestoreTenantEvent extends ApplicationEvent { | ||
| 12 | + | ||
| 13 | + public RestoreTenantEvent(Object source) { | ||
| 14 | + super(source); | ||
| 15 | + } | ||
| 16 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/event/RestoreTenantEventListener.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/event/RestoreTenantEventListener.java | ||
| 1 | +package com.diligrp.tax.storage.event; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.storage.context.TenantStorageContext; | ||
| 4 | +import jakarta.annotation.Resource; | ||
| 5 | +import org.springframework.context.event.EventListener; | ||
| 6 | +import org.springframework.stereotype.Component; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @Author: zhangmeiyang | ||
| 10 | + * @CreateTime: 2025-11-06 10:51 | ||
| 11 | + * @Version: todo | ||
| 12 | + */ | ||
| 13 | +@Component | ||
| 14 | +public class RestoreTenantEventListener { | ||
| 15 | + | ||
| 16 | + @Resource | ||
| 17 | + private TenantStorageContext tenantStorageContext; | ||
| 18 | + | ||
| 19 | + @EventListener | ||
| 20 | + public void restoreTenant(RestoreTenantEvent _event) { | ||
| 21 | + tenantStorageContext.loadTenantPipeline(); | ||
| 22 | + } | ||
| 23 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/message/Message.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/message/Message.java | ||
| 1 | +package com.diligrp.tax.storage.message; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | +import lombok.Setter; | ||
| 5 | + | ||
| 6 | +@Setter | ||
| 7 | +@Getter | ||
| 8 | +public class Message<T> { | ||
| 9 | + public static final int CODE_SUCCESS = 200; | ||
| 10 | + protected static final int CODE_FAILURE = 5000; | ||
| 11 | + protected static final String MSG_SUCCESS = "success"; | ||
| 12 | + | ||
| 13 | + private Integer code; | ||
| 14 | + private String message; | ||
| 15 | + | ||
| 16 | + private T data; | ||
| 17 | + | ||
| 18 | + public Message() { | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + public static Message<?> success() { | ||
| 22 | + Message<?> result = new Message<>(); | ||
| 23 | + result.code = CODE_SUCCESS; | ||
| 24 | + result.message = MSG_SUCCESS; | ||
| 25 | + return result; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + public static <E> Message<E> success(E data) { | ||
| 29 | + Message<E> result = new Message<>(); | ||
| 30 | + result.code = CODE_SUCCESS; | ||
| 31 | + result.data = data; | ||
| 32 | + result.message = MSG_SUCCESS; | ||
| 33 | + return result; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + public static Message<?> failure(String message) { | ||
| 37 | + return failure(CODE_FAILURE, message); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + public static Message<?> failure(int code, String message) { | ||
| 41 | + Message<?> result = new Message<>(); | ||
| 42 | + result.code = code; | ||
| 43 | + result.message = message; | ||
| 44 | + return result; | ||
| 45 | + } | ||
| 46 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/message/PageQuery.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/message/PageQuery.java | ||
| 1 | +package com.diligrp.tax.storage.message; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | +import lombok.Setter; | ||
| 5 | + | ||
| 6 | +/** | ||
| 7 | + * @Author: zhangmeiyang | ||
| 8 | + * @CreateTime: 2025-11-05 15:57 | ||
| 9 | + * @Version: todo | ||
| 10 | + */ | ||
| 11 | +@Getter | ||
| 12 | +@Setter | ||
| 13 | +public abstract class PageQuery { | ||
| 14 | + /** | ||
| 15 | + * 页码 | ||
| 16 | + */ | ||
| 17 | + protected Integer pageNumber; | ||
| 18 | + /** | ||
| 19 | + * 页面大小 | ||
| 20 | + */ | ||
| 21 | + protected Integer pageSize; | ||
| 22 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/model/co/TaxPipelineCO.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/model/co/TaxPipelineCO.java | ||
| 1 | +package com.diligrp.tax.storage.model.co; | ||
| 2 | + | ||
| 3 | +import jakarta.validation.constraints.NotEmpty; | ||
| 4 | +import lombok.Getter; | ||
| 5 | +import lombok.Setter; | ||
| 6 | + | ||
| 7 | +import java.util.Map; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-05 16:02 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Getter | ||
| 15 | +@Setter | ||
| 16 | +public class TaxPipelineCO { | ||
| 17 | + /** | ||
| 18 | + * id | ||
| 19 | + */ | ||
| 20 | + private Long id; | ||
| 21 | + /** | ||
| 22 | + * 租户 ID | ||
| 23 | + */ | ||
| 24 | + private Long tenantId; | ||
| 25 | + /** | ||
| 26 | + * 群 | ||
| 27 | + */ | ||
| 28 | + @NotEmpty | ||
| 29 | + private String group; | ||
| 30 | + /** | ||
| 31 | + * 实体 | ||
| 32 | + */ | ||
| 33 | + @NotEmpty | ||
| 34 | + private String entity; | ||
| 35 | + /** | ||
| 36 | + * 账套类型 | ||
| 37 | + */ | ||
| 38 | + @NotEmpty | ||
| 39 | + private String systemCode; | ||
| 40 | + /** | ||
| 41 | + * 账套名字 | ||
| 42 | + */ | ||
| 43 | + @NotEmpty | ||
| 44 | + private String name; | ||
| 45 | + /** | ||
| 46 | + * 账套编码 | ||
| 47 | + */ | ||
| 48 | + @NotEmpty | ||
| 49 | + private String code; | ||
| 50 | + /** | ||
| 51 | + * 参数 | ||
| 52 | + */ | ||
| 53 | + @NotEmpty | ||
| 54 | + private Map<String, Object> params; | ||
| 55 | + /** | ||
| 56 | + * 状态 | ||
| 57 | + */ | ||
| 58 | + private Integer state; | ||
| 59 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/model/co/TaxPipelineConfigCO.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/model/co/TaxPipelineConfigCO.java | ||
| 1 | +package com.diligrp.tax.storage.model.co; | ||
| 2 | + | ||
| 3 | +import jakarta.validation.constraints.NotEmpty; | ||
| 4 | +import jakarta.validation.constraints.NotNull; | ||
| 5 | +import lombok.Getter; | ||
| 6 | +import lombok.Setter; | ||
| 7 | + | ||
| 8 | +@Getter | ||
| 9 | +@Setter | ||
| 10 | +public class TaxPipelineConfigCO { | ||
| 11 | + | ||
| 12 | + /** | ||
| 13 | + * id | ||
| 14 | + */ | ||
| 15 | + private Long id; | ||
| 16 | + | ||
| 17 | + /** | ||
| 18 | + * 管道 ID | ||
| 19 | + */ | ||
| 20 | + @NotNull | ||
| 21 | + private Long pipelineId; | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 文档类型 | ||
| 25 | + */ | ||
| 26 | + @NotEmpty | ||
| 27 | + private String documentType; | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 配置键 | ||
| 31 | + */ | ||
| 32 | + @NotEmpty | ||
| 33 | + private String configKey; | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 配置值 | ||
| 37 | + */ | ||
| 38 | + @NotEmpty | ||
| 39 | + private String configValue; | ||
| 40 | + | ||
| 41 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/model/co/TaxTenantCO.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/model/co/TaxTenantCO.java | ||
| 1 | +package com.diligrp.tax.storage.model.co; | ||
| 2 | + | ||
| 3 | +import com.diligrp.tax.storage.message.PageQuery; | ||
| 4 | +import jakarta.validation.constraints.NotEmpty; | ||
| 5 | +import lombok.Getter; | ||
| 6 | +import lombok.Setter; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * @Author: zhangmeiyang | ||
| 10 | + * @CreateTime: 2025-11-05 14:52 | ||
| 11 | + * @Version: todo | ||
| 12 | + */ | ||
| 13 | +@Getter | ||
| 14 | +@Setter | ||
| 15 | +public class TaxTenantCO extends PageQuery { | ||
| 16 | + /** | ||
| 17 | + * id | ||
| 18 | + */ | ||
| 19 | + private Long id; | ||
| 20 | + /** | ||
| 21 | + * 名字 | ||
| 22 | + */ | ||
| 23 | + @NotEmpty | ||
| 24 | + private String name; | ||
| 25 | + /** | ||
| 26 | + * 群 | ||
| 27 | + */ | ||
| 28 | + @NotEmpty | ||
| 29 | + private String group; | ||
| 30 | + /** | ||
| 31 | + * 实体 | ||
| 32 | + */ | ||
| 33 | + @NotEmpty | ||
| 34 | + private String entity; | ||
| 35 | + /** | ||
| 36 | + * 状态 | ||
| 37 | + */ | ||
| 38 | + private Integer state; | ||
| 39 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/model/vo/TaxPipelineConfigVO.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/model/vo/TaxPipelineConfigVO.java | ||
| 1 | +package com.diligrp.tax.storage.model.vo; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | +import lombok.Setter; | ||
| 5 | + | ||
| 6 | +import java.time.Instant; | ||
| 7 | +import java.time.LocalDateTime; | ||
| 8 | + | ||
| 9 | +@Getter | ||
| 10 | +@Setter | ||
| 11 | +public class TaxPipelineConfigVO { | ||
| 12 | + | ||
| 13 | + private Long id; | ||
| 14 | + | ||
| 15 | + | ||
| 16 | + private Long pipelineId; | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + private String documentType; | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + private String configKey; | ||
| 23 | + | ||
| 24 | + | ||
| 25 | + private String configValue; | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + private LocalDateTime createdTime; | ||
| 29 | + | ||
| 30 | + | ||
| 31 | + private LocalDateTime modifiedTime; | ||
| 32 | + | ||
| 33 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/model/vo/TaxPipelineVO.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/model/vo/TaxPipelineVO.java | ||
| 1 | +package com.diligrp.tax.storage.model.vo; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | +import lombok.Setter; | ||
| 5 | + | ||
| 6 | +import java.time.Instant; | ||
| 7 | +import java.time.LocalDateTime; | ||
| 8 | +import java.util.Map; | ||
| 9 | + | ||
| 10 | +@Getter | ||
| 11 | +@Setter | ||
| 12 | +public class TaxPipelineVO { | ||
| 13 | + private Long id; | ||
| 14 | + | ||
| 15 | + | ||
| 16 | + private Long tenantId; | ||
| 17 | + | ||
| 18 | + | ||
| 19 | + private String systemCode; | ||
| 20 | + | ||
| 21 | + | ||
| 22 | + private String name; | ||
| 23 | + | ||
| 24 | + | ||
| 25 | + private String code; | ||
| 26 | + | ||
| 27 | + | ||
| 28 | + private Map<String, Object> params; | ||
| 29 | + | ||
| 30 | + | ||
| 31 | + private Integer state; | ||
| 32 | + | ||
| 33 | + | ||
| 34 | + private LocalDateTime createdTime; | ||
| 35 | + | ||
| 36 | + | ||
| 37 | + private LocalDateTime modifiedTime; | ||
| 38 | + | ||
| 39 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/model/vo/TaxTenantVO.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/model/vo/TaxTenantVO.java | ||
| 1 | +package com.diligrp.tax.storage.model.vo; | ||
| 2 | + | ||
| 3 | +import lombok.Getter; | ||
| 4 | +import lombok.Setter; | ||
| 5 | + | ||
| 6 | +import java.time.Instant; | ||
| 7 | +import java.time.LocalDateTime; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * @Author: zhangmeiyang | ||
| 11 | + * @CreateTime: 2025-11-05 14:56 | ||
| 12 | + * @Version: todo | ||
| 13 | + */ | ||
| 14 | +@Getter | ||
| 15 | +@Setter | ||
| 16 | +public class TaxTenantVO { | ||
| 17 | + /** | ||
| 18 | + * id | ||
| 19 | + */ | ||
| 20 | + private Long id; | ||
| 21 | + /** | ||
| 22 | + * 名字 | ||
| 23 | + */ | ||
| 24 | + private String name; | ||
| 25 | + /** | ||
| 26 | + * 群 | ||
| 27 | + */ | ||
| 28 | + private String group; | ||
| 29 | + /** | ||
| 30 | + * 实体 | ||
| 31 | + */ | ||
| 32 | + private String entity; | ||
| 33 | + /** | ||
| 34 | + * 州 | ||
| 35 | + */ | ||
| 36 | + private Integer state; | ||
| 37 | + /** | ||
| 38 | + * 创建时间 | ||
| 39 | + */ | ||
| 40 | + private LocalDateTime createdTime; | ||
| 41 | + /** | ||
| 42 | + * 修改时间 | ||
| 43 | + */ | ||
| 44 | + private LocalDateTime modifiedTime; | ||
| 45 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/repo/TaxPipelineConfigRepository.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/repo/TaxPipelineConfigRepository.java | ||
| 1 | +package com.diligrp.tax.storage.repo; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 4 | +import com.diligrp.tax.storage.domain.TaxPipelineConfig; | ||
| 5 | +import org.springframework.stereotype.Repository; | ||
| 6 | + | ||
| 7 | +@Repository | ||
| 8 | +public interface TaxPipelineConfigRepository extends BaseMapper<TaxPipelineConfig> { | ||
| 9 | + | ||
| 10 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/repo/TaxPipelineMappingRepository.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/repo/TaxPipelineMappingRepository.java | ||
| 1 | +package com.diligrp.tax.storage.repo; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 4 | +import com.diligrp.tax.storage.domain.TaxPipelineMapping; | ||
| 5 | +import org.springframework.stereotype.Repository; | ||
| 6 | + | ||
| 7 | +@Repository | ||
| 8 | +public interface TaxPipelineMappingRepository extends BaseMapper<TaxPipelineMapping> { | ||
| 9 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/repo/TaxPipelineRepository.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/repo/TaxPipelineRepository.java | ||
| 1 | +package com.diligrp.tax.storage.repo; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 4 | +import com.diligrp.tax.storage.domain.TaxPipeline; | ||
| 5 | +import org.springframework.stereotype.Repository; | ||
| 6 | + | ||
| 7 | +@Repository | ||
| 8 | +public interface TaxPipelineRepository extends BaseMapper<TaxPipeline> { | ||
| 9 | + | ||
| 10 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/repo/TaxTenantRepository.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/repo/TaxTenantRepository.java | ||
| 1 | +package com.diligrp.tax.storage.repo; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
| 4 | +import com.diligrp.tax.storage.domain.TaxTenant; | ||
| 5 | +import org.springframework.stereotype.Repository; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @Author: zhangmeiyang | ||
| 9 | + * @CreateTime: 2025-11-05 14:35 | ||
| 10 | + * @Version: todo | ||
| 11 | + */ | ||
| 12 | +@Repository | ||
| 13 | +public interface TaxTenantRepository extends BaseMapper<TaxTenant> { | ||
| 14 | + | ||
| 15 | + | ||
| 16 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/service/TaxPipelineConfigService.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/service/TaxPipelineConfigService.java | ||
| 1 | +package com.diligrp.tax.storage.service; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 4 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 5 | +import com.diligrp.tax.central.type.DocumentType; | ||
| 6 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 7 | +import com.diligrp.tax.storage.domain.TaxPipelineConfig; | ||
| 8 | +import com.diligrp.tax.storage.model.co.TaxPipelineConfigCO; | ||
| 9 | +import com.diligrp.tax.storage.model.vo.TaxPipelineConfigVO; | ||
| 10 | +import com.diligrp.tax.storage.repo.TaxPipelineConfigRepository; | ||
| 11 | +import jakarta.annotation.Resource; | ||
| 12 | +import org.springframework.stereotype.Service; | ||
| 13 | +import org.springframework.transaction.annotation.Transactional; | ||
| 14 | + | ||
| 15 | +import java.util.List; | ||
| 16 | +import java.util.Optional; | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * @Author: zhangmeiyang | ||
| 20 | + * @CreateTime: 2025-11-05 16:24 | ||
| 21 | + * @Version: todo | ||
| 22 | + */ | ||
| 23 | +@Service | ||
| 24 | +public class TaxPipelineConfigService { | ||
| 25 | + | ||
| 26 | + @Resource | ||
| 27 | + private TaxPipelineConfigRepository taxPipelineConfigRepository; | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 列表 | ||
| 31 | + * | ||
| 32 | + * @param pipelineId 管道 ID | ||
| 33 | + * @param documentType 文档类型 | ||
| 34 | + * @return {@link Object } | ||
| 35 | + */ | ||
| 36 | + public List<TaxPipelineConfigVO> listByPipelineIdAndDocumentType(Long pipelineId, String documentType) { | ||
| 37 | + LambdaQueryWrapper<TaxPipelineConfig> queryWrapper = new LambdaQueryWrapper<>(); | ||
| 38 | + queryWrapper.eq(TaxPipelineConfig::getPipelineId, pipelineId); | ||
| 39 | + queryWrapper.eq(TaxPipelineConfig::getDocumentType, documentType); | ||
| 40 | + List<TaxPipelineConfig> taxPipelineConfigs = taxPipelineConfigRepository.selectList(queryWrapper); | ||
| 41 | + return taxPipelineConfigs.stream().map(taxPipelineConfig -> JsonUtils.convertValue(taxPipelineConfig, TaxPipelineConfigVO.class)).toList(); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + /** | ||
| 45 | + * 按管道 ID 列出 | ||
| 46 | + * | ||
| 47 | + * @param pipelineId 管道 ID | ||
| 48 | + * @return {@link List }<{@link TaxPipelineConfigVO }> | ||
| 49 | + */ | ||
| 50 | + public List<TaxPipelineConfigVO> listByPipelineId(Long pipelineId) { | ||
| 51 | + LambdaQueryWrapper<TaxPipelineConfig> queryWrapper = new LambdaQueryWrapper<>(); | ||
| 52 | + queryWrapper.eq(TaxPipelineConfig::getPipelineId, pipelineId); | ||
| 53 | + List<TaxPipelineConfig> taxPipelineConfigs = taxPipelineConfigRepository.selectList(queryWrapper); | ||
| 54 | + return taxPipelineConfigs.stream().map(taxPipelineConfig -> JsonUtils.convertValue(taxPipelineConfig, TaxPipelineConfigVO.class)).toList(); | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 保存配置 | ||
| 60 | + * | ||
| 61 | + * @param taxPipelineConfig 税务管道配置 | ||
| 62 | + */ | ||
| 63 | + @Transactional | ||
| 64 | + public void save(TaxPipelineConfigCO taxPipelineConfig) { | ||
| 65 | + DocumentType.validateDocumentType(taxPipelineConfig.getDocumentType()); | ||
| 66 | + taxPipelineConfigRepository.insertOrUpdate(JsonUtils.convertValue(taxPipelineConfig, TaxPipelineConfig.class)); | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + /** | ||
| 70 | + * 删除 | ||
| 71 | + * | ||
| 72 | + * @param id id | ||
| 73 | + */ | ||
| 74 | + @Transactional | ||
| 75 | + public void delete(Long id) { | ||
| 76 | + TaxPipelineConfig config = Optional.ofNullable(taxPipelineConfigRepository.selectById(id)).orElseThrow(() -> new TaxAgentServiceException("未找到当前配置")); | ||
| 77 | + taxPipelineConfigRepository.deleteById(config); | ||
| 78 | + } | ||
| 79 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/service/TaxPipelineService.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/service/TaxPipelineService.java | ||
| 1 | +package com.diligrp.tax.storage.service; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 4 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 5 | +import com.diligrp.tax.central.type.SystemType; | ||
| 6 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 7 | +import com.diligrp.tax.storage.domain.TaxPipeline; | ||
| 8 | +import com.diligrp.tax.storage.model.co.TaxPipelineCO; | ||
| 9 | +import com.diligrp.tax.storage.model.vo.TaxPipelineVO; | ||
| 10 | +import com.diligrp.tax.storage.model.vo.TaxTenantVO; | ||
| 11 | +import com.diligrp.tax.storage.repo.TaxPipelineRepository; | ||
| 12 | +import com.diligrp.tax.storage.type.StateType; | ||
| 13 | +import jakarta.annotation.Resource; | ||
| 14 | +import org.springframework.stereotype.Service; | ||
| 15 | +import org.springframework.transaction.annotation.Transactional; | ||
| 16 | + | ||
| 17 | +import java.util.List; | ||
| 18 | +import java.util.Optional; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * 税务账套服务 | ||
| 22 | + * | ||
| 23 | + * @author zhangmeiyang | ||
| 24 | + * @date 2025/11/05 | ||
| 25 | + */ | ||
| 26 | +@Service | ||
| 27 | +public class TaxPipelineService { | ||
| 28 | + | ||
| 29 | + @Resource | ||
| 30 | + private TaxPipelineRepository taxPipelineRepository; | ||
| 31 | + | ||
| 32 | + @Resource | ||
| 33 | + private TaxTenantService taxTenantService; | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 保存 | ||
| 37 | + * | ||
| 38 | + * @param taxPipelineCO 税务管道要做 | ||
| 39 | + */ | ||
| 40 | + @Transactional | ||
| 41 | + public void save(TaxPipelineCO taxPipelineCO) { | ||
| 42 | + TaxTenantVO tenant = taxTenantService.getTenant(taxPipelineCO.getGroup(), taxPipelineCO.getEntity()); | ||
| 43 | + taxPipelineCO.setTenantId(tenant.getId()); | ||
| 44 | + SystemType.validateSystemCode(taxPipelineCO.getSystemCode()); | ||
| 45 | + TaxPipeline taxPipeline = JsonUtils.convertValue(taxPipelineCO, TaxPipeline.class); | ||
| 46 | + taxPipeline.setState(StateType.ENABLE.value); | ||
| 47 | + taxPipelineRepository.insertOrUpdate(taxPipeline); | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + public List<TaxPipelineVO> listAllEnablePipeline(){ | ||
| 52 | + LambdaQueryWrapper<TaxPipeline> queryWrapper = new LambdaQueryWrapper<>(); | ||
| 53 | + queryWrapper.eq(TaxPipeline::getState, StateType.ENABLE.value); | ||
| 54 | + List<TaxPipeline> taxPipelines = taxPipelineRepository.selectList(queryWrapper); | ||
| 55 | + return taxPipelines.stream().map(taxPipeline -> JsonUtils.convertValue(taxPipeline, TaxPipelineVO.class)).toList(); | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 按租户列出 | ||
| 60 | + * | ||
| 61 | + * @param group 群 | ||
| 62 | + * @param entity 实体 | ||
| 63 | + * @return {@link List }<{@link TaxPipelineVO }> | ||
| 64 | + */ | ||
| 65 | + public List<TaxPipelineVO> listByTenant(String group, String entity) { | ||
| 66 | + TaxTenantVO tenant = taxTenantService.getTenant(group, entity); | ||
| 67 | + LambdaQueryWrapper<TaxPipeline> queryWrapper = new LambdaQueryWrapper<>(); | ||
| 68 | + queryWrapper.eq(TaxPipeline::getTenantId, tenant.getId()); | ||
| 69 | + List<TaxPipeline> taxPipelines = taxPipelineRepository.selectList(queryWrapper); | ||
| 70 | + return taxPipelines.stream().map(taxPipeline -> JsonUtils.convertValue(taxPipeline, TaxPipelineVO.class)).toList(); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 获取 | ||
| 75 | + * | ||
| 76 | + * @param id id | ||
| 77 | + * @return {@link TaxPipelineVO } | ||
| 78 | + */ | ||
| 79 | + public TaxPipelineVO get(Long id) { | ||
| 80 | + TaxPipeline taxPipeline = Optional.ofNullable(taxPipelineRepository.selectById(id)).orElseThrow(() -> new TaxAgentServiceException("未找到当前账套")); | ||
| 81 | + return JsonUtils.convertValue(taxPipeline, TaxPipelineVO.class); | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + /** | ||
| 85 | + * 更新状态 | ||
| 86 | + * | ||
| 87 | + * @param id id | ||
| 88 | + * @param stateType 状态类型 | ||
| 89 | + */ | ||
| 90 | + public void updateState(Long id, StateType stateType) { | ||
| 91 | + TaxPipeline taxPipeline = Optional.ofNullable(taxPipelineRepository.selectById(id)).orElseThrow(() -> new TaxAgentServiceException("未找到当前账套")); | ||
| 92 | + taxPipeline.setState(stateType.value); | ||
| 93 | + taxPipelineRepository.updateById(taxPipeline); | ||
| 94 | + } | ||
| 95 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/service/TaxTenantService.java
0 → 100644
| 1 | +++ a/tax-storage/src/main/java/com/diligrp/tax/storage/service/TaxTenantService.java | ||
| 1 | +package com.diligrp.tax.storage.service; | ||
| 2 | + | ||
| 3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||
| 4 | +import com.baomidou.mybatisplus.core.metadata.IPage; | ||
| 5 | +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||
| 6 | +import com.diligrp.tax.central.exception.TaxAgentServiceException; | ||
| 7 | +import com.diligrp.tax.central.utils.JsonUtils; | ||
| 8 | +import com.diligrp.tax.storage.domain.TaxTenant; | ||
| 9 | +import com.diligrp.tax.storage.model.co.TaxTenantCO; | ||
| 10 | +import com.diligrp.tax.storage.model.vo.TaxTenantVO; | ||
| 11 | +import com.diligrp.tax.storage.repo.TaxTenantRepository; | ||
| 12 | +import com.diligrp.tax.storage.type.StateType; | ||
| 13 | +import jakarta.annotation.Resource; | ||
| 14 | +import org.springframework.stereotype.Service; | ||
| 15 | +import org.springframework.transaction.annotation.Transactional; | ||
| 16 | + | ||
| 17 | +import java.util.Optional; | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * 税务租户服务 | ||
| 21 | + * | ||
| 22 | + * @author zhangmeiyang | ||
| 23 | + * @date 2025/11/05 | ||
| 24 | + */ | ||
| 25 | +@Service | ||
| 26 | +public class TaxTenantService { | ||
| 27 | + | ||
| 28 | + @Resource | ||
| 29 | + private TaxTenantRepository taxTenantRepository; | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 获取租户 | ||
| 33 | + * | ||
| 34 | + * @param group 群 | ||
| 35 | + * @param entity 实体 | ||
| 36 | + * @return {@link TaxTenantVO } | ||
| 37 | + */ | ||
| 38 | + public TaxTenantVO getTenant(String group, String entity) { | ||
| 39 | + LambdaQueryWrapper<TaxTenant> queryWrapper = new LambdaQueryWrapper<>(); | ||
| 40 | + queryWrapper.eq(TaxTenant::getGroup, group); | ||
| 41 | + queryWrapper.eq(TaxTenant::getEntity, entity); | ||
| 42 | + TaxTenant taxTenant = Optional.ofNullable(taxTenantRepository.selectOne(queryWrapper)).orElseThrow(() -> new TaxAgentServiceException("未找到租户信息")); | ||
| 43 | + return JsonUtils.convertValue(taxTenant, TaxTenantVO.class); | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 保存租户 | ||
| 48 | + * | ||
| 49 | + * @param taxTenantCO 税务租户做 | ||
| 50 | + */ | ||
| 51 | + @Transactional | ||
| 52 | + public void saveTenant(TaxTenantCO taxTenantCO) { | ||
| 53 | + TaxTenant taxTenant = JsonUtils.convertValue(taxTenantCO, TaxTenant.class); | ||
| 54 | + taxTenant.setState(StateType.ENABLE.value); | ||
| 55 | + taxTenantRepository.insertOrUpdate(taxTenant); | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 按名称和状态查找 | ||
| 60 | + * | ||
| 61 | + * @param taxTenantCO 税务租户公司 | ||
| 62 | + * @return {@link Page }<{@link TaxTenantVO }> | ||
| 63 | + */ | ||
| 64 | + public IPage<TaxTenantVO> findByNameAndState(TaxTenantCO taxTenantCO) { | ||
| 65 | + LambdaQueryWrapper<TaxTenant> queryWrapper = new LambdaQueryWrapper<>(); | ||
| 66 | + Optional.ofNullable(taxTenantCO.getName()).ifPresent(name -> queryWrapper.like(TaxTenant::getName, name)); | ||
| 67 | + Optional.ofNullable(taxTenantCO.getState()).ifPresent(state -> queryWrapper.eq(TaxTenant::getState, state)); | ||
| 68 | + Page<TaxTenant> page = taxTenantRepository.selectPage(Page.of(taxTenantCO.getPageNumber(), taxTenantCO.getPageSize()), queryWrapper); | ||
| 69 | + return page.convert(taxTenant -> JsonUtils.convertValue(taxTenant, TaxTenantVO.class)); | ||
| 70 | + } | ||
| 71 | +} |
tax-storage/src/main/java/com/diligrp/tax/storage/type/StateType.java
0 → 100644