‘linchangsheng’ 7 ay önce
işleme
b70c273d67
100 değiştirilmiş dosya ile 9914 ekleme ve 0 silme
  1. 40 0
      .gitignore
  2. 310 0
      mvnw
  3. 182 0
      mvnw.cmd
  4. 546 0
      pom.xml
  5. 18 0
      sql/2022-10-24.sql
  6. 34 0
      src/main/java/com/zfire/mall/manager/ManagerApplication.java
  7. 69 0
      src/main/java/com/zfire/mall/manager/SwaggerConfig.java
  8. 11 0
      src/main/java/com/zfire/mall/manager/annotation/ApiNotAuth.java
  9. 17 0
      src/main/java/com/zfire/mall/manager/annotation/Sign.java
  10. 21 0
      src/main/java/com/zfire/mall/manager/annotation/ZfireField.java
  11. 10 0
      src/main/java/com/zfire/mall/manager/annotation/ZfireList.java
  12. 9 0
      src/main/java/com/zfire/mall/manager/annotation/ZfirePowerField.java
  13. 37 0
      src/main/java/com/zfire/mall/manager/bean/CommonCountBean.java
  14. 46 0
      src/main/java/com/zfire/mall/manager/bean/DirectOrderBean.java
  15. 28 0
      src/main/java/com/zfire/mall/manager/bean/ExcelData.java
  16. 32 0
      src/main/java/com/zfire/mall/manager/bean/ExcelExamData.java
  17. 16 0
      src/main/java/com/zfire/mall/manager/bean/MainBean.java
  18. 158 0
      src/main/java/com/zfire/mall/manager/bean/OrderExecBean.java
  19. 26 0
      src/main/java/com/zfire/mall/manager/bean/PayDetail.java
  20. 53 0
      src/main/java/com/zfire/mall/manager/bean/PoySaleCountBean.java
  21. 21 0
      src/main/java/com/zfire/mall/manager/bean/ReceivableOrderBean.java
  22. 14 0
      src/main/java/com/zfire/mall/manager/bean/SVerification.java
  23. 27 0
      src/main/java/com/zfire/mall/manager/bean/ZfireCustomParam.java
  24. 21 0
      src/main/java/com/zfire/mall/manager/bean/admin/AdminModuleTree.java
  25. 63 0
      src/main/java/com/zfire/mall/manager/bean/admin/AdminUserBean.java
  26. 71 0
      src/main/java/com/zfire/mall/manager/bean/admin/AdminUserCom.java
  27. 26 0
      src/main/java/com/zfire/mall/manager/bean/admin/AdminUserVisitAccBean.java
  28. 11 0
      src/main/java/com/zfire/mall/manager/bean/admin/AdminWebsitBean.java
  29. 18 0
      src/main/java/com/zfire/mall/manager/bean/admin/AdminWebsitTree.java
  30. 15 0
      src/main/java/com/zfire/mall/manager/bean/admin/NoticeRecordReadBean.java
  31. 15 0
      src/main/java/com/zfire/mall/manager/bean/admin/reqDto/AdminCompanyWechatReqBean.java
  32. 21 0
      src/main/java/com/zfire/mall/manager/bean/admin/reqDto/AdminCompanyWechatUpdateReqDto.java
  33. 34 0
      src/main/java/com/zfire/mall/manager/bean/admin/reqDto/AdminUserAddReqBean.java
  34. 36 0
      src/main/java/com/zfire/mall/manager/bean/admin/respDto/AdminCompanyWechatRespPageBean.java
  35. 40 0
      src/main/java/com/zfire/mall/manager/bean/admin/respDto/AdminUserDto.java
  36. 18 0
      src/main/java/com/zfire/mall/manager/bean/admin/respDto/AdminWebsitDto.java
  37. 103 0
      src/main/java/com/zfire/mall/manager/bean/config/FirstPartyCustomerManagementAddParam.java
  38. 96 0
      src/main/java/com/zfire/mall/manager/bean/config/FirstPartyCustomerManagementDetailVO.java
  39. 95 0
      src/main/java/com/zfire/mall/manager/bean/config/FirstPartyCustomerManagementEditParam.java
  40. 76 0
      src/main/java/com/zfire/mall/manager/bean/config/FirstPartyCustomerManagementListVO.java
  41. 47 0
      src/main/java/com/zfire/mall/manager/bean/config/MerchantLoginQuotaLimitAddParam.java
  42. 65 0
      src/main/java/com/zfire/mall/manager/bean/config/MerchantLoginQuotaLimitDetailVO.java
  43. 45 0
      src/main/java/com/zfire/mall/manager/bean/config/MerchantLoginQuotaLimitEditParam.java
  44. 64 0
      src/main/java/com/zfire/mall/manager/bean/config/MerchantLoginQuotaLimitListVO.java
  45. 31 0
      src/main/java/com/zfire/mall/manager/bean/config/TradeConfigAddParam.java
  46. 34 0
      src/main/java/com/zfire/mall/manager/bean/config/TradeConfigEditParam.java
  47. 26 0
      src/main/java/com/zfire/mall/manager/bean/config/TradeConfigListLevelParam.java
  48. 52 0
      src/main/java/com/zfire/mall/manager/bean/config/TradeConfigListLevelVO.java
  49. 30 0
      src/main/java/com/zfire/mall/manager/bean/config/TradeConfigListParam.java
  50. 48 0
      src/main/java/com/zfire/mall/manager/bean/config/TradeConfigListVO.java
  51. 22 0
      src/main/java/com/zfire/mall/manager/bean/customer/CustomerProductTypeRelaBean.java
  52. 53 0
      src/main/java/com/zfire/mall/manager/bean/direct/DirectTransferList.java
  53. 23 0
      src/main/java/com/zfire/mall/manager/bean/direct/DirectTransferOrderBean.java
  54. 30 0
      src/main/java/com/zfire/mall/manager/bean/direct/SysDictBean.java
  55. 35 0
      src/main/java/com/zfire/mall/manager/bean/displace/order/DisplaceBean.java
  56. 23 0
      src/main/java/com/zfire/mall/manager/bean/displace/order/DisplaceNumBean.java
  57. 299 0
      src/main/java/com/zfire/mall/manager/bean/displace/order/DisplaceOrderBean.java
  58. 45 0
      src/main/java/com/zfire/mall/manager/bean/displace/order/DisplaceOrderInfo.java
  59. 106 0
      src/main/java/com/zfire/mall/manager/bean/displace/order/DisplaceOrderListBean.java
  60. 76 0
      src/main/java/com/zfire/mall/manager/bean/engin/deposit/CustomerEnginDeposit.java
  61. 27 0
      src/main/java/com/zfire/mall/manager/bean/engin/deposit/CustomerEnginDepositBean.java
  62. 146 0
      src/main/java/com/zfire/mall/manager/bean/engin/deposit/DepositManageBean.java
  63. 67 0
      src/main/java/com/zfire/mall/manager/bean/engin/deposit/DepositManageRecordBean.java
  64. 19 0
      src/main/java/com/zfire/mall/manager/bean/engin/deposit/DepositMangeItemBean.java
  65. 45 0
      src/main/java/com/zfire/mall/manager/bean/engin/deposit/EnginOrderInfo.java
  66. 16 0
      src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoBean.java
  67. 23 0
      src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoItemBean.java
  68. 51 0
      src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoListBean.java
  69. 281 0
      src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoOrderBean.java
  70. 87 0
      src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoOrderItemBean.java
  71. 75 0
      src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoOrderListBean.java
  72. 72 0
      src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoSaleExecBean.java
  73. 11 0
      src/main/java/com/zfire/mall/manager/bean/engin/order/EnginInfoHistoryItemBean.java
  74. 610 0
      src/main/java/com/zfire/mall/manager/bean/engin/order/EnginOrderBean.java
  75. 226 0
      src/main/java/com/zfire/mall/manager/bean/engin/order/EnginOrderItemBean.java
  76. 402 0
      src/main/java/com/zfire/mall/manager/bean/engin/order/EnginOrderListBean.java
  77. 518 0
      src/main/java/com/zfire/mall/manager/bean/engin/sys/EnginSysAgencyBills.java
  78. 20 0
      src/main/java/com/zfire/mall/manager/bean/engin/sys/EnginSysAgencyBillsReq.java
  79. 22 0
      src/main/java/com/zfire/mall/manager/bean/engin/sys/EnginSysReqResult.java
  80. 103 0
      src/main/java/com/zfire/mall/manager/bean/engin/sys/Machine4Agency.java
  81. 542 0
      src/main/java/com/zfire/mall/manager/bean/engin/v2/deposit/DepositManageVO.java
  82. 289 0
      src/main/java/com/zfire/mall/manager/bean/engin/v2/info/EnginInfoOrderVO.java
  83. 129 0
      src/main/java/com/zfire/mall/manager/bean/engin/v2/info/EnginInfoSaleExecVO.java
  84. 4 0
      src/main/java/com/zfire/mall/manager/bean/engin/v2/order/EnginOrderVO.java
  85. 540 0
      src/main/java/com/zfire/mall/manager/bean/engin/v2/order/HomeEnginOrderVO.java
  86. 474 0
      src/main/java/com/zfire/mall/manager/bean/engin/v2/order/TradeEnginOrderVO.java
  87. 27 0
      src/main/java/com/zfire/mall/manager/bean/front/CallBackItemDTO.java
  88. 17 0
      src/main/java/com/zfire/mall/manager/bean/front/CallBackItemList.java
  89. 179 0
      src/main/java/com/zfire/mall/manager/bean/front/CostBillListVO.java
  90. 170 0
      src/main/java/com/zfire/mall/manager/bean/front/CostBillVO.java
  91. 24 0
      src/main/java/com/zfire/mall/manager/bean/front/CostMerchantCheckCodeList.java
  92. 157 0
      src/main/java/com/zfire/mall/manager/bean/front/CostMerchantListVO.java
  93. 107 0
      src/main/java/com/zfire/mall/manager/bean/front/CostMerchantVO.java
  94. 24 0
      src/main/java/com/zfire/mall/manager/bean/front/CostSalesCheckCodeList.java
  95. 132 0
      src/main/java/com/zfire/mall/manager/bean/front/CostSalesListVO.java
  96. 104 0
      src/main/java/com/zfire/mall/manager/bean/front/CostSalesVO.java
  97. 173 0
      src/main/java/com/zfire/mall/manager/bean/front/CostTicketBillVO.java
  98. 265 0
      src/main/java/com/zfire/mall/manager/bean/front/CostTicketListVO.java
  99. 71 0
      src/main/java/com/zfire/mall/manager/bean/front/CostTicketVO.java
  100. 27 0
      src/main/java/com/zfire/mall/manager/bean/front/CreateTicketBill.java

+ 40 - 0
.gitignore

@@ -0,0 +1,40 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+*.log
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+/src/main/java/com.zfire.mall/manager/plus/
+/src/test/
+.DS_Store
+logs/
+src/main/java/com/zfire/mall/manager/plus/
+.mvn/

+ 310 - 0
mvnw

@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
+    fi
+else
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+    fi
+    if [ -n "$MVNW_REPOURL" ]; then
+      jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    else
+      jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    fi
+    while IFS="=" read key value; do
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+      esac
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+    if [ "$MVNW_VERBOSE" = true ]; then
+      echo "Downloading from: $jarUrl"
+    fi
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+    if $cygwin; then
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+    fi
+
+    if command -v wget > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found wget ... using wget"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            wget "$jarUrl" -O "$wrapperJarPath"
+        else
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+        fi
+    elif command -v curl > /dev/null; then
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Found curl ... using curl"
+        fi
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+            curl -o "$wrapperJarPath" "$jarUrl" -f
+        else
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+        fi
+
+    else
+        if [ "$MVNW_VERBOSE" = true ]; then
+          echo "Falling back to using Java to download"
+        fi
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+        # For Cygwin, switch paths to Windows format before running javac
+        if $cygwin; then
+          javaClass=`cygpath --path --windows "$javaClass"`
+        fi
+        if [ -e "$javaClass" ]; then
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Compiling MavenWrapperDownloader.java ..."
+                fi
+                # Compiling the Java class
+                ("$JAVA_HOME/bin/javac" "$javaClass")
+            fi
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+                # Running the downloader
+                if [ "$MVNW_VERBOSE" = true ]; then
+                  echo " - Running MavenWrapperDownloader.java ..."
+                fi
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+            fi
+        fi
+    fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+  echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 182 - 0
mvnw.cmd

@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Found %WRAPPER_JAR%
+    )
+) else (
+    if not "%MVNW_REPOURL%" == "" (
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+    )
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
+        echo Downloading from: %DOWNLOAD_URL%
+    )
+
+    powershell -Command "&{"^
+		"$webclient = new-object System.Net.WebClient;"^
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+		"}"^
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+		"}"
+    if "%MVNW_VERBOSE%" == "true" (
+        echo Finished downloading %WRAPPER_JAR%
+    )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%

+ 546 - 0
pom.xml

@@ -0,0 +1,546 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.3.3.RELEASE</version>
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+    <groupId>com.gree.manager</groupId>
+    <artifactId>supply_api</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>supply_api</name>
+    <description>Demo project for Spring Boot</description>
+
+    <properties>
+        <java.version>1.8</java.version>
+        <org.mapstruct.version>1.5.5.Final</org.mapstruct.version>
+        <lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
+        <org.projectlombok.version>1.18.28</org.projectlombok.version>
+    </properties>
+
+    <dependencies>
+        <!--<dependency>-->
+        <!--<groupId>org.springframework.boot</groupId>-->
+        <!--<artifactId>spring-boot-starter-security</artifactId>-->
+        <!--</dependency>-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.integration</groupId>
+            <artifactId>spring-integration-redis</artifactId>
+<!--            <version>RELEASE</version>-->
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.mongodb</groupId>-->
+        <!--<artifactId>mongo-java-driver</artifactId>-->
+        <!--<version>3.2.2</version>-->
+        <!--</dependency>-->
+
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>3.8.1</version>
+        </dependency>
+
+        <!--<dependency>-->
+            <!--<groupId>org.mybatis.spring.boot</groupId>-->
+            <!--<artifactId>mybatis-spring-boot-starter</artifactId>-->
+            <!--<version>2.1.0</version>-->
+            <!--<exclusions>-->
+                <!--<exclusion>-->
+                    <!--<artifactId>mybatis</artifactId>-->
+                    <!--<groupId>org.mybatis</groupId>-->
+                <!--</exclusion>-->
+            <!--</exclusions>-->
+        <!--</dependency>-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.4.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-generator</artifactId>
+            <version>3.5.0</version>
+        </dependency>
+        <!-- 多数据源 star -->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
+            <version>2.5.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+            <version>1.5.1.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-jdbc</artifactId>
+            <version>1.5.1.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+            <version>1.5.1.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>p6spy</groupId>
+            <artifactId>p6spy</artifactId>
+            <version>3.8.0</version>
+        </dependency>
+        <!-- 多数据源 end -->
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-engine-core</artifactId>
+            <version>2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>${org.projectlombok.version}</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-autoconfigure</artifactId>
+            <version>2.1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>core</artifactId>
+            <version>3.3.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>javase</artifactId>
+            <version>3.3.2</version>
+        </dependency>
+
+        <!--mysql驱动-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>8.0.17</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>alibaba-dingtalk-service-sdk</artifactId>
+            <version>2.0.0</version>
+        </dependency>
+        <!--访问安全-->
+        <!--<dependency>-->
+        <!--<groupId>org.springframework.security</groupId>-->
+        <!--<artifactId>spring-security-test</artifactId>-->
+        <!--<scope>test</scope>-->
+        <!--</dependency>-->
+        <!-- druid -->
+        <!--<dependency>-->
+        <!--<groupId>com.alibaba</groupId>-->
+        <!--<artifactId>druid</artifactId>-->
+        <!--<version>1.1.19</version>-->
+        <!--</dependency>-->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.1.21</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+            <version>2.8.0</version>
+        </dependency>
+        <!--fastjson-->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.59</version>
+        </dependency>
+        <!--okhttp3-->
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+            <version>4.0.1</version>
+        </dependency>
+        <!--swagger接口文档框架-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>swagger-bootstrap-ui</artifactId>
+            <version>1.9.4</version>
+        </dependency>
+        <!-- 支持 @ConfigurationProperties 注解 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <!-- fix swagger input报错-->
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-annotations</artifactId>
+            <version>1.5.22</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger</groupId>
+            <artifactId>swagger-models</artifactId>
+            <version>1.5.22</version>
+        </dependency>
+        <!--更换undertow容器-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-undertow</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15on</artifactId>
+            <version>1.60</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>4.1.2</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>com.vdurmont</groupId>-->
+        <!--<artifactId>emoji-java</artifactId>-->
+        <!--<version>4.0.0</version>-->
+        <!--</dependency>-->
+        <dependency>
+            <groupId>net.coobird</groupId>
+            <artifactId>thumbnailator</artifactId>
+            <version>0.4.8</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>easyexcel</artifactId>
+            <version>3.0.5</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>asm</artifactId>
+                    <groupId>org.ow2.asm</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>eu.bitwalker</groupId>
+            <artifactId>UserAgentUtils</artifactId>
+            <version>1.21</version>
+        </dependency>
+
+        <!-- 图片验证码 -->
+        <dependency>
+            <groupId>com.github.penggle</groupId>
+            <artifactId>kaptcha</artifactId>
+            <version>2.3.2</version>
+        </dependency>
+
+        <!--<dependency>-->
+        <!--<groupId>org.mongodb</groupId>-->
+        <!--<artifactId>mongo-java-driver</artifactId>-->
+        <!--<version>3.2.2</version>-->
+        <!--</dependency>-->
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>4.1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml-schemas</artifactId>
+            <version>4.1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>4.1.2</version>
+        </dependency>
+
+        <!--word 转 pdf-->
+        <!--<dependency>-->
+            <!--<groupId>e-iceblue</groupId>-->
+            <!--<artifactId>spire.doc.free</artifactId>-->
+            <!--<version>5.2.0</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+            <!--<groupId>fr.opensagres.xdocreport</groupId>-->
+            <!--<artifactId>fr.opensagres.poi.xwpf.converter.pdf-gae</artifactId>-->
+            <!--<version>2.0.1</version>-->
+        <!--</dependency>-->
+
+
+        <!--<dependency>-->
+            <!--<groupId>org.docx4j</groupId>-->
+            <!--<artifactId>docx4j-JAXB-Internal</artifactId>-->
+            <!--<version>8.2.4</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+            <!--<groupId>org.docx4j</groupId>-->
+            <!--<artifactId>docx4j-export-fo</artifactId>-->
+            <!--<version>8.2.4</version>-->
+        <!--</dependency>-->
+
+        <!---excel导入-->
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-base</artifactId>
+            <version>4.4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-web</artifactId>
+            <version>4.4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>cn.afterturn</groupId>
+            <artifactId>easypoi-annotation</artifactId>
+            <version>4.4.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt</artifactId>
+            <version>0.6.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>3.8.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-mock</artifactId>
+            <version>2.0.8</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpmime</artifactId>
+            <version>4.4</version>
+        </dependency>
+
+        <!--模板组件-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-thymeleaf</artifactId>
+            <version>2.2.6.RELEASE</version>
+        </dependency>
+        <!--模板组件END-->
+
+        <!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>1.9</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>4.0.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+            <version>2.1.0.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+            <version>2.1.0.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+            <version>2.1.3.RELEASE</version>
+        </dependency>
+
+        <dependency>
+            <groupId>net.logstash.logback</groupId>
+            <artifactId>logstash-logback-encoder</artifactId>
+            <version>6.3</version>
+        </dependency>
+
+        <!-- hutool工具 -->
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.8.20</version>
+        </dependency>
+
+        <!-- 校验工具 -->
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>6.1.6.Final</version>
+        </dependency>
+
+        <!--freemarker制作Html邮件模板依赖包-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-freemarker</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mapstruct</groupId>
+            <artifactId>mapstruct</artifactId>
+            <version>${org.mapstruct.version}</version>
+        </dependency>
+
+    </dependencies>
+
+    <profiles>
+        <profile>
+            <!-- 本地开发环境 -->
+            <id>dev</id>
+            <properties>
+                <profiles.active>dev</profiles.active>
+            </properties>
+            <activation>
+                <!-- 设置默认激活这个配置 -->
+                <activeByDefault>true</activeByDefault>
+            </activation>
+        </profile>
+        <profile>
+            <!-- 测试环境 -->
+            <id>test</id>
+            <properties>
+                <profiles.active>test</profiles.active>
+            </properties>
+        </profile>
+        <profile>
+            <!-- 正式环境 -->
+            <id>prd</id>
+            <properties>
+                <profiles.active>prd</profiles.active>
+            </properties>
+        </profile>
+    </profiles>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.3.10.RELEASE</version>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>${maven-compiler-plugin.version}</version>
+                <configuration>
+                    <source>${java.version}</source>
+                    <target>${java.version}</target>
+                    <annotationProcessorPaths>
+                        <path>
+                            <groupId>org.mapstruct</groupId>
+                            <artifactId>mapstruct-processor</artifactId>
+                            <version>${org.mapstruct.version}</version>
+                        </path>
+                        <path>
+                            <groupId>org.projectlombok</groupId>
+                            <artifactId>lombok</artifactId>
+                            <version>${org.projectlombok.version}</version>
+                        </path>
+                        <path>
+                            <groupId>org.projectlombok</groupId>
+                            <artifactId>lombok-mapstruct-binding</artifactId>
+                            <version>${lombok-mapstruct-binding.version}</version>
+                        </path>
+                    </annotationProcessorPaths>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>com.plus.plugin</groupId>
+                <artifactId>plus-maven-plugin</artifactId>
+                <version>5.0.0-SNAPSHOT</version>
+                <configuration>
+                    <configPath>src/main/resources/generator-${profiles.active}.properties</configPath>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+
+    <repositories>
+        <repository>
+            <id>nexus</id>
+            <name>Releases</name>
+            <url>http://121.43.111.127:8081/repository/maven-public</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <!--snapshots默认是关闭的,需要开启  -->
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>com.e-iceblue</id>
+            <name>e-iceblue</name>
+            <url>https://repo.e-iceblue.cn/repository/maven-public/</url>
+        </repository>
+    </repositories>
+    <pluginRepositories>
+        <pluginRepository>
+            <id>nexus</id>
+            <name>Releases</name>
+            <url>http://121.43.111.127:8081/repository/maven-public</url>
+        </pluginRepository>
+    </pluginRepositories>
+
+</project>

+ 18 - 0
sql/2022-10-24.sql

@@ -0,0 +1,18 @@
+update  retail_order_item a join customer_wallet b on a.customer_wallet_id=b.customer_wallet_id
+set a.wallet_id1 = b.wallet_rebate_id;
+
+update  retail_order_item a join customer_wallet b on a.customer_wallet_id2=b.customer_wallet_id
+set a.wallet_id2 = b.wallet_rebate_id;
+
+update  engin_order_item a join customer_wallet b on a.customer_wallet_id=b.customer_wallet_id
+set a.wallet_id1 = b.wallet_rebate_id;
+
+update  engin_order_item a join customer_wallet b on a.customer_wallet_id2=b.customer_wallet_id
+set a.wallet_id2 = b.wallet_rebate_id;
+
+
+
+
+#2023-05-22
+ALTER TABLE `policy_customer_limit`
+ADD COLUMN `specification` varchar(255) NULL COMMENT '规格型号' AFTER `material_name`;

+ 34 - 0
src/main/java/com/zfire/mall/manager/ManagerApplication.java

@@ -0,0 +1,34 @@
+package com.zfire.mall.manager;
+
+import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
+import com.zfire.mall.manager.utils.ApplicationContextUtils;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.ApplicationContext;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+//定时器已废弃,请前往supply-job服务处理
+@EnableScheduling
+@SpringBootApplication(exclude = {DruidDataSourceAutoConfigure.class})
+@ServletComponentScan(basePackages = {"com.zfire.mall.manager"})
+@EnableAsync
+//@EnableFeignClients
+//@EnableDiscoveryClient
+@EnableCaching
+@MapperScan(basePackages = {
+        "com.zfire.mall.manager.plus.mapper",
+        "com.zfire.mall.manager.commonmapper",
+        "com.zfire.mall.manager.datasource.engin.mapper"
+})
+public class ManagerApplication {
+
+    public static void main(String[] args) {
+        ApplicationContext context = SpringApplication.run(ManagerApplication.class, args);
+        ApplicationContextUtils.setApplicationContext(context);
+    }
+
+}

+ 69 - 0
src/main/java/com/zfire/mall/manager/SwaggerConfig.java

@@ -0,0 +1,69 @@
+package com.zfire.mall.manager;
+
+/**
+ *
+ */
+
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.ParameterBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.schema.ModelRef;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.service.Parameter;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * API文档设置
+ * com.qichuan.sugar.minaapi.SwaggerConfig
+ */
+@Profile({"dev","test"})
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig {
+    @Bean
+    public Docket statisticsApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .pathMapping("/")
+                .groupName("运营后台API")
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.zfire.mall.manager.controller"))
+                .paths(PathSelectors.regex("/.*"))
+                .build()
+                .apiInfo(apiBInfo())
+                .globalOperationParameters(setHeaderToken());
+    }
+
+    private ApiInfo apiBInfo() {
+
+        return new ApiInfoBuilder()
+                .title("众炬供应链企业运营后台API")
+                .description("众炬供应链企业运营后台API")
+                .contact(new Contact("众炬", "http://zfire", "zfire@zfire.com"))
+                .version("1.0")
+                .build();
+    }
+
+    /**
+     * 设置公共header参数
+     * @return
+     */
+    private List<Parameter> setHeaderToken() {
+        ParameterBuilder tokenPar = new ParameterBuilder();
+        List<Parameter> pars = new ArrayList<>();
+        tokenPar.name("x-token").description("校验TOKEN").modelRef(new ModelRef("string")).defaultValue("1111").parameterType("header").required(false).build();
+        pars.add(tokenPar.build());
+        return pars;
+    }
+}

+ 11 - 0
src/main/java/com/zfire/mall/manager/annotation/ApiNotAuth.java

@@ -0,0 +1,11 @@
+package com.zfire.mall.manager.annotation;
+
+import java.lang.annotation.*;
+
+@Target(value = ElementType.METHOD)
+@Retention(value = RetentionPolicy.RUNTIME)
+@Documented
+public @interface ApiNotAuth {
+
+
+}

+ 17 - 0
src/main/java/com/zfire/mall/manager/annotation/Sign.java

@@ -0,0 +1,17 @@
+package com.zfire.mall.manager.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 方法签名加密的注解,供接口对拿有密钥第三方用户开放
+ * 
+ * @author test
+ *
+ */
+@Target(value = { ElementType.METHOD })
+@Retention(value = RetentionPolicy.RUNTIME)
+@Inherited
+public @interface Sign {  
+  
+  
+} 

+ 21 - 0
src/main/java/com/zfire/mall/manager/annotation/ZfireField.java

@@ -0,0 +1,21 @@
+package com.zfire.mall.manager.annotation;
+
+import java.lang.annotation.*;
+
+@Target({ElementType.FIELD,ElementType.TYPE})
+@Retention(value = RetentionPolicy.RUNTIME)
+@Documented
+public @interface ZfireField {
+
+    String tbName() default "";//表简称或全称
+    String colName() default "";//表字段
+    String type() default "input";//input=输入框 select=下拉框
+    String frontCode() default "";//前端特定用
+    boolean pk() default false; //是否为列表主键id
+    boolean isShow() default true;
+    boolean isTotal() default false;//汇总
+    boolean hide() default false;
+    boolean isQuery() default true;//是否支持查询
+    boolean multiple() default false;//是否支持多选
+    int sortNum() default 999;
+}

+ 10 - 0
src/main/java/com/zfire/mall/manager/annotation/ZfireList.java

@@ -0,0 +1,10 @@
+package com.zfire.mall.manager.annotation;
+
+import java.lang.annotation.*;
+
+@Target({ElementType.METHOD})
+@Retention(value = RetentionPolicy.RUNTIME)
+@Documented
+public @interface ZfireList {
+
+}

+ 9 - 0
src/main/java/com/zfire/mall/manager/annotation/ZfirePowerField.java

@@ -0,0 +1,9 @@
+package com.zfire.mall.manager.annotation;
+
+import java.lang.annotation.*;
+
+@Target({ElementType.FIELD, ElementType.TYPE})
+@Retention(value = RetentionPolicy.RUNTIME)
+@Documented
+public @interface ZfirePowerField {
+}

+ 37 - 0
src/main/java/com/zfire/mall/manager/bean/CommonCountBean.java

@@ -0,0 +1,37 @@
+package com.zfire.mall.manager.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@ApiModel
+@Data
+public class CommonCountBean {
+
+    @ApiModelProperty("订单金额统计")
+    private String orderAmountC;
+
+    @ApiModelProperty("单价统计")
+    private String unitPriceC;
+
+    @ApiModelProperty("总返利金额统计/订单返利金额统计")
+    private String rebateAmountT;
+
+    @ApiModelProperty("返利金额统计")
+    private String rebateAmountC;
+
+    @ApiModelProperty("暂扣返利统计")
+    private String withholdAmountC;
+
+    @ApiModelProperty("折让金额统计")
+    private String allowanceAmountC;
+
+    @ApiModelProperty("提货/订单总数量")
+    private String totalC;
+
+    @ApiModelProperty("格力折扣统计")
+    private String discAmountC;
+
+}

+ 46 - 0
src/main/java/com/zfire/mall/manager/bean/DirectOrderBean.java

@@ -0,0 +1,46 @@
+package com.zfire.mall.manager.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+import java.util.List;
+
+/**
+ *直调发货
+ */
+@ApiModel
+@Data
+public class DirectOrderBean {
+    @NotNull
+    @ApiModelProperty("发货日期")
+    private Date orderDate;
+    @NotBlank
+    @ApiModelProperty("发货仓库ID")
+    private String correspondId;
+    @NotBlank
+    @ApiModelProperty("仓位ID")
+    private String stockId;
+    @NotNull
+    @ApiModelProperty("直调发货明细")
+    private List<DirectItem> directItems;
+    @ApiModelProperty("单号(零售订单id或者工程订单id)")
+    private String orderNo;
+
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ApiModel
+    @Data
+    public static class DirectItem{
+        @ApiModelProperty("明细id")
+        private String itemId;
+        @ApiModelProperty("直调数量")
+        private Integer qty;
+    }
+
+
+}

+ 28 - 0
src/main/java/com/zfire/mall/manager/bean/ExcelData.java

@@ -0,0 +1,28 @@
+package com.zfire.mall.manager.bean;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+@Data
+public class ExcelData implements Serializable {
+    /**
+     * 表头
+     */
+    @ApiModelProperty(value = "表头")
+    private List<String> titles;
+
+    /**
+     * 数据
+     */
+    @ApiModelProperty(value = "数据")
+    private List<List<Object>> rows;
+
+    /**
+     * 页签名称
+     */
+    @ApiModelProperty(value = "页签名称")
+    private String name;
+}

+ 32 - 0
src/main/java/com/zfire/mall/manager/bean/ExcelExamData.java

@@ -0,0 +1,32 @@
+package com.zfire.mall.manager.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ExcelExamData{
+    /**
+     * 表头
+     */
+    private List<ExcelTitle> excelTitleBean;
+    /**
+     * 数据
+     */
+    private List<List<Object>> rows;
+    /**
+     * 页签名称
+     */
+    private String name;
+
+
+    @Data
+    public static class ExcelTitle{
+        private String title;
+        private List<String> childTitle;
+        private Short colorIndex;
+    }
+
+}

+ 16 - 0
src/main/java/com/zfire/mall/manager/bean/MainBean.java

@@ -0,0 +1,16 @@
+package com.zfire.mall.manager.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class MainBean {
+
+    @ApiModelProperty("品类id")
+    private String mainId;
+    @ApiModelProperty("品类名称")
+    private String mainName;
+
+}

+ 158 - 0
src/main/java/com/zfire/mall/manager/bean/OrderExecBean.java

@@ -0,0 +1,158 @@
+package com.zfire.mall.manager.bean;
+
+import com.zfire.mall.manager.annotation.ZfireField;
+import com.zfire.mall.manager.constant.SysDictConstant;
+import com.zfire.mall.manager.enums.IsEnum;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 销售执行明细
+ */
+@ZfireField(tbName = "a")
+@ApiModel
+@Data
+public class OrderExecBean {
+    @ApiModelProperty("厂产品代码")
+    private String materialOldNumber;
+    @ApiModelProperty("制单日期")
+    private Date createTime;
+    @ApiModelProperty("订单日期")
+    private Date theTime;
+    @ApiModelProperty("销售订单号")
+    private String id;
+
+    @ApiModelProperty("是否剔除仓储账单")
+    private String isCost;
+
+    @ApiModelProperty("使用单位")
+    private String refUseUnit;
+    @ApiModelProperty("经销商编码")
+    private String customerNumber;
+    @ApiModelProperty("经销商名称")
+    private String customerName;
+    @ApiModelProperty("销售类型编号")
+    private String saleTypeCode;
+    @ApiModelProperty("销售类型")
+    private String saleTypeName;
+    @ApiModelProperty("存货名称")
+    private String materialName;
+    @ApiModelProperty("存货编码")
+    private String materialCode;
+    @ApiModelProperty("规格型号")
+    private String specification;
+    @ApiModelProperty("订单未发货数量")
+    private Integer refundableQty;
+    @ApiModelProperty("总数量")
+    private Integer qty;
+    @ApiModelProperty("退货数量")
+    private Integer retiredQty;
+    @ApiModelProperty("单价")
+    private BigDecimal price;
+    @ApiModelProperty("订单金额")
+    private BigDecimal payAmount;
+    @ApiModelProperty("订单返利金额")
+    private BigDecimal payRebateAmount;
+    @ApiModelProperty("发货金额")
+    private BigDecimal hasSendAmount;
+    @ApiModelProperty("发货数量")
+    private Integer hasSendQty;
+    @ApiModelProperty("直调数量")
+    private Integer directTransferQty;
+    @ApiModelProperty("退货金额")
+    private BigDecimal retiredAmount;
+    @ApiModelProperty("表头业务员id")
+    private String serviceId;
+    @ApiModelProperty("表头业务员名称")
+    private String serviceName;
+    @ApiModelProperty("表体业务员id")
+    private String itemServiceId;
+    @ApiModelProperty("表体业务员名称")
+    private String itemServiceName;
+    @ApiModelProperty("归属业务员ID")
+    private String newServiceId;
+    @ApiModelProperty("归属业务员名称")
+    private String newServiceName;
+    @ApiModelProperty("销售政策编码")
+    private String policyCode;
+    @ApiModelProperty("销售政策名称")
+    private String policyTitle;
+    @ApiModelProperty("月份")
+    private String month;
+    @ApiModelProperty("项目名称")
+    private String projectName;
+    @ApiModelProperty("备注")
+    private String remark;
+    @ApiModelProperty("表体备注")
+    private String itemRemark;
+    @ApiModelProperty("业务区域")
+    private String area;
+    @ApiModelProperty("退货数量")
+    private Integer refundProductQty;
+    @ApiModelProperty("退货金额")
+    private Integer refundProductAmount;
+
+    @ApiModelProperty("现金钱包")
+    private String walletName;
+    @ApiModelProperty("返利钱包")
+    private String rebateWalletName;
+    @ApiModelProperty("直调状态")
+    private String directTransferStatusName;
+    @ApiModelProperty("存货名称")
+    private String k3CategoryName;
+
+    @ApiModelProperty("工程登录编号")
+    private String refEnginRecordNo;
+    @ApiModelProperty("工程编号")
+    private String refProjectNo;
+    @ApiModelProperty("文件编号")
+    private String fileNo;
+    @ApiModelProperty("机型类别")
+    private String refMachineType;
+    @ApiModelProperty("项目名称")
+    private String refProjectName;
+    @ApiModelProperty("订单明细id")
+    private String orderItemId;
+    @ApiModelProperty("实际总折扣金额")
+    private BigDecimal totalDiscAmount;
+    @ApiModelProperty("是否置换")
+    private Boolean isDisplaceOrder;
+
+    @ApiModelProperty("单个商品的返利金额")
+    private BigDecimal singleRebateAmount;
+    @ApiModelProperty("单个商品的折扣金额")
+    private BigDecimal discAmount;
+
+
+    @ApiModelProperty(value = "经销商集团名称")
+    private String customerGroupName;
+    @ApiModelProperty("金蝶部门")
+    private String k3OrgName;
+
+    @ApiModelProperty("物料分组")
+    private String materialGroupName;
+
+    @ApiModelProperty("原供价")
+    private BigDecimal orgPrice;
+    @ApiModelProperty("价格类型")
+    private String priceType;
+
+    @ApiModelProperty("审核人昵称")
+    private String examineName;
+    @ApiModelProperty("审核时间")
+    private Date examineTime;
+    @ApiModelProperty("审核状态")
+    private String examineStatus;
+
+    @ApiModelProperty("项目说明")
+    private String refProjectNote;
+
+    @ApiModelProperty("货满有效期")
+    private String fullCostTime;
+
+
+}

+ 26 - 0
src/main/java/com/zfire/mall/manager/bean/PayDetail.java

@@ -0,0 +1,26 @@
+package com.zfire.mall.manager.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class PayDetail {
+    @ApiModelProperty(value = "paySign")
+    private String paySign;
+    @ApiModelProperty(value = "微信返回的预支付id")
+    private String payPackage;
+    @ApiModelProperty(value = "paySign")
+    private String nonceStr;
+    @ApiModelProperty(value = "当前的时间")
+    private String timeStamp;
+    @ApiModelProperty("支付id")
+    private String id;
+    @ApiModelProperty("是否需要微信支付 true/false")
+    private Boolean isPay = true;
+    @ApiModelProperty("扫码支付的url")
+    private String codeUrl;
+
+
+}

+ 53 - 0
src/main/java/com/zfire/mall/manager/bean/PoySaleCountBean.java

@@ -0,0 +1,53 @@
+package com.zfire.mall.manager.bean;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class PoySaleCountBean extends CommonCountBean{
+
+    @ApiModelProperty("总数量")
+    private String totalC;
+
+    @ApiModelProperty("订单金额")
+    private String amountC;
+
+    @ApiModelProperty("实付金额")
+    private String payAmountC;
+
+    @ApiModelProperty("订单未发货数量")
+    private String undeliveredC;
+
+    @ApiModelProperty("退订数量")
+    private String cancelC;
+
+    @ApiModelProperty("退货数量")
+    private String cancelOrderC;
+
+    @ApiModelProperty("发货金额")
+    private String deliverAmountC;
+
+    @ApiModelProperty("发货数量")
+    private String deliverC;
+
+    @ApiModelProperty("直调数量")
+    private String directC;
+
+    @ApiModelProperty("退订金额")
+    private String cancelAmountC;
+
+    @ApiModelProperty("退货金额")
+    private String cancelOrderAmountC;
+
+    @ApiModelProperty("提货总数量")
+    private String pickC;
+
+    @ApiModelProperty("出库数量")
+    private String sendQtyC;
+
+    @ApiModelProperty("工程登录单总数量")
+    private String totalEC;
+
+}

+ 21 - 0
src/main/java/com/zfire/mall/manager/bean/ReceivableOrderBean.java

@@ -0,0 +1,21 @@
+package com.zfire.mall.manager.bean;
+
+import com.zfire.mall.manager.plus.entity.ReceivableOrder;
+import com.zfire.mall.manager.plus.entity.ReceivableOrderItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class ReceivableOrderBean extends ReceivableOrder {
+
+    @ApiModelProperty("明细")
+    private List<ReceivableOrderItem> items;
+
+    @ApiModelProperty("余额不足时是否确认提交")
+    private Boolean isContinue = false;
+
+}

+ 14 - 0
src/main/java/com/zfire/mall/manager/bean/SVerification.java

@@ -0,0 +1,14 @@
+package com.zfire.mall.manager.bean;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class SVerification implements Serializable {
+    @ApiModelProperty(name = "code", value = "code")
+    private String code;
+    @ApiModelProperty(name = "pic", value = "64位编码")
+    private String pic;//64位编码
+}

+ 27 - 0
src/main/java/com/zfire/mall/manager/bean/ZfireCustomParam.java

@@ -0,0 +1,27 @@
+package com.zfire.mall.manager.bean;
+
+import com.zfire.mall.manager.zfire.bean.QueryParamBean;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.List;
+
+@ApiModel
+@Data
+public class ZfireCustomParam {
+    @ApiModelProperty("id")
+    private String id;
+    @NotBlank
+    @ApiModelProperty("自定义条件名称")
+    private String name;
+    @NotBlank
+    @ApiModelProperty("模块id")
+    private String moduleId;
+    @NotNull
+    @ApiModelProperty("组成条件")
+    private List<QueryParamBean> items;
+
+}

+ 21 - 0
src/main/java/com/zfire/mall/manager/bean/admin/AdminModuleTree.java

@@ -0,0 +1,21 @@
+package com.zfire.mall.manager.bean.admin;
+
+import com.zfire.mall.manager.plus.entity.AdminModule;
+import com.zfire.mall.manager.plus.entity.AdminModule;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@ApiModel
+@Data
+public class AdminModuleTree extends AdminModule {
+
+    @ApiModelProperty("子级")
+    private List<AdminModuleTree> children = new ArrayList<>();
+    @ApiModelProperty("是否显示")
+    private Boolean show = false;
+
+}

+ 63 - 0
src/main/java/com/zfire/mall/manager/bean/admin/AdminUserBean.java

@@ -0,0 +1,63 @@
+package com.zfire.mall.manager.bean.admin;
+
+import com.zfire.mall.manager.plus.entity.AdminUser;
+import com.zfire.mall.manager.plus.entity.AdminUserBindEngin;
+import com.zfire.mall.manager.plus.entity.AdminWebsit;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class AdminUserBean extends AdminUser {
+
+    @ApiModelProperty("工程机地址")
+    private String enginSysUrl;
+    @ApiModelProperty("token")
+    private String token;
+    @ApiModelProperty("部门id集合")
+    private List<String> adminWebsitIds;
+    @ApiModelProperty("经销商存货分类")
+    public List<String> mainNames;
+    @ApiModelProperty("是否折让")
+    private Boolean isZr;
+
+    @ApiModelProperty("绑定仓库")
+    private String[] stockCorrespondList;
+
+    @ApiModelProperty("已绑定工程账号")
+    private List<AdminUserBindEngin> bindEnginList;
+
+    @ApiModelProperty("绑定金蝶物料")
+    private String[] k3CategoryList;
+
+    @ApiModelProperty("网点")
+    private AdminWebsit adminWebsit;
+
+    @ApiModelProperty("是否物流 1是 0否")
+    private Boolean isFront;
+
+    @ApiModelProperty("是否自提 1是 0否")
+    private Boolean isPick;
+
+    @ApiModelProperty("是否配置过 1 配置  0未配置")
+    private Boolean frontPickType;
+
+    @ApiModelProperty("是否配置过 1 配置  0未配置")
+    private Integer changeNum;
+
+    @ApiModelProperty("是否弘格")
+    private Boolean isHongGe;
+
+    @ApiModelProperty("所属集团id")
+    private String groupCompanyId;
+
+    @ApiModelProperty("当前权限名称")
+    private String authority;
+
+    @ApiModelProperty("是否为商用登录审核员")
+    private Boolean isTradeExaminer;
+
+}

+ 71 - 0
src/main/java/com/zfire/mall/manager/bean/admin/AdminUserCom.java

@@ -0,0 +1,71 @@
+package com.zfire.mall.manager.bean.admin;
+
+import com.zfire.mall.manager.plus.entity.AdminUser;
+import com.zfire.mall.manager.plus.entity.AdminUserCategoryRela;
+import com.zfire.mall.manager.plus.entity.AdminWebsit;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class AdminUserCom extends AdminUser {
+
+
+    @ApiModelProperty("拥有的部门权限id")
+    private List<String> adminWebsitIds;
+    @ApiModelProperty("有用的企业权限ids")
+    private List<String> adminCompanyIds;
+    @ApiModelProperty("只读帐号")
+    private Boolean onlyRead = false;
+    @ApiModelProperty("用户所属部门")
+    private AdminWebsit adminWebsit;
+    @ApiModelProperty("用户所属部门")
+    private String adminWebsitId;
+    @ApiModelProperty("用户所属部门名称")
+    private String adminWebsitName;
+    @ApiModelProperty("当前登录人企业微信id")
+    private String loginCompanyId;
+    @ApiModelProperty("当前登录人企业名称")
+    private String loginCompanyName;
+    @ApiModelProperty("金蝶企业编号")
+    private String useOrgNumber;
+    @ApiModelProperty("金蝶企业名称")
+    private String useOrgName;
+    @ApiModelProperty("金蝶企业编号")
+    private List<String> useOrgNumbers;
+
+    @ApiModelProperty("是否为财务")
+    private Boolean isCw;
+
+    @ApiModelProperty("是否物流 1是 0否")
+    private Boolean isFront;
+
+    @ApiModelProperty("是否自提 1是 0否")
+    private Boolean isPick;
+
+    @ApiModelProperty("是否配置过 1 配置  0未配置")
+    private Boolean frontPickType;
+
+    @ApiModelProperty("是否配置过 1 配置  0未配置")
+    private Integer changeNum;
+
+    @ApiModelProperty("主账号id")
+    private String masterAdminUserId;
+
+    //    @ApiModelProperty("工程用户id")
+//    private List<Integer> enginUserIds;
+//    @ApiModelProperty("已绑定工程账号")
+//    private List<AdminUserBindEngin> bindEnginList;
+    @ApiModelProperty("所有子级的业务员")
+    private List<String> serviceIds;
+
+    @ApiModelProperty("拥有的金蝶物料类型id权限")
+    private List<String> k3CategoryIds;
+    @ApiModelProperty("拥有的金蝶物料类型权限")
+    private List<AdminUserCategoryRela> adminUserCategoryRelas;
+
+    @ApiModelProperty("是否为商用登录审核员")
+    private Boolean isTradeExaminer;
+
+}

+ 26 - 0
src/main/java/com/zfire/mall/manager/bean/admin/AdminUserVisitAccBean.java

@@ -0,0 +1,26 @@
+package com.zfire.mall.manager.bean.admin;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@ApiModel
+@Data
+public class AdminUserVisitAccBean {
+
+    @ApiModelProperty("产品旧编码")
+    private String materialOldNumber;
+    @ApiModelProperty("物料编码")
+    private String materialNumber;
+    @ApiModelProperty("产品名称")
+    private String materialName;
+    @ApiModelProperty("规格型号")
+    private String specification;
+    @ApiModelProperty("仓库名称")
+    private String stockName;
+    @ApiModelProperty("到货时间")
+    private Date updateTime;
+
+}

+ 11 - 0
src/main/java/com/zfire/mall/manager/bean/admin/AdminWebsitBean.java

@@ -0,0 +1,11 @@
+package com.zfire.mall.manager.bean.admin;
+
+import com.zfire.mall.manager.plus.entity.AdminUser;
+import io.swagger.annotations.ApiModel;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class AdminWebsitBean extends AdminUser {
+
+}

+ 18 - 0
src/main/java/com/zfire/mall/manager/bean/admin/AdminWebsitTree.java

@@ -0,0 +1,18 @@
+package com.zfire.mall.manager.bean.admin;
+
+import com.zfire.mall.manager.plus.entity.AdminWebsit;
+import com.zfire.mall.manager.plus.entity.AdminWebsit;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class AdminWebsitTree extends AdminWebsit {
+
+    @ApiModelProperty("children")
+    private List<AdminWebsitTree> children;
+
+}

+ 15 - 0
src/main/java/com/zfire/mall/manager/bean/admin/NoticeRecordReadBean.java

@@ -0,0 +1,15 @@
+package com.zfire.mall.manager.bean.admin;
+
+import com.zfire.mall.manager.plus.entity.NoticeRecord;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class NoticeRecordReadBean extends NoticeRecord {
+
+    @ApiModelProperty("已读取总人数")
+    private Integer readCount;
+
+}

+ 15 - 0
src/main/java/com/zfire/mall/manager/bean/admin/reqDto/AdminCompanyWechatReqBean.java

@@ -0,0 +1,15 @@
+package com.zfire.mall.manager.bean.admin.reqDto;
+
+import com.zfire.mall.manager.plus.entity.AdminCompany;
+import com.zfire.mall.manager.plus.entity.AdminUser;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value="AdminCompanyWechatReqBean对象", description="新增商户dto")
+public class AdminCompanyWechatReqBean extends AdminCompany {
+
+    @ApiModelProperty(value = "企业负责人")
+    private AdminUser adminUser;
+}

+ 21 - 0
src/main/java/com/zfire/mall/manager/bean/admin/reqDto/AdminCompanyWechatUpdateReqDto.java

@@ -0,0 +1,21 @@
+package com.zfire.mall.manager.bean.admin.reqDto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel(value="AdminCompanyWechatUpdateReqDto对象", description="编辑商户dto")
+public class AdminCompanyWechatUpdateReqDto {
+
+    @ApiModelProperty(value = "企业的微信配置id")
+    private String companyWechatId;
+    @ApiModelProperty(value = "主log")
+    private String mainLog;
+    @ApiModelProperty("通用loc")
+    private String commonLog;
+    @ApiModelProperty("头像log")
+    private String minLogo;
+}

+ 34 - 0
src/main/java/com/zfire/mall/manager/bean/admin/reqDto/AdminUserAddReqBean.java

@@ -0,0 +1,34 @@
+package com.zfire.mall.manager.bean.admin.reqDto;
+
+import com.zfire.mall.manager.plus.entity.AdminUser;
+import com.zfire.mall.manager.plus.entity.AdminUser;
+import com.zfire.mall.manager.plus.entity.AdminUserCategoryRela;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel(value="AdminUserAddBean对象", description="新增用户对象")
+public class AdminUserAddReqBean extends AdminUser {
+
+    @ApiModelProperty("部门id集合")
+    private List<String> adminWebsitIds;
+    @ApiModelProperty("父经销商id")
+    private String parentCustomerId;
+    @ApiModelProperty("是否折让 true/false")
+    private Boolean isZr;
+
+    @ApiModelProperty("是否商用 true/false")
+    private Boolean isShangYong;
+
+    @ApiModelProperty("绑定对应仓库id")
+    private List<String> correspondIds;
+
+    @ApiModelProperty("对应金蝶物料对象")
+    private List<AdminUserCategoryRela> categoryIds;
+
+    @ApiModelProperty("是否为集团客户")
+    private Boolean isGroupCompany;
+}

+ 36 - 0
src/main/java/com/zfire/mall/manager/bean/admin/respDto/AdminCompanyWechatRespPageBean.java

@@ -0,0 +1,36 @@
+package com.zfire.mall.manager.bean.admin.respDto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.zfire.mall.manager.plus.entity.AdminCompany;
+import com.zfire.mall.manager.plus.entity.AdminUser;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel(description = "商戶列表响应bean")
+@Data
+public class AdminCompanyWechatRespPageBean extends AdminCompany {
+
+    private AdminUser adminUser;
+
+    @TableId(value = "admin_user_id", type = IdType.ID_WORKER_STR)
+    private String adminUserId;
+    @ApiModelProperty(value = "用户名")
+    private String nickName;
+    @ApiModelProperty(value = "帐号")
+    private String userName;
+    @ApiModelProperty(value = "负责人")
+    private String linkName;
+    @ApiModelProperty(value = "角色名")
+    private String roleName;
+    @ApiModelProperty(value = "联系人电话")
+    private String linkPhone;
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+    @ApiModelProperty(value = "地址")
+    private String address;
+    @ApiModelProperty(value = "状态: true=正常  false=冻结")
+    private Boolean status;
+
+}

+ 40 - 0
src/main/java/com/zfire/mall/manager/bean/admin/respDto/AdminUserDto.java

@@ -0,0 +1,40 @@
+package com.zfire.mall.manager.bean.admin.respDto;
+
+import com.zfire.mall.manager.plus.entity.AdminUser;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+@ApiModel
+@Data
+public class AdminUserDto extends AdminUser {
+
+    @ApiModelProperty("金蝶商户编号")
+    private String useOrgNumber;
+    @ApiModelProperty("金蝶商户名称")
+    private String useOrgName;
+
+    @ApiModelProperty("绑定仓库")
+    private String[] stockCorrespondList;
+
+    @ApiModelProperty("绑定仓库名称")
+    private String stockCorrespondName;
+
+    @ApiModelProperty("绑定金蝶物料名称")
+    private String bindCategoryName;
+
+
+    @ApiModelProperty(value = "工装登录名额限制")
+    private Integer workLoginLimit;
+
+    @ApiModelProperty(value = "家装登录名额限制")
+    private Integer homeLoginLimit;
+
+    @ApiModelProperty(value = "跨区登录名额限制")
+    private Integer spanLoginLimit;
+
+    @ApiModelProperty(value = "父级经销商id")
+    private String parentId;
+
+}

+ 18 - 0
src/main/java/com/zfire/mall/manager/bean/admin/respDto/AdminWebsitDto.java

@@ -0,0 +1,18 @@
+package com.zfire.mall.manager.bean.admin.respDto;
+
+import com.zfire.mall.manager.plus.entity.AdminWebsit;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class AdminWebsitDto extends AdminWebsit {
+
+    @ApiModelProperty("所属业务线")
+    private List<String> mainIds;
+
+
+}

+ 103 - 0
src/main/java/com/zfire/mall/manager/bean/config/FirstPartyCustomerManagementAddParam.java

@@ -0,0 +1,103 @@
+package com.zfire.mall.manager.bean.config;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 11:17 星期三
+ */
+@Data
+public class FirstPartyCustomerManagementAddParam {
+
+    @ApiModelProperty(value = "甲方客户名称")
+    @Length(max = 100, message = "甲方客户名称最大长度为100")
+    @NotBlank(message = "甲方客户名称不能为空")
+    private String name;
+
+    @ApiModelProperty(value = "上级客户")
+    @Length(max = 100, message = "上级客户最大长度为100")
+    private String parentName;
+
+    @ApiModelProperty(value = "客户规模")
+    @Length(max = 20, message = "客户规模最大长度为20")
+    @NotBlank(message = "客户规模不能为空")
+    private String scale;
+
+    @ApiModelProperty(value = "客户类型")
+    @Length(max = 20, message = "客户类型最大长度为20")
+    @NotBlank(message = "客户类型不能为空")
+    private String type;
+
+    @ApiModelProperty(value = "行业大类")
+    @Length(max = 20, message = "行业大类最大长度为20")
+    @NotBlank(message = "行业大类不能为空")
+    private String tradeParentId;
+
+    @ApiModelProperty(value = "行业小类")
+    @Length(max = 20, message = "行业小类最大长度为20")
+    @NotBlank(message = "行业小类不能为空")
+    private String tradeId;
+
+    @ApiModelProperty(value = "省id")
+    @NotNull(message = "省不能为空")
+    private Long provinceRegionId;
+
+    @ApiModelProperty(value = "市id")
+    @NotNull(message = "市不能为空")
+    private Long cityRegionId;
+
+    @ApiModelProperty(value = "区id")
+    @NotNull(message = "区不能为空")
+    private Long areaId;
+
+    @ApiModelProperty(value = "详细地址")
+    @Length(max = 100, message = "详细地址最大长度为100")
+    @NotBlank(message = "详细地址不能为空")
+    private String address;
+
+    @ApiModelProperty(value = "客户关系")
+    @Length(max = 20, message = "客户关系最大长度为20")
+    @NotBlank(message = "客户关系不能为空")
+    private String rela;
+
+    @ApiModelProperty(value = "客户来源")
+    @Length(max = 20, message = "客户来源最大长度为20")
+    @NotBlank(message = "客户来源不能为空")
+    private String resource;
+
+    @ApiModelProperty(value = "联系人名称")
+    @Length(max = 20, message = "联系人名称最大长度为20")
+    @NotBlank(message = "联系人名称不能为空")
+    private String linkName;
+
+    @ApiModelProperty(value = "联系人职务")
+    @Length(max = 20, message = "联系人职务最大长度为20")
+    private String linkJob;
+
+    @ApiModelProperty(value = "联系人部门")
+    @Length(max = 20, message = "联系人部门最大长度为20")
+    private String linkDepartment;
+
+    @ApiModelProperty(value = "微信")
+    @Length(max = 50, message = "微信最大长度为50")
+    private String weXin;
+
+    @ApiModelProperty(value = "联系人角色")
+    @Length(max = 20, message = "联系人角色最大长度为20")
+    private String linkRole;
+
+    @ApiModelProperty(value = "邮箱")
+    @Length(max = 50, message = "邮箱最大长度为50")
+    private String email;
+
+    @ApiModelProperty(value = "QQ")
+    @Length(max = 50, message = "QQ最大长度为50")
+    private String qq;
+}

+ 96 - 0
src/main/java/com/zfire/mall/manager/bean/config/FirstPartyCustomerManagementDetailVO.java

@@ -0,0 +1,96 @@
+package com.zfire.mall.manager.bean.config;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.zfire.mall.manager.annotation.ZfireField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 11:16 星期三
+ */
+@Data
+public class FirstPartyCustomerManagementDetailVO {
+
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ApiModelProperty(value = "甲方客户名称")
+    private String name;
+
+    @ApiModelProperty(value = "上级客户")
+    private String parentName;
+
+    @ApiModelProperty(value = "客户规模")
+    private String scale;
+
+    @ApiModelProperty(value = "客户类型")
+    private String type;
+
+    @ApiModelProperty(value = "行业大类")
+    private String tradeParentId;
+
+    @ApiModelProperty(value = "行业小类")
+    private String tradeId;
+
+    @ApiModelProperty(value = "省id")
+    private Long provinceRegionId;
+
+    @ApiModelProperty(value = "市id")
+    private Long cityRegionId;
+
+    @ApiModelProperty(value = "区id")
+    private Long areaId;
+
+    @ApiModelProperty(value = "详细地址")
+    private String address;
+
+    @ApiModelProperty(value = "客户关系")
+    private String rela;
+
+    @ApiModelProperty(value = "客户来源")
+    private String resource;
+
+    @ApiModelProperty(value = "联系人名称")
+    private String linkName;
+
+    @ApiModelProperty(value = "联系人职务")
+    private String linkJob;
+
+    @ApiModelProperty(value = "联系人部门")
+    private String linkDepartment;
+
+    @ApiModelProperty(value = "微信")
+    private String weXin;
+
+    @ApiModelProperty(value = "联系人角色")
+    private String linkRole;
+
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    @ApiModelProperty(value = "QQ")
+    private String qq;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "创建人名称")
+    private String createName;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "更新人名称")
+    private String updateName;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+}

+ 95 - 0
src/main/java/com/zfire/mall/manager/bean/config/FirstPartyCustomerManagementEditParam.java

@@ -0,0 +1,95 @@
+package com.zfire.mall.manager.bean.config;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotBlank;
+import java.util.Date;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 11:16 星期三
+ */
+@Data
+public class FirstPartyCustomerManagementEditParam {
+
+    @NotBlank(message = "id不能为空")
+    @Length(max = 50, message = "id最大长度为50")
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ApiModelProperty(value = "甲方客户名称")
+    @Length(max = 100, message = "甲方客户名称最大长度为100")
+    private String name;
+
+    @ApiModelProperty(value = "上级客户")
+    @Length(max = 100, message = "上级客户最大长度为100")
+    private String parentName;
+
+    @ApiModelProperty(value = "客户规模")
+    @Length(max = 20, message = "客户规模最大长度为20")
+    private String scale;
+
+    @ApiModelProperty(value = "客户类型")
+    @Length(max = 20, message = "客户类型最大长度为20")
+    private String type;
+
+    @ApiModelProperty(value = "行业大类")
+    @Length(max = 20, message = "行业大类最大长度为20")
+    private String tradeParentId;
+
+    @ApiModelProperty(value = "行业小类")
+    @Length(max = 20, message = "行业小类最大长度为20")
+    private String tradeId;
+
+    @ApiModelProperty(value = "省id")
+    private Long provinceRegionId;
+
+    @ApiModelProperty(value = "市id")
+    private Long cityRegionId;
+
+    @ApiModelProperty(value = "区id")
+    private Long areaId;
+
+    @ApiModelProperty(value = "详细地址")
+    @Length(max = 100, message = "详细地址最大长度为100")
+    private String address;
+
+    @ApiModelProperty(value = "客户关系")
+    @Length(max = 20, message = "客户关系最大长度为20")
+    private String rela;
+
+    @ApiModelProperty(value = "客户来源")
+    @Length(max = 20, message = "客户来源最大长度为20")
+    private String resource;
+
+    @ApiModelProperty(value = "联系人名称")
+    @Length(max = 20, message = "联系人名称最大长度为20")
+    private String linkName;
+
+    @ApiModelProperty(value = "联系人职务")
+    @Length(max = 20, message = "联系人职务最大长度为20")
+    private String linkJob;
+
+    @ApiModelProperty(value = "联系人部门")
+    @Length(max = 20, message = "联系人部门最大长度为20")
+    private String linkDepartment;
+
+    @ApiModelProperty(value = "微信")
+    @Length(max = 50, message = "微信最大长度为50")
+    private String weXin;
+
+    @ApiModelProperty(value = "联系人角色")
+    @Length(max = 20, message = "联系人角色最大长度为20")
+    private String linkRole;
+
+    @ApiModelProperty(value = "邮箱")
+    @Length(max = 50, message = "邮箱最大长度为50")
+    private String email;
+
+    @ApiModelProperty(value = "QQ")
+    @Length(max = 50, message = "QQ最大长度为50")
+    private String qq;
+}

+ 76 - 0
src/main/java/com/zfire/mall/manager/bean/config/FirstPartyCustomerManagementListVO.java

@@ -0,0 +1,76 @@
+package com.zfire.mall.manager.bean.config;
+
+import com.zfire.mall.manager.annotation.ZfireField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 11:15 星期三
+ */
+@Data
+public class FirstPartyCustomerManagementListVO {
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ApiModelProperty(value = "甲方客户名称")
+    private String name;
+
+    @ApiModelProperty(value = "上级客户")
+    private String parentName;
+
+    @ApiModelProperty(value = "客户规模")
+    private String scale;
+
+    @ApiModelProperty(value = "客户类型")
+    private String type;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty(value = "行业大类")
+    private String tradeParentName;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty(value = "行业小类")
+    private String tradeName;
+
+    @ApiModelProperty(value = "省")
+    private String provinceName;
+
+    @ApiModelProperty(value = "市")
+    private String cityName;
+
+    @ApiModelProperty(value = "区")
+    private String areaName;
+
+    @ApiModelProperty(value = "客户地址")
+    private String address;
+
+    @ApiModelProperty(value = "客户关系")
+    private String rela;
+
+    @ApiModelProperty(value = "客户来源")
+    private String resource;
+
+    @ApiModelProperty(value = "联系人")
+    private String linkName;
+
+    @ApiModelProperty(value = "联系人角色")
+    private String linkRole;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+}

+ 47 - 0
src/main/java/com/zfire/mall/manager/bean/config/MerchantLoginQuotaLimitAddParam.java

@@ -0,0 +1,47 @@
+package com.zfire.mall.manager.bean.config;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 11:03 星期三
+ */
+@Data
+public class MerchantLoginQuotaLimitAddParam {
+
+    @ApiModelProperty(value = "商家信息")
+    @NotBlank(message = "商家信息不能为空")
+    @Length(max = 50, message = "商家信息id最大长度为50")
+    private String customerId;
+
+    @ApiModelProperty(value = "商家编号")
+    @Length(max = 50, message = "商家编号最大长度为50")
+    @NotBlank(message = "商家编号不能为空")
+    private String customerNumber;
+
+    @ApiModelProperty(value = "工装登录名额限制")
+    @Min(value = 0,message = "工装登录名额限制最小为0")
+    @NotNull(message = "工装登录名额限制不能为空")
+    private Integer workLoginLimit;
+
+    @ApiModelProperty(value = "家装登录名额限制")
+    @Min(value = 0,message = "家装登录名额限制最小为0")
+    @NotNull(message = "家装登录名额限制不能为空")
+    private Integer homeLoginLimit;
+
+    @ApiModelProperty(value = "跨区登录名额限制")
+    @Min(value = 0,message = "跨区登录名额限制最小为0")
+    @NotNull(message = "跨区登录名额限制不能为空")
+    private Integer spanLoginLimit;
+
+    @ApiModelProperty(value = "启用状态")
+    @NotNull(message = "状态不能为空")
+    private Boolean state;
+}

+ 65 - 0
src/main/java/com/zfire/mall/manager/bean/config/MerchantLoginQuotaLimitDetailVO.java

@@ -0,0 +1,65 @@
+package com.zfire.mall.manager.bean.config;
+
+import com.zfire.mall.manager.annotation.ZfireField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 10:57 星期三
+ */
+@Data
+public class MerchantLoginQuotaLimitDetailVO {
+
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ApiModelProperty(value = "商家信息Id")
+    private String customerId;
+
+    @ApiModelProperty(value = "商家编号")
+    private String customerNumber;
+
+    @ApiModelProperty(value = "工装登录名额限制")
+    private Integer workLoginLimit;
+
+    @ApiModelProperty(value = "家装登录名额限制")
+    private Integer homeLoginLimit;
+
+    @ApiModelProperty(value = "跨区登录名额限制")
+    private Integer spanLoginLimit;
+
+    @ApiModelProperty(value = "实际工装登录名额限制")
+    private Integer actuallyWorkLoginLimit;
+
+    @ApiModelProperty(value = "实际家装登录名额限制")
+    private Integer actuallyHomeLoginLimit;
+
+    @ApiModelProperty(value = "实际跨区登录名额限制")
+    private Integer actuallySpanLoginLimit;
+
+    @ApiModelProperty(value = "启用状态")
+    private Boolean state;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "创建人名称")
+    private String createName;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "更新人名称")
+    private String updateName;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+}

+ 45 - 0
src/main/java/com/zfire/mall/manager/bean/config/MerchantLoginQuotaLimitEditParam.java

@@ -0,0 +1,45 @@
+package com.zfire.mall.manager.bean.config;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 11:02 星期三
+ */
+@Data
+public class MerchantLoginQuotaLimitEditParam {
+
+    @NotBlank(message = "id不能为空")
+    @Length(max = 50, message = "id最大长度为50")
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ApiModelProperty(value = "商家信息")
+    @Length(max = 50, message = "商家信息id最大长度为64")
+    private String customerId;
+
+    @ApiModelProperty(value = "商家编号")
+    @Length(max = 50, message = "商家编号最大长度为50")
+    private String customerNumber;
+
+    @ApiModelProperty(value = "工装登录名额限制")
+    @Min(value = 0,message = "工装登录名额限制最小为0")
+    private Integer workLoginLimit;
+
+    @ApiModelProperty(value = "家装登录名额限制")
+    @Min(value = 0,message = "家装登录名额限制最小为0")
+    private Integer homeLoginLimit;
+
+    @ApiModelProperty(value = "跨区登录名额限制")
+    @Min(value = 0,message = "跨区登录名额限制最小为0")
+    private Integer spanLoginLimit;
+
+    @ApiModelProperty(value = "启用状态")
+    private Boolean state;
+}

+ 64 - 0
src/main/java/com/zfire/mall/manager/bean/config/MerchantLoginQuotaLimitListVO.java

@@ -0,0 +1,64 @@
+package com.zfire.mall.manager.bean.config;
+
+import com.zfire.mall.manager.annotation.ZfireField;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 10:49 星期三
+ */
+
+@Data
+@ZfireField(tbName = "a")
+public class MerchantLoginQuotaLimitListVO {
+
+    @ZfireField(hide = true)
+    private String id;
+
+    @ZfireField(tbName = "b", colName = "name")
+    @ApiModelProperty(value = "商家信息")
+    private String customerName;
+
+    @ApiModelProperty(value = "商家编号")
+    private String customerNumber;
+
+    @ApiModelProperty(value = "工装登录名额数量")
+    private Integer workLoginLimit;
+
+    @ApiModelProperty(value = "家装登录名额数量")
+    private Integer homeLoginLimit;
+
+    @ApiModelProperty(value = "跨区登录名额数量")
+    private Integer spanLoginLimit;
+
+    @ApiModelProperty(value = "实际工装登录名额数量")
+    private Integer actuallyWorkLoginLimit;
+
+    @ApiModelProperty(value = "实际家装登录名额数量")
+    private Integer actuallyHomeLoginLimit;
+
+    @ApiModelProperty(value = "实际跨区登录名额数量")
+    private Integer actuallySpanLoginLimit;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "创建人账号")
+    private String createName;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "更新人账号")
+    private String updateName;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+}

+ 31 - 0
src/main/java/com/zfire/mall/manager/bean/config/TradeConfigAddParam.java

@@ -0,0 +1,31 @@
+package com.zfire.mall.manager.bean.config;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 13:50 星期三
+ */
+@Data
+public class TradeConfigAddParam {
+
+    @ApiModelProperty(value = "分类名称")
+    @Length(max = 50, message = "分类名称最大长度为50")
+    @NotBlank(message = "分类名称不能为空")
+    private String name;
+
+    @ApiModelProperty(value = "上级id, 为空或者0既是顶级")
+    @Length(max = 50, message = "上级id最大长度为50")
+    private String parentId;
+
+    @NotNull(message = "状态不能为空")
+    @ApiModelProperty(value = "状态 true=启用 false=停用")
+    private Boolean state;
+
+}

+ 34 - 0
src/main/java/com/zfire/mall/manager/bean/config/TradeConfigEditParam.java

@@ -0,0 +1,34 @@
+package com.zfire.mall.manager.bean.config;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 13:50 星期三
+ */
+
+@Data
+public class TradeConfigEditParam {
+
+    @NotBlank(message = "id不能为空")
+    @Length(max = 50, message = "id最大长度为50")
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ApiModelProperty(value = "分类名称")
+    @Length(max = 50, message = "分类名称最大长度为50")
+    private String name;
+
+    @ApiModelProperty(value = "上级id, 为空或者0既是顶级")
+    @Length(max = 50, message = "上级id最大长度为50")
+    private String parentId;
+
+    @ApiModelProperty(value = "状态 true=启用 false=停用")
+    private Boolean state;
+
+}

+ 26 - 0
src/main/java/com/zfire/mall/manager/bean/config/TradeConfigListLevelParam.java

@@ -0,0 +1,26 @@
+package com.zfire.mall.manager.bean.config;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.Min;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 16:55 星期三
+ */
+@Data
+public class TradeConfigListLevelParam {
+    @ApiModelProperty("分类名称搜索")
+    @Length(max = 50, message = "最大长度为50")
+    private String keyword;
+
+    @ApiModelProperty("第几页")
+    @Min(value = 1, message = "页数最小为1")
+    private Long pageNum = 1L;
+
+    @ApiModelProperty("页大小")
+    private Long pageSize = 10L;
+}

+ 52 - 0
src/main/java/com/zfire/mall/manager/bean/config/TradeConfigListLevelVO.java

@@ -0,0 +1,52 @@
+package com.zfire.mall.manager.bean.config;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 13:50 星期三
+ */
+@Data
+public class TradeConfigListLevelVO {
+
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ApiModelProperty(value = "分类名称")
+    private String name;
+
+    @ApiModelProperty(value = "上级id, 为空或者0既是顶级")
+    private String parentId;
+
+    @ApiModelProperty(value = "上级名称")
+    private String parentName;
+
+    @ApiModelProperty(value = "状态 true=启用 false=停用")
+    private Boolean state;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "创建人账号")
+    private String createName;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "更新人账号")
+    private String updateName;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "子级列表")
+    private List<TradeConfigListLevelVO> childList;
+}

+ 30 - 0
src/main/java/com/zfire/mall/manager/bean/config/TradeConfigListParam.java

@@ -0,0 +1,30 @@
+package com.zfire.mall.manager.bean.config;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.Min;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 16:55 星期三
+ */
+@Data
+public class TradeConfigListParam {
+    @ApiModelProperty("分类名称搜索")
+    @Length(max = 50, message = "最大长度为50")
+    private String keyword;
+
+    @ApiModelProperty("父级id, 为空或者0既是查询顶级")
+    @Length(max = 50, message = "最大长度为50")
+    private String parentId;
+
+    @ApiModelProperty("第几页")
+    @Min(value = 1, message = "页数最小为1")
+    private Long pageNum;
+
+    @ApiModelProperty("页大小")
+    private Long pageSize;
+}

+ 48 - 0
src/main/java/com/zfire/mall/manager/bean/config/TradeConfigListVO.java

@@ -0,0 +1,48 @@
+package com.zfire.mall.manager.bean.config;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author qinrongjun
+ * @description
+ * @date 2023/7/26 13:50 星期三
+ */
+@Data
+public class TradeConfigListVO {
+
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ApiModelProperty(value = "分类名称")
+    private String name;
+
+    @ApiModelProperty(value = "上级id, 为空或者0既是顶级")
+    private String parentId;
+
+    @ApiModelProperty(value = "上级名称")
+    private String parentName;
+
+    @ApiModelProperty(value = "状态 true=启用 false=停用")
+    private Boolean state;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "创建人账号")
+    private String createName;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "更新人账号")
+    private String updateName;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+}

+ 22 - 0
src/main/java/com/zfire/mall/manager/bean/customer/CustomerProductTypeRelaBean.java

@@ -0,0 +1,22 @@
+package com.zfire.mall.manager.bean.customer;
+
+import com.zfire.mall.manager.plus.entity.CustomerProductTypeRela;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class CustomerProductTypeRelaBean extends CustomerProductTypeRela {
+
+    @ApiModelProperty("一级部门id")
+    private String adminWebsitId1;
+    @ApiModelProperty("二级部门id")
+    private String adminWebsitId2;
+    @ApiModelProperty("三级部门id")
+    private String adminWebsitId3;
+
+    @ApiModelProperty("金蝶部门名称")
+    private String k3OrgName;
+
+}

+ 53 - 0
src/main/java/com/zfire/mall/manager/bean/direct/DirectTransferList.java

@@ -0,0 +1,53 @@
+package com.zfire.mall.manager.bean.direct;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel
+@Data
+public class DirectTransferList {
+
+    @ApiModelProperty("发货单号")
+    private String deliverNo;
+    @ApiModelProperty("发货日期")
+    private String deliverDate;
+    @ApiModelProperty("仓库名称")
+    private String correspondName;
+    @ApiModelProperty("订单类型 TRADE=商用 HOME=家用 RETAIL=零售单 RETAIL_POLICY 销售政策单")
+    private String orderType;
+    @ApiModelProperty("订单号")
+    private String orderNo;
+    @ApiModelProperty("经销商名称")
+    private String customerName;
+    @ApiModelProperty("产品名")
+    private String materialName;
+    @ApiModelProperty("规格型号")
+    private String specification;
+    @ApiModelProperty("计量单位")
+    private String unit;
+    @ApiModelProperty("单价")
+    private BigDecimal price;
+    @ApiModelProperty("直调数量")
+    private Integer qty;
+    @ApiModelProperty("价税合计")
+    private BigDecimal mustTotalAmount;
+    @ApiModelProperty("无税单价")
+    private BigDecimal afterTaxPrice;
+    @ApiModelProperty("无税金额")
+    private BigDecimal noTaxTotalAmount;
+    @ApiModelProperty("单个商品的押金金额")
+    private BigDecimal singleDepositAmount;
+    @ApiModelProperty("总押金金额")
+    private BigDecimal totalDepositAmount;
+    @ApiModelProperty("备注")
+    private String remark;
+    @ApiModelProperty("制表人")
+    private String createBy;
+    @ApiModelProperty("制表日期")
+    private Date createTime;
+
+}

+ 23 - 0
src/main/java/com/zfire/mall/manager/bean/direct/DirectTransferOrderBean.java

@@ -0,0 +1,23 @@
+package com.zfire.mall.manager.bean.direct;
+
+import com.zfire.mall.manager.plus.entity.DirectTransferOrder;
+import com.zfire.mall.manager.plus.entity.DirectTransferOrderItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class DirectTransferOrderBean extends DirectTransferOrder {
+
+    @ApiModelProperty("仓库名称")
+    private String correspondName;
+    @ApiModelProperty("仓位名称")
+    private String stockName;
+    @ApiModelProperty("明细")
+    private List<DirectTransferOrderItem> items;
+
+}

+ 30 - 0
src/main/java/com/zfire/mall/manager/bean/direct/SysDictBean.java

@@ -0,0 +1,30 @@
+package com.zfire.mall.manager.bean.direct;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * @author change
+ */
+@ApiModel
+@Data
+public class SysDictBean  {
+
+
+    @ApiModelProperty(value = "字典名称")
+    private String dictCode;
+
+    @ApiModelProperty(value = "字典值")
+    private String dictValue;
+
+
+}

+ 35 - 0
src/main/java/com/zfire/mall/manager/bean/displace/order/DisplaceBean.java

@@ -0,0 +1,35 @@
+package com.zfire.mall.manager.bean.displace.order;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@ApiModel
+@Data
+public class DisplaceBean {
+
+    @ApiModelProperty("置换方式 1=订单置换 2=批量置换")
+    private Integer type;
+    @ApiModelProperty("置换成的商品的物料ids")
+    private List<String> newMaterialIds;
+    @ApiModelProperty("销售类型ID")
+    private String saleTypeId;
+    @ApiModelProperty("置换单价")
+    private BigDecimal newPrice;
+    @ApiModelProperty("格力折扣")
+    private BigDecimal newDiscAmount;
+    @ApiModelProperty("价格类型id")
+    private String priceTypeId;
+    @ApiModelProperty("现金钱包id")
+    private String waleltId;
+    @ApiModelProperty("返利钱包id")
+    private String walletId2;
+
+    @ApiModelProperty("被置换的订单明细")
+    private List<DisplaceNumBean> orderItems;
+
+
+}

+ 23 - 0
src/main/java/com/zfire/mall/manager/bean/displace/order/DisplaceNumBean.java

@@ -0,0 +1,23 @@
+package com.zfire.mall.manager.bean.displace.order;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@ApiModel
+@Data
+public class DisplaceNumBean{
+
+    @ApiModelProperty("订单号")
+    private String orderId;
+    @ApiModelProperty("订单明细id")
+    private String orderItemId;
+    @ApiModelProperty("置换数量")
+    private Integer displaceQty;
+    @ApiModelProperty("1=同价置换 2=非同价置换")
+    private Integer flag;
+//    @ApiModelProperty("可置换新机型的单价")
+//    private BigDecimal newMaterialPrice;
+}

+ 299 - 0
src/main/java/com/zfire/mall/manager/bean/displace/order/DisplaceOrderBean.java

@@ -0,0 +1,299 @@
+package com.zfire.mall.manager.bean.displace.order;
+
+import cn.hutool.core.collection.CollectionUtil;
+import cn.hutool.core.date.DateUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.zfire.mall.manager.bean.admin.AdminUserCom;
+import com.zfire.mall.manager.bean.wallet.CustomerWalletBean;
+import com.zfire.mall.manager.enums.OrderTypeEnum;
+import com.zfire.mall.manager.exception.RemoteServiceException;
+import com.zfire.mall.manager.logic.customer.CustomerEnginDepositLogic;
+import com.zfire.mall.manager.logic.wallet.WalletLogic;
+import com.zfire.mall.manager.plus.entity.*;
+import com.zfire.mall.manager.plus.service.EnginOrderItemService;
+import com.zfire.mall.manager.plus.service.RetailOrderItemService;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class DisplaceOrderBean extends DisplaceOrder {
+
+    @ApiModelProperty(value = "审批结果 0=驳回 1=通过")
+    private boolean examineResult = false;
+
+    @ApiModelProperty(value = "退订说明")
+    private String refundNote;
+
+    @ApiModelProperty(value = "置换单明细")
+    List<DisplaceOrderItem> items;
+    @ApiModelProperty(value = "订单原明细")
+    List<DisplaceOrderOriginItem> originItems;
+
+    public void handleRetailOrderInfo(RetailOrder retailOrder, List<RetailOrderItem> retailOrderItems) {
+        this.setAdminCompanyId(retailOrder.getAdminCompanyId())
+                .setCustomerId(retailOrder.getCustomerId())
+                .setCustomerName(retailOrder.getCustomerName())
+                .setOrderType(retailOrder.getType() == 1 ? OrderTypeEnum.RETAIL.getKey() : OrderTypeEnum.RETAIL_POLICY.getKey())
+                .setOrderNo(retailOrder.getId())
+                .setOrderDate(DateUtil.date())
+                .setPolicyId(retailOrder.getPolicyId())
+                .setPolicyCode(retailOrder.getPolicyCode())
+                .setPolicyTitle(retailOrder.getPolicyTitle())
+                .setPolicyRemark(retailOrder.getPolicyRemark())
+//                .setServiceId(retailOrder.getServiceId())
+//                .setServiceName(retailOrder.getServiceName())
+        ;
+
+        List<DisplaceOrderOriginItem> originItems = new ArrayList<>();
+        for (RetailOrderItem retailOrderItem : retailOrderItems) {
+            DisplaceOrderOriginItem displaceOrderOriginItem = new DisplaceOrderOriginItem();
+            displaceOrderOriginItem.setRefId(retailOrderItem.getId())
+                    .setOrderNo(retailOrder.getId())
+                    .setSaleTypeId(retailOrderItem.getSaleTypeId())
+                    .setSaleTypeCode(retailOrderItem.getSaleTypeCode())
+                    .setSaleTypeName(retailOrderItem.getSaleTypeName())
+                    .setMaterialId(retailOrderItem.getMaterialId())
+                    .setMaterialNumber(retailOrderItem.getMaterialCode())
+                    .setMaterialOldNumber(retailOrderItem.getMaterialOldNumber())
+                    .setMaterialName(retailOrderItem.getMaterialName())
+                    .setSpecification(retailOrderItem.getSpecification())
+                    .setUnit(retailOrderItem.getUnit())
+                    .setPrice(retailOrderItem.getPrice())
+                    .setQty(retailOrderItem.getQty())
+                    .setRebateRate(retailOrderItem.getRebateRate())
+                    .setCustomerWalletId(retailOrderItem.getCustomerWalletId())
+                    .setCustomerWalletName(retailOrderItem.getCustomerWalletName())
+                    .setCustomerWalletId2(retailOrderItem.getCustomerWalletId2())
+                    .setCustomerWalletName2(retailOrderItem.getCustomerWalletName2())
+                    .setDiscAmount(retailOrderItem.getDiscAmount())
+                    .setTotalDiscAmount(retailOrderItem.getTotalDiscAmount())
+                    .setTotalAmount(retailOrderItem.getTotalAmount())
+                    .setSingleRebateAmount(retailOrderItem.getSingleRebateAmount())
+                    .setSinglePayPrice(retailOrderItem.getSinglePayPrice())
+                    .setPayAmount(retailOrderItem.getPayAmount())
+                    .setPayRebateAmount(retailOrderItem.getPayRebateAmount())
+                    .setTax(retailOrderItem.getTax())
+                    .setRemark(retailOrderItem.getRemark())
+                    .setDisplaceQty(0)
+                    .setRefundableQty(retailOrderItem.getRefundableQty());
+            originItems.add(displaceOrderOriginItem);
+        }
+        this.setOriginItems(originItems);
+    }
+
+    public void handleEnginOrderInfo(EnginOrder enginOrder, List<EnginOrderItem> enginOrderItems) {
+        this.setAdminCompanyId(enginOrder.getAdminCompanyId())
+                .setCustomerId(enginOrder.getCustomerId())
+                .setCustomerName(enginOrder.getCustomerName())
+                .setOrderType(enginOrder.getEnginOrderType())
+                .setOrderNo(enginOrder.getEnginOrderNo())
+                .setOrderDate(DateUtil.date())
+                .setEnginRecordNo(enginOrder.getRefEnginRecordNo())
+                .setProjectNo(enginOrder.getRefProjectNo())
+                .setProjectName(enginOrder.getRefProjectName())
+                .setUseUnit(enginOrder.getRefUseUnit())
+                .setInstallAddress(enginOrder.getRefInstallAddress())
+                .setTakeDeposit(enginOrder.getTakeDeposit());
+
+        List<DisplaceOrderOriginItem> originItems = new ArrayList<>();
+        for (EnginOrderItem enginOrderItem : enginOrderItems) {
+            DisplaceOrderOriginItem displaceOrderOriginItem = new DisplaceOrderOriginItem();
+            displaceOrderOriginItem.setRefId(enginOrderItem.getId())
+                    .setOrderNo(enginOrder.getEnginOrderNo())
+                    .setSaleTypeId(enginOrderItem.getSaleTypeId())
+                    .setSaleTypeCode(enginOrderItem.getSaleTypeCode())
+                    .setSaleTypeName(enginOrderItem.getSaleTypeName())
+                    .setMaterialId(enginOrderItem.getMaterialId())
+                    .setMaterialNumber(enginOrderItem.getMaterialNumber())
+                    .setMaterialOldNumber(enginOrderItem.getMaterialOldNumber())
+                    .setMaterialName(enginOrderItem.getMaterialName())
+                    .setSpecification(enginOrderItem.getSpecification())
+                    .setUnit(enginOrderItem.getUnit())
+                    .setPrice(enginOrderItem.getPrice())
+                    .setQty(enginOrderItem.getQty())
+                    .setRebateRate(enginOrderItem.getRebateRate())
+                    .setCustomerWalletId(enginOrderItem.getCustomerWalletId())
+                    .setCustomerWalletName(enginOrderItem.getCustomerWalletName())
+                    .setCustomerWalletId2(enginOrderItem.getCustomerWalletId2())
+                    .setCustomerWalletName2(enginOrderItem.getCustomerWalletName2())
+                    .setDiscAmount(enginOrderItem.getDiscAmount())
+                    .setTotalDiscAmount(enginOrderItem.getTotalDiscAmount())
+                    .setTotalAmount(enginOrderItem.getTotalAmount())
+                    .setSingleRebateAmount(enginOrderItem.getSingleRebateAmount())
+                    .setSinglePayPrice(enginOrderItem.getSinglePayPrice())
+                    .setPayAmount(enginOrderItem.getPayAmount())
+                    .setPayRebateAmount(enginOrderItem.getPayRebateAmount())
+                    .setTax(enginOrderItem.getTax())
+                    .setRemark(enginOrderItem.getRemark())
+                    .setDisplaceQty(0)
+                    .setRefundableQty(enginOrderItem.getRefundableQty());
+            originItems.add(displaceOrderOriginItem);
+        }
+        this.setOriginItems(originItems);
+    }
+
+    public DisplaceOrder handleAddOrderInfo(AdminUserCom adminUser) {
+        DisplaceOrder displaceOrder = new DisplaceOrder();
+        BeanUtils.copyProperties(this, displaceOrder);
+        displaceOrder.setCreateName(adminUser.getNickName())
+                .setUpdateName(adminUser.getNickName());
+        return displaceOrder;
+    }
+
+    public void handleAddOriginItem() {
+        if (CollectionUtil.isEmpty(this.originItems)) {
+            throw new RemoteServiceException("置换的原产品明细不能为空");
+        }
+        for (DisplaceOrderOriginItem originItem : this.originItems) {
+            if (StringUtils.isBlank(originItem.getRefId())) {
+                throw new RemoteServiceException("原单订单" + originItem.getMaterialName() + "产品缺唯一标记");
+            }
+            originItem.setParentId(this.getDisplaceOrderId())
+                    .setOrderNo(this.getOrderNo());
+        }
+    }
+
+    public void handleAddOrderItem(WalletLogic walletLogic, CustomerEnginDepositLogic customerEnginDepositLogic) {
+        if (CollectionUtil.isEmpty(this.items)) {
+            throw new RemoteServiceException("置换的产品明细不能为空");
+        }
+
+        //查询钱包名称
+        List<CustomerWalletBean> customerWalletBeans = walletLogic.queryWalletByCustomerId(this.getCustomerId(), null);
+        Map<String, CustomerWalletBean> walletMap = customerWalletBeans.stream()
+                .collect(Collectors.toMap(CustomerWalletBean::getCustomerWalletId, v -> v));
+
+        BigDecimal depositRate = this.queryOrderTakeDeposit(customerEnginDepositLogic);
+        BigDecimal zero = new BigDecimal("0");
+        int depositCompare = depositRate.compareTo(zero);
+
+        for (int i = 0; i < this.items.size(); i++) {
+            DisplaceOrderItem item = this.items.get(i);
+            if (StringUtils.isBlank(item.getSaleTypeId())) {
+                throw new RemoteServiceException("第" + (i+1) + "行置换的产品销售类型不能为空");
+            }
+            if (StringUtils.isBlank(item.getMaterialId())) {
+                throw new RemoteServiceException("第" + (i+1) + "行置换的产品不能为空");
+            }
+            if (Objects.isNull(item.getQty()) || item.getQty() < 1) {
+                throw new RemoteServiceException("第" + (i+1) + "行置换的产品数量不能少于1");
+            }
+            if (Objects.isNull(item.getPrice())) {
+                throw new RemoteServiceException("第" + (i+1) + "行置换的产品单价不能为空");
+            }
+
+            // 现金钱包
+            CustomerWalletBean amountCustomerWallet = walletMap.get(item.getCustomerWalletId());
+            // 返利钱包
+            CustomerWalletBean rebateCustomerWallet = walletMap.get(item.getCustomerWalletId2());
+            if(amountCustomerWallet == null){
+                throw new RemoteServiceException("请选择现金钱包");
+            }
+            // 单价
+            BigDecimal price = item.getPrice();
+            // 折扣价
+            BigDecimal discAmount = Objects.isNull(item.getDiscAmount()) ? BigDecimal.valueOf(0) : item.getDiscAmount();
+            // 数量
+            BigDecimal qty = BigDecimal.valueOf(item.getQty());
+            // 总价
+            BigDecimal totalAmount = price.multiply(qty);
+            // 总返利价格
+            BigDecimal totalRebateAmount = new BigDecimal(0);
+            if(rebateCustomerWallet != null) {
+                List<WalletRebateSaleType> walletRebateSaleTypes = rebateCustomerWallet.getWalletRaleTypes().stream()
+                        .filter(v -> v.getSaleTypeId().equals(item.getSaleTypeId())).collect(Collectors.toList());
+                if(CollectionUtils.isEmpty(walletRebateSaleTypes)){
+                    throw new RemoteServiceException("返利钱包不符合销售类型");
+                }
+                item.setRebateRate(walletRebateSaleTypes.get(0).getRebateRate());
+                totalRebateAmount = item.getRebateRate().multiply(totalAmount);
+            }
+            // 总折扣价格
+            BigDecimal totalDiscAmount = discAmount.multiply(qty);
+            // 实际使用返利金额
+            BigDecimal payRebateAmount = totalRebateAmount;
+            if(rebateCustomerWallet != null && rebateCustomerWallet.getAmount().doubleValue() < totalRebateAmount.doubleValue()){
+                payRebateAmount = rebateCustomerWallet.getAmount();
+            }
+            //实际支付价格
+            BigDecimal payAmount = totalAmount
+                    .subtract(totalDiscAmount)
+                    .subtract(payRebateAmount);
+
+            item.setParentId(this.getDisplaceOrderId());
+            item.setOrderNo(this.getOrderNo());
+            item.setCustomerWalletName(amountCustomerWallet.getName());
+            item.setCustomerWalletNumber(amountCustomerWallet.getWalletNumber());
+            if(rebateCustomerWallet != null) {
+                item.setCustomerWalletName2(rebateCustomerWallet.getName());
+            }
+            item.setTotalAmount(totalAmount);
+            item.setRebateAmount(totalRebateAmount.doubleValue() < 0?BigDecimal.valueOf(0) : totalRebateAmount);
+            item.setPayAmount(payAmount.doubleValue() < 0 ? BigDecimal.valueOf(0):payAmount);
+            item.setTotalDiscAmount(totalDiscAmount);
+            item.setPayRebateAmount(payRebateAmount);
+            item.setSingleRebateAmount(payRebateAmount.divide(qty,6, RoundingMode.HALF_UP));
+            item.setSinglePayPrice(item.getPayAmount().divide(qty,6, RoundingMode.HALF_UP));
+            item.setRefundableQty(item.getQty());
+            // 计算产品押金比例
+            item.setDepositRate(depositRate);
+            item.setSingleDepositAmount(depositCompare >= 0 ? item.getSinglePayPrice().multiply(depositRate) : zero);
+            item.setTotalDepositAmount(depositCompare >= 0 ? item.getSingleDepositAmount().multiply(qty) : zero);
+
+            item.setOrderNo(this.getOrderNo());
+        }
+    }
+
+    private BigDecimal queryOrderTakeDeposit(CustomerEnginDepositLogic customerEnginDepositLogic) {
+        if (Objects.nonNull(this.getTakeDeposit()) && !this.getTakeDeposit()) {
+            // 查询押金比例
+            return customerEnginDepositLogic.findCustomerDepositRate(this.getCustomerId());
+        }
+        return new BigDecimal("0");
+    }
+
+    public void updOriginRefundableQty(RetailOrderItemService retailOrderItemService,
+                                       EnginOrderItemService enginOrderItemService, DisplaceOrderOriginItem item) {
+        String orderNo = item.getOrderNo();
+        if (orderNo.contains("LS")
+                || orderNo.contains("ZC")) {
+            RetailOrderItem retailOrderItem = retailOrderItemService.lambdaQuery()
+                    .eq(RetailOrderItem::getId, item.getRefId())
+                    .eq(RetailOrderItem::getMaterialId, item.getMaterialId())
+                    .eq(RetailOrderItem::getSaleTypeId, item.getSaleTypeId())
+                    .one();
+            if (retailOrderItem.getRefundableQty() - item.getDisplaceQty() < 0) {
+                throw new RemoteServiceException("原单订单" + item.getMaterialName() + "产品可退置换数量不足");
+            }
+
+            retailOrderItem.setRefundableQty(retailOrderItem.getRefundableQty() - item.getDisplaceQty());
+            retailOrderItem.updateById();
+        } else {
+            EnginOrderItem enginOrderItem = enginOrderItemService.lambdaQuery()
+                    .eq(EnginOrderItem::getId, item.getRefId())
+                    .eq(EnginOrderItem::getMaterialId, item.getMaterialId())
+                    .eq(EnginOrderItem::getSaleTypeId, item.getSaleTypeId())
+                    .one();
+            if (enginOrderItem.getRefundableQty() - item.getDisplaceQty() < 0) {
+                throw new RemoteServiceException("原单订单" + item.getMaterialName() + "产品可退置换数量不足");
+            }
+
+            enginOrderItem.setRefundableQty(enginOrderItem.getRefundableQty() - item.getDisplaceQty());
+            enginOrderItem.updateById();
+        }
+    }
+}

+ 45 - 0
src/main/java/com/zfire/mall/manager/bean/displace/order/DisplaceOrderInfo.java

@@ -0,0 +1,45 @@
+package com.zfire.mall.manager.bean.displace.order;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel
+public class DisplaceOrderInfo {
+
+    @ApiModelProperty(value = "置换单编号")
+    private String displaceOrderId;
+
+    @ApiModelProperty(value = "订单日期")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date orderDate;
+
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialNumber;
+
+    @ApiModelProperty(value = "金蝶物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "金蝶物料旧编码")
+    private String materialOldNumber;
+
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price = new BigDecimal("0");
+
+    @ApiModelProperty(value = "数量")
+    private Integer qty = 0;
+
+    @ApiModelProperty(value = "总押金金额")
+    private BigDecimal totalDepositAmount;
+}

+ 106 - 0
src/main/java/com/zfire/mall/manager/bean/displace/order/DisplaceOrderListBean.java

@@ -0,0 +1,106 @@
+package com.zfire.mall.manager.bean.displace.order;
+
+import com.zfire.mall.manager.plus.entity.DisplaceOrder;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+@Data
+@ApiModel
+public class DisplaceOrderListBean extends DisplaceOrder {
+
+    @ApiModelProperty(value = "销售类型id")
+    private String saleTypeId;
+
+    @ApiModelProperty(value = "销售类型编码")
+    private String saleTypeCode;
+
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleTypeName;
+
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ApiModelProperty(value = "金蝶物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialNumber;
+
+    @ApiModelProperty(value = "金蝶物料旧编码")
+    private String materialOldNumber;
+
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "数量")
+    private Integer qty;
+
+    @ApiModelProperty(value = "折扣金额")
+    private BigDecimal discAmount;
+
+    @ApiModelProperty(value = "总折扣金额")
+    private BigDecimal totalDiscAmount;
+
+    @ApiModelProperty(value = "订单金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty(value = "返利钱包的返利比例")
+    private BigDecimal rebateRate;
+
+    @ApiModelProperty(value = "返利金额")
+    private BigDecimal rebateAmount;
+
+    @ApiModelProperty(value = "押金比例")
+    private BigDecimal depositRate;
+
+    @ApiModelProperty(value = "经销商现金钱包id")
+    private String customerWalletId;
+
+    @ApiModelProperty(value = "经销商现金钱包名称")
+    private String customerWalletName;
+
+    @ApiModelProperty(value = "经销商返利钱包id")
+    private String customerWalletId2;
+
+    @ApiModelProperty(value = "经销商返利钱包名称")
+    private String customerWalletName2;
+
+    @ApiModelProperty(value = "单个商品的返利金额(实际扣除的返利金额/qty)")
+    private BigDecimal singleRebateAmount;
+
+    @ApiModelProperty(value = "单个商品的实际支付金额(实际支付金额/qty)")
+    private BigDecimal singlePayPrice;
+
+    @ApiModelProperty(value = "单个商品的押金金额(单个商品的实际支付金额*押金比例)")
+    private BigDecimal singleDepositAmount;
+
+    @ApiModelProperty(value = "实付金额(订单金额-返利金额-折扣金额-不够扣的返利金额)")
+    private BigDecimal payAmount;
+
+    @ApiModelProperty(value = "实际扣除的返利金额")
+    private BigDecimal payRebateAmount;
+
+    @ApiModelProperty(value = "总押金金额")
+    private BigDecimal totalDepositAmount;
+
+    @ApiModelProperty(value = "税率例如: 0.13")
+    private BigDecimal tax;
+
+    @ApiModelProperty(value = "已发货数量")
+    private Integer hasSendQty;
+
+    @ApiModelProperty(value = "可退数量")
+    private Integer refundableQty;
+
+    @ApiModelProperty(value = "已退数量")
+    private Integer retiredQty;
+}

+ 76 - 0
src/main/java/com/zfire/mall/manager/bean/engin/deposit/CustomerEnginDeposit.java

@@ -0,0 +1,76 @@
+package com.zfire.mall.manager.bean.engin.deposit;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "CustomerEnginDeposit对象", description = "经销商工程机押金比例配置")
+public class CustomerEnginDeposit extends Model<CustomerEnginDeposit> {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.ID_WORKER_STR)
+    private String id;
+
+    @ApiModelProperty(value = "帐号id")
+    private String adminUserId;
+
+    @ApiModelProperty(value = "经销商编号")
+    private String customerNumber;
+
+    @ApiModelProperty(value = "经销商id")
+    private String customerId;
+
+    @ApiModelProperty(value = "经销商名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "押金比例 例如: 0.1 非百分比")
+    private BigDecimal rate;
+
+    @ApiModelProperty(value = "定额押金")
+    private BigDecimal amount;
+
+    @ApiModelProperty(value = "开始时间")
+    private Date startTime;
+
+    @ApiModelProperty(value = "结束时间")
+    private Date endTime;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    private String adminCompanyId;
+
+    @TableField(fill = FieldFill.DEFAULT)
+    private Date createTime;
+
+    @TableField(fill = FieldFill.DEFAULT)
+    private String createBy;
+
+    @TableField(fill = FieldFill.UPDATE)
+    private Date updateTime;
+
+    @TableField(fill = FieldFill.UPDATE)
+    private String updateBy;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+}
+

+ 27 - 0
src/main/java/com/zfire/mall/manager/bean/engin/deposit/CustomerEnginDepositBean.java

@@ -0,0 +1,27 @@
+package com.zfire.mall.manager.bean.engin.deposit;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.zfire.mall.manager.plus.entity.CustomerEnginDeposit;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class CustomerEnginDepositBean extends CustomerEnginDeposit {
+
+    @ApiModelProperty(value = "当前时间状态 :未开始,生效中,已结束")
+    private String currentStatus;
+
+}
+

+ 146 - 0
src/main/java/com/zfire/mall/manager/bean/engin/deposit/DepositManageBean.java

@@ -0,0 +1,146 @@
+package com.zfire.mall.manager.bean.engin.deposit;
+
+import com.zfire.mall.manager.plus.entity.DepositManage;
+import com.zfire.mall.manager.plus.entity.DepositManageCheckRecord;
+import com.zfire.mall.manager.plus.entity.DepositManageData;
+import com.zfire.mall.manager.plus.entity.DepositManageItemCollect;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class DepositManageBean extends DepositManage {
+
+    @ApiModelProperty(value = "审批结果 0=驳回 1=通过")
+    private boolean examineResult = false;
+
+    @ApiModelProperty(value = "汇总明细")
+    List<DepositMangeItemBean> items;
+
+    @ApiModelProperty(value = "押金明细")
+    List<DepositManageItemCollect> collectList;
+
+    @ApiModelProperty(value = "工程资料")
+    List<DepositManageData> dataList;
+
+    @ApiModelProperty(value = "验收记录")
+    List<DepositManageCheckRecord> checkRecordItems;
+
+    private String id;
+
+    @ApiModelProperty(value = "押金管理id")
+    private String parentId;
+
+    @ApiModelProperty(value = "特价项目编号")
+    private String specialItemNo;
+
+    @ApiModelProperty(value = "厂编号")
+    private String factoryNo;
+
+    @ApiModelProperty(value = "特价编号")
+    private String specialNo;
+
+    @ApiModelProperty(value = "交单编号")
+    private String billNo;
+
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ApiModelProperty(value = "金蝶物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialNumber;
+
+    @ApiModelProperty(value = "金蝶物料旧编码")
+    private String materialOldNumber;
+
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ApiModelProperty(value = "实装金蝶物料id")
+    private String realMaterialId;
+
+    @ApiModelProperty(value = "实装金蝶物料名称")
+    private String realMaterialName;
+
+    @ApiModelProperty(value = "实装金蝶物料编码")
+    private String realMaterialNumber;
+
+    @ApiModelProperty(value = "实装金蝶物料旧编码")
+    private String realMaterialOldNumber;
+
+    @ApiModelProperty(value = "实装规格型号")
+    private String realSpecification;
+
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+    @ApiModelProperty(value = "单价")
+    private BigDecimal itemPrice;
+
+    @ApiModelProperty(value = "数量")
+    private Integer itemQty;
+
+    @ApiModelProperty(value = "税率例如: 0.13")
+    private BigDecimal tax;
+
+    @ApiModelProperty(value = "备注")
+    private String itemRemark;
+
+    @ApiModelProperty(value = "押金金额")
+    private BigDecimal itemDepositAmount;
+
+    @ApiModelProperty(value = "资料数量")
+    private Integer itemDataQty;
+
+    @ApiModelProperty(value = "收差金额")
+    private BigDecimal itemDiffAmount;
+
+    @ApiModelProperty(value = "押金数量")
+    private Integer hasSendQty;
+
+    @ApiModelProperty(value = "发货数量")
+    private Integer orderHasSendQty = 0;
+
+    @ApiModelProperty(value = "合同价格")
+    private Integer ItemContractQty;
+
+    @ApiModelProperty(value = "合同价格")
+    private BigDecimal ItemContractPrice;
+
+    @ApiModelProperty(value = "合同价格")
+    private BigDecimal ItemContractAmount;
+
+    @ApiModelProperty(value = "寄厂日期")
+    private Date mailFactoryDate;
+
+    @ApiModelProperty(value = "寄厂年度")
+    private String mailFactoryYear;
+
+    @ApiModelProperty(value = "确认日期")
+    private Date confirmDate;
+
+    @ApiModelProperty(value = "结算编号")
+    private Long settlementNo;
+
+    @ApiModelProperty(value = "结算日期")
+    private Date settlementDate;
+
+    @ApiModelProperty(value = "入厂日期")
+    private Date inFactoryDate;
+
+    @ApiModelProperty(value = "入厂类型")
+    private String inFactoryType;
+
+    @ApiModelProperty(value = "经销商现金钱包id")
+    private String customerWalletId;
+
+}

+ 67 - 0
src/main/java/com/zfire/mall/manager/bean/engin/deposit/DepositManageRecordBean.java

@@ -0,0 +1,67 @@
+package com.zfire.mall.manager.bean.engin.deposit;
+
+import com.zfire.mall.manager.plus.entity.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class DepositManageRecordBean extends DepositManageRecord {
+
+    private EnginOrderItem orderItem;
+
+    public void handleEnginOrderItem(EnginOrder enginOrder, EnginOrderItem orderItem, Integer depositQty, BigDecimal subDepositAmount) {
+        this.setRefEnginRecordNo(enginOrder.getRefEnginRecordNo())
+                .setOrderNo(enginOrder.getEnginOrderNo())
+                .setOrderDate(enginOrder.getOrderDate())
+                .setOrderType(enginOrder.getEnginOrderType())
+                .setSaleTypeId(orderItem.getSaleTypeId())
+                .setSaleTypeCode(orderItem.getSaleTypeCode())
+                .setSaleTypeName(orderItem.getSaleTypeName())
+                .setMaterialId(orderItem.getMaterialId())
+                .setMaterialNumber(orderItem.getMaterialNumber())
+                .setMaterialOldNumber(orderItem.getMaterialOldNumber())
+                .setMaterialName(orderItem.getMaterialName())
+                .setSpecification(orderItem.getSpecification())
+                .setUnit(orderItem.getUnit())
+                .setPrice(orderItem.getPrice())
+                .setQty(depositQty)
+                .setDepositRate(orderItem.getDepositRate())
+                .setSingleDepositAmount(orderItem.getSingleDepositAmount())
+                .setDepositAmount(subDepositAmount)
+                .setCustomerWalletId(orderItem.getCustomerWalletId())
+                .setCustomerWalletName(orderItem.getCustomerWalletName())
+                .setRemark(orderItem.getRemark())
+                .setRealMaterialId(orderItem.getRealMaterialId())
+                .setRealMaterialName(orderItem.getRealMaterialName())
+                .setRealMaterialNumber(orderItem.getRealMaterialNumber())
+                .setRealMaterialOldNumber(orderItem.getRealMaterialOldNumber())
+                .setRealSpecification(orderItem.getRealSpecification());
+    }
+
+    public void handleEnginOrderItem(DisplaceOrder enginOrder, DisplaceOrderItem orderItem, Integer depositQty, BigDecimal subDepositAmount) {
+        this.setRefEnginRecordNo(enginOrder.getEnginRecordNo())
+                .setOrderNo(enginOrder.getOrderNo())
+                .setOrderDate(enginOrder.getOrderDate())
+                .setOrderType(enginOrder.getOrderType())
+                .setSaleTypeId(orderItem.getSaleTypeId())
+                .setSaleTypeCode(orderItem.getSaleTypeCode())
+                .setSaleTypeName(orderItem.getSaleTypeName())
+                .setMaterialId(orderItem.getMaterialId())
+                .setMaterialNumber(orderItem.getMaterialNumber())
+                .setMaterialOldNumber(orderItem.getMaterialOldNumber())
+                .setMaterialName(orderItem.getMaterialName())
+                .setSpecification(orderItem.getSpecification())
+                .setUnit(orderItem.getUnit())
+                .setPrice(orderItem.getPrice())
+                .setQty(depositQty)
+                .setDepositRate(orderItem.getDepositRate())
+                .setSingleDepositAmount(orderItem.getSingleDepositAmount())
+                .setDepositAmount(subDepositAmount)
+                .setCustomerWalletId(orderItem.getCustomerWalletId())
+                .setCustomerWalletName(orderItem.getCustomerWalletName())
+                .setRemark(orderItem.getRemark());
+    }
+}

+ 19 - 0
src/main/java/com/zfire/mall/manager/bean/engin/deposit/DepositMangeItemBean.java

@@ -0,0 +1,19 @@
+package com.zfire.mall.manager.bean.engin.deposit;
+
+import com.zfire.mall.manager.plus.entity.DepositManageItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class DepositMangeItemBean extends DepositManageItem {
+
+    @ApiModelProperty(value = "发货数量")
+    private Integer orderHasSendQty;
+
+    @ApiModelProperty(value = "销售类型")
+    private String saleTypeId;
+}

+ 45 - 0
src/main/java/com/zfire/mall/manager/bean/engin/deposit/EnginOrderInfo.java

@@ -0,0 +1,45 @@
+package com.zfire.mall.manager.bean.engin.deposit;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel
+public class EnginOrderInfo {
+
+    @ApiModelProperty(value = "工程订单编号")
+    private String enginOrderNo;
+
+    @ApiModelProperty(value = "订单日期")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date orderDate;
+
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialNumber;
+
+    @ApiModelProperty(value = "金蝶物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "金蝶物料旧编码")
+    private String materialOldNumber;
+
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price = new BigDecimal("0");
+
+    @ApiModelProperty(value = "数量")
+    private Integer qty = 0;
+
+    @ApiModelProperty(value = "总押金金额")
+    private BigDecimal totalDepositAmount;
+}

+ 16 - 0
src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoBean.java

@@ -0,0 +1,16 @@
+package com.zfire.mall.manager.bean.engin.info;
+
+import com.zfire.mall.manager.plus.entity.EnginInfoOrder;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+@ApiModel
+public class EnginInfoBean extends EnginInfoOrder {
+
+    @ApiModelProperty(value = "工程信息明细")
+    private List<EnginInfoItemBean> items;
+}

+ 23 - 0
src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoItemBean.java

@@ -0,0 +1,23 @@
+package com.zfire.mall.manager.bean.engin.info;
+
+import com.zfire.mall.manager.bean.wallet.CustomerWalletBean;
+import com.zfire.mall.manager.plus.entity.EnginInfoOrderItem;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class EnginInfoItemBean extends EnginInfoOrderItem {
+
+    @ApiModelProperty(value = "引用记录")
+    private Integer useRefCount;
+
+    @ApiModelProperty(value = "可用钱包列表")
+    private List<CustomerWalletBean> customerWalletList = new ArrayList<>();
+}

+ 51 - 0
src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoListBean.java

@@ -0,0 +1,51 @@
+package com.zfire.mall.manager.bean.engin.info;
+
+import com.zfire.mall.manager.plus.entity.EnginInfoOrder;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class EnginInfoListBean extends EnginInfoOrder {
+
+    @ApiModelProperty(value = "销售类型id")
+    private String saleTypeId;
+
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialNumber;
+
+    @ApiModelProperty(value = "金蝶物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialOldNumber;
+
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ApiModelProperty(value = "基本单位编码")
+    private String baseUnitId;
+
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "数量")
+    private Integer qty;
+
+    @ApiModelProperty(value = "总金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty(value = "备注")
+    private String itemRemark;
+
+    @ApiModelProperty(value = "税率")
+    private BigDecimal taxRate;
+}

+ 281 - 0
src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoOrderBean.java

@@ -0,0 +1,281 @@
+package com.zfire.mall.manager.bean.engin.info;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.zfire.mall.manager.bean.admin.AdminUserCom;
+import com.zfire.mall.manager.bean.valid.EditGroup;
+import com.zfire.mall.manager.enums.ExamineStatusEnum;
+import com.zfire.mall.manager.exception.RemoteServiceException;
+import com.zfire.mall.manager.plus.entity.EnginInfoOrder;
+import com.zfire.mall.manager.plus.entity.EnginInfoOrderItem;
+import com.zfire.mall.manager.plus.entity.KingDeeMaterial;
+import com.zfire.mall.manager.plus.entity.SaleType;
+import com.zfire.mall.manager.plus.service.KingDeeMaterialService;
+import com.zfire.mall.manager.plus.service.SaleTypeService;
+import com.zfire.mall.manager.utils.ApplicationContextUtils;
+import com.zfire.mall.manager.utils.CommonUtils;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.beans.BeanUtils;
+
+import javax.validation.constraints.*;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+@Data
+@ApiModel
+@NoArgsConstructor
+@AllArgsConstructor
+@JsonIgnoreProperties(value = { "createBy","createName","createTime","updateBy","updateName","updateTime","submitBy"
+        ,"submitName","submitTime","confirmBy","confirmName","confirmTime" }, allowGetters = true)
+public class EnginInfoOrderBean {
+
+    private static final long serialVersionUID=1L;
+
+    @NotBlank(message = "工程信息id不能为空", groups = EditGroup.class)
+    @ApiModelProperty(value = "工程信息id")
+    private String enginInfoId;
+
+    @ApiModelProperty(value = "企业id")
+    private String adminCompanyId;
+
+    @ApiModelProperty(value = "工程信息单号")
+    private String enginInfoNo;
+
+    @ApiModelProperty(value = "订单日期")
+    private Date orderDate;
+
+//    @NotBlank(message = "产品大类不能空")
+    @ApiModelProperty(value = "产品大类")
+    private String mainId;
+
+    @ApiModelProperty(value = "产品大类名称")
+    private String mainName;
+
+    @ApiModelProperty(value = "客户id")
+    private String customerId;
+
+    @ApiModelProperty(value = "客户编码")
+    private String customerNumber;
+
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "项目名称")
+    private String projectName;
+
+    @ApiModelProperty(value = "项目类型")
+    private String projectType;
+
+    @ApiModelProperty(value = "项目说明")
+    private String projectNote;
+
+    @ApiModelProperty(value = "机型类型")
+    private String machineType;
+
+    @ApiModelProperty(value = "使用单位")
+    private String useUnit;
+
+    @ApiModelProperty(value = "安装地址")
+    private String installAddress;
+
+    @ApiModelProperty(value = "工程编号")
+    private String projectNo;
+
+    @ApiModelProperty(value = "厂工程编号")
+    private String enginFactoryNo;
+
+    @ApiModelProperty(value = "工程登录类型")
+    private String enginSignType;
+
+    @ApiModelProperty(value = "行业类别")
+    private String tradeCategory;
+
+    @ApiModelProperty(value = "联系人")
+    private String linkman;
+
+    @ApiModelProperty(value = "联系电话")
+    private String phone;
+
+    @ApiModelProperty(value = "固定电话")
+    private String tel;
+
+    @ApiModelProperty(value = "第几申报")
+    private String declareNo;
+
+    @ApiModelProperty(value = "权限分类")
+    private String powerCategory;
+
+    @NotBlank(message = "业务员不能为空")
+    @ApiModelProperty(value = "业务员")
+    private String serviceId;
+
+    @ApiModelProperty(value = "业务员名称")
+    private String serviceName;
+
+    @NotNull(message = "合同有效期不能为空")
+    @Future(message = "不能少于当前日期")
+    @ApiModelProperty(value = "合同有效期")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date contractExpireDate;
+
+    @ApiModelProperty(value = "提前完结状态 true=提前完结  false=未提前完结")
+    private Boolean endStatus;
+
+    @ApiModelProperty(value = "格力回复")
+    private String geLiNote;
+
+    @ApiModelProperty(value = "格力内部备注")
+    private String geLiInerNote;
+
+    @ApiModelProperty(value = "文件编号")
+    private String fileNo;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "审核说明")
+    private String examineNote;
+
+    @ApiModelProperty(value = "单据状态 SAVE=保存 WAIT=待审核 OK=通过 FAIL=不通过 CLOSE=关闭")
+    private String examineStatus;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "创建人名称")
+    private String createName;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "更新人名称")
+    private String updateName;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "提交人")
+    private String submitBy;
+
+    @ApiModelProperty(value = "提交人名称")
+    private String submitName;
+
+    @ApiModelProperty(value = "提交时间")
+    private Date submitTime;
+
+    @ApiModelProperty(value = "审核人")
+    private String confirmBy;
+
+    @ApiModelProperty(value = "审核人名称")
+    private String confirmName;
+
+    @ApiModelProperty(value = "审核时间")
+    private Date confirmTime;
+
+    @ApiModelProperty(value = "弃审人")
+    private String abandonBy;
+
+    @ApiModelProperty(value = "弃审人名称")
+    private String abandonName;
+
+    @ApiModelProperty(value = "是否计划单 true=是 false=否")
+    private Boolean isPlanOrder;
+
+    @ApiModelProperty(value = "弃审时间")
+    private Date abandonTime;
+
+    @NotEmpty(message = "工程信息明细不能空")
+    @Size(min = 1, message = "调价明细不能长度少于1")
+    @ApiModelProperty(value = "工程信息明细")
+    private List<EnginInfoOrderItemBean> items;
+
+    @ApiModelProperty(value = "审批结果")
+    private boolean examineResult = false;
+
+    public EnginInfoOrder handleTargetInfo(AdminUserCom adminUser) {
+//        ProductCategory productCategory = productCategoryService.lambdaQuery()
+//                .eq(ProductCategory::getProductCategoryId, this.mainId)
+//                .one();
+//        if (Objects.isNull(productCategory)) {
+//            throw new RemoteServiceException("产品大类不存在");
+//        }
+//        this.mainName = productCategory.getProductCategoryName();
+
+        EnginInfoOrder enginInfoOrder = new EnginInfoOrder();
+        BeanUtils.copyProperties(this, enginInfoOrder);
+        enginInfoOrder.setCreateBy(CommonUtils.getUsername())
+                .setCreateName(CommonUtils.getNickName())
+                .setUpdateBy(CommonUtils.getUsername())
+                .setUpdateName(CommonUtils.getNickName())
+                .setExamineStatus(ExamineStatusEnum.SAVE.toString());
+
+        return enginInfoOrder;
+    }
+
+
+    public List<EnginInfoOrderItem> handleTargetItem() {
+        KingDeeMaterialService kingDeeMaterialService = ApplicationContextUtils.getBean(KingDeeMaterialService.class);
+        SaleTypeService saleTypeService = ApplicationContextUtils.getBean(SaleTypeService.class);
+
+        List<KingDeeMaterial> kingDeeMaterials = kingDeeMaterialService.lambdaQuery()
+                .in(KingDeeMaterial::getId, this.items.stream()
+                        .map(EnginInfoOrderItemBean::getMaterialId)
+                        .collect(Collectors.toList())).list();
+
+        List<SaleType> saleTypes = saleTypeService.lambdaQuery()
+                .in(SaleType::getId, items.stream().map(EnginInfoOrderItemBean::getSaleTypeId).distinct().collect(Collectors.toList()))
+                .list();
+
+        Map<String, KingDeeMaterial> kingDeeMaterialMap = kingDeeMaterials.stream()
+                .collect(Collectors.toMap(KingDeeMaterial::getId, Function.identity(), (key1, key2) -> key2));
+
+        Map<String, SaleType> saleTypeMap = saleTypes.stream()
+                .collect(Collectors.toMap(SaleType::getId, Function.identity()));
+
+        // 去重复
+        Collection<EnginInfoOrderItemBean> items = this.items.stream()
+                .collect(Collectors.toMap(v -> v.getSaleTypeId() + "|" + v.getMaterialId(),
+                        Function.identity(),
+                        (key1, key2) -> key2))
+                .values();
+
+        return items.stream().map(enginInfoOrderItemBean -> {
+            EnginInfoOrderItem infoOrderItem = new EnginInfoOrderItem();
+            KingDeeMaterial kingDeeMaterial = kingDeeMaterialMap.get(enginInfoOrderItemBean.getMaterialId());
+            SaleType saleType = saleTypeMap.get(enginInfoOrderItemBean.getSaleTypeId());
+            if (Objects.isNull(kingDeeMaterial)) {
+                throw new RemoteServiceException(enginInfoOrderItemBean.getMaterialName() + ":产品不存在,请检查");
+            }
+            if (Objects.isNull(saleType)) {
+                throw new RemoteServiceException("销售类型不能为空");
+            }
+            BeanUtils.copyProperties(enginInfoOrderItemBean, infoOrderItem);
+
+            infoOrderItem.setId(null)
+                    .setEnginInfoId(this.enginInfoId)
+                    .setEnginInfoNo(this.enginInfoNo)
+                    .setSaleTypeId(enginInfoOrderItemBean.getSaleTypeId())
+                    .setSaleTypeCode(saleType.getSaleCode())
+                    .setSaleTypeName(saleType.getSaleName())
+                    .setMaterialName(kingDeeMaterial.getName())
+                    .setMaterialNumber(kingDeeMaterial.getNumber())
+                    .setMaterialOldNumber(kingDeeMaterial.getOldNumber())
+                    .setSpecification(kingDeeMaterial.getSpecification())
+                    .setUnit(kingDeeMaterial.getBaseUnitId())
+                    .setK3CategoryId(kingDeeMaterial.getCategoryId())
+                    .setK3CategoryName(kingDeeMaterial.getCategoryName())
+                    .setK3CategoryNumber(kingDeeMaterial.getCategoryNumber())
+                    .setTaxRate(kingDeeMaterial.getTaxRateId());
+            return infoOrderItem;
+        }).collect(Collectors.toList());
+    }
+
+}

+ 87 - 0
src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoOrderItemBean.java

@@ -0,0 +1,87 @@
+package com.zfire.mall.manager.bean.engin.info;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.math.BigDecimal;
+
+@Data
+@ApiModel
+public class EnginInfoOrderItemBean {
+
+    private static final long serialVersionUID=1L;
+
+    @ApiModelProperty(value = "工程明细id")
+    private String id;
+
+    @ApiModelProperty(value = "工程信息id")
+    private String parentId;
+
+    @ApiModelProperty(value = "工程信息编号")
+    private String enginInfoNo;
+
+    @NotBlank(message = "销售类型不能为空")
+    @ApiModelProperty(value = "销售类型id")
+    private String saleTypeId;
+
+    @NotBlank(message = "销售类型编码不能为空")
+    @ApiModelProperty(value = "销售名称")
+    private String saleTypeCode;
+
+    @NotBlank(message = "销售类型名称不能为空")
+    @ApiModelProperty(value = "销售名称")
+    private String saleTypeName;
+
+    @NotBlank(message = "产品不能为空")
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialNumber;
+
+    @ApiModelProperty(value = "金蝶物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "金蝶物料旧编码")
+    private String materialOldNumber;
+
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+    @NotNull(message = "单价不能为空")
+    @Min(message = "单价不能少于0", value = 0)
+    @ApiModelProperty(value = "单价", required = true)
+    private BigDecimal price = new BigDecimal("0");
+
+    @NotNull(message = "数量不能为空")
+    @Min(message = "数量不能少于0", value = 0)
+    @ApiModelProperty(value = "数量", required = true)
+    private Integer qty = 0;
+
+    @ApiModelProperty(value = "已订数量", required = true)
+    private Integer hasOrderQty = 0;
+
+    @ApiModelProperty(value = "已发货数量", required = true)
+    private Integer hasDeliverQty = 0;
+
+    @ApiModelProperty(value = "总金额")
+    private BigDecimal totalAmount = new BigDecimal("0");
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "税率")
+    private BigDecimal taxRate;
+
+    public BigDecimal getTotalAmount() {
+        return new BigDecimal(this.qty.toString()).multiply(this.price).setScale(2, BigDecimal.ROUND_HALF_UP);
+    }
+
+}

+ 75 - 0
src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoOrderListBean.java

@@ -0,0 +1,75 @@
+package com.zfire.mall.manager.bean.engin.info;
+
+import com.zfire.mall.manager.plus.entity.EnginInfoOrder;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class EnginInfoOrderListBean extends EnginInfoOrder {
+
+    @ApiModelProperty(value = "明细id")
+    private String id;
+
+    @ApiModelProperty(value = "销售类型id")
+    private String saleTypeId;
+
+    @ApiModelProperty(value = "销售类型编码")
+    private String saleTypeCode;
+
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleTypeName;
+
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialNumber;
+
+    @ApiModelProperty(value = "金蝶物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "金蝶物料旧编码")
+    private String materialOldNumber;
+
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "数量")
+    private Integer qty;
+
+    @ApiModelProperty(value = "总金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty(value = "备注")
+    private String itemRemark;
+
+    @ApiModelProperty(value = "税率")
+    private BigDecimal taxRate;
+
+    @ApiModelProperty(value = "已订数量")
+    private Integer hasOrderQty;
+
+    @ApiModelProperty(value = "物料分组名称")
+    private String materialGroupName;
+
+    @ApiModelProperty(value = "存货类别")
+    private String categoryName;
+
+    @ApiModelProperty(value = "出库数量")
+    private String hasDeliverQty;
+
+    @ApiModelProperty(value = "发货数量")
+    private String hasSendQty;
+}

+ 72 - 0
src/main/java/com/zfire/mall/manager/bean/engin/info/EnginInfoSaleExecBean.java

@@ -0,0 +1,72 @@
+package com.zfire.mall.manager.bean.engin.info;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel
+@Data
+public class EnginInfoSaleExecBean {
+
+    @ApiModelProperty("信息单日期")
+    private Date orderDate;
+    @ApiModelProperty("工程编号")
+    private String refEnginRecordNo;
+    @ApiModelProperty("经销商编码")
+    private String customerNumber;
+    @ApiModelProperty("经销商名称")
+    private String customerName;
+    @ApiModelProperty("项目名称")
+    private String refProjectName;
+    @ApiModelProperty("销售类型")
+    private String saleTypeName;
+    @ApiModelProperty("物料编码")
+    private String materialNumber;
+    @ApiModelProperty("产品编码")
+    private String materialOldNumber;
+    @ApiModelProperty("产品名称")
+    private String materialName;
+    @ApiModelProperty("规格型号")
+    private String specification;
+    @ApiModelProperty("数量")
+    private Integer qty;
+    @ApiModelProperty("单价")
+    private BigDecimal price;
+    @ApiModelProperty("金额")
+    private BigDecimal totalAmount;
+    @ApiModelProperty("未订数量")
+    private Integer wdQty;
+    @ApiModelProperty("未订金额")
+    private BigDecimal wdAmount;
+    @ApiModelProperty("直调数量")
+    private Integer directTransferQty;
+    @ApiModelProperty("退订数量")
+    private Integer retiredQty;
+    @ApiModelProperty("退货数量")
+    private Integer refundProductQty;
+    @ApiModelProperty("表头业务员")
+    private String serviceName;
+    @ApiModelProperty("审核人")
+    private String confirmName;
+    @ApiModelProperty("是否关闭 是=true false=否")
+    private Boolean isClose = false;
+    @ApiModelProperty("备注")
+    private String remark;
+    @ApiModelProperty("格力内部备注")
+    private String geLiInerNote;
+    @ApiModelProperty("权限分类")
+    private String refPowerCategory;
+    @ApiModelProperty("合同有效期")
+    private Date contractExpireDate;
+    @ApiModelProperty("安装地址")
+    private String installAddress;
+    @ApiModelProperty("联系电话")
+    private String phone;
+    @ApiModelProperty("工程登录类型")
+    private String enginSignType;
+
+
+}

+ 11 - 0
src/main/java/com/zfire/mall/manager/bean/engin/order/EnginInfoHistoryItemBean.java

@@ -0,0 +1,11 @@
+package com.zfire.mall.manager.bean.engin.order;
+
+import lombok.Data;
+
+@Data
+public class EnginInfoHistoryItemBean {
+
+    private String saleTypeId;
+    private String materialId;
+    private Integer qty;
+}

+ 610 - 0
src/main/java/com/zfire/mall/manager/bean/engin/order/EnginOrderBean.java

@@ -0,0 +1,610 @@
+package com.zfire.mall.manager.bean.engin.order;
+
+import cn.hutool.core.collection.CollectionUtil;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.zfire.mall.manager.bean.admin.AdminUserCom;
+import com.zfire.mall.manager.bean.engin.info.EnginInfoBean;
+import com.zfire.mall.manager.bean.engin.sys.EnginSysAgencyBills;
+import com.zfire.mall.manager.bean.valid.HomeOrderGroup;
+import com.zfire.mall.manager.bean.valid.TradeOrderGroup;
+import com.zfire.mall.manager.enums.IsEnum;
+import com.zfire.mall.manager.enums.OrderTypeEnum;
+import com.zfire.mall.manager.exception.RemoteServiceException;
+import com.zfire.mall.manager.plus.entity.*;
+import com.zfire.mall.manager.plus.service.EnginInfoOrderItemService;
+import com.zfire.mall.manager.plus.service.KingDeeMaterialService;
+import com.zfire.mall.manager.utils.ApplicationContextUtils;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.BeanUtils;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+
+@Data
+@ApiModel
+@NoArgsConstructor
+@AllArgsConstructor
+@JsonIgnoreProperties(value = { "createBy","createTime","updateBy","updateTime","submitBy"
+        ,"submitTime","confirmBy","confirmTime","closeBy","closeTime", "btnStatus" }
+        , allowGetters = true)
+public class EnginOrderBean {
+
+    private static final long serialVersionUID=1L;
+
+    //    @NotEmpty(message = "请先保存订单", groups = { EditGroup.class })
+    @ApiModelProperty(value = "id")
+    private String enginOrderId;
+
+    @ApiModelProperty(value = "企业id")
+    private String adminCompanyId;
+
+    @ApiModelProperty(value = "用户id")
+    private String adminUserId;
+
+    @ApiModelProperty(value = "部门id")
+    private String adminWebsitId;
+
+    @ApiModelProperty(value = "客户id")
+    private String customerId;
+
+    @ApiModelProperty(value = "客户编码")
+    private String customerNumber;
+
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "工程类型 TRADE=商用 HOME=零售")
+    private String enginOrderType;
+
+    @ApiModelProperty(value = "工程订单编号")
+    private String enginOrderNo;
+
+    @ApiModelProperty(value = "订单日期")
+//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date orderDate;
+
+//    @NotBlank(message = "家用工程订单品类id不能空", groups = { HomeOrderGroup.class, TradeOrderGroup.class })
+//    @ApiModelProperty(value = "品类id")
+//    private String mainId;
+//
+//    @NotBlank(message = "家用工程订单品类名称不能空", groups = { HomeOrderGroup.class, TradeOrderGroup.class })
+//    @ApiModelProperty(value = "品类名称")
+//    private String mainName;
+
+    @NotBlank(message = "家用工程订单登录单账号不能空", groups = { HomeOrderGroup.class })
+    @ApiModelProperty(value = "登录单账号")
+    private String loginUserId;
+
+    @NotBlank(message = "工程登录单号不能空", groups = { HomeOrderGroup.class, TradeOrderGroup.class })
+    @ApiModelProperty(value = "工程登录单号")
+    private String refEnginRecordNo;
+
+    @ApiModelProperty(value = "项目类别")
+    private String refProjectCategory;
+
+    @ApiModelProperty(value = "项目名称")
+    private String refProjectName;
+
+    @ApiModelProperty(value = "项目类型")
+    private String refProjectType;
+
+    @ApiModelProperty(value = "项目说明")
+    private String refProjectNote;
+
+    @ApiModelProperty(value = "使用单位")
+    private String refUseUnit;
+
+    @ApiModelProperty(value = "购买单位名称")
+    private String refBuyUnitName;
+
+    @ApiModelProperty(value = "购买单位联系人")
+    private String refBuyUnitCallMen;
+
+    @ApiModelProperty(value = "购买单位固定电话")
+    private String refBuyUnitTel;
+
+    @ApiModelProperty(value = "购买单位手机")
+    private String refBuyUnitPhone;
+
+    @ApiModelProperty(value = "安装地址")
+    private String refInstallAddress;
+
+    @ApiModelProperty(value = "项目编号|工程编号")
+    private String refProjectNo;
+
+    @ApiModelProperty(value = "厂编号")
+    private String refFactoryNo;
+
+    @ApiModelProperty(value = "工程登录类型")
+    private String refPromiseStatus;
+
+    @ApiModelProperty(value = "行业类别")
+    private String refTradeCategory;
+
+    @ApiModelProperty(value = "联系人")
+    private String refLinkman;
+
+    @ApiModelProperty(value = "联系电话")
+    private String refPhone;
+
+    @ApiModelProperty(value = "固定电话")
+    private String refTel;
+
+    @ApiModelProperty(value = "第几申报")
+    private String refDeclareNo;
+
+    @ApiModelProperty(value = "权限分类")
+    private String refPowerCategory;
+
+    @ApiModelProperty(value = "机型类别")
+    private String refMachineType;
+
+    @ApiModelProperty(value = "区域")
+    private String refRegionWork;
+
+    @ApiModelProperty(value = "提交保证函(已保证,未保证)")
+    private String refPromiseProvide;
+
+    @ApiModelProperty(value = "合同变更批复结果")
+    private String refContractResult;
+
+    @ApiModelProperty(value = "合同变更审批意见")
+    private String refContractIdea;
+
+    @ApiModelProperty(value = "工程机转零售批复结果")
+    private String refToRetailResult;
+
+    @ApiModelProperty(value = "工程机转零售审批意见")
+    private String refToRetailIdea;
+
+    @ApiModelProperty(value = "资料延期批复结果")
+    private String refDataDelayResult;
+
+    @ApiModelProperty(value = "资料延期审批意见")
+    private String refDataDelayIdea;
+
+    @ApiModelProperty(value = "其他附件批复结果")
+    private String refOtherAnnexResult;
+
+    @ApiModelProperty(value = "其他附件审批意见")
+    private String refOtherAnnexIdea;
+
+    @ApiModelProperty(value = "登录有效期")
+    private Date refBillsExpireDate;
+
+    @NotBlank(message = "家用工程订单销售类型不能空", groups = { HomeOrderGroup.class })
+    @ApiModelProperty(value = "销售类型")
+    private String saleTypeId;
+
+    @NotBlank(message = "家用工程订单销售类型编码不能空", groups = { HomeOrderGroup.class })
+    @ApiModelProperty(value = "销售类型编码")
+    private String saleTypeCode;
+
+    @NotBlank(message = "家用工程订单销售类型名称不能空", groups = { HomeOrderGroup.class })
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleTypeName;
+
+    @ApiModelProperty(value = "业务员")
+    private String serviceId;
+
+    @ApiModelProperty(value = "业务员名称")
+    private String serviceName;
+
+    @ApiModelProperty(value = "文件编号")
+    private String fileNo;
+
+    @ApiModelProperty(value = "是否计划单 true=是 false=否")
+    private Boolean isPlanOrder;
+
+    @ApiModelProperty(value = "格力回复")
+    private String geLiNote;
+
+    @ApiModelProperty(value = "格力内部备注")
+    private String geLiInerNote;
+
+    @ApiModelProperty(value = "扣押金 false=扣 true=不扣")
+    private Boolean takeDeposit;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "审核说明")
+    private String examineNote;
+
+    @ApiModelProperty(value = "单据状态 SAVE=保存 WAIT=待审核 OK=通过 FAIL=不通过 CLOSE=关闭")
+    private String examineStatus;
+
+    @ApiModelProperty(value = "发货日期")
+    private Date deliverDate;
+
+    @ApiModelProperty(value = "发货仓库")
+    private String correspondId;
+
+    @ApiModelProperty(value = "发货仓库名称")
+    private String correspondName;
+
+    @ApiModelProperty(value = "仓位")
+    private String stockId;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "创建人名称")
+    private String createName;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "更新人名称")
+    private String updateName;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "提交人")
+    private String submitBy;
+
+    @ApiModelProperty(value = "提交人名称")
+    private String submitName;
+
+    @ApiModelProperty(value = "提交时间")
+    private Date submitTime;
+
+    @ApiModelProperty(value = "审核人")
+    private String confirmBy;
+
+    @ApiModelProperty(value = "审核人名称")
+    private String confirmName;
+
+    @ApiModelProperty(value = "审核时间")
+    private Date confirmTime;
+
+    @ApiModelProperty(value = "弃审人")
+    private String abandonBy;
+
+    @ApiModelProperty(value = "弃审人名称")
+    private String abandonName;
+
+    @ApiModelProperty(value = "弃审时间")
+    private Date abandonTime;
+
+    @ApiModelProperty(value = "关闭人")
+    private String closeBy;
+
+    @ApiModelProperty(value = "关闭人名称")
+    private String closeName;
+
+    @ApiModelProperty(value = "关闭时间")
+    private Date closeTime;
+
+    @ApiModelProperty(value = "直调完结人")
+    private String endDirectBy;
+
+    @ApiModelProperty(value = "直调完结人名称")
+    private String endDirectName;
+
+    @ApiModelProperty(value = "直调完结时间")
+    private Date endDirectTime;
+
+    @ApiModelProperty(value = "金蝶同步状态 NOT=未同步 SALES=销售订单 OUTSTOCK=销售出库单 TRANSFER=直接调拨单 ")
+    private String kingDeeSync;
+
+    @ApiModelProperty(value = "金蝶单据id")
+    private String kingDeeId;
+
+    @Valid
+    @NotEmpty(message = "订单明细不能为空")
+    @ApiModelProperty(value = "订单明细")
+    List<EnginOrderItemBean> items;
+
+    @ApiModelProperty(value = "审批结果 0=驳回 1=通过")
+    private boolean examineResult = false;
+
+    @ApiModelProperty(value = "退订说明")
+    private String refundNote;
+
+    @ApiModelProperty(value = "直调状态 false=未完结 true=已完结")
+    private Boolean directTransferStatus;
+
+    @ApiModelProperty(value = "订单退订记录")
+    List<EnginOrderRefundNote> refundNoteList;
+
+    @JsonIgnore
+    private EnginSysAgencyBills enginSysAgencyBills;
+    @JsonIgnore
+    private EnginInfoBean enginInfoBean;
+    @JsonIgnore
+    private String enginUserName;
+    private Integer refCount;
+
+
+    public EnginOrder handleAddHomeOrderInfo(AdminUserCom adminUser, Integer refCount, EnginOrder enginOrder) {
+        if (Objects.isNull(enginOrder)) {
+            if (StringUtils.isBlank(loginUserId)) {
+                throw new RemoteServiceException("工程登录单用户不能为空");
+            }
+            this.setEnginOrderId(IdWorker.getIdStr());
+            enginOrder = new EnginOrder();
+            BeanUtils.copyProperties(this, enginOrder);
+            enginOrder.setIsFirstOldOrder(IsEnum.NO.getKey())
+                    .setTakeDeposit(false)
+                    .setEnginUserName(this.loginUserId)
+                    .setRefCount(refCount);
+        } else {
+            enginOrder.setRefProjectNo(this.refProjectNo)
+                    .setRefBuyUnitName(this.refBuyUnitName)
+                    .setRefBuyUnitCallMen(this.refBuyUnitCallMen)
+                    .setRefBuyUnitPhone(this.refBuyUnitPhone)
+                    .setRefBuyUnitTel(this.refBuyUnitTel)
+                    .setRefLinkman(this.refLinkman)
+                    .setRefPhone(this.refPhone)
+                    .setRefTel(this.refTel)
+                    .setRemark(this.remark)
+                    .setSaleTypeId(this.saleTypeId)
+                    .setSaleTypeCode(this.saleTypeCode)
+                    .setSaleTypeName(this.saleTypeName)
+                    .setUpdateBy(this.updateBy)
+                    .setUpdateName(this.updateName);
+            if (!adminUser.getIsCustomer()) {
+                enginOrder.setOrderDate(this.orderDate)
+                        .setServiceId(this.serviceId)
+                        .setServiceName(this.serviceName)
+                        .setRefProjectCategory(this.refProjectCategory)
+                        .setRefProjectName(this.refProjectName)
+                        .setRefProjectType(this.refProjectType)
+                        .setRefProjectNote(this.refProjectNote)
+                        .setRefUseUnit(this.refUseUnit)
+                        .setRefInstallAddress(this.refInstallAddress)
+                        .setRefProjectNo(this.refProjectNo)
+                        .setRefFactoryNo(this.refFactoryNo)
+                        .setRefPromiseStatus(this.refPromiseStatus)
+                        .setRefTradeCategory(this.refTradeCategory)
+                        .setRefDeclareNo(this.refDeclareNo)
+                        .setRefPowerCategory(this.refPowerCategory)
+                        .setRefMachineType(this.refMachineType)
+                        .setRefRegionWork(this.refRegionWork)
+                        .setRefBuyUnitName(this.refBuyUnitName)
+                        .setRefPromiseProvide(this.refPromiseProvide)
+                        .setRefOtherAnnexIdea(this.refOtherAnnexIdea)
+                        .setRefOtherAnnexResult(this.refOtherAnnexResult)
+                        .setRefContractIdea(this.refContractIdea)
+                        .setRefContractResult(this.refContractResult)
+                        .setRefDataDelayIdea(this.refDataDelayIdea)
+                        .setRefDataDelayResult(this.refDataDelayResult)
+                        .setRefToRetailIdea(this.refToRetailIdea)
+                        .setRefToRetailResult(this.refToRetailResult)
+                        .setTakeDeposit(this.takeDeposit)
+                        .setFileNo(this.fileNo)
+                        .setGeLiNote(this.geLiNote)
+                        .setCorrespondName(this.getCorrespondName())
+                        .setCorrespondId(this.getCorrespondId())
+                        .setGeLiInerNote(this.geLiInerNote);
+            }
+        }
+        return enginOrder;
+    }
+
+    public List<EnginOrderItem> handleAddHomeOrderItem(EnginOrder enginOrder) {
+        List<EnginOrderItemBean> orderItemBeans = this.getItems();
+        if (CollectionUtil.isEmpty(orderItemBeans)) {
+            throw new RemoteServiceException("工程订单明细为空");
+        }
+
+        KingDeeMaterialService kingDeeMaterialService = ApplicationContextUtils.getBean(KingDeeMaterialService.class);
+
+        List<KingDeeMaterial> kingDeeMaterials = kingDeeMaterialService.lambdaQuery()
+                .in(KingDeeMaterial::getOldNumber, orderItemBeans.stream().map(EnginOrderItemBean::getMaterialOldNumber).collect(Collectors.toList()))
+                .list();
+        // 实装物料
+        List<KingDeeMaterial> realKingDeeMaterials = kingDeeMaterialService.lambdaQuery()
+                .in(KingDeeMaterial::getOldNumber, orderItemBeans.stream().map(EnginOrderItemBean::getRealMaterialOldNumber).collect(Collectors.toList()))
+                .list();
+        Map<String, KingDeeMaterial> kingDeeMaterialMap = kingDeeMaterials.stream()
+                .collect(Collectors.toMap(KingDeeMaterial::getId, Function.identity(), (key1, key2) -> key2));
+
+        Map<String, KingDeeMaterial> realKingDeeMaterialMap = realKingDeeMaterials.stream()
+                .collect(Collectors.toMap(KingDeeMaterial::getId, Function.identity(), (key1, key2) -> key2));
+
+        List<EnginOrderItem> orderItems = new ArrayList<>();
+
+        for (EnginOrderItemBean itemBean : orderItemBeans) {
+            KingDeeMaterial kingDeeMaterial = kingDeeMaterialMap.get(itemBean.getMaterialId());
+            if (Objects.isNull(kingDeeMaterial)) {
+                throw new RemoteServiceException(itemBean.getSaleTypeName() + "销售类型的\"" + itemBean.getMaterialName() + "\":找不到物料信息");
+            }
+            KingDeeMaterial realKingDeeMaterial = realKingDeeMaterialMap.get(itemBean.getRealMaterialId());
+            if (Objects.isNull(realKingDeeMaterial)) {
+                throw new RemoteServiceException(itemBean.getSaleTypeName() + "销售类型的实装产品\"" + itemBean.getMaterialName() + "\":找不到物料信息");
+            }
+            EnginOrderItem enginOrderItem = new EnginOrderItem();
+            enginOrderItem.setAdminUserId(enginOrder.getAdminUserId())
+                    .setAdminWebsitId(enginOrder.getAdminWebsitId())
+                    .setParentId(enginOrder.getEnginOrderId())
+                    .setEnginOrderNo(enginOrder.getEnginOrderNo())
+                    .setUseRefCount(enginOrder.getRefCount())
+                    .setSaleTypeId(enginOrder.getSaleTypeId())
+                    .setSaleTypeCode(enginOrder.getSaleTypeCode())
+                    .setSaleTypeName(enginOrder.getSaleTypeName())
+                    .setMaterialId(kingDeeMaterial.getId())
+                    .setMaterialName(kingDeeMaterial.getName())
+                    .setMaterialNumber(kingDeeMaterial.getNumber())
+                    .setMaterialOldNumber(kingDeeMaterial.getOldNumber())
+                    .setSpecification(kingDeeMaterial.getSpecification())
+                    .setK3CategoryId(kingDeeMaterial.getCategoryId())
+                    .setK3CategoryName(kingDeeMaterial.getCategoryName())
+                    .setK3CategoryNumber(kingDeeMaterial.getCategoryNumber())
+                    .setUnit(kingDeeMaterial.getBaseUnitId())
+                    .setEnginPrice(itemBean.getEnginPrice())
+                    .setEnginTotality(itemBean.getEnginTotality())
+                    .setEnginNum(itemBean.getEnginNum())
+                    .setPrice(itemBean.getPrice())
+                    .setQty(itemBean.getQty())
+                    .setTotalAmount(BigDecimal.valueOf(itemBean.getQty())
+                            .multiply(itemBean.getPrice())
+                            .setScale(6, BigDecimal.ROUND_HALF_UP))
+                    .setDiscAmount(Optional.ofNullable(itemBean.getDiscAmount()).orElse(new BigDecimal("0")))
+                    .setIsDirectTransfer(itemBean.getIsDirectTransfer())
+                    .setCustomerWalletId(itemBean.getCustomerWalletId())
+                    .setCustomerWalletId2(itemBean.getCustomerWalletId2())
+                    .setRemark(itemBean.getRemark())
+                    .setTax(kingDeeMaterial.getTaxRateId())
+                    .setRefEnginRecordNo(enginOrder.getRefEnginRecordNo())
+                    .setRealMaterialId(realKingDeeMaterial.getId())
+                    .setRealMaterialName(realKingDeeMaterial.getName())
+                    .setRealMaterialNumber(realKingDeeMaterial.getNumber())
+                    .setRealMaterialOldNumber(realKingDeeMaterial.getOldNumber())
+                    .setRealSpecification(realKingDeeMaterial.getSpecification());
+
+
+            orderItems.add(enginOrderItem);
+        }
+
+        return orderItems;
+    }
+
+    public EnginOrder handleAddTradeOrderInfo(Integer refCount, EnginOrder enginOrder) {
+        if (Objects.isNull(enginOrder)) {
+            enginOrder = new EnginOrder();
+            BeanUtils.copyProperties(this, enginOrder);
+            enginOrder.setEnginOrderType(OrderTypeEnum.TRADE.getKey())
+                    .setTakeDeposit(true)
+                    .setRefCount(refCount);
+        } else {
+            enginOrder.setOrderDate(this.orderDate)
+                    .setServiceId(this.serviceId)
+                    .setServiceName(this.serviceName)
+                    .setRefProjectCategory(this.refProjectCategory)
+                    .setRefProjectName(this.refProjectName)
+                    .setRefProjectType(this.refProjectType)
+                    .setRefProjectNote(this.refProjectNote)
+                    .setRefUseUnit(this.refUseUnit)
+                    .setRefInstallAddress(this.refInstallAddress)
+                    .setRefProjectNo(this.refProjectNo)
+                    .setRefFactoryNo(this.refFactoryNo)
+                    .setRefPromiseStatus(this.refPromiseStatus)
+                    .setRefTradeCategory(this.refTradeCategory)
+                    .setRefLinkman(this.refLinkman)
+                    .setRefPhone(this.refPhone)
+                    .setRefTel(this.refTel)
+                    .setRefDeclareNo(this.refDeclareNo)
+                    .setRefPowerCategory(this.refPowerCategory)
+                    .setRefMachineType(this.refMachineType)
+                    .setRefRegionWork(this.refRegionWork)
+                    .setFileNo(this.fileNo)
+                    .setRemark(this.remark)
+                    .setGeLiNote(this.getGeLiNote())
+                    .setGeLiInerNote(this.getGeLiInerNote())
+                    .setUpdateBy(this.updateBy)
+                    .setUpdateName(this.updateName);
+        }
+
+        return enginOrder;
+    }
+
+    public List<EnginOrderItem> handleAddTradeOrderItem(EnginOrder enginOrder) {
+        if (CollectionUtil.isEmpty(this.getItems())) {
+            throw new RemoteServiceException("工程订单明细为空");
+        }
+        // 覆盖可能存在的同一销售类型物料不同价格以后压前处理
+        Map<String, EnginOrderItemBean> beanMap = this.getItems().stream()
+                .collect(Collectors.toMap(v -> v.getSaleTypeId() + v.getMaterialId(), Function.identity(), (key1, key2) -> key2));
+        List<EnginOrderItemBean> orderItemBeans = new ArrayList<>(beanMap.values());
+
+        KingDeeMaterialService kingDeeMaterialService = ApplicationContextUtils.getBean(KingDeeMaterialService.class);
+        EnginInfoOrderItemService enginInfoOrderItemService = ApplicationContextUtils.getBean(EnginInfoOrderItemService.class);
+
+        List<EnginInfoOrderItem> infoOrderItemList = enginInfoOrderItemService.lambdaQuery()
+                .eq(EnginInfoOrderItem::getEnginInfoNo, enginOrder.getRefEnginRecordNo())
+                .list();
+
+        Map<String, EnginInfoOrderItem> infoOrderItemMap = infoOrderItemList.stream()
+                .collect(Collectors.toMap(v -> v.getSaleTypeId() + v.getMaterialId(), Function.identity()));
+
+        // 查询物料信息
+        List<KingDeeMaterial> kingDeeMaterials = kingDeeMaterialService.lambdaQuery()
+                .in(KingDeeMaterial::getId, orderItemBeans.stream()
+                        .map(EnginOrderItemBean::getMaterialId)
+                        .distinct()
+                        .collect(Collectors.toList()))
+                .list();
+        Map<String, KingDeeMaterial> kingDeeMaterialMap = kingDeeMaterials.stream()
+                .collect(Collectors.toMap(KingDeeMaterial::getId, Function.identity()));
+
+        List<EnginOrderItem> orderItems = new ArrayList<>();
+        for (EnginOrderItemBean itemBean : orderItemBeans) {
+            KingDeeMaterial kingDeeMaterial = kingDeeMaterialMap.get(itemBean.getMaterialId());
+            EnginInfoOrderItem infoOrderItem = infoOrderItemMap.get(itemBean.getSaleTypeId() + itemBean.getMaterialId());
+            if (Objects.isNull(kingDeeMaterial)) {
+                throw new RemoteServiceException(itemBean.getSaleTypeName() + "销售类型的" + itemBean.getMaterialName() + ":找不到物料信息");
+            }
+            if (Objects.isNull(infoOrderItem)) {
+                throw new RemoteServiceException(itemBean.getSaleTypeName() + "销售类型的" + itemBean.getMaterialName() + ":信息单找不到物料信息");
+            }
+//            if (Objects.nonNull(infoOrderItem)) {
+                // 剩余可订数量
+                int surplusQty = infoOrderItem.getQty() - infoOrderItem.getHasOrderQty();
+                if (itemBean.getQty() > surplusQty) {
+                    throw new RemoteServiceException(itemBean.getSaleTypeName() + "销售类型的" + itemBean.getMaterialName() + ":数量不能大于信息单数量");
+                }
+                itemBean.setEnginPrice(infoOrderItem.getPrice())
+                        .setEnginNum(infoOrderItem.getQty())
+                        .setEnginTotality(infoOrderItem.getTotalAmount())
+                        .setHistoryHasOrderQty(infoOrderItem.getHasOrderQty());
+//            }
+
+            EnginOrderItem enginOrderItem = new EnginOrderItem();
+            enginOrderItem.setAdminUserId(enginOrder.getAdminUserId())
+                    .setAdminWebsitId(enginOrder.getAdminWebsitId())
+                    .setParentId(enginOrder.getEnginOrderId())
+                    .setEnginOrderNo(enginOrder.getEnginOrderNo())
+                    .setUseRefCount(enginOrder.getRefCount())
+                    .setSaleTypeId(itemBean.getSaleTypeId())
+                    .setSaleTypeCode(itemBean.getSaleTypeCode())
+                    .setSaleTypeName(itemBean.getSaleTypeName())
+                    .setMaterialId(kingDeeMaterial.getId())
+                    .setMaterialName(kingDeeMaterial.getName())
+                    .setMaterialNumber(kingDeeMaterial.getNumber())
+                    .setMaterialOldNumber(kingDeeMaterial.getOldNumber())
+                    .setSpecification(kingDeeMaterial.getSpecification())
+                    .setK3CategoryId(kingDeeMaterial.getCategoryId())
+                    .setK3CategoryName(kingDeeMaterial.getCategoryName())
+                    .setK3CategoryNumber(kingDeeMaterial.getCategoryNumber())
+                    .setUnit(kingDeeMaterial.getBaseUnitId())
+                    .setEnginPrice(itemBean.getEnginPrice())
+                    .setEnginTotality(itemBean.getEnginTotality())
+                    .setEnginNum(itemBean.getEnginNum())
+                    .setPrice(itemBean.getPrice())
+                    .setQty(itemBean.getQty())
+                    .setTotalAmount(BigDecimal.valueOf(enginOrderItem.getQty())
+                            .multiply(enginOrderItem.getPrice())
+                            .setScale(6, BigDecimal.ROUND_HALF_UP))
+                    .setDiscAmount(Optional.ofNullable(itemBean.getDiscAmount()).orElse(new BigDecimal("0")))
+                    .setIsDirectTransfer(itemBean.getIsDirectTransfer())
+                    .setCustomerWalletId(itemBean.getCustomerWalletId())
+                    .setCustomerWalletId2(itemBean.getCustomerWalletId2())
+                    .setHistoryHasOrderQty(itemBean.getHistoryHasOrderQty())
+                    .setRemark(itemBean.getRemark())
+                    .setTax(kingDeeMaterial.getTaxRateId())
+                    .setRefEnginRecordNo(enginOrder.getRefEnginRecordNo());
+            orderItems.add(enginOrderItem);
+        }
+
+        return orderItems;
+    }
+
+}

+ 226 - 0
src/main/java/com/zfire/mall/manager/bean/engin/order/EnginOrderItemBean.java

@@ -0,0 +1,226 @@
+package com.zfire.mall.manager.bean.engin.order;
+
+import com.zfire.mall.manager.bean.wallet.CustomerWalletBean;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.Min;
+import javax.validation.constraints.NotBlank;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+@Accessors(chain = true)
+@ApiModel
+public class EnginOrderItemBean {
+
+    private static final long serialVersionUID=1L;
+
+    @ApiModelProperty(value = "明细id")
+    private String id;
+
+    @ApiModelProperty(value = "工程订单id")
+    private String parentId;
+
+    @ApiModelProperty(value = "工程订单编号")
+    private String enginOrderNo;
+
+    @ApiModelProperty(value = "引用记录")
+    private Integer useRefCount;
+
+    @NotBlank(message = "家用工程订单销售类型不能空")
+    @ApiModelProperty(value = "销售类型")
+    private String saleTypeId;
+
+    @NotBlank(message = "家用工程订单销售类型编码不能空")
+    @ApiModelProperty(value = "销售类型编码")
+    private String saleTypeCode;
+
+    @NotBlank(message = "家用工程订单销售类型名称不能空")
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleTypeName;
+
+    @NotBlank(message = "产品不能空")
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialNumber;
+
+    @ApiModelProperty(value = "金蝶物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "金蝶物料旧编码")
+    private String materialOldNumber;
+
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ApiModelProperty(value = "金蝶物料类型id")
+    private String k3CategoryId;
+
+    @ApiModelProperty(value = "金蝶物料类型编码")
+    private String k3CategoryNumber;
+
+    @ApiModelProperty(value = "金蝶物料类型名称")
+    private String k3CategoryName;
+
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+    @ApiModelProperty(value = "工程单单价")
+    private BigDecimal enginPrice = new BigDecimal("0");
+
+    @ApiModelProperty(value = "工程单金额")
+    private BigDecimal enginTotality = new BigDecimal("0");
+
+    @ApiModelProperty(value = "工程单记录数量")
+    private Integer enginNum = 0;
+
+    @Min(value = 0, message = "单价不少于0")
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price = new BigDecimal("0");
+
+    @Min(value = 0, message = "数量不少于0")
+    @ApiModelProperty(value = "数量")
+    private Integer qty = 0;
+
+    @Min(value = 0, message = "折扣金额不少于0")
+    @ApiModelProperty(value = "折扣金额")
+    private BigDecimal discAmount;
+
+    @ApiModelProperty(value = "订单金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty(value = "原数量")
+    private Integer oldQty = 0;
+
+    @ApiModelProperty(value = "原实付金额")
+    private BigDecimal oldPayAmount;
+
+    @ApiModelProperty(value = "原实付返利金额")
+    private BigDecimal oldRebateAmount;
+
+    @ApiModelProperty(value = "返利钱包的返利比例")
+    private BigDecimal rebateRate;
+
+    @ApiModelProperty(value = "返利金额")
+    private BigDecimal rebateAmount;
+
+    @ApiModelProperty(value = "押金比例")
+    private BigDecimal depositRate;
+
+    @NotBlank(message = "经销商现金钱包不能空")
+    @ApiModelProperty(value = "经销商现金钱包id")
+    private String customerWalletId;
+
+    @ApiModelProperty(value = "经销商现金钱包名称")
+    private String customerWalletName;
+
+    @ApiModelProperty(value = "经销商返利钱包id")
+    private String customerWalletId2;
+
+    @ApiModelProperty(value = "经销商返利钱包名称")
+    private String customerWalletName2;
+
+    @ApiModelProperty(value = "业务员id")
+    private String serviceId;
+
+    @ApiModelProperty(value = "业务员名称")
+    private String serviceName;
+
+    @ApiModelProperty(value = "是否直调 false=否 true=是")
+    private Boolean isDirectTransfer;
+
+    @ApiModelProperty(value = "直调数量")
+    private Integer directTransferQty;
+
+    @ApiModelProperty(value = "已发货数量")
+    private Integer hasSendQty;
+
+    @ApiModelProperty(value = "单个商品的返利金额(实际扣除的返利金额/qty)")
+    private BigDecimal singleRebateAmount;
+
+    @ApiModelProperty(value = "单个商品的折扣金额(折扣金额/qty)")
+    private BigDecimal singleDiscAmount;
+
+    @ApiModelProperty(value = "单个商品的实际支付金额(实际支付金额/qty)")
+    private BigDecimal singlePayPrice;
+
+    @ApiModelProperty(value = "单个商品的押金金额(单个商品的实际支付金额*押金比例)")
+    private BigDecimal singleDepositAmount;
+
+    @ApiModelProperty(value = "实付金额(订单金额-返利金额-折扣金额-不够扣的返利金额)")
+    private BigDecimal payAmount;
+
+    @ApiModelProperty(value = "实际扣除的返利金额")
+    private BigDecimal payRebateAmount;
+
+    @ApiModelProperty(value = "实际支付的现金金额")
+    private BigDecimal payCashAmount;
+
+    @ApiModelProperty(value = "实际支付的信用金额")
+    private BigDecimal payCreditAmount;
+
+    @ApiModelProperty(value = "总押金金额")
+    private BigDecimal totalDepositAmount;
+
+    @ApiModelProperty(value = "税率例如: 0.13")
+    private BigDecimal tax;
+
+    @ApiModelProperty(value = "实装金蝶物料id")
+    private String realMaterialId;
+
+    @ApiModelProperty(value = "实装金蝶物料名称")
+    private String realMaterialName;
+
+    @ApiModelProperty(value = "实装金蝶物料编码")
+    private String realMaterialNumber;
+
+    @ApiModelProperty(value = "实装金蝶物料旧编码")
+    private String realMaterialOldNumber;
+
+    @ApiModelProperty(value = "实装规格型号")
+    private String realSpecification;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "可退数量")
+    private Integer refundableQty = 0;
+
+    @ApiModelProperty(value = "已退订数量")
+    private Integer retiredQty = 0;
+
+    @ApiModelProperty(value = "实直调数量")
+    private Integer realDirectTransferQty = 0;
+
+    @ApiModelProperty("退订数量")
+    private Integer tdQty = 0;
+
+    @ApiModelProperty("历史已订数量")
+    private Integer historyHasOrderQty = 0;
+
+    @ApiModelProperty(value = "可用钱包列表")
+    private List<CustomerWalletBean> customerWalletList = new ArrayList<>();
+
+    @ApiModelProperty(value = "金蝶内码")
+    private String kingDeeEntryId;
+
+    @ApiModelProperty(value = "退货数量")
+    private Integer refundProductQty;
+
+    @ApiModelProperty(value = "退货金额")
+    private BigDecimal refundProductAmount;
+
+    @ApiModelProperty(value = "销售数量(总订单数量-退货数量-退订数量)")
+    private Integer salesQty;
+
+    @ApiModelProperty(value = "销售金额(销售数量*单价)")
+    private BigDecimal salesAmount;
+
+
+}

+ 402 - 0
src/main/java/com/zfire/mall/manager/bean/engin/order/EnginOrderListBean.java

@@ -0,0 +1,402 @@
+package com.zfire.mall.manager.bean.engin.order;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.Objects;
+
+@Data
+@ApiModel
+public class EnginOrderListBean {
+
+    private static final long serialVersionUID=1L;
+    @ApiModelProperty(value = "engin_order_id")
+    private String enginOrderId;
+
+    @ApiModelProperty(value = "企业id")
+    private String adminCompanyId;
+
+    @ApiModelProperty(value = "客户id")
+    private String customerId;
+
+    @ApiModelProperty(value = "客户编码")
+    private String customerNumber;
+
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "业务员")
+    private String serviceId;
+
+    @ApiModelProperty(value = "业务员名称")
+    private String serviceName;
+
+    @ApiModelProperty(value = "销售类型id")
+    private String saleTypeId;
+
+    @ApiModelProperty(value = "销售类型编码")
+    private String saleTypeCode;
+
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleTypeName;
+
+    @ApiModelProperty(value = "工程机系统帐号")
+    private String enginUserName;
+
+    @ApiModelProperty(value = "工程类型 TRADE=商用 HOME=家用")
+    private String enginOrderType;
+
+    @ApiModelProperty(value = "工程订单编号")
+    private String enginOrderNo;
+
+    @ApiModelProperty(value = "订单日期")
+    private Date orderDate;
+
+    @ApiModelProperty(value = "工程登录单号")
+    private String refEnginRecordNo;
+
+    @ApiModelProperty(value = "项目类别")
+    private String refProjectCategory;
+
+    @ApiModelProperty(value = "项目名称")
+    private String refProjectName;
+
+    @ApiModelProperty(value = "项目类型")
+    private String refProjectType;
+
+    @ApiModelProperty(value = "项目说明")
+    private String refProjectNote;
+
+    @ApiModelProperty(value = "使用单位")
+    private String refUseUnit;
+
+    @ApiModelProperty(value = "安装地址")
+    private String refInstallAddress;
+
+    @ApiModelProperty(value = "工程编号")
+    private String refProjectNo;
+
+    @ApiModelProperty(value = "跨区厂编号")
+    private String refFactoryNo;
+
+    @ApiModelProperty(value = "工程登录类型")
+    private String refPromiseStatus;
+
+    @ApiModelProperty(value = "行业类别")
+    private String refTradeCategory;
+
+    @ApiModelProperty(value = "权限分类")
+    private String refPowerCategory;
+
+    @ApiModelProperty(value = "机型类别")
+    private String refMachineType;
+
+    @ApiModelProperty(value = "购买单位名称")
+    private String refBuyUnitName;
+
+    @ApiModelProperty(value = "保证函")
+    private String refPromiseProvide;
+
+    @ApiModelProperty(value = "区域")
+    private String refRegionWork;
+
+    @ApiModelProperty(value = "引用次数")
+    private Integer refCount;
+
+    @ApiModelProperty(value = "联系人")
+    private String refLinkman;
+
+    @ApiModelProperty(value = "联系电话")
+    private String refPhone;
+
+    @ApiModelProperty(value = "固定电话")
+    private String refTel;
+
+    @ApiModelProperty(value = "第几申报")
+    private String refDeclareNo;
+
+    @ApiModelProperty(value = "文件编号")
+    private String fileNo;
+
+    @ApiModelProperty(value = "扣押金 false=扣 true=不扣")
+    private Boolean takeDeposit;
+
+    @ApiModelProperty(value = "直调状态 false=未完结 true=已完结")
+    private Boolean directTransferStatus;
+
+    @ApiModelProperty(value = "格力回复")
+    private String geLiNote;
+
+    @ApiModelProperty(value = "格力内部备注")
+    private String geLiInerNote;
+
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ApiModelProperty(value = "审核说明")
+    private String examineNote;
+
+    @ApiModelProperty(value = "单据状态 SAVE=保存 WAIT=待审核 OK=通过 FAIL=不通过 CLOSE=关闭")
+    private String examineStatus;
+
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    @ApiModelProperty(value = "创建人名称")
+    private String createName;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateBy;
+
+    @ApiModelProperty(value = "更新人名称")
+    private String updateName;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "提交人")
+    private String submitBy;
+
+    @ApiModelProperty(value = "提交人名称")
+    private String submitName;
+
+    @ApiModelProperty(value = "提交时间")
+    private Date submitTime;
+
+    @ApiModelProperty(value = "审核人")
+    private String confirmBy;
+
+    @ApiModelProperty(value = "审核人名称")
+    private String confirmName;
+
+    @ApiModelProperty(value = "审核时间")
+    private Date confirmTime;
+
+    @ApiModelProperty(value = "弃审人")
+    private String abandonBy;
+
+    @ApiModelProperty(value = "弃审人名称")
+    private String abandonName;
+
+    @ApiModelProperty(value = "弃审时间")
+    private Date abandonTime;
+
+    @ApiModelProperty(value = "关闭人")
+    private String closeBy;
+
+    @ApiModelProperty(value = "关闭人名称")
+    private String closeName;
+
+    @ApiModelProperty(value = "关闭时间")
+    private Date closeTime;
+
+    @ApiModelProperty(value = "直调完结人")
+    private String endDirectBy;
+
+    @ApiModelProperty(value = "直调完结人名称")
+    private String endDirectName;
+
+    @ApiModelProperty(value = "直调完结时间")
+    private Date endDirectTime;
+
+    @ApiModelProperty(value = "是否删除 0=正常 1=删除")
+    @TableLogic
+    private Boolean del;
+
+    @ApiModelProperty(value = "金蝶同步状态 NOT=未同步 SALES=销售订单 OUTSTOCK=销售出库单 TRANSFER=直接调拨单 ")
+    private String kingDeeSync;
+
+    @ApiModelProperty(value = "金蝶单据id")
+    private String kingDeeId;
+
+    @ApiModelProperty(value = "明细id")
+    private String id;
+
+    @ApiModelProperty(value = "工程订单id")
+    private String parentId;
+
+    @ApiModelProperty(value = "引用记录")
+    private Integer useRefCount;
+
+    @ApiModelProperty(value = "明细销售类型id")
+    private String itemSaleTypeId;
+
+    @ApiModelProperty(value = "明细销售类型编码")
+    private String itemSaleTypeCode;
+
+    @ApiModelProperty(value = "明细销售类型名称")
+    private String itemSaleTypeName;
+
+    @ApiModelProperty(value = "明细业务员")
+    private String itemServiceId;
+
+    @ApiModelProperty(value = "明细业务员名称")
+    private String itemServiceName;
+
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialNumber;
+
+    @ApiModelProperty(value = "厂产品编码")
+    private String materialOldNumber;
+
+    @ApiModelProperty(value = "金蝶物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+    @ApiModelProperty(value = "工程单单价")
+    private BigDecimal enginPrice;
+
+    @ApiModelProperty(value = "工程单金额")
+    private BigDecimal enginTotality;
+
+    @ApiModelProperty(value = "工程单记录数量")
+    private Integer enginNum;
+
+    @ApiModelProperty(value = "数量")
+    private Integer qty;
+
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price;
+
+    @ApiModelProperty(value = "折扣金额")
+    private BigDecimal discAmount;
+
+    @ApiModelProperty(value = "订单金额")
+    private BigDecimal totalAmount;
+
+    @ApiModelProperty(value = "返利钱包的返利比例")
+    private BigDecimal rebateRate;
+
+    @ApiModelProperty(value = "返利金额")
+    private BigDecimal rebateAmount;
+
+    @ApiModelProperty(value = "押金比例")
+    private BigDecimal depositRate;
+
+    @ApiModelProperty(value = "经销商现金钱包id")
+    private String customerWalletId;
+
+    @ApiModelProperty(value = "经销商现金钱包名称")
+    private String customerWalletName;
+
+    @ApiModelProperty(value = "经销商返利钱包id")
+    private String customerWalletId2;
+
+    @ApiModelProperty(value = "经销商返利钱包名称")
+    private String customerWalletName2;
+
+    @ApiModelProperty(value = "是否直调 false=否 true=是")
+    private Boolean isDirectTransfer;
+
+    @ApiModelProperty(value = "直调数量")
+    private Integer directTransferQty;
+
+    @ApiModelProperty(value = "已发货数量")
+    private Integer hasSendQty;
+
+    @ApiModelProperty(value = "单个商品的返利金额(实际扣除的返利金额/qty)")
+    private BigDecimal singleRebateAmount;
+
+    @ApiModelProperty(value = "单个商品的折扣金额(折扣金额/qty)")
+    private BigDecimal singleDiscAmount;
+
+    @ApiModelProperty(value = "单个商品的实际支付金额(实际支付金额/qty)")
+    private BigDecimal singlePayPrice;
+
+    @ApiModelProperty(value = "单个商品的押金金额(单个商品的实际支付金额*押金比例)")
+    private BigDecimal singleDepositAmount;
+
+    @ApiModelProperty(value = "实付金额(订单金额-返利金额-折扣金额-不够扣的返利金额)")
+    private BigDecimal payAmount;
+
+    @ApiModelProperty(value = "实际扣除的返利金额")
+    private BigDecimal payRebateAmount;
+
+    @ApiModelProperty(value = "实际支付的现金金额")
+    private BigDecimal payCashAmount;
+
+    @ApiModelProperty(value = "实际支付的信用金额")
+    private BigDecimal payCreditAmount;
+
+    @ApiModelProperty(value = "总押金金额")
+    private BigDecimal totalDepositAmount;
+
+    @ApiModelProperty(value = "原数量")
+    private Integer oldQty;
+
+    @ApiModelProperty(value = "原实付金额")
+    private BigDecimal oldPayAmount;
+
+    @ApiModelProperty(value = "原实付返利金额")
+    private BigDecimal oldRebateAmount;
+
+    @ApiModelProperty(value = "税率例如: 0.13")
+    private BigDecimal tax;
+
+    @ApiModelProperty(value = "可退数量")
+    private Integer refundableQty;
+
+    @ApiModelProperty(value = "已退数量")
+    private Integer retiredQty;
+
+    @ApiModelProperty(value = "明细备注")
+    private String itemRemark;
+
+    @ApiModelProperty(value = "退货数量")
+    private Integer refundProductQty;
+
+    @ApiModelProperty(value = "退货金额")
+    private BigDecimal refundProductAmount;
+
+    @ApiModelProperty(value = "发货数量")
+    private Integer applySendQty;
+
+    @ApiModelProperty("实装机型名称")
+    private String realMaterialName;
+    @ApiModelProperty("实装机型编码")
+    private String realMaterialNumber;
+    @ApiModelProperty("实装机型旧编码")
+    private String realMaterialOldNumber;
+
+    @ApiModelProperty("实装机型规格")
+    private String realSpecification;
+
+    @ApiModelProperty("发货仓库ID")
+    private String correspondId;
+
+    @ApiModelProperty("发货仓库")
+    private String correspondName;
+
+    @ApiModelProperty("物料分组")
+    private String materialGroupName;
+
+    @ApiModelProperty("存货类别")
+    private String k3CategoryName;
+
+    @ApiModelProperty("明细id")
+    private String itemId;
+
+
+    public Integer getApplySendQty() {
+        if (Objects.nonNull(qty) && Objects.nonNull(refundableQty)) {
+            return Math.max((qty - refundableQty), 0);
+        }
+        return 0;
+    }
+
+}

+ 518 - 0
src/main/java/com/zfire/mall/manager/bean/engin/sys/EnginSysAgencyBills.java

@@ -0,0 +1,518 @@
+package com.zfire.mall.manager.bean.engin.sys;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.sql.Timestamp;
+import java.util.List;
+
+@Data
+@ApiModel
+public class EnginSysAgencyBills {
+    private static final long serialVersionUID=1L;
+    /**
+     * id
+     */
+    @ApiModelProperty("登录单id")
+    private int id;
+    /**
+     * 所属经销商(组织表id)
+     */
+    @ApiModelProperty("所属经销商(组织表id)")
+    private int organizationid;
+    @ApiModelProperty("所属部门")
+    private String beDepartment;    //所属部门
+    @ApiModelProperty("分区业务")
+    private String zoneWork;        //分区业务
+
+    /**
+     * userid
+     */
+    @ApiModelProperty("用户id")
+    private Integer userid;
+    /**
+     * 经销商名称(组织表)
+     */
+    @ApiModelProperty("经销商名称")
+    private String organizationName;
+
+    /**
+     * 工程编号
+     */
+    @ApiModelProperty("工程登录编号")
+    private String recordNo;
+    /**
+     * 所属部门(组织表)同上
+     */
+    private String organizationDept;
+    /**
+     * 经销商所属区域(组织表)
+     */
+    private String organizationRegion;
+    /**
+     * 产品类型(产品类别表单选)
+     */
+    @ApiModelProperty("产品类型")
+    private String productCategory;
+    /**
+     * 项目类别(项目类别表单选)
+     */
+    @ApiModelProperty("项目类别")
+    private String projectName;
+    /**
+     * 行业类别(行业分类表单选)
+     */
+    @ApiModelProperty("行业类别")
+    private String tradeCategory;
+    /**
+     * 经销商联系人
+     */
+    @ApiModelProperty("经销商联系人")
+    private String agencyName;
+    /**
+     * 经销商电话
+     */
+    @ApiModelProperty("经销商电话")
+    private String agencyPhone;
+
+    /**
+     * 使用单位
+     */
+    @ApiModelProperty("使用单位")
+    private String useUnit;
+    /**
+     * 政府采购类型
+     */
+    @ApiModelProperty("政府采购类型")
+    private String govBuyType;
+    /**
+     * 竞争品牌
+     */
+    @ApiModelProperty("竞争品牌")
+    private String competeBrand;
+    /**
+     * 购买单位名称
+     */
+    @ApiModelProperty("购买单位名称")
+    private String buyUnitName;
+    /**
+     * 购买单位联系人
+     */
+    @ApiModelProperty("购买单位联系人")
+    private String buyUnitCallMen;
+    /**
+     * 购买单位固定电话
+     */
+    @ApiModelProperty("购买单位固定电话")
+    private String buyUnitTel;
+    /**
+     * 购买单位手机
+     */
+    @ApiModelProperty("购买单位手机")
+    private String buyUnitPhone;
+    /**
+     * 安装地址
+     */
+    @ApiModelProperty("安装地址")
+    private String installAddress;
+    /**
+     * 地图安装地址
+     */
+    @ApiModelProperty("地图安装地址")
+    private String mapInstallAddress;
+    /**
+     * 经纬度
+     */
+    @ApiModelProperty("经纬度")
+    private String locationCoordinate;
+    /**
+     * 补充说明
+     */
+    @ApiModelProperty("补充说明")
+    private String buChonShuoMing;
+    /**
+     * 地址拼音字段
+     */
+    private String spellAddres;
+    /**
+     * 使用单位拼音字段
+     */
+    private String spellUseUnit;
+    /**
+     * 跨区区域类型(佛山/非佛山)
+     */
+    private String crossDistrictType;
+    /**
+     * 合同号(二级经销商不可生成)
+     */
+    private String contractNo;
+    /**
+     * 授权生成合同号(是/否)
+     */
+    private Integer authContract=0;
+    /**
+     * 提交保证函(已保证,未保证)
+     */
+    private Integer promiseProvide=0;
+    /**
+     * 同意跟进函(提供/未提供)
+     */
+    private Integer followProvide=0;
+    /**
+     * 同意跟进函-提交日期
+     */
+    private Timestamp followProvideDate;
+    /**
+     * 保证函提交日期
+     */
+    private Timestamp promisePriceDate;
+    private Timestamp promiseAcceptTime;//保证函受理时间
+    /**
+     * 登录单过期的日期(成功批复后90天过期)
+     */
+    private Timestamp billsExpireDate;
+    /**
+     * 资料状态(已提交/未提交)
+     */
+    private Integer datumProvide=0;
+    /**
+     * 资料提交日期(当前时间,可修改)
+     */
+    private Timestamp datumProvideDate;
+    /**
+     * 跨区工程(是否 判断安装地址)
+     */
+    private Integer isCross=0;
+    /**
+     * 跨区单是否被引用
+     */
+    private Integer isQuote=0;
+    /**
+     * 跨区区域(区域表)
+     */
+    private String crossDistrictName;
+    /**
+     * 跨区编号(区域表)
+     */
+    private String crossDistrictNo;
+    /**
+     * 操作员的用户名(用户表)
+     */
+    private String operatorNick;
+    /**
+     * 项目编号
+     */
+    @ApiModelProperty("项目编号")
+    private String projectNo;
+    /**
+     * 驳回原因(驳回时才有)
+     */
+    private String rejectCause;
+    /**
+     * 安装委托文件受理状态Date(待受理,驳回,已受理)
+     */
+    private String installFileAcceptStatus;
+    /**
+     * 其他附件受理状态Date(待受理,驳回,已受理)
+     */
+    private String attachmentAcceptStatus;
+
+
+
+    /**
+     * 工程状态
+     */
+    @ApiModelProperty("工程状态")
+    private String projectStatus;
+    /**
+     * 第几申报
+     */
+    @ApiModelProperty("第几申报")
+    private Integer declareNo;
+    /**
+     * 登录审核人(显示用户账号)
+     */
+    private String checkUserName;
+    /**
+     * 申报时间(操作员编辑)
+     */
+    private Timestamp declareTime;
+    /**
+     * 跨区申报时间(操作员编辑)
+     */
+    private Timestamp crossDeclareTime;
+    /**
+     * 其他附件提交日期
+     */
+    private Timestamp attachmentDate;
+    /**
+     * 其他附件受理日期
+     */
+    private Timestamp attachmentAcceptDate;
+    /**
+     * 安装委托文件提交日期
+     */
+    private Timestamp installFileDate;
+    /**
+     * 安装委托文件受理日期
+     */
+    private Timestamp installFileAcceptDate;
+    /**
+     * 登录审核时间
+     */
+    private Timestamp checkTime;
+    private String checkTime4StrExport;
+    private String promisePriceDate4StrExport;
+
+
+    /**
+     * 保证函受理状态(待受驳回已受)
+     */
+    private String promiseAcceptStatus;
+    /**
+     * 保证函申价状态(常规/特价/一票)
+     */
+    @ApiModelProperty(value = "保证函申价状态(常规/特价/一票)")
+    private String promiseStatus;
+    /**
+     * 保证函申价
+     */
+    private Integer promisePrice;
+    /**
+     * 其他附件(已提供未提供)
+     */
+    private Integer attachmentProvide=0;
+    /**
+     * 同意跟进函-受理日期
+     */
+    private Timestamp followAcceptDate;
+    /**
+     * 资料审核结果(已审/未审/驳回)
+     */
+    private String datumAcceptStatus;
+    /**
+     * 跟进函受理状态
+     */
+    private String followAcceptStatus;
+    /**
+     * 安装日期(操作员编辑)
+     */
+    private Timestamp installDate;
+    /**
+     * 寄厂日期(操作员编辑)
+     */
+    private Timestamp sendFactoryDate;
+    /**
+     * 资料过期剩余天数
+     */
+    private Integer datumExpireOverplus;
+    /**
+     * 申请更改文件(0全部1保证函2跟进函3资料)
+     */
+    private Integer applyUpdateFile;
+    /**
+     * 是否可以更改文件(0可以1不可以)
+     */
+    private Integer canUpdateFile=0;
+    /**
+     * 资料过期(未/已过期)
+     */
+    private Integer datumExpireStatus=0;
+    /**
+     * 上传的文件是否审核了
+     */
+    private Integer fileHasCheck;
+    /**
+     * 安装地区(操作员 组织表-单选)
+     */
+    private String installRegion;
+    /**
+     * 上传的文件审核描述
+     */
+    private String fileCheckDiscri;
+    /**
+     * 区域业务(操作员编辑)
+     */
+    private String regionWork;
+    /**
+     * 自编号(流水号-跨区时)
+     */
+    private String selfNo;
+    /**
+     * 跨区处理情况(待受已受驳回)
+     */
+    private String crossAcceptStatus;
+    private String beiCrossCompany;//被跨区公司
+    /**
+     * 跨区结果(登录单不显示出来)
+     */
+    private String crossResult;
+    /**
+     * 引用了几次(跨区单用,某一单)
+     */
+    private Integer hasUse;
+    /**
+     * 默认引用次数1(某条跨区单的)
+     */
+    private Integer canUse;
+    /**
+     * 安装要求(操作员编辑)
+     */
+    private String installRequire;
+    /**
+     * 安装情况(已委托/未委托)
+     */
+    private String installThing;
+    /**
+     * 登录单审核状态(待审核/有效/驳回/无效)
+     */
+    private Integer billsAcceptStatus;
+    /**
+     * 安装网点
+     */
+    private String installPoint;
+    /**
+     * 大额工程(是否)(操作员编辑)
+     */
+    private Integer isBigAmount=0;
+    /**
+     * 项目总额(操作员编辑)
+     */
+    private Integer projectAmount;
+    /**
+     * 提货状态(未/已提完)
+     */
+    private Integer pickGoodsStatus=0;
+    /**
+     * 提货更新日期(按更新操作日期)
+     */
+    private Timestamp pickGoodsDate;
+    /**
+     * 押金状态(未/已退押)
+     */
+    private Integer cashPledgeStatus=0;
+    /**
+     * 退押日期(显示退押操作的日期)
+     */
+    private Timestamp returnPledgeDate;
+    /**
+     * 开单账号(操作员)
+     */
+    private String billAccount;
+    /**
+     * 拥有使用单位名称(操作员)
+     */
+    private String hasUseUnitName;
+
+
+    /**
+     * 跨区备注
+     */
+    private String crossRemark;
+
+    /**
+     * 附件备注
+     */
+    private String fjShenPiRemark;
+
+    /**
+     * 保证函备注
+     */
+    private String promisePriceRemark;
+
+    /**
+     * 跟进函备注
+     */
+    private String followAcceptRemark;
+
+    /**
+     * 登录备注(操作员)
+     */
+    private String recordDiscri;
+    private String crossDiscri;
+    private String agreeCrossCerImgs;
+    @ApiModelProperty(value = "厂编号")
+    private String factoryNo;//厂编号
+    private String factoryAotuNo;//厂系统自动编号
+
+
+    private Integer currentFjLishiRecordId;	//当前申请附件历史记录id
+    private String fjShouLiYiJian;		//其他附件-受理意见(经销商不可见)
+    private String fjShenPiYiJian;		//其他附件-审批意见
+    private String fjShenPiResult;		//其他附件-审批结果(同意/不同意/待审批)
+    private String fjBoHui;			    //其他附件-驳回原因
+    private String fjData;			    //其他附件-数据
+    private String promisePriceYiJian;	//保证函-受理意见
+    private String followAcceptYiJian;	//跟进函-受理意见
+    private String installFileBoHui;	//安装委托-驳回原因
+    private String promisePriceBoHui;	//保证函-驳回原因
+    private String followAcceptBoHui;	//跟进函-驳回原因
+    private String datumBohui;		    //资料拒审原因
+    private String datumProblem;		//资料问题类别(无/纸质资料/电子资料)
+
+
+    /**
+     * 省
+     */
+    private String cmbProvince;
+    /**
+     * 市
+     */
+    private String cmbCity;
+    /**
+     * 区
+     */
+    private String cmbArea;
+
+
+    /**
+     * 登录次序(操作员)
+     */
+    private Integer recordOrder;
+    /**
+     * 版本号(version,用于锁)
+     */
+    private Integer editV;
+    /**
+     * 编辑中(用于锁)
+     */
+    private Integer editing;
+
+
+    private String jiXing;  //机型
+    private String jixingNum;
+    private String recordNoArr; //前序项目
+
+    private String contractResult;  //合同变更批复结果
+    private String contractIdea;    //合同变更审批意见
+    private String toRetailResult;  //工程机转零售批复结果
+    private String toRetailIdea;    //工程机转零售审批意见
+    private String dataDelayResult; //资料延期批复结果
+    private String dataDelayIdea;   //资料延期审批意见
+    private String otherAnnexResult;//其他附件批复结果
+    private String otherAnnexIdea;  //其他附件审批意见
+
+    private String crossCheckUserName;  //跨区处理员
+    private Timestamp crossHandlerDate; //跨区处理时间
+
+    private List<Machine4Agency> items;
+
+
+    @ApiModelProperty("产品品类")
+    private String mainId;
+
+    @ApiModelProperty("产品品类名称")
+    private String mainName;
+
+    @ApiModelProperty(value = "销售类型id")
+    private String saleTypeId;
+
+    @ApiModelProperty(value = "销售类型编码")
+    private String saleTypeCode;
+
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleTypeName;
+
+    private Timestamp datumAcceptDate; //资料审核日期
+}

+ 20 - 0
src/main/java/com/zfire/mall/manager/bean/engin/sys/EnginSysAgencyBillsReq.java

@@ -0,0 +1,20 @@
+package com.zfire.mall.manager.bean.engin.sys;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@ApiModel
+@Data
+public class EnginSysAgencyBillsReq {
+
+    @ApiModelProperty(value = "工程登录编号")
+    private String recordNo;
+
+    @ApiModelProperty(value = "工程项目")
+    private String projectName;
+
+    @ApiModelProperty(value = "使用单位")
+    private String useUnit;
+
+}

+ 22 - 0
src/main/java/com/zfire/mall/manager/bean/engin/sys/EnginSysReqResult.java

@@ -0,0 +1,22 @@
+package com.zfire.mall.manager.bean.engin.sys;
+
+import lombok.Data;
+
+@Data
+public class EnginSysReqResult {
+    private static final long serialVersionUID=1L;
+    /**
+     * 消息状态
+     */
+    private int status;
+
+    /**
+     * 返回消息
+     */
+    private String msg;
+
+    /**
+     * 返回数据
+     */
+    private Object data;
+}

+ 103 - 0
src/main/java/com/zfire/mall/manager/bean/engin/sys/Machine4Agency.java

@@ -0,0 +1,103 @@
+package com.zfire.mall.manager.bean.engin.sys;
+
+import com.zfire.mall.manager.bean.wallet.CustomerWalletBean;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Data
+@ApiModel
+public class Machine4Agency {
+
+    /**
+     * id
+     */
+    private int id;
+    /**
+     * organizationid(组织表id)
+     */
+    private int organizationid;
+    /**
+     * billsid(agenci_bills表)
+     */
+    private int billsid;
+    /**
+     * machineid(machine表)
+     */
+    private int machineid;
+    /**
+     * 价格
+     */
+    @ApiModelProperty(value = "价格")
+    private Integer price;
+    /**
+     * 数量
+     */
+    @ApiModelProperty(value = "数量")
+    private Integer num;
+    /**
+     * 描述
+     */
+    @ApiModelProperty(value = "描述")
+    private String discri;
+
+    @ApiModelProperty(value = "总金额")
+    private Integer totality;
+    /**
+     * 物料代码
+     */
+    @ApiModelProperty(value = "物料代码")
+    private String code;
+    /**
+     * 机型说明
+     */
+    @ApiModelProperty(value = "机型说明")
+    private String machine;
+    /**
+     * 类别
+     */
+    @ApiModelProperty(value = "类别")
+    private String category;
+
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ApiModelProperty(value = "金蝶物料名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "金蝶物料编码")
+    private String materialNumber;
+
+    @ApiModelProperty(value = "金蝶物料旧编码")
+    private String materialOldNumber;
+
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+    @ApiModelProperty(value = "销售类型id")
+    private String saleTypeId;
+
+    @ApiModelProperty(value = "销售类型编码")
+    private String saleTypeCode;
+
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleTypeName;
+
+    @ApiModelProperty(value = "已订数量")
+    private Integer hasDeliverQty;
+
+    @ApiModelProperty(value = "可用钱包列表")
+    private List<CustomerWalletBean> customerWalletList = new ArrayList<>();
+
+    @ApiModelProperty(value = "引用记录")
+    private Integer useRefCount;
+}

+ 542 - 0
src/main/java/com/zfire/mall/manager/bean/engin/v2/deposit/DepositManageVO.java

@@ -0,0 +1,542 @@
+package com.zfire.mall.manager.bean.engin.v2.deposit;
+
+import com.zfire.mall.manager.annotation.ZfireField;
+import com.zfire.mall.manager.annotation.ZfirePowerField;
+import com.zfire.mall.manager.enums.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel
+public class DepositManageVO {
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "押金管理编号")
+    private String depositManageId;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "企业id")
+    private String adminCompanyId;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "客户id")
+    private String customerId;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "工程登录编号")
+    private String refEnginRecordNo;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "特价项目编号")
+    private String specialItemNo;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "厂编号")
+    private String factoryNo;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "特价编号")
+    private String specialNo;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "交单编号")
+    private String billNo;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "安装时间")
+    private Date installDate;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "行业类别")
+    private String refTradeCategory;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "使用单位")
+    private String refUseUnit;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "区域")
+    private String refRegionWork;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "申请时间")
+    private Date submitTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "受理时间")
+    private Date confirmTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "经销商编码")
+    private String customerNumber;
+
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "寄厂日期")
+//    private Date sendFactoryDate;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "寄厂日期")
+    private Date mailFactoryDate;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "寄厂年度")
+    private String mailFactoryYear;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "确认日期")
+    private Date confirmDate;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "结算编号")
+    private Long settlementNo;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "结算日期")
+    private Date settlementDate;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "工程类型")
+    private OrderTypeEnum enginOrderType;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "经销商名称")
+    private String customerName;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "格力内部备注")
+    private String geLiInerNote;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "物料编码")
+    private String materialNumber;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "产品名称")
+    private String materialName;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "厂产品编码")
+    private String materialOldNumber;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "实装产品名称")
+    private String realMaterialName;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "实装物料编码")
+    private String realMaterialNumber;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "实装厂产品编码")
+    private String realMaterialOldNumber;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "实装规格型号")
+    private String realSpecification;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "实装产品名称")
+    private String depositMaterialName;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "实装物料编码")
+    private String depositMaterialNumber;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "实装厂产品编码")
+    private String depositMaterialOldNumber;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "实装规格型号")
+    private String depositSpecification;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "项目类别")
+    private String refProjectCategory;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "项目名称")
+    private String refProjectName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "项目类型")
+    private String refProjectType;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "项目说明")
+    private String refProjectNote;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "安装地址")
+    private String refInstallAddress;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "项目编号")
+    private String refProjectNo;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "跨区厂编号")
+    private String refFactoryNo;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "工程登录类型")
+    private String refPromiseStatus;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "联系人")
+    private String refLinkman;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "联系电话")
+    private String refPhone;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "固定电话")
+    private String refTel;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "第几申报")
+    private String refDeclareNo;
+
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "权限分类")
+//    private String refPowerCategory;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "机型类别")
+    private String refMachineType;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "购买单位名称")
+    private String refBuyUnitName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "提交保证函")
+    private String refPromiseProvide;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "保证函受理状态")
+    private String refPromiseAcceptStatus;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "保证函备注")
+    private String refPromisePriceRemark;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "跟进函备注")
+    private String refFollowAcceptRemark;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "附件备注")
+    private String refFjShenPiRemark;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "资料状态")
+    private String refDatumProvide;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "资料提交日期")
+    private Date refDatumProvideDate;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "资料审核结果")
+    private String refDatumAcceptStatus;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "大额工程")
+    private String refIsBigAmounts;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "合同变更批复结果")
+    private String refContractResult;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "合同变更审批意见")
+    private String refContractIdea;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "工程机转零售批复结果")
+    private String refToRetailResult;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "工程机转零售审批意见")
+    private String refToRetailIdea;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "资料延期批复结果")
+    private String refDataDelayResult;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "资料延期审批意见")
+    private String refDataDelayIdea;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "其他附件批复结果")
+    private String refOtherAnnexResult;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "其他附件审批意见")
+    private String refOtherAnnexIdea;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "资料审核日期")
+    private Date refDatumAcceptDate;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "登录有效期")
+    private Date refBillsExpireDate;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "工程订单格力回复")
+    private String refGeLiNote;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "工程订单格力内部备注")
+    private String refGeLiInerNote;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "是否不扣押金")
+    private IsEnum takeDeposit;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "销售类型")
+    private String saleTypeId;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleTypeName;
+
+//    @ApiModelProperty(value = "业务员")
+//    private String serviceId;
+
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "业务员名称")
+//    private String serviceName;
+
+    @ZfireField(tbName = "a", isTotal = true)
+    @ApiModelProperty(value = "订单总数量")
+    private Integer qty;
+
+    @ZfireField(tbName = "a", isTotal = true)
+    @ApiModelProperty(value = "押金总额")
+    private BigDecimal depositAmount;
+
+    @ZfireField(tbName = "a", isTotal = true)
+    @ApiModelProperty(value = "押金收差总额")
+    private BigDecimal depositDiffAmount;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "是否退押")
+    private IsEnum isRefundDeposit;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "订单格力内部备注")
+    private String orderGeLiInnerNote;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "格力内部资料备注")
+    private String geLiInnerDataNote;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "实际使用单位")
+    private String realUseUnit;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "实际安装地址")
+    private String realInstallAddress;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "申请退押金备注")
+    private String applyNote;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "审批通过后备注")
+    private String examineAfterRemark;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "补充资料备注")
+    private String amendRemark;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "复核备注")
+    private String reviewRemark;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "补充资料状态")
+    private DepositDataStateEnum dataState;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "单据状态")
+    private ExamineStatusEnum examineStatus;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "审核结果")
+    private ConfirmResultEnum confirmResult;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "实装金蝶物料id")
+    private String realMaterialId;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+    @ZfireField(tbName = "b", colName = "price")
+    @ApiModelProperty(value = "单价")
+    private BigDecimal itemPrice;
+
+    @ZfireField(tbName = "b", colName = "qty", isTotal = true)
+    @ApiModelProperty(value = "数量")
+    private Integer itemQty;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty(value = "金额")
+    private Integer itemTotalAmount;
+
+    @ZfireField(tbName = "b", colName = "remark")
+    @ApiModelProperty(value = "备注")
+    private String itemRemark;
+
+    @ZfireField(tbName = "b", colName = "deposit_amount", isTotal = true)
+    @ApiModelProperty(value = "押金金额")
+    private BigDecimal itemDepositAmount;
+
+    @ZfireField(tbName = "b", colName = "data_qty", isTotal = true)
+    @ApiModelProperty(value = "资料数量")
+    private Integer itemDataQty;
+
+    @ZfireField(tbName = "b", colName = "diff_amount", isTotal = true)
+    @ApiModelProperty(value = "收差金额")
+    private BigDecimal itemDiffAmount;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "押金数量")
+    private Integer hasSendQty;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty(value = "发货数量")
+    private Integer orderHasSendQty = 0;
+
+    @ZfireField(tbName = "b", colName = "contract_qty", isTotal = true)
+    @ApiModelProperty(value = "合同数量")
+    private Integer itemContractQty;
+
+    @ZfireField(tbName = "b", colName = "contract_price", type = "amount", isTotal = true)
+    @ApiModelProperty(value = "合同单价")
+    private BigDecimal itemContractPrice;
+
+    @ZfireField(tbName = "b", colName = "contract_amount", type = "amount", isTotal = true)
+    @ApiModelProperty(value = "合同金额")
+    private BigDecimal itemContractAmount;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "入厂日期")
+    private Date inFactoryDate;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "入厂类型")
+    private String inFactoryType;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "钱包序号")
+    private String customerWalletId;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "验收人")
+    private String checkBy;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "验收说明")
+    private String checkNote;
+//
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "验收日期")
+//    private Date checkDate;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "创建人")
+    private String createName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "更新人")
+    private String updateName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "提交人")
+    private String submitName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "审核人")
+    private String confirmName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "补充人")
+    private String amendName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "补充时间")
+    private Date amendTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "复核人")
+    private String reviewName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "复核时间")
+    private Date reviewTime;
+
+    @ZfireField(tbName = "b", isQuery = false)
+    @ApiModelProperty(value = "销售数量")
+    private Integer itemSalesQty;
+
+    @ZfireField(tbName = "b", isQuery = false)
+    @ApiModelProperty(value = "销售金额")
+    private BigDecimal itemSalesAmount;
+
+}

+ 289 - 0
src/main/java/com/zfire/mall/manager/bean/engin/v2/info/EnginInfoOrderVO.java

@@ -0,0 +1,289 @@
+package com.zfire.mall.manager.bean.engin.v2.info;
+
+import com.zfire.mall.manager.annotation.ZfireField;
+import com.zfire.mall.manager.enums.ExamineStatusEnum;
+import com.zfire.mall.manager.enums.IsEnum;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel
+public class EnginInfoOrderVO {
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "工程信息id")
+    private String enginInfoId;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "企业id")
+    private String adminCompanyId;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "客户id")
+    private String customerId;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "经销商编码")
+    private String customerNumber;
+
+    @ZfireField(tbName = "a", sortNum = 4)
+    @ApiModelProperty(value = "经销商名称")
+    private String customerName;
+
+    @ZfireField(tbName = "a", sortNum = 3)
+    @ApiModelProperty(value = "工程登录编号")
+    private String enginInfoNo;
+
+    @ZfireField(tbName = "a", sortNum = 2)
+    @ApiModelProperty(value = "订单日期")
+    private Date orderDate;
+
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "产品大类")
+//    private String mainId;
+//
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "产品大类名称")
+//    private String mainName;
+
+    @ZfireField(tbName = "a", sortNum = 5)
+    @ApiModelProperty(value = "项目名称")
+    private String projectName;
+
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "项目类型")
+//    private String projectType;
+//
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "项目说明")
+//    private String projectNote;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "机型类别")
+    private String machineType;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "使用单位")
+    private String useUnit;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "安装地址")
+    private String installAddress;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "工程编号")
+    private String projectNo;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "厂工程编号")
+    private String enginFactoryNo;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "工程登录类型")
+    private String enginSignType;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "行业类别")
+    private String tradeCategory;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "联系人")
+    private String linkman;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "联系电话")
+    private String phone;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "固定电话")
+    private String tel;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "第几申报")
+    private String declareNo;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "权限分类")
+    private String powerCategory;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "业务员")
+    private String serviceId;
+
+    @ZfireField(tbName = "a", sortNum = 6)
+    @ApiModelProperty(value = "表头业务员")
+    private String serviceName;
+
+    @ZfireField(tbName = "a", sortNum = 21, isQuery = false)
+    @ApiModelProperty(value = "合同有效期")
+    private Date contractExpireDate;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "格力回复")
+    private String geLiNote;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "格力内部备注")
+    private String geLiInerNote;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "文件编号")
+    private String fileNo;
+
+    @ZfireField(tbName = "a", type = "select", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "是否旧单导入")
+    private IsEnum isOldOrder;
+
+    @ZfireField(tbName = "a", type = "select", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "是否计划单")
+    private IsEnum isPlanOrder;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ZfireField(tbName = "a", sortNum = 20, isQuery = false)
+    @ApiModelProperty(value = "审核说明")
+    private String examineNote;
+
+    @ZfireField(tbName = "a", sortNum = 1)
+    @ApiModelProperty(value = "单据状态")
+    private ExamineStatusEnum examineStatus;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "是否提前完结")
+    private IsEnum endStatus;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "制表人")
+    private String createName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "制表时间")
+    private Date createTime;
+
+    @ZfireField(tbName = "a", sortNum = 23, isQuery = false)
+    @ApiModelProperty(value = "更新人")
+    private String updateName;
+
+    @ZfireField(tbName = "a", sortNum = 24, isQuery = false)
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "提交人")
+    private String submitName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "提交时间")
+    private Date submitTime;
+
+    @ZfireField(tbName = "a", sortNum = 18, isQuery = false)
+    @ApiModelProperty(value = "审核人")
+    private String confirmName;
+
+    @ZfireField(tbName = "a", sortNum = 19, isQuery = false)
+    @ApiModelProperty(value = "审核时间")
+    private Date confirmTime;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "弃审人")
+    private String abandonName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "弃审时间")
+    private Date abandonTime;
+
+    @ZfireField(tbName = "a", sortNum = 22)
+    @ApiModelProperty(value = "是否关闭")
+    private IsEnum isClose;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "明细id")
+    private String id;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "销售类型id")
+    private String saleTypeId;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "销售类型编码")
+    private String saleTypeCode;
+
+    @ZfireField(tbName = "b", sortNum = 16, isQuery = false)
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleTypeName;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "物料编码")
+    private String materialNumber;
+
+    @ZfireField(tbName = "b", sortNum = 7, isQuery = false)
+    @ApiModelProperty(value = "产品名称")
+    private String materialName;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "厂产品编码")
+    private String materialOldNumber;
+
+    @ZfireField(tbName = "b", sortNum = 9)
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+    @ZfireField(tbName = "b", sortNum = 11, isQuery = false)
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price;
+
+    @ZfireField(tbName = "b", sortNum = 10, isQuery = false)
+    @ApiModelProperty(value = "数量")
+    private Integer qty;
+
+    @ZfireField(tbName = "b", sortNum = 12, isQuery = false)
+    @ApiModelProperty(value = "总金额")
+    private BigDecimal totalAmount;
+
+    @ZfireField(tbName = "b", colName = "remark", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "备注")
+    private String itemRemark;
+
+    @ZfireField(isQuery = false, sortNum = 13)
+    @ApiModelProperty(value = "可订数量")
+    private String surplusQty;
+
+    @ZfireField(tbName = "b", sortNum = 14, isQuery = false)
+    @ApiModelProperty(value = "已订数量")
+    private Integer hasOrderQty;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "出库数量")
+    private String hasDeliverQty;
+
+    @ZfireField(isQuery = false, sortNum = 15)
+    @ApiModelProperty(value = "发货数量")
+    private String hasSendQty;
+
+    @ZfireField(tbName = "kdm", sortNum = 8)
+    @ApiModelProperty(value = "物料分组名称")
+    private String materialGroupName;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "税率")
+    private BigDecimal taxRate;
+
+    @ZfireField(tbName = "kdm", sortNum = 17, isQuery = false)
+    @ApiModelProperty(value = "存货类别")
+    private String categoryName;
+
+}

+ 129 - 0
src/main/java/com/zfire/mall/manager/bean/engin/v2/info/EnginInfoSaleExecVO.java

@@ -0,0 +1,129 @@
+package com.zfire.mall.manager.bean.engin.v2.info;
+
+import com.zfire.mall.manager.annotation.ZfireField;
+import com.zfire.mall.manager.enums.IsEnum;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@ApiModel
+public class EnginInfoSaleExecVO {
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("信息单日期")
+    private Date orderDate;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty("工程登录编号")
+    private String refEnginRecordNo;
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("经销商编码")
+    private String customerNumber;
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("经销商名称")
+    private String customerName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty("项目名称")
+    private String refProjectName;
+
+    @ZfireField(tbName = "d")
+    @ApiModelProperty("销售类型")
+    private String saleTypeName;
+
+    @ZfireField(tbName = "d")
+    @ApiModelProperty("物料编码")
+    private String materialNumber;
+
+    @ZfireField(tbName = "d")
+    @ApiModelProperty("厂产品代码")
+    private String materialOldNumber;
+
+    @ZfireField(tbName = "d")
+    @ApiModelProperty("产品名称")
+    private String materialName;
+
+    @ZfireField(tbName = "d")
+    @ApiModelProperty("规格型号")
+    private String specification;
+
+    @ZfireField(tbName = "d")
+    @ApiModelProperty("数量")
+    private Integer qty;
+
+    @ZfireField(tbName = "d")
+    @ApiModelProperty("单价")
+    private BigDecimal price;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty("金额")
+    private BigDecimal totalAmount;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty("未订数量")
+    private Integer wdQty;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty("未订金额")
+    private BigDecimal wdAmount;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty("直调数量")
+    private Integer directTransferQty;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty("退订数量")
+    private Integer retiredQty;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty("退货数量")
+    private Integer refundProductQty;
+
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("表头业务员")
+    private String serviceName;
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("审核人")
+    private String confirmName;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty("是否关闭")
+    private String isClose = IsEnum.NO.getValue();
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("备注")
+    private String remark;
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("格力内部备注")
+    private String geLiInerNote;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty("权限分类")
+    private String refPowerCategory;
+
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("合同有效期")
+    private Date contractExpireDate;
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("安装地址")
+    private String installAddress;
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("联系电话")
+    private String phone;
+
+    @ZfireField(tbName = "c")
+    @ApiModelProperty("工程登录类型")
+    private String enginSignType;
+}

+ 4 - 0
src/main/java/com/zfire/mall/manager/bean/engin/v2/order/EnginOrderVO.java

@@ -0,0 +1,4 @@
+package com.zfire.mall.manager.bean.engin.v2.order;
+
+public class EnginOrderVO {
+}

+ 540 - 0
src/main/java/com/zfire/mall/manager/bean/engin/v2/order/HomeEnginOrderVO.java

@@ -0,0 +1,540 @@
+package com.zfire.mall.manager.bean.engin.v2.order;
+
+import com.zfire.mall.manager.annotation.ZfireField;
+import com.zfire.mall.manager.annotation.ZfirePowerField;
+import com.zfire.mall.manager.enums.ExamineStatusEnum;
+import com.zfire.mall.manager.enums.IsEnum;
+import com.zfire.mall.manager.enums.OrderTypeEnum;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class HomeEnginOrderVO extends EnginOrderVO {
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "engin_order_id")
+    private String enginOrderId;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "企业id")
+    private String adminCompanyId;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "客户id")
+    private String customerId;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "经销商编码")
+    private String customerNumber;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "经销商名称")
+    private String customerName;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "业务员编号")
+    private String serviceId;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "业务员")
+    private String serviceName;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "销售类型id")
+    private String saleTypeId;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "销售类型编码")
+    private String saleTypeCode;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleTypeName;
+
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "工程机系统帐号")
+//    private String enginUserName;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "工程类型 TRADE=商用 HOME=家用")
+    private OrderTypeEnum enginOrderType;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "工程订单号")
+    private String enginOrderNo;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "订单日期")
+    private Date orderDate;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "工程登录编号")
+    private String refEnginRecordNo;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "项目类别")
+    private String refProjectCategory;
+
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "项目名称")
+//    private String refProjectName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "项目类型")
+    private String refProjectType;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "项目说明")
+    private String refProjectNote;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "使用单位")
+    private String refUseUnit;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "安装地址")
+    private String refInstallAddress;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "项目编号")
+    private String refProjectNo;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "跨区厂编号")
+    private String refFactoryNo;
+
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "工程登录类型")
+//    private String refPromiseStatus;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "行业类别")
+    private String refTradeCategory;
+
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "权限分类")
+//    private String refPowerCategory;
+
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "机型类别")
+//    private String refMachineType;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "购买单位名称")
+    private String refBuyUnitName;
+
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "购买单位联系人")
+    private String refBuyUnitCallMen;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "购买单位固定电话")
+    private String refBuyUnitTel;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "购买单位手机")
+    private String refBuyUnitPhone;
+
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "保证函")
+    private String refPromiseProvide;
+
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "合同变更批复结果")
+    private String refContractResult;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "合同变更审批意见")
+    private String refContractIdea;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "工程机转零售批复结果")
+    private String refToRetailResult;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "工程机转零售审批意见")
+    private String refToRetailIdea;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "资料延期批复结果")
+    private String refDataDelayResult;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "资料延期审批意见")
+    private String refDataDelayIdea;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "其他附件批复结果")
+    private String refOtherAnnexResult;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "其他附件审批意见")
+    private String refOtherAnnexIdea;
+
+    @ApiModelProperty(value = "登录有效期")
+    private Date refBillsExpireDate;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "区域")
+    private String refRegionWork;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "引用次数")
+    private Integer refCount;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "联系人")
+    private String refLinkman;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "联系电话")
+    private String refPhone;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "固定电话")
+    private String refTel;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "第几申报")
+    private String refDeclareNo;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "文件编号")
+    private String fileNo;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "是否不扣押金")
+    private IsEnum takeDeposit;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "是否直调完结")
+    private IsEnum directTransferStatus;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "格力回复")
+    private String geLiNote;
+
+    @ZfirePowerField
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "格力内部备注")
+    private String geLiInerNote;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "表头备注")
+    private String remark;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "审核说明")
+    private String examineNote;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "单据状态")
+    private ExamineStatusEnum examineStatus;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "制单人")
+    private String createName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "制单日期")
+    private Date createTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "最后更新人")
+    private String updateName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "最后更新日期")
+    private Date updateTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "提交人")
+    private String submitName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "提交日期")
+    private Date submitTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "审核人")
+    private String confirmName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "审核日期")
+    private Date confirmTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "弃审人")
+    private String abandonName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "弃审日期")
+    private Date abandonTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "关闭人")
+    private String closeName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "关闭日期")
+    private Date closeTime;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "直调完结人")
+    private String endDirectName;
+
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "直调完结日期")
+    private Date endDirectTime;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "明细id")
+    private String id;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "工程订单id")
+    private String parentId;
+
+//    @ApiModelProperty(value = "引用记录")
+//    private Integer useRefCount;
+
+//    @ZfireField(tbName = "b", colName = "sale_type_id")
+//    @ApiModelProperty(value = "明细销售类型id")
+//    private String itemSaleTypeId;
+
+//    @ZfireField(tbName = "b", colName = "sale_type_code")
+//    @ApiModelProperty(value = "明细销售类型编码")
+//    private String itemSaleTypeCode;
+
+//    @ZfireField(tbName = "b", colName = "sale_type_name")
+//    @ApiModelProperty(value = "明细销售类型名称")
+//    private String itemSaleTypeName;
+
+//    @ApiModelProperty(value = "明细业务员")
+//    private String itemServiceId;
+
+//    @ZfireField(tbName = "b", colName = "service_name")
+//    @ApiModelProperty(value = "明细业务员名称")
+//    private String itemServiceName;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "金蝶物料id")
+    private String materialId;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "物料编码")
+    private String materialNumber;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "厂产品代码")
+    private String materialOldNumber;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "产品名称")
+    private String materialName;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+    //    @ZfireField(tbName = "b")
+//    @ApiModelProperty(value = "登录单单价")
+//    private BigDecimal enginPrice;
+//
+//    @ZfireField(tbName = "b")
+//    @ApiModelProperty(value = "登录单金额")
+//    private BigDecimal enginTotality;
+//
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "工程登录数量")
+    private Integer enginNum;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "数量")
+    private Integer qty;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "格力折扣")
+    private BigDecimal discAmount;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "订单金额")
+    private BigDecimal totalAmount;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "返利比例")
+    private BigDecimal rebateRate;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "返利金额")
+    private BigDecimal rebateAmount;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "押金比例")
+    private BigDecimal depositRate;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "现金钱包编号")
+    private String customerWalletId;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "现金钱包")
+    private String customerWalletName;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "返利类型编号")
+    private String customerWalletId2;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "返利类型")
+    private String customerWalletName2;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "是否直调")
+    private IsEnum isDirectTransfer;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "直调数量")
+    private Integer directTransferQty;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "出库数量")
+    private Integer hasSendQty;
+
+    //    @ApiModelProperty(value = "单个商品的返利金额(实际扣除的返利金额/qty)")
+//    private BigDecimal singleRebateAmount;
+//
+//    @ApiModelProperty(value = "单个商品的折扣金额(折扣金额/qty)")
+//    private BigDecimal singleDiscAmount;
+//
+//    @ApiModelProperty(value = "单个商品的实际支付金额(实际支付金额/qty)")
+//    private BigDecimal singlePayPrice;
+//
+//    @ApiModelProperty(value = "单个商品的押金金额(单个商品的实际支付金额*押金比例)")
+//    private BigDecimal singleDepositAmount;
+//
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "实付金额")
+    private BigDecimal payAmount;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "实付返利金额")
+    private BigDecimal payRebateAmount;
+//
+//    @ApiModelProperty(value = "实际支付的现金金额")
+//    private BigDecimal payCashAmount;
+//
+//    @ApiModelProperty(value = "实际支付的信用金额")
+//    private BigDecimal payCreditAmount;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "总押金金额")
+    private BigDecimal totalDepositAmount;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "原订单数量")
+    private Integer oldQty;
+
+    @ApiModelProperty(value = "原实付金额")
+    private BigDecimal oldPayAmount;
+//    @ApiModelProperty(value = "原实付返利金额")
+//    private BigDecimal oldRebateAmount;
+//
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "税率")
+    private BigDecimal tax;
+
+    @ZfireField(isQuery = false, isTotal = true)
+    @ApiModelProperty(value = "可退订数量")
+    private Integer refundableQty;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "已退订数量")
+    private Integer retiredQty;
+
+    @ZfireField(tbName = "b", colName = "remark")
+    @ApiModelProperty(value = "表体备注")
+    private String itemRemark;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "退货数量")
+    private Integer refundProductQty;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "退货金额")
+    private BigDecimal refundProductAmount;
+
+    @ZfireField(tbName = "b", isTotal = true)
+    @ApiModelProperty(value = "发货数量")
+    private Integer applySendQty;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty("实装物料id")
+    private String realMaterialId;
+
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty("实装机型名称")
+    private String realMaterialName;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty("实装物料编码")
+    private String realMaterialNumber;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty("实装产品编码")
+    private String realMaterialOldNumber;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty("实装机型规格")
+    private String realSpecification;
+
+//    @ApiModelProperty("发货仓库ID")
+//    private String correspondId;
+//
+//    @ApiModelProperty("发货仓库")
+//    private String correspondName;
+
+    @ZfireField(tbName = "kdm")
+    @ApiModelProperty("物料分组")
+    private String materialGroupName;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty("存货类别")
+    private String k3CategoryName;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty(value = "销售数量")
+    private Integer itemSalesQty;
+
+    @ZfireField(isQuery = false)
+    @ApiModelProperty(value = "销售金额")
+    private BigDecimal itemSalesAmount;
+
+    @ZfireField(tbName = "b", colName = "direct_deposit_amount")
+    @ApiModelProperty(value = "直发剩余押金")
+    private BigDecimal itemDirectDepositAmount;
+
+    public Integer getApplySendQty() {
+        return Math.max((qty - refundableQty), 0);
+    }
+
+}

+ 474 - 0
src/main/java/com/zfire/mall/manager/bean/engin/v2/order/TradeEnginOrderVO.java

@@ -0,0 +1,474 @@
+package com.zfire.mall.manager.bean.engin.v2.order;
+
+import com.zfire.mall.manager.annotation.ZfireField;
+import com.zfire.mall.manager.enums.ExamineStatusEnum;
+import com.zfire.mall.manager.enums.IsEnum;
+import com.zfire.mall.manager.enums.OrderTypeEnum;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+@ApiModel
+public class TradeEnginOrderVO extends EnginOrderVO {
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "engin_order_id")
+    private String enginOrderId;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "企业id")
+    private String adminCompanyId;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "客户id")
+    private String customerId;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "经销商编码")
+    private String customerNumber;
+
+    @ZfireField(tbName = "a", sortNum = 6)
+    @ApiModelProperty(value = "经销商名称")
+    private String customerName;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "表头业务员编号")
+    private String serviceId;
+
+    @ZfireField(tbName = "a", sortNum = 7)
+    @ApiModelProperty(value = "表头业务员")
+    private String serviceName;
+
+//    @ZfireField(tbName = "a", hide = true)
+//    @ApiModelProperty(value = "销售类型id")
+//    private String saleTypeId;
+//
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "销售类型编码")
+//    private String saleTypeCode;
+//
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "销售类型名称")
+//    private String saleTypeName;
+//
+//    @ZfireField(tbName = "a")
+//    @ApiModelProperty(value = "工程机系统帐号")
+//    private String enginUserName;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "工程类型 TRADE=商用 HOME=家用")
+    private OrderTypeEnum enginOrderType;
+
+    @ZfireField(tbName = "a", sortNum = 5)
+    @ApiModelProperty(value = "工程订单号")
+    private String enginOrderNo;
+
+    @ZfireField(tbName = "a", sortNum = 3)
+    @ApiModelProperty(value = "订单日期")
+    private Date orderDate;
+
+    @ZfireField(tbName = "a", sortNum = 19)
+    @ApiModelProperty(value = "工程信息单号")
+    private String refEnginRecordNo;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "项目类别")
+    private String refProjectCategory;
+
+    @ZfireField(tbName = "a", sortNum = 8)
+    @ApiModelProperty(value = "项目名称")
+    private String refProjectName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "项目类型")
+    private String refProjectType;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "项目说明")
+    private String refProjectNote;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "使用单位")
+    private String refUseUnit;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "安装地址")
+    private String refInstallAddress;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "工程编号")
+    private String refProjectNo;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "跨区厂编号")
+    private String refFactoryNo;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "工程登录类型")
+    private String refPromiseStatus;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "行业类别")
+    private String refTradeCategory;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "权限分类")
+    private String refPowerCategory;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "机型类别")
+    private String refMachineType;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "购买单位名称")
+    private String refBuyUnitName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "保证函")
+    private String refPromiseProvide;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "区域")
+    private String refRegionWork;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "引用次数")
+    private Integer refCount;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "联系人")
+    private String refLinkman;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "联系电话")
+    private String refPhone;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "固定电话")
+    private String refTel;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "第几申报")
+    private String refDeclareNo;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "文件编号")
+    private String fileNo;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "是否不扣押金")
+    private IsEnum takeDeposit;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "是否直调完结")
+    private IsEnum directTransferStatus;
+
+    @ZfireField(tbName = "a", hide = true)
+    @ApiModelProperty(value = "格力回复")
+    private String geLiNote;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "格力内部备注")
+    private String geLiInerNote;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    @ZfireField(tbName = "a", sortNum = 25, isQuery = false)
+    @ApiModelProperty(value = "审核说明")
+    private String examineNote;
+
+    @ZfireField(tbName = "a", sortNum = 1)
+    @ApiModelProperty(value = "单据状态")
+    private ExamineStatusEnum examineStatus;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "制单人")
+    private String createName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "制单日期")
+    private Date createTime;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "最后更新人")
+    private String updateName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "最后更新日期")
+    private Date updateTime;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "提交人")
+    private String submitName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "提交日期")
+    private Date submitTime;
+
+    @ZfireField(tbName = "a", sortNum = 23, isQuery = false)
+    @ApiModelProperty(value = "审核人")
+    private String confirmName;
+
+    @ZfireField(tbName = "a", sortNum = 24, isQuery = false)
+    @ApiModelProperty(value = "审核日期")
+    private Date confirmTime;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "弃审人")
+    private String abandonName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "弃审日期")
+    private Date abandonTime;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "关闭人")
+    private String closeName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "关闭日期")
+    private Date closeTime;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "直调完结人")
+    private String endDirectName;
+
+    @ZfireField(tbName = "a", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "直调完结日期")
+    private Date endDirectTime;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "明细id")
+    private String id;
+
+    @ZfireField(tbName = "b", hide = true)
+    @ApiModelProperty(value = "工程订单id")
+    private String parentId;
+
+//    @ApiModelProperty(value = "引用记录")
+//    private Integer useRefCount;
+
+//    @ZfireField(tbName = "b", colName = "sale_type_id")
+//    @ApiModelProperty(value = "明细销售类型id")
+//    private String itemSaleTypeId;
+
+    @ZfireField(tbName = "b", colName = "sale_type_code", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "销售类型编码")
+    private String itemSaleTypeCode;
+
+    @ZfireField(tbName = "b", colName = "sale_type_name", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "销售类型名称")
+    private String itemSaleTypeName;
+
+//    @ApiModelProperty(value = "明细业务员")
+//    private String itemServiceId;
+
+    @ZfireField(tbName = "b", colName = "service_name", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "业务员名称")
+    private String itemServiceName;
+
+//    @ZfireField(tbName = "b")
+//    @ApiModelProperty(value = "金蝶物料id")
+//    private String materialId;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "物料编码")
+    private String materialNumber;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "厂产品代码")
+    private String materialOldNumber;
+
+    @ZfireField(tbName = "b", sortNum = 9, isQuery = false)
+    @ApiModelProperty(value = "产品名称")
+    private String materialName;
+
+    @ZfireField(tbName = "b", sortNum = 11)
+    @ApiModelProperty(value = "规格型号")
+    private String specification;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "基本单位编码")
+    private String unit;
+
+//    @ZfireField(tbName = "b")
+//    @ApiModelProperty(value = "信息单单价")
+//    private BigDecimal enginPrice;
+//
+//    @ZfireField(tbName = "b")
+//    @ApiModelProperty(value = "信息单金额")
+//    private BigDecimal enginTotality;
+//
+//    @ZfireField(tbName = "b")
+//    @ApiModelProperty(value = "信息单数量")
+//    private Integer enginNum;
+
+    @ZfireField(tbName = "b", isTotal = true, sortNum = 12, isQuery = false)
+    @ApiModelProperty(value = "数量")
+    private Integer qty;
+
+    @ZfireField(tbName = "b", sortNum = 13, isQuery = false)
+    @ApiModelProperty(value = "单价")
+    private BigDecimal price;
+
+    @ZfireField(tbName = "b", isTotal = true, isShow = false, isQuery = false)
+    @ApiModelProperty(value = "格力折扣")
+    private BigDecimal discAmount;
+
+    @ZfireField(tbName = "b", isTotal = true, sortNum = 14, isQuery = false)
+    @ApiModelProperty(value = "订单金额")
+    private BigDecimal totalAmount;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "返利钱包的返利比例")
+    private BigDecimal rebateRate;
+
+    @ZfireField(tbName = "b", isTotal = true, isShow = false, isQuery = false)
+    @ApiModelProperty(value = "返利金额")
+    private BigDecimal rebateAmount;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "押金比例")
+    private BigDecimal depositRate;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "现金钱包编号")
+    private String customerWalletId;
+
+    @ZfireField(tbName = "b", sortNum = 20, isQuery = false)
+    @ApiModelProperty(value = "现金钱包")
+    private String customerWalletName;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "返利类型编号")
+    private String customerWalletId2;
+
+    @ZfireField(tbName = "b", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "返利类型")
+    private String customerWalletName2;
+
+    @ZfireField(tbName = "b", sortNum = 4)
+    @ApiModelProperty(value = "是否直调")
+    private IsEnum isDirectTransfer;
+
+    @ZfireField(tbName = "b", isTotal = true, sortNum = 21, isQuery = false)
+    @ApiModelProperty(value = "直调数量")
+    private Integer directTransferQty;
+
+    @ZfireField(tbName = "b", isTotal = true, isShow = false, isQuery = false)
+    @ApiModelProperty(value = "出库数量")
+    private Integer hasSendQty;
+
+    //    @ApiModelProperty(value = "单个商品的返利金额(实际扣除的返利金额/qty)")
+//    private BigDecimal singleRebateAmount;
+//
+//    @ApiModelProperty(value = "单个商品的折扣金额(折扣金额/qty)")
+//    private BigDecimal singleDiscAmount;
+//
+//    @ApiModelProperty(value = "单个商品的实际支付金额(实际支付金额/qty)")
+//    private BigDecimal singlePayPrice;
+//
+//    @ApiModelProperty(value = "单个商品的押金金额(单个商品的实际支付金额*押金比例)")
+//    private BigDecimal singleDepositAmount;
+//
+    @ZfireField(sortNum = 16, isQuery = false)
+    @ApiModelProperty(value = "实付金额")
+    private BigDecimal payAmount;
+
+    @ZfireField(tbName = "b", isTotal = true, sortNum = 15, isQuery = false)
+    @ApiModelProperty(value = "实付返利金额")
+    private BigDecimal payRebateAmount;
+//
+//    @ApiModelProperty(value = "实际支付的现金金额")
+//    private BigDecimal payCashAmount;
+//
+//    @ApiModelProperty(value = "实际支付的信用金额")
+//    private BigDecimal payCreditAmount;
+
+//    @ZfireField(tbName = "b", isTotal = true)
+//    @ApiModelProperty(value = "总押金金额")
+//    private BigDecimal totalDepositAmount;
+
+    @ZfireField(tbName = "b", isTotal = true, isShow = false, isQuery = false)
+    @ApiModelProperty(value = "原订单数量")
+    private Integer oldQty;
+
+//    @ApiModelProperty(value = "原实付金额")
+//    private BigDecimal oldPayAmount;
+//
+//    @ApiModelProperty(value = "原实付返利金额")
+//    private BigDecimal oldRebateAmount;
+//
+//    @ApiModelProperty(value = "税率例如: 0.13")
+//    private BigDecimal tax;
+
+    @ZfireField(isQuery = false, isTotal = true, isShow = false)
+    @ApiModelProperty(value = "可退订数量")
+    private Integer refundableQty;
+
+    @ZfireField(tbName = "b", isTotal = true, sortNum = 18, isQuery = false)
+    @ApiModelProperty(value = "已退订数量")
+    private Integer retiredQty;
+
+    @ZfireField(tbName = "b", colName = "remark", isShow = false, isQuery = false)
+    @ApiModelProperty(value = "表体备注")
+    private String itemRemark;
+
+    @ZfireField(tbName = "b", isTotal = true, isShow = false, isQuery = false)
+    @ApiModelProperty(value = "退货数量")
+    private Integer refundProductQty;
+
+    @ZfireField(tbName = "b", isTotal = true, isShow = false, isQuery = false)
+    @ApiModelProperty(value = "退货金额")
+    private BigDecimal refundProductAmount;
+
+    @ZfireField(sortNum = 17, isQuery = false)
+    @ApiModelProperty(value = "发货数量")
+    private Integer applySendQty;
+//
+//    @ZfireField(tbName = "b")
+//    @ApiModelProperty("实装机型名称")
+//    private String realMaterialName;
+//
+//    @ZfireField(tbName = "b")
+//    @ApiModelProperty("实装机型编码")
+//    private String realMaterialNumber;
+//
+//    @ZfireField(tbName = "b")
+//    @ApiModelProperty("实装机型旧编码")
+//    private String realMaterialOldNumber;
+//
+//    @ZfireField(tbName = "b")
+//    @ApiModelProperty("实装机型规格")
+//    private String realSpecification;
+
+//    @ApiModelProperty("发货仓库ID")
+//    private String correspondId;
+//
+//    @ApiModelProperty("发货仓库")
+//    private String correspondName;
+
+    @ZfireField(tbName = "kdm", sortNum = 10)
+    @ApiModelProperty("物料分组")
+    private String materialGroupName;
+
+    @ZfireField(tbName = "b", sortNum = 22, isQuery = false)
+    @ApiModelProperty("存货类别")
+    private String k3CategoryName;
+
+    @ZfireField(tbName = "a", sortNum = 2)
+    @ApiModelProperty(value = "仓库名称")
+    private String correspondName;
+
+    public Integer getApplySendQty() {
+        return Math.max((qty - refundableQty), 0);
+    }
+}

+ 27 - 0
src/main/java/com/zfire/mall/manager/bean/front/CallBackItemDTO.java

@@ -0,0 +1,27 @@
+package com.zfire.mall.manager.bean.front;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author changelin
+ */
+@ApiModel
+@Data
+public class CallBackItemDTO {
+
+    @ApiModelProperty(value = "回调类型枚举")
+    private String callBackType;
+
+    @ApiModelProperty(value = "创建时间")
+    private List<CallBackItemList> callBackItemList;
+
+
+
+
+
+
+}

+ 17 - 0
src/main/java/com/zfire/mall/manager/bean/front/CallBackItemList.java

@@ -0,0 +1,17 @@
+package com.zfire.mall.manager.bean.front;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+@ApiModel
+@Data
+public class CallBackItemList {
+
+    @ApiModelProperty(value = "回调id")
+    private Integer itemId;
+
+    @ApiModelProperty(value = "状态")
+    private String status;
+}

+ 179 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostBillListVO.java

@@ -0,0 +1,179 @@
+package com.zfire.mall.manager.bean.front;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.zfire.mall.manager.annotation.ZfireField;
+import com.zfire.mall.manager.enums.*;
+import com.zfire.mall.manager.plus.entity.CostBill;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gejiang
+ * @since 2023-04-08
+ */
+@ApiModel
+@Data
+public class CostBillListVO   {
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "账单唯一id")
+    private String id;
+
+    @ApiModelProperty(value = "嘉贤创建时间")
+    private Date time;
+
+    @ApiModelProperty(value = "产品名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "物料名称")
+    private String materialCode;
+
+    @ApiModelProperty(value = "规格型号")
+    private String materialSpecification;
+
+    @ApiModelProperty(value = "物料类型")
+    private String materialType;
+
+    @ApiModelProperty(value = "账号对应物料数量")
+    private Integer materialNumber;
+
+    @ApiModelProperty(value = "订单号,物流单号或销售单号")
+    private String orderCode;
+
+    @ApiModelProperty(value = "退货单号")
+    private String returnOrderCode;
+
+    @ApiModelProperty(value = "商家编码")
+    private String merchantCode;
+
+    @ApiModelProperty(value = "商家名称")
+    private String merchantName;
+
+    @ApiModelProperty(value = "所属销售公司类型")
+    private JiaXianCostTypeEnum belongCompanyType;
+
+    @ApiModelProperty(value = "订单类型")
+    private JiaXianCostOrderTypeEnum orderType;
+
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "客户电话")
+    private String customerPhone;
+
+    @ApiModelProperty(value = "发货仓库编码")
+    private String warehouseCode;
+
+    @ApiModelProperty(value = " 发货仓库名称")
+    private String warehouseName;
+
+    @ApiModelProperty(value = "收货送货地址")
+    private String receiptAddress;
+
+    @ApiModelProperty(value = "订单类型细分")
+    private JiaXianOrderDetailTypeEnum orderTypeDetail;
+
+    @ApiModelProperty(value = "物料计费分类,空调生活家电等")
+    private String materialCostType;
+
+    @ApiModelProperty(value = "退货订单按单价计算")
+    private BigDecimal unitPrice;
+
+    @ApiModelProperty(value = "退货费用")
+    private BigDecimal returnOrderCost;
+
+    @ApiModelProperty(value = "商家承担费用")
+    private BigDecimal merchantCost;
+
+
+    @ApiModelProperty(value = "上楼卸货费用")
+    private BigDecimal unloadUpstairsCost;
+
+    @ApiModelProperty(value = "费用汇总,前面三个费用相加")
+    private BigDecimal totalCost;
+
+    @ApiModelProperty(value = "备注")
+    private String comment;
+
+    @ApiModelProperty(value = "订单时间")
+    private String orderDate;
+
+    @ApiModelProperty(value = "无法生成的原因")
+    private String errorResult;
+
+    @ApiModelProperty(value = " 是否已经对过帐")
+    private JiaXianCostIsEnum isAccountChecking;
+
+    @ApiModelProperty(value = " 是否已经审核")
+    private JiaXianCostIsEnum isAudit;
+
+    @ApiModelProperty(value = " 是否卸货")
+    private String isUnload;
+
+    @ApiModelProperty(value = " 是否上楼")
+    private String isUpstairs;
+
+    @ApiModelProperty(value = " 实际是否卸货")
+    private String isRealUnload;
+
+    @ApiModelProperty(value = "实际是否上楼")
+    private String isRealUpstairs;
+
+    @ApiModelProperty(value = "是否完结")
+    private JiaXianCostIsEnum isFinish;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+/*    @ApiModelProperty(value = "上个版本订单编码")
+    private String lastBillCode;*/
+
+    @ApiModelProperty(value = "商家对账单编号")
+    private String merchantCheckCode;
+
+    @ApiModelProperty(value = "销司对账单编号")
+    private String salesCheckCode;
+
+    @ApiModelProperty(value = "订单流程")
+    private JiaXianProcessStatusEnum processStatus;
+
+
+    @ApiModelProperty(value = "物料开单价")
+    private BigDecimal materialPrice;
+
+
+    @ApiModelProperty(value = "更新人")
+    private String updateUser;
+
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+    @ApiModelProperty(value = "订单编号")
+    private String billCode;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleType;
+
+    @ApiModelProperty(value = "供应链发货单号")
+    private String saleCode;
+
+    @ApiModelProperty(value = "商家费用汇总")
+    private String merchantCostSum;
+
+
+    @ApiModelProperty(value = "格力比例扣返利")
+    private String geliRebate;
+
+}

+ 170 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostBillVO.java

@@ -0,0 +1,170 @@
+package com.zfire.mall.manager.bean.front;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gejiang
+ * @since 2023-04-08
+ */
+@ApiModel
+@Data
+public class CostBillVO {
+
+
+    @ApiModelProperty(value = "账单唯一id")
+    private String id;
+
+    @ApiModelProperty(value = "嘉贤创建时间")
+    private Long createTime;
+
+    @ApiModelProperty(value = "产品名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "物料名称")
+    private String materialCode;
+
+    @ApiModelProperty(value = "规格型号")
+    private String materialSpecification;
+
+    @ApiModelProperty(value = "物料类型")
+    private String materialType;
+
+    @ApiModelProperty(value = "订单号,物流单号或销售单号")
+    private String orderCode;
+
+    @ApiModelProperty(value = "退货单号")
+    private String returnOrderCode;
+
+    @ApiModelProperty(value = "商家编码")
+    private String merchantCode;
+
+    @ApiModelProperty(value = "商家名称")
+    private String merchantName;
+
+    @ApiModelProperty(value = "所属销售公司类型,GE_JIANG(格匠)GUANG_ZHOU(广州销售公司)FO_SHAN(佛山销售公司)OTHER(其他销售公司)")
+    private String belongCompanyType;
+
+    @ApiModelProperty(value = "订单类型。TOB(商家机工程机类型),ALL(所有类型,广州的订单统一开单价),TOC(销售订单类型)")
+    private String orderType;
+
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "客户电话")
+    private String customerPhone;
+
+    @ApiModelProperty(value = "发货仓库编码")
+    private String warehouseCode;
+
+    @ApiModelProperty(value = " 发货仓库名称")
+    private String warehouseName;
+
+    @ApiModelProperty(value = "收货送货地址")
+    private String receiptAddress;
+
+    @ApiModelProperty(value = "订单类型细分。PICKING_UP_ORDER(前置仓提货订单)SALE_ORDER(销售订单),MERCHANT_WAREHOUSE_ORDER(商家仓订单)PROJECT_ORDER(工程机订单)SALE_RETURN_ORDER(销售退货单),")
+    private String orderTypeDetail;
+
+    @ApiModelProperty(value = "物料计费分类,空调生活家电等")
+    private String materialCostType;
+
+    @ApiModelProperty(value = "运费结算系数")
+    private BigDecimal coefficient;
+
+    @ApiModelProperty(value = "补贴结算系数")
+    private BigDecimal subsidyCoefficient;
+
+    @ApiModelProperty(value = "卸货上楼结算系数")
+    private BigDecimal unloadUpstairsCoefficient;
+
+    @ApiModelProperty(value = "退货订单按单价计算")
+    private BigDecimal unitPrice;
+
+    @ApiModelProperty(value = "最终算出来的运费")
+    private BigDecimal cost;
+
+    @ApiModelProperty(value = "补贴费用,补贴系数*开单价")
+    private BigDecimal allowanceCost;
+
+    @ApiModelProperty(value = "上楼卸货费用,上楼结算系数* 开单价")
+    private BigDecimal unloadUpstairsCost;
+
+    @ApiModelProperty(value = "费用汇总,前面三个费用相加")
+    private BigDecimal totalCost;
+
+    @ApiModelProperty(value = "备注")
+    private String comment;
+
+    @ApiModelProperty(value = "订单时间")
+    private String orderDate;
+
+    @ApiModelProperty(value = "无法生成的原因")
+    private String errorResult;
+
+    @ApiModelProperty(value = " 是否已经对过帐")
+    private String isAccountChecking;
+
+    @ApiModelProperty(value = " 是否已经审核")
+    private String isAudit;
+
+    @ApiModelProperty(value = " 是否卸货")
+    private String isUnload;
+
+    @ApiModelProperty(value = " 是否上楼")
+    private String isUpstairs;
+
+    @ApiModelProperty(value = " 实际是否卸货")
+    private String isRealUnload;
+
+    @ApiModelProperty(value = "实际是否上楼")
+    private String isRealUpstairs;
+
+    @ApiModelProperty(value = "是否完结 0 未完结,1 已经完结")
+    private Integer isFinish;
+
+
+    @ApiModelProperty(value = "上个版本订单编码")
+    private String lastBillCode;
+
+    @ApiModelProperty(value = "商家对账单编号")
+    private String merchanCheckCode;
+
+    @ApiModelProperty(value = "销司对账单编号")
+    private String salesCheckCode;
+
+    @ApiModelProperty(value = "订单流程")
+    private String processStatus;
+
+    @ApiModelProperty(value = "GE_JIANG,//所属哪一个销售公司计费规则,GE_JIANG(格 匠 ),GUANG_ZHOU( 广 州 销 售 公 司 ),FO_SHAN(佛山销售公司),OTHER(其他销售公司")
+    private String belongCompanyCostRule;
+
+    @ApiModelProperty(value = "物料开单价")
+    private BigDecimal materialPrice;
+
+    @ApiModelProperty(value = "是否已经被删除")
+    private String isDelete;
+
+    @ApiModelProperty(value = "0")
+    private String createOrg;
+
+    @ApiModelProperty(value = "0")
+    private String updateOrg;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateUser;
+
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+    @ApiModelProperty(value = "订单编号")
+    private String billCode;
+
+}

+ 24 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostMerchantCheckCodeList.java

@@ -0,0 +1,24 @@
+package com.zfire.mall.manager.bean.front;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gejiang
+ * @since 2023-04-08
+ */
+@ApiModel
+@Data
+public class CostMerchantCheckCodeList {
+
+
+    @ApiModelProperty(value = "list")
+    private List<String> costMerchantCheckCodeList;
+}

+ 157 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostMerchantListVO.java

@@ -0,0 +1,157 @@
+package com.zfire.mall.manager.bean.front;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.zfire.mall.manager.annotation.ZfireField;
+import com.zfire.mall.manager.enums.JiaXianProcessStatusEnum;
+import com.zfire.mall.manager.plus.entity.CostMerchant;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gejiang
+ * @since 2023-04-08
+ */
+@ApiModel
+@Data
+public class CostMerchantListVO   {
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "30")
+    private String id;
+
+    @ApiModelProperty(value = "商家对账单编码")
+    private String merchantCheckCode;
+
+    @ApiModelProperty(value = "销司对账单编码")
+    private String salesCheckCode;
+
+    @ApiModelProperty(value = "商家编码")
+    private String merchantCode;
+
+    @ApiModelProperty(value = "商家名称")
+    private String merchantName;
+
+    @ApiModelProperty(value = "对账人")
+    private String checkMan;
+
+
+
+    @ApiModelProperty(value = "对账时间")
+    private Date checkTimeSupply;
+
+
+    @ApiModelProperty(value = "自动核对时间")
+    private Date autoCheckTimeSupply;
+
+    @ApiModelProperty(value = "退货订单费用汇总")
+    private BigDecimal totalReturnOrderCost;
+
+    @ApiModelProperty(value = "商家应付费用")
+    private BigDecimal totalMerchantCost;
+
+
+    @ApiModelProperty(value = "上楼卸货费用")
+    private BigDecimal totalUnloadUpstairsCost;
+
+    @ApiModelProperty(value = "费用汇总")
+    private BigDecimal totalCost;
+
+
+    @ApiModelProperty(value = "对账时间范围的开始时间")
+    private Date startTimeSupply;
+
+
+    @ApiModelProperty(value = "对账时间范围的结束时间")
+    private Date endTimeSupply;
+
+    @ApiModelProperty(value = "备注")
+    private String comment;
+
+
+    @ApiModelProperty(value = "更新人")
+    private String updateUser;
+
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "是否已经被删除")
+    private String isDelete;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date costCreateTime;
+
+    @ApiModelProperty(value = "修改时间")
+    private Date costUpdateTime;
+
+    @ApiModelProperty(value = "流程状态")
+    private JiaXianProcessStatusEnum processStatus;
+
+    @ApiModelProperty(value = "发起异常工单得单号")
+    private String ticketCode;
+
+
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleType;
+
+    @ApiModelProperty(value = "商家费用汇总")
+    private String merchantCostSum;
+
+    @ApiModelProperty(value = "格力比例扣返利")
+    private String geliRebate;
+
+    @ApiModelProperty(value = "仓储物流费")
+    private BigDecimal tocCost;
+
+    @ApiModelProperty(value = "工程费")
+    private BigDecimal tobCost;
+
+    @ApiModelProperty(value = "TOC 补贴费用")
+    private BigDecimal tocAllowanceCost;
+
+    @ApiModelProperty(value = "TOB补贴费用")
+    private BigDecimal tobAllowanceCost;
+
+    @ApiModelProperty(value = "所属月份账单")
+    private String costTerm;
+
+    @ApiModelProperty(value = "发起商家对账时间")
+    private String startMerchantCheckTime;
+
+    @ApiModelProperty(value = "发起销司对账时间")
+    private String startSalesCheckTime;
+
+    @ApiModelProperty(value = "发起商家对账时间")
+    private Date startMerchantCheckTimeSupply;
+
+    @ApiModelProperty(value = "发起销司对账时间")
+    private Date startSalesCheckTimeSupply;
+
+    @ApiModelProperty(value = "其他费用")
+    private BigDecimal otherCost;
+
+    @ApiModelProperty(value = "其他费用附件")
+    private String otherCostAttachmentUrl;
+
+    @ApiModelProperty(value = "商家所属销售公司名称")
+    private String belongSalesCompanyName;
+
+    @ApiModelProperty(value = "商家所属销售公司名称编号")
+    private String belongSalesCompanyCode;
+
+    @ApiModelProperty(value = "商家简称")
+    private String merchantShortName;
+
+}

+ 107 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostMerchantVO.java

@@ -0,0 +1,107 @@
+package com.zfire.mall.manager.bean.front;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gejiang
+ * @since 2023-04-08
+ */
+@ApiModel
+@Data
+public class CostMerchantVO   {
+
+
+    @ApiModelProperty(value = "30")
+    @TableId(value = "id", type = IdType.ID_WORKER_STR)
+    private String id;
+
+    @ApiModelProperty(value = "商家对账单编码")
+    private String merchantCheckCode;
+
+    @ApiModelProperty(value = "销司对账单编码")
+    private String salesCheckCode;
+
+    @ApiModelProperty(value = "商家编码")
+    private String merchantCode;
+
+    @ApiModelProperty(value = "商家名称")
+    private String merchantName;
+
+    @ApiModelProperty(value = "对账人")
+    private String checkMan;
+
+    @ApiModelProperty(value = "对账时间")
+    private Long checkTime;
+
+    @ApiModelProperty(value = "对账时间")
+    private Date checkTimeSupply;
+
+    @ApiModelProperty(value = "自动核对时间。商家长时间不确认,系统自动确认")
+    private Long autoCheckTime;
+
+    @ApiModelProperty(value = "自动核对时间。商家长时间不确认,系统自动确认")
+    private Date autoCheckTimeSupply;
+
+    @ApiModelProperty(value = "退货订单费用汇总")
+    private BigDecimal totalReturnOrderCost;
+
+    @ApiModelProperty(value = "一般算出来的运费")
+    private BigDecimal totalMerchantCost;
+
+    @ApiModelProperty(value = "补贴费用,补贴系数*开单价")
+    private BigDecimal totalAllowanceCost;
+
+    @ApiModelProperty(value = "上楼卸货费用,上楼结算系数*开单价")
+    private BigDecimal totalUnloadUpstairsCost;
+
+    @ApiModelProperty(value = "费用汇总,前面四个费用相加")
+    private BigDecimal totalCost;
+
+    @ApiModelProperty(value = "对账时间范围的开始时间")
+    private Long startTime;
+
+    @ApiModelProperty(value = "对账时间范围的开始时间")
+    private Date startTimeSupply;
+
+    @ApiModelProperty(value = "对账时间范围的结束时间")
+    private Long endTime;
+
+    @ApiModelProperty(value = "对账时间范围的结束时间")
+    private Date endTimeSupply;
+
+    @ApiModelProperty(value = "备注")
+    private String comment;
+
+    @ApiModelProperty(value = "0")
+    private String createOrg;
+
+    @ApiModelProperty(value = "0")
+    private String updateOrg;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateUser;
+
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+    @ApiModelProperty(value = "更新时间")
+    private Long updateTime;
+
+    @ApiModelProperty(value = "创建时间")
+    private Long createTime;
+
+    @ApiModelProperty(value = "是否已经被删除")
+    private String isDelete;
+
+}

+ 24 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostSalesCheckCodeList.java

@@ -0,0 +1,24 @@
+package com.zfire.mall.manager.bean.front;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gejiang
+ * @since 2023-04-08
+ */
+@ApiModel
+@Data
+public class CostSalesCheckCodeList {
+
+
+    @ApiModelProperty(value = "list")
+    private List<String> costSalesCheckCodeList;
+}

+ 132 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostSalesListVO.java

@@ -0,0 +1,132 @@
+package com.zfire.mall.manager.bean.front;
+
+import com.zfire.mall.manager.annotation.ZfireField;
+import com.zfire.mall.manager.enums.JiaXianProcessStatusEnum;
+import com.zfire.mall.manager.plus.entity.CostSales;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gejiang
+ * @since 2023-04-08
+ */
+@ApiModel
+@Data
+public class CostSalesListVO   {
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "30")
+    private String id;
+
+
+    @ApiModelProperty(value = "销司对账单编码")
+    private String salesCheckCode;
+
+
+    @ApiModelProperty(value = "对账人")
+    private String checkMan;
+
+
+
+    @ApiModelProperty(value = "对账时间")
+    private Date checkTimeSupply;
+
+
+    @ApiModelProperty(value = "自动核对时间。商家长时间不确认,系统自动确认")
+    private Date autoCheckTimeSupply;
+
+    @ApiModelProperty(value = "退货订单费用汇总")
+    private BigDecimal totalReturnOrderCost;
+
+    @ApiModelProperty(value = "应付费用")
+    private BigDecimal totalMerchantCost;
+
+    @ApiModelProperty(value = "补贴费用")
+    private BigDecimal totalAllowanceCost;
+
+    @ApiModelProperty(value = "上楼卸货费用")
+    private BigDecimal totalUnloadUpstairsCost;
+
+    @ApiModelProperty(value = "费用汇总")
+    private BigDecimal totalCost;
+
+
+    @ApiModelProperty(value = "对账时间范围的开始时间")
+    private Date startTimeSupply;
+
+
+    @ApiModelProperty(value = "对账时间范围的结束时间")
+    private Date endTimeSupply;
+
+    @ApiModelProperty(value = "备注")
+    private String comment;
+
+
+    @ApiModelProperty(value = "更新人")
+    private String updateUser;
+
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "是否已经被删除")
+    private String isDelete;
+
+    @ApiModelProperty(value = "创建时间")
+    private Date costCreateTime;
+
+    @ApiModelProperty(value = "修改时间")
+    private Date costUpdateTime;
+
+    @ApiModelProperty(value = "流程状态")
+    private JiaXianProcessStatusEnum processStatus;
+
+    @ApiModelProperty(value = "发起异常工单得单号")
+    private String ticketCode;
+
+
+    @ApiModelProperty(value = "其他费用")
+    private BigDecimal otherCost;
+
+    @ApiModelProperty(value = "商家费用汇总")
+    private String merchantCostSum;
+
+    @ApiModelProperty(value = "格力比例扣返利")
+    private String geliRebate;
+
+    @ApiModelProperty(value = "格力应付嘉贤费用")
+    private BigDecimal shouldPayCost;
+
+    @ApiModelProperty(value = "账期")
+    private String costTerm;
+
+    @ApiModelProperty(value = "销司简称")
+    private String salesCompanyShortName;
+
+    @ApiModelProperty(value = "发起销司对账时间")
+    private String startSalesCheckTime;
+
+    @ApiModelProperty(value = "发起销司对账时间")
+    private Date startSalesCheckTimeSupply;
+
+    @ApiModelProperty(value = "仓储物流费")
+    private BigDecimal tocCost;
+
+    @ApiModelProperty(value = "工程费")
+    private BigDecimal tobCost;
+
+    @ApiModelProperty(value = "TOC 补贴费用")
+    private BigDecimal tocAllowanceCost;
+
+    @ApiModelProperty(value = "TOB补贴费用")
+    private BigDecimal tobAllowanceCost;
+
+}

+ 104 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostSalesVO.java

@@ -0,0 +1,104 @@
+package com.zfire.mall.manager.bean.front;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel
+@Data
+public class CostSalesVO {
+
+
+    @ApiModelProperty(value = "30")
+    private String id;
+
+    @ApiModelProperty(value = "销司对账单编码")
+    private String salesCheckCode;
+
+    @ApiModelProperty(value = "销售公司名称")
+    private String salesCompanyCode;
+
+    @ApiModelProperty(value = "销售公司编码")
+    private String salesCompanyName;
+
+    @ApiModelProperty(value = "对账人")
+    private String checkMan;
+
+    @ApiModelProperty(value = "对账时间")
+    private Long checkTime;
+
+    @ApiModelProperty(value = "对账时间")
+    private Date checkTimeSupply;
+
+    @ApiModelProperty(value = "自动核对时间。商家长时间不确认,系统自动确认")
+    private Long autoCheckTime;
+
+    @ApiModelProperty(value = "自动核对时间。商家长时间不确认,系统自动确认")
+    private Date autoCheckTimeSupply;
+
+    @ApiModelProperty(value = "退货订单费用汇总")
+    private BigDecimal totalReturnOrderCost;
+
+    @ApiModelProperty(value = "一般算出来的运费")
+    private BigDecimal totalMerchantCost;
+
+    @ApiModelProperty(value = "补贴费用,补贴系数*开单价")
+    private BigDecimal totalAllowanceCost;
+
+    @ApiModelProperty(value = "上楼卸货费用,上楼结算系数*开单价")
+    private BigDecimal totalUnloadUpstairsCost;
+
+    @ApiModelProperty(value = "费用汇总,前面四个费用相加")
+    private BigDecimal totalCost;
+
+    @ApiModelProperty(value = "对账时间范围的开始时间")
+    private Long startTime;
+
+    @ApiModelProperty(value = "对账时间范围的开始时间")
+    private Date startTimeSupply;
+
+    @ApiModelProperty(value = "对账时间范围的结束时间")
+    private Long endTime;
+
+    @ApiModelProperty(value = "对账时间范围的结束时间")
+    private Date endTimeSupply;
+
+    @ApiModelProperty(value = "备注")
+    private String comment;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createTime;
+
+    @ApiModelProperty(value = "0")
+    private String createOrg;
+
+    @ApiModelProperty(value = "0")
+    private String updateOrg;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateUser;
+
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+    @ApiModelProperty(value = "更新时间")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Long updateTime;
+
+    private Date costCreateTime;
+
+    private Date costUpdateTime;
+
+    @ApiModelProperty(value = "是否已经被删除")
+    private String isDelete;
+
+    @ApiModelProperty(value = "流程状态")
+    private String processStatus;
+
+}

+ 173 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostTicketBillVO.java

@@ -0,0 +1,173 @@
+package com.zfire.mall.manager.bean.front;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gejiang
+ * @since 2023-04-08
+ */
+@ApiModel
+@Data
+public class CostTicketBillVO   {
+
+
+    @ApiModelProperty(value = "账单唯一id")
+    private String id;
+
+    @ApiModelProperty(value = "工单编号")
+    private String ticketCode;
+
+    @ApiModelProperty(value = "嘉贤创建时间")
+    private Long createTime;
+
+    @ApiModelProperty(value = "产品名称")
+    private String materialName;
+
+    @ApiModelProperty(value = "物料名称")
+    private String materialCode;
+
+    @ApiModelProperty(value = "规格型号")
+    private String materialSpecification;
+
+    @ApiModelProperty(value = "物料类型")
+    private String materialType;
+
+    @ApiModelProperty(value = "订单号,物流单号或销售单号")
+    private String orderCode;
+
+    @ApiModelProperty(value = "退货单号")
+    private String returnOrderCode;
+
+    @ApiModelProperty(value = "商家编码")
+    private String merchantCode;
+
+    @ApiModelProperty(value = "商家名称")
+    private String merchantName;
+
+    @ApiModelProperty(value = "所属销售公司类型,GE_JIANG(格匠)GUANG_ZHOU(广州销售公司)FO_SHAN(佛山销售公司)OTHER(其他销售公司)")
+    private String belongCompanyType;
+
+    @ApiModelProperty(value = "订单类型。TOB(商家机工程机类型),ALL(所有类型,广州的订单统一开单价),TOC(销售订单类型)")
+    private String orderType;
+
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "客户电话")
+    private String customerPhone;
+
+    @ApiModelProperty(value = "发货仓库编码")
+    private String warehouseCode;
+
+    @ApiModelProperty(value = " 发货仓库名称")
+    private String warehouseName;
+
+    @ApiModelProperty(value = "收货送货地址")
+    private String receiptAddress;
+
+    @ApiModelProperty(value = "订单类型细分。PICKING_UP_ORDER(前置仓提货订单)SALE_ORDER(销售订单),MERCHANT_WAREHOUSE_ORDER(商家仓订单)PROJECT_ORDER(工程机订单)SALE_RETURN_ORDER(销售退货单),")
+    private String orderTypeDetail;
+
+    @ApiModelProperty(value = "物料计费分类,空调生活家电等")
+    private String materialCostType;
+
+    @ApiModelProperty(value = "运费结算系数")
+    private BigDecimal coefficient;
+
+    @ApiModelProperty(value = "补贴结算系数")
+    private BigDecimal subsidyCoefficient;
+
+    @ApiModelProperty(value = "卸货上楼结算系数")
+    private BigDecimal unloadUpstairsCoefficient;
+
+    @ApiModelProperty(value = "退货订单按单价计算")
+    private BigDecimal unitPrice;
+
+    @ApiModelProperty(value = "最终算出来的运费")
+    private BigDecimal cost;
+
+    @ApiModelProperty(value = "补贴费用,补贴系数*开单价")
+    private BigDecimal allowanceCost;
+
+    @ApiModelProperty(value = "上楼卸货费用,上楼结算系数* 开单价")
+    private BigDecimal unloadUpstairsCost;
+
+    @ApiModelProperty(value = "费用汇总,前面三个费用相加")
+    private BigDecimal totalCost;
+
+    @ApiModelProperty(value = "备注")
+    private String comment;
+
+    @ApiModelProperty(value = "订单时间")
+    private String orderDate;
+
+    @ApiModelProperty(value = "无法生成的原因")
+    private String errorResult;
+
+    @ApiModelProperty(value = " 是否已经对过帐")
+    private String isAccountChecking;
+
+    @ApiModelProperty(value = " 是否已经审核")
+    private String isAudit;
+
+    @ApiModelProperty(value = " 是否卸货")
+    private String isUnload;
+
+    @ApiModelProperty(value = " 是否上楼")
+    private String isUpstairs;
+
+    @ApiModelProperty(value = " 实际是否卸货")
+    private String isRealUnload;
+
+    @ApiModelProperty(value = "实际是否上楼")
+    private String isRealUpstairs;
+
+    @ApiModelProperty(value = "是否完结 0 未完结,1 已经完结")
+    private Integer isFinish;
+
+
+    @ApiModelProperty(value = "上个版本订单编码")
+    private String lastBillCode;
+
+    @ApiModelProperty(value = "商家对账单编号")
+    private String merchanCheckCode;
+
+    @ApiModelProperty(value = "销司对账单编号")
+    private String salesCheckCode;
+
+    @ApiModelProperty(value = "订单流程")
+    private String processStatus;
+
+    @ApiModelProperty(value = "GE_JIANG,//所属哪一个销售公司计费规则,GE_JIANG(格 匠 ),GUANG_ZHOU( 广 州 销 售 公 司 ),FO_SHAN(佛山销售公司),OTHER(其他销售公司")
+    private String belongCompanyCostRule;
+
+    @ApiModelProperty(value = "物料开单价")
+    private BigDecimal materialPrice;
+
+    @ApiModelProperty(value = "是否已经被删除")
+    private String isDelete;
+
+    @ApiModelProperty(value = "0")
+    private String createOrg;
+
+    @ApiModelProperty(value = "0")
+    private String updateOrg;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateUser;
+
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+    @ApiModelProperty(value = "订单编号")
+    private String billCode;
+
+}

+ 265 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostTicketListVO.java

@@ -0,0 +1,265 @@
+package com.zfire.mall.manager.bean.front;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.zfire.mall.manager.annotation.ZfireField;
+import com.zfire.mall.manager.enums.*;
+import com.zfire.mall.manager.plus.entity.CostTicket;
+import com.zfire.mall.manager.plus.entity.CostTicketBill;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel
+@Data
+@ZfireField(tbName = "a")
+public class CostTicketListVO  {
+    @ZfireField(hide = true)
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ApiModelProperty(value = "工单编号")
+    private String ticketCode;
+
+    @ApiModelProperty(value = "工单类型")
+    private JiaXianTicketOrderTypeEnum ticketType;
+
+    @ApiModelProperty(value = "对账单编码")
+    private String orderCode;
+
+    @ApiModelProperty(value = "审核人")
+    private String reviewMan;
+
+    @ApiModelProperty(value = "审核时间")
+    private Long reviewTime;
+
+    @ApiModelProperty(value = "流程状态")
+    private JiaXianProcessStatusEnum processStatus;
+
+    @ApiModelProperty(value = "备注")
+    private String comment;
+
+
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateUser;
+
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+    @ApiModelProperty(value = "嘉贤创建时间")
+    private Date costCreateTime;
+
+    @ApiModelProperty(value = "嘉贤修改时间")
+    private Date costUpdateTime;
+
+
+    @ApiModelProperty(value = "审核备注")
+    private String reviewComment;
+
+    @ApiModelProperty(value = "商家简称")
+    private String merchantShortName;
+
+    @ApiModelProperty(value = "商家编码")
+    private String merchantCode;
+
+    @ApiModelProperty(value = "商家名称")
+    private String merchantName;
+
+
+    @ZfireField(hide = true,tbName = "b",colName = "id")
+    @ApiModelProperty(value = "子账单唯一id")
+    private String itemId;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "产品名称")
+    private String materialName;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "物料名称")
+    private String materialCode;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "规格型号")
+    private String materialSpecification;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "物料类型")
+    private String materialType;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "账号对应物料数量")
+    private Integer materialNumber;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "订单号")
+    private String itemOrderCode;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "退货单号")
+    private String returnOrderCode;
+
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "所属销售公司类型")
+    private JiaXianCostTypeEnum belongCompanyType;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "订单类型")
+    private JiaXianCostOrderTypeEnum orderType;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "客户电话")
+    private String customerPhone;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "发货仓库编码")
+    private String warehouseCode;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = " 发货仓库名称")
+    private String warehouseName;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "收货送货地址")
+    private String receiptAddress;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "订单类型细分")
+    private JiaXianOrderDetailTypeEnum orderTypeDetail;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "物料计费分类,空调生活家电等")
+    private String materialCostType;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "运费结算系数")
+    private BigDecimal coefficient;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "补贴结算系数")
+    private BigDecimal subsidyCoefficient;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "卸货上楼结算系数")
+    private BigDecimal unloadUpstairsCoefficient;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "退货订单按单价计算")
+    private BigDecimal unitPrice;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "退货费用")
+    private BigDecimal returnOrderCost;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "商家承担费用")
+    private BigDecimal merchantCost;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "补贴费用")
+    private BigDecimal allowanceCost;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "上楼卸货费用")
+    private BigDecimal unloadUpstairsCost;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "费用汇总")
+    private BigDecimal totalCost;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "备注")
+    private String itemComment;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "订单时间")
+    private String orderDate;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "无法生成的原因")
+    private String errorResult;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = " 是否已经对过帐")
+    private String isAccountChecking;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = " 是否已经审核")
+    private String isAudit;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = " 是否卸货")
+    private String isUnload;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = " 是否上楼")
+    private String isUpstairs;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = " 实际是否卸货")
+    private String isRealUnload;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "实际是否上楼")
+    private String isRealUpstairs;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "是否完结 0 未完结,1 已经完结")
+    private Integer isFinish;
+
+    @ZfireField(tbName = "b",hide = true)
+    @ApiModelProperty(value = "上个版本订单编码")
+    private String lastBillCode;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "商家对账单编号")
+    private String merchanCheckCode;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "销司对账单编号")
+    private String salesCheckCode;
+
+    @ZfireField(tbName = "b",hide = true)
+    @ApiModelProperty(value = "所属公司计费规则")
+    private JiaXianCostTypeEnum belongCompanyCostRule;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "物料开单价")
+    private BigDecimal materialPrice;
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "订单编号")
+    private String billCode;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "项目类别")
+    private String refProjectCategory;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "提货密钥")
+    private String goodsPickingKey;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "供应链发货单号")
+    private String saleCode;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "商家费用汇总")
+    private String merchantCostSum;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "格力比例扣返利")
+    private String geliRebate;
+
+    @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "销售类型名称")
+    private String saleType;
+
+
+
+
+
+}

+ 71 - 0
src/main/java/com/zfire/mall/manager/bean/front/CostTicketVO.java

@@ -0,0 +1,71 @@
+package com.zfire.mall.manager.bean.front;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gejiang
+ * @since 2023-04-08
+ */
+@ApiModel
+@Data
+public class CostTicketVO{
+
+
+    @ApiModelProperty(value = "id")
+    private String id;
+
+    @ApiModelProperty(value = "工单编号")
+    private String ticketCode;
+
+    @ApiModelProperty(value = "工单类型,MERCHANT_CHECK(商家对账),SALES_CHECK(销司对账)")
+    private String ticketType;
+
+    @ApiModelProperty(value = "对账单编码。若是商家对账类型,则填写商家对账单编号;若是销司对账类型,则填写销司对账编号")
+    private String orderCode;
+
+    @ApiModelProperty(value = "审核人")
+    private String reviewMan;
+
+    @ApiModelProperty(value = "审核时间")
+    private Long reviewTime;
+
+    @ApiModelProperty(value = "流程状态")
+    private String processStatus;
+
+    @ApiModelProperty(value = "备注")
+    private String comment;
+
+    @ApiModelProperty(value = "创建数据的组织")
+    private String createOrg;
+
+    @ApiModelProperty(value = "更新数据的组织")
+    private String updateOrg;
+
+    @ApiModelProperty(value = "创建时间")
+    private Long createTime;
+
+    @ApiModelProperty(value = "更新时间")
+    private Long updateTime;
+
+    @ApiModelProperty(value = "更新人")
+    private String updateUser;
+
+    @ApiModelProperty(value = "创建人")
+    private String createUser;
+
+    @ApiModelProperty(value = "是否已经被删除")
+    private String isDelete;
+
+
+
+    private List<CostBillVO> costTicketDetailList;
+
+}

+ 27 - 0
src/main/java/com/zfire/mall/manager/bean/front/CreateTicketBill.java

@@ -0,0 +1,27 @@
+package com.zfire.mall.manager.bean.front;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@ApiModel
+@Data
+public class CreateTicketBill {
+
+    @ApiModelProperty(value = "若是商家对账类型,则填写商家对账单编号;若是销司对账类型,则填写销司对账编号,必填")
+    private String orderCode;
+
+    @ApiModelProperty(value = "MERCHANT_CHECK 商家对账  SALES_CHECK 销司对账")
+    private String ticketType;
+
+    @ApiModelProperty(value = "工单备注")
+    private String comment;
+
+    @ApiModelProperty(value = "工单编号前端不传")
+    private String ticketCode;
+
+    @ApiModelProperty(value = "结算单")
+    private List<CreateTicketBillList> modifiedCostBillList;
+}

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor