zhang-kan-kan %!s(int64=2) %!d(string=hai) anos
achega
64e0b8d13d
Modificáronse 100 ficheiros con 13315 adicións e 0 borrados
  1. 33 0
      .gitignore
  2. 118 0
      .mvn/wrapper/MavenWrapperDownloader.java
  3. BIN=BIN
      .mvn/wrapper/maven-wrapper.jar
  4. 2 0
      .mvn/wrapper/maven-wrapper.properties
  5. 281 0
      hs_err_pid11940.log
  6. 209 0
      hs_err_pid26476.log
  7. 310 0
      mvnw
  8. 182 0
      mvnw.cmd
  9. 294 0
      pom.xml
  10. 2649 0
      replay_pid11940.log
  11. 788 0
      replay_pid26476.log
  12. 20 0
      src/main/java/com/muzhi/dingtalk/test/DingTalkApplication.java
  13. BIN=BIN
      src/main/java/com/muzhi/dingtalk/test/chaxun/BdDocQuey.class
  14. 65 0
      src/main/java/com/muzhi/dingtalk/test/chaxun/BdDocQuey.java
  15. BIN=BIN
      src/main/java/com/muzhi/dingtalk/test/chaxun/BdDocQueyResponse.class
  16. 65 0
      src/main/java/com/muzhi/dingtalk/test/chaxun/BdDocQueyResponse.java
  17. BIN=BIN
      src/main/java/com/muzhi/dingtalk/test/chaxun/IBDdocQuey.class
  18. 94 0
      src/main/java/com/muzhi/dingtalk/test/chaxun/IBDdocQuey.java
  19. BIN=BIN
      src/main/java/com/muzhi/dingtalk/test/chaxun/IBDdocQueyPortType.class
  20. 40 0
      src/main/java/com/muzhi/dingtalk/test/chaxun/IBDdocQueyPortType.java
  21. BIN=BIN
      src/main/java/com/muzhi/dingtalk/test/chaxun/ObjectFactory.class
  22. 71 0
      src/main/java/com/muzhi/dingtalk/test/chaxun/ObjectFactory.java
  23. 63 0
      src/main/java/com/muzhi/dingtalk/test/chaxun/bddocquey.wsdl
  24. BIN=BIN
      src/main/java/com/muzhi/dingtalk/test/chaxun/package-info.class
  25. 2 0
      src/main/java/com/muzhi/dingtalk/test/chaxun/package-info.java
  26. 24 0
      src/main/java/com/muzhi/dingtalk/test/config/CrosConfig.java
  27. 20 0
      src/main/java/com/muzhi/dingtalk/test/config/MybatisPlusConfig.java
  28. 43 0
      src/main/java/com/muzhi/dingtalk/test/config/Swagger2.java
  29. 26 0
      src/main/java/com/muzhi/dingtalk/test/config/WebConfig.java
  30. 43 0
      src/main/java/com/muzhi/dingtalk/test/controller/AccessTokenController.java
  31. 41 0
      src/main/java/com/muzhi/dingtalk/test/controller/ChuanYunTongbuController.java
  32. 46 0
      src/main/java/com/muzhi/dingtalk/test/controller/DepartmentController.java
  33. 69 0
      src/main/java/com/muzhi/dingtalk/test/controller/DingdingLianJieQiController.java
  34. 80 0
      src/main/java/com/muzhi/dingtalk/test/controller/EmployeeController.java
  35. 32 0
      src/main/java/com/muzhi/dingtalk/test/controller/FangDeAccessTokenController.java
  36. 331 0
      src/main/java/com/muzhi/dingtalk/test/controller/FangDeTongbuController.java
  37. 61 0
      src/main/java/com/muzhi/dingtalk/test/controller/KaoqinController.java
  38. 37 0
      src/main/java/com/muzhi/dingtalk/test/controller/ShenpiController.java
  39. 98 0
      src/main/java/com/muzhi/dingtalk/test/controller/TongbuController.java
  40. 23 0
      src/main/java/com/muzhi/dingtalk/test/controller/ceshiController.java
  41. 32 0
      src/main/java/com/muzhi/dingtalk/test/entity/Department.java
  42. 181 0
      src/main/java/com/muzhi/dingtalk/test/entity/Employee.java
  43. 64 0
      src/main/java/com/muzhi/dingtalk/test/entity/EmployeeFangDe.java
  44. 32 0
      src/main/java/com/muzhi/dingtalk/test/entity/ErrorlogFangDe.java
  45. 14 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/DepartmentDataVo.java
  46. 11 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/DepartmentQuery.java
  47. 30 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/DepartmentVo.java
  48. 14 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeDataVo.java
  49. 11 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeFangDeDataVo.java
  50. 22 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeFangDeToChuanYunDataVo.java
  51. 68 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeFangDeToChuanYunVo.java
  52. 64 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeFangDeVo.java
  53. 17 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeQuery.java
  54. 176 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeVo.java
  55. 14 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/ErrorlogFangDeDataVo.java
  56. 18 0
      src/main/java/com/muzhi/dingtalk/test/entity/vo/ErrorlogFangDeQuery.java
  57. 72 0
      src/main/java/com/muzhi/dingtalk/test/exceptionhander/R.java
  58. 12 0
      src/main/java/com/muzhi/dingtalk/test/exceptionhander/ResultCode.java
  59. 20 0
      src/main/java/com/muzhi/dingtalk/test/exceptionhander/ZhangkanException.java
  60. 108 0
      src/main/java/com/muzhi/dingtalk/test/http/HttpUtils.java
  61. 66 0
      src/main/java/com/muzhi/dingtalk/test/http/MyX509TrustManager.java
  62. 35 0
      src/main/java/com/muzhi/dingtalk/test/http/Test.java
  63. 12 0
      src/main/java/com/muzhi/dingtalk/test/mapper/DepartmentMapper.java
  64. 12 0
      src/main/java/com/muzhi/dingtalk/test/mapper/EmployeeFangDeMapper.java
  65. 11 0
      src/main/java/com/muzhi/dingtalk/test/mapper/EmployeeMapper.java
  66. 11 0
      src/main/java/com/muzhi/dingtalk/test/mapper/ErrorlogFangDeMapper.java
  67. 5 0
      src/main/java/com/muzhi/dingtalk/test/mapper/xml/DepartmentMapper.xml
  68. 5 0
      src/main/java/com/muzhi/dingtalk/test/mapper/xml/EmployeeFangDeMapper.xml
  69. 5 0
      src/main/java/com/muzhi/dingtalk/test/mapper/xml/EmployeeMapper.xml
  70. 5 0
      src/main/java/com/muzhi/dingtalk/test/mapper/xml/ErrorlogFangDeMapper.xml
  71. 13 0
      src/main/java/com/muzhi/dingtalk/test/service/ChuanYunTongbuService.java
  72. 17 0
      src/main/java/com/muzhi/dingtalk/test/service/DepartmentService.java
  73. 14 0
      src/main/java/com/muzhi/dingtalk/test/service/DingAccessTokenService.java
  74. 14 0
      src/main/java/com/muzhi/dingtalk/test/service/DingdingLianJieQiService.java
  75. 30 0
      src/main/java/com/muzhi/dingtalk/test/service/EmployeeService.java
  76. 11 0
      src/main/java/com/muzhi/dingtalk/test/service/FangDeDingAccessTokenService.java
  77. 38 0
      src/main/java/com/muzhi/dingtalk/test/service/FangDeTongbuService.java
  78. 21 0
      src/main/java/com/muzhi/dingtalk/test/service/KaoqinService.java
  79. 11 0
      src/main/java/com/muzhi/dingtalk/test/service/ShenpiService.java
  80. 33 0
      src/main/java/com/muzhi/dingtalk/test/service/TongbuService.java
  81. 390 0
      src/main/java/com/muzhi/dingtalk/test/service/impl/ChuanYunTongbuServiceImpl.java
  82. 102 0
      src/main/java/com/muzhi/dingtalk/test/service/impl/DepartmentServiceImpl.java
  83. 79 0
      src/main/java/com/muzhi/dingtalk/test/service/impl/DingAccessTokenServiceImpl.java
  84. 978 0
      src/main/java/com/muzhi/dingtalk/test/service/impl/DingdingLianJieQiServiceImpl.java
  85. 280 0
      src/main/java/com/muzhi/dingtalk/test/service/impl/EmployeeServiceImpl.java
  86. 80 0
      src/main/java/com/muzhi/dingtalk/test/service/impl/FangDeDingAccessTokenServiceImpl.java
  87. 2274 0
      src/main/java/com/muzhi/dingtalk/test/service/impl/FangDeTongbuServiceImpl.java
  88. 217 0
      src/main/java/com/muzhi/dingtalk/test/service/impl/KaoqinServiceImpl.java
  89. 62 0
      src/main/java/com/muzhi/dingtalk/test/service/impl/ShenpiServiceImpl.java
  90. 908 0
      src/main/java/com/muzhi/dingtalk/test/service/impl/TongbuServiceImpl.java
  91. BIN=BIN
      src/main/java/com/muzhi/dingtalk/test/webservice/IPsndocVO.class
  92. 94 0
      src/main/java/com/muzhi/dingtalk/test/webservice/IPsndocVO.java
  93. 63 0
      src/main/java/com/muzhi/dingtalk/test/webservice/IPsndocVO.wsdl
  94. BIN=BIN
      src/main/java/com/muzhi/dingtalk/test/webservice/IPsndocVOPortType.class
  95. 40 0
      src/main/java/com/muzhi/dingtalk/test/webservice/IPsndocVOPortType.java
  96. BIN=BIN
      src/main/java/com/muzhi/dingtalk/test/webservice/ObjectFactory.class
  97. 71 0
      src/main/java/com/muzhi/dingtalk/test/webservice/ObjectFactory.java
  98. BIN=BIN
      src/main/java/com/muzhi/dingtalk/test/webservice/SavePsndocVO.class
  99. 68 0
      src/main/java/com/muzhi/dingtalk/test/webservice/SavePsndocVO.java
  100. 0 0
      src/main/java/com/muzhi/dingtalk/test/webservice/SavePsndocVOResponse.class

+ 33 - 0
.gitignore

@@ -0,0 +1,33 @@
+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
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/

+ 118 - 0
.mvn/wrapper/MavenWrapperDownloader.java

@@ -0,0 +1,118 @@
+/*
+ * Copyright 2007-present the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      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.
+ */
+
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+    private static final String WRAPPER_VERSION = "0.5.6";
+    /**
+     * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+     */
+    private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+            + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
+
+    /**
+     * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+     * use instead of the default one.
+     */
+    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+            ".mvn/wrapper/maven-wrapper.properties";
+
+    /**
+     * Path where the maven-wrapper.jar will be saved to.
+     */
+    private static final String MAVEN_WRAPPER_JAR_PATH =
+            ".mvn/wrapper/maven-wrapper.jar";
+
+    /**
+     * Name of the property which should be used to override the default download url for the wrapper.
+     */
+    private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+    public static void main(String args[]) {
+        System.out.println("- Downloader started");
+        File baseDirectory = new File(args[0]);
+        System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+        // If the maven-wrapper.properties exists, read it and check if it contains a custom
+        // wrapperUrl parameter.
+        File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+        String url = DEFAULT_DOWNLOAD_URL;
+        if (mavenWrapperPropertyFile.exists()) {
+            FileInputStream mavenWrapperPropertyFileInputStream = null;
+            try {
+                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+                Properties mavenWrapperProperties = new Properties();
+                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+            } catch (IOException e) {
+                System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+            } finally {
+                try {
+                    if (mavenWrapperPropertyFileInputStream != null) {
+                        mavenWrapperPropertyFileInputStream.close();
+                    }
+                } catch (IOException e) {
+                    // Ignore ...
+                }
+            }
+        }
+        System.out.println("- Downloading from: " + url);
+
+        File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+        if (!outputFile.getParentFile().exists()) {
+            if (!outputFile.getParentFile().mkdirs()) {
+                System.out.println(
+                        "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+            }
+        }
+        System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+        try {
+            downloadFileFromURL(url, outputFile);
+            System.out.println("Done");
+            System.exit(0);
+        } catch (Throwable e) {
+            System.out.println("- Error downloading");
+            e.printStackTrace();
+            System.exit(1);
+        }
+    }
+
+    private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+        if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
+            String username = System.getenv("MVNW_USERNAME");
+            char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
+            Authenticator.setDefault(new Authenticator() {
+                @Override
+                protected PasswordAuthentication getPasswordAuthentication() {
+                    return new PasswordAuthentication(username, password);
+                }
+            });
+        }
+        URL website = new URL(urlString);
+        ReadableByteChannel rbc;
+        rbc = Channels.newChannel(website.openStream());
+        FileOutputStream fos = new FileOutputStream(destination);
+        fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+        fos.close();
+        rbc.close();
+    }
+
+}

BIN=BIN
.mvn/wrapper/maven-wrapper.jar


+ 2 - 0
.mvn/wrapper/maven-wrapper.properties

@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 281 - 0
hs_err_pid11940.log


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 209 - 0
hs_err_pid26476.log


+ 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%

+ 294 - 0
pom.xml

@@ -0,0 +1,294 @@
+<?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.muzhi.dingtalk</groupId>
+    <artifactId>test</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>test</name>
+    <description>Demo project for Spring Boot</description>
+
+    <properties>
+        <java.version>1.8</java.version>
+        <fastjson.version>1.2.33</fastjson.version>
+        <gson.version>2.8.2</gson.version>
+        <json.version>20170516</json.version>
+        <poi.version>3.17</poi.version>
+        <jodatime.version>2.10.1</jodatime.version>
+        <swagger.version>2.7.0</swagger.version>
+        <commons-fileupload.version>1.3.1</commons-fileupload.version>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <!--        <thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>-->
+        <!-- 布局功能的支持程序 thymeleaf3主程序 layout2以上版本-->
+<!--        <thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>-->
+    </properties>
+
+    <repositories>
+        <repository>
+            <id>sonatype-nexus-staging</id>
+            <name>Sonatype Nexus Staging</name>
+            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+
+    <dependencies>
+        <!-- httpClient -->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>4.4.13</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+            <version>3.1</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>org.apache.cxf</groupId>-->
+<!--            <artifactId>cxf-spring-boot-starter-jaxws</artifactId>-->
+<!--            <version>3.3.1</version>-->
+<!--        </dependency>-->
+
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-starter-thymeleaf</artifactId>-->
+<!--&lt;!&ndash;            <version>2.3.3.RELEASE</version>&ndash;&gt;-->
+<!--        </dependency>-->
+
+        <!--钉钉相关-->
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>alibaba-dingtalk-service-sdk</artifactId>
+            <version>1.0.1</version>
+        </dependency>
+
+        <!--json相关-->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>${fastjson.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <version>${json.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>${gson.version}</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>net.sf.json-lib</groupId>-->
+<!--            <artifactId>json-lib</artifactId>-->
+<!--            <version>2.4</version>-->
+<!--        </dependency>-->
+
+
+        <!-- JSONObject对象依赖的jar包 -->
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <version>1.9.3</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>3.2.1</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.6</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.ezmorph</groupId>
+            <artifactId>ezmorph</artifactId>
+            <version>1.0.6</version>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.json-lib</groupId>
+            <artifactId>json-lib</artifactId>
+            <version>2.2.3</version>
+            <classifier>jdk15</classifier><!-- 指定jdk版本 -->
+        </dependency>
+
+
+        <!--xls-->
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <!--xlsx-->
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <!--文件上传-->
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>${commons-fileupload.version}</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-starter-thymeleaf</artifactId>-->
+<!--        </dependency>-->
+
+        <!--引入web模块-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+            <version>2.3.3.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+            <version>1.18.10</version>
+        </dependency>
+
+        <!--mybatis-plus数据库连接-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.2.0</version>
+        </dependency>
+        <!--引入mysql:数据库驱动-->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <!--引入druid数据源-->
+        <!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>1.1.9</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.1.9</version>
+        </dependency>
+
+        <!--引入jpa模块-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+        </dependency>
+
+        <!--日期时间工具-->
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <version>${jodatime.version}</version>
+        </dependency>
+
+        <!--log4j-->
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>1.2.17</version>
+        </dependency>
+
+        <!--swagger-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <!--swagger ui-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.vintage</groupId>
+                    <artifactId>junit-vintage-engine</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <fork>true</fork>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.3.1</version>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                    <encoding>utf8</encoding>
+                </configuration>
+            </plugin>
+        </plugins>
+
+        <!--映射mapper中对应的xml配置文件,如果没有mapper.xml文件则将下列注释-->
+        <resources>
+            <resource>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**/*.xml</include>
+
+                    <include>**/*.properties</include>
+                    <include>**/*.tld</include>
+                    <include>**/*.xls</include>
+                    <include>**/*.xlsx</include>
+                </includes>
+                <filtering>false</filtering>
+            </resource>
+        </resources>
+    </build>
+
+</project>

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2649 - 0
replay_pid11940.log


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 788 - 0
replay_pid26476.log


+ 20 - 0
src/main/java/com/muzhi/dingtalk/test/DingTalkApplication.java

@@ -0,0 +1,20 @@
+package com.muzhi.dingtalk.test;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+
+@MapperScan("com.muzhi.dingtalk.test.mapper")
+@SpringBootApplication
+@EnableScheduling//开启定时任务
+//@ComponentScan(basePackages = {"com.muzhi"})
+public class DingTalkApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(DingTalkApplication.class, args);
+    }
+
+}

BIN=BIN
src/main/java/com/muzhi/dingtalk/test/chaxun/BdDocQuey.class


+ 65 - 0
src/main/java/com/muzhi/dingtalk/test/chaxun/BdDocQuey.java

@@ -0,0 +1,65 @@
+
+package com.muzhi.dingtalk.test.chaxun;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>anonymous complex type的 Java 类。
+ * 
+ * <p>以下模式片段指定包含在此类中的预期内容。
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="string" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "string"
+})
+@XmlRootElement(name = "bdDocQuey")
+public class BdDocQuey {
+
+    @XmlElementRef(name = "string", type = JAXBElement.class, required = false)
+    protected JAXBElement<String> string;
+
+    /**
+     * 获取string属性的值。
+     * 
+     * @return
+     *     possible object is
+     *     {@link JAXBElement }{@code <}{@link String }{@code >}
+     *     
+     */
+    public JAXBElement<String> getString() {
+        return string;
+    }
+
+    /**
+     * 设置string属性的值。
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link JAXBElement }{@code <}{@link String }{@code >}
+     *     
+     */
+    public void setString(JAXBElement<String> value) {
+        this.string = value;
+    }
+
+}

BIN=BIN
src/main/java/com/muzhi/dingtalk/test/chaxun/BdDocQueyResponse.class


+ 65 - 0
src/main/java/com/muzhi/dingtalk/test/chaxun/BdDocQueyResponse.java

@@ -0,0 +1,65 @@
+
+package com.muzhi.dingtalk.test.chaxun;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>anonymous complex type的 Java 类。
+ * 
+ * <p>以下模式片段指定包含在此类中的预期内容。
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "_return"
+})
+@XmlRootElement(name = "bdDocQueyResponse")
+public class BdDocQueyResponse {
+
+    @XmlElementRef(name = "return", type = JAXBElement.class, required = false)
+    protected JAXBElement<String> _return;
+
+    /**
+     * 获取return属性的值。
+     * 
+     * @return
+     *     possible object is
+     *     {@link JAXBElement }{@code <}{@link String }{@code >}
+     *     
+     */
+    public JAXBElement<String> getReturn() {
+        return _return;
+    }
+
+    /**
+     * 设置return属性的值。
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link JAXBElement }{@code <}{@link String }{@code >}
+     *     
+     */
+    public void setReturn(JAXBElement<String> value) {
+        this._return = value;
+    }
+
+}

BIN=BIN
src/main/java/com/muzhi/dingtalk/test/chaxun/IBDdocQuey.class


+ 94 - 0
src/main/java/com/muzhi/dingtalk/test/chaxun/IBDdocQuey.java

@@ -0,0 +1,94 @@
+
+package com.muzhi.dingtalk.test.chaxun;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ * 
+ */
+@WebServiceClient(name = "IBDdocQuey", targetNamespace = "http://fdncc.itf.nc/IBDdocQuey", wsdlLocation = "http://118.178.17.233:8888/uapws/service/bddocquey?wsdl")
+public class IBDdocQuey
+    extends Service
+{
+
+    private final static URL IBDDOCQUEY_WSDL_LOCATION;
+    private final static WebServiceException IBDDOCQUEY_EXCEPTION;
+    private final static QName IBDDOCQUEY_QNAME = new QName("http://fdncc.itf.nc/IBDdocQuey", "IBDdocQuey");
+
+    static {
+        URL url = null;
+        WebServiceException e = null;
+        try {
+            url = new URL("http://118.178.17.233:8888/uapws/service/bddocquey?wsdl");
+        } catch (MalformedURLException ex) {
+            e = new WebServiceException(ex);
+        }
+        IBDDOCQUEY_WSDL_LOCATION = url;
+        IBDDOCQUEY_EXCEPTION = e;
+    }
+
+    public IBDdocQuey() {
+        super(__getWsdlLocation(), IBDDOCQUEY_QNAME);
+    }
+
+    public IBDdocQuey(WebServiceFeature... features) {
+        super(__getWsdlLocation(), IBDDOCQUEY_QNAME, features);
+    }
+
+    public IBDdocQuey(URL wsdlLocation) {
+        super(wsdlLocation, IBDDOCQUEY_QNAME);
+    }
+
+    public IBDdocQuey(URL wsdlLocation, WebServiceFeature... features) {
+        super(wsdlLocation, IBDDOCQUEY_QNAME, features);
+    }
+
+    public IBDdocQuey(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public IBDdocQuey(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+        super(wsdlLocation, serviceName, features);
+    }
+
+    /**
+     * 
+     * @return
+     *     returns IBDdocQueyPortType
+     */
+    @WebEndpoint(name = "IBDdocQueySOAP11port_http")
+    public IBDdocQueyPortType getIBDdocQueySOAP11PortHttp() {
+        return super.getPort(new QName("http://fdncc.itf.nc/IBDdocQuey", "IBDdocQueySOAP11port_http"), IBDdocQueyPortType.class);
+    }
+
+    /**
+     * 
+     * @param features
+     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
+     * @return
+     *     returns IBDdocQueyPortType
+     */
+    @WebEndpoint(name = "IBDdocQueySOAP11port_http")
+    public IBDdocQueyPortType getIBDdocQueySOAP11PortHttp(WebServiceFeature... features) {
+        return super.getPort(new QName("http://fdncc.itf.nc/IBDdocQuey", "IBDdocQueySOAP11port_http"), IBDdocQueyPortType.class, features);
+    }
+
+    private static URL __getWsdlLocation() {
+        if (IBDDOCQUEY_EXCEPTION!= null) {
+            throw IBDDOCQUEY_EXCEPTION;
+        }
+        return IBDDOCQUEY_WSDL_LOCATION;
+    }
+
+}

BIN=BIN
src/main/java/com/muzhi/dingtalk/test/chaxun/IBDdocQueyPortType.class


+ 40 - 0
src/main/java/com/muzhi/dingtalk/test/chaxun/IBDdocQueyPortType.java

@@ -0,0 +1,40 @@
+
+package com.muzhi.dingtalk.test.chaxun;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ * 
+ */
+@WebService(name = "IBDdocQueyPortType", targetNamespace = "http://fdncc.itf.nc/IBDdocQuey")
+@XmlSeeAlso({
+    ObjectFactory.class
+})
+public interface IBDdocQueyPortType {
+
+
+    /**
+     * 
+     * @param string
+     * @return
+     *     returns java.lang.String
+     */
+    @WebMethod(action = "urn:bdDocQuey")
+    @WebResult(targetNamespace = "")
+    @RequestWrapper(localName = "bdDocQuey", targetNamespace = "http://fdncc.itf.nc/IBDdocQuey", className = "com.muzhi.dingtalk.test.chaxun.BdDocQuey")
+    @ResponseWrapper(localName = "bdDocQueyResponse", targetNamespace = "http://fdncc.itf.nc/IBDdocQuey", className = "com.muzhi.dingtalk.test.chaxun.BdDocQueyResponse")
+    public String bdDocQuey(
+        @WebParam(name = "string", targetNamespace = "")
+        String string);
+
+}

BIN=BIN
src/main/java/com/muzhi/dingtalk/test/chaxun/ObjectFactory.class


+ 71 - 0
src/main/java/com/muzhi/dingtalk/test/chaxun/ObjectFactory.java

@@ -0,0 +1,71 @@
+
+package com.muzhi.dingtalk.test.chaxun;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the com.muzhi.dingtalk.test.chaxun package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _BdDocQueyResponseReturn_QNAME = new QName("", "return");
+    private final static QName _BdDocQueyString_QNAME = new QName("", "string");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.muzhi.dingtalk.test.chaxun
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link BdDocQueyResponse }
+     * 
+     */
+    public BdDocQueyResponse createBdDocQueyResponse() {
+        return new BdDocQueyResponse();
+    }
+
+    /**
+     * Create an instance of {@link BdDocQuey }
+     * 
+     */
+    public BdDocQuey createBdDocQuey() {
+        return new BdDocQuey();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "", name = "return", scope = BdDocQueyResponse.class)
+    public JAXBElement<String> createBdDocQueyResponseReturn(String value) {
+        return new JAXBElement<String>(_BdDocQueyResponseReturn_QNAME, String.class, BdDocQueyResponse.class, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "", name = "string", scope = BdDocQuey.class)
+    public JAXBElement<String> createBdDocQueyString(String value) {
+        return new JAXBElement<String>(_BdDocQueyString_QNAME, String.class, BdDocQuey.class, value);
+    }
+
+}

+ 63 - 0
src/main/java/com/muzhi/dingtalk/test/chaxun/bddocquey.wsdl

@@ -0,0 +1,63 @@
+<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0" targetNamespace="http://fdncc.itf.nc/IBDdocQuey" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:ns0="http://fdncc.itf.nc/IBDdocQuey" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <wsdl:types>
+    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" jaxb:version="2.0" targetNamespace="http://fdncc.itf.nc/IBDdocQuey" xmlns:ns="http://fdncc.itf.nc/IBDdocQuey">
+	<xsd:annotation>
+    	<xsd:appinfo>
+   			<jaxb:schemaBindings>
+    			<jaxb:package name="nc.itf.fdncc" />
+    		</jaxb:schemaBindings>
+   		</xsd:appinfo>
+   	</xsd:annotation>
+	<xsd:element name="bdDocQuey">
+         <xsd:complexType>
+            <xsd:sequence>
+				<xsd:element minOccurs="0" name="string" nillable="true" type="xsd:string" />
+             </xsd:sequence>  
+         </xsd:complexType>
+     </xsd:element>
+	<xsd:element name="bdDocQueyResponse">
+         <xsd:complexType>
+            <xsd:sequence>
+				<xsd:element minOccurs="0" name="return" nillable="true" type="xsd:string" />
+             </xsd:sequence>  
+         </xsd:complexType>
+     </xsd:element>
+   </xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="bdDocQueyRequest">
+    <wsdl:part element="ns0:bdDocQuey" name="parameters">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="bdDocQueyResponse">
+    <wsdl:part element="ns0:bdDocQueyResponse" name="parameters">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="IBDdocQueyPortType">
+    <wsdl:operation name="bdDocQuey">
+      <wsdl:input message="ns0:bdDocQueyRequest" wsaw:Action="urn:bdDocQuey">
+    </wsdl:input>
+      <wsdl:output message="ns0:bdDocQueyResponse" wsaw:Action="urn:bdDocQueyResponse">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="IBDdocQueySOAP11Binding" type="ns0:IBDdocQueyPortType">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="bdDocQuey">
+      <soap:operation soapAction="urn:bdDocQuey" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="IBDdocQuey">
+    <wsdl:port binding="ns0:IBDdocQueySOAP11Binding" name="IBDdocQueySOAP11port_http">
+      <soap:address location="http://118.178.17.233:8888/uapws/service/bddocquey" />
+    </wsdl:port>
+  </wsdl:service>
+    <jaxws:bindings>
+	<jaxws:package name="nc.itf.fdncc" />
+</jaxws:bindings>
+</wsdl:definitions>

BIN=BIN
src/main/java/com/muzhi/dingtalk/test/chaxun/package-info.class


+ 2 - 0
src/main/java/com/muzhi/dingtalk/test/chaxun/package-info.java

@@ -0,0 +1,2 @@
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://fdncc.itf.nc/IBDdocQuey")
+package com.muzhi.dingtalk.test.chaxun;

+ 24 - 0
src/main/java/com/muzhi/dingtalk/test/config/CrosConfig.java

@@ -0,0 +1,24 @@
+package com.muzhi.dingtalk.test.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+/**
+ * @Author ZhangKan
+ * @Data 0:55
+ */
+
+//解决跨域的配置类
+@Configuration
+public class CrosConfig implements WebMvcConfigurer {
+
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        registry.addMapping("/*")
+                .allowedOrigins("*")
+                .allowCredentials(true)
+                .allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH")
+                .maxAge(3600);
+    }
+}

+ 20 - 0
src/main/java/com/muzhi/dingtalk/test/config/MybatisPlusConfig.java

@@ -0,0 +1,20 @@
+package com.muzhi.dingtalk.test.config;
+
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Author ZhangKan
+ * @Data 21:30
+ */
+
+//配置拦截器
+@Configuration
+public class MybatisPlusConfig {
+
+    @Bean
+    public PaginationInterceptor paginationInterceptor(){
+        return new PaginationInterceptor();
+    }
+}

+ 43 - 0
src/main/java/com/muzhi/dingtalk/test/config/Swagger2.java

@@ -0,0 +1,43 @@
+package com.muzhi.dingtalk.test.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+//Swagger2
+//@Configuration
+//@EnableSwagger2
+//@EnableWebMvc
+//public class Swagger2 {
+//    @Bean
+//    public Docket createRestApi() {
+//        return new Docket(DocumentationType.SWAGGER_2)
+//                .apiInfo(apiInfo())
+//                .select()
+//                //为当前包路径
+//                .apis(RequestHandlerSelectors.basePackage("com.muzhi.dingtalk.test"))
+//                .paths(PathSelectors.any())
+//                .build();
+//    }
+//    //构建 api文档的详细信息函数,注意这里的注解引用的是哪个
+//    private ApiInfo apiInfo() {
+//        return new ApiInfoBuilder()
+//                //页面标题
+//                .title("DingTalk API")
+//                //创建人
+//                .contact(new Contact("muzhi", "http://www.baidu.com", "996880145@qq.com"))
+//                //版本号
+//                .version("1.0")
+//                //描述
+//                .description("API 描述")
+//                .build();
+//    }
+//}

+ 26 - 0
src/main/java/com/muzhi/dingtalk/test/config/WebConfig.java

@@ -0,0 +1,26 @@
+package com.muzhi.dingtalk.test.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.CacheControl;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+import java.util.concurrent.TimeUnit;
+
+//Swagger2的配置类
+//@Configuration
+//@EnableWebMvc
+//public class WebConfig extends WebMvcConfigurerAdapter {
+//
+//    @Override
+//    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+//        registry.addResourceHandler("swagger-ui.html")
+//                .addResourceLocations("classpath:/META-INF/resources/")
+//                .setCacheControl(CacheControl.maxAge(1, TimeUnit.HOURS).cachePublic());
+//        registry.addResourceHandler("/webjars/**")
+//                .addResourceLocations("classpath:/META-INF/resources/webjars/")
+//                .setCacheControl(CacheControl.maxAge(1, TimeUnit.HOURS).cachePublic());
+//    }
+//
+//}

+ 43 - 0
src/main/java/com/muzhi/dingtalk/test/controller/AccessTokenController.java

@@ -0,0 +1,43 @@
+package com.muzhi.dingtalk.test.controller;
+
+import com.muzhi.dingtalk.test.service.DingAccessTokenService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Author ZhangKan
+ * @Data 15:03
+ */
+
+@Api(description = "钉钉授权AccessToken")
+@RestController
+@RequestMapping("/dingservice")
+public class AccessTokenController {
+
+    @Autowired
+    private DingAccessTokenService dingAccessTokenService;
+
+    //获取钉钉中的access_token(云璞)
+    @ApiOperation(value = "获取钉钉中的access_token")
+    @GetMapping("getAccessToken")
+    public String getAccessToken(){
+
+        String accessToken = dingAccessTokenService.getAccessToken();
+        return accessToken;
+    }
+
+    //获取钉钉中的access_token(牧之测试架构)
+    @ApiOperation(value = "获取钉钉中的access_token")
+    @GetMapping("getMuZhiAccessToken")
+    public String getMuZhiAccessToken(){
+
+        String muZhiAccessToken = dingAccessTokenService.getMuZhiAccessToken();
+        return muZhiAccessToken;
+    }
+}

+ 41 - 0
src/main/java/com/muzhi/dingtalk/test/controller/ChuanYunTongbuController.java

@@ -0,0 +1,41 @@
+package com.muzhi.dingtalk.test.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeToChuanYunDataVo;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeToChuanYunVo;
+import com.muzhi.dingtalk.test.service.ChuanYunTongbuService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@Api(description = "同步数据至NC接口")
+@RestController
+@RequestMapping("/chuanyuntongbuservice/chuanyuntongbu")
+@CrossOrigin//解决跨域问题
+public class ChuanYunTongbuController {
+
+    @Autowired
+    private ChuanYunTongbuService chuanYunTongbuService;
+
+    //查询钉钉接口中所有的房德花名册数据
+    @GetMapping("getFangDeHuamingceAll")
+    public String getFangDeHuamingceAll(){
+
+        String fangDeHuamingceAll = chuanYunTongbuService.getFangDeHuamingceAll();
+
+        return fangDeHuamingceAll;
+    }
+
+    @ApiOperation(value = "同步房德钉钉花名册指定数据至氚云接口")
+    @GetMapping("getFangDeHuamingceToCY")
+//    @Scheduled(cron = "0 1 15 * * ?")//每天下午15:01触发(也就是下午3点触发)
+//    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+    public EmployeeFangDeToChuanYunDataVo getFangDeHuamingceToCY(){
+
+        //将房德钉钉花名册数据先处理成指定的json格式数据
+        EmployeeFangDeToChuanYunDataVo<EmployeeFangDeToChuanYunVo> fangDeHuamingceToCY = chuanYunTongbuService.getFangDeHuamingceToCY();
+
+        return fangDeHuamingceToCY;
+    }
+}

+ 46 - 0
src/main/java/com/muzhi/dingtalk/test/controller/DepartmentController.java

@@ -0,0 +1,46 @@
+package com.muzhi.dingtalk.test.controller;
+
+import com.muzhi.dingtalk.test.entity.vo.DepartmentDataVo;
+import com.muzhi.dingtalk.test.entity.vo.DepartmentQuery;
+import com.muzhi.dingtalk.test.service.DepartmentService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Api(description = "钉钉部门")
+@RestController
+@RequestMapping(value = "/departmentservice/department", produces = {"application/json;charset=UTF-8"})
+public class DepartmentController {
+
+    @Autowired
+    private DepartmentService departmentService;
+
+    //查询钉钉接口中的部门列表信息
+    @ApiOperation(value = "查询钉钉接口中的部门列表信息")
+    @GetMapping("getDingDepartment")
+    public String getDingDepartment(){
+
+        String dingDepartment = departmentService.getDingDepartment();
+        return dingDepartment;
+    }
+
+    //获取部门列表
+    @ApiOperation(value = "获取部门列表")
+    @GetMapping("getDepartmentList")
+    public DepartmentDataVo getDepartmentList(Integer page, Integer limit, DepartmentQuery departmentQuery){
+
+        DepartmentDataVo departmentList = departmentService.getDepartmentList(page, limit, departmentQuery);
+        return departmentList;
+    }
+
+    //TODO 获取部门详情列表
+    @ApiOperation(value = "获取部门详情列表")
+    @GetMapping("getDepartmentXQ")
+    public String getDepartmentXQ(){
+
+        return null;
+    }
+}

+ 69 - 0
src/main/java/com/muzhi/dingtalk/test/controller/DingdingLianJieQiController.java

@@ -0,0 +1,69 @@
+package com.muzhi.dingtalk.test.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiAttendanceVacationQuotaInitRequest;
+import com.dingtalk.api.request.OapiAttendanceVacationQuotaUpdateRequest;
+import com.dingtalk.api.request.OapiProcessinstanceGetRequest;
+import com.dingtalk.api.response.OapiAttendanceVacationQuotaUpdateResponse;
+import com.dingtalk.api.response.OapiProcessinstanceGetResponse;
+import com.muzhi.dingtalk.test.service.DingAccessTokenService;
+import com.muzhi.dingtalk.test.service.DingdingLianJieQiService;
+import com.taobao.api.ApiException;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+@Api(description = "同步数据至数据库")
+@RestController
+@RequestMapping("/lianjieqiservice/OA")
+@CrossOrigin//解决跨域问题
+public class DingdingLianJieQiController {
+
+
+    @Autowired
+    private DingdingLianJieQiService dingdingLianJieQiService;
+
+
+    //抓取钉钉OA审批中通过连接器传输过来的创建审批单的时间
+    @ApiOperation(value = "抓取钉钉OA审批中通过连接器传输过来的创建审批单的时间")
+    @GetMapping("getOATime")
+    public String getOATime(){
+
+        String oaTime = dingdingLianJieQiService.getOATime();
+        System.out.println(oaTime);
+
+        return oaTime;
+    }
+
+    //抓取钉钉OA审批中通过连接器传输过来的控件数据值,并根据审批单的加班时长进行计算并追加到假期余额中
+    @ApiOperation(value = "抓取钉钉OA审批中通过连接器传输过来的控件数据值,并根据审批单的加班时长进行计算并追加到假期余额中")
+    @GetMapping("getOA")
+    public String getOA(String processid){
+
+        String oa = dingdingLianJieQiService.getOA(processid);
+
+        return oa;
+    }
+
+    //抓取钉钉OA审批中通过连接器传输过来的控件数据值,并根据实际打卡时间进行计算加班时长并追加到假期余额中
+    @ApiOperation(value = "抓取钉钉OA审批中通过连接器传输过来的控件数据值,并根据实际打卡时间进行计算加班时长并追加到假期余额中")
+    @GetMapping("getOA2")
+    public String getOA2(String processid){
+
+        String oa2 = dingdingLianJieQiService.getOA2(processid);
+
+        return oa2;
+    }
+
+}

+ 80 - 0
src/main/java/com/muzhi/dingtalk/test/controller/EmployeeController.java

@@ -0,0 +1,80 @@
+package com.muzhi.dingtalk.test.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.muzhi.dingtalk.test.entity.Employee;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeDataVo;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeQuery;
+import com.muzhi.dingtalk.test.service.EmployeeService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+@Api(description = "钉钉花名册")
+@RestController
+//produces = {"application/json;charset=UTF-8"}为了解决后端返回json数据给前端显示乱码问题(中文问号?)
+@RequestMapping(value = "/employeeservice/employee", produces = {"application/json;charset=UTF-8"})
+public class EmployeeController {
+
+    @Autowired
+    private EmployeeService employeeService;
+
+    //获取公司在职员工id列表(已去除",[])
+    @ApiOperation(value = "获取公司在职员工id列表(已去除\",[])")
+    @GetMapping("getEmployeeId")
+    public String getEmployeeId(){
+
+        String employeeId = employeeService.getEmployeeId();
+        return employeeId;
+    }
+
+    //获取公司离职员工id列表(已去除",[])
+    @ApiOperation(value = "获取公司离职员工id列表(已去除\",[])")
+    @GetMapping("getLiZhiEmployeeId")
+    public String getLiZhiEmployeeId(){
+
+        String liZhiEmployeeId = employeeService.getLiZhiEmployeeId();
+        return liZhiEmployeeId;
+    }
+
+
+    //获取公司在职员工id列表(未去除",[])
+    @ApiOperation(value = "获取公司在职员工id列表(未去除\",[])")
+    @GetMapping("getEmployeeIdAll")
+    public List<String> getEmployeeIdAll(){
+
+        List<String> employeeIdAll = employeeService.getEmployeeIdAll();
+        return employeeIdAll;
+    }
+
+    //查询钉钉接口中的花名册信息
+    @ApiOperation(value = "查询钉钉接口中的花名册信息")
+    @GetMapping("getDingHuamingce")
+    public String getDingHuamingce(){
+
+        String dingHuamingce = employeeService.getDingHuamingce();
+        return dingHuamingce;
+    }
+
+    //获取数据库中员工花名册employee实体类表数据并放入vo对象进行前端接口调用展示数据
+    @ApiOperation(value = "获取员工花名册字段信息")
+    @GetMapping("getHuamingce")
+    public EmployeeDataVo getHuamingce(Integer page,Integer limit,
+                                       EmployeeQuery employeeQuery){
+
+//        @RequestBody是使用json传递数据,把json数据封装到对应的对象里面,注意:需要用Post提交方式,Get取不到值
+//        (required = false)表示参数值可以为空
+//        @ApiParam(name = "teacherQuery", value = "自定义讲师查询条件", required = true)
+//        @RequestBody(required = false) EmployeeQuery employeeVoQuery
+
+        EmployeeDataVo huamingce = employeeService.getHuamingce(page,limit,employeeQuery);
+        return huamingce;
+    }
+}

+ 32 - 0
src/main/java/com/muzhi/dingtalk/test/controller/FangDeAccessTokenController.java

@@ -0,0 +1,32 @@
+package com.muzhi.dingtalk.test.controller;
+
+import com.muzhi.dingtalk.test.service.FangDeDingAccessTokenService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Author ZhangKan
+ * @Data 15:03
+ */
+
+@Api(description = "钉钉授权AccessToken")
+@RestController
+@RequestMapping("/dingservice")
+public class FangDeAccessTokenController {
+
+    @Autowired
+    private FangDeDingAccessTokenService fangDeDingAccessTokenService;
+
+    //获取定制服务access_token授权的方法(房德)
+    @ApiOperation(value = "获取定制服务access_token授权的方法")
+    @GetMapping("getFangDeAccessToken")
+    public String getFangDeAccessToken(){
+
+        String fangDeAccessToken = fangDeDingAccessTokenService.getFangDeAccessToken();
+        return fangDeAccessToken;
+    }
+}

+ 331 - 0
src/main/java/com/muzhi/dingtalk/test/controller/FangDeTongbuController.java

@@ -0,0 +1,331 @@
+package com.muzhi.dingtalk.test.controller;
+
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request;
+import com.dingtalk.api.response.OapiMessageCorpconversationAsyncsendV2Response;
+import com.muzhi.dingtalk.test.entity.ErrorlogFangDe;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeDataVo;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeVo;
+import com.muzhi.dingtalk.test.entity.vo.ErrorlogFangDeDataVo;
+import com.muzhi.dingtalk.test.entity.vo.ErrorlogFangDeQuery;
+import com.muzhi.dingtalk.test.exceptionhander.R;
+import com.muzhi.dingtalk.test.mapper.ErrorlogFangDeMapper;
+import com.muzhi.dingtalk.test.service.FangDeDingAccessTokenService;
+import com.muzhi.dingtalk.test.service.FangDeTongbuService;
+import com.muzhi.dingtalk.test.webservicezhengshi.IPsndocVO;
+import com.muzhi.dingtalk.test.webservicezhengshi.IPsndocVOPortType;
+import com.taobao.api.ApiException;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
+import java.util.List;
+
+
+@Api(description = "同步数据至数据库")
+@RestController
+@RequestMapping("/fangdetongbuservice/fangdetongbu")
+@CrossOrigin//解决跨域问题
+public class FangDeTongbuController {
+
+    //TODO 根据NC接口同步数据
+
+    @Autowired
+    private FangDeDingAccessTokenService fangDeDingAccessTokenService;
+    @Autowired
+    private FangDeTongbuService fangDeTongbuService;
+
+    @Autowired
+    private ErrorlogFangDeMapper errorLogFangDeMapper;
+
+    //【测试!!!】获取房德钉钉中的花名册数据并解析成json格式数据返回【离职】
+    @ApiOperation(value = "获取房德员工花名册字段信息")
+    @GetMapping("getFangDeHuamingceTest")
+    public EmployeeFangDeDataVo getFangDeHuamingceTest(){
+
+        EmployeeFangDeDataVo<EmployeeFangDeVo> fangDeHuamingceTest = fangDeTongbuService.getFangDeHuamingceTest();
+        return fangDeHuamingceTest;
+    }
+
+    //【测试!!!】获取房德钉钉中的离职人员信息属于最后工作日为:2021-02-18 00:00:00的人员id【离职】
+    @ApiOperation(value = "获取房德员工花名册字段信息")
+    @GetMapping("getFangDeHuamingceLiZhiIdTest")
+    public String getFangDeHuamingceLiZhiIdTest(){
+
+        String fangDeHuamingceLiZhiIdTest = fangDeTongbuService.getFangDeHuamingceLiZhiIdTest();
+        return fangDeHuamingceLiZhiIdTest;
+    }
+
+    //【测试!!!】获取房德钉钉中的花名册数据并解析成json格式数据返回【离职】
+    @ApiOperation(value = "获取房德员工花名册字段信息")
+    @GetMapping("getFangDeHuamingceLiZhiTest")
+    public EmployeeFangDeDataVo getFangDeHuamingceLiZhiTest(){
+
+        EmployeeFangDeDataVo<EmployeeFangDeVo> fangDeHuamingceLiZhiTest = fangDeTongbuService.getFangDeHuamingceLiZhiTest();
+        return fangDeHuamingceLiZhiTest;
+    }
+
+
+
+
+
+
+    //***以下为正式使用的方法***//
+    //***以下为正式使用的方法***//
+    //***以下为正式使用的方法***//
+
+
+    //房德花名册数据返回指定格式【在职】
+    @ApiOperation(value = "获取房德员工花名册字段信息")
+    @GetMapping("getFangDeHuamingce")
+    public EmployeeFangDeDataVo getFangDeHuamingce(){
+
+        EmployeeFangDeDataVo<EmployeeFangDeVo> fangDeHuamingce = fangDeTongbuService.getFangDeHuamingce();
+        return fangDeHuamingce;
+    }
+
+    //房德花名册数据返回指定格式【离职】
+    @ApiOperation(value = "获取房德员工花名册字段信息")
+    @GetMapping("getFangDeHuamingceLiZhi")
+    public EmployeeFangDeDataVo getFangDeHuamingceLiZhi(){
+
+        EmployeeFangDeDataVo<EmployeeFangDeVo> fangDeHuamingceLiZhi = fangDeTongbuService.getFangDeHuamingceLiZhi();
+        return fangDeHuamingceLiZhi;
+    }
+
+
+
+    //同步房德花名册数据至NC接口
+    @ApiOperation(value = "同步在职人员花名册数据至NC接口")
+    @PostMapping("addFangDeHuamingceToNC")
+//    @Scheduled(cron = "0 1 15 * * ?")//每天下午15:01触发(也就是下午3点触发)
+    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+    public void addFangDeHuamingceToNC(){
+        //先清空错误日志表的数据
+        errorLogFangDeMapper.delete(null);
+
+        IPsndocVO iPsndocVO = new IPsndocVO();
+
+        IPsndocVOPortType iPsndocVOPortType = iPsndocVO.getIPsndocVOSOAP11PortHttp();
+
+        //房德的钉钉中在职人员同步NC接口
+        String bodyZZ = iPsndocVOPortType.savePsndocVO(JSONObject.toJSONString(fangDeTongbuService.getFangDeHuamingce()));
+        System.out.println("NC接口返回结果(在职):" + bodyZZ);
+
+        //通过fastjson工具转换成json对象,逐层解析
+        JSONObject jsonObject = JSON.parseObject(bodyZZ);
+        JSONArray returndata = jsonObject.getJSONArray("returndata");
+
+        ErrorlogFangDe errorLogFangDe = new ErrorlogFangDe();
+
+        for (int i = 0; i<returndata.size(); i++){
+
+            //错误标识
+            errorLogFangDe.setCode(returndata.getJSONObject(i).getString("code"));
+            System.out.println("错误标识:" + returndata.getJSONObject(i).getString("code"));
+            //错误信息
+            errorLogFangDe.setMsg(returndata.getJSONObject(i).getString("msg"));
+            System.out.println("错误信息:" + returndata.getJSONObject(i).getString("msg"));
+
+            String data = returndata.getJSONObject(i).getString("data");
+            JSONObject jsonObject1 = JSON.parseObject(data);
+
+            //员工状态
+            errorLogFangDe.setStatus(jsonObject1.getString("status"));
+            System.out.println("员工状态:" + jsonObject1.getString("status"));
+            //员工ID
+            errorLogFangDe.setId1(jsonObject1.getString("code"));
+            System.out.println("员工ID:" + jsonObject1.getString("code"));
+            //员工姓名
+            errorLogFangDe.setName(jsonObject1.getString("name"));
+            System.out.println("员工姓名:" + jsonObject1.getString("name"));
+            //同步时间
+            errorLogFangDe.setTs(jsonObject1.getString("ts"));
+            System.out.println("同步时间:" + jsonObject1.getString("ts"));
+
+            errorLogFangDeMapper.insert(errorLogFangDe);
+        }
+
+        //同步完成后将同步页面链接发送到通知消息,用来点击跳转查看同步日志信息
+        try {
+            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2");
+            OapiMessageCorpconversationAsyncsendV2Request req = new OapiMessageCorpconversationAsyncsendV2Request();
+            req.setAgentId(1164969760L);
+
+            //TODO 发送通知消息给指定人员id(云璞牧之、云璞甘草、房德丁文波)
+            req.setUseridList("011033176057775267,1951251420023804,1504243329847569");
+
+            req.setToAllUser(false);
+            OapiMessageCorpconversationAsyncsendV2Request.Msg obj1 = new OapiMessageCorpconversationAsyncsendV2Request.Msg();
+            obj1.setMsgtype("link");
+            OapiMessageCorpconversationAsyncsendV2Request.Link obj2 = new OapiMessageCorpconversationAsyncsendV2Request.Link();
+            long time = new Date().getTime();
+            String time1 = String.valueOf(time);
+            obj2.setPicUrl(time1);
+
+            //TODO 消息通知点击的链接:房德服务器路径118.178.17.233:8091
+            obj2.setMessageUrl("dingtalk://dingtalkclient/action/openapp?corpid=ding81b4dfad3a436bd735c2f4657eb6378f&container_type=work_platform&app_id=0_1164969760&redirect_type=jump&redirect_url=http://47.99.48.105:8091/index.html");
+
+            obj2.setText("人员档案同步至NC的日志信息,详细内容请点击跳转至指定页面查看。");
+            obj2.setTitle("人员档案同步完成");
+            obj1.setLink(obj2);
+            req.setMsg(obj1);
+            OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(req, fangDeDingAccessTokenService.getFangDeAccessToken());
+            System.out.println(rsp.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+
+//        //房德的钉钉中离职人员同步NC接口
+//        String bodyLZ = iPsndocVOPortType.savePsndocVO(JSONObject.toJSONString(fangDeTongbuService.getFangDeHuamingceLiZhiTest()));
+//        System.out.println("NC接口返回结果(离职):" + bodyLZ);
+    }
+
+    //从本地错误日志表中查询房德同步NC的错误日志信息并处理成layui(前端页面)需要的json格式
+    @ApiOperation(value = "从本地错误日志表中查询房德同步NC的错误日志信息并处理成layui(前端页面)需要的json格式")
+    @GetMapping("getErrorlogFangDe")
+//    @Scheduled(cron = "0 1 15 * * ?")//每天下午15:01触发(也就是下午3点触发)
+//    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+    public ErrorlogFangDeDataVo<ErrorlogFangDe> getErrorlogFangDe(Integer page, Integer limit, ErrorlogFangDeQuery errorlogFangDeQuery){
+
+        ErrorlogFangDeDataVo errorlogFangDeDataVo = new ErrorlogFangDeDataVo();
+        errorlogFangDeDataVo.setCode(0);
+        errorlogFangDeDataVo.setMsg("");
+//        errorlogFangDeDataVo.setCount(errorLogFangDeMapper.selectCount(null));
+        //将本地数据库中的错误日志表的数据放进data中
+//        errorlogFangDeDataVo.setData(errorLogFangDeMapper.selectList(null));
+
+        //分页查询,创建page对象
+        Page<ErrorlogFangDe> errorlogFangDePage = new Page<>(page,limit);
+
+        //构建查询条件
+        QueryWrapper<ErrorlogFangDe> wrapper = new QueryWrapper<>();
+        //多条件组合查询(类似mybatis中动态sql)
+        String id = errorlogFangDeQuery.getId();
+        String name = errorlogFangDeQuery.getName();
+        String msg = errorlogFangDeQuery.getMsg();
+        //判断条件值是否为空,如果不为空则拼接条件
+        if (!StringUtils.isEmpty(id)) {
+            //构建条件
+            wrapper.like("id1", id);
+        }
+        if (!StringUtils.isEmpty(name)) {
+            //构建条件
+            wrapper.like("name", name);
+        }
+        if (!StringUtils.isEmpty(msg)) {
+            //构建条件
+            wrapper.like("msg", msg);
+        }
+
+//        //查询实体类表中所有的数据(全部)
+//        List<ErrorlogFangDe> errorlogFangDeList = errorLogFangDeMapper.selectList(wrapper);
+        IPage<ErrorlogFangDe> result = errorLogFangDeMapper.selectPage(errorlogFangDePage, wrapper);
+        //查询分页信息记录(根据分页要求来查)
+        List<ErrorlogFangDe> errorlogFangDeList = result.getRecords();
+        //查询总数
+        errorlogFangDeDataVo.setCount(result.getTotal());
+
+        //将本地数据库中的错误日志表的数据放进data中
+        errorlogFangDeDataVo.setData(errorlogFangDeList);
+
+        return errorlogFangDeDataVo;
+    }
+
+
+
+    /**
+     * 任务执行方法(在实际应用中要改成自己的逻辑代码)
+     *Title: execute
+     *Description:
+       * @param request
+       * @return
+     */
+    @RequestMapping(value = "execute")
+    public String execute(HttpServletRequest request) {
+
+        for (int i = 0; i <= 100; i++) {
+            //for循环只是个例子,在实际业务中百分比要进行实际的计算,这里的i就当是百分比
+            //将进度值存储到session中
+            request.getSession().setAttribute("processvalue", i);
+            try {
+                Thread.sleep(100);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+        }
+
+        return "success";
+    }
+    /**
+     * 获取session中的进度值
+     *Title: getprocess
+     *Description:
+       * @param request
+       * @return
+     */
+    @RequestMapping(value = "getprocess")
+    public Object getprocess(HttpServletRequest request) {
+        //从session将执行进度值取出来并返回给用户
+        return request.getSession().getAttribute("processvalue");
+    }
+
+
+
+    //同步花名册数据至本地数据库
+    @ApiOperation(value = "同步在职人员花名册数据至本地数据库")
+    @PostMapping("addFangDeHuamingce")
+//    @Scheduled(cron = "0 1 15 * * ?")//每天下午15:01触发(也就是下午3点触发)
+//    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+    public R addFangDeHuamingce(){
+        //先删除清空employee表中的所有数据
+        fangDeTongbuService.removeFangDeEmployee();
+
+        //再执行插入花名册数据库表的接口
+        String result = fangDeTongbuService.addFangDeHuamingce();
+        return R.ok().data("zaizhi", result);
+    }
+
+    //同步离职人员花名册数据至数据库
+    @ApiOperation(value = "同步离职人员花名册数据至本地数据库")
+    @PostMapping("addFangDeLiZhiHuamingce")
+//    @Scheduled(cron = "0 1 15 * * ?")//每天下午15:01触发(也就是下午3点触发)
+//    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+    public R addFangDeLiZhiHuamingce(){
+        //先删除清空employee表中的所有数据
+//        fangDeTongbuService.removeFangDeEmployee();
+
+        //再执行插入花名册数据库表的接口
+        String liZhiHuamingce = fangDeTongbuService.addFangDeLiZhiHuamingce();
+        return R.ok().data("lizhi",liZhiHuamingce);
+    }
+
+//    //同步花名册数据至数据库
+//    @ApiOperation(value = "同步在职、离职人员花名册数据至房德数据库")
+//    @PostMapping("addFangDeHuamingce")
+////    @Scheduled(cron = "0 1 15 * * ?")//每天下午15:01触发(也就是下午3点触发)
+////    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+//    public R addFangDeHuamingce(){
+//        //先删除清空employee表中的所有数据
+//        fangDeTongbuService.removeFangDeEmployee();
+//
+//        //再执行插入花名册数据库表的接口
+//        String result = fangDeTongbuService.addFangDeHuamingce();
+//        String liZhiHuamingce = fangDeTongbuService.addFangDeLiZhiHuamingce();
+//        return R.ok().data("zaizhi", result).data("lizhi",liZhiHuamingce);
+//    }
+}

+ 61 - 0
src/main/java/com/muzhi/dingtalk/test/controller/KaoqinController.java

@@ -0,0 +1,61 @@
+package com.muzhi.dingtalk.test.controller;
+
+import com.muzhi.dingtalk.test.service.KaoqinService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author ZhangKan
+ * @Data 20:32
+ */
+
+@Api(description = "钉钉考勤")
+@RestController
+@RequestMapping("/kaoqinservice/kaoqin")
+public class KaoqinController {
+
+    @Autowired
+    private KaoqinService kaoqinService;
+
+    //获取考勤结果
+    @ApiOperation(value = "获取考勤结果")
+    @GetMapping("getKaoqinJG")
+    public String getKaoqinJG(){
+
+        String kaoqinJG = kaoqinService.getKaoqinJG();
+        return kaoqinJG;
+    }
+
+    //获取考勤详情
+    @ApiOperation(value = "获取考勤详情")
+    @GetMapping("getKaoqinXQ")
+    public String getKaoqinXQ(){
+
+        String kaoqinXQ = kaoqinService.getKaoqinXQ();
+        return kaoqinXQ;
+    }
+
+    //获取考勤组列表详情
+    @ApiOperation(value = "获取考勤组列表详情")
+    @GetMapping("getKaoqinzuList")
+    public String getKaoqinzuList(){
+
+        String kaoqinzuList = kaoqinService.getKaoqinzuList();
+        return kaoqinzuList;
+    }
+
+    //获取考勤组详情
+    @ApiOperation(value = "获取考勤组详情")
+    @GetMapping("getKaoqinzuXQ")
+    public String getKaoqinzuXQ(){
+
+        String kaoqinzuXQ = kaoqinService.getKaoqinzuXQ();
+        return kaoqinzuXQ;
+    }
+}

+ 37 - 0
src/main/java/com/muzhi/dingtalk/test/controller/ShenpiController.java

@@ -0,0 +1,37 @@
+package com.muzhi.dingtalk.test.controller;
+
+import com.muzhi.dingtalk.test.service.ShenpiService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+@Api(description = "钉钉审批")
+@RestController
+@RequestMapping("/shenpiservice/shenpi")
+public class ShenpiController {
+
+    @Autowired
+    private ShenpiService shenpiService;
+
+    //TODO 分页获取审批实例id列表
+    @ApiOperation(value = "//TODO 分页获取审批实例id列表")
+    @GetMapping("getShenpiIdList")
+    public String getShenpiIdList(){
+
+        String shenpiIdList = shenpiService.getShenpiIdList();
+        return shenpiIdList;
+    }
+
+    //TODO 获取审批实例详情
+    @ApiOperation(value = "//TODO 获取审批实例详情")
+    @GetMapping("getShenpiXQ")
+    public String getShenpiXQ(){
+
+        String shenpiXQ = shenpiService.getShenpiXQ();
+        return shenpiXQ;
+    }
+}

+ 98 - 0
src/main/java/com/muzhi/dingtalk/test/controller/TongbuController.java

@@ -0,0 +1,98 @@
+package com.muzhi.dingtalk.test.controller;
+
+
+import com.muzhi.dingtalk.test.entity.Department;
+import com.muzhi.dingtalk.test.entity.Employee;
+import com.muzhi.dingtalk.test.exceptionhander.R;
+import com.muzhi.dingtalk.test.service.TongbuService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Api(description = "同步数据至数据库")
+@RestController
+@RequestMapping("/tongbuservice/tongbu")
+@CrossOrigin//解决跨域问题
+public class TongbuController {
+
+    @Autowired
+    private TongbuService tongbuService;
+
+    //查询数据库中employee表的所有数据
+    @ApiOperation(value = "查询数据库中employee表的所有数据")
+    @GetMapping("getEmployee")
+    public List<Employee> getEmployee(){
+        List<Employee> employee = tongbuService.getEmployee();
+        return employee;
+    }
+
+    //删除employee表中的所有数据
+    @ApiOperation(value = "删除employee表中的所有数据")
+    @PostMapping("removeEmployee")
+    public R removeEmployee(){
+        String result = tongbuService.removeEmployee();
+        return R.ok().data("result", result);
+    }
+
+    //同步花名册数据至数据库
+    @ApiOperation(value = "同步花名册数据至数据库")
+    @PostMapping("addHuamingce")
+//    @Scheduled(cron = "0 1 15 * * ?")//每天下午15:01触发(也就是下午3点触发)
+//    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+    public R addHuamingce(){
+        //先删除清空employee表中的所有数据
+        tongbuService.removeEmployee();
+
+        //再执行插入花名册数据库表的接口
+        String result = tongbuService.addHuamingce();
+        return R.ok().data("result", result);
+    }
+
+    //删除department表中的所有数据
+    @ApiOperation(value = "同步部门列表数据至数据库")
+    @PostMapping("removeDepartment")
+    public R removeDepartment(){
+        String result = tongbuService.removeDepartment();
+        return R.ok().data("result", result);
+    }
+
+    //同步部门数据至数据库
+    @ApiOperation(value = "删除department表中的所有数据")
+    @PostMapping("addDepartment")
+//    @Scheduled(cron = "0 1 15 * * ?")//每天下午15:01触发(也就是下午3点触发)
+//    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+    public R addDepartment(){
+        //先删除清空department表中的所有数据
+        tongbuService.removeDepartment();
+
+        //再执行插入部门数据库表的接口
+        String result = tongbuService.addDepartment();
+        return R.ok().data("result", result);
+    }
+
+    //删除user表中的所有数据
+    @ApiOperation(value = "删除user表中的所有数据")
+    @PostMapping("removeUser")
+    public R removeUser(){
+        String result = tongbuService.removeUser();
+        return R.ok().data("result", result);
+    }
+
+    //同步用户通讯录数据至数据库
+    @ApiOperation(value = "同步用户通讯录数据至数据库")
+    @PostMapping("addUser")
+//    @Scheduled(cron = "0 1 15 * * ?")//每天下午15:01触发(也就是下午3点触发)
+//    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+    public R addUser(){
+        //先删除清空user表中的所有数据
+        tongbuService.removeUser();
+
+        //再执行插入用户通讯录数据库表的接口
+        String result = tongbuService.addUser();
+        return R.ok().data("result", result);
+    }
+}

+ 23 - 0
src/main/java/com/muzhi/dingtalk/test/controller/ceshiController.java

@@ -0,0 +1,23 @@
+package com.muzhi.dingtalk.test.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * @Author ZhangKan
+ * @Data 21:49
+ */
+@Controller
+public class ceshiController {
+
+    @RequestMapping("/thymeleaf")
+    public String ceshi(Model model){
+        model.addAttribute("ceshi","thymeleaf测试成功!!!");
+
+        return "ceshi";
+    }
+}

+ 32 - 0
src/main/java/com/muzhi/dingtalk/test/entity/Department.java

@@ -0,0 +1,32 @@
+package com.muzhi.dingtalk.test.entity;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "Department部门列表", description = "部门列表")
+public class Department {
+
+    @ApiModelProperty(value = "部门id")
+    private String id;
+
+    @ApiModelProperty(value = "部门名称")
+    private String name;
+
+    @ApiModelProperty(value = "父部门id,根部门为1")
+    private String parentid;
+
+    @ApiModelProperty(value = "是否同步创建一个关联此部门的企业群,true表示是,false表示不是")
+    private String createDeptGroup;
+
+    @ApiModelProperty(value = "当群已经创建后,是否有新人加入部门会自动加入该群,true表示是,false表示不是")
+    private String autoAddUser;
+
+    @ApiModelProperty(value = "部门自定义字段")
+    private String ext;
+}

+ 181 - 0
src/main/java/com/muzhi/dingtalk/test/entity/Employee.java

@@ -0,0 +1,181 @@
+package com.muzhi.dingtalk.test.entity;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "Employee员工花名册对象", description = "员工花名册")
+public class Employee {
+
+    @ApiModelProperty(value = "员工ID")
+    private String id;
+
+    @ApiModelProperty(value = "姓名")
+    private String sys00Name;
+
+    @ApiModelProperty(value = "邮箱")
+    private String sys00Email;
+
+    @ApiModelProperty(value = "部门id")
+    private String sys00DeptIds;
+
+    @ApiModelProperty(value = "部门")
+    private String sys00Dept;
+
+    @ApiModelProperty(value = "主部门id")
+    private String sys00MainDeptId;
+
+    @ApiModelProperty(value = "主部门")
+    private String sys00MainDept;
+
+    @ApiModelProperty(value = "职位")
+    private String sys00Position;
+
+    @ApiModelProperty(value = "手机号")
+    private String sys00Mobile;
+
+    @ApiModelProperty(value = "工号")
+    private String sys00JobNumber;
+
+    @ApiModelProperty(value = "分机号")
+    private String sys00Tel;
+
+    @ApiModelProperty(value = "办公地点")
+    private String sys00WorkPlace;
+
+    @ApiModelProperty(value = "备注")
+    private String sys00Remark;
+
+    @ApiModelProperty(value = "入职时间")
+    private Date sys00ConfirmJoinTime;
+
+    @ApiModelProperty(value = "员工类型")
+    private Integer sys01EmployeeType;
+
+    @ApiModelProperty(value = "员工状态")
+    private Integer sys01EmployeeStatus;
+
+    @ApiModelProperty(value = "试用期")
+    private String sys01ProbationPeriodType;
+
+    @ApiModelProperty(value = "转正日期")
+    private Date sys01RegularTime;
+
+    @ApiModelProperty(value = "岗位职级")
+    private String sys01PositionLevel;
+
+    @ApiModelProperty(value = "身份证姓名")
+    private String sys02RealName;
+
+    @ApiModelProperty(value = "证件号码")
+    private String sys02CertNo;
+
+    @ApiModelProperty(value = "出生日期")
+    private Date sys02BirthTime;
+
+    @ApiModelProperty(value = "性别(0:男;1:女)")
+    private Integer sys02SexType;
+
+    @ApiModelProperty(value = "民族")
+    private String sys02NationType;
+
+    @ApiModelProperty(value = "身份证地址")
+    private String sys02CertAddress;
+
+    @ApiModelProperty(value = "证件有效期")
+    private Date sys02CertEndTime;
+
+    @ApiModelProperty(value = "婚姻状况")
+    private String sys02Marriage;
+
+    @ApiModelProperty(value = "首次参加工作时间")
+    private Date sys02JoinWorkingTime;
+
+    @ApiModelProperty(value = "户籍类型")
+    private Integer sys02ResidenceType;
+
+    @ApiModelProperty(value = "住址")
+    private String sys02Address;
+
+    @ApiModelProperty(value = "政治面貌")
+    private Integer sys02PoliticalStatus;
+
+    @ApiModelProperty(value = "个人社保账号")
+    private String sys09PersonalSi;
+
+    @ApiModelProperty(value = "个人公积金账号")
+    private String sys09PersonalHf;
+
+    @ApiModelProperty(value = "最高学历")
+    private String sys03HighestEdu;
+
+    @ApiModelProperty(value = "毕业院校")
+    private String sys03GraduateSchool;
+
+    @ApiModelProperty(value = "毕业时间")
+    private Date sys03GraduationTime;
+
+    @ApiModelProperty(value = "所学专业")
+    private String sys03Major;
+
+    @ApiModelProperty(value = "银行卡号")
+    private String sys04BankAccountNo;
+
+    @ApiModelProperty(value = "开户行")
+    private String sys04AccountBank;
+
+    @ApiModelProperty(value = "合同公司")
+    private String sys05ContractCompanyName;
+
+    @ApiModelProperty(value = "合同类型")
+    private Integer sys05ContractType;
+
+    @ApiModelProperty(value = "首次合同起始日")
+    private Date sys05FirstContractStartTime;
+
+    @ApiModelProperty(value = "首次合同到期日")
+    private Date sys05FirstContractEndTime;
+
+    @ApiModelProperty(value = "现合同起始日")
+    private Date sys05NowContractStartTime;
+
+    @ApiModelProperty(value = "现合同到期日")
+    private Date sys05NowContractEndTime;
+
+    @ApiModelProperty(value = "合同期限")
+    private String sys05ContractPeriodType;
+
+    @ApiModelProperty(value = "续签次数")
+    private Integer sys05ContractRenewCount;
+
+    @ApiModelProperty(value = "紧急联系人姓名")
+    private String sys06UrgentContactsName;
+
+    @ApiModelProperty(value = "联系人关系")
+    private String sys06UrgentContactsRelation;
+
+    @ApiModelProperty(value = "联系人电话")
+    private String sys06UrgentContactsPhone;
+
+    @ApiModelProperty(value = "有无子女")
+    private String sys07HaveChild;
+
+    @ApiModelProperty(value = "子女姓名")
+    private String sys07ChildName;
+
+    @ApiModelProperty(value = "子女性别")
+    private Integer sys07ChildSex;
+
+    @ApiModelProperty(value = "子女出生日期")
+    private Date sys07ChildBirthDate;
+
+    @ApiModelProperty(value = "自定义字段")
+    private String customField;
+}

+ 64 - 0
src/main/java/com/muzhi/dingtalk/test/entity/EmployeeFangDe.java

@@ -0,0 +1,64 @@
+package com.muzhi.dingtalk.test.entity;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "EmployeeFangDe员工花名册对象", description = "员工花名册")
+public class EmployeeFangDe {
+
+    @ApiModelProperty(value = "合同公司(业务单元名称)")
+    private String orgname;
+
+    @ApiModelProperty(value = "员工ID(人员编码)")
+    private String code;
+
+    @ApiModelProperty(value = "姓名(人员姓名)")
+    private String name;
+
+    @ApiModelProperty(value = "一级部门(人员成本分摊一级部门)")
+    private String def1;
+
+    @ApiModelProperty(value = "二级部门(人员成本分摊二级部门)")
+    private String deptname;
+
+    @ApiModelProperty(value = "入职时间(入职时间)")
+    private Date indutydate;
+
+    @ApiModelProperty(value = "性别(性别名称:男/女)")
+    private String sex;
+
+    @ApiModelProperty(value = "证件类别名称(默认身份证)")
+    private String idtype;
+
+    @ApiModelProperty(value = "证件号码(证件号)")
+    private String id1;
+
+    @ApiModelProperty(value = "合同公司(任职业务单元名称)")
+    private String indutyorgname;
+
+    @ApiModelProperty(value = "员工类型(人员类别名称)")
+    private String psnclname;
+
+    @ApiModelProperty(value = "开户行(开户银行名称)")
+    private String bank;
+
+    @ApiModelProperty(value = "银行类别(默认工资卡)")
+    private String banktype;
+
+    @ApiModelProperty(value = "银行卡号(银行账号)")
+    private String banknum;
+
+    @ApiModelProperty(value = "户名")
+    private String bankname;
+
+    @ApiModelProperty(value = "员工状态(在职状态传1,离职状态传2)")
+    private Integer status;
+}

+ 32 - 0
src/main/java/com/muzhi/dingtalk/test/entity/ErrorlogFangDe.java

@@ -0,0 +1,32 @@
+package com.muzhi.dingtalk.test.entity;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ErrorlogFangDe房德错误日志", description = "房德错误日志")
+public class ErrorlogFangDe {
+
+    @ApiModelProperty(value = "员工ID(人员编码)")
+    private String id1;
+
+    @ApiModelProperty(value = "员工姓名")
+    private String name;
+
+    @ApiModelProperty(value = "员工状态")
+    private String status;
+
+    @ApiModelProperty(value = "错误标识")
+    private String code;
+
+    @ApiModelProperty(value = "错误信息")
+    private String msg;
+
+    @ApiModelProperty(value = "同步时间")
+    private String ts;
+}

+ 14 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/DepartmentDataVo.java

@@ -0,0 +1,14 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class DepartmentDataVo<T> {
+
+    private Integer code;
+    private String msg;
+    private Long count;
+    private List<T> data;
+}

+ 11 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/DepartmentQuery.java

@@ -0,0 +1,11 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class DepartmentQuery {
+    @ApiModelProperty(value = "部门名称,模糊查询")
+    private String name;
+}

+ 30 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/DepartmentVo.java

@@ -0,0 +1,30 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class DepartmentVo {
+
+    @ApiModelProperty(value = "部门id")
+    private String id;
+
+    @ApiModelProperty(value = "部门名称")
+    private String name;
+
+    @ApiModelProperty(value = "父部门id,根部门为1")
+    private String parentid;
+
+    //TODO 考虑完善部门管理中各部门的层级展示以及各部门中的总人数
+//    @ApiModelProperty(value = "父部门名称")
+//    private String parentname;
+
+    @ApiModelProperty(value = "是否同步创建一个关联此部门的企业群,true表示是,false表示不是")
+    private String createDeptGroup;
+
+    @ApiModelProperty(value = "当群已经创建后,是否有新人加入部门会自动加入该群,true表示是,false表示不是")
+    private String autoAddUser;
+
+    @ApiModelProperty(value = "部门自定义字段")
+    private String ext;
+}

+ 14 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeDataVo.java

@@ -0,0 +1,14 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class EmployeeDataVo<T> {
+
+    private Integer code;
+    private String msg;
+    private Long count;
+    private List<T> data;
+}

+ 11 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeFangDeDataVo.java

@@ -0,0 +1,11 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class EmployeeFangDeDataVo<T> {
+
+    private List<T> data;
+}

+ 22 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeFangDeToChuanYunDataVo.java

@@ -0,0 +1,22 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class EmployeeFangDeToChuanYunDataVo<T> {
+
+    @JSONField(name = "ActionName")
+    private String ActionName;
+
+    @JSONField(name = "SchemaCode")
+    private String SchemaCode;
+
+    @JSONField(name = "IsSubmit")
+    private String IsSubmit;
+
+    @JSONField(name = "BizObjectArray")
+    private List<T> BizObjectArray;
+}

+ 68 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeFangDeToChuanYunVo.java

@@ -0,0 +1,68 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "EmployeeFangDe员工花名册对象", description = "员工花名册")
+public class EmployeeFangDeToChuanYunVo {
+
+    @ApiModelProperty(value = "姓名")
+    @JSONField(name = "F0000001")
+    private String F0000001;
+
+    @ApiModelProperty(value = "部门")
+    @JSONField(name = "F0000002")
+    private String F0000002;
+
+    @ApiModelProperty(value = "所属公司")
+    @JSONField(name = "F0000003")
+    private String F0000003;
+
+    @ApiModelProperty(value = "原合同开始时间")
+    @JSONField(name = "F0000004")
+    private String F0000004;
+
+    @ApiModelProperty(value = "原合同结束时间")
+    @JSONField(name = "F0000005")
+    private String F0000005;
+
+    @ApiModelProperty(value = "岗位")
+    @JSONField(name = "F0000006")
+    private String F0000006;
+
+    @ApiModelProperty(value = "入职时间")
+    @JSONField(name = "F0000007")
+    private String F0000007;
+
+    @ApiModelProperty(value = "职级")
+    @JSONField(name = "F0000008")
+    private String F0000008;
+
+    @ApiModelProperty(value = "员工id")
+    @JSONField(name = "F0000009")
+    private String F0000009;
+
+    @ApiModelProperty(value = "部门id")
+    @JSONField(name = "F0000010")
+    private String F0000010;
+
+    @ApiModelProperty(value = "group_id")
+    @JSONField(name = "F0000011")
+    private String F0000011;
+
+    @ApiModelProperty(value = "续签期限")
+    @JSONField(name = "F0000012")
+    private String F0000012;
+
+    @ApiModelProperty(value = "续签次数")
+    @JSONField(name = "F0000013")
+    private String F0000013;
+}

+ 64 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeFangDeVo.java

@@ -0,0 +1,64 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "EmployeeFangDe员工花名册对象", description = "员工花名册")
+public class EmployeeFangDeVo {
+
+    @ApiModelProperty(value = "合同公司(业务单元名称)")
+    private String orgname;
+
+    @ApiModelProperty(value = "员工ID(人员编码)")
+    private String code;
+
+    @ApiModelProperty(value = "姓名(人员姓名)")
+    private String name;
+
+    @ApiModelProperty(value = "一级部门(人员成本分摊一级部门)")
+    private String def1;
+
+    @ApiModelProperty(value = "二级部门(人员成本分摊二级部门)")
+    private String deptname;
+
+    @ApiModelProperty(value = "入职时间(入职时间)")
+    private String indutydate;
+
+    @ApiModelProperty(value = "性别(性别名称:男/女)")
+    private String sex;
+
+    @ApiModelProperty(value = "证件类别名称(默认身份证)")
+    private String idtype;
+
+    @ApiModelProperty(value = "证件号码(证件号)")
+    private String id;
+
+    @ApiModelProperty(value = "合同公司(任职业务单元名称)")
+    private String indutyorgname;
+
+    @ApiModelProperty(value = "员工类型(人员类别名称)")
+    private String psnclname;
+
+    @ApiModelProperty(value = "开户行(开户银行名称)")
+    private String bank;
+
+    @ApiModelProperty(value = "银行类别(默认工资卡)")
+    private String banktype;
+
+    @ApiModelProperty(value = "银行卡号(银行账号)")
+    private String banknum;
+
+    @ApiModelProperty(value = "户名")
+    private String bankname;
+
+    @ApiModelProperty(value = "员工状态(在职状态传1,离职状态传2)")
+    private Integer status;
+}

+ 17 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeQuery.java

@@ -0,0 +1,17 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class EmployeeQuery {
+    @ApiModelProperty(value = "员工名称,模糊查询")
+    private String name;
+
+    @ApiModelProperty(value = "性别 0男 1女")
+    private Integer sex;
+
+    @ApiModelProperty(value = "入职时间", example = "2019-01-01 10:10:10")
+    private String date;//注意,这里使用的是String类型,前端传过来的数据无需进行类型转换
+}

+ 176 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/EmployeeVo.java

@@ -0,0 +1,176 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class EmployeeVo {
+
+    @ApiModelProperty(value = "员工ID")
+    private String id;
+
+    @ApiModelProperty(value = "姓名")
+    private String sys00Name;
+
+    @ApiModelProperty(value = "邮箱")
+    private String sys00Email;
+
+    @ApiModelProperty(value = "部门id")
+    private String sys00DeptIds;
+
+    @ApiModelProperty(value = "部门")
+    private String sys00Dept;
+
+    @ApiModelProperty(value = "主部门id")
+    private String sys00MainDeptId;
+
+    @ApiModelProperty(value = "主部门")
+    private String sys00MainDept;
+
+    @ApiModelProperty(value = "职位")
+    private String sys00Position;
+
+    @ApiModelProperty(value = "手机号")
+    private String sys00Mobile;
+
+    @ApiModelProperty(value = "工号")
+    private String sys00JobNumber;
+
+    @ApiModelProperty(value = "分机号")
+    private String sys00Tel;
+
+    @ApiModelProperty(value = "办公地点")
+    private String sys00WorkPlace;
+
+    @ApiModelProperty(value = "备注")
+    private String sys00Remark;
+
+    @ApiModelProperty(value = "入职时间")
+    private Date sys00ConfirmJoinTime;
+
+    @ApiModelProperty(value = "员工类型")
+    private Integer sys01EmployeeType;
+
+    @ApiModelProperty(value = "员工状态")
+    private Integer sys01EmployeeStatus;
+
+    @ApiModelProperty(value = "试用期")
+    private String sys01ProbationPeriodType;
+
+    @ApiModelProperty(value = "转正日期")
+    private Date sys01RegularTime;
+
+    @ApiModelProperty(value = "岗位职级")
+    private String sys01PositionLevel;
+
+    @ApiModelProperty(value = "身份证姓名")
+    private String sys02RealName;
+
+    @ApiModelProperty(value = "证件号码")
+    private String sys02CertNo;
+
+    @ApiModelProperty(value = "出生日期")
+    private Date sys02BirthTime;
+
+    @ApiModelProperty(value = "性别(0:男;1:女)")
+    private Integer sys02SexType;
+
+    @ApiModelProperty(value = "民族")
+    private String sys02NationType;
+
+    @ApiModelProperty(value = "身份证地址")
+    private String sys02CertAddress;
+
+    @ApiModelProperty(value = "证件有效期")
+    private Date sys02CertEndTime;
+
+    @ApiModelProperty(value = "婚姻状况")
+    private String sys02Marriage;
+
+    @ApiModelProperty(value = "首次参加工作时间")
+    private Date sys02JoinWorkingTime;
+
+    @ApiModelProperty(value = "户籍类型")
+    private Integer sys02ResidenceType;
+
+    @ApiModelProperty(value = "住址")
+    private String sys02Address;
+
+    @ApiModelProperty(value = "政治面貌")
+    private Integer sys02PoliticalStatus;
+
+    @ApiModelProperty(value = "个人社保账号")
+    private String sys09PersonalSi;
+
+    @ApiModelProperty(value = "个人公积金账号")
+    private String sys09PersonalHf;
+
+    @ApiModelProperty(value = "最高学历")
+    private String sys03HighestEdu;
+
+    @ApiModelProperty(value = "毕业院校")
+    private String sys03GraduateSchool;
+
+    @ApiModelProperty(value = "毕业时间")
+    private Date sys03GraduationTime;
+
+    @ApiModelProperty(value = "所学专业")
+    private String sys03Major;
+
+    @ApiModelProperty(value = "银行卡号")
+    private String sys04BankAccountNo;
+
+    @ApiModelProperty(value = "开户行")
+    private String sys04AccountBank;
+
+    @ApiModelProperty(value = "合同公司")
+    private String sys05ContractCompanyName;
+
+    @ApiModelProperty(value = "合同类型")
+    private Integer sys05ContractType;
+
+    @ApiModelProperty(value = "首次合同起始日")
+    private Date sys05FirstContractStartTime;
+
+    @ApiModelProperty(value = "首次合同到期日")
+    private Date sys05FirstContractEndTime;
+
+    @ApiModelProperty(value = "现合同起始日")
+    private Date sys05NowContractStartTime;
+
+    @ApiModelProperty(value = "现合同到期日")
+    private Date sys05NowContractEndTime;
+
+    @ApiModelProperty(value = "合同期限")
+    private String sys05ContractPeriodType;
+
+    @ApiModelProperty(value = "续签次数")
+    private Integer sys05ContractRenewCount;
+
+    @ApiModelProperty(value = "紧急联系人姓名")
+    private String sys06UrgentContactsName;
+
+    @ApiModelProperty(value = "联系人关系")
+    private String sys06UrgentContactsRelation;
+
+    @ApiModelProperty(value = "联系人电话")
+    private String sys06UrgentContactsPhone;
+
+    @ApiModelProperty(value = "有无子女")
+    private String sys07HaveChild;
+
+    @ApiModelProperty(value = "子女姓名")
+    private String sys07ChildName;
+
+    @ApiModelProperty(value = "子女性别")
+    private Integer sys07ChildSex;
+
+    @ApiModelProperty(value = "子女出生日期")
+    private Date sys07ChildBirthDate;
+
+    @ApiModelProperty(value = "自定义字段")
+    private String customField;
+}

+ 14 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/ErrorlogFangDeDataVo.java

@@ -0,0 +1,14 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ErrorlogFangDeDataVo<T> {
+
+    private Integer code;
+    private String msg;
+    private Long count;
+    private List<T> data;
+}

+ 18 - 0
src/main/java/com/muzhi/dingtalk/test/entity/vo/ErrorlogFangDeQuery.java

@@ -0,0 +1,18 @@
+package com.muzhi.dingtalk.test.entity.vo;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ErrorlogFangDeQuery {
+
+    @ApiModelProperty(value = "人员id,模糊查询")
+    private String id;
+
+    @ApiModelProperty(value = "人员姓名,模糊查询")
+    private String name;
+
+    @ApiModelProperty(value = "错误关键字,模糊查询")
+    private String msg;
+}

+ 72 - 0
src/main/java/com/muzhi/dingtalk/test/exceptionhander/R.java

@@ -0,0 +1,72 @@
+package com.muzhi.dingtalk.test.exceptionhander;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @Author ZhangKan
+ * @Data 11:20
+ */
+
+//统一返回结果类
+@Data
+public class R {
+
+    @ApiModelProperty(value = "是否成功")
+    private Boolean success;
+
+    @ApiModelProperty(value = "返回码")
+    private Integer code;
+
+    @ApiModelProperty(value = "返回消息")
+    private String message;
+
+    @ApiModelProperty(value = "返回数据")
+    private Map<String, Object> data = new HashMap<String, Object>();
+
+    //把构造方法私有
+    private R(){}
+
+    //成功静态方法
+    public static R ok(){
+
+        R r = new R();
+        r.setSuccess(true);
+        r.setCode(ResultCode.SUCCESS);
+        r.setMessage("成功");
+        return r;
+    }
+
+    //失败静态方法
+    public static R error(){
+
+        R r = new R();
+        r.setSuccess(true);
+        r.setCode(ResultCode.ERROR);
+        r.setMessage("失败");
+        return r;
+    }
+
+    public R message(String message){
+        this.setMessage(message);
+        return this;
+    }
+
+    public R code(Integer code){
+        this.setCode(code);
+        return this;
+    }
+
+    public R data(String key, Object value){
+        this.data.put(key, value);
+        return this;
+    }
+
+    public R data(Map<String, Object> map){
+        this.setData(map);
+        return this;
+    }
+}

+ 12 - 0
src/main/java/com/muzhi/dingtalk/test/exceptionhander/ResultCode.java

@@ -0,0 +1,12 @@
+package com.muzhi.dingtalk.test.exceptionhander;
+
+/**
+ * @Author ZhangKan
+ * @Data 11:15
+ */
+public interface ResultCode {
+
+    public static Integer SUCCESS = 20000;//成功
+
+    public static Integer ERROR = 20001;//失败
+}

+ 20 - 0
src/main/java/com/muzhi/dingtalk/test/exceptionhander/ZhangkanException.java

@@ -0,0 +1,20 @@
+package com.muzhi.dingtalk.test.exceptionhander;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Author ZhangKan
+ * @Data 22:02
+ */
+
+@Data
+@AllArgsConstructor//生成有参数的构造方法
+@NoArgsConstructor//生成无参数的构造方法
+public class ZhangkanException extends RuntimeException{
+
+    private Integer code;//状态码
+    private String msg;//异常信息
+
+}

+ 108 - 0
src/main/java/com/muzhi/dingtalk/test/http/HttpUtils.java

@@ -0,0 +1,108 @@
+package com.muzhi.dingtalk.test.http;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSession;
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Map;
+
+public class HttpUtils {
+
+    private HttpURLConnection httpConn = null;
+
+    public HttpUtils() {}
+
+    private void init(String connectUrl, String method) throws Exception {
+        URL url = new URL(connectUrl);
+        System.setProperty("java.protocol.handler.pkgs", "javax.net.ssl");
+        HostnameVerifier hv = new HostnameVerifier() {
+            public boolean verify(String urlHostName, SSLSession session) {
+                return urlHostName.equals(session.getPeerHost());
+            }
+        };
+        HttpsURLConnection.setDefaultHostnameVerifier(hv);
+        URLConnection connection = url.openConnection();
+        connection.setDoInput(true);
+        connection.setDoOutput(true);
+        connection.setReadTimeout(60000);
+        connection.setConnectTimeout(30000);
+        if (connection instanceof HttpsURLConnection) {
+            HttpsURLConnection httpsConn = (HttpsURLConnection)connection;
+            httpsConn.setSSLSocketFactory(MyX509TrustManager.getInstance().getSSLSocketFactory());
+        } else if (connection instanceof HttpURLConnection) {
+            @SuppressWarnings("unused")
+            HttpURLConnection httpConn = (HttpURLConnection)connection;
+        } else {
+            throw new Exception("不是http/https协议的url");
+        }
+        this.httpConn = (HttpURLConnection)connection;
+        if ("POST".equals(method)) {
+            httpConn.setDoOutput(true);
+            httpConn.setDoInput(true);
+            // httpConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+            httpConn.setRequestProperty("Content-Type", "application/json; charset=utf-8");
+        }
+        httpConn.setRequestMethod(method);
+        httpConn.setUseCaches(false);
+        httpConn.setInstanceFollowRedirects(true);
+    }
+
+    private void destory() {
+        try {
+            if (this.httpConn != null) {
+                this.httpConn.disconnect();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private String readBytesFromStream(InputStream is) throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        int readLen;
+        byte[] tmpBuf = new byte[4096];
+        while ((readLen = is.read(tmpBuf)) > 0) {
+            baos.write(tmpBuf, 0, readLen);
+        }
+        is.close();
+        return new String(baos.toByteArray());
+    }
+
+    public String sendPost(String url, String params, Map<String, String> header) throws Exception {
+        init(url, "POST");
+
+        // 判断 是否有设置 请求头
+        for (String key : header.keySet()) {
+            httpConn.setRequestProperty(key, header.get(key));
+        }
+
+        // 判断 是否有设置请求数据
+        if (params != null) {
+            // StringBuffer buff = new StringBuffer();
+            // for (String key : params.keySet()) {
+            // buff.append(key);
+            // buff.append('=');
+            // buff.append(URLEncoder.encode(params.get(key), "UTF-8"));
+            // buff.append('&');
+            // }
+            // String body = buff.toString();
+            // body = body.substring(0, body.length() - 1);
+            // System.out.println(body);
+            DataOutputStream out = new DataOutputStream(httpConn.getOutputStream());
+            // out.write(buff.toString().getBytes("UTF-8"));
+            out.write(params.getBytes("UTF-8"));
+            out.close();
+        }
+
+        String result = readBytesFromStream(httpConn.getInputStream());
+        destory();
+        return result;
+    }
+
+}

+ 66 - 0
src/main/java/com/muzhi/dingtalk/test/http/MyX509TrustManager.java

@@ -0,0 +1,66 @@
+package com.muzhi.dingtalk.test.http;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSocketFactory;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+/**
+ * 
+ * @author shinka
+ * @date 2021/02/25
+ */
+public class MyX509TrustManager implements X509TrustManager {
+
+    private static MyX509TrustManager _instance = null;
+
+    private SSLSocketFactory sslFactory = null;
+
+    private MyX509TrustManager() {}
+
+    public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {}
+
+    public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException {}
+
+    public X509Certificate[] getAcceptedIssuers() {
+        return null;
+    }
+
+    /**
+     * 获取SSL Socket工厂
+     * <p>
+     * Title: getSSLSocketFactory
+     * </p>
+     * 
+     * @return
+     */
+    public SSLSocketFactory getSSLSocketFactory() {
+        return sslFactory;
+    }
+
+    /**
+     * 获取SSL管理助手类实例
+     * <p>
+     * Title: getInstance
+     * </p>
+     * 
+     * @return
+     * @throws NoSuchAlgorithmException
+     * @throws KeyManagementException
+     */
+    @SuppressWarnings("static-access")
+    synchronized public static MyX509TrustManager getInstance()
+        throws NoSuchAlgorithmException, KeyManagementException {
+        if (_instance == null) {
+            _instance = new MyX509TrustManager();
+            SSLContext sc = SSLContext.getInstance("SSLv3").getInstance("TLSv1.2");
+            sc.init(null, new TrustManager[] {new MyX509TrustManager()}, null);
+            _instance.sslFactory = sc.getSocketFactory();
+        }
+        return _instance;
+    }
+}

+ 35 - 0
src/main/java/com/muzhi/dingtalk/test/http/Test.java

@@ -0,0 +1,35 @@
+package com.muzhi.dingtalk.test.http;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Test {
+    public static void main(String[] args) throws Exception {
+
+        // Map<String, String> params = new HashMap<>();
+        // params.put("ActionName", "CreateBizObject");
+        // params.put("SchemaCode", "D0015996667feb3a9584ac199991c38b676fb33");
+        // params.put("IsSubmit", "true");
+        //
+        // String objStr =
+        // "{\"CreatedBy\":\"2f2825f6-9325-415e-899e-07dd0cae1ad6\",\"OwnerId\":\"2f2825f6-9325-415e-899e-07dd0cae1ad6\",\"F0000001\":\"123\",\"F0000002\":\"123\"}";
+        // params.put("BizObject", objStr);
+
+        String paramsJson = "{" + "    \"ActionName\": \"CreateBizObject\","
+            + "    \"SchemaCode\": \"D0015996667feb3a9584ac199991c38b676fb33\","
+            + "    \"BizObject\": \"{\\\"CreatedBy\\\": \\\"2f2825f6-9325-415e-899e-07dd0cae1ad6\\\","
+            + "        \\\"OwnerId\\\": \\\"2f2825f6-9325-415e-899e-07dd0cae1ad6\\\","
+            + "        \\\"F0000001\\\": \\\"123\\\"," + "        \\\"F0000002\\\": \\\"123\\\"" + "    }\","
+            + "    \"IsSubmit\": \"true\"" + "}";
+
+        // 身份认证参数
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("EngineCode", "fs1tkeu2ap4kb4hp");
+        headers.put("EngineSecret", "Ed0JouQbydoe1seTTuETeqK7VbJqTX2jEWOUCnnfgZc0kzLg18nZFw==");
+
+        HttpUtils httpConn = new HttpUtils();
+        String str = httpConn.sendPost("https://www.h3yun.com/OpenApi/Invoke", paramsJson, headers);
+        System.out.println(str);
+    }
+
+}

+ 12 - 0
src/main/java/com/muzhi/dingtalk/test/mapper/DepartmentMapper.java

@@ -0,0 +1,12 @@
+package com.muzhi.dingtalk.test.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.muzhi.dingtalk.test.entity.Department;
+import com.muzhi.dingtalk.test.entity.Employee;
+import org.springframework.stereotype.Repository;
+
+//在对应的Mapper上面继承基本的类BaseMapper
+@Repository//代表持久层,或者加入@Mapper注解
+public interface DepartmentMapper extends BaseMapper<Department> {
+    //所有的CRUD操作都已经编写完成了
+}

+ 12 - 0
src/main/java/com/muzhi/dingtalk/test/mapper/EmployeeFangDeMapper.java

@@ -0,0 +1,12 @@
+package com.muzhi.dingtalk.test.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.muzhi.dingtalk.test.entity.Employee;
+import com.muzhi.dingtalk.test.entity.EmployeeFangDe;
+import org.springframework.stereotype.Repository;
+
+//在对应的Mapper上面继承基本的类BaseMapper
+@Repository//代表持久层,或者加入@Mapper注解
+public interface EmployeeFangDeMapper extends BaseMapper<EmployeeFangDe> {
+    //所有的CRUD操作都已经编写完成了
+}

+ 11 - 0
src/main/java/com/muzhi/dingtalk/test/mapper/EmployeeMapper.java

@@ -0,0 +1,11 @@
+package com.muzhi.dingtalk.test.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.muzhi.dingtalk.test.entity.Employee;
+import org.springframework.stereotype.Repository;
+
+//在对应的Mapper上面继承基本的类BaseMapper
+@Repository//代表持久层,或者加入@Mapper注解
+public interface EmployeeMapper extends BaseMapper<Employee> {
+    //所有的CRUD操作都已经编写完成了
+}

+ 11 - 0
src/main/java/com/muzhi/dingtalk/test/mapper/ErrorlogFangDeMapper.java

@@ -0,0 +1,11 @@
+package com.muzhi.dingtalk.test.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.muzhi.dingtalk.test.entity.ErrorlogFangDe;
+import org.springframework.stereotype.Repository;
+
+//在对应的Mapper上面继承基本的类BaseMapper
+@Repository//代表持久层,或者加入@Mapper注解
+public interface ErrorlogFangDeMapper extends BaseMapper<ErrorlogFangDe> {
+    //所有的CRUD操作都已经编写完成了
+}

+ 5 - 0
src/main/java/com/muzhi/dingtalk/test/mapper/xml/DepartmentMapper.xml

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

+ 5 - 0
src/main/java/com/muzhi/dingtalk/test/mapper/xml/EmployeeFangDeMapper.xml

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

+ 5 - 0
src/main/java/com/muzhi/dingtalk/test/mapper/xml/EmployeeMapper.xml

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

+ 5 - 0
src/main/java/com/muzhi/dingtalk/test/mapper/xml/ErrorlogFangDeMapper.xml

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

+ 13 - 0
src/main/java/com/muzhi/dingtalk/test/service/ChuanYunTongbuService.java

@@ -0,0 +1,13 @@
+package com.muzhi.dingtalk.test.service;
+
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeToChuanYunDataVo;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeToChuanYunVo;
+
+public interface ChuanYunTongbuService {
+
+    //查询钉钉接口中所有的房德花名册数据
+    String getFangDeHuamingceAll();
+
+    //将房德钉钉花名册数据先处理成指定的json格式数据
+    public EmployeeFangDeToChuanYunDataVo<EmployeeFangDeToChuanYunVo> getFangDeHuamingceToCY();
+}

+ 17 - 0
src/main/java/com/muzhi/dingtalk/test/service/DepartmentService.java

@@ -0,0 +1,17 @@
+package com.muzhi.dingtalk.test.service;
+
+import com.muzhi.dingtalk.test.entity.Department;
+import com.muzhi.dingtalk.test.entity.vo.DepartmentDataVo;
+import com.muzhi.dingtalk.test.entity.vo.DepartmentQuery;
+
+public interface DepartmentService {
+
+    //查询钉钉接口中的部门列表信息
+    String getDingDepartment();
+
+    //获取部门列表
+    public DepartmentDataVo<Department> getDepartmentList(Integer page, Integer limit, DepartmentQuery departmentQuery);
+
+    //TODO 获取部门详情列表
+    String getDepartmentXQ();
+}

+ 14 - 0
src/main/java/com/muzhi/dingtalk/test/service/DingAccessTokenService.java

@@ -0,0 +1,14 @@
+package com.muzhi.dingtalk.test.service;
+
+/**
+ * @Author ZhangKan
+ * @Data 15:34
+ */
+public interface DingAccessTokenService {
+
+    //获取access_token的方法(云璞)
+    String getAccessToken();
+
+    //获取access_token的方法(牧之测试架构)
+    String getMuZhiAccessToken();
+}

+ 14 - 0
src/main/java/com/muzhi/dingtalk/test/service/DingdingLianJieQiService.java

@@ -0,0 +1,14 @@
+package com.muzhi.dingtalk.test.service;
+
+
+public interface DingdingLianJieQiService {
+
+    //抓取钉钉OA审批中通过连接器传输过来的创建审批单的时间
+    String getOATime();
+
+    //抓取钉钉OA审批中通过连接器传输过来的控件数据值,并根据审批单的加班时长进行计算并追加到假期余额中
+    String getOA(String processid);
+
+    //抓取钉钉OA审批中通过连接器传输过来的控件数据值,并根据实际打卡时间进行计算加班时长并追加到假期余额中
+    String getOA2(String processid);
+}

+ 30 - 0
src/main/java/com/muzhi/dingtalk/test/service/EmployeeService.java

@@ -0,0 +1,30 @@
+package com.muzhi.dingtalk.test.service;
+
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.muzhi.dingtalk.test.entity.Employee;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeDataVo;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeQuery;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeVo;
+
+import java.util.List;
+
+public interface EmployeeService extends IService<Employee> {
+
+    //获取公司在职员工id列表(已去除",[])
+    String getEmployeeId();
+
+    //获取公司离职员工id列表(已去除",[])
+    String getLiZhiEmployeeId();
+
+
+    //获取公司在职员工id列表(未去除",[])
+    List<String> getEmployeeIdAll();
+
+    //查询钉钉接口中的花名册信息
+    String getDingHuamingce();
+
+    //获取数据库中员工花名册employee实体类表数据进行前端接口调用展示数据
+    public EmployeeDataVo<Employee> getHuamingce(Integer page,Integer limit, EmployeeQuery employeeQuery);
+}

+ 11 - 0
src/main/java/com/muzhi/dingtalk/test/service/FangDeDingAccessTokenService.java

@@ -0,0 +1,11 @@
+package com.muzhi.dingtalk.test.service;
+
+/**
+ * @Author ZhangKan
+ * @Data 15:34
+ */
+public interface FangDeDingAccessTokenService {
+
+    //获取定制服务access_token授权的方法(房德)
+    String getFangDeAccessToken();
+}

+ 38 - 0
src/main/java/com/muzhi/dingtalk/test/service/FangDeTongbuService.java

@@ -0,0 +1,38 @@
+package com.muzhi.dingtalk.test.service;
+
+
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeDataVo;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeVo;
+
+import javax.servlet.http.HttpServletRequest;
+
+public interface FangDeTongbuService {
+
+    //TODO 根据NC接口同步数据
+
+    //【测试!!!】获取房德钉钉中的花名册数据并解析成json格式数据返回【在职】
+    public EmployeeFangDeDataVo<EmployeeFangDeVo> getFangDeHuamingceTest();
+
+    //【测试!!!】获取房德钉钉中的离职人员信息属于最后工作日为:2021-02-18 00:00:00的人员id【离职】
+    String getFangDeHuamingceLiZhiIdTest();
+
+    //【测试!!!】获取房德钉钉中的花名册数据并解析成json格式数据返回【离职】
+    public EmployeeFangDeDataVo<EmployeeFangDeVo> getFangDeHuamingceLiZhiTest();
+
+
+
+    //房德花名册数据返回指定格式【在职】
+    public EmployeeFangDeDataVo<EmployeeFangDeVo> getFangDeHuamingce();
+
+    //房德花名册数据返回指定格式【离职】
+    public EmployeeFangDeDataVo<EmployeeFangDeVo> getFangDeHuamingceLiZhi();
+
+    //删除employee表中的所有数据
+    String removeFangDeEmployee();
+
+    //同步在职人员花名册数据至房德数据库
+    String addFangDeHuamingce();
+
+    //同步离职人员花名册数据至房德数据库
+    String addFangDeLiZhiHuamingce();
+}

+ 21 - 0
src/main/java/com/muzhi/dingtalk/test/service/KaoqinService.java

@@ -0,0 +1,21 @@
+package com.muzhi.dingtalk.test.service;
+
+
+/**
+ * @Author ZhangKan
+ * @Data 20:31
+ */
+public interface KaoqinService {
+
+    //获取考勤结果
+    String getKaoqinJG();
+
+    //获取考勤详情
+    String getKaoqinXQ();
+
+    //获取考勤组列表详情
+    String getKaoqinzuList();
+
+    //获取考勤组详情
+    String getKaoqinzuXQ();
+}

+ 11 - 0
src/main/java/com/muzhi/dingtalk/test/service/ShenpiService.java

@@ -0,0 +1,11 @@
+package com.muzhi.dingtalk.test.service;
+
+
+public interface ShenpiService {
+
+    //分页获取审批实例id列表
+    String getShenpiIdList();
+
+    //获取审批实例详情
+    String getShenpiXQ();
+}

+ 33 - 0
src/main/java/com/muzhi/dingtalk/test/service/TongbuService.java

@@ -0,0 +1,33 @@
+package com.muzhi.dingtalk.test.service;
+
+import com.muzhi.dingtalk.test.entity.Employee;
+
+import java.util.List;
+
+public interface TongbuService{
+
+    //查询数据库中employee表的所有数据
+    List<Employee> getEmployee();
+
+    //删除employee表中的所有数据
+    String removeEmployee();
+
+    //同步花名册数据至数据库
+    String addHuamingce();
+
+
+
+    //删除department表中的所有数据
+    String removeDepartment();
+
+    //同步部门数据至数据库
+    String addDepartment();
+
+
+
+    //删除user表中的所有数据
+    String removeUser();
+
+    //同步用户通讯录数据至数据库
+    String addUser();
+}

+ 390 - 0
src/main/java/com/muzhi/dingtalk/test/service/impl/ChuanYunTongbuServiceImpl.java

@@ -0,0 +1,390 @@
+package com.muzhi.dingtalk.test.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiSmartworkHrmEmployeeListRequest;
+import com.dingtalk.api.request.OapiSmartworkHrmEmployeeQueryonjobRequest;
+import com.dingtalk.api.response.OapiSmartworkHrmEmployeeListResponse;
+import com.dingtalk.api.response.OapiSmartworkHrmEmployeeQueryonjobResponse;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeDataVo;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeToChuanYunDataVo;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeToChuanYunVo;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeFangDeVo;
+import com.muzhi.dingtalk.test.mapper.EmployeeFangDeMapper;
+import com.muzhi.dingtalk.test.service.ChuanYunTongbuService;
+import com.taobao.api.ApiException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service
+public class ChuanYunTongbuServiceImpl implements ChuanYunTongbuService {
+
+    @Autowired
+    private FangDeDingAccessTokenServiceImpl fangDeDingAccessTokenService;
+
+    //在职员工花名册变量
+    public static String huamingce = null;
+    //离职员工花名册变量
+    public static String huamingce2 = null;
+
+    //在职员工id变量
+    public static String employee1 = null;
+    //离职员工id变量
+    public static String employee2 = null;
+
+
+    @Override
+    public String getFangDeHuamingceAll(){
+
+        //在职员工id列表的循环获取
+        DingTalkClient client1 = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/smartwork/hrm/employee/queryonjob");
+        OapiSmartworkHrmEmployeeQueryonjobRequest request1 = new OapiSmartworkHrmEmployeeQueryonjobRequest();
+
+        //企业在职员工userid列表
+        int offset = 0;//分页游标,从0开始
+        int size = 50;//分页大小,最大50
+
+        JSONObject result1;
+
+        String result11;
+
+        do {
+            List<String> list = new ArrayList<>();
+
+            System.out.println("测试分页值:" + offset);
+
+            try {
+                request1.setStatusList("2,3,5,-1");
+                request1.setOffset((long) offset);
+                request1.setSize((long) size);
+                OapiSmartworkHrmEmployeeQueryonjobResponse response1 = client1.execute(request1, fangDeDingAccessTokenService.getFangDeAccessToken());
+                employee1 = response1.getBody();
+                System.out.println(response1.getBody());
+            } catch (ApiException e) {
+                e.printStackTrace();
+            }
+
+            //通过fastjson工具转换成json对象,逐层解析
+            JSONObject jsonObject1 = JSON.parseObject(employee1);
+            result1 = jsonObject1.getJSONObject("result");
+
+            String dataList = result1.getString("data_list");
+
+            //将String数组进行处理,去掉所有的双引号("")和中括号([])
+            String dataRes = dataList.replace("\"", "").
+                    replaceAll("\\[", "").
+                    replaceAll("\\]", "");
+
+            list.add(dataRes);
+
+            String userid1 = list.toString().replace("\"", "").
+                    replaceAll("\\[", "").
+                    replaceAll("\\]", "");
+
+
+            //TODO ---原始同步花名册数据至数据库--- //
+            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/smartwork/hrm/employee/list");
+            OapiSmartworkHrmEmployeeListRequest request = new OapiSmartworkHrmEmployeeListRequest();
+
+            try {
+                request.setUseridList(userid1);
+//                request.setUseridList("046828063924575294");
+
+                //需要获取的花名册字段信息
+//                request.setFieldFilterList("sys00-name,145d3425-9dea-42a6-88ae-1e4e3590046c,473f9667-d220-426f-8431-56be1e8a027d," +
+//                        "395840c1-2cbe-4f36-b3fb-249d7ddf42f2,sys00-confirmJoinTime,sys02-sexType,sys02-certNo,sys01-employeeType," +
+//                        "sys04-accountBank,sys04-bankAccountNo,ed21c116-efcb-49f3-a507-f8474450260c,sys01-employeeStatus");
+
+                OapiSmartworkHrmEmployeeListResponse response = client.execute(request, fangDeDingAccessTokenService.getFangDeAccessToken());
+                huamingce = response.getBody();
+                System.out.println(response.getBody());
+            }catch (ApiException e){
+                e.printStackTrace();
+            }
+
+            //通过fastjson工具转换成json对象,逐层解析
+            //将String类型的花名册json数据转换为Object数据对象
+            JSONObject jsonObject = JSON.parseObject(huamingce);
+
+            //直接将花名册对象通过Object转换成Array数组格式
+            result11 = jsonObject.getString("result");
+
+
+
+            if (result1.getString("next_cursor") != null || result1.getString("data_list") != "") {
+
+                offset = offset + size;
+
+            }
+
+        } while (result1.getString("next_cursor") != null);
+
+
+        return result11;
+
+    }
+
+
+    //将房德钉钉花名册数据先处理成指定的json格式数据
+    @Override
+    public EmployeeFangDeToChuanYunDataVo<EmployeeFangDeToChuanYunVo> getFangDeHuamingceToCY() {
+
+        //在职员工id列表的循环获取
+        DingTalkClient client1 = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/smartwork/hrm/employee/queryonjob");
+        OapiSmartworkHrmEmployeeQueryonjobRequest request1 = new OapiSmartworkHrmEmployeeQueryonjobRequest();
+
+        //企业在职员工userid列表
+        int offset = 0;//分页游标,从0开始
+        int size = 50;//分页大小,最大50
+
+        JSONObject result1;
+
+        EmployeeFangDeToChuanYunDataVo employeeFangDeToChuanYunDataVo = new EmployeeFangDeToChuanYunDataVo();
+
+        List<EmployeeFangDeToChuanYunVo> employeeFangDeToChuanYunVoList = new ArrayList<>();
+
+        do {
+            List<String> list = new ArrayList<>();
+
+            System.out.println("测试分页值:" + offset);
+
+            try {
+                request1.setStatusList("2,3,5,-1");
+                request1.setOffset((long) offset);
+                request1.setSize((long) size);
+                OapiSmartworkHrmEmployeeQueryonjobResponse response1 = client1.execute(request1, fangDeDingAccessTokenService.getFangDeAccessToken());
+                employee1 = response1.getBody();
+                System.out.println(response1.getBody());
+            } catch (ApiException e) {
+                e.printStackTrace();
+            }
+
+            //通过fastjson工具转换成json对象,逐层解析
+            JSONObject jsonObject1 = JSON.parseObject(employee1);
+            result1 = jsonObject1.getJSONObject("result");
+
+            String dataList = result1.getString("data_list");
+
+            //将String数组进行处理,去掉所有的双引号("")和中括号([])
+            String dataRes = dataList.replace("\"", "").
+                    replaceAll("\\[", "").
+                    replaceAll("\\]", "");
+
+            list.add(dataRes);
+
+            String userid1 = list.toString().replace("\"", "").
+                    replaceAll("\\[", "").
+                    replaceAll("\\]", "");
+
+
+            //TODO ---原始同步花名册数据至数据库--- //
+            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/smartwork/hrm/employee/list");
+            OapiSmartworkHrmEmployeeListRequest request = new OapiSmartworkHrmEmployeeListRequest();
+
+            try {
+                request.setUseridList(userid1);
+
+                //需要获取的花名册字段信息
+//                request.setFieldFilterList("sys00-name,145d3425-9dea-42a6-88ae-1e4e3590046c,473f9667-d220-426f-8431-56be1e8a027d," +
+//                        "395840c1-2cbe-4f36-b3fb-249d7ddf42f2,sys00-confirmJoinTime,sys02-sexType,sys02-certNo,sys01-employeeType," +
+//                        "sys04-accountBank,sys04-bankAccountNo,ed21c116-efcb-49f3-a507-f8474450260c,sys01-employeeStatus");
+
+                OapiSmartworkHrmEmployeeListResponse response = client.execute(request, fangDeDingAccessTokenService.getFangDeAccessToken());
+                huamingce = response.getBody();
+                System.out.println(response.getBody());
+            }catch (ApiException e){
+                e.printStackTrace();
+            }
+
+            //通过fastjson工具转换成json对象,逐层解析
+            //将String类型的花名册json数据转换为Object数据对象
+            JSONObject jsonObject = JSON.parseObject(huamingce);
+
+            //直接将花名册对象通过Object转换成Array数组格式
+            JSONArray resultArray = jsonObject.getJSONArray("result");
+
+
+
+            //氚云接口同步单条业务数据固定参数
+            employeeFangDeToChuanYunDataVo.setActionName("CreateBizObjects");
+            employeeFangDeToChuanYunDataVo.setSchemaCode("D116604ab3e5ca3a3f944b2bb2db76b67780a2a");
+            employeeFangDeToChuanYunDataVo.setIsSubmit("true");
+
+
+
+            for (int i = 0; i<resultArray.size(); i++){
+                JSONArray fieldListArray = resultArray
+                        .getJSONObject(i).getJSONArray("field_list");
+
+                String userid = resultArray.getJSONObject(i).getString("userid");
+                System.out.println("员工id:" + userid);
+
+                //new一个employeeFangDeVo对象
+                EmployeeFangDeToChuanYunVo employeeFangDeToChuanYunVo = new EmployeeFangDeToChuanYunVo();
+
+                employeeFangDeToChuanYunVo.setF0000009(userid);
+                employeeFangDeToChuanYunVo.setF0000011("sys00");
+
+
+                for (int a = 0; a<fieldListArray.size(); a++){
+                    String fieldCode = fieldListArray
+                            .getJSONObject(a)
+                            .getString("field_code");
+
+                    switch (fieldCode){
+                        //姓名
+                        case "sys00-name":
+                            if (fieldListArray.getJSONObject(a).getString("value") != null){
+                                System.out.println("***《《《姓名》》》***-->" + fieldListArray.getJSONObject(a).getString("value"));
+
+                                employeeFangDeToChuanYunVo.setF0000001(fieldListArray.getJSONObject(a).getString("value"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000001("");
+                            }
+                            break;
+
+                        //主部门
+                        case "sys00-mainDept":
+                            if (fieldListArray.getJSONObject(a).getString("label") != null){
+                                System.out.println("***主部门***-->" + fieldListArray.getJSONObject(a).getString("label"));
+
+                                employeeFangDeToChuanYunVo.setF0000002(fieldListArray.getJSONObject(a).getString("label"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000002("");
+                            }
+                            break;
+
+                        //劳动合同签约主体(所属公司)
+                        case "145d3425-9dea-42a6-88ae-1e4e3590046c":
+                            if (fieldListArray.getJSONObject(a).getString("label") != null){
+                                System.out.println("***劳动合同签约主体(所属公司)***-->" + fieldListArray.getJSONObject(a).getString("label"));
+
+                                employeeFangDeToChuanYunVo.setF0000003(fieldListArray.getJSONObject(a).getString("label"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000003("");
+                            }
+                            break;
+
+                        //现合同起始日
+                        case "sys05-nowContractStartTime":
+                            if (fieldListArray.getJSONObject(a).getString("value") != null){
+                                System.out.println("***现合同起始日***-->" + fieldListArray.getJSONObject(a).getString("value"));
+
+                                employeeFangDeToChuanYunVo.setF0000004(fieldListArray.getJSONObject(a).getString("value"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000004("");
+                            }
+                            break;
+
+                        //现合同到期日
+                        case "sys05-nowContractEndTime":
+                            if (fieldListArray.getJSONObject(a).getString("value") != null){
+                                System.out.println("***现合同到期日***-->" + fieldListArray.getJSONObject(a).getString("value"));
+
+                                employeeFangDeToChuanYunVo.setF0000005(fieldListArray.getJSONObject(a).getString("value"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000005("");
+                            }
+                            break;
+
+                        //职位
+                        case "sys00-position":
+                            if (fieldListArray.getJSONObject(a).getString("label") != null){
+                                System.out.println("***职位***-->" + fieldListArray.getJSONObject(a).getString("label"));
+
+                                employeeFangDeToChuanYunVo.setF0000006(fieldListArray.getJSONObject(a).getString("label"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000006(null);
+                            }
+                            break;
+
+                        //入职时间
+                        case "sys00-confirmJoinTime":
+                            if (fieldListArray.getJSONObject(a).getString("value") != null){
+                                System.out.println("***入职时间***-->" + fieldListArray.getJSONObject(a).getString("value"));
+
+                                employeeFangDeToChuanYunVo.setF0000007(fieldListArray.getJSONObject(a).getString("value"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000007("");
+                            }
+                            break;
+
+                        //岗位职级
+                        case "sys01-positionLevel":
+                            if (fieldListArray.getJSONObject(a).getString("value") != null){
+                                System.out.println("***岗位职级***-->" + fieldListArray.getJSONObject(a).getString("value"));
+
+                                employeeFangDeToChuanYunVo.setF0000008(fieldListArray.getJSONObject(a).getString("value"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000008("");
+                            }
+                            break;
+
+                        //主部门id
+                        case "sys00-mainDeptId":
+                            if (fieldListArray.getJSONObject(a).getString("value") != null){
+                                System.out.println("***户名***-->" + fieldListArray.getJSONObject(a).getString("value"));
+
+                                employeeFangDeToChuanYunVo.setF0000010(fieldListArray.getJSONObject(a).getString("value"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000010("");
+                            }
+                            break;
+
+                        //续签期限
+                        case "sys05-contractPeriodType":
+                            if (fieldListArray.getJSONObject(a).getString("value") != null){
+                                System.out.println("***户名***-->" + fieldListArray.getJSONObject(a).getString("value"));
+
+                                employeeFangDeToChuanYunVo.setF0000012(fieldListArray.getJSONObject(a).getString("value"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000012("");
+                            }
+                            break;
+
+                        //续签次数
+                        case "sys05-contractRenewCount":
+                            if (fieldListArray.getJSONObject(a).getString("value") != null){
+                                System.out.println("***户名***-->" + fieldListArray.getJSONObject(a).getString("value"));
+
+                                employeeFangDeToChuanYunVo.setF0000013(fieldListArray.getJSONObject(a).getString("value"));
+                            }
+                            else{
+                                employeeFangDeToChuanYunVo.setF0000013("");
+                            }
+                            break;
+                    }
+                }
+                employeeFangDeToChuanYunVoList.add(employeeFangDeToChuanYunVo);
+            }
+
+
+            employeeFangDeToChuanYunDataVo.setBizObjectArray(employeeFangDeToChuanYunVoList);
+
+            if (result1.getString("next_cursor") != null || result1.getString("data_list") != "") {
+
+                offset = offset + size;
+
+            }
+
+        } while (result1.getString("next_cursor") != null);
+
+        return employeeFangDeToChuanYunDataVo;
+    }
+}

+ 102 - 0
src/main/java/com/muzhi/dingtalk/test/service/impl/DepartmentServiceImpl.java

@@ -0,0 +1,102 @@
+package com.muzhi.dingtalk.test.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiDepartmentListRequest;
+import com.dingtalk.api.response.OapiDepartmentListResponse;
+import com.muzhi.dingtalk.test.entity.Department;
+import com.muzhi.dingtalk.test.entity.Employee;
+import com.muzhi.dingtalk.test.entity.vo.DepartmentDataVo;
+import com.muzhi.dingtalk.test.entity.vo.DepartmentQuery;
+import com.muzhi.dingtalk.test.entity.vo.EmployeeDataVo;
+import com.muzhi.dingtalk.test.mapper.DepartmentMapper;
+import com.muzhi.dingtalk.test.service.DepartmentService;
+import com.muzhi.dingtalk.test.service.DingAccessTokenService;
+import com.taobao.api.ApiException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+
+@Service
+public class DepartmentServiceImpl implements DepartmentService {
+
+    @Autowired
+    private DingAccessTokenService dingAccessTokenService;
+
+    @Autowired
+    private DepartmentMapper departmentMapper;
+
+    public static String departmentList = null;
+    public static String departmentXQ = null;
+
+    //查询钉钉接口中的部门列表信息
+    @Override
+    public String getDingDepartment(){
+        DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/department/list");
+        OapiDepartmentListRequest request = new OapiDepartmentListRequest();
+        try {
+            request.setHttpMethod("GET");
+            OapiDepartmentListResponse response = client.execute(request, dingAccessTokenService.getAccessToken());
+            departmentList = response.getBody();
+            System.out.println(response.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        //通过fastjson工具转换成json对象,逐层解析
+        //将String类型的部门列表json数据转换为Object数据对象
+        JSONObject jsonObject = JSON.parseObject(departmentList);
+        String department = jsonObject.getString("department");
+
+        return department;
+    }
+
+    //获取部门列表
+    @Override
+    public DepartmentDataVo<Department> getDepartmentList(Integer page, Integer limit, DepartmentQuery departmentQuery) {
+        //直接在该实现类查询数据库实体类的数据
+        DepartmentDataVo departmentDataVo = new DepartmentDataVo();
+        departmentDataVo.setCode(0);
+        departmentDataVo.setMsg("");
+
+        //分页查询,创建page对象
+        Page<Department> departmentPage = new Page<>(page,limit);
+
+        //构建查询条件
+        QueryWrapper<Department> wrapper = new QueryWrapper<>();
+        //多条件组合查询(类似mybatis中动态sql)
+        String name = departmentQuery.getName();
+        //判断条件值是否为空,如果不为空则拼接条件
+        if (!StringUtils.isEmpty(name)) {
+            //构建条件
+            wrapper.like("name", name);
+        }
+
+        IPage<Department> result = departmentMapper.selectPage(departmentPage, wrapper);
+
+        //查询分页信息记录(根据分页要求来查)
+        List<Department> departmentList = result.getRecords();
+        //查询总数方法2
+        departmentDataVo.setCount(result.getTotal());
+
+        departmentDataVo.setData(departmentList);
+        return departmentDataVo;
+    }
+
+
+
+    //TODO 获取部门详情列表
+    @Override
+    public String getDepartmentXQ() {
+
+        return null;
+    }
+}

+ 79 - 0
src/main/java/com/muzhi/dingtalk/test/service/impl/DingAccessTokenServiceImpl.java

@@ -0,0 +1,79 @@
+package com.muzhi.dingtalk.test.service.impl;
+
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.request.OapiGettokenRequest;
+import com.dingtalk.api.response.OapiGettokenResponse;
+import com.muzhi.dingtalk.test.service.DingAccessTokenService;
+import com.taobao.api.ApiException;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * @Author ZhangKan
+ * @Data 15:39
+ */
+
+@Service
+public class DingAccessTokenServiceImpl implements DingAccessTokenService{
+    //DingAccessTokenService
+
+    //云璞
+    //APPKEY
+    private static String APPKEY = "ding3fb18v3xnh7njhql";
+    //APPSECRET
+    private static String APPSECRET = "U7vRU_Nao5Kz3B8lgCp9IpAfN5wsIl0FYOabSIOtwfHr8kXjyn1r27Nhu3V4VdYc";
+
+    public static String accessToken = null;
+
+
+    //牧之测试架构
+//    //APPKEY
+//    private static String APPKEY1 = "ding9egkigh3qrhgvupo";
+//    //APPSECRET
+//    private static String APPSECRET1 = "5ZZzIqNeU194KfKLJUv8iR0K67MYKSm_409BUe5G5wkmQtl4eNGsPLHVv4Z9jq4l";
+
+    //牧之测试架构1
+    //APPKEY
+    private static String APPKEY1 = "dingezwch2vhdculejdp";
+    //APPSECRET
+    private static String APPSECRET1 = "3Tbm6FahjPKUyhtvRUdgUG-kqkOJd7Dusxcf3KxGToYnMTRByuxM30I6O9bV51s-";
+
+    public static String accessToken1 = null;
+
+
+    //获取access_token的方法(云璞)
+    @Override
+    public String getAccessToken() {
+        DefaultDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken");
+        OapiGettokenRequest request = new OapiGettokenRequest();
+        request.setAppkey(APPKEY);
+        request.setAppsecret(APPSECRET);
+        request.setHttpMethod("GET");
+        try {
+            OapiGettokenResponse response = client.execute(request);
+            accessToken = response.getAccessToken();
+            System.out.println("云璞AccessToken:" + accessToken);
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+        return accessToken;
+    }
+
+    //获取access_token的方法(牧之测试架构)
+    @Override
+    public String getMuZhiAccessToken() {
+        DefaultDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken");
+        OapiGettokenRequest request = new OapiGettokenRequest();
+        request.setAppkey(APPKEY1);
+        request.setAppsecret(APPSECRET1);
+        request.setHttpMethod("GET");
+        try {
+            OapiGettokenResponse response = client.execute(request);
+            accessToken1 = response.getAccessToken();
+            System.out.println("牧之测试架构AccessToken:" + accessToken1);
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+        return accessToken1;
+    }
+}

+ 978 - 0
src/main/java/com/muzhi/dingtalk/test/service/impl/DingdingLianJieQiServiceImpl.java

@@ -0,0 +1,978 @@
+package com.muzhi.dingtalk.test.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.*;
+import com.dingtalk.api.response.*;
+import com.muzhi.dingtalk.test.service.DingAccessTokenService;
+import com.muzhi.dingtalk.test.service.DingdingLianJieQiService;
+import com.taobao.api.ApiException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+
+@Service
+public class DingdingLianJieQiServiceImpl implements DingdingLianJieQiService {
+
+    @Autowired
+    private DingAccessTokenService dingAccessTokenService;
+
+    //实例详情变量
+    public static String shili = null;
+    //修改假期变量
+    public static String jiaqi = null;
+    //假期余额变量
+    public static String yue = null;
+    //考勤结果变量
+    public static String kaoqinJG = null;
+    //排班班次变量
+    public static String paiban = null;
+
+    //抓取钉钉OA审批中通过连接器传输过来的创建审批单的时间
+    @Override
+    public String getOATime() {
+
+        //获取当前时间并转换成指定的日期格式
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
+        String date = simpleDateFormat.format(new Date());
+        System.out.println("当前时间的日期格式为:"+date);
+
+
+        //获取当前时间的时间戳并转换为long型
+        long time = new Date().getTime();
+//        System.out.println("当前时间的时间戳为(long型):" + time);
+
+        String time1 = String.valueOf(time);
+        System.out.println("当前时间的时间戳为(string型):" + time1);
+
+        return time1;
+    }
+
+
+    /**
+     * 获取当年第一天日期
+     * @param year 年份
+     * @return Date
+     */
+    public static Date getYearFirst(int year){
+        Calendar calendar = Calendar.getInstance();
+        calendar.clear();
+        calendar.set(Calendar.YEAR, year);
+        Date currYearFirst = calendar.getTime();
+
+        return currYearFirst;
+    }
+
+    /**
+     * 获取当年最后一天日期
+     * @param year 年份
+     * @return Date
+     */
+    public static Date getYearLast(int year){
+        Calendar calendar = Calendar.getInstance();
+        calendar.clear();
+        calendar.set(Calendar.YEAR, year);
+        calendar.roll(Calendar.DAY_OF_YEAR, -1);
+        Date currYearLast = calendar.getTime();
+
+        return currYearLast;
+    }
+
+
+    //抓取钉钉OA审批中通过连接器传输过来的控件数据值,并根据审批单的加班时长进行计算并追加到假期余额中
+    @Override
+    public String getOA(String processid) {
+
+        //通过钉钉OA高级审批连接器从前端传入的审批单的审批实例id
+        String processid1 = processid;
+
+        //调用获取审批实例详情接口
+        try {
+            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/get");
+            OapiProcessinstanceGetRequest request = new OapiProcessinstanceGetRequest();
+
+            //审批单实例id
+            request.setProcessInstanceId(processid1);
+            System.out.println("当前审批实例详情id:" + processid1);
+
+            //【测试】实例id
+//            request.setProcessInstanceId("b28f8b30-6999-408c-b441-455273a8afc4");
+
+            OapiProcessinstanceGetResponse response = client.execute(request, dingAccessTokenService.getMuZhiAccessToken());
+            shili = response.getBody();
+            System.out.println(response.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        //通过fastjson工具转换成json对象,逐层解析
+        JSONObject jsonObject = JSON.parseObject(shili);
+
+//        String processInstance = jsonObject.getString("process_instance");
+//        System.out.println("审批实例详情:" + processInstance);
+
+        JSONObject processInstance = jsonObject.getJSONObject("process_instance");
+
+
+        //审批人userid
+//        String originatorUserid = processInstance.getString("originator_userid");
+        JSONArray tasks = processInstance.getJSONArray("tasks");
+        String userid = tasks.getJSONObject(0).getString("userid");
+        System.out.println("审批人userid:" + userid);
+
+        //加班审批单提交的内容
+        JSONArray formComponentValues = processInstance.getJSONArray("form_component_values");
+
+        //实际加班人员id
+        JSONObject jsonObject1 = formComponentValues.getJSONObject(0);
+        JSONArray extValue = jsonObject1.getJSONArray("ext_value");
+        String emplId = extValue.getJSONObject(0).getString("emplId");
+        String name = extValue.getJSONObject(0).getString("name");
+        System.out.println("实际加班人员userid:" + emplId);
+        System.out.println("实际加班人员姓名:" + name);
+
+        //加班计算方式(option_0:按半小时计算;option_1:按小时计算;option_2:按审批时长计算)
+        JSONObject jsonObject11 = formComponentValues.getJSONObject(1);
+        JSONObject extValue1 = jsonObject11.getJSONObject("ext_value");
+        String key = extValue1.getString("key");
+        System.out.println("加班计算方式:" + key);
+
+        //加班时长(小时)
+//        JSONObject jsonObject111 = formComponentValues.getJSONObject(3);
+//        String value = jsonObject111.getString("value");
+
+        JSONObject jsonObject111 = formComponentValues.getJSONObject(3);
+        JSONArray value = jsonObject111.getJSONArray("value");
+        Object o = value.get(2);
+        String shichangTime = o.toString();
+
+
+        //审批单中的开始时间
+        Object o1 = value.get(0);
+        String stringTime1 = o1.toString();
+        System.out.println("审批单中的开始时间" + stringTime1);
+        //审批单中的结束时间
+        Object o2 = value.get(1);
+        String stringTime2 = o2.toString();
+        System.out.println("审批单中的结束时间" + stringTime2);
+
+        SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
+        SimpleDateFormat simpleDateFormat11 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
+
+        Date date11 = new Date();
+        String date22 = null;
+
+        try {
+            date11 = simpleDateFormat1.parse(stringTime1);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+        try {
+            date22 = simpleDateFormat11.format(date11);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+        //yyyy-MM-dd
+        String dakaTime = date11.toString();
+        System.out.println("取出审批单中的开始时间的年-月-日:" + dakaTime);
+        //yyyy-MM-dd HH:mm:ss
+        String dakaTime1 = date22;
+        System.out.println("转换成指定格式的审批单中的时间:" + dakaTime1);
+
+        Date shenpidate = new Date();
+
+        SimpleDateFormat simpleDateFormatshenpi = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
+        try {
+            shenpidate = simpleDateFormatshenpi.parse(dakaTime1);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+        //审批单中的时间(毫秒级时间戳)
+        long shenpiTime = shenpidate.getTime();
+        System.out.println("审批单中的时间(毫秒级时间戳):" + shenpiTime);
+
+
+
+        /*
+         *👇👇👇👇👇👇获取员工提交加班审批当天的排班是否休息👇👇👇👇👇👇
+         */
+
+        //查询员工提交加班审批当天的排班是否休息
+        try {
+            DingTalkClient client5 = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/attendance/schedule/listbyday");
+            OapiAttendanceScheduleListbydayRequest request5 = new OapiAttendanceScheduleListbydayRequest();
+
+            //操作者userid
+            request5.setOpUserId(userid);
+            //员工userid
+            request5.setUserId(emplId);
+            //查询哪一天的排班情况(毫秒级时间戳)
+            request5.setDateTime(shenpiTime);
+
+            OapiAttendanceScheduleListbydayResponse response5 = client5.execute(request5, dingAccessTokenService.getMuZhiAccessToken());
+            paiban = response5.getBody();
+            System.out.println(response5.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        //通过fastjson工具转换成json对象,逐层解析
+        JSONObject jsonObject5 = JSON.parseObject(paiban);
+        JSONArray result5 = jsonObject5.getJSONArray("result");
+        System.out.println("排班信息结果(数组):" + result5);
+
+        JSONObject jsonObject6 = result5.getJSONObject(0);
+        String is_rest = jsonObject6.getString("is_rest");
+        System.out.println("是否为休息(Y:当天排休,N:不休息):" + is_rest);
+
+//        switch (is_rest){
+//            //当天休息
+//            case "Y":
+//                System.out.println("休息!!!");
+//                break;
+//
+//            //当天上班
+//            case "N":
+//                System.out.println("上班!!!");
+//                break;
+//        }
+
+
+        /*
+         *👆👆👆👆👆👆获取员工提交加班审批当天的排班是否休息👆👆👆👆👆👆
+         */
+
+
+
+        //TODO 定义一个时间变量,用于计算下班后多久开始计算加班时长
+        String shichang = null;
+        double shichangTime1 = Double.parseDouble(shichangTime) - 0.5;
+
+        if (shichangTime1 < 0.0){
+            shichang = "0";
+        }else {
+            shichang = String.valueOf(shichangTime1);
+        }
+
+        //将获取的审批单中的加班时长乘100,并转换成long型,因为修改假期余额接口的参数要求
+        double shichang1 = Double.parseDouble(shichang) * 100;
+        int i = (int)shichang1;
+        long l = (long)i;
+        System.out.println("审批单中申请的加班时长(小时):" + l);
+
+        //当加班计算方式为按小时计算,将使用下面的计算方法计算加班时长
+        double d1 = Double.parseDouble(shichang);
+        //取出审批时长中的整数值
+        int i1 = (int)d1 * 100;
+        System.out.println("【测试】审批单中申请的加班时长(int):" + i1);
+
+        //当加班计算方式为按半小时计算,将使用下面的计算方法计算加班时长
+        double d2 = Double.parseDouble(shichang);
+        //取出审批时长中的小数位的值
+        double d3 = d2 - (int)d1;
+
+        double d4 = 0;
+
+        if (d3 > 0 && d3 < 0.5){
+            d4 = d2 - d3;
+        }else if (d3 >= 0.5 && d3 < 1){
+            d4 = d2 - d3 + 0.5;
+        }else {
+            d4 = d2;
+        }
+        long l1 = (long)(d4 * 100);
+        System.out.println("按半小时计算方式判断后,时长的值为:" + l1);
+
+        long option_shichang = 0L;
+
+        switch (key){
+            //按半小时计算
+            case "option_0":
+                option_shichang = l1;
+                break;
+
+            //按小时计算
+            case "option_1":
+                option_shichang = (long)i1;
+                break;
+
+            //按审批时长计算
+            case "option_2":
+                option_shichang = l;
+                break;
+        }
+        System.out.println("根据加班计算方式计算之后的加班时长(小时):" + option_shichang);
+
+        //TODO 自定义休息日加班时长比例
+        switch (is_rest){
+            //当天休息
+            case "Y":
+                option_shichang = option_shichang * 2;
+                System.out.println("休息!!!");
+                break;
+
+            //当天上班
+            case "N":
+                option_shichang = option_shichang;
+                System.out.println("上班!!!");
+                break;
+        }
+
+        System.out.println("根据加班计算方式计算之后的加班时长(小时),如果是休息日加班则提高时长比例:" + option_shichang);
+
+        //获取当前时间并转换成指定的日期格式(取当前年份)
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy");//设置日期格式
+        String date = simpleDateFormat.format(new Date());
+        int date1 = Integer.parseInt(date);
+        System.out.println("当前时间的日期格式为:"+date);
+
+        //获取当前时间并转换成指定的日期格式(取当前年份的年月日)
+        SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
+
+
+        //查询当前加班审批单中的实际加班人员的假期余额
+        try {
+            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/attendance/vacation/quota/list");
+            OapiAttendanceVacationQuotaListRequest request1 = new OapiAttendanceVacationQuotaListRequest();
+
+            //TODO 年假假期类型唯一标识(不能是系统自带的假期,必须是新建的其他假期,才可通过接口进行修改)【必填】
+//            request1.setLeaveCode("be7cda3e-d3e6-457f-918e-7d5e157d165a");//牧之测试架构
+            request1.setLeaveCode("963895d3-98e1-494e-836d-cc6ec44e1805");//牧之测试架构1
+
+            //操作者id
+            request1.setOpUserid(userid);
+            //待查询员工id列表
+            request1.setUserids(emplId);
+
+            request1.setOffset(0L);
+            request1.setSize(50L);
+            OapiAttendanceVacationQuotaListResponse response1 = client.execute(request1, dingAccessTokenService.getMuZhiAccessToken());
+            yue = response1.getBody();
+            System.out.println(response1.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        //通过fastjson工具转换成json对象,逐层解析
+        JSONObject jsonObject2 = JSON.parseObject(yue);
+        JSONObject result = jsonObject2.getJSONObject("result");
+
+//        JSONArray leaveQuotas = result.getJSONArray("leave_quotas");
+//        String quotaNumPerHour = leaveQuotas.getJSONObject(0).getString("quota_num_per_hour");
+
+        long yue1 = 0L;
+
+        if (result.getString("leave_quotas") != null){
+            JSONArray leaveQuotas = result.getJSONArray("leave_quotas");
+            String quotaNumPerHour = leaveQuotas.getJSONObject(0).getString("quota_num_per_hour");
+            int yue = Integer.parseInt(quotaNumPerHour);
+            yue1 = (long)yue;
+        }else {
+            yue1 = 0L;
+        }
+
+        System.out.println("当前加班人员的假期余额:" + yue1);
+
+
+        //调用批量更新员工假期余额接口
+        try {
+            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/attendance/vacation/quota/update");
+            OapiAttendanceVacationQuotaUpdateRequest request2 = new OapiAttendanceVacationQuotaUpdateRequest();
+            List<OapiAttendanceVacationQuotaUpdateRequest.LeaveQuotas> list2 = new ArrayList<>();
+            OapiAttendanceVacationQuotaUpdateRequest.LeaveQuotas obj3 = new OapiAttendanceVacationQuotaUpdateRequest.LeaveQuotas();
+            list2.add(obj3);
+
+            //实际加班人员userid【必填】
+            obj3.setUserid(emplId);
+
+            //取出当年第一天
+            Date yearFirst = getYearFirst(date1);
+            String dateFirst = simpleDateFormat2.format(yearFirst);
+            long dateFirst2 = 0L;
+            try {
+                String dateFirst1 = String.valueOf(simpleDateFormat2.parse(dateFirst).getTime());
+                dateFirst2 = Long.parseLong(dateFirst1);
+            }catch (Exception e){
+                e.printStackTrace();
+            }
+            System.out.println("当年第一天(时间型):" + dateFirst);
+            System.out.println("当年第一天(毫秒级时间戳):" + dateFirst2);
+
+            //取出当年最后一天
+            Date yearLast = getYearLast(date1);
+            String dateLast = simpleDateFormat2.format(yearLast);
+            long dateLast2 = 0L;
+            try {
+                String dateLast1 = String.valueOf(simpleDateFormat2.parse(dateLast).getTime());
+                dateLast2 = Long.parseLong(dateLast1);
+            }catch (Exception e){
+                e.printStackTrace();
+            }
+            System.out.println("当年最后一天(时间型):" + dateLast);
+            System.out.println("当年最后一天(毫秒级时间戳):" + dateLast2);
+
+
+            //额度有效期开始时间(毫秒级时间戳):当年的1月1日
+            obj3.setStartTime(dateFirst2);
+            //额度有效期结束时间(毫秒级时间戳):当年的12月31日
+            obj3.setEndTime(dateLast2);
+
+            //TODO 年假假期类型唯一标识(不能是系统自带的假期,必须是新建的其他假期,才可通过接口进行修改)【必填】
+//            obj3.setLeaveCode("be7cda3e-d3e6-457f-918e-7d5e157d165a");//牧之测试架构
+            obj3.setLeaveCode("963895d3-98e1-494e-836d-cc6ec44e1805");//牧之测试架构1
+
+            //操作原因
+            obj3.setReason("加班审批追加");
+
+            //假期类型按小时,计算该值不为空且按百分之一小时折算。例如:1000=10小时。【如需修改假期余额,必填】
+            obj3.setQuotaNumPerHour(option_shichang + yue1);
+
+            //额度所对应的周期,除了假期类型为调休的时候可以为空之外,其他情况均不能为空且格式必须满足“yyyy”。【假期类型除了调休以外,都为普通假期类型,必填】
+            obj3.setQuotaCycle(date);
+
+            request2.setLeaveQuotas(list2);
+            //审批人userid【必填】
+            request2.setOpUserid(userid);
+
+            OapiAttendanceVacationQuotaUpdateResponse response2 = client.execute(request2, dingAccessTokenService.getMuZhiAccessToken());
+            jiaqi = response2.getBody();
+            System.out.println(response2.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        String s1 = String.valueOf(option_shichang);
+
+        double shichangNow = Double.parseDouble(s1) / 100;
+
+        System.out.println("已成功追加员工【" + name + "】假期余额:" + shichangNow + "小时!");
+
+        return "已成功追加员工【" + name + "】假期余额:" + shichangNow + "小时!";
+    }
+
+
+
+    //抓取钉钉OA审批中通过连接器传输过来的控件数据值,并根据实际打卡时间进行计算加班时长并追加到假期余额中
+    @Override
+    public String getOA2(String processid) {
+
+        //通过钉钉OA高级审批连接器从前端传入的审批单的审批实例id
+        String processid1 = processid;
+
+        //调用获取审批实例详情接口
+        try {
+            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/get");
+            OapiProcessinstanceGetRequest request = new OapiProcessinstanceGetRequest();
+
+            //审批单实例id
+            request.setProcessInstanceId(processid1);
+            System.out.println("当前审批实例详情id:" + processid1);
+
+            //【测试】实例id
+//            request.setProcessInstanceId("8c39a756-0b35-461a-b3b1-aca35b5c1ad6");
+
+            OapiProcessinstanceGetResponse response = client.execute(request, dingAccessTokenService.getMuZhiAccessToken());
+            shili = response.getBody();
+            System.out.println(response.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        //通过fastjson工具转换成json对象,逐层解析
+        JSONObject jsonObject = JSON.parseObject(shili);
+
+//        String processInstance = jsonObject.getString("process_instance");
+//        System.out.println("审批实例详情:" + processInstance);
+
+        JSONObject processInstance = jsonObject.getJSONObject("process_instance");
+
+
+        //审批人userid
+        String originatorUserid = processInstance.getString("originator_userid");
+        System.out.println("审批人userid:" + originatorUserid);
+
+        //加班审批单提交的内容
+        JSONArray formComponentValues = processInstance.getJSONArray("form_component_values");
+
+        //实际加班人员id
+        JSONObject jsonObject1 = formComponentValues.getJSONObject(0);
+        JSONArray extValue = jsonObject1.getJSONArray("ext_value");
+        String emplId = extValue.getJSONObject(0).getString("emplId");
+        String name = extValue.getJSONObject(0).getString("name");
+        System.out.println("实际加班人员userid:" + emplId);
+        System.out.println("实际加班人员姓名:" + name);
+
+        //加班计算方式(option_0:按半小时计算;option_1:按小时计算;option_2:按审批时长计算)
+        JSONObject jsonObject11 = formComponentValues.getJSONObject(1);
+        JSONObject extValue1 = jsonObject11.getJSONObject("ext_value");
+        String key = extValue1.getString("key");
+        System.out.println("加班计算方式:" + key);
+
+        //加班时长(小时)
+        JSONObject jsonObject111 = formComponentValues.getJSONObject(3);
+        JSONArray value = jsonObject111.getJSONArray("value");
+        Object o = value.get(2);
+        //注意:根据考勤打卡时间计算加班时长,所以该时长值未启用!!!
+        String shichangTime = o.toString();
+
+        //审批单中的开始时间
+        Object o1 = value.get(0);
+        String stringTime1 = o1.toString();
+        System.out.println("审批单中的开始时间" + stringTime1);
+        //审批单中的结束时间
+        Object o2 = value.get(1);
+        String stringTime2 = o2.toString();
+        System.out.println("审批单中的结束时间" + stringTime2);
+
+        SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
+        SimpleDateFormat simpleDateFormat11 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
+
+        Date date11 = new Date();
+        String date22 = null;
+
+        try {
+            date11 = simpleDateFormat1.parse(stringTime1);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+        try {
+            date22 = simpleDateFormat11.format(date11);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+        //yyyy-MM-dd
+        String dakaTime = date11.toString();
+        System.out.println("取出审批单中的开始时间的年-月-日:" + dakaTime);
+        //yyyy-MM-dd HH:mm:ss
+        String dakaTime1 = date22;
+        System.out.println("转换成指定格式的审批单中的时间:" + dakaTime1);
+
+        Date shenpidate = new Date();
+
+        SimpleDateFormat simpleDateFormatshenpi = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
+        try {
+            shenpidate = simpleDateFormatshenpi.parse(dakaTime1);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+
+        //审批单中的时间(毫秒级时间戳)
+        long shenpiTime = shenpidate.getTime();
+        System.out.println("审批单中的时间(毫秒级时间戳):" + shenpiTime);
+
+
+        /*
+         *👇👇👇👇👇👇获取考勤结果并计算出实际加班时间👇👇👇👇👇👇
+         */
+        DingTalkClient client3 = new DefaultDingTalkClient("https://oapi.dingtalk.com/attendance/list");
+        OapiAttendanceListRequest request3 = new OapiAttendanceListRequest();
+        try {
+
+            //打卡记录起始工作日时间
+            request3.setWorkDateFrom(dakaTime1);
+            //打卡记录结束工作日时间
+            request3.setWorkDateTo(dakaTime1);
+
+//            request.setUserIdList(Arrays.asList(employeeService.getEmployeeId()));
+//            request.setUserIdList(employeeService.getEmployeeIdAll());
+
+            //员工userid
+            request3.setUserIdList(Arrays.asList(emplId));
+
+            //分页值
+            request3.setOffset(0L);
+            //最大条数
+            request3.setLimit(50L);
+
+            OapiAttendanceListResponse response3 = client3.execute(request3,dingAccessTokenService.getMuZhiAccessToken());
+            kaoqinJG = response3.getBody();
+            System.out.println(response3.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        //通过fastjson工具转换成json对象,逐层解析
+        JSONObject jsonObject3 = JSON.parseObject(kaoqinJG);
+        JSONArray recordresult = jsonObject3.getJSONArray("recordresult");
+
+        String recordresult1 = jsonObject3.getString("recordresult");
+        System.out.println("打卡结果:" + recordresult1);
+
+        int resultSize = recordresult.size();
+        System.out.println("打卡结果数据总数:" + resultSize);
+
+        //上班前加班时间
+        double onjiaban = 0;
+        //下班前加班时间
+        double offjiaban = 0;
+
+        for (int a = 0; a < recordresult.size(); a++){
+            String checkType = recordresult.getJSONObject(a).getString("checkType");
+            System.out.println("上下班类型:" + checkType);
+
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
+
+            switch (checkType){
+                case "OnDuty":
+                    //上班标准时间
+                    String baseCheckTime1 = recordresult.getJSONObject(a).getString("baseCheckTime");
+                    System.out.println("上班标准时间(毫秒级时间戳):" + baseCheckTime1);
+
+                    String shangbanbiaozhunTime = simpleDateFormat.format(new Date(Long.parseLong(String.valueOf(baseCheckTime1))));
+                    System.out.println("上班标准时间(日期格式):" + shangbanbiaozhunTime);
+
+                    //用户实际上班打卡时间(毫秒级时间戳)
+                    String userCheckTime1 = recordresult.getJSONObject(a).getString("userCheckTime");
+                    //将用户实际上班打卡时间转换成日期格式
+                    String shijidakaTime1 = simpleDateFormat.format(new Date(Long.parseLong(String.valueOf(userCheckTime1))));
+                    System.out.println("实际上班打卡时间(日期格式):" + shijidakaTime1);
+
+                    try {
+                        Date date = simpleDateFormat.parse(shangbanbiaozhunTime);
+                        System.out.println("上班标准时间(时间格式):" + date);
+                        Date date1 = simpleDateFormat.parse(shijidakaTime1);
+                        System.out.println("实际上班打卡时间(时间格式)" + date1);
+
+                        //上班标准时间 - 实际上班打卡时间(时间戳相减)
+                        long time = date.getTime() - date1.getTime();
+                        //分钟
+                        long time1 = (time / 1000) / 60;
+                        System.out.println("上班标准时间(毫秒级):" + time);
+                        System.out.println("计算后的实际上班前加班时间(分钟):" + time1);
+
+                        //计算后的实际上班前加班时间(小时)
+                        onjiaban = (double)time1 / 60;
+
+                    }catch (Exception e){
+                        e.printStackTrace();
+                    }
+                    break;
+
+                case "OffDuty":
+                    //下班标准时间
+                    String baseCheckTime = recordresult.getJSONObject(a).getString("baseCheckTime");
+                    System.out.println("下班标准时间(毫秒级时间戳):" + baseCheckTime);
+
+//                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
+                    String xiabanbiaozhunTime = simpleDateFormat.format(new Date(Long.parseLong(String.valueOf(baseCheckTime))));
+                    System.out.println("下班标准时间(日期格式):" + xiabanbiaozhunTime);
+
+                    //用户实际下班打卡时间(毫秒级时间戳)
+                    String userCheckTime = recordresult.getJSONObject(a).getString("userCheckTime");
+                    String shijidakaTime = simpleDateFormat.format(new Date(Long.parseLong(String.valueOf(userCheckTime))));
+                    System.out.println("实际下班打卡时间(日期格式):" + shijidakaTime);
+
+
+                    //实际下班打卡时间(测试)
+//                    String shijidakaTime = "2021-03-25 17:44:00";
+
+                    try {
+                        Date date = simpleDateFormat.parse(xiabanbiaozhunTime);
+                        System.out.println("下班标准时间(时间格式):" + date);
+                        Date date1 = simpleDateFormat.parse(shijidakaTime);
+                        System.out.println("实际下班打卡时间(时间格式)" + date1);
+
+                        //实际下班打卡时间 - 下班标准时间(时间戳相减)
+                        long time = date1.getTime() - date.getTime();
+                        //分钟
+                        long time1 = (time / 1000) / 60;
+                        System.out.println("下班标准时间(毫秒级):" + time);
+                        System.out.println("计算后的实际下班后加班时间(分钟):" + time1);
+
+                        //计算后的实际下班后加班时间(小时)
+                        offjiaban = (double)time1 / 60;
+
+                    }catch (Exception e){
+                        e.printStackTrace();
+                    }
+                    break;
+            }
+
+        }
+
+        DecimalFormat df = new DecimalFormat("0.0");
+        //计算后的实际上班前加班时间
+        String jisuan1 = df.format(onjiaban);
+        System.out.println("计算后的实际上班前的加班时间(string型)(小时):" + jisuan1);
+        //计算后的实际下班后加班时间
+        String jisuan = df.format(offjiaban);
+        System.out.println("计算后的实际下班后的加班时间(string型)(小时):" + jisuan);
+
+        //TODO 定义一个时间变量,用于计算下班后多久开始计算加班时长
+        String jisuanTime = null;
+        //计算后的实际上班前加班时间
+        double onshichangTime = Double.parseDouble(jisuan1);
+        //计算后的实际下班后加班时间
+        double offshichangTime = Double.parseDouble(jisuan) - 0.5 + onshichangTime;
+
+        if (offshichangTime < 0.0){
+            jisuanTime = "0";
+        }else {
+            jisuanTime = String.valueOf(offshichangTime);
+        }
+
+        /*
+         *👆👆👆👆👆👆获取考勤结果并计算出实际加班时间👆👆👆👆👆👆
+         */
+
+
+
+        /*
+         *👇👇👇👇👇👇获取员工提交加班审批当天的排班是否休息👇👇👇👇👇👇
+         */
+
+        //查询员工提交加班审批当天的排班是否休息
+        try {
+            DingTalkClient client5 = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/attendance/schedule/listbyday");
+            OapiAttendanceScheduleListbydayRequest request5 = new OapiAttendanceScheduleListbydayRequest();
+
+            //操作者userid
+            request5.setOpUserId(originatorUserid);
+            //员工userid
+            request5.setUserId(emplId);
+            //查询哪一天的排班情况(毫秒级时间戳)
+            request5.setDateTime(shenpiTime);
+
+            OapiAttendanceScheduleListbydayResponse response5 = client5.execute(request5, dingAccessTokenService.getMuZhiAccessToken());
+            paiban = response5.getBody();
+            System.out.println(response5.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        //通过fastjson工具转换成json对象,逐层解析
+        JSONObject jsonObject5 = JSON.parseObject(paiban);
+        JSONArray result5 = jsonObject5.getJSONArray("result");
+        System.out.println("排班信息结果(数组):" + result5);
+
+        JSONObject jsonObject6 = result5.getJSONObject(0);
+        String is_rest = jsonObject6.getString("is_rest");
+        System.out.println("是否为休息(Y:当天排休,N:不休息):" + is_rest);
+
+//        switch (is_rest){
+//            //当天休息
+//            case "Y":
+//                System.out.println("休息!!!");
+//                break;
+//
+//            //当天上班
+//            case "N":
+//                System.out.println("上班!!!");
+//                break;
+//        }
+
+
+        /*
+         *👆👆👆👆👆👆获取员工提交加班审批当天的排班是否休息👆👆👆👆👆👆
+         */
+
+
+
+        //将获取的审批单中的加班时长乘100,并转换成long型,因为修改假期余额接口的参数要求
+        double jisuanTime1 = Double.parseDouble(jisuanTime) * 100;
+        int i = (int)jisuanTime1;
+        long l = (long)i;
+        System.out.println("审批单中实际的打卡加班时长(小时):" + l);
+
+        //当加班计算方式为按小时计算,将使用下面的计算方法计算加班时长
+        double d1 = Double.parseDouble(jisuanTime);
+        //取出审批时长中的整数值
+        int i1 = (int)d1 * 100;
+        System.out.println("审批单中申请的加班时长(int):" + i1);
+
+        //当加班计算方式为按半小时计算,将使用下面的计算方法计算加班时长
+        double d2 = Double.parseDouble(jisuanTime);
+        //取出审批时长中的小数位的值
+        double d3 = d2 - (int)d1;
+
+        double d4 = 0;
+
+        if (d3 > 0 && d3 < 0.5){
+            d4 = d2 - d3;
+        }else if (d3 >= 0.5 && d3 < 1){
+            d4 = d2 - d3 + 0.5;
+        }else {
+            d4 = d2;
+        }
+        long l1 = (long)(d4 * 100);
+        System.out.println("按半小时计算方式判断后,时长的值为:" + l1);
+
+        long option_shichang = 0L;
+
+        switch (key){
+            //按半小时计算
+            case "option_0":
+                option_shichang = l1;
+                break;
+
+            //按小时计算
+            case "option_1":
+                option_shichang = (long)i1;
+                break;
+
+            //按审批时长计算
+            case "option_2":
+                option_shichang = l;
+                break;
+        }
+        System.out.println("根据加班计算方式计算之后的加班时长(小时):" + option_shichang);
+
+        //TODO 自定义休息日加班时长比例
+        switch (is_rest){
+            //当天休息
+            case "Y":
+                option_shichang = option_shichang * 2;
+                System.out.println("休息!!!");
+                break;
+
+            //当天上班
+            case "N":
+                option_shichang = option_shichang;
+                System.out.println("上班!!!");
+                break;
+        }
+
+        System.out.println("根据加班计算方式计算之后的加班时长(小时),如果是休息日加班则提高时长比例:" + option_shichang);
+
+        //获取当前时间并转换成指定的日期格式(取当前年份)
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy");//设置日期格式
+        String date = simpleDateFormat.format(new Date());
+        int date1 = Integer.parseInt(date);
+        System.out.println("当前时间的日期格式为:"+date);
+
+        //获取当前时间并转换成指定的日期格式(取当前年份的年月日)
+        SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式
+
+
+        //查询当前加班审批单中的实际加班人员的假期余额
+        try {
+            DingTalkClient client2 = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/attendance/vacation/quota/list");
+            OapiAttendanceVacationQuotaListRequest request2 = new OapiAttendanceVacationQuotaListRequest();
+
+            //TODO 年假假期类型唯一标识(不能是系统自带的假期,必须是新建的其他假期,才可通过接口进行修改)【必填】
+//            request2.setLeaveCode("be7cda3e-d3e6-457f-918e-7d5e157d165a");//牧之测试架构
+            request2.setLeaveCode("963895d3-98e1-494e-836d-cc6ec44e1805");//牧之测试架构1
+
+            //操作者id
+            request2.setOpUserid(originatorUserid);
+            //待查询员工id列表
+            request2.setUserids(emplId);
+
+            request2.setOffset(0L);
+            request2.setSize(50L);
+            OapiAttendanceVacationQuotaListResponse response2 = client2.execute(request2, dingAccessTokenService.getMuZhiAccessToken());
+            yue = response2.getBody();
+            System.out.println(response2.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        //通过fastjson工具转换成json对象,逐层解析
+        JSONObject jsonObject2 = JSON.parseObject(yue);
+        JSONObject result = jsonObject2.getJSONObject("result");
+
+//        JSONArray leaveQuotas = result.getJSONArray("leave_quotas");
+//        String quotaNumPerHour = leaveQuotas.getJSONObject(0).getString("quota_num_per_hour");
+
+        long yue1 = 0L;
+
+        if (result.getString("leave_quotas") != null){
+            JSONArray leaveQuotas = result.getJSONArray("leave_quotas");
+            String quotaNumPerHour = leaveQuotas.getJSONObject(0).getString("quota_num_per_hour");
+            int yue = Integer.parseInt(quotaNumPerHour);
+            yue1 = (long)yue;
+        }else {
+            yue1 = 0L;
+        }
+
+        System.out.println("当前加班人员的假期余额:" + yue1);
+
+
+        //调用批量更新员工假期余额接口
+        try {
+            DingTalkClient client4 = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/attendance/vacation/quota/update");
+            OapiAttendanceVacationQuotaUpdateRequest request4 = new OapiAttendanceVacationQuotaUpdateRequest();
+            List<OapiAttendanceVacationQuotaUpdateRequest.LeaveQuotas> list2 = new ArrayList<>();
+            OapiAttendanceVacationQuotaUpdateRequest.LeaveQuotas obj3 = new OapiAttendanceVacationQuotaUpdateRequest.LeaveQuotas();
+            list2.add(obj3);
+
+            //实际加班人员userid【必填】
+            obj3.setUserid(emplId);
+
+            //取出当年第一天
+            Date yearFirst = getYearFirst(date1);
+            String dateFirst = simpleDateFormat2.format(yearFirst);
+            long dateFirst2 = 0L;
+            try {
+                String dateFirst1 = String.valueOf(simpleDateFormat2.parse(dateFirst).getTime());
+                dateFirst2 = Long.parseLong(dateFirst1);
+            }catch (Exception e){
+                e.printStackTrace();
+            }
+            System.out.println("当年第一天(时间型):" + dateFirst);
+            System.out.println("当年第一天(毫秒级时间戳):" + dateFirst2);
+
+            //取出当年最后一天
+            Date yearLast = getYearLast(date1);
+            String dateLast = simpleDateFormat2.format(yearLast);
+            long dateLast2 = 0L;
+            try {
+                String dateLast1 = String.valueOf(simpleDateFormat2.parse(dateLast).getTime());
+                dateLast2 = Long.parseLong(dateLast1);
+            }catch (Exception e){
+                e.printStackTrace();
+            }
+            System.out.println("当年最后一天(时间型):" + dateLast);
+            System.out.println("当年最后一天(毫秒级时间戳):" + dateLast2);
+
+
+            //额度有效期开始时间(毫秒级时间戳):当年的1月1日
+            obj3.setStartTime(dateFirst2);
+            //额度有效期结束时间(毫秒级时间戳):当年的12月31日
+            obj3.setEndTime(dateLast2);
+
+            //TODO 年假假期类型唯一标识(不能是系统自带的假期,必须是新建的其他假期,才可通过接口进行修改)【必填】
+//            obj3.setLeaveCode("be7cda3e-d3e6-457f-918e-7d5e157d165a");//牧之测试架构
+            obj3.setLeaveCode("963895d3-98e1-494e-836d-cc6ec44e1805");//牧之测试架构1
+
+            //操作原因
+            obj3.setReason("加班审批追加");
+
+            //假期类型按小时,计算该值不为空且按百分之一小时折算。例如:1000=10小时。【如需修改假期余额,必填】
+            obj3.setQuotaNumPerHour(option_shichang + yue1);
+
+            //额度所对应的周期,除了假期类型为调休的时候可以为空之外,其他情况均不能为空且格式必须满足“yyyy”。【假期类型除了调休以外,都为普通假期类型,必填】
+            obj3.setQuotaCycle(date);
+
+            request4.setLeaveQuotas(list2);
+            //审批人userid【必填】
+            request4.setOpUserid(originatorUserid);
+
+            OapiAttendanceVacationQuotaUpdateResponse response4 = client4.execute(request4, dingAccessTokenService.getMuZhiAccessToken());
+            jiaqi = response4.getBody();
+            System.out.println(response4.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        String s1 = String.valueOf(option_shichang);
+
+        double shichangNow = Double.parseDouble(s1) / 100;
+
+        System.out.println("已成功追加员工【" + name + "】假期余额:" + shichangNow + "小时!");
+
+        return "已成功追加员工【" + name + "】假期余额:" + shichangNow + "小时!";
+    }
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 280 - 0
src/main/java/com/muzhi/dingtalk/test/service/impl/EmployeeServiceImpl.java


+ 80 - 0
src/main/java/com/muzhi/dingtalk/test/service/impl/FangDeDingAccessTokenServiceImpl.java

@@ -0,0 +1,80 @@
+package com.muzhi.dingtalk.test.service.impl;
+
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.request.OapiGettokenRequest;
+import com.dingtalk.api.request.OapiServiceGetCorpTokenRequest;
+import com.dingtalk.api.response.OapiGettokenResponse;
+import com.dingtalk.api.response.OapiServiceGetCorpTokenResponse;
+import com.muzhi.dingtalk.test.service.DingAccessTokenService;
+import com.muzhi.dingtalk.test.service.FangDeDingAccessTokenService;
+import com.taobao.api.ApiException;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * @Author ZhangKan
+ * @Data 15:39
+ */
+
+@Service
+public class FangDeDingAccessTokenServiceImpl implements FangDeDingAccessTokenService {
+    //DingAccessTokenService
+
+    //房德
+    //AUTHCORPID(被授权方(房德)corpid)
+    private static String AUTHCORPID = "ding81b4dfad3a436bd735c2f4657eb6378f";
+    //CUSTOMKEY
+    private static String CUSTOMKEY = "suitekzs42ayrw8ovg8li";
+    //CUSTOMSECTET
+    private static String CUSTOMSECTET = "AiJrQg4eZfJHEkoWj5bC_NZUlMWdKdOzSNG8NewaDIfL25q2BucxJDbanEPe99I5";
+    //SUITETICKET
+    private static String SUITETICKET = "";
+
+    public static String dingzhiaccessToken = null;
+
+
+    //获取定制服务access_token授权的方法(房德)
+//    @Override
+//    public String getFangDeAccessToken(){
+//        DefaultDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/service/get_corp_token");
+//        OapiServiceGetCorpTokenRequest req = new OapiServiceGetCorpTokenRequest();
+//        req.setAuthCorpid(AUTHCORPID);
+//        try {
+//            OapiServiceGetCorpTokenResponse execute = client.execute(req,CUSTOMKEY,CUSTOMSECTET, SUITETICKET);
+//            dingzhiaccessToken = execute.getAccessToken();
+//            System.out.println("房德DingzhiAccessToken:" + dingzhiaccessToken);
+////            String string = JSON.toJSONString(execute);
+////            System.out.println("execute:" + string);
+//        }catch (ApiException e){
+//            e.printStackTrace();
+//        }
+//        return dingzhiaccessToken;
+//    }
+
+    //房德
+    //APPKEY
+    private static String APPKEY = "dingqtvicxlaua1zktiy";
+    //APPSECRET
+    private static String APPSECRET = "f43HS3ylAbpelFPwdxUhcuMCWQhIsC5vo7KSTm84KANOotLyC34XL6foDYwXY8WD";
+
+    public static String accessToken = null;
+
+
+    //获取access_token的方法(房德)
+    @Override
+    public String getFangDeAccessToken() {
+        DefaultDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken");
+        OapiGettokenRequest request = new OapiGettokenRequest();
+        request.setAppkey(APPKEY);
+        request.setAppsecret(APPSECRET);
+        request.setHttpMethod("GET");
+        try {
+            OapiGettokenResponse response = client.execute(request);
+            accessToken = response.getAccessToken();
+            System.out.println("房德AccessToken:" + accessToken);
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+        return accessToken;
+    }
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2274 - 0
src/main/java/com/muzhi/dingtalk/test/service/impl/FangDeTongbuServiceImpl.java


+ 217 - 0
src/main/java/com/muzhi/dingtalk/test/service/impl/KaoqinServiceImpl.java

@@ -0,0 +1,217 @@
+package com.muzhi.dingtalk.test.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiAttendanceGetsimplegroupsRequest;
+import com.dingtalk.api.request.OapiAttendanceGroupQueryRequest;
+import com.dingtalk.api.request.OapiAttendanceListRecordRequest;
+import com.dingtalk.api.request.OapiAttendanceListRequest;
+import com.dingtalk.api.response.OapiAttendanceGetsimplegroupsResponse;
+import com.dingtalk.api.response.OapiAttendanceGroupQueryResponse;
+import com.dingtalk.api.response.OapiAttendanceListRecordResponse;
+import com.dingtalk.api.response.OapiAttendanceListResponse;
+import com.muzhi.dingtalk.test.service.DingAccessTokenService;
+import com.muzhi.dingtalk.test.service.DingdingLianJieQiService;
+import com.muzhi.dingtalk.test.service.EmployeeService;
+import com.muzhi.dingtalk.test.service.KaoqinService;
+import com.taobao.api.ApiException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.DateFormat;
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+
+
+/**
+ * @Author ZhangKan
+ * @Data 20:32
+ */
+
+@Service
+public class KaoqinServiceImpl implements KaoqinService {
+
+    @Autowired
+    private DingAccessTokenService dingAccessTokenService;
+
+    @Autowired
+    private DingdingLianJieQiService dingdingLianJieQiService;
+
+    @Autowired
+    private EmployeeService employeeService;
+
+    public static String kaoqinXQ = null;
+    public static String kaoqinJG = null;
+    public static String kaoqinzuList = null;
+    public static String kaoqinzuXQ = null;
+
+
+    //获取考勤结果
+    @Override
+    public String getKaoqinJG(){
+
+        DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/attendance/list");
+        OapiAttendanceListRequest request = new OapiAttendanceListRequest();
+        try {
+
+            //打卡记录起始工作日时间
+            request.setWorkDateFrom("2021-03-25 00:00:00");
+            //打卡记录结束工作日时间
+            request.setWorkDateTo("2021-03-25 00:00:00");
+
+//            request.setUserIdList(Arrays.asList(employeeService.getEmployeeId()));
+//            request.setUserIdList(employeeService.getEmployeeIdAll());
+
+            //员工userid
+            request.setUserIdList(Arrays.asList("manager7290"));
+
+            //分页值
+            request.setOffset(0L);
+            //最大条数
+            request.setLimit(50L);
+
+            OapiAttendanceListResponse response = client.execute(request,dingAccessTokenService.getMuZhiAccessToken());
+            kaoqinJG = response.getBody();
+            System.out.println(response.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        //通过fastjson工具转换成json对象,逐层解析
+        JSONObject jsonObject = JSON.parseObject(kaoqinJG);
+        JSONArray recordresult = jsonObject.getJSONArray("recordresult");
+
+        String recordresult1 = jsonObject.getString("recordresult");
+        System.out.println("打卡结果:" + recordresult1);
+
+        int resultSize = recordresult.size();
+        System.out.println("打卡结果数据总数:" + resultSize);
+
+        double d = 0;
+
+        for (int a = 0; a < recordresult.size(); a++){
+            String checkType = recordresult.getJSONObject(a).getString("checkType");
+            System.out.println("上下班类型:" + checkType);
+
+            switch (checkType){
+                case "OffDuty":
+                    String baseCheckTime = recordresult.getJSONObject(a).getString("baseCheckTime");
+                    System.out.println("下班标准时间:" + baseCheckTime);
+
+                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
+                    String sd = simpleDateFormat.format(new Date(Long.parseLong(String.valueOf(baseCheckTime))));
+                    System.out.println("下班日期格式:" + sd);
+
+
+                    //实际打卡时间
+                    String aa = "2021-03-25 17:44:00";
+
+                    try {
+                        Date date = simpleDateFormat.parse(sd);
+                        System.out.println("时间1" + date);
+                        Date date1 = simpleDateFormat.parse(aa);
+                        System.out.println("时间2" + date1);
+
+                        //下班标准时间 - 实际打卡时间(时间戳相减)
+                        long time = date1.getTime() - date.getTime();
+                        //分钟
+                        long time1 = (time / 1000) / 60;
+                        System.out.println("下班标准时间(毫秒级):" + time);
+                        System.out.println("计算后的实际时间(分钟):" + time1);
+
+                        //计算后的实际时间(小时)
+                        d = (double)time1 / 60;
+
+                    }catch (Exception e){
+                        e.printStackTrace();
+                    }
+                    break;
+            }
+
+        }
+
+//        String a = String.format("%.1f", d);
+//        System.out.println("保留1位小数:" + a);
+
+//        DecimalFormat df = new DecimalFormat("0.0");
+//        System.out.println("测试double小数位:" + df.format(666.123456789456));
+
+        DecimalFormat df = new DecimalFormat("0.0");
+        String jisuanTime = df.format(d);
+
+        double jisuanTime1 = Double.parseDouble(jisuanTime);
+
+        System.out.println("计算后的实际时间(小时):" + jisuanTime1);
+
+        return null;
+    }
+
+
+    //获取考勤详情
+    @Override
+    public String getKaoqinXQ(){
+        DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/attendance/listRecord");
+        OapiAttendanceListRecordRequest request = new OapiAttendanceListRecordRequest();
+        try {
+            request.setCheckDateFrom("2020-11-02 00:00:00");
+            request.setCheckDateTo("2020-11-08 00:00:00");
+
+//            request.setUserIds(Arrays.asList("16003030121002248","15997556700605983"));
+//            request.setUserIds(Arrays.asList(employeeService.getEmployeeId()));
+
+            request.setUserIds(employeeService.getEmployeeIdAll());
+
+            OapiAttendanceListRecordResponse response = client.execute(request,dingAccessTokenService.getAccessToken());
+            kaoqinXQ = response.getBody();
+            System.out.println(response.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        return kaoqinXQ;
+    }
+
+
+
+    //获取考勤组列表详情
+    @Override
+    public String getKaoqinzuList(){
+        DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/attendance/getsimplegroups");
+        OapiAttendanceGetsimplegroupsRequest request = new OapiAttendanceGetsimplegroupsRequest();
+        try {
+            request.setOffset(0L);
+            request.setSize(10L);
+            OapiAttendanceGetsimplegroupsResponse response = client.execute(request, dingAccessTokenService.getAccessToken());
+            kaoqinzuList = response.getBody();
+            System.out.println(response.getBody());
+        }catch (ApiException e){
+            e.printStackTrace();
+        }
+
+        return kaoqinzuList;
+    }
+
+    //获取考勤组详情
+    @Override
+    public String getKaoqinzuXQ(){
+        DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/attendance/group/query");
+        OapiAttendanceGroupQueryRequest request = new OapiAttendanceGroupQueryRequest();
+        try {
+            request.setOpUserId("16051955788282051");
+            request.setGroupId(105097853L);
+            OapiAttendanceGroupQueryResponse response = client.execute(request, dingAccessTokenService.getAccessToken());
+            kaoqinzuXQ = response.getBody();
+            System.out.println(response.getBody());
+        }catch (ApiException e){
+            e.printStackTrace();
+        }
+
+        return kaoqinzuXQ;
+    }
+
+}

+ 62 - 0
src/main/java/com/muzhi/dingtalk/test/service/impl/ShenpiServiceImpl.java

@@ -0,0 +1,62 @@
+package com.muzhi.dingtalk.test.service.impl;
+
+
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiProcessinstanceGetRequest;
+import com.dingtalk.api.request.OapiProcessinstanceListidsRequest;
+import com.dingtalk.api.response.OapiProcessinstanceGetResponse;
+import com.dingtalk.api.response.OapiProcessinstanceListidsResponse;
+import com.muzhi.dingtalk.test.service.DingAccessTokenService;
+import com.muzhi.dingtalk.test.service.ShenpiService;
+import com.taobao.api.ApiException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ShenpiServiceImpl implements ShenpiService {
+
+    @Autowired
+    private DingAccessTokenService dingAccessTokenService;
+
+    public static String shenpiIdList;
+    public static String shenpiXQ;
+
+    //TODO 分页获取审批实例id列表
+    @Override
+    public String getShenpiIdList(){
+        DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/listids");
+        OapiProcessinstanceListidsRequest request = new OapiProcessinstanceListidsRequest();
+        try {
+            request.setProcessCode("PROC-FF6Y2xxxx");
+            request.setStartTime(1599148800000L);
+            request.setEndTime(1599321599000L);
+            request.setSize(10L);
+            request.setCursor(0L);
+            request.setUseridList("manager1,manager2");
+            OapiProcessinstanceListidsResponse response = client.execute(request, dingAccessTokenService.getAccessToken());
+            shenpiIdList = response.getBody();
+            System.out.println(response.getBody());
+        }catch (ApiException e){
+            e.printStackTrace();
+        }
+        return shenpiIdList;
+    }
+
+    //TODO 获取审批实例详情
+    @Override
+    public String getShenpiXQ(){
+        DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/get");
+        OapiProcessinstanceGetRequest request = new OapiProcessinstanceGetRequest();
+        try {
+            request.setProcessInstanceId("1a2b-3e4dxxxx");
+            OapiProcessinstanceGetResponse response = client.execute(request, dingAccessTokenService.getAccessToken());
+            shenpiXQ = response.getBody();
+            System.out.println(response.getBody());
+        }catch (ApiException e){
+            e.printStackTrace();
+        }
+
+        return shenpiXQ;
+    }
+}

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 908 - 0
src/main/java/com/muzhi/dingtalk/test/service/impl/TongbuServiceImpl.java


BIN=BIN
src/main/java/com/muzhi/dingtalk/test/webservice/IPsndocVO.class


+ 94 - 0
src/main/java/com/muzhi/dingtalk/test/webservice/IPsndocVO.java

@@ -0,0 +1,94 @@
+
+package com.muzhi.dingtalk.test.webservice;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebEndpoint;
+import javax.xml.ws.WebServiceClient;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ * 
+ */
+@WebServiceClient(name = "IPsndocVO", targetNamespace = "http://fdncc.itf.nc/IPsndocVO", wsdlLocation = "http://118.178.17.233:8888/uapws/service/IPsndocVO?wsdl")
+public class IPsndocVO
+    extends Service
+{
+
+    private final static URL IPSNDOCVO_WSDL_LOCATION;
+    private final static WebServiceException IPSNDOCVO_EXCEPTION;
+    private final static QName IPSNDOCVO_QNAME = new QName("http://fdncc.itf.nc/IPsndocVO", "IPsndocVO");
+
+    static {
+        URL url = null;
+        WebServiceException e = null;
+        try {
+            url = new URL("http://118.178.17.233:8888/uapws/service/IPsndocVO?wsdl");
+        } catch (MalformedURLException ex) {
+            e = new WebServiceException(ex);
+        }
+        IPSNDOCVO_WSDL_LOCATION = url;
+        IPSNDOCVO_EXCEPTION = e;
+    }
+
+    public IPsndocVO() {
+        super(__getWsdlLocation(), IPSNDOCVO_QNAME);
+    }
+
+    public IPsndocVO(WebServiceFeature... features) {
+        super(__getWsdlLocation(), IPSNDOCVO_QNAME, features);
+    }
+
+    public IPsndocVO(URL wsdlLocation) {
+        super(wsdlLocation, IPSNDOCVO_QNAME);
+    }
+
+    public IPsndocVO(URL wsdlLocation, WebServiceFeature... features) {
+        super(wsdlLocation, IPSNDOCVO_QNAME, features);
+    }
+
+    public IPsndocVO(URL wsdlLocation, QName serviceName) {
+        super(wsdlLocation, serviceName);
+    }
+
+    public IPsndocVO(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
+        super(wsdlLocation, serviceName, features);
+    }
+
+    /**
+     * 
+     * @return
+     *     returns IPsndocVOPortType
+     */
+    @WebEndpoint(name = "IPsndocVOSOAP11port_http")
+    public IPsndocVOPortType getIPsndocVOSOAP11PortHttp() {
+        return super.getPort(new QName("http://fdncc.itf.nc/IPsndocVO", "IPsndocVOSOAP11port_http"), IPsndocVOPortType.class);
+    }
+
+    /**
+     * 
+     * @param features
+     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the <code>features</code> parameter will have their default values.
+     * @return
+     *     returns IPsndocVOPortType
+     */
+    @WebEndpoint(name = "IPsndocVOSOAP11port_http")
+    public IPsndocVOPortType getIPsndocVOSOAP11PortHttp(WebServiceFeature... features) {
+        return super.getPort(new QName("http://fdncc.itf.nc/IPsndocVO", "IPsndocVOSOAP11port_http"), IPsndocVOPortType.class, features);
+    }
+
+    private static URL __getWsdlLocation() {
+        if (IPSNDOCVO_EXCEPTION!= null) {
+            throw IPSNDOCVO_EXCEPTION;
+        }
+        return IPSNDOCVO_WSDL_LOCATION;
+    }
+
+}

+ 63 - 0
src/main/java/com/muzhi/dingtalk/test/webservice/IPsndocVO.wsdl

@@ -0,0 +1,63 @@
+<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0" targetNamespace="http://fdncc.itf.nc/IPsndocVO" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:ns0="http://fdncc.itf.nc/IPsndocVO" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <wsdl:types>
+    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" jaxb:version="2.0" targetNamespace="http://fdncc.itf.nc/IPsndocVO" xmlns:ns="http://fdncc.itf.nc/IPsndocVO">
+	<xsd:annotation>
+    	<xsd:appinfo>
+   			<jaxb:schemaBindings>
+    			<jaxb:package name="nc.itf.fdncc" />
+    		</jaxb:schemaBindings>
+   		</xsd:appinfo>
+   	</xsd:annotation>
+	<xsd:element name="SavePsndocVO">
+         <xsd:complexType>
+            <xsd:sequence>
+				<xsd:element minOccurs="0" name="string" nillable="true" type="xsd:string" />
+             </xsd:sequence>  
+         </xsd:complexType>
+     </xsd:element>
+	<xsd:element name="SavePsndocVOResponse">
+         <xsd:complexType>
+            <xsd:sequence>
+				<xsd:element minOccurs="0" name="return" nillable="true" type="xsd:string" />
+             </xsd:sequence>  
+         </xsd:complexType>
+     </xsd:element>
+   </xsd:schema>
+  </wsdl:types>
+  <wsdl:message name="SavePsndocVORequest">
+    <wsdl:part element="ns0:SavePsndocVO" name="parameters">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:message name="SavePsndocVOResponse">
+    <wsdl:part element="ns0:SavePsndocVOResponse" name="parameters">
+    </wsdl:part>
+  </wsdl:message>
+  <wsdl:portType name="IPsndocVOPortType">
+    <wsdl:operation name="SavePsndocVO">
+      <wsdl:input message="ns0:SavePsndocVORequest" wsaw:Action="urn:SavePsndocVO">
+    </wsdl:input>
+      <wsdl:output message="ns0:SavePsndocVOResponse" wsaw:Action="urn:SavePsndocVOResponse">
+    </wsdl:output>
+    </wsdl:operation>
+  </wsdl:portType>
+  <wsdl:binding name="IPsndocVOSOAP11Binding" type="ns0:IPsndocVOPortType">
+    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+    <wsdl:operation name="SavePsndocVO">
+      <soap:operation soapAction="urn:SavePsndocVO" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+  </wsdl:binding>
+  <wsdl:service name="IPsndocVO">
+    <wsdl:port binding="ns0:IPsndocVOSOAP11Binding" name="IPsndocVOSOAP11port_http">
+      <soap:address location="http://118.178.17.233:8888/uapws/service/IPsndocVO" />
+    </wsdl:port>
+  </wsdl:service>
+    <jaxws:bindings>
+	<jaxws:package name="nc.itf.fdncc" />
+</jaxws:bindings>
+</wsdl:definitions>

BIN=BIN
src/main/java/com/muzhi/dingtalk/test/webservice/IPsndocVOPortType.class


+ 40 - 0
src/main/java/com/muzhi/dingtalk/test/webservice/IPsndocVOPortType.java

@@ -0,0 +1,40 @@
+
+package com.muzhi.dingtalk.test.webservice;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+
+/**
+ * This class was generated by the JAX-WS RI.
+ * JAX-WS RI 2.2.9-b130926.1035
+ * Generated source version: 2.2
+ * 
+ */
+@WebService(name = "IPsndocVOPortType", targetNamespace = "http://fdncc.itf.nc/IPsndocVO")
+@XmlSeeAlso({
+    ObjectFactory.class
+})
+public interface IPsndocVOPortType {
+
+
+    /**
+     * 
+     * @param string
+     * @return
+     *     returns java.lang.String
+     */
+    @WebMethod(operationName = "SavePsndocVO", action = "urn:SavePsndocVO")
+    @WebResult(targetNamespace = "")
+    @RequestWrapper(localName = "SavePsndocVO", targetNamespace = "http://fdncc.itf.nc/IPsndocVO", className = "com.muzhi.dingtalk.test.webservice.SavePsndocVO")
+    @ResponseWrapper(localName = "SavePsndocVOResponse", targetNamespace = "http://fdncc.itf.nc/IPsndocVO", className = "com.muzhi.dingtalk.test.webservice.SavePsndocVOResponse")
+    public String savePsndocVO(
+        @WebParam(name = "string", targetNamespace = "")
+        String string);
+
+}

BIN=BIN
src/main/java/com/muzhi/dingtalk/test/webservice/ObjectFactory.class


+ 71 - 0
src/main/java/com/muzhi/dingtalk/test/webservice/ObjectFactory.java

@@ -0,0 +1,71 @@
+
+package com.muzhi.dingtalk.test.webservice;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlElementDecl;
+import javax.xml.bind.annotation.XmlRegistry;
+import javax.xml.namespace.QName;
+
+
+/**
+ * This object contains factory methods for each 
+ * Java content interface and Java element interface 
+ * generated in the com.muzhi.dingtalk.test.webservice package. 
+ * <p>An ObjectFactory allows you to programatically 
+ * construct new instances of the Java representation 
+ * for XML content. The Java representation of XML 
+ * content can consist of schema derived interfaces 
+ * and classes representing the binding of schema 
+ * type definitions, element declarations and model 
+ * groups.  Factory methods for each of these are 
+ * provided in this class.
+ * 
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+    private final static QName _SavePsndocVOString_QNAME = new QName("", "string");
+    private final static QName _SavePsndocVOResponseReturn_QNAME = new QName("", "return");
+
+    /**
+     * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.muzhi.dingtalk.test.webservice
+     * 
+     */
+    public ObjectFactory() {
+    }
+
+    /**
+     * Create an instance of {@link SavePsndocVOResponse }
+     * 
+     */
+    public SavePsndocVOResponse createSavePsndocVOResponse() {
+        return new SavePsndocVOResponse();
+    }
+
+    /**
+     * Create an instance of {@link SavePsndocVO }
+     * 
+     */
+    public SavePsndocVO createSavePsndocVO() {
+        return new SavePsndocVO();
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "", name = "string", scope = SavePsndocVO.class)
+    public JAXBElement<String> createSavePsndocVOString(String value) {
+        return new JAXBElement<String>(_SavePsndocVOString_QNAME, String.class, SavePsndocVO.class, value);
+    }
+
+    /**
+     * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
+     * 
+     */
+    @XmlElementDecl(namespace = "", name = "return", scope = SavePsndocVOResponse.class)
+    public JAXBElement<String> createSavePsndocVOResponseReturn(String value) {
+        return new JAXBElement<String>(_SavePsndocVOResponseReturn_QNAME, String.class, SavePsndocVOResponse.class, value);
+    }
+
+}

BIN=BIN
src/main/java/com/muzhi/dingtalk/test/webservice/SavePsndocVO.class


+ 68 - 0
src/main/java/com/muzhi/dingtalk/test/webservice/SavePsndocVO.java

@@ -0,0 +1,68 @@
+
+package com.muzhi.dingtalk.test.webservice;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.stereotype.Service;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElementRef;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>anonymous complex type�� Java �ࡣ
+ * 
+ * <p>����ģʽƬ��ָ�������ڴ����е�Ԥ�����ݡ�
+ * 
+ * <pre>
+ * &lt;complexType>
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       &lt;sequence>
+ *         &lt;element name="string" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+    "string"
+})
+@XmlRootElement(name = "SavePsndocVO")
+public class SavePsndocVO {
+
+    @XmlElementRef(name = "string", type = JAXBElement.class, required = false)
+    protected JAXBElement<String> string;
+
+    /**
+     * ��ȡstring���Ե�ֵ��
+     * 
+     * @return
+     *     possible object is
+     *     {@link JAXBElement }{@code <}{@link String }{@code >}
+     *     
+     */
+    public JAXBElement<String> getString() {
+        return string;
+    }
+
+    /**
+     * ����string���Ե�ֵ��
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link JAXBElement }{@code <}{@link String }{@code >}
+     *     
+     */
+    public void setString(JAXBElement<String> value) {
+        this.string = value;
+    }
+
+}

+ 0 - 0
src/main/java/com/muzhi/dingtalk/test/webservice/SavePsndocVOResponse.class


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio