zhang-kan-kan %!s(int64=3) %!d(string=hai) anos
achega
8fd2286da5
Modificáronse 100 ficheiros con 2683 adicións e 0 borrados
  1. 37 0
      .gitignore
  2. 118 0
      .mvn/wrapper/MavenWrapperDownloader.java
  3. 2 0
      .mvn/wrapper/maven-wrapper.properties
  4. 25 0
      HELP.md
  5. 310 0
      pom.xml
  6. 20 0
      src/main/java/com/muzhi/mt/DingTalkApplication.java
  7. 42 0
      src/main/java/com/muzhi/mt/controller/AccessTokenController.java
  8. 32 0
      src/main/java/com/muzhi/mt/controller/MiandengController.java
  9. 42 0
      src/main/java/com/muzhi/mt/controller/OAhetongController.java
  10. 14 0
      src/main/java/com/muzhi/mt/service/DingAccessTokenService.java
  11. 11 0
      src/main/java/com/muzhi/mt/service/MiandengService.java
  12. 14 0
      src/main/java/com/muzhi/mt/service/OAhetongService.java
  13. 72 0
      src/main/java/com/muzhi/mt/service/impl/DingAccessTokenServiceImpl.java
  14. 45 0
      src/main/java/com/muzhi/mt/service/impl/MiandengServiceImpl.java
  15. 823 0
      src/main/java/com/muzhi/mt/service/impl/OAhetongServiceImpl.java
  16. 51 0
      src/main/resources/application.properties
  17. 2 0
      src/main/resources/static/layui/css/layui.css
  18. 2 0
      src/main/resources/static/layui/css/layui.mobile.css
  19. 2 0
      src/main/resources/static/layui/css/modules/code.css
  20. 2 0
      src/main/resources/static/layui/css/modules/laydate/default/laydate.css
  21. BIN=BIN
      src/main/resources/static/layui/css/modules/layer/default/icon-ext.png
  22. BIN=BIN
      src/main/resources/static/layui/css/modules/layer/default/icon.png
  23. 2 0
      src/main/resources/static/layui/css/modules/layer/default/layer.css
  24. BIN=BIN
      src/main/resources/static/layui/css/modules/layer/default/loading-0.gif
  25. BIN=BIN
      src/main/resources/static/layui/css/modules/layer/default/loading-1.gif
  26. BIN=BIN
      src/main/resources/static/layui/css/modules/layer/default/loading-2.gif
  27. 461 0
      src/main/resources/static/layui/css/normalize.css
  28. BIN=BIN
      src/main/resources/static/layui/font/iconfont.eot
  29. 554 0
      src/main/resources/static/layui/font/iconfont.svg
  30. BIN=BIN
      src/main/resources/static/layui/font/iconfont.ttf
  31. BIN=BIN
      src/main/resources/static/layui/font/iconfont.woff
  32. BIN=BIN
      src/main/resources/static/layui/font/iconfont.woff2
  33. BIN=BIN
      src/main/resources/static/layui/images/face/0.gif
  34. BIN=BIN
      src/main/resources/static/layui/images/face/1.gif
  35. BIN=BIN
      src/main/resources/static/layui/images/face/10.gif
  36. BIN=BIN
      src/main/resources/static/layui/images/face/11.gif
  37. BIN=BIN
      src/main/resources/static/layui/images/face/12.gif
  38. BIN=BIN
      src/main/resources/static/layui/images/face/13.gif
  39. BIN=BIN
      src/main/resources/static/layui/images/face/14.gif
  40. BIN=BIN
      src/main/resources/static/layui/images/face/15.gif
  41. BIN=BIN
      src/main/resources/static/layui/images/face/16.gif
  42. BIN=BIN
      src/main/resources/static/layui/images/face/17.gif
  43. BIN=BIN
      src/main/resources/static/layui/images/face/18.gif
  44. BIN=BIN
      src/main/resources/static/layui/images/face/19.gif
  45. BIN=BIN
      src/main/resources/static/layui/images/face/2.gif
  46. BIN=BIN
      src/main/resources/static/layui/images/face/20.gif
  47. BIN=BIN
      src/main/resources/static/layui/images/face/21.gif
  48. BIN=BIN
      src/main/resources/static/layui/images/face/22.gif
  49. BIN=BIN
      src/main/resources/static/layui/images/face/23.gif
  50. BIN=BIN
      src/main/resources/static/layui/images/face/24.gif
  51. BIN=BIN
      src/main/resources/static/layui/images/face/25.gif
  52. BIN=BIN
      src/main/resources/static/layui/images/face/26.gif
  53. BIN=BIN
      src/main/resources/static/layui/images/face/27.gif
  54. BIN=BIN
      src/main/resources/static/layui/images/face/28.gif
  55. BIN=BIN
      src/main/resources/static/layui/images/face/29.gif
  56. BIN=BIN
      src/main/resources/static/layui/images/face/3.gif
  57. BIN=BIN
      src/main/resources/static/layui/images/face/30.gif
  58. BIN=BIN
      src/main/resources/static/layui/images/face/31.gif
  59. BIN=BIN
      src/main/resources/static/layui/images/face/32.gif
  60. BIN=BIN
      src/main/resources/static/layui/images/face/33.gif
  61. BIN=BIN
      src/main/resources/static/layui/images/face/34.gif
  62. BIN=BIN
      src/main/resources/static/layui/images/face/35.gif
  63. BIN=BIN
      src/main/resources/static/layui/images/face/36.gif
  64. BIN=BIN
      src/main/resources/static/layui/images/face/37.gif
  65. BIN=BIN
      src/main/resources/static/layui/images/face/38.gif
  66. BIN=BIN
      src/main/resources/static/layui/images/face/39.gif
  67. BIN=BIN
      src/main/resources/static/layui/images/face/4.gif
  68. BIN=BIN
      src/main/resources/static/layui/images/face/40.gif
  69. BIN=BIN
      src/main/resources/static/layui/images/face/41.gif
  70. BIN=BIN
      src/main/resources/static/layui/images/face/42.gif
  71. BIN=BIN
      src/main/resources/static/layui/images/face/43.gif
  72. BIN=BIN
      src/main/resources/static/layui/images/face/44.gif
  73. BIN=BIN
      src/main/resources/static/layui/images/face/45.gif
  74. BIN=BIN
      src/main/resources/static/layui/images/face/46.gif
  75. BIN=BIN
      src/main/resources/static/layui/images/face/47.gif
  76. BIN=BIN
      src/main/resources/static/layui/images/face/48.gif
  77. BIN=BIN
      src/main/resources/static/layui/images/face/49.gif
  78. BIN=BIN
      src/main/resources/static/layui/images/face/5.gif
  79. BIN=BIN
      src/main/resources/static/layui/images/face/50.gif
  80. BIN=BIN
      src/main/resources/static/layui/images/face/51.gif
  81. BIN=BIN
      src/main/resources/static/layui/images/face/52.gif
  82. BIN=BIN
      src/main/resources/static/layui/images/face/53.gif
  83. BIN=BIN
      src/main/resources/static/layui/images/face/54.gif
  84. BIN=BIN
      src/main/resources/static/layui/images/face/55.gif
  85. BIN=BIN
      src/main/resources/static/layui/images/face/56.gif
  86. BIN=BIN
      src/main/resources/static/layui/images/face/57.gif
  87. BIN=BIN
      src/main/resources/static/layui/images/face/58.gif
  88. BIN=BIN
      src/main/resources/static/layui/images/face/59.gif
  89. BIN=BIN
      src/main/resources/static/layui/images/face/6.gif
  90. BIN=BIN
      src/main/resources/static/layui/images/face/60.gif
  91. BIN=BIN
      src/main/resources/static/layui/images/face/61.gif
  92. BIN=BIN
      src/main/resources/static/layui/images/face/62.gif
  93. BIN=BIN
      src/main/resources/static/layui/images/face/63.gif
  94. BIN=BIN
      src/main/resources/static/layui/images/face/64.gif
  95. BIN=BIN
      src/main/resources/static/layui/images/face/65.gif
  96. BIN=BIN
      src/main/resources/static/layui/images/face/66.gif
  97. BIN=BIN
      src/main/resources/static/layui/images/face/67.gif
  98. BIN=BIN
      src/main/resources/static/layui/images/face/68.gif
  99. BIN=BIN
      src/main/resources/static/layui/images/face/69.gif
  100. 0 0
      src/main/resources/static/layui/images/face/7.gif

+ 37 - 0
.gitignore

@@ -0,0 +1,37 @@
+# IntelliJ project files
+.idea
+*.iml
+out
+gen
+### Java template
+# Compiled class file
+*.class
+
+# Log file
+*.log
+/log/
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.nar
+*.ear
+*.zip
+*.tar.gz
+*.rar
+
+# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
+hs_err_pid*
+
+mvnw
+mvnw.cmd
+
+# tmp file
+.tmp
+/tmp/

+ 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();
+    }
+
+}

+ 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

+ 25 - 0
HELP.md

@@ -0,0 +1,25 @@
+# Getting Started
+
+### Reference Documentation
+For further reference, please consider the following sections:
+
+* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
+* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.3.3.RELEASE/maven-plugin/reference/html/)
+* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.3.3.RELEASE/maven-plugin/reference/html/#build-image)
+* [Spring Web](https://docs.spring.io/spring-boot/docs/2.3.3.RELEASE/reference/htmlsingle/#boot-features-developing-web-applications)
+* [MyBatis Framework](https://mybatis.org/spring-boot-starter/mybatis-spring-boot-autoconfigure/)
+* [JDBC API](https://docs.spring.io/spring-boot/docs/2.3.3.RELEASE/reference/htmlsingle/#boot-features-sql)
+* [Thymeleaf](https://docs.spring.io/spring-boot/docs/2.3.3.RELEASE/reference/htmlsingle/#boot-features-spring-mvc-template-engines)
+
+### Guides
+The following guides illustrate how to use some features concretely:
+
+* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
+* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
+* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/)
+* [MyBatis Quick Start](https://github.com/mybatis/spring-boot-starter/wiki/Quick-Start)
+* [Accessing Relational Data using JDBC with Spring](https://spring.io/guides/gs/relational-data-access/)
+* [Managing Transactions](https://spring.io/guides/gs/managing-transactions/)
+* [Accessing data with MySQL](https://spring.io/guides/gs/accessing-data-mysql/)
+* [Handling Form Submission](https://spring.io/guides/gs/handling-form-submission/)
+

+ 310 - 0
pom.xml

@@ -0,0 +1,310 @@
+<?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.mt</groupId>
+    <artifactId>mt</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>mt</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>
+
+        <!--pdf-->
+        <dependency>
+            <groupId>com.itextpdf</groupId>
+            <artifactId>itext-asian</artifactId>
+            <version>5.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.pdfbox</groupId>
+            <artifactId>pdfbox</artifactId>
+            <version>2.0.16</version>
+        </dependency>
+        <dependency>
+            <groupId>com.itextpdf</groupId>
+            <artifactId>itextpdf</artifactId>
+            <version>5.5.13</version>
+        </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>
+
+<!--        &lt;!&ndash;mybatis-plus数据库连接&ndash;&gt;-->
+<!--        <dependency>-->
+<!--            <groupId>com.baomidou</groupId>-->
+<!--            <artifactId>mybatis-plus-boot-starter</artifactId>-->
+<!--            <version>3.2.0</version>-->
+<!--        </dependency>-->
+<!--        &lt;!&ndash;引入mysql:数据库驱动&ndash;&gt;-->
+<!--        <dependency>-->
+<!--            <groupId>mysql</groupId>-->
+<!--            <artifactId>mysql-connector-java</artifactId>-->
+<!--            <scope>runtime</scope>-->
+<!--        </dependency>-->
+<!--        &lt;!&ndash;引入druid数据源&ndash;&gt;-->
+<!--        &lt;!&ndash; https://mvnrepository.com/artifact/com.alibaba/druid &ndash;&gt;-->
+<!--        <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>-->
+
+<!--        &lt;!&ndash;引入jpa模块&ndash;&gt;-->
+<!--        <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>

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

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

+ 42 - 0
src/main/java/com/muzhi/mt/controller/AccessTokenController.java

@@ -0,0 +1,42 @@
+package com.muzhi.mt.controller;
+
+import com.muzhi.mt.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.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(牧之测试架构4)
+    @ApiOperation(value = "获取钉钉中的access_token")
+    @GetMapping("getMuZhiAccessToken")
+    public String getMuZhiAccessToken(){
+
+        String muZhiAccessToken = dingAccessTokenService.getMuZhiAccessToken();
+        return muZhiAccessToken;
+    }
+
+    //获取钉钉中的access_token(茅台架构)
+    @ApiOperation(value = "获取钉钉中的access_token")
+    @GetMapping("getMaoTaiAccessToken")
+    public String getMaoTaiAccessToken(){
+
+        String maoTaiAccessToken = dingAccessTokenService.getMaoTaiAccessToken();
+        return maoTaiAccessToken;
+    }
+}

+ 32 - 0
src/main/java/com/muzhi/mt/controller/MiandengController.java

@@ -0,0 +1,32 @@
+package com.muzhi.mt.controller;
+
+import com.muzhi.mt.service.MiandengService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+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 = "通过免登码获取用户信息(牧之测试架构4)")
+@RestController
+@RequestMapping("/miandeng")
+public class MiandengController {
+
+    @Autowired
+    private MiandengService miandengService;
+
+    //获取钉钉中的access_token(牧之测试架构4)
+    @ApiOperation(value = "获取钉钉中的access_token")
+    @PostMapping("getuserinfo")
+    public String getuserinfo(String code){
+
+        String getuserinfo = miandengService.getuserinfo(code);
+        return getuserinfo;
+    }
+}

+ 42 - 0
src/main/java/com/muzhi/mt/controller/OAhetongController.java

@@ -0,0 +1,42 @@
+package com.muzhi.mt.controller;
+
+import com.muzhi.mt.service.MiandengService;
+import com.muzhi.mt.service.OAhetongService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+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 = "合同审批单附件增加水印")
+@RestController
+@RequestMapping("/OAhetong")
+public class OAhetongController {
+
+    @Autowired
+    private OAhetongService oAhetongService;
+
+    //正式合同审批单(茅台架构)
+    @ApiOperation(value = "正式合同审批单附件增加水印")
+    @PostMapping("addOAhetong")
+    public String OAhetong(String processid){
+
+        String s = oAhetongService.OAhetong(processid);
+        return s;
+    }
+
+    //正式合同审批单(茅台架构)
+    @ApiOperation(value = "测试合同审批单增加水印")
+    @PostMapping("addOAhetongTEST")
+    public String OAhetongTEST(String processid){
+
+        String s = oAhetongService.OAhetongTEST(processid);
+        return s;
+    }
+}

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

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

+ 11 - 0
src/main/java/com/muzhi/mt/service/MiandengService.java

@@ -0,0 +1,11 @@
+package com.muzhi.mt.service;
+
+/**
+ * @Author ZhangKan
+ * @Data 15:34
+ */
+public interface MiandengService {
+
+    //通过免登码获取用户信息(牧之测试架构4)
+    String getuserinfo(String code);
+}

+ 14 - 0
src/main/java/com/muzhi/mt/service/OAhetongService.java

@@ -0,0 +1,14 @@
+package com.muzhi.mt.service;
+
+/**
+ * @Author ZhangKan
+ * @Data 15:34
+ */
+public interface OAhetongService {
+
+    //正式合同审批单(茅台架构)
+    String OAhetong(String processid);
+
+    //测试合同审批单(茅台架构)
+    String OAhetongTEST(String processid);
+}

+ 72 - 0
src/main/java/com/muzhi/mt/service/impl/DingAccessTokenServiceImpl.java

@@ -0,0 +1,72 @@
+package com.muzhi.mt.service.impl;
+
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.request.OapiGettokenRequest;
+import com.dingtalk.api.response.OapiGettokenResponse;
+import com.muzhi.mt.service.DingAccessTokenService;
+import com.taobao.api.ApiException;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * @Author ZhangKan
+ * @Data 15:39
+ */
+
+@Service
+public class DingAccessTokenServiceImpl implements DingAccessTokenService{
+
+    //牧之测试架构4
+    //APPKEY
+    private static String APPKEY1 = "ding2katvzyqvlkunqtb";
+    //APPSECRET
+    private static String APPSECRET1 = "vSctQrVm5cGos0X6K86NN0A8Vv6-SmN4W_VRXjsqPqZRhZtbG6xfPATOZhPi3VBE";
+
+    public static String accessToken1 = null;
+
+
+    //茅台架构
+    //APPKEY
+    private static String APPKEY2 = "dingiisvte8wte8g6svq";
+    //APPSECRET
+    private static String APPSECRET2 = "STpfocciVDAjEI-i-ibvOd11qM3iIPYA0bplYfqgNWwmMntOxTHJ8dZMCHXVOaEN";
+
+    public static String accessToken2 = null;
+
+
+    //获取access_token的方法(牧之测试架构4)
+    @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("牧之测试架构4AccessToken:" + accessToken1);
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+        return accessToken1;
+    }
+
+    //获取access_token的方法(茅台架构)
+    @Override
+    public String getMaoTaiAccessToken() {
+        DefaultDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken");
+        OapiGettokenRequest request = new OapiGettokenRequest();
+        request.setAppkey(APPKEY2);
+        request.setAppsecret(APPSECRET2);
+        request.setHttpMethod("GET");
+        try {
+            OapiGettokenResponse response = client.execute(request);
+            accessToken2 = response.getAccessToken();
+            System.out.println("茅台架构AccessToken:" + accessToken2);
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+        return accessToken2;
+    }
+}

+ 45 - 0
src/main/java/com/muzhi/mt/service/impl/MiandengServiceImpl.java

@@ -0,0 +1,45 @@
+package com.muzhi.mt.service.impl;
+
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiV2UserGetuserinfoRequest;
+import com.dingtalk.api.response.OapiV2UserGetuserinfoResponse;
+import com.muzhi.mt.service.DingAccessTokenService;
+import com.muzhi.mt.service.MiandengService;
+import com.taobao.api.ApiException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * @Author ZhangKan
+ * @Data 15:39
+ */
+
+@Service
+public class MiandengServiceImpl implements MiandengService {
+
+
+    @Autowired
+    private DingAccessTokenService dingAccessTokenService;
+
+    public static String result = null;
+
+    //通过免登码获取用户信息(牧之测试架构4)
+    @Override
+    public String getuserinfo(String code) {
+
+        try {
+            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/user/getuserinfo");
+            OapiV2UserGetuserinfoRequest req = new OapiV2UserGetuserinfoRequest();
+            req.setCode(code);
+            OapiV2UserGetuserinfoResponse rsp = client.execute(req, dingAccessTokenService.getMuZhiAccessToken());
+            result = rsp.getBody();
+            System.out.println(rsp.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        return result;
+    }
+}

+ 823 - 0
src/main/java/com/muzhi/mt/service/impl/OAhetongServiceImpl.java

@@ -0,0 +1,823 @@
+package com.muzhi.mt.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.itextpdf.text.DocumentException;
+import com.itextpdf.text.Element;
+import com.itextpdf.text.pdf.*;
+import com.muzhi.mt.service.DingAccessTokenService;
+import com.muzhi.mt.service.MiandengService;
+import com.muzhi.mt.service.OAhetongService;
+import com.taobao.api.ApiException;
+import com.taobao.api.FileItem;
+import com.taobao.api.internal.util.WebUtils;
+import org.springframework.beans.factory.NoUniqueBeanDefinitionException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.swing.*;
+import java.awt.*;
+import java.io.*;
+import java.lang.reflect.Field;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+
+
+/**
+ * @Author ZhangKan
+ * @Data 15:39
+ */
+
+@Service
+public class OAhetongServiceImpl implements OAhetongService {
+
+
+    @Autowired
+    private DingAccessTokenService dingAccessTokenService;
+
+    //审批详情
+    public static String shenpiXQ = null;
+
+    //合同名称
+    public static String hetongMc = null;
+    //合同编号
+    public static String hetongId= null;
+
+    //审批附件id
+    public static String fileId = null;
+    //审批附件名称
+    public static String fileName = null;
+    //审批附件长度
+    public static Long fileSize = 0L;
+    //审批附件类型
+    public static String fileType = null;
+    //审批钉盘空间id
+    public static String spaceId = null;
+
+    //审批单提交人员id
+    public static String originator_userid = null;
+    //审批单提交人员部门id
+    public static Long originator_dept_id = 0L;
+
+    //审批附件
+    public static String shenpiFJ = null;
+
+    // 水印透明度
+    private static float alpha = 0.5f;
+    // 水印之间的间隔
+    private static final int XMOVE = 200;
+    // 水印之间的间隔
+    private static final int YMOVE = 200;
+
+
+    public static void setPdfWatermark(String inputPath, String outPath, String markStr) {
+        File file = new File(outPath);
+        if (!file.exists()) {
+            try {
+                file.createNewFile();
+            } catch (IOException e) {
+//                log.error("setPdfWatermark fail: 创建输出文件IO异常", e);
+//                throw new MyException(ResultCode.FAILURE, "setPdfWatermark fail: 创建输出文件IO异常");
+                e.printStackTrace();
+            }
+        }
+        BufferedOutputStream bufferOut = null;
+        try {
+            bufferOut = new BufferedOutputStream(new FileOutputStream(file));
+        } catch (FileNotFoundException e) {
+//            log.error("setPdfWatermark fail: 源文件不存在", e);
+//            throw new MyException(ResultCode.FAILURE, "setPdfWatermark fail: 源文件不存在");
+            e.printStackTrace();
+        }
+        PdfStamper stamper = null;
+        int total = 0;
+        PdfContentByte content;
+        Rectangle pageSizeWithRotation = null;
+        BaseFont base = null;
+        PdfReader reader = null;
+        try {
+            reader = new PdfReader(inputPath);
+            //解决PdfReader not opened with owner password
+            Field f = PdfReader.class.getDeclaredField("ownerPasswordUsed");
+            f.setAccessible(true);
+            f.set(reader, Boolean.TRUE);
+            stamper = new PdfStamper(reader, bufferOut);
+            total = reader.getNumberOfPages() + 1;
+            base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
+        } catch (IOException e) {
+//            log.error("setPdfWatermark fail:", e);
+//            throw new MyException(ResultCode.FAILURE, "setPdfWatermark fail");
+            e.printStackTrace();
+        } catch (DocumentException e) {
+//            log.error("setPdfWatermark fail:", e);
+//            throw new MyException(ResultCode.FAILURE, "setPdfWatermark fail");
+            e.printStackTrace();
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+        } catch (NoSuchFieldException e) {
+            e.printStackTrace();
+        }
+        // 获取水印文字的高度和宽度
+        int textH = 0, textW = 0;
+        JLabel label = new JLabel();
+        label.setText(markStr);
+        FontMetrics metrics = label.getFontMetrics(label.getFont());
+        textH = metrics.getHeight();
+        textW = metrics.stringWidth(label.getText());
+        PdfGState gs = new PdfGState();
+        for (int i = 1; i < total; i++) {
+            //在内容上方加水印
+            content = stamper.getOverContent(i);
+            gs.setFillOpacity(0.5f);
+            content.saveState();
+            content.setGState(gs);
+            content.beginText();
+            //设置水印文字颜色
+            content.setRGBColorFill(220, 220, 220);
+            content.setFontAndSize(base, 20);
+            // 获取每一页的高度、宽度
+            com.itextpdf.text.Rectangle pageSizeWithRotation1 = reader.getPageSizeWithRotation(i);
+            float pageHeight = pageSizeWithRotation1.getHeight();
+            float pageWidth = pageSizeWithRotation1.getWidth();
+
+            // 根据纸张大小多次添加, 水印文字成30度角倾斜
+            for (int height = -5 + textH; height < pageHeight; height = height + YMOVE) {
+                for (int width = -5 + textW; width < pageWidth + textW; width = width + XMOVE) {
+                    content.showTextAligned(Element.ALIGN_LEFT, markStr, width - textW, height - textH, 30);
+                }
+            }
+            content.endText();
+        }
+        try {
+            stamper.close();
+            bufferOut.flush();
+            bufferOut.close();
+            reader.close();
+        } catch (IOException e) {
+//            log.error("setPdfWatermark fail:", e);
+//            throw new MyException(ResultCode.FAILURE, "setPdfWatermark fail");
+            e.printStackTrace();
+        } catch (DocumentException e) {
+//            log.error("setPdfWatermark fail:", e);
+//            throw new MyException(ResultCode.FAILURE, "setPdfWatermark fail");
+            e.printStackTrace();
+        }
+    }
+
+    @SuppressWarnings("finally")
+    public static File downloadFile(String urlPath, String downloadDir) {
+        File file = null;
+        try {
+
+            URL url = new URL(urlPath);
+
+            URLConnection urlConnection = url.openConnection();
+
+            HttpURLConnection httpURLConnection = (HttpURLConnection) urlConnection;// http的连接类
+
+            //String contentType = httpURLConnection.getContentType();//请求类型,可用来过滤请求,
+
+            httpURLConnection.setConnectTimeout(1000*5);//设置超时
+
+            httpURLConnection.setRequestMethod("GET");//设置请求方式,默认是GET
+
+            httpURLConnection.setRequestProperty("Charset", "UTF-8");// 设置字符编码
+
+
+            httpURLConnection.connect();// 打开连接
+
+            BufferedInputStream bin = new BufferedInputStream(httpURLConnection.getInputStream());
+
+            //TODO 修改成动态文件名称:当前审批单的文件名称
+//            String fileName = "ceshi.pdf";// 指定文件名称
+
+            String path = downloadDir + File.separatorChar + fileName;// 指定存放位置,此处使用的是全局变量的文件名称
+            file = new File(path);
+            // 校验文件夹目录是否存在,不存在就创建一个目录
+            if (!file.getParentFile().exists()) {
+                file.getParentFile().mkdirs();
+            }
+
+            OutputStream out = new FileOutputStream(file);
+            int size = 0;
+
+            byte[] b = new byte[2048];
+            //把输入流的文件读取到字节数据b中,然后输出到指定目录的文件
+            while ((size = bin.read(b)) != -1) {
+                out.write(b, 0, size);
+            }
+            // 关闭资源
+            bin.close();
+            out.close();
+            System.out.println("文件下载成功!");
+        } catch (MalformedURLException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+            System.out.println("文件下载失败!");
+        } finally {
+            return file;
+        }
+
+    }
+
+    //下载、上传合同附件,并创建新的审批单传入添加水印的合同附件【***正式合同审批单***】
+    @Override
+    public String OAhetong(String processid){
+        System.out.println("通过连接器获取的审批单实例id:" + processid);
+
+        //***审批详情***
+        try {
+            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/get");
+            OapiProcessinstanceGetRequest req = new OapiProcessinstanceGetRequest();
+
+            //TODO 审批单实例id(通过OA审批连接器获取到)
+            req.setProcessInstanceId(processid);
+//            req.setProcessInstanceId("u7qh0maSSkSY-8_YhEPNVg05101645173772");
+
+            OapiProcessinstanceGetResponse rsp = client.execute(req, dingAccessTokenService.getMaoTaiAccessToken());
+            shenpiXQ = rsp.getBody();
+            System.out.println(rsp.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        JSONObject jsonObject = JSON.parseObject(shenpiXQ);
+        JSONObject processInstance = jsonObject.getJSONObject("process_instance");
+        JSONArray form_component_values = processInstance.getJSONArray("form_component_values");
+
+
+        JSONObject ext_value = form_component_values.getJSONObject(0).getJSONObject("ext_value");
+
+        JSONArray list = ext_value.getJSONArray("list");
+        hetongId = list.getJSONObject(0).getJSONArray("rowValue").getJSONObject(0).getString("value");
+        System.out.println("关联审批合同编号:" + hetongId);
+
+        //***严格按照OA审批模板中的顺序来填写数组下标,获取附件控件的value值***
+        String value = form_component_values.getJSONObject(9).getString("value");
+        System.out.println("审批实例详情文件附件控件的数据:" + value);
+
+        hetongMc = form_component_values.getJSONObject(1).getString("value");
+        System.out.println("审批实例详情合同名称控件返回值:" + hetongMc);
+//        hetongId = form_component_values.getJSONObject(10).getString("value");
+//        System.out.println("审批实例详情第一个控件合同编号返回值:" + hetongId);
+
+        originator_userid = processInstance.getString("originator_userid");
+        System.out.println("提交人id:" + originator_userid);
+
+        originator_dept_id = processInstance.getLong("originator_dept_id");
+        System.out.println("提交人部门id:" + originator_dept_id);
+
+        JSONArray jsonArray = JSON.parseArray(value);
+
+//        循环判断审批单附件控件中有几个合同pdf附件,依次拿到附件相关信息
+        for (int i = 0; i <jsonArray.size() ; i++) {
+            fileId = jsonArray.getJSONObject(i).getString("fileId");
+            System.out.println("审批钉盘文件id:" + fileId);
+
+            fileName = jsonArray.getJSONObject(i).getString("fileName");
+            System.out.println("审批钉盘文件名称:" + fileName);
+
+            fileSize = jsonArray.getJSONObject(i).getLong("fileSize");
+            System.out.println("审批钉盘文件长度:" + fileSize);
+
+            fileType = jsonArray.getJSONObject(i).getString("fileType");
+            System.out.println("审批钉盘文件类型:" + fileType);
+
+            spaceId = jsonArray.getJSONObject(i).getString("spaceId");
+            System.out.println("审批钉盘空间id:" + spaceId);
+
+
+            //***下载审批附件***
+            //调用钉钉下载审批附件的接口来下载审批单中的附件(合同pdf文件)
+            try {
+                DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/file/url/get");
+                OapiProcessinstanceFileUrlGetRequest req = new OapiProcessinstanceFileUrlGetRequest();
+                OapiProcessinstanceFileUrlGetRequest.GrantCspaceRequest obj1 = new OapiProcessinstanceFileUrlGetRequest.GrantCspaceRequest();
+
+                //TODO 审批单实例id(通过OA审批连接器获取到)
+                obj1.setProcessInstanceId(processid);
+
+                //TODO 审批实例详情接口中解析出的文件id
+                obj1.setFileId(fileId);
+
+                req.setRequest(obj1);
+                OapiProcessinstanceFileUrlGetResponse rsp = client.execute(req, dingAccessTokenService.getMaoTaiAccessToken());
+                shenpiFJ = rsp.getBody();
+                System.out.println(rsp.getBody());
+            } catch (ApiException e) {
+                e.printStackTrace();
+            }
+
+            JSONObject jsonObject1 = JSON.parseObject(shenpiFJ);
+            JSONObject result1 = jsonObject1.getJSONObject("result");
+            String download_uri = result1.getString("download_uri");
+            System.out.println("下载审批钉盘文件返回结果解析出来的url下载地址:" + download_uri);
+
+            //获取当前日期,用于创建文件保存目录中增加当前日期的文件夹作区分
+            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式 yyyy-MM-dd HH:mm:ss
+            String format = df.format(new Date());
+            System.out.println(format);// new Date()为获取当前系统时间
+
+//        downloadFile(download_uri,"D:\\pdf\\" + format);//windows端下载文件保存路径
+            downloadFile(download_uri,format);//Linux端下载文件保存路径
+
+
+
+            //***合同添加水印方法***
+            //【Linux下面的路径】
+            String strFile = format + File.separator + fileName;
+            String strFile1 = format + File.separator + "AAA-" + fileName;
+
+            //【windows下面的路径】
+            //原始文件路径
+            String a = "D:\\pdf\\" + format + "\\" + fileName;
+            //添加水印后保存路径
+            String b = "D:\\pdf\\" + format + "\\ABC-" + fileName;
+            //生成合同编号
+            String c = hetongId + "茅台(上海)融资租赁有限公司";
+
+            setPdfWatermark(strFile, strFile1, c);
+
+
+            //***单步文件上传***
+            String DB_id = null;
+
+            try {
+                OapiFileUploadSingleRequest request = new OapiFileUploadSingleRequest();
+                //文件大小
+                request.setFileSize(fileSize);
+                //应用id(自建应用id即可)
+                request.setAgentId("1418526292");
+                DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/file/upload/single?" + WebUtils.buildQuery(request.getTextParams(), "utf-8"));
+                // 必须重新new一个请求
+                request = new OapiFileUploadSingleRequest();
+
+                //待上传文件本地路径
+                request.setFile(new FileItem(strFile1));
+
+                OapiFileUploadSingleResponse response = client.execute(request, dingAccessTokenService.getMaoTaiAccessToken());
+                DB_id = response.getBody();
+                System.out.println(response.getBody());
+            }catch (ApiException e){
+                e.printStackTrace();
+            }catch (IOException e){
+                e.printStackTrace();
+            }
+
+            JSONObject jsonObject_DB = JSON.parseObject(DB_id);
+            String media_id = jsonObject_DB.getString("media_id");
+            System.out.println("单步上传文件返回的media_id:" + media_id);
+
+
+
+            //发送钉盘文件给指定用户
+            try {
+                OapiCspaceAddToSingleChatRequest request = new OapiCspaceAddToSingleChatRequest();
+                request.setAgentId("1418526292");
+                request.setUserid(originator_userid);
+                request.setMediaId(media_id);
+                request.setFileName(fileName);
+                DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/cspace/add_to_single_chat?"+WebUtils.buildQuery(request.getTextParams(),"utf-8"));
+                OapiCspaceAddToSingleChatResponse response = client.execute(request, dingAccessTokenService.getMaoTaiAccessToken());
+                System.out.println(response.getBody());
+            }catch (ApiException e){
+                e.printStackTrace();
+            }catch (IOException e){
+                e.printStackTrace();
+            }
+        }
+
+
+
+
+
+
+
+
+
+//        //***获取审批钉盘空间信息(企业审批附件钉盘空间,需通过获取审批钉盘空间信息接口进行【授权】)***
+//        String space_XX = null;
+//
+//        try {
+//            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/cspace/info");
+//            OapiProcessinstanceCspaceInfoRequest req = new OapiProcessinstanceCspaceInfoRequest();
+//            //用户id
+//            req.setUserId(originator_userid);
+//            //企业应用标识,此处可以不传
+////            req.setAgentId(1418526292L);
+//            OapiProcessinstanceCspaceInfoResponse rsp = client.execute(req, dingAccessTokenService.getMaoTaiAccessToken());
+//            space_XX = rsp.getBody();
+//            System.out.println(rsp.getBody());
+//        } catch (ApiException e) {
+//            e.printStackTrace();
+//        }
+//
+//        JSONObject jsonObject_space = JSON.parseObject(space_XX);
+//        JSONObject result_space = jsonObject_space.getJSONObject("result");
+//        String space_id = result_space.getString("space_id");
+//        System.out.println("审批钉盘空间id:" + space_id);
+
+
+
+//        //***保存文件到自定义或审批钉盘空间***2
+//        String DP = null;
+//
+//        try {
+//            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/cspace/add");
+//            OapiCspaceAddRequest req = new OapiCspaceAddRequest();
+//
+//            //应用id(自建应用id即可)
+//            req.setAgentId("1418526292");
+//
+//            //TODO H5应用免登接口返回的免登授权码code(获取的免登授权码有效期5分钟,且只能使用一次)
+//            req.setCode("2820fff89d3b350ba593016db52cd2a1");
+//
+//            //单步文件上传接口返回的media_id
+//            req.setMediaId(media_id);
+//            //space_id是审批附件钉盘,folder_id参数传0
+//            req.setFolderId("0");
+//            //审批钉盘id(一个架构中,审批钉盘id是唯一的)
+//            req.setSpaceId("257306648");
+//            //上传文件名称
+//            req.setName(fileName);
+//            //上传至钉盘审批空间是否覆盖同名文件(true:覆盖;false:不覆盖)
+//            req.setOverwrite(true);
+//
+//            req.setHttpMethod("GET");
+//            OapiCspaceAddResponse rsp = client.execute(req, dingAccessTokenService.getMaoTaiAccessToken());
+//            DP = rsp.getBody();
+//            System.out.println(rsp.getBody());
+//        } catch (ApiException e) {
+//            e.printStackTrace();
+//        }
+//
+//        JSONObject jsonObject_DP = JSON.parseObject(DP);
+//        JSONObject dentry = jsonObject_DP.getJSONObject("dentry");
+//        String id = dentry.getString("id");
+//        System.out.println("保存文件至审批钉盘后返回的钉盘审批文件id:" + id);
+//
+//
+//        //***发起审批实例(最终创建的OA审批单)***
+//        try {
+//            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/create");
+//            OapiProcessinstanceCreateRequest req = new OapiProcessinstanceCreateRequest();
+//
+////            //TODO 审批模板编号(牧之测试架构4)
+////            req.setProcessCode("PROC-E148EDE8-EF20-4573-BA7E-22F26BC53A33");
+////            //TODO 发起人编号
+////            req.setOriginatorUserId("manager5889");
+////            //TODO 发起人所在部门,根部门填写-1
+////            req.setDeptId(-1L);
+//
+//            //TODO 审批模板编号(茅台架构)
+//            req.setProcessCode("PROC-F65266C2-B28E-4553-91AB-E668F0AA1BDB");
+//            //TODO 发起人编号
+//            req.setOriginatorUserId(originator_userid);
+//            //TODO 发起人所在部门,根部门填写-1
+//            req.setDeptId(originator_dept_id);
+//
+//            ArrayList<OapiProcessinstanceCreateRequest.FormComponentValueVo> formComponentValueVoArrayList = new ArrayList<>();
+//
+//            OapiProcessinstanceCreateRequest.FormComponentValueVo formComponentValueVo = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
+//            OapiProcessinstanceCreateRequest.FormComponentValueVo formComponentValueVo1 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
+//            OapiProcessinstanceCreateRequest.FormComponentValueVo formComponentValueVo10 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
+//
+//            formComponentValueVo.setName("合同名称");
+//            formComponentValueVo.setValue(hetongMc);
+//
+//            formComponentValueVo1.setName("合同编号");
+//            formComponentValueVo1.setValue(hetongId);
+//
+//            JSONObject jsonObject_OA = new JSONObject();
+//            //TODO 批钉盘空间id(每个架构只有一个唯一的钉盘空间id)
+//            jsonObject_OA.put("spaceId", "257306648");
+//            //上传文件名称,带后缀
+//            jsonObject_OA.put("fileName", fileName);
+//            //文件大小,可不传,但是审批单进入后看不到文件大小
+//            jsonObject_OA.put("fileSize", fileSize);
+//            //上传文件格式
+//            jsonObject_OA.put("fileType", fileType);
+//            //TODO 审批钉盘文件id
+//            jsonObject_OA.put("fileId", id);
+//            Object o[] = new Object[]{jsonObject_OA};
+//            String s = JSON.toJSONString(o);
+//            formComponentValueVo10.setName("附件");
+//            formComponentValueVo10.setValue(s);
+//
+//            formComponentValueVoArrayList.add(formComponentValueVo);
+//            formComponentValueVoArrayList.add(formComponentValueVo1);
+//            formComponentValueVoArrayList.add(formComponentValueVo10);
+//
+//            req.setFormComponentValues(formComponentValueVoArrayList);
+//            OapiProcessinstanceCreateResponse rsp = client.execute(req, dingAccessTokenService.getMaoTaiAccessToken());
+//            System.out.println(rsp.getBody());
+//        } catch (ApiException e) {
+//            e.printStackTrace();
+//        }
+//
+//        return "创建审批单成功!";
+
+        return "附件已发送给发起人,请查收!";
+    }
+
+    //下载、上传合同附件,并创建新的审批单传入添加水印的合同附件【***测试合同审批单***】
+    @Override
+    public String OAhetongTEST(String processid){
+        System.out.println("通过连接器获取的审批单实例id:" + processid);
+
+        //***审批详情***
+        try {
+            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/get");
+            OapiProcessinstanceGetRequest req = new OapiProcessinstanceGetRequest();
+
+            //TODO 审批单实例id(通过OA审批连接器获取到)
+            req.setProcessInstanceId(processid);
+
+            OapiProcessinstanceGetResponse rsp = client.execute(req, dingAccessTokenService.getMaoTaiAccessToken());
+            shenpiXQ = rsp.getBody();
+            System.out.println(rsp.getBody());
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+
+        JSONObject jsonObject = JSON.parseObject(shenpiXQ);
+        JSONObject processInstance = jsonObject.getJSONObject("process_instance");
+        JSONArray form_component_values = processInstance.getJSONArray("form_component_values");
+
+        //***严格按照OA审批模板中的顺序来填写数组下标,获取附件控件的value值***
+        String value = form_component_values.getJSONObject(2).getString("value");
+        System.out.println("审批实例详情第三个控件文件的数据:" + value);
+
+        hetongMc = form_component_values.getJSONObject(0).getString("value");
+        System.out.println("审批实例详情第一个控件合同名称返回值:" + hetongMc);
+        hetongId = form_component_values.getJSONObject(1).getString("value");
+        System.out.println("审批实例详情第一个控件合同编号返回值:" + hetongId);
+
+        originator_userid = processInstance.getString("originator_userid");
+        System.out.println("提交人id:" + originator_userid);
+
+        originator_dept_id = processInstance.getLong("originator_dept_id");
+        System.out.println("提交人部门id:" + originator_dept_id);
+
+        JSONArray jsonArray = JSON.parseArray(value);
+
+        //循环判断审批单附件控件中有几个合同pdf附件,依次拿到附件相关信息
+        for (int i = 0; i <jsonArray.size() ; i++) {
+            fileId = jsonArray.getJSONObject(i).getString("fileId");
+            System.out.println("审批钉盘文件id:" + fileId);
+
+            fileName = jsonArray.getJSONObject(i).getString("fileName");
+            System.out.println("审批钉盘文件名称:" + fileName);
+
+            fileSize = jsonArray.getJSONObject(i).getLong("fileSize");
+            System.out.println("审批钉盘文件长度:" + fileSize);
+
+            fileType = jsonArray.getJSONObject(i).getString("fileType");
+            System.out.println("审批钉盘文件类型:" + fileType);
+
+            spaceId = jsonArray.getJSONObject(i).getString("spaceId");
+            System.out.println("审批钉盘空间id:" + spaceId);
+
+
+            //***下载审批附件***
+            //调用钉钉下载审批附件的接口来下载审批单中的附件(合同pdf文件)
+            try {
+                DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/file/url/get");
+                OapiProcessinstanceFileUrlGetRequest req = new OapiProcessinstanceFileUrlGetRequest();
+                OapiProcessinstanceFileUrlGetRequest.GrantCspaceRequest obj1 = new OapiProcessinstanceFileUrlGetRequest.GrantCspaceRequest();
+
+                //TODO 审批单实例id(通过OA审批连接器获取到)
+                obj1.setProcessInstanceId(processid);
+
+                //TODO 审批实例详情接口中解析出的文件id
+                obj1.setFileId(fileId);
+
+                req.setRequest(obj1);
+                OapiProcessinstanceFileUrlGetResponse rsp = client.execute(req, dingAccessTokenService.getMaoTaiAccessToken());
+                shenpiFJ = rsp.getBody();
+                System.out.println(rsp.getBody());
+            } catch (ApiException e) {
+                e.printStackTrace();
+            }
+
+            JSONObject jsonObject1 = JSON.parseObject(shenpiFJ);
+            JSONObject result1 = jsonObject1.getJSONObject("result");
+            String download_uri = result1.getString("download_uri");
+            System.out.println("下载审批钉盘文件返回结果解析出来的url下载地址:" + download_uri);
+
+            //获取当前日期,用于创建文件保存目录中增加当前日期的文件夹作区分
+            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");//设置日期格式 yyyy-MM-dd HH:mm:ss
+            String format = df.format(new Date());
+            System.out.println(format);// new Date()为获取当前系统时间
+
+            downloadFile(download_uri,"D:\\pdf\\" + format);
+
+
+
+            //***合同添加水印方法***
+            //原始文件路径
+            String a = "D:\\pdf\\" + format + "\\" + fileName;
+            //添加水印后保存路径
+            String b = "D:\\pdf\\" + format + "\\AAA-" + fileName;
+            //生成合同编号
+            String c = hetongId;
+
+            setPdfWatermark(a, b, c);
+
+
+            //***单步文件上传***
+            String DB_id = null;
+
+            try {
+                OapiFileUploadSingleRequest request = new OapiFileUploadSingleRequest();
+                //文件大小
+                request.setFileSize(fileSize);
+                //应用id(自建应用id即可)
+                request.setAgentId("1418526292");
+                DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/file/upload/single?" + WebUtils.buildQuery(request.getTextParams(), "utf-8"));
+                // 必须重新new一个请求
+                request = new OapiFileUploadSingleRequest();
+
+                //待上传文件本地路径
+                request.setFile(new FileItem(b));
+
+                OapiFileUploadSingleResponse response = client.execute(request, dingAccessTokenService.getMaoTaiAccessToken());
+                DB_id = response.getBody();
+                System.out.println(response.getBody());
+            }catch (ApiException e){
+                e.printStackTrace();
+            }catch (IOException e){
+                e.printStackTrace();
+            }
+
+            JSONObject jsonObject_DB = JSON.parseObject(DB_id);
+            String media_id = jsonObject_DB.getString("media_id");
+            System.out.println("单步上传文件返回的media_id:" + media_id);
+
+
+
+            //发送钉盘文件给指定用户
+            try {
+                OapiCspaceAddToSingleChatRequest request = new OapiCspaceAddToSingleChatRequest();
+                request.setAgentId("1418526292");
+                request.setUserid(originator_userid);
+                request.setMediaId(media_id);
+                request.setFileName(fileName);
+                DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/cspace/add_to_single_chat?"+WebUtils.buildQuery(request.getTextParams(),"utf-8"));
+                OapiCspaceAddToSingleChatResponse response = client.execute(request, dingAccessTokenService.getMaoTaiAccessToken());
+                System.out.println(response.getBody());
+            }catch (ApiException e){
+                e.printStackTrace();
+            }catch (IOException e){
+                e.printStackTrace();
+            }
+        }
+
+
+
+
+
+
+
+
+
+
+
+//        //***获取审批钉盘空间信息(企业审批附件钉盘空间,需通过获取审批钉盘空间信息接口进行【授权】)***
+//        String space_XX = null;
+//
+//        try {
+//            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/cspace/info");
+//            OapiProcessinstanceCspaceInfoRequest req = new OapiProcessinstanceCspaceInfoRequest();
+//            //用户id
+//            req.setUserId(originator_userid);
+//            //企业应用标识,此处可以不传
+////            req.setAgentId(1418526292L);
+//            OapiProcessinstanceCspaceInfoResponse rsp = client.execute(req, dingAccessTokenService.getMaoTaiAccessToken());
+//            space_XX = rsp.getBody();
+//            System.out.println(rsp.getBody());
+//        } catch (ApiException e) {
+//            e.printStackTrace();
+//        }
+//
+//        JSONObject jsonObject_space = JSON.parseObject(space_XX);
+//        JSONObject result_space = jsonObject_space.getJSONObject("result");
+//        String space_id = result_space.getString("space_id");
+//        System.out.println("审批钉盘空间id:" + space_id);
+
+
+
+//        //***保存文件到自定义或审批钉盘空间***
+//        String DP = null;
+//
+//        try {
+//            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/cspace/add");
+//            OapiCspaceAddRequest req = new OapiCspaceAddRequest();
+//
+//            //应用id(自建应用id即可)
+//            req.setAgentId("1418526292");
+//
+//            //TODO H5应用免登接口返回的免登授权码code(获取的免登授权码有效期5分钟,且只能使用一次)
+//            req.setCode("2820fff89d3b350ba593016db52cd2a1");
+//
+//            //单步文件上传接口返回的media_id
+//            req.setMediaId(media_id);
+//            //space_id是审批附件钉盘,folder_id参数传0
+//            req.setFolderId("0");
+//            //审批钉盘id(一个架构中,审批钉盘id是唯一的)
+//            req.setSpaceId("257306648");
+//            //上传文件名称
+//            req.setName(fileName);
+//            //上传至钉盘审批空间是否覆盖同名文件(true:覆盖;false:不覆盖)
+//            req.setOverwrite(true);
+//
+//            req.setHttpMethod("GET");
+//            OapiCspaceAddResponse rsp = client.execute(req, dingAccessTokenService.getMaoTaiAccessToken());
+//            DP = rsp.getBody();
+//            System.out.println(rsp.getBody());
+//        } catch (ApiException e) {
+//            e.printStackTrace();
+//        }
+//
+//        JSONObject jsonObject_DP = JSON.parseObject(DP);
+//        JSONObject dentry = jsonObject_DP.getJSONObject("dentry");
+//        String id = dentry.getString("id");
+//        System.out.println("保存文件至审批钉盘后返回的钉盘审批文件id:" + id);
+//
+//
+//        //***发起审批实例(最终创建的OA审批单)***
+//        try {
+//            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/processinstance/create");
+//            OapiProcessinstanceCreateRequest req = new OapiProcessinstanceCreateRequest();
+//
+////            //TODO 审批模板编号(牧之测试架构4)
+////            req.setProcessCode("PROC-E148EDE8-EF20-4573-BA7E-22F26BC53A33");
+////            //TODO 发起人编号
+////            req.setOriginatorUserId("manager5889");
+////            //TODO 发起人所在部门,根部门填写-1
+////            req.setDeptId(-1L);
+//
+//            //TODO 审批模板编号(茅台架构)
+//            req.setProcessCode("PROC-F65266C2-B28E-4553-91AB-E668F0AA1BDB");
+//            //TODO 发起人编号
+//            req.setOriginatorUserId(originator_userid);
+//            //TODO 发起人所在部门,根部门填写-1
+//            req.setDeptId(originator_dept_id);
+//
+//            ArrayList<OapiProcessinstanceCreateRequest.FormComponentValueVo> formComponentValueVoArrayList = new ArrayList<>();
+//
+//            OapiProcessinstanceCreateRequest.FormComponentValueVo formComponentValueVo = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
+//            OapiProcessinstanceCreateRequest.FormComponentValueVo formComponentValueVo1 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
+//            OapiProcessinstanceCreateRequest.FormComponentValueVo formComponentValueVo10 = new OapiProcessinstanceCreateRequest.FormComponentValueVo();
+//
+//            formComponentValueVo.setName("合同名称");
+//            formComponentValueVo.setValue(hetongMc);
+//
+//            formComponentValueVo1.setName("合同编号");
+//            formComponentValueVo1.setValue(hetongId);
+//
+//            JSONObject jsonObject_OA = new JSONObject();
+//            //TODO 批钉盘空间id(每个架构只有一个唯一的钉盘空间id)
+//            jsonObject_OA.put("spaceId", "257306648");
+//            //上传文件名称,带后缀
+//            jsonObject_OA.put("fileName", fileName);
+//            //文件大小,可不传,但是审批单进入后看不到文件大小
+//            jsonObject_OA.put("fileSize", fileSize);
+//            //上传文件格式
+//            jsonObject_OA.put("fileType", fileType);
+//            //TODO 审批钉盘文件id
+//            jsonObject_OA.put("fileId", id);
+//            Object o[] = new Object[]{jsonObject_OA};
+//            String s = JSON.toJSONString(o);
+//            formComponentValueVo10.setName("附件");
+//            formComponentValueVo10.setValue(s);
+//
+//            formComponentValueVoArrayList.add(formComponentValueVo);
+//            formComponentValueVoArrayList.add(formComponentValueVo1);
+//            formComponentValueVoArrayList.add(formComponentValueVo10);
+//
+//            req.setFormComponentValues(formComponentValueVoArrayList);
+//            OapiProcessinstanceCreateResponse rsp = client.execute(req, dingAccessTokenService.getMaoTaiAccessToken());
+//            System.out.println(rsp.getBody());
+//        } catch (ApiException e) {
+//            e.printStackTrace();
+//        }
+//
+//        return "创建审批单成功!";
+
+        return "附件已发送给发起人,请查收!";
+    }
+}

+ 51 - 0
src/main/resources/application.properties

@@ -0,0 +1,51 @@
+server.port=8096
+
+server.tomcat.uri-encoding=UTF-8
+
+# \u670D\u52A1\u540D
+spring.application.name=springboot-mt
+# \u73AF\u5883\u8BBE\u7F6E\uFF1Adev\u3001test\u3001prod\uFF08\u5F00\u53D1\u73AF\u5883\u3001\u6D4B\u8BD5\u73AF\u5883\u3001\u751F\u4EA7\u73AF\u5883\uFF09
+spring.profiles.active=dev
+
+# mysql\u6570\u636E\u5E93\u8FDE\u63A5
+# \u672C\u5730\u6D4B\u8BD5\u6570\u636E\u5E93
+#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+#spring.datasource.url=jdbc:mysql://localhost:3306/dingtalk?serverTimezone=GMT%2B8
+#spring.datasource.username=root
+#spring.datasource.password=123456
+
+#\u914D\u7F6E\u65E5\u5FD7\uFF0C\u5F53\u524D\u4E3A\u9ED8\u8BA4\u7684\u63A7\u5236\u53F0\u8F93\u51FA\uFF0C\u4E5F\u53EF\u4EE5\u7528log4j
+#mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
+
+#\u63A7\u5236\u53F0\u663E\u793Asql
+#spring.jpa.show-sql=true
+#\u66F4\u65B0\u6216\u8005\u521B\u5EFA\u6570\u636E\u8868\u7ED3\u6784
+#spring.jpa.hibernate.ddl-auto=update
+
+#\u8FD4\u56DEjson\u7684\u5168\u5C40\u65F6\u95F4\u683C\u5F0F
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+#\u914D\u7F6Emapper xml\u6587\u4EF6\u7684\u8DEF\u5F84
+#mybatis-plus.mapper-locations=classpath:com/muzhi/mt/mapper/xml/*.xml
+
+#mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml
+
+#\u7981\u7528\u7F13\u5B58
+spring.thymeleaf.cache=false
+#spring.thymeleaf.mode= LEGACYHTML5
+#spring.resources.chain.strategy.content.enabled=true
+#spring.resources.chain.strategy.content.paths=/**
+#spring.thymeleaf.check-template = true
+#spring.thymeleaf.servlet.content-type=text/html
+#spring.thymeleaf.enabled = true
+#spring.thymeleaf.encoding = UTF-8
+#spring.thymeleaf.prefix = classpath:/static/
+#spring.thymeleaf.suffix = .html
+
+#\u5B9A\u4E49\u65E5\u671F\u63D0\u4EA4\u7684\u683C\u5F0F\uFF08\u65E5\u671F\u7684\u683C\u5F0F\u5316\uFF09\uFF1ASpingMVC\u5C06\u9875\u9762\u63D0\u4EA4\u7684\u503C\u9700\u8981\u8F6C\u6362\u4E3A\u6307\u5B9A\u7C7B\u578B\uFF1B\u9ED8\u8BA4\u7684\u662Fyyyy/MM/dd
+#spring.mvc.date-format=yyyy-MM-dd
+
+#spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/templates/
+
+spring.mvc.static-path-pattern=/**
+

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 0
src/main/resources/static/layui/css/layui.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 0
src/main/resources/static/layui/css/layui.mobile.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 0
src/main/resources/static/layui/css/modules/code.css


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 0
src/main/resources/static/layui/css/modules/laydate/default/laydate.css


BIN=BIN
src/main/resources/static/layui/css/modules/layer/default/icon-ext.png


BIN=BIN
src/main/resources/static/layui/css/modules/layer/default/icon.png


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 2 - 0
src/main/resources/static/layui/css/modules/layer/default/layer.css


BIN=BIN
src/main/resources/static/layui/css/modules/layer/default/loading-0.gif


BIN=BIN
src/main/resources/static/layui/css/modules/layer/default/loading-1.gif


BIN=BIN
src/main/resources/static/layui/css/modules/layer/default/loading-2.gif


+ 461 - 0
src/main/resources/static/layui/css/normalize.css

@@ -0,0 +1,461 @@
+/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
+
+/**
+ * 1. Change the default font family in all browsers (opinionated).
+ * 2. Correct the line height in all browsers.
+ * 3. Prevent adjustments of font size after orientation changes in
+ *    IE on Windows Phone and in iOS.
+ */
+
+/* Document
+   ========================================================================== */
+
+html {
+  font-family: sans-serif; /* 1 */
+  line-height: 1.15; /* 2 */
+  -ms-text-size-adjust: 100%; /* 3 */
+  -webkit-text-size-adjust: 100%; /* 3 */
+}
+
+/* Sections
+   ========================================================================== */
+
+/**
+ * Remove the margin in all browsers (opinionated).
+ */
+
+body {
+  margin: 0;
+}
+
+/**
+ * Add the correct display in IE 9-.
+ */
+
+article,
+aside,
+footer,
+header,
+nav,
+section {
+  display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+  font-size: 2em;
+  margin: 0.67em 0;
+}
+
+/* Grouping content
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 9-.
+ * 1. Add the correct display in IE.
+ */
+
+figcaption,
+figure,
+main { /* 1 */
+  display: block;
+}
+
+/**
+ * Add the correct margin in IE 8.
+ */
+
+figure {
+  margin: 1em 40px;
+}
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+  box-sizing: content-box; /* 1 */
+  height: 0; /* 1 */
+  overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+   ========================================================================== */
+
+/**
+ * 1. Remove the gray background on active links in IE 10.
+ * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
+ */
+
+a {
+  background-color: transparent; /* 1 */
+  -webkit-text-decoration-skip: objects; /* 2 */
+}
+
+/**
+ * Remove the outline on focused links when they are also active or hovered
+ * in all browsers (opinionated).
+ */
+
+a:active,
+a:hover {
+  outline-width: 0;
+}
+
+/**
+ * 1. Remove the bottom border in Firefox 39-.
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+  border-bottom: none; /* 1 */
+  text-decoration: underline; /* 2 */
+  text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
+ */
+
+b,
+strong {
+  font-weight: inherit;
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+  font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+  font-family: monospace, monospace; /* 1 */
+  font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font style in Android 4.3-.
+ */
+
+dfn {
+  font-style: italic;
+}
+
+/**
+ * Add the correct background and color in IE 9-.
+ */
+
+mark {
+  background-color: #ff0;
+  color: #000;
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+  font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+  font-size: 75%;
+  line-height: 0;
+  position: relative;
+  vertical-align: baseline;
+}
+
+sub {
+  bottom: -0.25em;
+}
+
+sup {
+  top: -0.5em;
+}
+
+/* Embedded content
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 9-.
+ */
+
+audio,
+video {
+  display: inline-block;
+}
+
+/**
+ * Add the correct display in iOS 4-7.
+ */
+
+audio:not([controls]) {
+  display: none;
+  height: 0;
+}
+
+/**
+ * Remove the border on images inside links in IE 10-.
+ */
+
+img {
+  border-style: none;
+}
+
+/**
+ * Hide the overflow in IE.
+ */
+
+svg:not(:root) {
+  overflow: hidden;
+}
+
+/* Forms
+   ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers (opinionated).
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+  font-family: sans-serif; /* 1 */
+  font-size: 100%; /* 1 */
+  line-height: 1.15; /* 1 */
+  margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+  overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+  text-transform: none;
+}
+
+/**
+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
+ *    controls in Android 4.
+ * 2. Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+html [type="button"], /* 1 */
+[type="reset"],
+[type="submit"] {
+  -webkit-appearance: button; /* 2 */
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+  border-style: none;
+  padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+  outline: 1px dotted ButtonText;
+}
+
+/**
+ * Change the border, margin, and padding in all browsers (opinionated).
+ */
+
+fieldset {
+  border: 1px solid #c0c0c0;
+  margin: 0 2px;
+  padding: 0.35em 0.625em 0.75em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ *    `fieldset` elements in all browsers.
+ */
+
+legend {
+  box-sizing: border-box; /* 1 */
+  color: inherit; /* 2 */
+  display: table; /* 1 */
+  max-width: 100%; /* 1 */
+  padding: 0; /* 3 */
+  white-space: normal; /* 1 */
+}
+
+/**
+ * 1. Add the correct display in IE 9-.
+ * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+  display: inline-block; /* 1 */
+  vertical-align: baseline; /* 2 */
+}
+
+/**
+ * Remove the default vertical scrollbar in IE.
+ */
+
+textarea {
+  overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10-.
+ * 2. Remove the padding in IE 10-.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+  box-sizing: border-box; /* 1 */
+  padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+  height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+  -webkit-appearance: textfield; /* 1 */
+  outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-cancel-button,
+[type="search"]::-webkit-search-decoration {
+  -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+  -webkit-appearance: button; /* 1 */
+  font: inherit; /* 2 */
+}
+
+/* Interactive
+   ========================================================================== */
+
+/*
+ * Add the correct display in IE 9-.
+ * 1. Add the correct display in Edge, IE, and Firefox.
+ */
+
+details, /* 1 */
+menu {
+  display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+  display: list-item;
+}
+
+/* Scripting
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 9-.
+ */
+
+canvas {
+  display: inline-block;
+}
+
+/**
+ * Add the correct display in IE.
+ */
+
+template {
+  display: none;
+}
+
+/* Hidden
+   ========================================================================== */
+
+/**
+ * Add the correct display in IE 10-.
+ */
+
+[hidden] {
+  display: none;
+}

BIN=BIN
src/main/resources/static/layui/font/iconfont.eot


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 554 - 0
src/main/resources/static/layui/font/iconfont.svg


BIN=BIN
src/main/resources/static/layui/font/iconfont.ttf


BIN=BIN
src/main/resources/static/layui/font/iconfont.woff


BIN=BIN
src/main/resources/static/layui/font/iconfont.woff2


BIN=BIN
src/main/resources/static/layui/images/face/0.gif


BIN=BIN
src/main/resources/static/layui/images/face/1.gif


BIN=BIN
src/main/resources/static/layui/images/face/10.gif


BIN=BIN
src/main/resources/static/layui/images/face/11.gif


BIN=BIN
src/main/resources/static/layui/images/face/12.gif


BIN=BIN
src/main/resources/static/layui/images/face/13.gif


BIN=BIN
src/main/resources/static/layui/images/face/14.gif


BIN=BIN
src/main/resources/static/layui/images/face/15.gif


BIN=BIN
src/main/resources/static/layui/images/face/16.gif


BIN=BIN
src/main/resources/static/layui/images/face/17.gif


BIN=BIN
src/main/resources/static/layui/images/face/18.gif


BIN=BIN
src/main/resources/static/layui/images/face/19.gif


BIN=BIN
src/main/resources/static/layui/images/face/2.gif


BIN=BIN
src/main/resources/static/layui/images/face/20.gif


BIN=BIN
src/main/resources/static/layui/images/face/21.gif


BIN=BIN
src/main/resources/static/layui/images/face/22.gif


BIN=BIN
src/main/resources/static/layui/images/face/23.gif


BIN=BIN
src/main/resources/static/layui/images/face/24.gif


BIN=BIN
src/main/resources/static/layui/images/face/25.gif


BIN=BIN
src/main/resources/static/layui/images/face/26.gif


BIN=BIN
src/main/resources/static/layui/images/face/27.gif


BIN=BIN
src/main/resources/static/layui/images/face/28.gif


BIN=BIN
src/main/resources/static/layui/images/face/29.gif


BIN=BIN
src/main/resources/static/layui/images/face/3.gif


BIN=BIN
src/main/resources/static/layui/images/face/30.gif


BIN=BIN
src/main/resources/static/layui/images/face/31.gif


BIN=BIN
src/main/resources/static/layui/images/face/32.gif


BIN=BIN
src/main/resources/static/layui/images/face/33.gif


BIN=BIN
src/main/resources/static/layui/images/face/34.gif


BIN=BIN
src/main/resources/static/layui/images/face/35.gif


BIN=BIN
src/main/resources/static/layui/images/face/36.gif


BIN=BIN
src/main/resources/static/layui/images/face/37.gif


BIN=BIN
src/main/resources/static/layui/images/face/38.gif


BIN=BIN
src/main/resources/static/layui/images/face/39.gif


BIN=BIN
src/main/resources/static/layui/images/face/4.gif


BIN=BIN
src/main/resources/static/layui/images/face/40.gif


BIN=BIN
src/main/resources/static/layui/images/face/41.gif


BIN=BIN
src/main/resources/static/layui/images/face/42.gif


BIN=BIN
src/main/resources/static/layui/images/face/43.gif


BIN=BIN
src/main/resources/static/layui/images/face/44.gif


BIN=BIN
src/main/resources/static/layui/images/face/45.gif


BIN=BIN
src/main/resources/static/layui/images/face/46.gif


BIN=BIN
src/main/resources/static/layui/images/face/47.gif


BIN=BIN
src/main/resources/static/layui/images/face/48.gif


BIN=BIN
src/main/resources/static/layui/images/face/49.gif


BIN=BIN
src/main/resources/static/layui/images/face/5.gif


BIN=BIN
src/main/resources/static/layui/images/face/50.gif


BIN=BIN
src/main/resources/static/layui/images/face/51.gif


BIN=BIN
src/main/resources/static/layui/images/face/52.gif


BIN=BIN
src/main/resources/static/layui/images/face/53.gif


BIN=BIN
src/main/resources/static/layui/images/face/54.gif


BIN=BIN
src/main/resources/static/layui/images/face/55.gif


BIN=BIN
src/main/resources/static/layui/images/face/56.gif


BIN=BIN
src/main/resources/static/layui/images/face/57.gif


BIN=BIN
src/main/resources/static/layui/images/face/58.gif


BIN=BIN
src/main/resources/static/layui/images/face/59.gif


BIN=BIN
src/main/resources/static/layui/images/face/6.gif


BIN=BIN
src/main/resources/static/layui/images/face/60.gif


BIN=BIN
src/main/resources/static/layui/images/face/61.gif


BIN=BIN
src/main/resources/static/layui/images/face/62.gif


BIN=BIN
src/main/resources/static/layui/images/face/63.gif


BIN=BIN
src/main/resources/static/layui/images/face/64.gif


BIN=BIN
src/main/resources/static/layui/images/face/65.gif


BIN=BIN
src/main/resources/static/layui/images/face/66.gif


BIN=BIN
src/main/resources/static/layui/images/face/67.gif


BIN=BIN
src/main/resources/static/layui/images/face/68.gif


BIN=BIN
src/main/resources/static/layui/images/face/69.gif


+ 0 - 0
src/main/resources/static/layui/images/face/7.gif


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