Ver código fonte

项目迁移

zhang-kan-kan 2 anos atrás
commit
b036b61b79
43 arquivos alterados com 3959 adições e 0 exclusões
  1. 37 0
      .gitignore
  2. 328 0
      pom.xml
  3. 20 0
      src/main/java/com/muzhi/lz/LZApplication.java
  4. 50 0
      src/main/java/com/muzhi/lz/controller/AccessTokenController.java
  5. 112 0
      src/main/java/com/muzhi/lz/controller/TongbuController.java
  6. 22 0
      src/main/java/com/muzhi/lz/entity/Bumen.java
  7. 93 0
      src/main/java/com/muzhi/lz/entity/EmployeeLz.java
  8. 93 0
      src/main/java/com/muzhi/lz/entity/EmployeeLzCopy.java
  9. 115 0
      src/main/java/com/muzhi/lz/entity/EmployeeLzLizhi.java
  10. 115 0
      src/main/java/com/muzhi/lz/entity/EmployeeLzLizhiCopy.java
  11. 103 0
      src/main/java/com/muzhi/lz/entity/EmployeeLzRuzhi.java
  12. 103 0
      src/main/java/com/muzhi/lz/entity/EmployeeLzRuzhiCopy.java
  13. 28 0
      src/main/java/com/muzhi/lz/entity/Test1.java
  14. 26 0
      src/main/java/com/muzhi/lz/entity/Test1Copy.java
  15. 16 0
      src/main/java/com/muzhi/lz/entity/vo/BumenVo.java
  16. 14 0
      src/main/java/com/muzhi/lz/entity/vo/EmployeeDataVo.java
  17. 17 0
      src/main/java/com/muzhi/lz/entity/vo/EmployeeQuery.java
  18. 176 0
      src/main/java/com/muzhi/lz/entity/vo/EmployeeVo.java
  19. 11 0
      src/main/java/com/muzhi/lz/mapper/BumenMapper.java
  20. 12 0
      src/main/java/com/muzhi/lz/mapper/EmployeeLzCopyMapper.java
  21. 12 0
      src/main/java/com/muzhi/lz/mapper/EmployeeLzLizhiCopyMapper.java
  22. 12 0
      src/main/java/com/muzhi/lz/mapper/EmployeeLzLizhiMapper.java
  23. 11 0
      src/main/java/com/muzhi/lz/mapper/EmployeeLzMapper.java
  24. 12 0
      src/main/java/com/muzhi/lz/mapper/EmployeeLzRuzhiCopyMapper.java
  25. 12 0
      src/main/java/com/muzhi/lz/mapper/EmployeeLzRuzhiMapper.java
  26. 12 0
      src/main/java/com/muzhi/lz/mapper/Test1CopyMapper.java
  27. 12 0
      src/main/java/com/muzhi/lz/mapper/Test1Mapper.java
  28. 5 0
      src/main/java/com/muzhi/lz/mapper/xml/BumenMapper.xml
  29. 5 0
      src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzCopyMapper.xml
  30. 5 0
      src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzLizhiCopyMapper.xml
  31. 5 0
      src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzLizhiMapper.xml
  32. 5 0
      src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzMapper.xml
  33. 5 0
      src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzRuzhiCopyMapper.xml
  34. 5 0
      src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzRuzhiMapper.xml
  35. 5 0
      src/main/java/com/muzhi/lz/mapper/xml/Test1CopyMapper.xml
  36. 5 0
      src/main/java/com/muzhi/lz/mapper/xml/Test1Mapper.xml
  37. 17 0
      src/main/java/com/muzhi/lz/service/DingAccessTokenService.java
  38. 38 0
      src/main/java/com/muzhi/lz/service/TongbuService.java
  39. 113 0
      src/main/java/com/muzhi/lz/service/impl/DingAccessTokenServiceImpl.java
  40. 1877 0
      src/main/java/com/muzhi/lz/service/impl/TongbuServiceImpl.java
  41. 56 0
      src/main/resources/application.properties
  42. 226 0
      src/test/java/com/muzhi/lz/APITest/Test1.java
  43. 13 0
      src/test/java/com/muzhi/lz/TestApplicationTests.java

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

+ 328 - 0
pom.xml

@@ -0,0 +1,328 @@
+<?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 http://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.lz</groupId>
+    <artifactId>lz</artifactId>
+<!--    <packaging>jar</packaging>-->
+    <version>1.0-SNAPSHOT</version>
+    <name>lz</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>
+        <!--        <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>
+        <dependency>
+            <groupId>com.auth0</groupId>
+            <artifactId>java-jwt</artifactId>
+            <version>3.4.0</version>
+        </dependency>
+
+        <!-- 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.slf4j</groupId>-->
+<!--            <artifactId>slf4j-api</artifactId>-->
+<!--        </dependency>-->
+
+<!--        <dependency>-->
+<!--            <groupId>commons-io</groupId>-->
+<!--            <artifactId>commons-io</artifactId>-->
+<!--        </dependency>-->
+
+        <!--json 组件 -->
+<!--        <dependency>-->
+<!--            <groupId>com.alibaba</groupId>-->
+<!--            <artifactId>fastjson</artifactId>-->
+<!--            <scope>provided</scope>-->
+<!--        </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>
+
+            <!--打包跳过测试-->
+<!--            <plugin>-->
+<!--                <groupId>org.apache.maven.plugins</groupId>-->
+<!--                <artifactId>maven-surefire-plugin</artifactId>-->
+<!--                <version>2.4.2</version>-->
+<!--                <configuration>-->
+<!--                    <skipTests>true</skipTests>-->
+<!--                </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/lz/LZApplication.java

@@ -0,0 +1,20 @@
+package com.muzhi.lz;
+
+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.lz.mapper")
+@SpringBootApplication
+@EnableScheduling//开启定时任务
+//@ComponentScan(basePackages = {"com.muzhi"})
+public class LZApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(LZApplication.class, args);
+    }
+
+}

+ 50 - 0
src/main/java/com/muzhi/lz/controller/AccessTokenController.java

@@ -0,0 +1,50 @@
+package com.muzhi.lz.controller;
+
+import com.muzhi.lz.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(律政)
+    @ApiOperation(value = "获取钉钉中的access_token")
+    @GetMapping("getAccessToken")
+    public String getAccessToken(){
+
+        String accessToken = dingAccessTokenService.getAccessToken();
+        return accessToken;
+    }
+
+    //获取钉钉中的access_token(牧之测试架构4)
+    @ApiOperation(value = "获取钉钉中的access_token")
+    @GetMapping("getMuZhiAccessToken")
+    public String getMuZhiAccessToken(){
+
+        String muZhiAccessToken = dingAccessTokenService.getMuZhiAccessToken();
+        return muZhiAccessToken;
+    }
+
+    //获取钉钉中的access_token(TB应用)
+    @ApiOperation(value = "获取钉钉中的access_token")
+    @GetMapping("getAppToken")
+    public String getAppToken(){
+
+        String AppToken = dingAccessTokenService.getAppToken();
+        return AppToken;
+    }
+}

+ 112 - 0
src/main/java/com/muzhi/lz/controller/TongbuController.java

@@ -0,0 +1,112 @@
+package com.muzhi.lz.controller;
+
+
+import com.muzhi.lz.entity.EmployeeLz;
+import com.muzhi.lz.entity.EmployeeLzLizhi;
+import com.muzhi.lz.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_lz表的所有数据
+    @ApiOperation(value = "查询数据库中employee_lz表的所有数据")
+    @GetMapping("getEmployeeLz")
+    public List<EmployeeLz> getEmployeeLz(){
+        List<EmployeeLz> employeeLz = tongbuService.getEmployeeLz();
+        return employeeLz;
+    }
+
+    //删除employee_lz表中的所有数据
+    @ApiOperation(value = "删除employee表中的所有数据")
+    @PostMapping("removeEmployeeLz")
+    public String removeEmployeeLz(){
+        String result = tongbuService.removeEmployeeLz();
+        return result;
+    }
+
+    //同步花名册数据至数据库(***在职人员***)
+    @ApiOperation(value = "同步花名册数据至数据库(***在职人员***)")
+    @PostMapping("addHuamingceLz")
+//    @Scheduled(cron = "0 0 12 * * ?")//每天中午12:00触发(也就是中午12点整触发)
+    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+    public String addHuamingceLz(){
+        //【***在职人员信息/入职人员信息***】
+        //先删除清空employee_lz_copy表中的所有数据(初次同步表)
+        tongbuService.removeEmployeeLzCopy();
+
+        //再执行插入花名册数据库表的接口
+        String result = tongbuService.addHuamingceLz();
+
+
+        //【***入职人员信息***】
+
+
+        //TODO 临时测试放在一起执行
+        //【***离职人员信息***】
+        //先删除清空employee_lz_lizhi_copy表中的所有数据(初次同步表)
+        tongbuService.removeEmployeeLzLizhiCopy();
+
+        //再执行插入花名册数据库表的接口
+        String result1 = tongbuService.addHuamingceLzLizhi();
+
+        return result;
+    }
+
+
+
+    //查询数据库中employee_lz_lizhi表的所有数据
+    @ApiOperation(value = "查询数据库中employee_lz_lizhi表的所有数据")
+    @GetMapping("getEmployeeLzLizhi")
+    public List<EmployeeLzLizhi> getEmployeeLzLizhi(){
+        List<EmployeeLzLizhi> employeeLzLizhi = tongbuService.getEmployeeLzLizhi();
+        return employeeLzLizhi;
+    }
+
+    //删除employee_lz_lizhi表中的所有数据
+    @ApiOperation(value = "删除employee_lz_lizhi表中的所有数据")
+    @PostMapping("removeEmployeeLzLizhi")
+    public String removeEmployeeLzLizhi(){
+        String removeEmployeeLzLizhi = tongbuService.removeEmployeeLzLizhi();
+        return removeEmployeeLzLizhi;
+    }
+
+    //同步花名册数据至数据库(***离职人员***)
+    @ApiOperation(value = "同步花名册数据至数据库(***离职人员***)")
+    @PostMapping("addHuamingceLzLizhi")
+//    @Scheduled(cron = "0 1 15 * * ?")//每天下午15:01触发(也就是下午3点触发)
+//    @Scheduled(cron = "0 0 0 * * ?")//每天00:00触发(也就是凌晨0点整触发)
+    public String addHuamingceLzLizhi(){
+        //先删除清空employee_lz_lizhi_copy表中的所有数据
+        tongbuService.removeEmployeeLzLizhiCopy();
+
+        //再执行插入花名册数据库表的接口
+        String result = tongbuService.addHuamingceLzLizhi();
+        return result;
+    }
+
+
+    @ApiOperation(value = "测试定时器定时执行")
+    @PostMapping("dingshi")
+//    @Scheduled(cron = "0 11 14 * * ?")//每天下午14:11触发
+//    @Scheduled(cron = "0 12 14 * * ?")//每天下午14:12触发
+//    @Scheduled(cron = "0 13 14 * * ?")//每天下午14:13触发
+//    @Scheduled(cron = "0 14 14 * * ?")//每天下午14:14触发
+    public String dingshi(){
+        System.out.println("定时器执行中···");
+
+        return null;
+    }
+}

+ 22 - 0
src/main/java/com/muzhi/lz/entity/Bumen.java

@@ -0,0 +1,22 @@
+package com.muzhi.lz.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 = "Bumen教职工部门列表", description = "教职工部门")
+public class Bumen {
+
+    @ApiModelProperty(value = "部门id")
+    private String bmid;
+
+    @ApiModelProperty(value = "部门")
+    private String bmmc;
+}

+ 93 - 0
src/main/java/com/muzhi/lz/entity/EmployeeLz.java

@@ -0,0 +1,93 @@
+package com.muzhi.lz.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_lz律政在职人员数据", description = "最终展示表")
+public class EmployeeLz {
+
+    @ApiModelProperty(value = "员工ID")
+    private String id;
+
+    @ApiModelProperty(value = "姓名")
+    private String sys00Name;
+
+    @ApiModelProperty(value = "职位")
+    private String sys00Position;
+
+    @ApiModelProperty(value = "入职时间")
+    private Date sys00ConfirmJoinTime;
+
+    @ApiModelProperty(value = "员工类型")
+    private Integer sys01EmployeeType;
+
+    @ApiModelProperty(value = "员工状态")
+    private Integer sys01EmployeeStatus;
+
+    @ApiModelProperty(value = "性别(0:男;1:女)")
+    private Integer sys02SexType;
+
+
+
+    @ApiModelProperty(value = "部门id1")
+    private String bmid1;
+
+    @ApiModelProperty(value = "部门名称1")
+    private String bmmc1;
+
+    @ApiModelProperty(value = "部门id2")
+    private String bmid2;
+
+    @ApiModelProperty(value = "部门名称2")
+    private String bmmc2;
+
+    @ApiModelProperty(value = "部门id3")
+    private String bmid3;
+
+    @ApiModelProperty(value = "部门名称3")
+    private String bmmc3;
+
+    @ApiModelProperty(value = "部门id4")
+    private String bmid4;
+
+    @ApiModelProperty(value = "部门名称4")
+    private String bmmc4;
+
+    @ApiModelProperty(value = "部门id5")
+    private String bmid5;
+
+    @ApiModelProperty(value = "部门名称5")
+    private String bmmc5;
+
+    @ApiModelProperty(value = "部门id6")
+    private String bmid6;
+
+    @ApiModelProperty(value = "部门名称6")
+    private String bmmc6;
+
+    @ApiModelProperty(value = "部门id7")
+    private String bmid7;
+
+    @ApiModelProperty(value = "部门名称7")
+    private String bmmc7;
+
+    @ApiModelProperty(value = "部门id8")
+    private String bmid8;
+
+    @ApiModelProperty(value = "部门名称8")
+    private String bmmc8;
+
+    @ApiModelProperty(value = "部门id9")
+    private String bmid9;
+
+    @ApiModelProperty(value = "部门名称9")
+    private String bmmc9;
+}

+ 93 - 0
src/main/java/com/muzhi/lz/entity/EmployeeLzCopy.java

@@ -0,0 +1,93 @@
+package com.muzhi.lz.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_lz_copy律政在职人员数据", description = "初步同步表")
+public class EmployeeLzCopy {
+
+    @ApiModelProperty(value = "员工ID")
+    private String id;
+
+    @ApiModelProperty(value = "姓名")
+    private String sys00Name;
+
+    @ApiModelProperty(value = "职位")
+    private String sys00Position;
+
+    @ApiModelProperty(value = "入职时间")
+    private Date sys00ConfirmJoinTime;
+
+    @ApiModelProperty(value = "员工类型")
+    private Integer sys01EmployeeType;
+
+    @ApiModelProperty(value = "员工状态")
+    private Integer sys01EmployeeStatus;
+
+    @ApiModelProperty(value = "性别(0:男;1:女)")
+    private Integer sys02SexType;
+
+
+
+    @ApiModelProperty(value = "部门id1")
+    private String bmid1;
+
+    @ApiModelProperty(value = "部门名称1")
+    private String bmmc1;
+
+    @ApiModelProperty(value = "部门id2")
+    private String bmid2;
+
+    @ApiModelProperty(value = "部门名称2")
+    private String bmmc2;
+
+    @ApiModelProperty(value = "部门id3")
+    private String bmid3;
+
+    @ApiModelProperty(value = "部门名称3")
+    private String bmmc3;
+
+    @ApiModelProperty(value = "部门id4")
+    private String bmid4;
+
+    @ApiModelProperty(value = "部门名称4")
+    private String bmmc4;
+
+    @ApiModelProperty(value = "部门id5")
+    private String bmid5;
+
+    @ApiModelProperty(value = "部门名称5")
+    private String bmmc5;
+
+    @ApiModelProperty(value = "部门id6")
+    private String bmid6;
+
+    @ApiModelProperty(value = "部门名称6")
+    private String bmmc6;
+
+    @ApiModelProperty(value = "部门id7")
+    private String bmid7;
+
+    @ApiModelProperty(value = "部门名称7")
+    private String bmmc7;
+
+    @ApiModelProperty(value = "部门id8")
+    private String bmid8;
+
+    @ApiModelProperty(value = "部门名称8")
+    private String bmmc8;
+
+    @ApiModelProperty(value = "部门id9")
+    private String bmid9;
+
+    @ApiModelProperty(value = "部门名称9")
+    private String bmmc9;
+}

+ 115 - 0
src/main/java/com/muzhi/lz/entity/EmployeeLzLizhi.java

@@ -0,0 +1,115 @@
+package com.muzhi.lz.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_lz_lizhi律政离职数据", description = "最终展示表")
+public class EmployeeLzLizhi {
+
+    @ApiModelProperty(value = "员工ID")
+    private String id;
+
+    @ApiModelProperty(value = "姓名")
+    private String sys00Name;
+
+    @ApiModelProperty(value = "职位")
+    private String sys00Position;
+
+    @ApiModelProperty(value = "入职时间")
+    private Date sys00ConfirmJoinTime;
+
+    @ApiModelProperty(value = "员工类型")
+    private Integer sys01EmployeeType;
+
+    @ApiModelProperty(value = "员工状态")
+    private Integer sys01EmployeeStatus;
+
+    @ApiModelProperty(value = "性别(0:男;1:女)")
+    private Integer sys02SexType;
+
+
+    @ApiModelProperty(value = "直属主管")
+    private String zhishuzhuguan;
+
+    @ApiModelProperty(value = "入职时间")
+    private Date ruzhishijian;
+
+    @ApiModelProperty(value = "身份证号码")
+    private String shenfenzheng;
+
+    @ApiModelProperty(value = "电话号码")
+    private String dianhuahaoma;
+
+    @ApiModelProperty(value = "银行卡号")
+    private String yinhangkahao;
+
+    @ApiModelProperty(value = "入职渠道")
+    private String ruzhiqudao;
+
+    @ApiModelProperty(value = "工号")
+    private String gonghao;
+
+
+
+    @ApiModelProperty(value = "部门id1")
+    private String bmid1;
+
+    @ApiModelProperty(value = "部门名称1")
+    private String bmmc1;
+
+    @ApiModelProperty(value = "部门id2")
+    private String bmid2;
+
+    @ApiModelProperty(value = "部门名称2")
+    private String bmmc2;
+
+    @ApiModelProperty(value = "部门id3")
+    private String bmid3;
+
+    @ApiModelProperty(value = "部门名称3")
+    private String bmmc3;
+
+    @ApiModelProperty(value = "部门id4")
+    private String bmid4;
+
+    @ApiModelProperty(value = "部门名称4")
+    private String bmmc4;
+
+    @ApiModelProperty(value = "部门id5")
+    private String bmid5;
+
+    @ApiModelProperty(value = "部门名称5")
+    private String bmmc5;
+
+    @ApiModelProperty(value = "部门id6")
+    private String bmid6;
+
+    @ApiModelProperty(value = "部门名称6")
+    private String bmmc6;
+
+    @ApiModelProperty(value = "部门id7")
+    private String bmid7;
+
+    @ApiModelProperty(value = "部门名称7")
+    private String bmmc7;
+
+    @ApiModelProperty(value = "部门id8")
+    private String bmid8;
+
+    @ApiModelProperty(value = "部门名称8")
+    private String bmmc8;
+
+    @ApiModelProperty(value = "部门id9")
+    private String bmid9;
+
+    @ApiModelProperty(value = "部门名称9")
+    private String bmmc9;
+}

+ 115 - 0
src/main/java/com/muzhi/lz/entity/EmployeeLzLizhiCopy.java

@@ -0,0 +1,115 @@
+package com.muzhi.lz.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_lz_lizhi律政离职数据", description = "初步同步表")
+public class EmployeeLzLizhiCopy {
+
+    @ApiModelProperty(value = "员工ID")
+    private String id;
+
+    @ApiModelProperty(value = "姓名")
+    private String sys00Name;
+
+    @ApiModelProperty(value = "职位")
+    private String sys00Position;
+
+    @ApiModelProperty(value = "入职时间")
+    private Date sys00ConfirmJoinTime;
+
+    @ApiModelProperty(value = "员工类型")
+    private Integer sys01EmployeeType;
+
+    @ApiModelProperty(value = "员工状态")
+    private Integer sys01EmployeeStatus;
+
+    @ApiModelProperty(value = "性别(0:男;1:女)")
+    private Integer sys02SexType;
+
+
+    @ApiModelProperty(value = "直属主管")
+    private String zhishuzhuguan;
+
+    @ApiModelProperty(value = "入职时间")
+    private Date ruzhishijian;
+
+    @ApiModelProperty(value = "身份证号码")
+    private String shenfenzheng;
+
+    @ApiModelProperty(value = "电话号码")
+    private String dianhuahaoma;
+
+    @ApiModelProperty(value = "银行卡号")
+    private String yinhangkahao;
+
+    @ApiModelProperty(value = "入职渠道")
+    private String ruzhiqudao;
+
+    @ApiModelProperty(value = "工号")
+    private String gonghao;
+
+
+
+    @ApiModelProperty(value = "部门id1")
+    private String bmid1;
+
+    @ApiModelProperty(value = "部门名称1")
+    private String bmmc1;
+
+    @ApiModelProperty(value = "部门id2")
+    private String bmid2;
+
+    @ApiModelProperty(value = "部门名称2")
+    private String bmmc2;
+
+    @ApiModelProperty(value = "部门id3")
+    private String bmid3;
+
+    @ApiModelProperty(value = "部门名称3")
+    private String bmmc3;
+
+    @ApiModelProperty(value = "部门id4")
+    private String bmid4;
+
+    @ApiModelProperty(value = "部门名称4")
+    private String bmmc4;
+
+    @ApiModelProperty(value = "部门id5")
+    private String bmid5;
+
+    @ApiModelProperty(value = "部门名称5")
+    private String bmmc5;
+
+    @ApiModelProperty(value = "部门id6")
+    private String bmid6;
+
+    @ApiModelProperty(value = "部门名称6")
+    private String bmmc6;
+
+    @ApiModelProperty(value = "部门id7")
+    private String bmid7;
+
+    @ApiModelProperty(value = "部门名称7")
+    private String bmmc7;
+
+    @ApiModelProperty(value = "部门id8")
+    private String bmid8;
+
+    @ApiModelProperty(value = "部门名称8")
+    private String bmmc8;
+
+    @ApiModelProperty(value = "部门id9")
+    private String bmid9;
+
+    @ApiModelProperty(value = "部门名称9")
+    private String bmmc9;
+}

+ 103 - 0
src/main/java/com/muzhi/lz/entity/EmployeeLzRuzhi.java

@@ -0,0 +1,103 @@
+package com.muzhi.lz.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_lz律政入职人员数据", description = "最终展示表")
+public class EmployeeLzRuzhi {
+
+    @ApiModelProperty(value = "员工ID")
+    private String id;
+
+    @ApiModelProperty(value = "姓名")
+    private String sys00Name;
+
+    @ApiModelProperty(value = "职位")
+    private String sys00Position;
+
+    @ApiModelProperty(value = "入职时间")
+    private Date sys00ConfirmJoinTime;
+
+    @ApiModelProperty(value = "员工类型")
+    private Integer sys01EmployeeType;
+
+    @ApiModelProperty(value = "员工状态")
+    private Integer sys01EmployeeStatus;
+
+    @ApiModelProperty(value = "性别(0:男;1:女)")
+    private Integer sys02SexType;
+
+
+    @ApiModelProperty(value = "入职渠道")
+    private String ruzhiqudao;
+
+    @ApiModelProperty(value = "内荐人")
+    private String neijianren;
+
+    @ApiModelProperty(value = "直属主管")
+    private String zhishuzhuguan;
+
+
+
+    @ApiModelProperty(value = "部门id1")
+    private String bmid1;
+
+    @ApiModelProperty(value = "部门名称1")
+    private String bmmc1;
+
+    @ApiModelProperty(value = "部门id2")
+    private String bmid2;
+
+    @ApiModelProperty(value = "部门名称2")
+    private String bmmc2;
+
+    @ApiModelProperty(value = "部门id3")
+    private String bmid3;
+
+    @ApiModelProperty(value = "部门名称3")
+    private String bmmc3;
+
+    @ApiModelProperty(value = "部门id4")
+    private String bmid4;
+
+    @ApiModelProperty(value = "部门名称4")
+    private String bmmc4;
+
+    @ApiModelProperty(value = "部门id5")
+    private String bmid5;
+
+    @ApiModelProperty(value = "部门名称5")
+    private String bmmc5;
+
+    @ApiModelProperty(value = "部门id6")
+    private String bmid6;
+
+    @ApiModelProperty(value = "部门名称6")
+    private String bmmc6;
+
+    @ApiModelProperty(value = "部门id7")
+    private String bmid7;
+
+    @ApiModelProperty(value = "部门名称7")
+    private String bmmc7;
+
+    @ApiModelProperty(value = "部门id8")
+    private String bmid8;
+
+    @ApiModelProperty(value = "部门名称8")
+    private String bmmc8;
+
+    @ApiModelProperty(value = "部门id9")
+    private String bmid9;
+
+    @ApiModelProperty(value = "部门名称9")
+    private String bmmc9;
+}

+ 103 - 0
src/main/java/com/muzhi/lz/entity/EmployeeLzRuzhiCopy.java

@@ -0,0 +1,103 @@
+package com.muzhi.lz.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_lz_copy律政入职人员数据", description = "初步同步表")
+public class EmployeeLzRuzhiCopy {
+
+    @ApiModelProperty(value = "员工ID")
+    private String id;
+
+    @ApiModelProperty(value = "姓名")
+    private String sys00Name;
+
+    @ApiModelProperty(value = "职位")
+    private String sys00Position;
+
+    @ApiModelProperty(value = "入职时间")
+    private Date sys00ConfirmJoinTime;
+
+    @ApiModelProperty(value = "员工类型")
+    private Integer sys01EmployeeType;
+
+    @ApiModelProperty(value = "员工状态")
+    private Integer sys01EmployeeStatus;
+
+    @ApiModelProperty(value = "性别(0:男;1:女)")
+    private Integer sys02SexType;
+
+
+    @ApiModelProperty(value = "入职渠道")
+    private String ruzhiqudao;
+
+    @ApiModelProperty(value = "内荐人")
+    private String neijianren;
+
+    @ApiModelProperty(value = "直属主管")
+    private String zhishuzhuguan;
+
+
+
+    @ApiModelProperty(value = "部门id1")
+    private String bmid1;
+
+    @ApiModelProperty(value = "部门名称1")
+    private String bmmc1;
+
+    @ApiModelProperty(value = "部门id2")
+    private String bmid2;
+
+    @ApiModelProperty(value = "部门名称2")
+    private String bmmc2;
+
+    @ApiModelProperty(value = "部门id3")
+    private String bmid3;
+
+    @ApiModelProperty(value = "部门名称3")
+    private String bmmc3;
+
+    @ApiModelProperty(value = "部门id4")
+    private String bmid4;
+
+    @ApiModelProperty(value = "部门名称4")
+    private String bmmc4;
+
+    @ApiModelProperty(value = "部门id5")
+    private String bmid5;
+
+    @ApiModelProperty(value = "部门名称5")
+    private String bmmc5;
+
+    @ApiModelProperty(value = "部门id6")
+    private String bmid6;
+
+    @ApiModelProperty(value = "部门名称6")
+    private String bmmc6;
+
+    @ApiModelProperty(value = "部门id7")
+    private String bmid7;
+
+    @ApiModelProperty(value = "部门名称7")
+    private String bmmc7;
+
+    @ApiModelProperty(value = "部门id8")
+    private String bmid8;
+
+    @ApiModelProperty(value = "部门名称8")
+    private String bmmc8;
+
+    @ApiModelProperty(value = "部门id9")
+    private String bmid9;
+
+    @ApiModelProperty(value = "部门名称9")
+    private String bmmc9;
+}

+ 28 - 0
src/main/java/com/muzhi/lz/entity/Test1.java

@@ -0,0 +1,28 @@
+package com.muzhi.lz.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 = "test1测试复制主表", description = "test1测试复制主表")
+public class Test1 {
+
+    @ApiModelProperty(value = "员工ID")
+    private String id;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "性别")
+    private String sex;
+
+    @ApiModelProperty(value = "教师")
+    private String teacher;
+}

+ 26 - 0
src/main/java/com/muzhi/lz/entity/Test1Copy.java

@@ -0,0 +1,26 @@
+package com.muzhi.lz.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 = "test1_copy测试复制主表", description = "test1_copy测试复制主表")
+public class Test1Copy {
+
+    @ApiModelProperty(value = "员工ID")
+    private String id;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "性别")
+    private String sex;
+
+    @ApiModelProperty(value = "教师")
+    private String teacher;
+}

+ 16 - 0
src/main/java/com/muzhi/lz/entity/vo/BumenVo.java

@@ -0,0 +1,16 @@
+package com.muzhi.lz.entity.vo;
+
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+@Data
+public class BumenVo {
+
+    @ApiModelProperty(value = "部门id")
+    private String bmid;
+
+    @ApiModelProperty(value = "部门")
+    private String bmmc;
+}

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

@@ -0,0 +1,14 @@
+package com.muzhi.lz.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;
+}

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

@@ -0,0 +1,17 @@
+package com.muzhi.lz.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/lz/entity/vo/EmployeeVo.java

@@ -0,0 +1,176 @@
+package com.muzhi.lz.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;
+}

+ 11 - 0
src/main/java/com/muzhi/lz/mapper/BumenMapper.java

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

+ 12 - 0
src/main/java/com/muzhi/lz/mapper/EmployeeLzCopyMapper.java

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

+ 12 - 0
src/main/java/com/muzhi/lz/mapper/EmployeeLzLizhiCopyMapper.java

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

+ 12 - 0
src/main/java/com/muzhi/lz/mapper/EmployeeLzLizhiMapper.java

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

+ 11 - 0
src/main/java/com/muzhi/lz/mapper/EmployeeLzMapper.java

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

+ 12 - 0
src/main/java/com/muzhi/lz/mapper/EmployeeLzRuzhiCopyMapper.java

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

+ 12 - 0
src/main/java/com/muzhi/lz/mapper/EmployeeLzRuzhiMapper.java

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

+ 12 - 0
src/main/java/com/muzhi/lz/mapper/Test1CopyMapper.java

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

+ 12 - 0
src/main/java/com/muzhi/lz/mapper/Test1Mapper.java

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

+ 5 - 0
src/main/java/com/muzhi/lz/mapper/xml/BumenMapper.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.lz.mapper.BumenMapper">
+
+</mapper>

+ 5 - 0
src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzCopyMapper.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.lz.mapper.EmployeeLzCopyMapper">
+
+</mapper>

+ 5 - 0
src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzLizhiCopyMapper.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.lz.mapper.EmployeeLzLizhiCopyMapper">
+
+</mapper>

+ 5 - 0
src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzLizhiMapper.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.lz.mapper.EmployeeLzLizhiMapper">
+
+</mapper>

+ 5 - 0
src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzMapper.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.lz.mapper.EmployeeLzMapper">
+
+</mapper>

+ 5 - 0
src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzRuzhiCopyMapper.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.lz.mapper.EmployeeLzRuzhiCopyMapper">
+
+</mapper>

+ 5 - 0
src/main/java/com/muzhi/lz/mapper/xml/EmployeeLzRuzhiMapper.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.lz.mapper.EmployeeLzRuzhiMapper">
+
+</mapper>

+ 5 - 0
src/main/java/com/muzhi/lz/mapper/xml/Test1CopyMapper.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.lz.mapper.Test1CopyMapper">
+
+</mapper>

+ 5 - 0
src/main/java/com/muzhi/lz/mapper/xml/Test1Mapper.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.lz.mapper.Test1Mapper">
+
+</mapper>

+ 17 - 0
src/main/java/com/muzhi/lz/service/DingAccessTokenService.java

@@ -0,0 +1,17 @@
+package com.muzhi.lz.service;
+
+/**
+ * @Author ZhangKan
+ * @Data 15:34
+ */
+public interface DingAccessTokenService {
+
+    //获取access_token的方法(浙工大)
+    String getAccessToken();
+
+    //获取access_token的方法(牧之测试架构3)
+    String getMuZhiAccessToken();
+
+    //获取access_token的方法(TB应用)
+    String getAppToken();
+}

+ 38 - 0
src/main/java/com/muzhi/lz/service/TongbuService.java

@@ -0,0 +1,38 @@
+package com.muzhi.lz.service;
+
+import com.muzhi.lz.entity.EmployeeLz;
+import com.muzhi.lz.entity.EmployeeLzLizhi;
+
+import java.util.List;
+
+public interface TongbuService {
+
+    //查询数据库中employee_lz表的所有数据
+    List<EmployeeLz> getEmployeeLz();
+
+    //删除employee_lz表中的所有数据
+    String removeEmployeeLz();
+    //删除employee_lz_copy表中的所有数据
+    String removeEmployeeLzCopy();
+
+    //同步花名册数据至数据库(***在职人员***)
+    String addHuamingceLz();
+
+    //删除employee_lz_ruzhi表中的所有数据
+    String removeEmployeeLzRuzhi();
+    //删除employee_lz_ruzhi_copy表中的所有数据
+    String removeEmployeeLzRuzhiCopy();
+
+
+
+    //查询数据库中employee_lz_lizhi表的所有数据
+    List<EmployeeLzLizhi> getEmployeeLzLizhi();
+
+    //删除employee_lz_lizhi表中的所有数据
+    String removeEmployeeLzLizhi();
+    //删除employee_lz_lizhi_copy表中的所有数据
+    String removeEmployeeLzLizhiCopy();
+
+    //同步花名册数据至数据库(***离职人员***)
+    String addHuamingceLzLizhi();
+}

+ 113 - 0
src/main/java/com/muzhi/lz/service/impl/DingAccessTokenServiceImpl.java

@@ -0,0 +1,113 @@
+package com.muzhi.lz.service.impl;
+
+import com.auth0.jwt.JWT;
+import com.auth0.jwt.algorithms.Algorithm;
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.request.OapiGettokenRequest;
+import com.dingtalk.api.response.OapiGettokenResponse;
+import com.muzhi.lz.service.DingAccessTokenService;
+import com.taobao.api.ApiException;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.Date;
+
+
+/**
+ * @Author ZhangKan
+ * @Data 15:39
+ */
+
+@Service
+public class DingAccessTokenServiceImpl implements DingAccessTokenService{
+    //DingAccessTokenService
+
+    //律政
+    //APPKEY
+    private static String APPKEY = "dingibdhs7hjvgokudzc";
+    //APPSECRET
+    private static String APPSECRET = "yl1hIHSTprJ-F2KZf7pbJimvOAGJMifc0PCZxQ_ihpoRGFAJu7Yazw4sTZzXjMre";
+
+    public static String accessToken = null;
+
+
+    //牧之测试架构4
+    //APPKEY
+    private static String APPKEY1 = "ding2katvzyqvlkunqtb";
+    //APPSECRET
+    private static String APPSECRET1 = "vSctQrVm5cGos0X6K86NN0A8Vv6-SmN4W_VRXjsqPqZRhZtbG6xfPATOZhPi3VBE";
+
+    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的方法(牧之测试架构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("牧之测试架构4的AccessToken:" + accessToken1);
+        } catch (ApiException e) {
+            e.printStackTrace();
+        }
+        return accessToken1;
+    }
+
+
+    public static final Long   EXPIRES_IN = 1 * 3600 * 1000L;
+    public static final String TOKEN_APPID = "_appId";
+
+    public static String appId = "61973fb4de120838cc3903e1";
+    public static String appSecret = "zw9rcYZSlHBvpGdGtVxzxeF5ynKg6oAg";
+    //获取access_token的方法(TB应用)
+    @Override
+    public String getAppToken() {
+        if (StringUtils.isEmpty(appId) || StringUtils.isEmpty(appSecret)) {
+            return null;
+        }
+
+        Algorithm algorithm = Algorithm.HMAC256(appSecret);
+        long timestamp = System.currentTimeMillis();
+        Date issuedAt = new Date(timestamp);
+        Date expiresAt = new Date(timestamp + EXPIRES_IN);
+
+//        return JWT.create()
+//                .withClaim(TOKEN_APPID, appId)
+//                .withIssuedAt(issuedAt)
+//                .withExpiresAt(expiresAt)
+//                .sign(algorithm);
+
+        String sign = JWT.create()
+                .withClaim(TOKEN_APPID, appId)
+                .withIssuedAt(issuedAt)
+                .withExpiresAt(expiresAt)
+                .sign(algorithm);
+        System.out.println("TB应用的AccessToken:" + sign);
+
+        return sign;
+
+    }
+
+}

Diferenças do arquivo suprimidas por serem muito extensas
+ 1877 - 0
src/main/java/com/muzhi/lz/service/impl/TongbuServiceImpl.java


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

@@ -0,0 +1,56 @@
+server.port=8094
+
+server.tomcat.uri-encoding=UTF-8
+
+# 服务名
+spring.application.name=springboot-lz
+# 环境设置:dev、test、prod(开发环境、测试环境、生产环境)
+spring.profiles.active=dev
+
+# mysql数据库连接
+# 本地测试数据库
+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
+
+# 云璞【47.98.130.40服务器】测试数据库
+#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+#spring.datasource.url=jdbc:mysql://47.98.130.40:3306/dingtalk?serverTimezone=GMT%2B8
+#spring.datasource.username=root
+#spring.datasource.password=123456
+
+#定时同步
+
+#配置日志,当前为默认的控制台输出,也可以用log4j
+mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
+
+#控制台显示sql
+spring.jpa.show-sql=true
+#更新或者创建数据表结构
+#spring.jpa.hibernate.ddl-auto=update
+
+#返回json的全局时间格式
+spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+spring.jackson.time-zone=GMT+8
+#配置mapper xml文件的路径
+mybatis-plus.mapper-locations=classpath:com/muzhi/lz/mapper/xml/*.xml
+
+#mybatis-plus.config-location=classpath:mybatis/mybatis-config.xml
+
+#禁用缓存
+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
+
+#定义日期提交的格式(日期的格式化):SpingMVC将页面提交的值需要转换为指定类型;默认的是yyyy/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/

+ 226 - 0
src/test/java/com/muzhi/lz/APITest/Test1.java

@@ -0,0 +1,226 @@
+package com.muzhi.lz.APITest;
+
+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.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiSmartworkHrmEmployeeListdimissionRequest;
+import com.dingtalk.api.request.OapiV2DepartmentGetRequest;
+import com.dingtalk.api.request.OapiV2DepartmentListparentbyuserRequest;
+import com.dingtalk.api.response.OapiSmartworkHrmEmployeeListdimissionResponse;
+import com.dingtalk.api.response.OapiV2DepartmentGetResponse;
+import com.dingtalk.api.response.OapiV2DepartmentListparentbyuserResponse;
+import com.muzhi.lz.entity.EmployeeLzCopy;
+import com.muzhi.lz.entity.EmployeeLzRuzhiCopy;
+import com.muzhi.lz.entity.Test1Copy;
+import com.muzhi.lz.mapper.EmployeeLzRuzhiCopyMapper;
+import com.muzhi.lz.mapper.EmployeeLzRuzhiMapper;
+import com.muzhi.lz.mapper.Test1CopyMapper;
+import com.muzhi.lz.mapper.Test1Mapper;
+import com.muzhi.lz.service.DingAccessTokenService;
+import com.taobao.api.ApiException;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.junit.jupiter.api.Test;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+@SpringBootTest
+public class Test1 {
+
+    @Autowired
+    private DingAccessTokenService dingAccessTokenService;
+
+    @Autowired
+    private Test1Mapper test1Mapper;
+    @Autowired
+    private Test1CopyMapper test1CopyMapper;
+
+    //律政入职人员
+    @Autowired
+    private EmployeeLzRuzhiMapper employeeLzRuzhiMapper;
+    @Autowired
+    private EmployeeLzRuzhiCopyMapper employeeLzRuzhiCopyMapper;
+
+//    @Test
+//    public void list(){
+//
+//        //***获取指定用户的所有父部门列表
+//        String bumen111 = null;
+//        try {
+//            DingTalkClient client111 = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/department/listparentbyuser");
+//            OapiV2DepartmentListparentbyuserRequest req111 = new OapiV2DepartmentListparentbyuserRequest();
+//
+//            //传入用户id
+//            req111.setUserid("1606903117970600");
+//
+//            OapiV2DepartmentListparentbyuserResponse rsp111 = client111.execute(req111, dingAccessTokenService.getAccessToken());
+//            bumen111 = rsp111.getBody();
+//            System.out.println(rsp111.getBody());
+//        } catch (ApiException e) {
+//            e.printStackTrace();
+//        }
+//
+//        JSONObject jsonObject = JSON.parseObject(bumen111);
+//        JSONObject result = jsonObject.getJSONObject("result");
+//        JSONArray parent_list = result.getJSONArray("parent_list");
+//        System.out.println("初步解析处理:" + parent_list);
+//
+//        for (int a = 0; a<parent_list.size(); a++){
+//            JSONArray parent_dept_id_list = parent_list.getJSONObject(a).getJSONArray("parent_dept_id_list");
+//            System.out.println("多部门列表解析:" + parent_dept_id_list);
+//
+//            //获取部门详情(主要用于获取部门名称)
+//            for (int b = 0; b<parent_dept_id_list.size(); b++){
+//                String bmid111 = parent_dept_id_list.getString(b);
+//                long bmid222 = Long.parseLong(bmid111);
+//                System.out.println("最终解析的每个独立的部门id:" + bmid111);
+//
+//                System.out.println("部门分组长度:" + parent_dept_id_list.size());
+//
+//                String bumenXQ = null;
+//                try {
+//                    DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/department/get");
+//                    OapiV2DepartmentGetRequest req = new OapiV2DepartmentGetRequest();
+//
+//                    //部门id
+//                    req.setDeptId(bmid222);
+//
+//                    OapiV2DepartmentGetResponse rsp = client.execute(req, dingAccessTokenService.getAccessToken());
+//                    bumenXQ = rsp.getBody();
+//                    System.out.println(rsp.getBody());
+//                } catch (ApiException e) {
+//                    e.printStackTrace();
+//                }
+//
+//                //TODO 解析出来部门名称
+//                JSONObject jsonObject1 = JSON.parseObject(bumenXQ);
+//                System.out.println("初步解析处理(部门详情):" + jsonObject1);
+//
+//                JSONObject result1 = jsonObject1.getJSONObject("result");
+//                String BMname = result1.getString("name");
+//                System.out.println("部门名称:" + BMname);
+//
+//                //TODO 每组部门id都插入一条员工信息到数据库
+//
+//
+//            }
+//            System.out.println("-------------------------分组分割线-------------------------");
+//        }
+//    }
+//
+//    @Test
+//    public void lizhi(){
+//        //***获取员工的离职信息
+//        String lizhi = null;
+//        try {
+//            DingTalkClient clientLZ = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/smartwork/hrm/employee/listdimission");
+//            OapiSmartworkHrmEmployeeListdimissionRequest reqLZ = new OapiSmartworkHrmEmployeeListdimissionRequest();
+//
+//            //离职员工id
+//            reqLZ.setUseridList("1606903117970600");
+//
+//            OapiSmartworkHrmEmployeeListdimissionResponse rspLZ = clientLZ.execute(reqLZ, dingAccessTokenService.getAccessToken());
+//            lizhi = rspLZ.getBody();
+//            System.out.println(rspLZ.getBody());
+//        } catch (ApiException e) {
+//            e.printStackTrace();
+//        }
+//
+//        JSONObject jsonObjectLizhi;
+//        JSONArray resultLizhi;
+//        String lastWorkDay = null;
+//        String main_dept_id = null;
+//        Date date1 = null;
+//
+//        try {
+//            jsonObjectLizhi = JSON.parseObject(lizhi);
+//            resultLizhi = jsonObjectLizhi.getJSONArray("result");
+//
+//            lastWorkDay = resultLizhi.getJSONObject(0).getString("last_work_day");
+//
+//            main_dept_id = resultLizhi.getJSONObject(0).getString("main_dept_id");
+//
+//            //时间戳转为日期格式
+//            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); //24小时制
+//            String timeStamp = lastWorkDay;
+//            long time = Long.parseLong(timeStamp);
+//            Date date = new Date();
+//            date.setTime(time);
+//            String timeLizhi = simpleDateFormat.format(date);
+//            System.out.println("时间戳转日期格式:" + timeLizhi);
+//
+//            //String型日期转换成Date型
+//            date1 = simpleDateFormat.parse(timeLizhi);
+//
+//        }catch (Exception e){
+//            e.printStackTrace();
+//        }
+//
+//        System.out.println("lastWorkDay:" + lastWorkDay);
+//        System.out.println("main_dept_id:" + main_dept_id);
+//        System.out.println("Date类型最后工作日期:" + date1);
+//    }
+//
+//    @Test
+//    public void copy(){
+//
+//        //有数据的表
+//        com.muzhi.lz.entity.Test1Copy test1Copy = new com.muzhi.lz.entity.Test1Copy();
+//
+//        QueryWrapper<com.muzhi.lz.entity.Test1Copy> test1CopyQueryWrapper = new QueryWrapper<>();
+//        List<com.muzhi.lz.entity.Test1Copy> test1CopyList = test1CopyMapper.selectList(test1CopyQueryWrapper);
+//        System.out.println("test1CopyList" + test1CopyList);
+//
+//
+//        //无数据的表
+//        com.muzhi.lz.entity.Test1 test1 = new com.muzhi.lz.entity.Test1();
+//
+//        QueryWrapper<com.muzhi.lz.entity.Test1> test1QueryWrapper = new QueryWrapper<>();
+//        List<com.muzhi.lz.entity.Test1> test1List = test1Mapper.selectList(test1QueryWrapper);
+//        System.out.println("test1List" + test1List);
+//
+//
+//
+//        //将有数据的表数据插入无数据的表对应的字段中
+//        for (int a = 0; a<test1CopyList.size(); a++){
+//            test1.setId(test1CopyList.get(a).getId());
+//            test1.setName(test1CopyList.get(a).getName());
+//            test1.setSex(test1CopyList.get(a).getSex());
+//            test1.setTeacher(test1CopyList.get(a).getTeacher());
+//            test1Mapper.insert(test1);
+//        }
+//    }
+
+    @Test
+    public void panduan(){
+        /*判断数据库入职表中是否存在该人员的id*/
+//        String id111 = null;
+        Integer id111 = 0;
+        try {
+            QueryWrapper<EmployeeLzRuzhiCopy> queryWrapper = new QueryWrapper<>();
+            queryWrapper.select("id").eq("id", "16359029338988172");
+
+            Integer integer = employeeLzRuzhiCopyMapper.selectCount(queryWrapper);
+            System.out.println("查询当前人员的id在数据库中是否存在,返回数据条数:" + integer);
+//            id111 = employeeLzRuzhiCopy1.getId();
+            id111 = integer;
+            System.out.println("查询数据库入职表中的存在人员的id条数:" + id111);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        /*判断数据库入职表中是否存在该人员的id*/
+
+        //【***如果入职首次同步表中不存在律政架构中当前循环的该人员id,将该部门及人员信息插入当前的入职copy表***】
+        if (id111==null || id111==0){
+            System.out.println("数据库不存在该人员,插入!");
+        }else {
+            System.out.println("数据库中该人员已存在,不执行任何操作!");
+        }
+    }
+}

+ 13 - 0
src/test/java/com/muzhi/lz/TestApplicationTests.java

@@ -0,0 +1,13 @@
+package com.muzhi.lz;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class TestApplicationTests {
+
+    @Test
+    void contextLoads() {
+    }
+
+}