Commit 8315a4c6 by 东州 翁

Merge branch 'develop' of 120.24.24.239:8timerv2/8timerapiv200 into wdz

# Conflicts:
#	src/main/java/cn/timer/api/controller/yggl/YgglController.java
parents a28cc7ad bea51ce9
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> 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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.8.RELEASE</version> <version>2.1.8.RELEASE</version>
<relativePath /> <!-- lookup parent from repository --> <relativePath /> <!-- lookup parent from repository -->
</parent> </parent>
<groupId>cn.8timer</groupId> <groupId>cn.8timer</groupId>
<artifactId>8timerV200</artifactId> <artifactId>8timerV200</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<name>8timerV200</name> <name>8timerV200</name>
<description>Demo project for Spring Boot</description> <description>Demo project for Spring Boot</description>
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<shiro.version>1.2.3</shiro.version> <shiro.version>1.2.3</shiro.version>
<swagger.version>2.9.2</swagger.version> <swagger.version>2.9.2</swagger.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
<!-- <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <!-- <exclusions> <exclusion> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> --> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> -->
</dependency> </dependency>
<!-- 排除springboot内置tomcat容器的SpringBootServletInitializer接口需要依赖 javax.servlet --> <!-- 排除springboot内置tomcat容器的SpringBootServletInitializer接口需要依赖 javax.servlet -->
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId> <artifactId>spring-boot-starter-tomcat</artifactId>
<!--打包的时候可以不用包进去,别的设施会提供。事实上该依赖理论上可以参与编译,测试,运行等周期。 相当于compile,但是打包阶段做了exclude操作 --> <!--打包的时候可以不用包进去,别的设施会提供。事实上该依赖理论上可以参与编译,测试,运行等周期。 相当于compile,但是打包阶段做了exclude操作 -->
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mybatis.spring.boot</groupId> <groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.0</version> <version>2.1.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- 添加MySQL依赖 --> <!-- 添加MySQL依赖 -->
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
</dependency> </dependency>
<!-- 添加JDBC依赖 --> <!-- 添加JDBC依赖 -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId> <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency> </dependency>
<!-- optional这个需要为 true 热部署才有效 --> <!-- optional这个需要为 true 热部署才有效 -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId> <artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<!-- swagger2 --> <!-- swagger2 -->
<dependency> <dependency>
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId> <artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version> <version>${swagger.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>swagger-annotations</artifactId>
</exclusion> </exclusion>
<exclusion> <exclusion>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId> <artifactId>swagger-models</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本 --> <!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本 -->
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId> <artifactId>swagger-annotations</artifactId>
<version>1.5.21</version> <version>1.5.21</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId> <artifactId>swagger-models</artifactId>
<version>1.5.21</version> <version>1.5.21</version>
</dependency> </dependency>
<!-- swagger2-UI --> <!-- swagger2-UI -->
<dependency> <dependency>
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId> <artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version> <version>${swagger.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.xiaoymin</groupId> <groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId> <artifactId>knife4j-spring-boot-starter</artifactId>
<version>2.0.2</version> <version>2.0.2</version>
</dependency> </dependency>
<!-- --> <!-- -->
<dependency> <dependency>
<groupId>com.github.pagehelper</groupId> <groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId> <artifactId>pagehelper</artifactId>
<version>5.1.2</version> <version>5.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.pagehelper</groupId> <groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-autoconfigure</artifactId> <artifactId>pagehelper-spring-boot-autoconfigure</artifactId>
<version>1.2.3</version> <version>1.2.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.pagehelper</groupId> <groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId> <artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.3</version> <version>1.2.3</version>
</dependency> </dependency>
<!-- Excel --> <!-- Excel -->
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi --> <!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
<version>3.17</version> <version>3.17</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml --> <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId> <artifactId>poi-ooxml</artifactId>
<version>3.17</version> <version>3.17</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas --> <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml-schemas -->
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId> <artifactId>poi-ooxml-schemas</artifactId>
<version>3.17</version> <version>3.17</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --> <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.shiro</groupId> <groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId> <artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version> <version>${shiro.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.shiro</groupId> <groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId> <artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version> <version>${shiro.version}</version>
</dependency> </dependency>
<!-- redis starter --> <!-- redis starter -->
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> <!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId>
</dependency> --> </dependency> -->
<!-- https://mvnrepository.com/artifact/org.springframework.session/spring-session-data-redis --> <!-- https://mvnrepository.com/artifact/org.springframework.session/spring-session-data-redis -->
<!-- <dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId> <!-- <dependency> <groupId>org.springframework.session</groupId> <artifactId>spring-session-data-redis</artifactId>
</dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId>
<version>2.9.0</version> </dependency> --> <version>2.9.0</version> </dependency> -->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.58</version> <version>1.2.58</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version> <version>2.3.2</version>
</dependency> </dependency>
<!-- Hutool超级工具类 http://hutool.mydoc.io/ --> <!-- Hutool超级工具类 http://hutool.mydoc.io/ -->
<dependency> <dependency>
<groupId>cn.hutool</groupId> <groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>4.6.1</version> <version>4.6.1</version>
</dependency> </dependency>
<!-- lombok --> <!-- lombok -->
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
</dependency> </dependency>
<!-- freemarker --> <!-- freemarker -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId> <artifactId>spring-boot-starter-freemarker</artifactId>
</dependency> </dependency>
<!-- 支持 @ConfigurationProperties 注解 --> <!-- 支持 @ConfigurationProperties 注解 -->
<!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional> </dependency> --> <optional>true</optional> </dependency> -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> </dependency>
<!-- jackson --> <!-- jackson -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-json</artifactId> <artifactId>spring-boot-starter-json</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId> <artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.10</version> <version>1.1.10</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-boot-starter --> <!-- https://mvnrepository.com/artifact/com.baomidou/mybatis-plus-boot-starter -->
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.2.0</version> <version>3.2.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId> <artifactId>mybatis-plus</artifactId>
<version>3.2.0</version> <version>3.2.0</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok-maven-plugin --> <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok-maven-plugin -->
<!-- <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok-maven-plugin</artifactId> <!-- <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok-maven-plugin</artifactId>
<version>1.18.4.0</version> </dependency> --> <version>1.18.4.0</version> </dependency> -->
<!-- <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <!-- <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId>
<scope>runtime</scope> </dependency> --> <scope>runtime</scope> </dependency> -->
<!-- 阿里云OSS --> <!-- 阿里云OSS -->
<dependency> <dependency>
<groupId>com.aliyun.oss</groupId> <groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId> <artifactId>aliyun-sdk-oss</artifactId>
<version>3.7.1-a</version> <version>3.7.1-a</version>
</dependency> </dependency>
<!-- <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <!-- <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId>
<version>2.6</version> </dependency> <dependency> <groupId>commons-fileupload</groupId> <version>2.6</version> </dependency> <dependency> <groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId> <version>1.3.3</version> </dependency> --> <artifactId>commons-fileupload</artifactId> <version>1.3.3</version> </dependency> -->
<!-- 阿里云Java SDK核心库 --> <!-- 阿里云Java SDK核心库 -->
<dependency> <dependency>
<groupId>com.aliyun</groupId> <groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId> <artifactId>aliyun-java-sdk-core</artifactId>
<version>4.4.6</version> <version>4.4.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.aliyun</groupId> <groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-ecs</artifactId> <artifactId>aliyun-java-sdk-ecs</artifactId>
<version>4.17.6</version> <version>4.17.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.aliyun</groupId> <groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId> <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<version>1.1.0</version> <version>1.1.0</version>
</dependency> </dependency>
<!--springboot-quartz --> <!--springboot-quartz -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-quartz</artifactId> <artifactId>spring-boot-starter-quartz</artifactId>
</dependency> </dependency>
<!--Quartz 使用的连接池 这里Quartz在持久化任务时使用该jar --> <!--Quartz 使用的连接池 这里Quartz在持久化任务时使用该jar -->
<dependency> <dependency>
<groupId>com.mchange</groupId> <groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId> <artifactId>c3p0</artifactId>
<version>0.9.5.2</version> <version>0.9.5.2</version>
</dependency> </dependency>
<!-- pdf --> <!-- pdf -->
<!-- https://mvnrepository.com/artifact/org.apache.pdfbox/fontbox --> <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/fontbox -->
<dependency> <dependency>
<groupId>org.apache.pdfbox</groupId> <groupId>org.apache.pdfbox</groupId>
<artifactId>fontbox</artifactId> <artifactId>fontbox</artifactId>
<version>2.0.9</version> <version>2.0.9</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox --> <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox -->
<dependency> <dependency>
<groupId>org.apache.pdfbox</groupId> <groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId> <artifactId>pdfbox</artifactId>
<version>2.0.9</version> <version>2.0.9</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/commons-logging/commons-logging --> <!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
<dependency> <dependency>
<groupId>commons-logging</groupId> <groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId> <artifactId>commons-logging</artifactId>
<version>1.2</version> <version>1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sf.json-lib</groupId> <groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId> <artifactId>json-lib</artifactId>
<version>2.4</version> <version>2.4</version>
<classifier>jdk15</classifier> <classifier>jdk15</classifier>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/nl.bitwalker/UserAgentUtils --> <!-- https://mvnrepository.com/artifact/nl.bitwalker/UserAgentUtils -->
<dependency> <dependency>
<groupId>nl.bitwalker</groupId> <groupId>nl.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId> <artifactId>UserAgentUtils</artifactId>
<version>1.2.4</version> <version>1.2.4</version>
</dependency> </dependency>
</dependencies> </dependencies>
<repositories> <repositories>
<repository> <repository>
<id>snapshots</id> <id>snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url> <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository> </repository>
</repositories> </repositories>
<build> <build>
<finalName>yl8timer</finalName> <finalName>8timer-api</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
<!-- 不执行单元测试,也不编译测试类 --> <!-- 不执行单元测试,也不编译测试类 -->
<skip>true</skip> <skip>true</skip>
<!-- 不执行单元测试,但会编译测试类,并在target/test-classes目录下生成相应的class --> <!-- 不执行单元测试,但会编译测试类,并在target/test-classes目录下生成相应的class -->
<!-- <skipTests>true</skipTests> --> <!-- <skipTests>true</skipTests> -->
<compilerArgument>-parameters</compilerArgument> <compilerArgument>-parameters</compilerArgument>
</configuration> </configuration>
</plugin> </plugin>
<!-- <plugin> <groupId>org.projectlombok</groupId> <artifactId>lombok-maven-plugin</artifactId> <!-- <plugin> <groupId>org.projectlombok</groupId> <artifactId>lombok-maven-plugin</artifactId>
<version>1.18.4.0</version> <executions> <execution> <phase>generate-sources</phase> <version>1.18.4.0</version> <executions> <execution> <phase>generate-sources</phase>
<goals> <goal>delombok</goal> </goals> <configuration> <addOutputDirectory>false</addOutputDirectory> <goals> <goal>delombok</goal> </goals> <configuration> <addOutputDirectory>false</addOutputDirectory>
<sourceDirectory>src/main/java</sourceDirectory> <formatPreferences> <pretty/> <sourceDirectory>src/main/java</sourceDirectory> <formatPreferences> <pretty/>
</formatPreferences> </configuration> </execution> </executions> </plugin> --> </formatPreferences> </configuration> </execution> </executions> </plugin> -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<configuration> <configuration>
<!--<failOnMissingWebXml>false</failOnMissingWebXml> --> <!--<failOnMissingWebXml>false</failOnMissingWebXml> -->
<includeEmptyDirs>true</includeEmptyDirs> <includeEmptyDirs>true</includeEmptyDirs>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.mybatis.generator</groupId> <groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId> <artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version> <version>1.3.2</version>
<configuration> <configuration>
<verbose>true</verbose> <verbose>true</verbose>
<overwrite>true</overwrite> <overwrite>true</overwrite>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<!-- <packaging>war</packaging> --> <!-- <packaging>war</packaging> -->
</project> </project>
...@@ -130,7 +130,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -130,7 +130,7 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="工作性质 1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="101") @ApiModelProperty(value="工作性质 1全职、2实习生、3兼职、4劳务派遣、5劳务、6派遣、7外包、8退休返聘",example="101")
private Integer jobType; private Integer jobType;
@ApiModelProperty(value="员工状态 1正式、2试用、3离职中、4已离职",example="101") @ApiModelProperty(value="员工状态 1试用、2正式、3离职中、4已离职",example="101")
private Integer jobStatus; private Integer jobStatus;
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间") @ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
......
package cn.timer.api.config.quartz;
//@Configuration
public class SchedulerConfig {
// @Bean(name = "SchedulerFactory")
// public SchedulerFactoryBean schedulerFactoryBean() throws IOException {
// SchedulerFactoryBean factory = new SchedulerFactoryBean();
// factory.setQuartzProperties(quartzProperties());
// return factory;
// }
//
// @Bean
// public Properties quartzProperties() throws IOException {
// PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
// propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties"));
// // 在quartz.properties中的属性被读取并注入后再初始化对象
// propertiesFactoryBean.afterPropertiesSet();
// return propertiesFactoryBean.getObject();
// }
//
// /*
// * quartz初始化监听器
// */
// @Bean
// public QuartzInitializerListener executorListener() {
// return new QuartzInitializerListener();
// }
//
// /*
// * 通过SchedulerFactoryBean获取Scheduler的实例
// */
// @Bean(name = "Scheduler")
// public Scheduler scheduler() throws IOException {
// return schedulerFactoryBean().getScheduler();
// }
}
package cn.timer.api.controller.quartz; //package cn.timer.api.controller.quartz;
//
import java.util.HashMap; //import java.util.HashMap;
import java.util.Map; //import java.util.Map;
//
import org.quartz.CronScheduleBuilder; //import org.quartz.CronScheduleBuilder;
import org.quartz.CronTrigger; //import org.quartz.CronTrigger;
import org.quartz.JobBuilder; //import org.quartz.JobBuilder;
import org.quartz.JobDetail; //import org.quartz.JobDetail;
import org.quartz.JobKey; //import org.quartz.JobKey;
import org.quartz.Scheduler; //import org.quartz.Scheduler;
import org.quartz.SchedulerException; //import org.quartz.SchedulerException;
import org.quartz.TriggerBuilder; //import org.quartz.TriggerBuilder;
import org.quartz.TriggerKey; //import org.quartz.TriggerKey;
import org.slf4j.Logger; //import org.springframework.beans.factory.annotation.Autowired;
import org.slf4j.LoggerFactory; //import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.GetMapping; //import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.PostMapping; //import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestMapping; //import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestParam; //
import org.springframework.web.bind.annotation.RestController; //import com.github.pagehelper.PageInfo;
//
import com.github.pagehelper.PageInfo; //import cn.timer.api.bean.quartz.JobAndTrigger;
//import cn.timer.api.config.quartz.TestJob;
import cn.timer.api.bean.quartz.JobAndTrigger; //import cn.timer.api.dao.quartz.JobAndTriggerMapper;
import cn.timer.api.config.quartz.BaseJob; //import cn.timer.api.utils.Result;
import cn.timer.api.dao.quartz.JobAndTriggerMapper; //import cn.timer.api.utils.ResultUtil;
import cn.timer.api.utils.Result; //import io.swagger.annotations.Api;
import cn.timer.api.utils.ResultUtil; //import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api; //
import io.swagger.annotations.ApiOperation; //@Api(tags = "99.0 Quartz")
//@RestController
@Api(tags = "99.0 Quartz") //@RequestMapping(value = "/quartz", produces = { "application/json" })
@RestController //public class JobController {
@RequestMapping(value = "/quartz", produces = { "application/json" }) //
public class JobController { // @Autowired
@Autowired // private Scheduler scheduler;
private JobAndTriggerMapper jobAndTriggerMapper; //
// @PostMapping(value = "/addjob")
// @ApiOperation(value = "新增任务", httpMethod = "POST", notes = "接口发布说明")
// 加入Qulifier注解,通过名称注入bean // public Result<Void> addjob(@RequestParam(value = "jobClassName") String jobClassName,
@Autowired // @RequestParam(value = "jobGroupName") String jobGroupName,
// @Qualifier("Scheduler") // @RequestParam(value = "cronExpression") String cronExpression) throws Exception {
private Scheduler scheduler; // addJob(jobClassName, jobGroupName, cronExpression);
// return ResultUtil.success("新增定时任务成功");
@SuppressWarnings("unused") // }
private static Logger log = LoggerFactory.getLogger(JobController.class); //
// public void addJob(String jobClassName, String jobGroupName, String cronExpression) throws Exception {
@PostMapping(value = "/addjob") //
@ApiOperation(value = "新增任务", httpMethod = "POST", notes = "接口发布说明") // // 启动调度器
public Result<Void> addjob(@RequestParam(value = "jobClassName") String jobClassName, // scheduler.start();
@RequestParam(value = "jobGroupName") String jobGroupName, //
@RequestParam(value = "cronExpression") String cronExpression) throws Exception { // // 构建job信息
addJob(jobClassName, jobGroupName, cronExpression); // JobDetail jobDetail = JobBuilder.newJob(TestJob.class)
return ResultUtil.success("新增定时任务成功"); // .withIdentity(jobClassName, jobGroupName).build();
} //
// // 表达式调度构建器(即任务执行的时间)
public void addJob(String jobClassName, String jobGroupName, String cronExpression) throws Exception { // CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(cronExpression);
//
// 启动调度器 // // 按新的cronExpression表达式构建一个新的trigger
scheduler.start(); // CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity(jobClassName, jobGroupName)
// .withSchedule(scheduleBuilder).build();
// 构建job信息 //
JobDetail jobDetail = JobBuilder.newJob(getClass(jobClassName).getClass()) // try {
.withIdentity(jobClassName, jobGroupName).build(); // scheduler.scheduleJob(jobDetail, trigger);
//
// 表达式调度构建器(即任务执行的时间) // } catch (SchedulerException e) {
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(cronExpression); // System.out.println("创建定时任务失败" + e);
// throw new Exception("创建定时任务失败");
// 按新的cronExpression表达式构建一个新的trigger // }
CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity(jobClassName, jobGroupName) // }
.withSchedule(scheduleBuilder).build(); //
// @PostMapping(value = "/pausejob")
try { // @ApiOperation(value = "暂停任务", httpMethod = "POST", notes = "接口发布说明")
scheduler.scheduleJob(jobDetail, trigger); // public Result<Void> pausejob(@RequestParam(value = "jobClassName") String jobClassName,
// @RequestParam(value = "jobGroupName") String jobGroupName) throws Exception {
} catch (SchedulerException e) { // jobPause(jobClassName, jobGroupName);
System.out.println("创建定时任务失败" + e); // return ResultUtil.success("暂停定时任务成功");
throw new Exception("创建定时任务失败"); // }
} //
} // public void jobPause(String jobClassName, String jobGroupName) throws Exception {
// scheduler.pauseJob(JobKey.jobKey(jobClassName, jobGroupName));
@PostMapping(value = "/pausejob") // }
@ApiOperation(value = "暂停任务", httpMethod = "POST", notes = "接口发布说明") //
public Result<Void> pausejob(@RequestParam(value = "jobClassName") String jobClassName, // @PostMapping(value = "/resumejob")
@RequestParam(value = "jobGroupName") String jobGroupName) throws Exception { // @ApiOperation(value = "恢复任务", httpMethod = "POST", notes = "接口发布说明")
jobPause(jobClassName, jobGroupName); // public Result<Void> resumejob(@RequestParam(value = "jobClassName") String jobClassName,
return ResultUtil.success("暂停定时任务成功"); // @RequestParam(value = "jobGroupName") String jobGroupName) throws Exception {
} // jobresume(jobClassName, jobGroupName);
// return ResultUtil.success("恢复定时任务成功");
public void jobPause(String jobClassName, String jobGroupName) throws Exception { // }
scheduler.pauseJob(JobKey.jobKey(jobClassName, jobGroupName)); //
} // public void jobresume(String jobClassName, String jobGroupName) throws Exception {
// scheduler.resumeJob(JobKey.jobKey(jobClassName, jobGroupName));
@PostMapping(value = "/resumejob") // }
@ApiOperation(value = "恢复任务", httpMethod = "POST", notes = "接口发布说明") //
public Result<Void> resumejob(@RequestParam(value = "jobClassName") String jobClassName, // @PostMapping(value = "/reschedulejob")
@RequestParam(value = "jobGroupName") String jobGroupName) throws Exception { // @ApiOperation(value = "重新设置任务", httpMethod = "POST", notes = "接口发布说明")
jobresume(jobClassName, jobGroupName); // public Result<Void> rescheduleJob(@RequestParam(value = "jobClassName") String jobClassName,
return ResultUtil.success("恢复定时任务成功"); // @RequestParam(value = "jobGroupName") String jobGroupName,
} // @RequestParam(value = "cronExpression") String cronExpression) throws Exception {
// jobreschedule(jobClassName, jobGroupName, cronExpression);
public void jobresume(String jobClassName, String jobGroupName) throws Exception { // return ResultUtil.success("重设定时任务成功");
scheduler.resumeJob(JobKey.jobKey(jobClassName, jobGroupName)); // }
} //
// public void jobreschedule(String jobClassName, String jobGroupName, String cronExpression) throws Exception {
@PostMapping(value = "/reschedulejob") // try {
@ApiOperation(value = "重新设置任务", httpMethod = "POST", notes = "接口发布说明") // TriggerKey triggerKey = TriggerKey.triggerKey(jobClassName, jobGroupName);
public Result<Void> rescheduleJob(@RequestParam(value = "jobClassName") String jobClassName, // // 表达式调度构建器
@RequestParam(value = "jobGroupName") String jobGroupName, // CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(cronExpression);
@RequestParam(value = "cronExpression") String cronExpression) throws Exception { //
jobreschedule(jobClassName, jobGroupName, cronExpression); // CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey);
return ResultUtil.success("重设定时任务成功"); //
} // // 按新的cronExpression表达式重新构建trigger
// trigger = trigger.getTriggerBuilder().withIdentity(triggerKey).withSchedule(scheduleBuilder).build();
public void jobreschedule(String jobClassName, String jobGroupName, String cronExpression) throws Exception { //
try { // // 按新的trigger重新设置job执行
TriggerKey triggerKey = TriggerKey.triggerKey(jobClassName, jobGroupName); // scheduler.rescheduleJob(triggerKey, trigger);
// 表达式调度构建器 // } catch (SchedulerException e) {
CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(cronExpression); // System.out.println("更新定时任务失败" + e);
// throw new Exception("更新定时任务失败");
CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey); // }
// }
// 按新的cronExpression表达式重新构建trigger //
trigger = trigger.getTriggerBuilder().withIdentity(triggerKey).withSchedule(scheduleBuilder).build(); // @PostMapping(value = "/deletejob")
// @ApiOperation(value = "删除任务", httpMethod = "POST", notes = "接口发布说明")
// 按新的trigger重新设置job执行 // public Result<Void> deletejob(@RequestParam(value = "jobClassName") String jobClassName,
scheduler.rescheduleJob(triggerKey, trigger); // @RequestParam(value = "jobGroupName") String jobGroupName) throws Exception {
} catch (SchedulerException e) { // jobdelete(jobClassName, jobGroupName);
System.out.println("更新定时任务失败" + e); // return ResultUtil.success("删除成功");
throw new Exception("更新定时任务失败"); // }
} //
} // public void jobdelete(String jobClassName, String jobGroupName) throws Exception {
// scheduler.pauseTrigger(TriggerKey.triggerKey(jobClassName, jobGroupName));
@PostMapping(value = "/deletejob") // scheduler.unscheduleJob(TriggerKey.triggerKey(jobClassName, jobGroupName));
@ApiOperation(value = "删除任务", httpMethod = "POST", notes = "接口发布说明") // scheduler.deleteJob(JobKey.jobKey(jobClassName, jobGroupName));
public Result<Void> deletejob(@RequestParam(value = "jobClassName") String jobClassName, // }
@RequestParam(value = "jobGroupName") String jobGroupName) throws Exception { //
jobdelete(jobClassName, jobGroupName); //}
return ResultUtil.success("删除成功");
}
public void jobdelete(String jobClassName, String jobGroupName) throws Exception {
scheduler.pauseTrigger(TriggerKey.triggerKey(jobClassName, jobGroupName));
scheduler.unscheduleJob(TriggerKey.triggerKey(jobClassName, jobGroupName));
scheduler.deleteJob(JobKey.jobKey(jobClassName, jobGroupName));
}
@GetMapping(value = "/queryjob")
@ApiOperation(value = "查询任务", httpMethod = "GET", notes = "接口发布说明")
public Result<Map<String, Object>> queryjob(@RequestParam(value = "pageNum") Integer pageNum,
@RequestParam(value = "pageSize") Integer pageSize) {
PageInfo<JobAndTrigger> jobAndTrigger = jobAndTriggerMapper.getJobAndTriggerDetails(pageNum, pageSize);
Map<String, Object> map = new HashMap<String, Object>();
map.put("JobAndTrigger", jobAndTrigger);
map.put("number", jobAndTrigger.getTotal());
return ResultUtil.data(map, "查询成功");
}
public static BaseJob getClass(String classname) throws Exception {
Class<?> class1 = Class.forName(classname);
return (BaseJob) class1.newInstance();
}
}
...@@ -8,8 +8,7 @@ package cn.timer.api.controller.yggl; ...@@ -8,8 +8,7 @@ package cn.timer.api.controller.yggl;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
...@@ -77,7 +76,6 @@ import cn.timer.api.dto.yggl.AddygdaDto; ...@@ -77,7 +76,6 @@ import cn.timer.api.dto.yggl.AddygdaDto;
import cn.timer.api.dto.yggl.LzbQueryDto; import cn.timer.api.dto.yggl.LzbQueryDto;
import cn.timer.api.dto.yggl.LzygQueryDto; import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.dto.yggl.YgAreaDto; import cn.timer.api.dto.yggl.YgAreaDto;
import cn.timer.api.dto.yggl.YgCartogramDto;
import cn.timer.api.dto.yggl.YgCityDto; import cn.timer.api.dto.yggl.YgCityDto;
import cn.timer.api.dto.yggl.YgDrjqbDto; import cn.timer.api.dto.yggl.YgDrjqbDto;
import cn.timer.api.dto.yggl.YgDrsDto; import cn.timer.api.dto.yggl.YgDrsDto;
...@@ -114,26 +112,29 @@ public class YgglController { ...@@ -114,26 +112,29 @@ public class YgglController {
@Autowired @Autowired
private YgglMainLzbMapper ygglMainLzbMapper; private YgglMainLzbMapper ygglMainLzbMapper;
@Autowired @Autowired
private ZzglBmgwMMapper zzglBmgwMMapper; private ZzglBmgwMMapper zzglBmgwMMapper;
//weng(籍贯) // weng(籍贯)
@Autowired @Autowired
private YgAreaDtoMapper ygAreaDtoMapper; private YgAreaDtoMapper ygAreaDtoMapper;
@Autowired @Autowired
private YgCityDtoMapper ygCityDtoMapper; private YgCityDtoMapper ygCityDtoMapper;
@Autowired @Autowired
private YgProDtoMapper ygProDtoMapper; private YgProDtoMapper ygProDtoMapper;
//weng(民族) // weng(民族)
@Autowired @Autowired
private YgMzDtoMapper ygMzDtoMapper; private YgMzDtoMapper ygMzDtoMapper;
//weng(人事仪表盘) //weng(人事仪表盘)
@Autowired @Autowired
private YgtitleDtoMapper ygtitleDtoMapper; private YgtitleDtoMapper ygtitleDtoMapper;
/** /**
* 获取员工档案 * 获取员工档案
*
* @param * @param
* @return * @return
*/ */
...@@ -146,10 +147,13 @@ public class YgglController { ...@@ -146,10 +147,13 @@ public class YgglController {
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>(); QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_code", orgCode).eq("emp_num", empNum); queryWrapper.eq("org_code", orgCode).eq("emp_num", empNum);
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper);
ygglMainEmp.setWorkTime(DateUtil.formatBetween(ygglMainEmp.getRzTime(), new Date(),Level.DAY)); Date rz = ygglMainEmp.getRzTime();
if (rz != null) {
ygglMainEmp.setWorkTime(DateUtil.formatBetween(rz, new Date(), Level.DAY));
}
return ResultUtil.data(ygglMainEmp, "获取员工档案成功"); return ResultUtil.data(ygglMainEmp, "获取员工档案成功");
} }
// 获取员工档案 // 获取员工档案
@GetMapping(value = "/ygda/{empNum}") @GetMapping(value = "/ygda/{empNum}")
@ApiOperation(value = "获取员工档案(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工档案(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -159,36 +163,48 @@ public class YgglController { ...@@ -159,36 +163,48 @@ public class YgglController {
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>(); QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_code", orgCode).eq("emp_num", empNum); queryWrapper.eq("org_code", orgCode).eq("emp_num", empNum);
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper);
if (ygglMainEmp != null) { Date rz = ygglMainEmp.getRzTime();
ygglMainEmp.setWorkTime(DateUtil.formatBetween(ygglMainEmp.getRzTime(), new Date(),Level.DAY)); if (rz != null) {
ygglMainEmp.setWorkTime(DateUtil.formatBetween(ygglMainEmp.getRzTime(), new Date(), Level.DAY));
} }
return ResultUtil.data(ygglMainEmp, "获取员工档案成功"); return ResultUtil.data(ygglMainEmp, "获取员工档案成功");
} }
/** /**
* 根据岗位id获取员工档案部门岗位名称 * 根据岗位id获取员工档案部门岗位名称
*
* @param * @param
* @return * @return
*/ */
@GetMapping(value = "/ygdabm/{gwid}") @GetMapping(value = "/ygdabm/{gwid}")
@ApiOperation(value = "获取员工档案部门岗位名称", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工档案部门岗位名称", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
public Result<String> selectbmgw(@CurrentUser UserBean userBean,@PathVariable Integer gwid) { public Result<String> selectbmgw(@CurrentUser UserBean userBean, @PathVariable Integer gwid) {
if (gwid==null||gwid==0) { if (gwid == null || gwid == 0) {
return ResultUtil.data("无岗位","获取员工档案部门岗位名称成功"); return ResultUtil.data("无岗位", "获取员工档案部门岗位名称成功");
} }
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
QueryWrapper<ZzglBmgwM> queryWrapper = new QueryWrapper<>(); QueryWrapper<ZzglBmgwM> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_code", orgCode).eq("id", gwid); queryWrapper.eq("org_code", orgCode).eq("id", gwid);
String gw = ZzglBmgwM.builder().build().selectOne(queryWrapper).getName(); ZzglBmgwM zzglBmgwM = ZzglBmgwM.builder().build().selectOne(queryWrapper);
Integer bmid = ZzglBmgwM.builder().build().selectOne(queryWrapper).getUpId(); String gw = null;
//QueryWrapper<ZzglBmgwM> queryWrapper1 = new QueryWrapper<>(); Integer bmid = null;
//queryWrapper1.eq("org_code", orgCode).eq("up_dept_id", gwid); if (zzglBmgwM != null) {
String bm = ZzglBmgwM.builder().build().selectOne(new QueryWrapper<ZzglBmgwM>().eq("org_code", orgCode).eq("id", bmid)).getName(); gw = zzglBmgwM.getName();
String bmgw = bm+"/"+gw; bmid = zzglBmgwM.getUpId();
return ResultUtil.data(bmgw,"获取员工档案部门岗位名称成功"); }
} // QueryWrapper<ZzglBmgwM> queryWrapper1 = new QueryWrapper<>();
// queryWrapper1.eq("org_code", orgCode).eq("up_dept_id", gwid);
ZzglBmgwM z = ZzglBmgwM.builder().build()
.selectOne(new QueryWrapper<ZzglBmgwM>().eq("org_code", orgCode).eq("id", bmid));
String bm = null;
if (z != null) {
bm = z.getName();
}
String bmgw = bm + "/" + gw;
return ResultUtil.data(bmgw, "获取员工档案部门岗位名称成功");
}
/** /**
* 添加员工档案(weng) * 添加员工档案(weng)
* *
...@@ -228,11 +244,11 @@ public class YgglController { ...@@ -228,11 +244,11 @@ public class YgglController {
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum) YgglMainEmp ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum)
.jobType(jobType).rzTime(rzTime).syq(syq).sex(sex).empNum(qyzxEmpLogin.getId()).orgCode(orgCode) .jobType(jobType).rzTime(rzTime).syq(syq).sex(sex).empNum(qyzxEmpLogin.getId()).orgCode(orgCode)
.build(); .build();
ygglMainEmp.insert(); ygglMainEmp.insert();
return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!"); return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!");
} else { } else {
YgglMainEmp ishad = YgglMainEmp.builder().build() YgglMainEmp ishad = YgglMainEmp.builder().build()
.selectOne(new QueryWrapper<YgglMainEmp>().eq("phone", phone).eq("org_code", orgCode)); .selectOne(new QueryWrapper<YgglMainEmp>().eq("phone", phone).eq("org_code", orgCode));
...@@ -250,8 +266,10 @@ public class YgglController { ...@@ -250,8 +266,10 @@ public class YgglController {
} }
} }
} }
/** /**
* 修改员工档案 * 修改员工档案
*
* @param * @param
* @return * @return
*/ */
...@@ -268,8 +286,10 @@ public class YgglController { ...@@ -268,8 +286,10 @@ public class YgglController {
} }
return ResultUtil.error("请确认该员工是否存在!"); return ResultUtil.error("请确认该员工是否存在!");
} }
/** /**
* 员工搜索 * 员工搜索
*
* @param * @param
* @return * @return
*/ */
...@@ -281,58 +301,62 @@ public class YgglController { ...@@ -281,58 +301,62 @@ public class YgglController {
Integer b = ygQueryDto.getBmgwid(); Integer b = ygQueryDto.getBmgwid();
ArrayList<Integer> bList = new ArrayList<Integer>(); ArrayList<Integer> bList = new ArrayList<Integer>();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); .eq(ZzglBmgwM::getOrgCode, orgCode).list();
ZzglBmgwM.getDepts(bList, b, zzglBmgwMs); ZzglBmgwM.getDepts(bList, b, zzglBmgwMs);
Integer j = ygQueryDto.getJobStatus(); Integer j = ygQueryDto.getJobStatus();
Integer t = ygQueryDto.getJobType(); Integer t = ygQueryDto.getJobType();
String q = ygQueryDto.getQuery(); String q = ygQueryDto.getQuery();
Page<YgglMainEmp> page = new Page<YgglMainEmp>( Page<YgglMainEmp> page = new Page<YgglMainEmp>(
ygQueryDto.getCurrentPage() == null ? 1 : ygQueryDto.getCurrentPage(), ygQueryDto.getCurrentPage() == null ? 1 : ygQueryDto.getCurrentPage(),
ygQueryDto.getTotalPage() == null ? 10 : ygQueryDto.getTotalPage()); ygQueryDto.getTotalPage() == null ? 10 : ygQueryDto.getTotalPage());
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>(); QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<>();
queryWrapper. queryWrapper.select("name", "emp_num", "bmgw_id", "rz_time", "job_type", "phone", "job_status")
select("name","emp_num","bmgw_id","rz_time","job_type","phone","job_status").ne("job_status", 4) .ne("job_status", 4).eq("org_code", orgCode).eq(t != null && t > -1, "job_type", t)
.eq("org_code", orgCode).eq(t != null && t > -1, "job_type", t) .eq(j != null && j > -1, "job_status", j).in(!bList.isEmpty(), "bmgw_id", bList)
.eq(j != null && j > -1, "job_status", j).in(!bList.isEmpty(), "bmgw_id", bList) .and(!StrUtil.hasBlank(q), wq -> wq.like("name", q).or().like("phone", q));
.and(!StrUtil.hasBlank(q), wq -> wq.like("name", q).or().like("phone", q));
// List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper); // List<YgglMainEmp> lo = YgglMainEmp.builder().build().selectList(queryWrapper);
IPage<YgglMainEmp> ygglMainEmpPage = YgglMainEmp.builder().build().selectPage(page, queryWrapper); IPage<YgglMainEmp> ygglMainEmpPage = YgglMainEmp.builder().build().selectPage(page, queryWrapper);
// List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords(); // List<YgglMainEmp> ygglMainEmps = ygglMainEmpPage.getRecords();
return ResultUtil.data(ygglMainEmpPage, "员工搜索成功"); return ResultUtil.data(ygglMainEmpPage, "员工搜索成功");
// return ResultUtil.data(ygglMainEmpPage, ygglMainEmps, "员工搜索成功"); // return ResultUtil.data(ygglMainEmpPage, ygglMainEmps, "员工搜索成功");
} }
/** /**
* 导入威力加强版 * 导入威力加强版
*
* @param * @param
* @return * @return
*/ */
@PostMapping(value = "/ygdas") @PostMapping(value = "/ygdas")
@ApiOperation(value = "导入威力加强版", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "导入威力加强版", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
public Result<List<YgDrjqbDto>> ygdr(@CurrentUser UserBean userBean,@RequestBody YgDrsDto drList) { public Result<List<YgDrjqbDto>> ygdr(@CurrentUser UserBean userBean, @RequestBody YgDrsDto drList) {
drList.setOrgCode(userBean.getOrgCode()); drList.setOrgCode(userBean.getOrgCode());
YgDrsDto tofList = errorFilter(drList);//滤嘴,过滤信息 YgDrsDto tofList = errorFilter(drList);// 滤嘴,过滤信息
if (tofList.getDrList().size()==0) return ResultUtil.data(tofList.getErrorList(), "导入发生错误人员名单"); if (tofList.getDrList().size() == 0)
YgDrsDto tof = optFilter(tofList);//彻底规范好数据 return ResultUtil.data(tofList.getErrorList(), "导入发生错误人员名单");
List<YgDrjqbDto> trueList = tof.getDrList();//拿出正确的信息 YgDrsDto tof = optFilter(tofList);// 彻底规范好数据
List<YgDrjqbDto> errorList = tof.getErrorList();//拿出错误的信息 List<YgDrjqbDto> trueList = tof.getDrList();// 拿出正确的信息
if (trueList.size()==0) return ResultUtil.data(errorList, "导入发生错误人员名单"); List<YgDrjqbDto> errorList = tof.getErrorList();// 拿出错误的信息
if (trueList.size() == 0)
return ResultUtil.data(errorList, "导入发生错误人员名单");
for (YgDrjqbDto e : trueList) { for (YgDrjqbDto e : trueList) {
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper).eq(QyzxEmpLogin::getPhone,e.getPhone()).one(); QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
//证件类型为0 .eq(QyzxEmpLogin::getPhone, e.getPhone()).one();
Integer jobType = Integer.valueOf(e.getJobType());//工作类型 // 证件类型为0
Integer syq=Integer.valueOf(e.getSyq());//试用期 Integer jobType = Integer.valueOf(e.getJobType());// 工作类型
Integer sex=Integer.valueOf(e.getSex());//性别,还差一个岗位 Integer syq = Integer.valueOf(e.getSyq());// 试用期
Integer gw= e.getHavebmid(); Integer sex = Integer.valueOf(e.getSex());// 性别,还差一个岗位
Integer gw = e.getHavebmid();
String jobNum = e.getYgnbgh(); String jobNum = e.getYgnbgh();
Integer jg = e.getJg(); Integer jg = e.getJg();
Date birthday = e.getBirthday(); Date birthday = e.getBirthday();
//入职日期 // 入职日期
Date rzdate = new Date(); Date rzdate = new Date();
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");//正杠 SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");// 正杠
if (e.getRzTime().indexOf("-")!=-1) { if (e.getRzTime().indexOf("-") != -1) {
try { try {
rzdate = straight.parse(e.getRzTime()); rzdate = straight.parse(e.getRzTime());
} catch (ParseException PException) { } catch (ParseException PException) {
...@@ -342,8 +366,8 @@ public class YgglController { ...@@ -342,8 +366,8 @@ public class YgglController {
continue; continue;
} }
} }
//判断是否已有员工登录表 // 判断是否已有员工登录表
if (login==null) {// 添加三张表 if (login == null) {// 添加三张表
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(e.getPhone()).pw(Md5.md5("123456")) QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(e.getPhone()).pw(Md5.md5("123456"))
.sts(CommonEnum.U_STS_ON.getType()).orgId(userBean.getOrgCode()).username(e.getName()).build(); .sts(CommonEnum.U_STS_ON.getType()).orgId(userBean.getOrgCode()).username(e.getName()).build();
if (!qyzxEmpLogin.insert()) { if (!qyzxEmpLogin.insert()) {
...@@ -354,294 +378,330 @@ public class YgglController { ...@@ -354,294 +378,330 @@ public class YgglController {
} }
// 员工权限表(未定) // 员工权限表(未定)
// 员工企业关联表和员工档案,员工成长表(未定) // 员工企业关联表和员工档案,员工成长表(未定)
QyzxEmpEntAsso.builder().empNum(qyzxEmpLogin.getId()).orgCode(userBean.getOrgCode()) QyzxEmpEntAsso.builder().empNum(qyzxEmpLogin.getId()).orgCode(userBean.getOrgCode()).userType(2)
.userType(2).status(1).build().insert();// userType2普通员工 .status(1).build().insert();// userType2普通员工
YgglMainEmp emp = YgglMainEmp.builder() YgglMainEmp emp = YgglMainEmp.builder().name(e.getName()).phone(e.getPhone()).zjType(0).zjNum(e.getZj())
.name(e.getName()).phone(e.getPhone()).zjType(0) .jobType(jobType).rzTime(rzdate).updateTime(new Date()).updateMan(userBean.getEmpNum()).syq(syq)
.zjNum(e.getZj()).jobType(jobType).rzTime(rzdate) .sex(sex).jobNum(jobNum).bmgwId(gw).empNum(qyzxEmpLogin.getId()).orgCode(userBean.getOrgCode())
.updateTime(new Date()).updateMan(userBean.getEmpNum()).syq(syq) .build();
.sex(sex).jobNum(jobNum).bmgwId(gw)
.empNum(qyzxEmpLogin.getId()).orgCode(userBean.getOrgCode()).build();
emp.insert(); emp.insert();
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper) new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()) .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getId, emp.getId())
.eq(YgglMainEmp::getId, emp.getId()) .set(birthday != null, YgglMainEmp::getBirthday, birthday)
.set(birthday!=null, YgglMainEmp::getBirthday, birthday) .set(jg != null && jg != 0, YgglMainEmp::getJg, jg).update();
.set(jg!=null && jg!=0, YgglMainEmp::getJg, jg).update();
// return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!");
//return ResultUtil.data(ygglMainEmp, "新添加员工档案成功!"); } else {
}else {
// 添加两张表 // 添加两张表
YgglMainEmp ishad = YgglMainEmp.builder().build() YgglMainEmp ishad = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>()
.selectOne(new QueryWrapper<YgglMainEmp>()
.eq("phone", e.getPhone()).eq("org_code", userBean.getOrgCode())); .eq("phone", e.getPhone()).eq("org_code", userBean.getOrgCode()));
if (ishad == null) { if (ishad == null) {
// 员工权限表(未定) // 员工权限表(未定)
QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(userBean.getOrgCode()).userType(2).build().insert();// 2普通员工 QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(userBean.getOrgCode()).userType(2).build()
YgglMainEmp emp = YgglMainEmp.builder().name(e.getName()).phone(e.getPhone()) .insert();// 2普通员工
.zjType(0).zjNum(e.getZj()) YgglMainEmp emp = YgglMainEmp.builder().name(e.getName()).phone(e.getPhone()).zjType(0)
.jobType(jobType).rzTime(rzdate) .zjNum(e.getZj()).jobType(jobType).rzTime(rzdate).updateTime(new Date())
.updateTime(new Date()).updateMan(userBean.getEmpNum()) .updateMan(userBean.getEmpNum()).syq(syq).sex(sex).jobNum(jobNum).empNum(login.getId())
.syq(syq).sex(sex) .orgCode(userBean.getOrgCode()).build();
.jobNum(jobNum).empNum(login.getId()).orgCode(userBean.getOrgCode()).build();
emp.insert(); emp.insert();
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper) new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()) .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getId, emp.getId())
.eq(YgglMainEmp::getId, emp.getId()) .set(birthday != null, YgglMainEmp::getBirthday, birthday)
.set(birthday!=null, YgglMainEmp::getBirthday, birthday) .set(jg != null && jg != 0, YgglMainEmp::getJg, jg).update();
.set(jg!=null && jg!=0, YgglMainEmp::getJg, jg).update();
} else { } else {
e.setError("该手机号码已被使用"); e.setError("该手机号码已被使用");
errorList.add(e); errorList.add(e);
continue; continue;
} }
} }
} }
if (errorList.size()==0) { if (errorList.size() == 0) {
return ResultUtil.success("员工全部导入成功!"); return ResultUtil.success("员工全部导入成功!");
} }
return ResultUtil.data(errorList, "导入发生错误人员名单"); return ResultUtil.data(errorList, "导入发生错误人员名单");
} }
//错误选项过滤器 // 错误选项过滤器
public YgDrsDto errorFilter(YgDrsDto ygDrsDto) { public YgDrsDto errorFilter(YgDrsDto ygDrsDto) {
List<YgDrjqbDto> drList = ygDrsDto.getDrList(); List<YgDrjqbDto> drList = ygDrsDto.getDrList();
List<YgDrjqbDto> newList = new ArrayList<YgDrjqbDto>(drList); List<YgDrjqbDto> newList = new ArrayList<YgDrjqbDto>(drList);
List<YgDrjqbDto> errorList = ygDrsDto.getErrorList(); List<YgDrjqbDto> errorList = ygDrsDto.getErrorList();
Integer orgCode = ygDrsDto.getOrgCode(); Integer orgCode = ygDrsDto.getOrgCode();
Iterator<YgDrjqbDto> itDr = drList.iterator(); Iterator<YgDrjqbDto> itDr = drList.iterator();
@SuppressWarnings("unused") @SuppressWarnings("unused")
YgDrjqbDto a = drList.get(0);//一个员工导入 YgDrjqbDto a = drList.get(0);// 一个员工导入
Integer size = drList.size(); Integer size = drList.size();
for (Integer i=0; i<size;i++) {// for (Integer i = 0; i < size; i++) {//
YgDrjqbDto d = newList.get(i);//计数器 YgDrjqbDto d = newList.get(i);// 计数器
if (itDr.hasNext()) { if (itDr.hasNext()) {
a=itDr.next(); a = itDr.next();
} }
//请填写必填项 // 请填写必填项
String name = newList.get(i).getName(); String phone = newList.get(i).getPhone(); String name = newList.get(i).getName();
String sex = newList.get(i).getSex(); String zj = newList.get(i).getZj(); String phone = newList.get(i).getPhone();
if (StrUtil.hasBlank(name) String sex = newList.get(i).getSex();
|| StrUtil.hasBlank(phone) String zj = newList.get(i).getZj();
|| StrUtil.hasBlank(sex) if (StrUtil.hasBlank(name) || StrUtil.hasBlank(phone) || StrUtil.hasBlank(sex) || StrUtil.hasBlank(zj)) {
|| StrUtil.hasBlank(zj)) {
d.setError("请填写必填项"); d.setError("请填写必填项");
errorList.add(d);itDr.remove();i++;continue; errorList.add(d);
itDr.remove();
i++;
continue;
}
// 手机号码格式不对
String regex = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$";
if (phone.length() != 11) {
d.setError("手机号应为11位数");
errorList.add(d);
itDr.remove();
i++;
continue;
} }
//手机号码格式不对 Pattern p = Pattern.compile(regex);
String regex = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$"; Matcher m = p.matcher(phone);
if (phone.length()!= 11) { boolean isMatch = m.matches();
d.setError("手机号应为11位数"); if (!isMatch) {
errorList.add(d);itDr.remove();i++;continue; d.setError("手机号格式不对");
errorList.add(d);
itDr.remove();
i++;
continue;
} }
Pattern p = Pattern.compile(regex); // 手机号码已被使用
Matcher m = p.matcher(phone); QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
boolean isMatch = m.matches(); .eq(QyzxEmpLogin::getPhone, phone).eq(QyzxEmpLogin::getOrgId, orgCode).one();
if(!isMatch){ if (login != null) {
d.setError("手机号格式不对"); d.setError("手机号码已被使用");
errorList.add(d);itDr.remove();i++;continue; errorList.add(d);
} itDr.remove();
//手机号码已被使用 i++;
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper).eq(QyzxEmpLogin::getPhone,phone).eq(QyzxEmpLogin::getOrgId, orgCode).one(); continue;
if (login!=null) {
d.setError("手机号码已被使用");
errorList.add(d);itDr.remove();i++;continue;
} }
//证件号码信息有误 // 证件号码信息有误
if (zj == null || "".equals(zj)) { if (zj == null || "".equals(zj)) {
d.setError("证件号码信息有误"); d.setError("证件号码信息有误");
errorList.add(d);itDr.remove();i++;continue; errorList.add(d);
} itDr.remove();
String regularExpression = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|" + i++;
"(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)"; continue;
boolean matches = zj.matches(regularExpression); }
if (!matches) { String regularExpression = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|"
d.setError("证件号码信息有误"); + "(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)";
errorList.add(d);itDr.remove();i++;continue; boolean matches = zj.matches(regularExpression);
if (!matches) {
d.setError("证件号码信息有误");
errorList.add(d);
itDr.remove();
i++;
continue;
}
try {
if (zj.length() == 18) {
char[] charArray = zj.toCharArray();
// 前十七位加权因子
int[] idCardWi = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2 };
// 这是除以11后,可能产生的11位余数对应的验证码
String[] idCardY = { "1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2" };
int sum = 0;
for (Integer j = 0; j < idCardWi.length; j++) {
int current = Integer.parseInt(String.valueOf(charArray[j]));
int count = current * idCardWi[j];
sum += count;
}
char idCardLast = charArray[17];
int idCardMod = sum % 11;
if (idCardY[idCardMod].toUpperCase().equals(String.valueOf(idCardLast).toUpperCase())) {
// System.out.println("成功,接着完善员工的个人信息");
String birth = zj.substring(6, 14);
String birthday = birth.substring(0, 4) + "-" + birth.substring(4, 6) + "-"
+ birth.substring(6, 8);
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");
d.setBirthday(straight.parse(birthday));
d.setJg(Integer.parseInt(zj.substring(0, 6)));
} else {
// System.out.println("身份证最后一位:" + String.valueOf(idCardLast).toUpperCase() +
// "错误,正确的应该是:" + idCardY[idCardMod].toUpperCase());
// return false;
d.setError("证件号码信息有误");
errorList.add(d);
itDr.remove();
i++;
continue;
}
} else {
// 给15位数的添加生日籍贯
String birth = zj.substring(6, 12);
String birthday = "19" + birth.substring(0, 2) + "-" + birth.substring(2, 4) + "-"
+ birth.substring(4, 6);
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");
d.setBirthday(straight.parse(birthday));
d.setJg(Integer.parseInt(zj.substring(0, 6)));
}
} catch (Exception e) {
e.printStackTrace();
// System.out.println("异常:" + zj);
// return false;
d.setError("证件号码信息有误");
errorList.add(d);
itDr.remove();
i++;
continue;
} }
try { // 部门岗位有误
if (zj.length() == 18) { String oneb = newList.get(i).getOneb();
char[] charArray = zj.toCharArray(); String twob = newList.get(i).getTwob();
//前十七位加权因子 String threeb = newList.get(i).getThreeb();
int[] idCardWi = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}; String fourb = newList.get(i).getFourb();
//这是除以11后,可能产生的11位余数对应的验证码 String gw = newList.get(i).getGw();
String[] idCardY = {"1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"}; String[] bms = { oneb, twob, threeb, fourb };
int sum = 0; if (StrUtil.hasBlank(gw) && StrUtil.hasBlank(oneb) && StrUtil.hasBlank(twob) && StrUtil.hasBlank(threeb)
for (Integer j = 0; j < idCardWi.length; j++) { && StrUtil.hasBlank(fourb)) { // 没填写岗位,通过~ //
int current = Integer.parseInt(String.valueOf(charArray[j])); } else {
int count = current * idCardWi[j]; // 填写了部门岗位,办他!
sum += count; Integer isHaveBmgw = isHavebmgw(bms, gw, orgCode);
} if (isHaveBmgw == 0) {
char idCardLast = charArray[17]; d.setError("部门岗位有误");
int idCardMod = sum % 11; errorList.add(d);
if (idCardY[idCardMod].toUpperCase().equals(String.valueOf(idCardLast).toUpperCase())) { itDr.remove();
//System.out.println("成功,接着完善员工的个人信息"); i++;
String birth = zj.substring(6, 14); continue;
String birthday =birth.substring(0, 4)+"-"+birth.substring(4, 6)+"-"+birth.substring(6,8); } else {
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd"); // 获取到部门岗位id啦!
d.setBirthday(straight.parse(birthday));
d.setJg(Integer.parseInt(zj.substring(0, 6)));
} else {
//System.out.println("身份证最后一位:" + String.valueOf(idCardLast).toUpperCase() +
// "错误,正确的应该是:" + idCardY[idCardMod].toUpperCase());
//return false;
d.setError("证件号码信息有误");
errorList.add(d);itDr.remove();i++;continue;
}
}else {
//给15位数的添加生日籍贯
String birth = zj.substring(6, 12);
String birthday = "19" + birth.substring(0, 2) + "-" + birth.substring(2, 4) + "-" + birth.substring(4, 6);
SimpleDateFormat straight = new SimpleDateFormat("yyyy-MM-dd");
d.setBirthday(straight.parse(birthday));
d.setJg(Integer.parseInt(zj.substring(0, 6)));
}
} catch (Exception e) {
e.printStackTrace();
//System.out.println("异常:" + zj);
//return false;
d.setError("证件号码信息有误");
errorList.add(d);itDr.remove();i++;continue;
}
//部门岗位有误
String oneb = newList.get(i).getOneb();String twob = newList.get(i).getTwob();
String threeb = newList.get(i).getThreeb();String fourb = newList.get(i).getFourb();
String gw = newList.get(i).getGw();
String[] bms = {oneb,twob,threeb,fourb};
if (StrUtil.hasBlank(gw) && StrUtil.hasBlank(oneb)
&& StrUtil.hasBlank(twob) && StrUtil.hasBlank(threeb)
&& StrUtil.hasBlank(fourb)) { //没填写岗位,通过~ //
}else {
//填写了部门岗位,办他!
Integer isHaveBmgw = isHavebmgw(bms,gw,orgCode);
if (isHaveBmgw == 0) {
d.setError("部门岗位有误");
errorList.add(d);itDr.remove();i++;continue;
}else {
//获取到部门岗位id啦!
d.setHavebmid(isHaveBmgw); d.setHavebmid(isHaveBmgw);
} }
} }
}//for循环完毕! } // for循环完毕!
YgDrsDto tofList = new YgDrsDto(drList, errorList, orgCode); YgDrsDto tofList = new YgDrsDto(drList, errorList, orgCode);
return tofList; return tofList;
} }
//选填项过滤器 // 选填项过滤器
public YgDrsDto optFilter(YgDrsDto ygDrsDto) { public YgDrsDto optFilter(YgDrsDto ygDrsDto) {
List<YgDrjqbDto> drList = ygDrsDto.getDrList(); List<YgDrjqbDto> drList = ygDrsDto.getDrList();
List<YgDrjqbDto> newList = new ArrayList<YgDrjqbDto>(drList); List<YgDrjqbDto> newList = new ArrayList<YgDrjqbDto>(drList);
List<YgDrjqbDto> errorList = ygDrsDto.getErrorList(); List<YgDrjqbDto> errorList = ygDrsDto.getErrorList();
Integer orgCode = ygDrsDto.getOrgCode(); Integer orgCode = ygDrsDto.getOrgCode();
Iterator<YgDrjqbDto> itDr = drList.iterator(); Iterator<YgDrjqbDto> itDr = drList.iterator();
@SuppressWarnings("unused") @SuppressWarnings("unused")
YgDrjqbDto a = drList.get(0);//一个员工导入 YgDrjqbDto a = drList.get(0);// 一个员工导入
Integer size = drList.size(); Integer size = drList.size();
for (Integer i=0; i<size;i++) {// for (Integer i = 0; i < size; i++) {//
YgDrjqbDto d = newList.get(i);//计数器 YgDrjqbDto d = newList.get(i);// 计数器
if (itDr.hasNext()) { if (itDr.hasNext()) {
a=itDr.next(); a = itDr.next();
} }
//for (YgDrjqbDto d : drList) { // for (YgDrjqbDto d : drList) {
String ygnbgh = d.getYgnbgh(); String sex = d.getSex(); String ygnbgh = d.getYgnbgh();
String jobType = d.getJobType();String jobStatus = d.getJobStatus(); String sex = d.getSex();
String rzTime = d.getRzTime();String syq = d.getSyq(); String jobType = d.getJobType();
String jobStatus = d.getJobStatus();
String zy = d.getZy();String address = d.getAddress(); String rzTime = d.getRzTime();
String hjAddress = d.getHkAddress();String qq = d.getQq(); String syq = d.getSyq();
String weixin =d.getWeixin(); String email = d.getEmail();
String[] bathroom = {ygnbgh,sex,jobType,jobStatus,rzTime,syq,zy,address,hjAddress,qq,weixin,email}; String zy = d.getZy();
boolean child=takeshower(bathroom); String address = d.getAddress();
String hjAddress = d.getHkAddress();
String qq = d.getQq();
String weixin = d.getWeixin();
String email = d.getEmail();
String[] bathroom = { ygnbgh, sex, jobType, jobStatus, rzTime, syq, zy, address, hjAddress, qq, weixin,
email };
boolean child = takeshower(bathroom);
if (child == false) { if (child == false) {
d.setError("填写内容不要大于50字数"); d.setError("填写内容不要大于50字数");
errorList.add(d);itDr.remove();i++;continue; errorList.add(d);
itDr.remove();
i++;
continue;
} }
//公司内部工号 // 公司内部工号
if (ygnbgh != null && ygnbgh.length() != 0) { if (ygnbgh != null && ygnbgh.length() != 0) {
d.setYgnbgh(ygnbgh.trim()); d.setYgnbgh(ygnbgh.trim());
}else { } else {
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
String bh = format.format(new Date())+orgCode+i+System.currentTimeMillis(); String bh = format.format(new Date()) + orgCode + i + System.currentTimeMillis();
d.setYgnbgh(bh); d.setYgnbgh(bh);
} }
//男女(最大优化) // 男女(最大优化)
d.setSex(YgEnumInterface.sex.isMan(sex)); d.setSex(YgEnumInterface.sex.isMan(sex));
//工作性质(最大优化) // 工作性质(最大优化)
d.setJobType(YgEnumInterface.YgJobType.choose(jobType)); d.setJobType(YgEnumInterface.YgJobType.choose(jobType));
//员工状态(最大优化) // 员工状态(最大优化)
d.setJobStatus(YgEnumInterface.jobStatus.isZhen(jobStatus)); d.setJobStatus(YgEnumInterface.jobStatus.isZhen(jobStatus));
//入职日期(最大优化) // 入职日期(最大优化)
d.setRzTime(YgEnumInterface.rzTime.tranTime2(YgEnumInterface.rzTime.tranTime(rzTime))); d.setRzTime(YgEnumInterface.rzTime.tranTime2(YgEnumInterface.rzTime.tranTime(rzTime)));
//试用期(最大优化) // 试用期(最大优化)
d.setSyq(YgEnumInterface.syq.choose(syq)); d.setSyq(YgEnumInterface.syq.choose(syq));
} }
YgDrsDto clear = new YgDrsDto(drList, errorList, orgCode); YgDrsDto clear = new YgDrsDto(drList, errorList, orgCode);
return clear; return clear;
} }
//浴池,洗去选填项字节大于100的选项 // 浴池,洗去选填项字节大于100的选项
public boolean takeshower(String[] bathroom){ public boolean takeshower(String[] bathroom) {
for (String b : bathroom) { for (String b : bathroom) {
if (b.length()>100) { if (b.length() > 100) {
return false;}} return false;
return true;} }
}
//判断是否导入组织部门 return true;
public Integer isHavebmgw(String[] bms,String gw,Integer orgCode) { }
//将姓名转为部门岗位对象
// 判断是否导入组织部门
public Integer isHavebmgw(String[] bms, String gw, Integer orgCode) {
// 将姓名转为部门岗位对象
List<ZzglBmgwM> gwList = new ArrayList<ZzglBmgwM>(); List<ZzglBmgwM> gwList = new ArrayList<ZzglBmgwM>();
//判断有几个部门,且这几个部门是否属实,里面不包括岗位 // 判断有几个部门,且这几个部门是否属实,里面不包括岗位
for (String bm : bms) { for (String bm : bms) {
if(!StrUtil.hasBlank(bm)){ if (!StrUtil.hasBlank(bm)) {
ZzglBmgwM ibm = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) ZzglBmgwM ibm = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).eq(ZzglBmgwM::getName, bm)
.eq(ZzglBmgwM::getName, bm) .eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 0).one(); // 选择部门类型0为部门,1为岗位
.eq(ZzglBmgwM::getOrgCode,orgCode) if (ibm == null) {
.eq(ZzglBmgwM::getType, 0).one(); //选择部门类型0为部门,1为岗位 return 0;
if (ibm == null) { return 0;} //找不到有相关名称的部门则报错 } // 找不到有相关名称的部门则报错
gwList.add(ibm); gwList.add(ibm);
}else { } else {
break; break;
} }
} }
Integer qiantao = qiantao(gwList,gw,0,orgCode); Integer qiantao = qiantao(gwList, gw, 0, orgCode);
if (qiantao!=0) { if (qiantao != 0) {
return qiantao;//组织部门成立! return qiantao;// 组织部门成立!
}else { } else {
return 0;//失败 return 0;// 失败
} }
}; };
//判断是否导入组织部门的嵌套并寻找到正确岗位id // 判断是否导入组织部门的嵌套并寻找到正确岗位id
public Integer qiantao(List<ZzglBmgwM>gwList,String gw,Integer upid,Integer orgCode) { public Integer qiantao(List<ZzglBmgwM> gwList, String gw, Integer upid, Integer orgCode) {
//重写 // 重写
if (upid!=0 && !gwList.get(0).getUpId().equals(upid)) { if (upid != 0 && !gwList.get(0).getUpId().equals(upid)) {
return 0; return 0;
} }
upid = gwList.get(0).getId(); upid = gwList.get(0).getId();
if (gwList.size() == 1) { if (gwList.size() == 1) {
ZzglBmgwM igw = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) ZzglBmgwM igw = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper).eq(ZzglBmgwM::getName, gw)
.eq(ZzglBmgwM::getName, gw) .eq(ZzglBmgwM::getUpId, upid).eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 1).one();
.eq(ZzglBmgwM::getUpId, upid) if (igw == null) {
.eq(ZzglBmgwM::getOrgCode,orgCode)
.eq(ZzglBmgwM::getType, 1).one();
if (igw==null) {
return 0; return 0;
} }
return igw.getId(); return igw.getId();
} }
gwList.remove(0); gwList.remove(0);
Integer q = qiantao(gwList,gw,upid,orgCode); Integer q = qiantao(gwList, gw, upid, orgCode);
return q; return q;
}; };
/** /**
* 导出员工 * 导出员工
*
* @param * @param
* @return * @return
*/ */
...@@ -649,13 +709,15 @@ public class YgglController { ...@@ -649,13 +709,15 @@ public class YgglController {
@ApiOperation(value = "导出", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "导出", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
public Result<List<YgglMainEmp>> selectygdas(@CurrentUser UserBean userBean) { public Result<List<YgglMainEmp>> selectygdas(@CurrentUser UserBean userBean) {
int[] jList = {1,2,3}; int[] jList = { 1, 2, 3 };
List<YgglMainEmp> list = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper).eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getJobStatus, jList).list(); List<YgglMainEmp> list = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getJobStatus, jList).list();
return ResultUtil.data(list, "导出员工成功"); return ResultUtil.data(list, "导出员工成功");
} }
/** /**
* 获取员工教育经历表 * 获取员工教育经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -663,11 +725,12 @@ public class YgglController { ...@@ -663,11 +725,12 @@ public class YgglController {
@ApiOperation(value = "获取员工教育经历表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工教育经历表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
public Result<List<YgglAttaJyjlb>> selectjyjlb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaJyjlb>> selectjyjlb(@CurrentUser UserBean userBean) {
List<YgglAttaJyjlb> ygglAttaJyjlbss = YgglAttaJyjlb.builder().build().selectList(new QueryWrapper<YgglAttaJyjlb>() List<YgglAttaJyjlb> ygglAttaJyjlbss = YgglAttaJyjlb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaJyjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaJyjlbss, "获取员工教育经历表成功"); return ResultUtil.data(ygglAttaJyjlbss, "获取员工教育经历表成功");
} }
// 获取员工教育经历表 // 获取员工教育经历表
@GetMapping(value = "/jyjlb/{empNum}") @GetMapping(value = "/jyjlb/{empNum}")
@ApiOperation(value = "获取员工教育经历表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工教育经历表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -677,9 +740,10 @@ public class YgglController { ...@@ -677,9 +740,10 @@ public class YgglController {
new QueryWrapper<YgglAttaJyjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaJyjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaJyjlbs, "获取员工教育经历表成功"); return ResultUtil.data(ygglAttaJyjlbs, "获取员工教育经历表成功");
} }
/** /**
* 添加/修改员工教育经历表 * 添加/修改员工教育经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -692,9 +756,10 @@ public class YgglController { ...@@ -692,9 +756,10 @@ public class YgglController {
ygglAttaJyjlb.insertOrUpdate(); ygglAttaJyjlb.insertOrUpdate();
return ResultUtil.data(ygglAttaJyjlb, "添加/修改员工教育经历表成功"); return ResultUtil.data(ygglAttaJyjlb, "添加/修改员工教育经历表成功");
} }
/** /**
* 删除员工教育经历表 * 删除员工教育经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -706,9 +771,10 @@ public class YgglController { ...@@ -706,9 +771,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaJyjlb.builder().build() return ResultUtil.data(YgglAttaJyjlb.builder().build()
.delete(new QueryWrapper<YgglAttaJyjlb>().eq("org_code", orgCode).eq("id", id)), "删除员工教育经历表成功"); .delete(new QueryWrapper<YgglAttaJyjlb>().eq("org_code", orgCode).eq("id", id)), "删除员工教育经历表成功");
} }
/** /**
* 获取员工培训经历信息表 * 获取员工培训经历信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -716,10 +782,12 @@ public class YgglController { ...@@ -716,10 +782,12 @@ public class YgglController {
@ApiOperation(value = "获取员工培训经历信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工培训经历信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 13) @ApiOperationSupport(order = 13)
public Result<List<YgglAttaPxjlxxb>> selectpxjlxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaPxjlxxb>> selectpxjlxxb(@CurrentUser UserBean userBean) {
List<YgglAttaPxjlxxb> ygglAttaPxjlxxbs = YgglAttaPxjlxxb.builder().build().selectList(new QueryWrapper<YgglAttaPxjlxxb>() List<YgglAttaPxjlxxb> ygglAttaPxjlxxbs = YgglAttaPxjlxxb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaPxjlxxbs, "获取员工培训经历信息表成功"); return ResultUtil.data(ygglAttaPxjlxxbs, "获取员工培训经历信息表成功");
} }
// 获取员工培训经历信息表 // 获取员工培训经历信息表
@GetMapping(value = "/pxjlxxb/{empNum}") @GetMapping(value = "/pxjlxxb/{empNum}")
@ApiOperation(value = "获取员工培训经历信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工培训经历信息表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -729,8 +797,10 @@ public class YgglController { ...@@ -729,8 +797,10 @@ public class YgglController {
new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaPxjlxxbs, "获取员工培训经历信息表成功"); return ResultUtil.data(ygglAttaPxjlxxbs, "获取员工培训经历信息表成功");
} }
/** /**
* 添加/修改员工培训经历信息表 * 添加/修改员工培训经历信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -744,8 +814,10 @@ public class YgglController { ...@@ -744,8 +814,10 @@ public class YgglController {
ygglAttaPxjlxxb.insertOrUpdate(); ygglAttaPxjlxxb.insertOrUpdate();
return ResultUtil.data(ygglAttaPxjlxxb, "添加/修改员工培训经历信息表成功"); return ResultUtil.data(ygglAttaPxjlxxb, "添加/修改员工培训经历信息表成功");
} }
/** /**
* 删除员工培训经历信息表 * 删除员工培训经历信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -757,8 +829,10 @@ public class YgglController { ...@@ -757,8 +829,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaPxjlxxb.builder().build() return ResultUtil.data(YgglAttaPxjlxxb.builder().build()
.delete(new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工培训经历信息表成功"); .delete(new QueryWrapper<YgglAttaPxjlxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工培训经历信息表成功");
} }
/** /**
* 获取员工工作经历表 * 获取员工工作经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -766,10 +840,12 @@ public class YgglController { ...@@ -766,10 +840,12 @@ public class YgglController {
@ApiOperation(value = "获取员工工作经历表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工工作经历表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 17) @ApiOperationSupport(order = 17)
public Result<List<YgglAttaGzjlb>> selectgzjlb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaGzjlb>> selectgzjlb(@CurrentUser UserBean userBean) {
List<YgglAttaGzjlb> ygglAttaGzjlbs = YgglAttaGzjlb.builder().build().selectList(new QueryWrapper<YgglAttaGzjlb>() List<YgglAttaGzjlb> ygglAttaGzjlbs = YgglAttaGzjlb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaGzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaGzjlbs, "获取员工工作经历表成功"); return ResultUtil.data(ygglAttaGzjlbs, "获取员工工作经历表成功");
} }
// 获取员工工作经历表 // 获取员工工作经历表
@GetMapping(value = "/gzjlb/{empNum}") @GetMapping(value = "/gzjlb/{empNum}")
@ApiOperation(value = "获取员工工作经历表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工工作经历表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -779,8 +855,10 @@ public class YgglController { ...@@ -779,8 +855,10 @@ public class YgglController {
new QueryWrapper<YgglAttaGzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaGzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaGzjlbs, "获取员工工作经历表成功"); return ResultUtil.data(ygglAttaGzjlbs, "获取员工工作经历表成功");
} }
/** /**
* 添加/修改员工工作经历表 * 添加/修改员工工作经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -793,8 +871,10 @@ public class YgglController { ...@@ -793,8 +871,10 @@ public class YgglController {
ygglAttaGzjlb.insertOrUpdate(); ygglAttaGzjlb.insertOrUpdate();
return ResultUtil.data(ygglAttaGzjlb, "添加/修改员工工作经历表成功"); return ResultUtil.data(ygglAttaGzjlb, "添加/修改员工工作经历表成功");
} }
/** /**
* 删除员工工作经历表 * 删除员工工作经历表
*
* @param * @param
* @return * @return
*/ */
...@@ -804,10 +884,12 @@ public class YgglController { ...@@ -804,10 +884,12 @@ public class YgglController {
public Result<Boolean> delgzjlb(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Boolean> delgzjlb(@CurrentUser UserBean userBean, @PathVariable Integer id) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
return ResultUtil.data(YgglAttaGzjlb.builder().build() return ResultUtil.data(YgglAttaGzjlb.builder().build()
.delete(new QueryWrapper<YgglAttaGzjlb>().eq("org_code", orgCode).eq("id", id)), "删除员工工作经历表成功"); .delete(new QueryWrapper<YgglAttaGzjlb>().eq("org_code", orgCode).eq("id", id)), "删除员工工作经历表成功");
} }
/** /**
* 获取员工职称信息表 * 获取员工职称信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -815,10 +897,12 @@ public class YgglController { ...@@ -815,10 +897,12 @@ public class YgglController {
@ApiOperation(value = "获取员工职称信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工职称信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 21) @ApiOperationSupport(order = 21)
public Result<List<YgglAttaZcxxb>> selectzcxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaZcxxb>> selectzcxxb(@CurrentUser UserBean userBean) {
List<YgglAttaZcxxb> ygglAttaZcxxbs = YgglAttaZcxxb.builder().build().selectList(new QueryWrapper<YgglAttaZcxxb>() List<YgglAttaZcxxb> ygglAttaZcxxbs = YgglAttaZcxxb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaZcxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaZcxxbs, "获取员工职称信息表成功"); return ResultUtil.data(ygglAttaZcxxbs, "获取员工职称信息表成功");
} }
// 获取员工职称信息表 // 获取员工职称信息表
@GetMapping(value = "/zcxxb/{empNum}") @GetMapping(value = "/zcxxb/{empNum}")
@ApiOperation(value = "获取员工职称信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工职称信息表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -828,8 +912,10 @@ public class YgglController { ...@@ -828,8 +912,10 @@ public class YgglController {
new QueryWrapper<YgglAttaZcxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaZcxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaZcxxbs, "获取员工职称信息表成功"); return ResultUtil.data(ygglAttaZcxxbs, "获取员工职称信息表成功");
} }
/** /**
* 添加/修改员工职称信息表 * 添加/修改员工职称信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -842,8 +928,10 @@ public class YgglController { ...@@ -842,8 +928,10 @@ public class YgglController {
ygglAttaZcxxb.insertOrUpdate(); ygglAttaZcxxb.insertOrUpdate();
return ResultUtil.data(ygglAttaZcxxb, "添加/修改员工职称信息表成功"); return ResultUtil.data(ygglAttaZcxxb, "添加/修改员工职称信息表成功");
} }
/** /**
* 删除员工职称信息表 * 删除员工职称信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -855,8 +943,10 @@ public class YgglController { ...@@ -855,8 +943,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaZcxxb.builder().build() return ResultUtil.data(YgglAttaZcxxb.builder().build()
.delete(new QueryWrapper<YgglAttaZcxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工职称信息表成功"); .delete(new QueryWrapper<YgglAttaZcxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工职称信息表成功");
} }
/** /**
* 获取员工证书证件表 * 获取员工证书证件表
*
* @param * @param
* @return * @return
*/ */
...@@ -864,21 +954,25 @@ public class YgglController { ...@@ -864,21 +954,25 @@ public class YgglController {
@ApiOperation(value = "获取员工证书证件表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工证书证件表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 25) @ApiOperationSupport(order = 25)
public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean) {
List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build().selectList(new QueryWrapper<YgglAttaZszjb>() List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaZszjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaZszjbs, "获取员工证书证件表成功"); return ResultUtil.data(ygglAttaZszjbs, "获取员工证书证件表成功");
} }
// 获取员工证书证件表 // 获取员工证书证件表
@GetMapping(value = "/zszjb/{empNum}") @GetMapping(value = "/zszjb/{empNum}")
@ApiOperation(value = "获取员工证书证件表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工证书证件表(管)", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 26) @ApiOperationSupport(order = 26)
public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) { public Result<List<YgglAttaZszjb>> selectzszjb(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build().selectList( List<YgglAttaZszjb> ygglAttaZszjbs = YgglAttaZszjb.builder().build().selectList(
new QueryWrapper<YgglAttaZszjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaZszjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaZszjbs, "获取员工证书证件表成功"); return ResultUtil.data(ygglAttaZszjbs, "获取员工证书证件表成功");
} }
/** /**
* 添加/修改员工证书证件表 * 添加/修改员工证书证件表
*
* @param * @param
* @return * @return
*/ */
...@@ -891,8 +985,10 @@ public class YgglController { ...@@ -891,8 +985,10 @@ public class YgglController {
ygglAttaZszjb.insertOrUpdate(); ygglAttaZszjb.insertOrUpdate();
return ResultUtil.data(ygglAttaZszjb, "添加/修改员工证书证件表成功"); return ResultUtil.data(ygglAttaZszjb, "添加/修改员工证书证件表成功");
} }
/** /**
* 删除员工证书证件表 * 删除员工证书证件表
*
* @param * @param
* @return * @return
*/ */
...@@ -904,8 +1000,10 @@ public class YgglController { ...@@ -904,8 +1000,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaZszjb.builder().build() return ResultUtil.data(YgglAttaZszjb.builder().build()
.delete(new QueryWrapper<YgglAttaZszjb>().eq("org_code", orgCode).eq("id", id)), "删除员工证书证件表成功"); .delete(new QueryWrapper<YgglAttaZszjb>().eq("org_code", orgCode).eq("id", id)), "删除员工证书证件表成功");
} }
/** /**
* 获取员工联系信息表 * 获取员工联系信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -913,10 +1011,12 @@ public class YgglController { ...@@ -913,10 +1011,12 @@ public class YgglController {
@ApiOperation(value = "获取员工联系信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工联系信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 29) @ApiOperationSupport(order = 29)
public Result<List<YgglAttaLxxxb>> selectlxxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaLxxxb>> selectlxxxb(@CurrentUser UserBean userBean) {
List<YgglAttaLxxxb> ygglAttaLxxxbs = YgglAttaLxxxb.builder().build().selectList(new QueryWrapper<YgglAttaLxxxb>() List<YgglAttaLxxxb> ygglAttaLxxxbs = YgglAttaLxxxb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaLxxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaLxxxbs, "获取员工联系信息表成功"); return ResultUtil.data(ygglAttaLxxxbs, "获取员工联系信息表成功");
} }
// 获取员工联系信息表 // 获取员工联系信息表
@GetMapping(value = "/lxxxb/{empNum}") @GetMapping(value = "/lxxxb/{empNum}")
@ApiOperation(value = "获取员工联系信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工联系信息表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -926,8 +1026,10 @@ public class YgglController { ...@@ -926,8 +1026,10 @@ public class YgglController {
new QueryWrapper<YgglAttaLxxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaLxxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaLxxxbs, "获取员工联系信息表成功"); return ResultUtil.data(ygglAttaLxxxbs, "获取员工联系信息表成功");
} }
/** /**
* 添加/修改员工联系信息表 * 添加/修改员工联系信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -940,8 +1042,10 @@ public class YgglController { ...@@ -940,8 +1042,10 @@ public class YgglController {
ygglAttaLxxxb.insertOrUpdate(); ygglAttaLxxxb.insertOrUpdate();
return ResultUtil.data(ygglAttaLxxxb, "添加/修改员工联系信息表成功"); return ResultUtil.data(ygglAttaLxxxb, "添加/修改员工联系信息表成功");
} }
/** /**
* 删除员工联系信息表 * 删除员工联系信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -953,8 +1057,10 @@ public class YgglController { ...@@ -953,8 +1057,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaLxxxb.builder().build() return ResultUtil.data(YgglAttaLxxxb.builder().build()
.delete(new QueryWrapper<YgglAttaLxxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工联系信息表成功"); .delete(new QueryWrapper<YgglAttaLxxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工联系信息表成功");
} }
/** /**
* 获取员工紧急联系人表 * 获取员工紧急联系人表
*
* @param * @param
* @return * @return
*/ */
...@@ -962,10 +1068,12 @@ public class YgglController { ...@@ -962,10 +1068,12 @@ public class YgglController {
@ApiOperation(value = "获取员工紧急联系人表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工紧急联系人表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 33) @ApiOperationSupport(order = 33)
public Result<List<YgglAttaJjlxr>> selectjjlxr(@CurrentUser UserBean userBean) { public Result<List<YgglAttaJjlxr>> selectjjlxr(@CurrentUser UserBean userBean) {
List<YgglAttaJjlxr> ygglAttaJjlxrs = YgglAttaJjlxr.builder().build().selectList(new QueryWrapper<YgglAttaJjlxr>() List<YgglAttaJjlxr> ygglAttaJjlxrs = YgglAttaJjlxr.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaJjlxr>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaJjlxrs, "获取员工紧急联系人表成功"); return ResultUtil.data(ygglAttaJjlxrs, "获取员工紧急联系人表成功");
} }
// 获取员工紧急联系人表 // 获取员工紧急联系人表
@GetMapping(value = "/jjlxr/{empNum}") @GetMapping(value = "/jjlxr/{empNum}")
@ApiOperation(value = "获取员工紧急联系人表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工紧急联系人表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -975,8 +1083,10 @@ public class YgglController { ...@@ -975,8 +1083,10 @@ public class YgglController {
new QueryWrapper<YgglAttaJjlxr>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaJjlxr>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaJjlxrs, "获取员工紧急联系人表成功"); return ResultUtil.data(ygglAttaJjlxrs, "获取员工紧急联系人表成功");
} }
/** /**
* 添加/修改员工紧急联系人表 * 添加/修改员工紧急联系人表
*
* @param * @param
* @return * @return
*/ */
...@@ -989,8 +1099,10 @@ public class YgglController { ...@@ -989,8 +1099,10 @@ public class YgglController {
ygglAttaJjlxr.insertOrUpdate(); ygglAttaJjlxr.insertOrUpdate();
return ResultUtil.data(ygglAttaJjlxr, "添加/修改员工紧急联系人表成功"); return ResultUtil.data(ygglAttaJjlxr, "添加/修改员工紧急联系人表成功");
} }
/** /**
* 删除员工紧急联系人表 * 删除员工紧急联系人表
*
* @param * @param
* @return * @return
*/ */
...@@ -1002,9 +1114,11 @@ public class YgglController { ...@@ -1002,9 +1114,11 @@ public class YgglController {
return ResultUtil.data(YgglAttaJjlxr.builder().build() return ResultUtil.data(YgglAttaJjlxr.builder().build()
.delete(new QueryWrapper<YgglAttaJjlxr>().eq("org_code", orgCode).eq("id", id)), "删除员工紧急联系人表成功"); .delete(new QueryWrapper<YgglAttaJjlxr>().eq("org_code", orgCode).eq("id", id)), "删除员工紧急联系人表成功");
} }
// 获取工资卡信息 // 获取工资卡信息
/** /**
* 获取员工工资卡信息 * 获取员工工资卡信息
*
* @param * @param
* @return * @return
*/ */
...@@ -1016,6 +1130,7 @@ public class YgglController { ...@@ -1016,6 +1130,7 @@ public class YgglController {
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum()));
return ResultUtil.data(ygglAttaGzks, "获取工资卡信息成功"); return ResultUtil.data(ygglAttaGzks, "获取工资卡信息成功");
} }
// 获取工资卡信息 // 获取工资卡信息
@GetMapping(value = "/gzk/{empNum}") @GetMapping(value = "/gzk/{empNum}")
@ApiOperation(value = "获取员工工资卡信息(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工工资卡信息(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -1025,8 +1140,10 @@ public class YgglController { ...@@ -1025,8 +1140,10 @@ public class YgglController {
new QueryWrapper<YgglAttaGzk>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaGzk>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaGzks, "获取工资卡信息成功"); return ResultUtil.data(ygglAttaGzks, "获取工资卡信息成功");
} }
/** /**
* 添加/修改工资卡信息 * 添加/修改工资卡信息
*
* @param * @param
* @return * @return
*/ */
...@@ -1039,8 +1156,10 @@ public class YgglController { ...@@ -1039,8 +1156,10 @@ public class YgglController {
ygglAttaGzk.insertOrUpdate(); ygglAttaGzk.insertOrUpdate();
return ResultUtil.data(ygglAttaGzk, "添加/修改工资卡信息成功"); return ResultUtil.data(ygglAttaGzk, "添加/修改工资卡信息成功");
} }
/** /**
* 删除工资卡信息 * 删除工资卡信息
*
* @param * @param
* @return * @return
*/ */
...@@ -1052,8 +1171,10 @@ public class YgglController { ...@@ -1052,8 +1171,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaGzk.builder().build() return ResultUtil.data(YgglAttaGzk.builder().build()
.delete(new QueryWrapper<YgglAttaGzk>().eq("org_code", orgCode).eq("id", id)), "删除工资卡信息成功"); .delete(new QueryWrapper<YgglAttaGzk>().eq("org_code", orgCode).eq("id", id)), "删除工资卡信息成功");
} }
/** /**
* 获取员工合同信息表 * 获取员工合同信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -1061,10 +1182,12 @@ public class YgglController { ...@@ -1061,10 +1182,12 @@ public class YgglController {
@ApiOperation(value = "获取员工合同信息表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工合同信息表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 41) @ApiOperationSupport(order = 41)
public Result<List<YgglAttaHtxxb>> selecthtxxb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaHtxxb>> selecthtxxb(@CurrentUser UserBean userBean) {
List<YgglAttaHtxxb> ygglAttaHtxxbs = YgglAttaHtxxb.builder().build().selectList(new QueryWrapper<YgglAttaHtxxb>() List<YgglAttaHtxxb> ygglAttaHtxxbs = YgglAttaHtxxb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaHtxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaHtxxbs, "获取员工合同信息表成功"); return ResultUtil.data(ygglAttaHtxxbs, "获取员工合同信息表成功");
} }
// 获取员工合同信息表 // 获取员工合同信息表
@GetMapping(value = "/htxxb/{empNum}") @GetMapping(value = "/htxxb/{empNum}")
@ApiOperation(value = "获取员工合同信息表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工合同信息表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -1074,8 +1197,10 @@ public class YgglController { ...@@ -1074,8 +1197,10 @@ public class YgglController {
new QueryWrapper<YgglAttaHtxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaHtxxb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaHtxxbs, "获取员工合同信息表成功"); return ResultUtil.data(ygglAttaHtxxbs, "获取员工合同信息表成功");
} }
/** /**
* 添加/修改员工合同信息表 * 添加/修改员工合同信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -1088,8 +1213,10 @@ public class YgglController { ...@@ -1088,8 +1213,10 @@ public class YgglController {
ygglAttaHtxxb.insertOrUpdate(); ygglAttaHtxxb.insertOrUpdate();
return ResultUtil.data(ygglAttaHtxxb, "添加/修改员工合同信息表成功"); return ResultUtil.data(ygglAttaHtxxb, "添加/修改员工合同信息表成功");
} }
/** /**
* 删除员工合同信息表 * 删除员工合同信息表
*
* @param * @param
* @return * @return
*/ */
...@@ -1101,6 +1228,7 @@ public class YgglController { ...@@ -1101,6 +1228,7 @@ public class YgglController {
return ResultUtil.data(YgglAttaHtxxb.builder().build() return ResultUtil.data(YgglAttaHtxxb.builder().build()
.delete(new QueryWrapper<YgglAttaHtxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工合同信息表成功"); .delete(new QueryWrapper<YgglAttaHtxxb>().eq("org_code", orgCode).eq("id", id)), "删除员工合同信息表成功");
} }
/** /**
* 获取员工材料附件表 * 获取员工材料附件表
* *
...@@ -1111,10 +1239,12 @@ public class YgglController { ...@@ -1111,10 +1239,12 @@ public class YgglController {
@ApiOperation(value = "获取员工材料附件表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工材料附件表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 45) @ApiOperationSupport(order = 45)
public Result<List<YgglAttaClfjb>> selectclfjb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaClfjb>> selectclfjb(@CurrentUser UserBean userBean) {
List<YgglAttaClfjb> ygglAttaClfjbs = YgglAttaClfjb.builder().build().selectList(new QueryWrapper<YgglAttaClfjb>() List<YgglAttaClfjb> ygglAttaClfjbs = YgglAttaClfjb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaClfjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaClfjbs, "获取员工材料附件表成功"); return ResultUtil.data(ygglAttaClfjbs, "获取员工材料附件表成功");
} }
// 获取员工材料附件表 // 获取员工材料附件表
@GetMapping(value = "/clfjb/{empNum}") @GetMapping(value = "/clfjb/{empNum}")
@ApiOperation(value = "获取员工材料附件表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工材料附件表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -1124,8 +1254,10 @@ public class YgglController { ...@@ -1124,8 +1254,10 @@ public class YgglController {
new QueryWrapper<YgglAttaClfjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaClfjb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaClfjbs, "获取员工材料附件表成功"); return ResultUtil.data(ygglAttaClfjbs, "获取员工材料附件表成功");
} }
/** /**
* 添加/修改员工材料附件表 * 添加/修改员工材料附件表
*
* @param * @param
* @return * @return
*/ */
...@@ -1138,8 +1270,10 @@ public class YgglController { ...@@ -1138,8 +1270,10 @@ public class YgglController {
ygglAttaClfjb.insertOrUpdate(); ygglAttaClfjb.insertOrUpdate();
return ResultUtil.data(ygglAttaClfjb, "添加/修改员工材料附件表成功"); return ResultUtil.data(ygglAttaClfjb, "添加/修改员工材料附件表成功");
} }
/** /**
* 删除员工材料附件表 * 删除员工材料附件表
*
* @param * @param
* @return * @return
*/ */
...@@ -1151,9 +1285,10 @@ public class YgglController { ...@@ -1151,9 +1285,10 @@ public class YgglController {
return ResultUtil.data(YgglAttaClfjb.builder().build() return ResultUtil.data(YgglAttaClfjb.builder().build()
.delete(new QueryWrapper<YgglAttaClfjb>().eq("org_code", orgCode).eq("id", id)), "删除员工材料附件表成功"); .delete(new QueryWrapper<YgglAttaClfjb>().eq("org_code", orgCode).eq("id", id)), "删除员工材料附件表成功");
} }
/** /**
* 获取成长记录表 * 获取成长记录表
*
* @param * @param
* @return * @return
*/ */
...@@ -1161,10 +1296,12 @@ public class YgglController { ...@@ -1161,10 +1296,12 @@ public class YgglController {
@ApiOperation(value = "获取成长记录表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取成长记录表", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 49) @ApiOperationSupport(order = 49)
public Result<List<YgglAttaCzjlb>> selectczjlb(@CurrentUser UserBean userBean) { public Result<List<YgglAttaCzjlb>> selectczjlb(@CurrentUser UserBean userBean) {
List<YgglAttaCzjlb> ygglAttaCzjlbs = YgglAttaCzjlb.builder().build().selectList(new QueryWrapper<YgglAttaCzjlb>() List<YgglAttaCzjlb> ygglAttaCzjlbs = YgglAttaCzjlb.builder().build()
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .selectList(new QueryWrapper<YgglAttaCzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num",
userBean.getEmpNum()));
return ResultUtil.data(ygglAttaCzjlbs, "获取成长记录表成功"); return ResultUtil.data(ygglAttaCzjlbs, "获取成长记录表成功");
} }
// 获取成长记录表 // 获取成长记录表
@GetMapping(value = "/czjlb/{empNum}") @GetMapping(value = "/czjlb/{empNum}")
@ApiOperation(value = "获取成长记录表(管)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取成长记录表(管)", httpMethod = "GET", notes = "接口发布说明")
...@@ -1174,8 +1311,10 @@ public class YgglController { ...@@ -1174,8 +1311,10 @@ public class YgglController {
new QueryWrapper<YgglAttaCzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum)); new QueryWrapper<YgglAttaCzjlb>().eq("org_code", userBean.getOrgCode()).eq("emp_num", empNum));
return ResultUtil.data(ygglAttaCzjlbs, "获取员工成长记录表成功"); return ResultUtil.data(ygglAttaCzjlbs, "获取员工成长记录表成功");
} }
/** /**
* 添加/修改成长记录表 * 添加/修改成长记录表
*
* @param * @param
* @return * @return
*/ */
...@@ -1188,8 +1327,10 @@ public class YgglController { ...@@ -1188,8 +1327,10 @@ public class YgglController {
ygglAttaCzjlb.insertOrUpdate(); ygglAttaCzjlb.insertOrUpdate();
return ResultUtil.data(ygglAttaCzjlb, "添加/修改成长记录表成功"); return ResultUtil.data(ygglAttaCzjlb, "添加/修改成长记录表成功");
} }
/** /**
* 获取单个离职员工信息(管) * 获取单个离职员工信息(管)
*
* @param * @param
* @return * @return
*/ */
...@@ -1201,8 +1342,10 @@ public class YgglController { ...@@ -1201,8 +1342,10 @@ public class YgglController {
.eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()).eq(YgglMainLzb::getEmpNum, empNum).one(); .eq(YgglMainLzb::getOrgCode, userBean.getOrgCode()).eq(YgglMainLzb::getEmpNum, empNum).one();
return ResultUtil.data(lzyg, "获取单个离职员工信息(管)成功"); return ResultUtil.data(lzyg, "获取单个离职员工信息(管)成功");
} }
/** /**
* 员工转正 * 员工转正
*
* @param * @param
* @return * @return
*/ */
...@@ -1216,8 +1359,10 @@ public class YgglController { ...@@ -1216,8 +1359,10 @@ public class YgglController {
.zzRemark(ygzzDto.getZzRemark()).build().update(updateWrapper); .zzRemark(ygzzDto.getZzRemark()).build().update(updateWrapper);
return ResultUtil.success("转正成功!"); return ResultUtil.success("转正成功!");
} }
/** /**
* 计划离职 type2-3 * 计划离职 type2-3
*
* @param * @param
* @return * @return
*/ */
...@@ -1247,8 +1392,10 @@ public class YgglController { ...@@ -1247,8 +1392,10 @@ public class YgglController {
// qyzxEmpLogin.deleteById(); // qyzxEmpLogin.deleteById();
return ResultUtil.data(ygglMainLzb, "添加待离职员工成功"); return ResultUtil.data(ygglMainLzb, "添加待离职员工成功");
} }
/** /**
* 确认离职 type3-4 * 确认离职 type3-4
*
* @param * @param
* @return * @return
*/ */
...@@ -1273,8 +1420,10 @@ public class YgglController { ...@@ -1273,8 +1420,10 @@ public class YgglController {
qyzxEmpEntAsso.delete(queryWrapper1); qyzxEmpEntAsso.delete(queryWrapper1);
return ResultUtil.success("确认离职员工成功"); return ResultUtil.success("确认离职员工成功");
} }
/** /**
* 放弃离职 type3-2 * 放弃离职 type3-2
*
* @param * @param
* @return * @return
*/ */
...@@ -1292,24 +1441,25 @@ public class YgglController { ...@@ -1292,24 +1441,25 @@ public class YgglController {
return ResultUtil.success("放弃成功"); return ResultUtil.success("放弃成功");
} }
@PostMapping(value = "/tzlzyy") @PostMapping(value = "/tzlzyy")
@ApiOperation(value = "调整离职", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "调整离职", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 56) @ApiOperationSupport(order = 56)
public Result<YgglMainLzb> tzlzyy(@CurrentUser UserBean userBean, @RequestBody YgglMainLzb ygglMainLzb) { public Result<YgglMainLzb> tzlzyy(@CurrentUser UserBean userBean, @RequestBody YgglMainLzb ygglMainLzb) {
if (ygglMainLzb.getEmpNum() != null) { if (ygglMainLzb.getEmpNum() != null) {
UpdateWrapper<YgglMainLzb> updateWrapper = new UpdateWrapper<YgglMainLzb>(); UpdateWrapper<YgglMainLzb> updateWrapper = new UpdateWrapper<YgglMainLzb>();
updateWrapper.eq("org_code", userBean.getOrgCode()).eq("emp_num", ygglMainLzb.getEmpNum()); updateWrapper.eq("org_code", userBean.getOrgCode()).eq("emp_num", ygglMainLzb.getEmpNum());
ygglMainLzb.update(updateWrapper); ygglMainLzb.update(updateWrapper);
return ResultUtil.data(ygglMainLzb, "修改成功"); return ResultUtil.data(ygglMainLzb, "修改成功");
} }
return ResultUtil.error("请确认该员工是否存在!"); return ResultUtil.error("请确认该员工是否存在!");
} }
/** /**
* 查询离职员工列表 * 查询离职员工列表
*
* @param * @param
* @return * @return
*/ */
...@@ -1318,31 +1468,35 @@ public class YgglController { ...@@ -1318,31 +1468,35 @@ public class YgglController {
@ApiOperationSupport(order = 57) @ApiOperationSupport(order = 57)
public Result<Object> querylzyg(@CurrentUser UserBean userBean, @RequestBody LzbQueryDto lzygQueryDto) { public Result<Object> querylzyg(@CurrentUser UserBean userBean, @RequestBody LzbQueryDto lzygQueryDto) {
lzygQueryDto.setOrgCode(userBean.getOrgCode()); lzygQueryDto.setOrgCode(userBean.getOrgCode());
IPage<YgglMainLzb> page = new Page<YgglMainLzb>( IPage<YgglMainLzb> page = new Page<YgglMainLzb>(
lzygQueryDto.getCurrentPage() == null ? 1 : lzygQueryDto.getCurrentPage(), lzygQueryDto.getCurrentPage() == null ? 1 : lzygQueryDto.getCurrentPage(),
lzygQueryDto.getTotalPage() == null ? 10 : lzygQueryDto.getTotalPage()); lzygQueryDto.getTotalPage() == null ? 10 : lzygQueryDto.getTotalPage());
List<YgglMainLzb> lzb = ygglMainLzbMapper.queryLzb(page, lzygQueryDto); List<YgglMainLzb> lzb = ygglMainLzbMapper.queryLzb(page, lzygQueryDto);
return ResultUtil.data(page, lzb, "离职员工搜索成功"); return ResultUtil.data(page, lzb, "离职员工搜索成功");
} }
/** /**
* 展示民族/展示所有民族 * 展示民族/展示所有民族
*
* @param * @param
* @return * @return
*/ */
@PostMapping(value = "/mz/{id}") @PostMapping(value = "/mz/{id}")
@ApiOperation(value = "展示民族/展示所有民族", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "展示民族/展示所有民族", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 59) @ApiOperationSupport(order = 59)
public Result<List<YgmzDto>> selectmzs(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<List<YgmzDto>> selectmzs(@CurrentUser UserBean userBean, @PathVariable Integer id) {
if (id==null||id==0) { if (id == null || id == 0) {
List<YgmzDto> allmz =new LambdaQueryChainWrapper<YgmzDto>(ygMzDtoMapper).list(); List<YgmzDto> allmz = new LambdaQueryChainWrapper<YgmzDto>(ygMzDtoMapper).list();
return ResultUtil.data(allmz,"展示所有民族"); return ResultUtil.data(allmz, "展示所有民族");
} }
List<YgmzDto> mz =new LambdaQueryChainWrapper<YgmzDto>(ygMzDtoMapper).eq(YgmzDto::getNumber, id).list(); List<YgmzDto> mz = new LambdaQueryChainWrapper<YgmzDto>(ygMzDtoMapper).eq(YgmzDto::getNumber, id).list();
return ResultUtil.data(mz,"展示该民族"); return ResultUtil.data(mz, "展示该民族");
} }
/** /**
* 展示籍贯/展示所有籍贯 * 展示籍贯/展示所有籍贯
*
* @param * @param
* @return * @return
*/ */
...@@ -1353,30 +1507,42 @@ public class YgglController { ...@@ -1353,30 +1507,42 @@ public class YgglController {
Integer type = ygjgDto.getType(); Integer type = ygjgDto.getType();
Integer upId = ygjgDto.getJgid(); Integer upId = ygjgDto.getJgid();
List<YgjgDto> maps = new ArrayList<YgjgDto>(); List<YgjgDto> maps = new ArrayList<YgjgDto>();
if (type == 1) { //省份 if (type == 1) { // 省份
List<YgProDto> list = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getProvince,YgProDto::getName).orderByAsc(YgProDto::getProvince).list(); List<YgProDto> list = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
for (YgProDto pro : list) { .select(YgProDto::getId, YgProDto::getProvince, YgProDto::getName).orderByAsc(YgProDto::getProvince)
maps.add(new YgjgDto(pro.getId(), pro.getProvince(), pro.getName(),null)); .list();
}} for (YgProDto pro : list) {
if (type == 2) { //城市 maps.add(new YgjgDto(pro.getId(), pro.getProvince(), pro.getName(), null));
List<YgCityDto> list = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getCity,YgCityDto::getName).eq(YgCityDto::getProvince, upId).orderByAsc(YgCityDto::getProvince).orderByAsc(YgCityDto::getCity).list(); }
}
if (type == 2) { // 城市
List<YgCityDto> list = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
.select(YgCityDto::getId, YgCityDto::getCity, YgCityDto::getName).eq(YgCityDto::getProvince, upId)
.orderByAsc(YgCityDto::getProvince).orderByAsc(YgCityDto::getCity).list();
for (YgCityDto city : list) { for (YgCityDto city : list) {
maps.add(new YgjgDto(city.getId(), city.getCity(), city.getName(),null)); maps.add(new YgjgDto(city.getId(), city.getCity(), city.getName(), null));
}} }
if (type == 3) { //地区 }
List<YgAreaDto> list = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).select(YgAreaDto::getId,YgAreaDto::getName).eq(YgAreaDto::getCity, upId).orderByAsc(YgAreaDto::getProvince).orderByAsc(YgAreaDto::getCity).list(); if (type == 3) { // 地区
for (YgAreaDto area : list) { List<YgAreaDto> list = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper)
maps.add(new YgjgDto(area.getId(), area.getId(), area.getName(),null)); .select(YgAreaDto::getId, YgAreaDto::getName).eq(YgAreaDto::getCity, upId)
}} .orderByAsc(YgAreaDto::getProvince).orderByAsc(YgAreaDto::getCity).list();
//IYgjgDto iYgjgDto = PunishFactory.getPunish(type); for (YgAreaDto area : list) {
//List<String> strings = iYgjgDto.exePunish(); maps.add(new YgjgDto(area.getId(), area.getId(), area.getName(), null));
//System.out.println(strings); }
if (!maps.isEmpty()) return ResultUtil.data(maps, "展示籍贯成功"); }
return ResultUtil.success(null); // IYgjgDto iYgjgDto = PunishFactory.getPunish(type);
// List<String> strings = iYgjgDto.exePunish();
// System.out.println(strings);
if (!maps.isEmpty())
return ResultUtil.data(maps, "展示籍贯成功");
return ResultUtil.success(null);
} }
/** /**
* 根据籍贯id显示籍贯名 * 根据籍贯id显示籍贯名
*
* @param * @param
* @return * @return
*/ */
...@@ -1386,44 +1552,66 @@ public class YgglController { ...@@ -1386,44 +1552,66 @@ public class YgglController {
public Result<YgjgDto> selectjg(@CurrentUser UserBean userBean, @RequestBody YgjgDto jgcity) { public Result<YgjgDto> selectjg(@CurrentUser UserBean userBean, @RequestBody YgjgDto jgcity) {
Integer jgid = jgcity.getJgid(); Integer jgid = jgcity.getJgid();
Integer cid = jgcity.getType(); Integer cid = jgcity.getType();
if (jgid!=null) { if (jgid != null) {
String top = jgid.toString().substring(0,2); String top = jgid.toString().substring(0, 2);
String isPro =jgid.toString().substring(2,4); String isPro = jgid.toString().substring(2, 4);
String isCity =jgid.toString().substring(4,6); String isCity = jgid.toString().substring(4, 6);
if ("00".equals(isPro)) { if ("00".equals(isPro)) {
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getId, jgid).one(); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
if (pro!=null) jgcity.setJgname(pro.getName()); .select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getId, jgid).one();
if (pro != null)
jgcity.setJgname(pro.getName());
} else if ("00".equals(isCity)) { } else if ("00".equals(isCity)) {
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one(); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getCity, jgid).one(); .select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getProvince, top).one();
if (city!=null ) jgcity.setJgname(pro.getName()+city.getName()); YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
} .select(YgCityDto::getId, YgCityDto::getName).eq(YgCityDto::getCity, jgid).one();
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one(); if (city != null)
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getCity, Integer.parseInt(top+isPro)).one(); jgcity.setJgname(pro.getName() + city.getName());
YgAreaDto area = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).select(YgAreaDto::getId,YgAreaDto::getName).eq(YgAreaDto::getId, jgid).one(); }
if (area!=null ) jgcity.setJgname(pro.getName()+city.getName()+area.getName()); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
.select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getProvince, top).one();
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
.select(YgCityDto::getId, YgCityDto::getName).eq(YgCityDto::getCity, Integer.parseInt(top + isPro))
.one();
YgAreaDto area = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper)
.select(YgAreaDto::getId, YgAreaDto::getName).eq(YgAreaDto::getId, jgid).one();
if (area != null)
jgcity.setJgname(pro.getName() + city.getName() + area.getName());
} }
if (cid!=null) { if (cid != null) {
String top = cid.toString().substring(0,2); String top = cid.toString().substring(0, 2);
String isPro =cid.toString().substring(2,4); String isPro = cid.toString().substring(2, 4);
String isCity =cid.toString().substring(4,6); String isCity = cid.toString().substring(4, 6);
if ("00".equals(isPro)) { if ("00".equals(isPro)) {
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getId, cid).one(); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
if (pro!=null) jgcity.setCityname(pro.getName()); .select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getId, cid).one();
if (pro != null)
jgcity.setCityname(pro.getName());
} else if ("00".equals(isCity)) { } else if ("00".equals(isCity)) {
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one(); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getCity, cid).one(); .select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getProvince, top).one();
if (city!=null ) jgcity.setCityname(pro.getName()+city.getName()); YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
} .select(YgCityDto::getId, YgCityDto::getName).eq(YgCityDto::getCity, cid).one();
YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).select(YgProDto::getId,YgProDto::getName).eq(YgProDto::getProvince, top).one(); if (city != null)
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).select(YgCityDto::getId,YgCityDto::getName).eq(YgCityDto::getCity, Integer.parseInt(top+isPro)).one(); jgcity.setCityname(pro.getName() + city.getName());
YgAreaDto area = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).select(YgAreaDto::getId,YgAreaDto::getName).eq(YgAreaDto::getId, cid).one(); }
if (area!=null ) jgcity.setCityname(pro.getName()+city.getName()+area.getName()); YgProDto pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
.select(YgProDto::getId, YgProDto::getName).eq(YgProDto::getProvince, top).one();
YgCityDto city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
.select(YgCityDto::getId, YgCityDto::getName).eq(YgCityDto::getCity, Integer.parseInt(top + isPro))
.one();
YgAreaDto area = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper)
.select(YgAreaDto::getId, YgAreaDto::getName).eq(YgAreaDto::getId, cid).one();
if (area != null)
jgcity.setCityname(pro.getName() + city.getName() + area.getName());
} }
return ResultUtil.data(jgcity); return ResultUtil.data(jgcity);
} }
/** /**
* 查询员工列表 * 查询员工列表
*
* @param * @param
* @return * @return
*/ */
...@@ -1434,9 +1622,11 @@ public class YgglController { ...@@ -1434,9 +1622,11 @@ public class YgglController {
List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(userBean); List<YgQueryDto> ygQueryDto = ygglMainEmpMapper.queryEmpMessage(userBean);
return ResultUtil.data(ygQueryDto, "查询成功"); return ResultUtil.data(ygQueryDto, "查询成功");
} }
/*************** 统计图 ***************/ /*************** 统计图 ***************/
/** /**
* 查询统计图 * 查询统计图
*
* @return 成功信息 * @return 成功信息
*/ */
@GetMapping("/yggl") @GetMapping("/yggl")
...@@ -1474,7 +1664,9 @@ public class YgglController { ...@@ -1474,7 +1664,9 @@ public class YgglController {
return ResultUtil.data(map, "查询成功"); return ResultUtil.data(map, "查询成功");
} }
/** /**
<<<<<<< HEAD
* 员工信息统计图 * 员工信息统计图
* @return 成功信息(weng) * @return 成功信息(weng)
*/ */
...@@ -1522,6 +1714,10 @@ public class YgglController { ...@@ -1522,6 +1714,10 @@ public class YgglController {
} }
/** /**
* 获取员工社保公积金 * 获取员工社保公积金
=======
* 获取成长记录表
*
>>>>>>> bea51ce9ef8860bb31a1d14ffce121313636951a
* @param * @param
* @return * @return
*/ */
...@@ -1533,45 +1729,52 @@ public class YgglController { ...@@ -1533,45 +1729,52 @@ public class YgglController {
.eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum())); .eq("org_code", userBean.getOrgCode()).eq("emp_num", userBean.getEmpNum()));
return ResultUtil.data(ygglAttaSbgjj, "获取员工社保公积金成功"); return ResultUtil.data(ygglAttaSbgjj, "获取员工社保公积金成功");
} }
/** /**
* 获取员工社保公积金 * 获取员工社保公积金
*
* @param * @param
* @return * @return
*/ */
@GetMapping(value = "/ygsbgjj/{empNum}") @GetMapping(value = "/ygsbgjj/{empNum}")
@ApiOperation(value = "获取员工社保公积金", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取员工社保公积金", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 65) @ApiOperationSupport(order = 65)
public Result<YgglAttaSbgjj> selectygsbgjj(@CurrentUser UserBean userBean,@PathVariable Integer empNum) { public Result<YgglAttaSbgjj> selectygsbgjj(@CurrentUser UserBean userBean, @PathVariable Integer empNum) {
YgglAttaSbgjj ygglAttaSbgjj = YgglAttaSbgjj.builder().build().selectOne(new QueryWrapper<YgglAttaSbgjj>().eq("emp_num", empNum)); YgglAttaSbgjj ygglAttaSbgjj = YgglAttaSbgjj.builder().build()
.selectOne(new QueryWrapper<YgglAttaSbgjj>().eq("emp_num", empNum));
return ResultUtil.data(ygglAttaSbgjj, "获取员工社保公积金成功"); return ResultUtil.data(ygglAttaSbgjj, "获取员工社保公积金成功");
} }
/** /**
* 添加/修改员工社保公积金 * 添加/修改员工社保公积金
*
* @param * @param
* @return * @return
*/ */
@PostMapping(value = "/ygsbgjj") @PostMapping(value = "/ygsbgjj")
@ApiOperation(value = "添加/修改员工社保公积金", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "添加/修改员工社保公积金", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 66) @ApiOperationSupport(order = 66)
public Result<YgglAttaSbgjj> addygsbgjj(@CurrentUser UserBean userBean,@RequestBody YgglAttaSbgjj ygglAttaSbgjj) { public Result<YgglAttaSbgjj> addygsbgjj(@CurrentUser UserBean userBean, @RequestBody YgglAttaSbgjj ygglAttaSbgjj) {
Integer empNum = ygglAttaSbgjj.getEmpNum(); Integer empNum = ygglAttaSbgjj.getEmpNum();
if (empNum == null) { if (empNum == null) {
return ResultUtil.error(); return ResultUtil.error();
} }
YgglAttaSbgjj AttaSbgjj = YgglAttaSbgjj.builder().build().selectOne(new QueryWrapper<YgglAttaSbgjj>().eq("emp_num", empNum)); YgglAttaSbgjj AttaSbgjj = YgglAttaSbgjj.builder().build()
.selectOne(new QueryWrapper<YgglAttaSbgjj>().eq("emp_num", empNum));
if (AttaSbgjj != null) { if (AttaSbgjj != null) {
ygglAttaSbgjj.update(new UpdateWrapper<YgglAttaSbgjj>().eq("emp_num", empNum)); ygglAttaSbgjj.update(new UpdateWrapper<YgglAttaSbgjj>().eq("emp_num", empNum));
}else { } else {
ygglAttaSbgjj.insert(); ygglAttaSbgjj.insert();
} }
return ResultUtil.data(ygglAttaSbgjj, "添加/修改员工社保公积金成功"); return ResultUtil.data(ygglAttaSbgjj, "添加/修改员工社保公积金成功");
} }
/** /**
* 删除员工社保公积金 * 删除员工社保公积金
*
* @param * @param
* @return * @return
*/ */
...@@ -1583,5 +1786,5 @@ public class YgglController { ...@@ -1583,5 +1786,5 @@ public class YgglController {
return ResultUtil.data(YgglAttaSbgjj.builder().build() return ResultUtil.data(YgglAttaSbgjj.builder().build()
.delete(new QueryWrapper<YgglAttaSbgjj>().eq("org_code", orgCode).eq("id", id)), "删除员工社保公积金成功"); .delete(new QueryWrapper<YgglAttaSbgjj>().eq("org_code", orgCode).eq("id", id)), "删除员工社保公积金成功");
} }
} }
package cn.timer.api.controller.zzgl; package cn.timer.api.controller.zzgl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglAuth; import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM; import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper; import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
import cn.timer.api.dao.zzgl.ZzglLogDgjlMapper; import cn.timer.api.dao.zzgl.ZzglLogDgjlMapper;
import cn.timer.api.dto.zzgl.LogDgjlsDto; import cn.timer.api.dto.zzgl.LogDgjlsDto;
import cn.timer.api.dto.zzgl.LogDgjlsQueryDto; import cn.timer.api.dto.zzgl.LogDgjlsQueryDto;
import cn.timer.api.dto.zzgl.UpEmpDeptDto; import cn.timer.api.dto.zzgl.UpEmpDeptDto;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@Api(tags = "2.组织管理") @Api(tags = "2.组织管理")
@RestController @RestController
@Transactional @Transactional
@RequestMapping(value = "/zzgl", produces = { "application/json" }) @RequestMapping(value = "/zzgl", produces = { "application/json" })
public class ZzglController { public class ZzglController {
@Autowired @Autowired
ZzglBmgwMMapper zzglBmgwMMapper; ZzglBmgwMMapper zzglBmgwMMapper;
@Autowired @Autowired
ZzglLogDgjlMapper zzglLogDgjlMapper; ZzglLogDgjlMapper zzglLogDgjlMapper;
/** /**
* 架构树/架构图/导出 * 架构树/架构图/导出
* *
* @param * @param
* @return * @return
*/ */
@GetMapping(value = "/deptlist") @GetMapping(value = "/deptlist")
@ApiOperation(value = "获取部门岗位", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取部门岗位", httpMethod = "GET", notes = "接口发布说明")
public Result<List<ZzglBmgwM>> selectlistdept(@CurrentUser UserBean userBean) { public Result<List<ZzglBmgwM>> selectlistdept(@CurrentUser UserBean userBean) {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); .eq(ZzglBmgwM::getOrgCode, orgCode).list();
return ResultUtil.data(zzglBmgwMs); return ResultUtil.data(zzglBmgwMs);
} }
@GetMapping(value = "/deptlist2") /**
@ApiOperation(value = "获取部门岗位2", httpMethod = "GET", notes = "接口发布说明") * 岗位成员
public Result<List<ZzglBmgwM>> selectlistdept2(@CurrentUser UserBean userBean) { *
Integer orgCode = userBean.getOrgCode(); * @param 部门岗位id
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) * @return
.select(ZzglBmgwM::getName,ZzglBmgwM::getId,ZzglBmgwM::getUpId).eq(ZzglBmgwM::getOrgCode, orgCode).list(); */
return ResultUtil.data(zzglBmgwMs); @GetMapping(value = "/otherlistent/{id}")
} @ApiOperation(value = "获取岗位成员列表", httpMethod = "GET", notes = "接口发布说明")
public Result<List<YgglMainEmp>> selectOtherlistent(@CurrentUser UserBean userBean, @PathVariable Integer id){
/** Integer orgCode = userBean.getOrgCode();
* 岗位成员 ArrayList<Integer> list = new ArrayList<Integer>();
* List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
* @param 部门岗位id .eq(ZzglBmgwM::getOrgCode, orgCode).list();
* @return list.add(id);
*/ ZzglBmgwM.getDepts(list, id, zzglBmgwMs);
@GetMapping(value = "/otherlistent/{id}")
@ApiOperation(value = "获取岗位成员列表", httpMethod = "GET", notes = "接口发布说明") if (list == null || list.size() == 0) {
public Result<List<YgglMainEmp>> selectOtherlistent(@CurrentUser UserBean userBean, @PathVariable Integer id){ return ResultUtil.error("部门信息不存在,请先添加部门!");
Integer orgCode = userBean.getOrgCode(); } else {
ArrayList<Integer> list = new ArrayList<Integer>(); LambdaQueryWrapper<YgglMainEmp> ygglMainEmpsLambdaQueryWrapper = new LambdaQueryWrapper<>();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) ygglMainEmpsLambdaQueryWrapper
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); .select(YgglMainEmp::getId, YgglMainEmp::getEmpNum, YgglMainEmp::getName, YgglMainEmp::getPhone,
list.add(id); YgglMainEmp::getBmgwId)
ZzglBmgwM.getDepts(list, id, zzglBmgwMs); .eq(YgglMainEmp::getOrgCode, orgCode).and(i -> i.in(YgglMainEmp::getBmgwId, list.toArray()));
List<YgglMainEmp> ygglMainEmps = YgglMainEmp.builder().build().selectList(ygglMainEmpsLambdaQueryWrapper);
if (list == null || list.size() == 0) { return ResultUtil.data(ygglMainEmps);
return ResultUtil.error("部门信息不存在,请先添加部门!"); }
} else {
LambdaQueryWrapper<YgglMainEmp> ygglMainEmpsLambdaQueryWrapper = new LambdaQueryWrapper<>(); }
ygglMainEmpsLambdaQueryWrapper
.select(YgglMainEmp::getId, YgglMainEmp::getEmpNum, YgglMainEmp::getName, YgglMainEmp::getPhone, /**
YgglMainEmp::getBmgwId) * 获取调岗记录(weng)
.eq(YgglMainEmp::getOrgCode, orgCode).and(i -> i.in(YgglMainEmp::getBmgwId, list.toArray())); *
List<YgglMainEmp> ygglMainEmps = YgglMainEmp.builder().build().selectList(ygglMainEmpsLambdaQueryWrapper); * @param 部门岗位id
return ResultUtil.data(ygglMainEmps); * @return
} */
@PostMapping(value = "/listdgjl")
} @ApiOperation(value = "获取调岗记录(weng)", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> selectlistdgjl(@CurrentUser UserBean userBean, @RequestBody LogDgjlsQueryDto logDgjlsQueryDto){
/** Integer orgCode = userBean.getOrgCode();
* 获取调岗记录(weng) ArrayList<Integer> list = new ArrayList<Integer>();
* List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
* @param 部门岗位id .eq(ZzglBmgwM::getOrgCode, orgCode).list();
* @return list.add(logDgjlsQueryDto.getDeptId());
*/ ZzglBmgwM.getDepts(list, logDgjlsQueryDto.getDeptId(), zzglBmgwMs);
@PostMapping(value = "/listdgjl")
@ApiOperation(value = "获取调岗记录(weng)", httpMethod = "POST", notes = "接口发布说明") if (list == null || list.size() == 0) {
public Result<Object> selectlistdgjl(@CurrentUser UserBean userBean, @RequestBody LogDgjlsQueryDto logDgjlsQueryDto){ return ResultUtil.error("部门信息不存在,请先添加部门!");
Integer orgCode = userBean.getOrgCode(); } else {
ArrayList<Integer> list = new ArrayList<Integer>();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) logDgjlsQueryDto.setDeptIdList(list);
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); logDgjlsQueryDto.setOrgCode(orgCode);
list.add(logDgjlsQueryDto.getDeptId());
ZzglBmgwM.getDepts(list, logDgjlsQueryDto.getDeptId(), zzglBmgwMs); IPage<LogDgjlsDto> page = new Page<LogDgjlsDto>(
logDgjlsQueryDto.getCurrentPage() == null ? 1 : logDgjlsQueryDto.getCurrentPage(),
if (list == null || list.size() == 0) { logDgjlsQueryDto.getTotalPage() == null ? 10 : logDgjlsQueryDto.getTotalPage());
return ResultUtil.error("部门信息不存在,请先添加部门!"); List<LogDgjlsDto> logDgjlDtos = zzglLogDgjlMapper.selectListdgjls(page, logDgjlsQueryDto);
} else { return ResultUtil.data(page, logDgjlDtos, "查询成功");
}
logDgjlsQueryDto.setDeptIdList(list); }
logDgjlsQueryDto.setOrgCode(orgCode);
/**
IPage<LogDgjlsDto> page = new Page<LogDgjlsDto>( * 未设置岗位的成员
logDgjlsQueryDto.getCurrentPage() == null ? 1 : logDgjlsQueryDto.getCurrentPage(), *
logDgjlsQueryDto.getTotalPage() == null ? 10 : logDgjlsQueryDto.getTotalPage()); * @return
List<LogDgjlsDto> logDgjlDtos = zzglLogDgjlMapper.selectListdgjls(page, logDgjlsQueryDto); */
return ResultUtil.data(page, logDgjlDtos, "查询成功"); @GetMapping(value = "/listent")
} @ApiOperation(value = "未设置岗位的成员", httpMethod = "GET", notes = "接口发布说明")
} public Result<List<YgglMainEmp>> selectlistent(@CurrentUser UserBean userBean) {
Integer orgCode = userBean.getOrgCode();
/**
* 未设置岗位的成员 LambdaQueryWrapper<YgglMainEmp> ygglMainEmpsLambdaQueryWrapper = new LambdaQueryWrapper<>();
* ygglMainEmpsLambdaQueryWrapper
* @return .select(YgglMainEmp::getId, YgglMainEmp::getEmpNum, YgglMainEmp::getName, YgglMainEmp::getPhone)
*/ .eq(YgglMainEmp::getOrgCode, orgCode)
@GetMapping(value = "/listent") .and(i -> i.isNull(YgglMainEmp::getBmgwId).or().eq(YgglMainEmp::getBmgwId, 0));
@ApiOperation(value = "未设置岗位的成员", httpMethod = "GET", notes = "接口发布说明") // .and(lqw -> lqw.notIn(id != null,
public Result<List<YgglMainEmp>> selectlistent(@CurrentUser UserBean userBean) { // YgglMainEmp::getBmgwId,Arrays.asList(id)).or().isNull(YgglMainEmp::getBmgwId))
Integer orgCode = userBean.getOrgCode(); List<YgglMainEmp> ygglMainEmps = YgglMainEmp.builder().build().selectList(ygglMainEmpsLambdaQueryWrapper);
// List<ZzglBmgwMEmpDto> zzglBmgwMEmpDtos =
LambdaQueryWrapper<YgglMainEmp> ygglMainEmpsLambdaQueryWrapper = new LambdaQueryWrapper<>(); // zzglBmgwMMapper.selectOtherListByOrgCode(orgCode,id);
ygglMainEmpsLambdaQueryWrapper return ResultUtil.data(ygglMainEmps);
.select(YgglMainEmp::getId, YgglMainEmp::getEmpNum, YgglMainEmp::getName, YgglMainEmp::getPhone) }
.eq(YgglMainEmp::getOrgCode, orgCode)
.and(i -> i.isNull(YgglMainEmp::getBmgwId).or().eq(YgglMainEmp::getBmgwId, 0)); /**
// .and(lqw -> lqw.notIn(id != null, * 添加/修改部门
// YgglMainEmp::getBmgwId,Arrays.asList(id)).or().isNull(YgglMainEmp::getBmgwId)) *
List<YgglMainEmp> ygglMainEmps = YgglMainEmp.builder().build().selectList(ygglMainEmpsLambdaQueryWrapper); * @param
// List<ZzglBmgwMEmpDto> zzglBmgwMEmpDtos = * @return
// zzglBmgwMMapper.selectOtherListByOrgCode(orgCode,id); */
return ResultUtil.data(ygglMainEmps); @PostMapping(value = "/dept")
} @ApiOperation(value = "添加/修改部门", httpMethod = "POST", notes = "接口发布说明")
public Result<ZzglBmgwM> adddept(@CurrentUser UserBean userBean, @RequestBody ZzglBmgwM zzglBmgwM){
/** Boolean a = zzglBmgwM.getId() == null;
* 添加/修改部门 if (a && zzglBmgwM.getType() == null)
* zzglBmgwM.setType((Integer) 0);
* @param zzglBmgwM.setOrgCode(userBean.getOrgCode());
* @return zzglBmgwM.insertOrUpdate();
*/ if (a)
@PostMapping(value = "/dept") return ResultUtil.data(zzglBmgwM);
@ApiOperation(value = "添加/修改部门", httpMethod = "POST", notes = "接口发布说明") return ResultUtil.success();
public Result<ZzglBmgwM> adddept(@CurrentUser UserBean userBean, @RequestBody ZzglBmgwM zzglBmgwM){
Boolean a = zzglBmgwM.getId() == null; }
if (a && zzglBmgwM.getType() == null)
zzglBmgwM.setType((Integer) 0); /**
zzglBmgwM.setOrgCode(userBean.getOrgCode()); * 删除部门岗位
zzglBmgwM.insertOrUpdate(); *
if (a) * @param 部门岗位ids [1,2,3,4]
return ResultUtil.data(zzglBmgwM); * @return
return ResultUtil.success(); */
@DeleteMapping(value = "/dept")
} @ApiOperation(value = "删除部门岗位", httpMethod = "DELETE", notes = "接口发布说明")
public Result<Integer> deldepts(@CurrentUser UserBean userBean, @RequestBody List<Integer> ids) {
/** YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
* 删除部门岗位 UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
* updateWrapper.set("bmgw_id", null).in("bmgw_id", ids);
* @param 部门岗位ids [1,2,3,4] zzglLogDgjlMapper.insertbydeldept(ids, userBean.getEmpNum());
* @return ygglMainEmp.update(updateWrapper);
*/ zzglBmgwMMapper.deleteBatchIds(ids);
@DeleteMapping(value = "/dept")
@ApiOperation(value = "删除部门岗位", httpMethod = "DELETE", notes = "接口发布说明") return ResultUtil.success();
public Result<Integer> deldepts(@CurrentUser UserBean userBean, @RequestBody List<Integer> ids) { }
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); /**
updateWrapper.set("bmgw_id", null).in("bmgw_id", ids); * 批量修改/删除员工部门
zzglLogDgjlMapper.insertbydeldept(ids, userBean.getEmpNum()); *
ygglMainEmp.update(updateWrapper); * @param 部门岗位id
zzglBmgwMMapper.deleteBatchIds(ids); * @return
*/
return ResultUtil.success(); @PostMapping(value = "/empdept")
} @ApiOperation(value = "批量修改/删除员工部门", httpMethod = "POST", notes = "接口发布说明")
public Result<Void> updatelistempdept(@CurrentUser UserBean userBean, @RequestBody UpEmpDeptDto upEmpDeptDto) {
/** Integer dpetId = upEmpDeptDto.getDpetId();
* 批量修改/删除员工部门 List<Integer> empNums = upEmpDeptDto.getEmpNum();
* YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
* @param 部门岗位id // zzglLogDgjlMapper
* @return UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
*/ updateWrapper.set("bmgw_id", dpetId).eq("org_code", userBean.getOrgCode()).in("emp_num", empNums);
@PostMapping(value = "/empdept") zzglLogDgjlMapper.insertbyaddemp(empNums, userBean.getEmpNum(), dpetId, userBean.getOrgCode(),
@ApiOperation(value = "批量修改/删除员工部门", httpMethod = "POST", notes = "接口发布说明") dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗");
public Result<Void> updatelistempdept(@CurrentUser UserBean userBean, @RequestBody UpEmpDeptDto upEmpDeptDto) { ygglMainEmp.update(updateWrapper);
Integer dpetId = upEmpDeptDto.getDpetId(); // zzglLogDgjlMapper.insert
List<Integer> empNums = upEmpDeptDto.getEmpNum(); return ResultUtil.success();
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build(); }
// zzglLogDgjlMapper
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); /**
updateWrapper.set("bmgw_id", dpetId).eq("org_code", userBean.getOrgCode()).in("emp_num", empNums); * 岗位权限
zzglLogDgjlMapper.insertbyaddemp(empNums, userBean.getEmpNum(), dpetId, userBean.getOrgCode(), *
dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗"); * @param 部门岗位id
ygglMainEmp.update(updateWrapper); * @return
// zzglLogDgjlMapper.insert */
return ResultUtil.success(); @GetMapping(value = "/auth/{id}")
} @ApiOperation(value = "获取岗位岗位权限", httpMethod = "GET", notes = "接口发布说明")
public Result<List<ZzglAuth>> auth(@CurrentUser UserBean userBean, @PathVariable Integer id) {
/** Integer orgCode = userBean.getOrgCode();
* 岗位权限 ArrayList<Integer> list = new ArrayList<Integer>();
* List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
* @param 部门岗位id .eq(ZzglBmgwM::getOrgCode, orgCode).list();
* @return ZzglBmgwM.getupDepts(list, id, zzglBmgwMs);
*/ if (list == null || list.size() == 0) {
@GetMapping(value = "/auth/{id}") return ResultUtil.error("部门信息不存在,请先添加部门!");
@ApiOperation(value = "获取岗位岗位权限", httpMethod = "GET", notes = "接口发布说明") } else {
public Result<List<ZzglAuth>> auth(@CurrentUser UserBean userBean, @PathVariable Integer id) { LambdaQueryWrapper<ZzglAuth> wp = new LambdaQueryWrapper<>();
Integer orgCode = userBean.getOrgCode(); wp.select(ZzglAuth::getMenuId, ZzglAuth::getBmgwId).eq(ZzglAuth::getOrgCode, orgCode)
ArrayList<Integer> list = new ArrayList<Integer>(); .and(i -> i.in(ZzglAuth::getBmgwId, list.toArray()));
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) List<ZzglAuth> zas = ZzglAuth.builder().build().selectList(wp);
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); return ResultUtil.data(zas);
ZzglBmgwM.getupDepts(list, id, zzglBmgwMs); }
if (list == null || list.size() == 0) { }
return ResultUtil.error("部门信息不存在,请先添加部门!");
} else { /**
LambdaQueryWrapper<ZzglAuth> wp = new LambdaQueryWrapper<>(); * 批量修改/删除岗位权限
wp.select(ZzglAuth::getMenuId, ZzglAuth::getBmgwId).eq(ZzglAuth::getOrgCode, orgCode) *
.and(i -> i.in(ZzglAuth::getBmgwId, list.toArray())); * @param 部门岗位id
List<ZzglAuth> zas = ZzglAuth.builder().build().selectList(wp); * @param 菜单ids
return ResultUtil.data(zas); * @return
} */
} @PostMapping(value = "/auth/{id}")
@ApiOperation(value = "批量修改/删除岗位权限", httpMethod = "POST", notes = "接口发布说明")
/** public Result<Void> auth(@CurrentUser UserBean userBean, @PathVariable Integer id, @RequestBody List<String> ids) {
* 批量修改/删除岗位权限 Integer orgCode = userBean.getOrgCode();
* ZzglAuth.builder().build().delete(
* @param 部门岗位id new QueryWrapper<ZzglAuth>().lambda().eq(ZzglAuth::getOrgCode, orgCode).eq(ZzglAuth::getBmgwId, id));
* @param 菜单ids ids.forEach(o -> {
* @return ZzglAuth za = ZzglAuth.builder().build();
*/ za.setBmgwId(id);
@PostMapping(value = "/auth/{id}") za.setOrgCode(orgCode);
@ApiOperation(value = "批量修改/删除岗位权限", httpMethod = "POST", notes = "接口发布说明") za.setMenuId(o);
public Result<Void> auth(@CurrentUser UserBean userBean, @PathVariable Integer id, @RequestBody List<String> ids) { za.insert();
Integer orgCode = userBean.getOrgCode(); });
ZzglAuth.builder().build().delete( return ResultUtil.success();
new QueryWrapper<ZzglAuth>().lambda().eq(ZzglAuth::getOrgCode, orgCode).eq(ZzglAuth::getBmgwId, id)); }
ids.forEach(o -> { }
ZzglAuth za = ZzglAuth.builder().build();
za.setBmgwId(id);
za.setOrgCode(orgCode);
za.setMenuId(o);
za.insert();
});
return ResultUtil.success();
}
}
package cn.timer.api.dao.htzz; package cn.timer.api.dao.htzz;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.htzz.HtzzAdminZzda; import cn.timer.api.bean.htzz.HtzzAdminZzda;
/** /**
* 合同证照档案表 * 合同证照档案表
* *
* @author Tang 2019-12-04 * @author Tang 2019-12-04
*/ */
@Repository @Repository
public interface HtzzAdminZzdaMapper extends IService<HtzzAdminZzda> { public interface HtzzAdminZzdaMapper extends BaseMapper<HtzzAdminZzda> {
} }
package cn.timer.api.dao.htzz; package cn.timer.api.dao.htzz;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.bean.htzz.HtzzAssoHtgx; import cn.timer.api.bean.htzz.HtzzAssoHtgx;
/** /**
* 合同关系表 * 合同关系表
* *
* @author Tang 2019-12-18 * @author Tang 2019-12-18
*/ */
@Repository @Repository
public interface HtzzAssoHtgxMapper extends IService<HtzzAssoHtgx> { public interface HtzzAssoHtgxMapper extends BaseMapper<HtzzAssoHtgx> {
} }
package cn.timer.api.dao.htzz; package cn.timer.api.dao.htzz;
import org.springframework.stereotype.Repository; import java.text.DateFormat;
import java.text.SimpleDateFormat;
import com.baomidou.mybatisplus.extension.service.IService; import java.util.Date;
import cn.timer.api.bean.htzz.HtzzAssoZztx; import org.springframework.stereotype.Repository;
/** import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* 证照提醒表
* import cn.timer.api.bean.htzz.HtzzAssoZztx;
* @author Tang 2019-12-04
*/ /**
@Repository * 证照提醒表
public interface HtzzAssoZztxMapper extends IService<HtzzAssoZztx> { *
* @author Tang 2019-12-04
} */
@Repository
public interface HtzzAssoZztxMapper extends BaseMapper<HtzzAssoZztx> {
public static void main(String[] args) {
DateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
String a = format1.format(new Date());
System.err.println(a);
}
}
package cn.timer.api.dao.quartz;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestParam;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.PageInfo;
import cn.timer.api.bean.quartz.JobAndTrigger;
@Repository
public interface JobAndTriggerMapper extends BaseMapper<JobAndTrigger> {
public PageInfo<JobAndTrigger> getJobAndTriggerDetails(@RequestParam(value = "pageNum") Integer pageNum,
@RequestParam(value = "pageSize") Integer pageSize);
}
\ No newline at end of file
package cn.timer.api.utils; package cn.timer.api.utils;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.timer.api.bean.htzz.HtzzAdminZzda; import cn.timer.api.bean.htzz.HtzzAdminZzda;
import cn.timer.api.bean.htzz.HtzzAssoHtgx; import cn.timer.api.bean.htzz.HtzzAssoHtgx;
/** /**
* 记录当前时间循环输出 遍历合同提醒关系表,每天固定时间(8点)查询是否提醒 * 记录当前时间循环输出 遍历合同提醒关系表,每天固定时间(8点)查询是否提醒
* *
* @author Administrator * @author Administrator
* *
*/ */
@Component @Component
@Lazy(false) @Lazy(false)
@EnableScheduling @EnableScheduling
public class RemindUtil { public class RemindUtil {
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
/** /**
* 间隔时间提醒 10min/次 * 间隔时间提醒 10min/次
*/ */
@Scheduled(fixedRate = 30 * 60 * 1000) @Scheduled(fixedRate = 30 * 60 * 1000)
private void now() { private void now() {
System.err.println("当前时间:" + dateFormat.format(new Date())); System.err.println("当前时间:" + dateFormat.format(new Date()));
} }
/** /**
* 每天固定时间提醒 * 每天固定时间提醒
*/ */
// @Scheduled(cron = "0 0 8 * * ?") // 每天8点扫一下看有没要提醒的,有就发一个 @Scheduled(cron = "0 0 8 * * ?") // 每天8点扫一下看有没要提醒的,有就发一个
@Scheduled(cron = "0 8 15 * * ?") // 测试合同提醒 // @Scheduled(cron = "0 8 15 * * ?") // 测试合同提醒
public static void reportCurrentTime() { public static void reportCurrentTime() {
List<HtzzAssoHtgx> htgxs = HtzzAssoHtgx.builder().build().selectAll(); List<HtzzAssoHtgx> htgxs = HtzzAssoHtgx.builder().build().selectAll();
for (HtzzAssoHtgx htgx : htgxs) { for (HtzzAssoHtgx htgx : htgxs) {
QueryWrapper<HtzzAdminZzda> q = new QueryWrapper<HtzzAdminZzda>(); QueryWrapper<HtzzAdminZzda> q = new QueryWrapper<HtzzAdminZzda>();
q.select("id", "zjmc", "txkg_type", "yxdqr").eq("id", htgx.getHtid()).eq("is_delete", 0).eq("txkg_type", 0); q.select("id", "zjmc", "txkg_type", "yxdqr").eq("id", htgx.getHtid()).eq("is_delete", 0).eq("txkg_type", 0);
HtzzAdminZzda zzda = HtzzAdminZzda.builder().build().selectOne(q); HtzzAdminZzda zzda = HtzzAdminZzda.builder().build().selectOne(q);
if (zzda != null) { if (zzda != null) {
String name = htgx.getName(); // 员工姓名 String name = htgx.getName(); // 员工姓名
String phone = htgx.getPhone(); // 员工手机 String phone = htgx.getPhone(); // 员工手机
String htname = zzda.getZjmc(); // 合同名称 String htname = zzda.getZjmc(); // 合同名称
Date now = new Date(); // 当前时间 Date now = new Date(); // 当前时间
Date dqsj = zzda.getYxdqr(); // 到期时间 Date dqsj = zzda.getYxdqr(); // 到期时间
String time = DateUtil.formatDate(dqsj); // 到期時間格式 String time = DateUtil.formatDate(dqsj); // 到期時間格式
Long betweenDay = DateUtil.between(dqsj, now, DateUnit.DAY); // 时间差天数 Long betweenDay = DateUtil.between(dqsj, now, DateUnit.DAY); // 时间差天数
Long sjc = dqsj.getTime() - now.getTime(); // 时间差数值 Long sjc = dqsj.getTime() - now.getTime(); // 时间差数值
System.err.println(betweenDay); System.err.println(betweenDay);
if (sjc > 0) { if (sjc > 0) {
if (betweenDay <= 1) { if (betweenDay <= 1) {
AliyunSMS.tx(name, htname, time, phone); // 少于1天短信提醒 AliyunSMS.tx(name, htname, time, phone); // 少于1天短信提醒
} else if (betweenDay == 3) { } else if (betweenDay == 3) {
AliyunSMS.tx(name, htname, time, phone); // 少于3天短信提醒 AliyunSMS.tx(name, htname, time, phone); // 少于3天短信提醒
} else if (betweenDay == 7) { } else if (betweenDay == 7) {
AliyunSMS.tx(name, htname, time, phone); // 少于7天短信提醒 AliyunSMS.tx(name, htname, time, phone); // 少于7天短信提醒
} else if (betweenDay == 30) { } else if (betweenDay == 30) {
AliyunSMS.tx(name, htname, time, phone); // 少于30天短信提醒 AliyunSMS.tx(name, htname, time, phone); // 少于30天短信提醒
} }
} else { } else {
zzda.setTxkgType(1); // 关闭提醒 zzda.setTxkgType(1); // 关闭提醒
zzda.updateById(); zzda.updateById();
} }
} }
} }
} }
} }
\ No newline at end of file
#生产环境 #生产环境
server: server:
port: 8089 port: 8089
servlet: servlet:
# context-path: /YoulinghrApiV100 # context-path: /YoulinghrApiV100
session: session:
timeout: 3600 # session会话过期时间 timeout: 3600 # session会话过期时间
spring: spring:
servlet: servlet:
multipart: multipart:
max-file-size: 20MB max-file-size: 20MB
max-request-size: 20MB max-request-size: 20MB
jpa: jpa:
# 配置生成表 存储引擎InnoDB # 配置生成表 存储引擎InnoDB
# database-platform: org.hibernate.dialect.MySQL5InnoDBDialect database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
# database: # database:
# open-in-view: false open-in-view: false
# naming: # naming:
# spring boot jpa hibernate 根据实体类生成表以及字段的命名策略 # spring boot jpa hibernate 根据实体类生成表以及字段的命名策略
# 无修改命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # 无修改命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# 遇到大写字母 加”_”的命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # 遇到大写字母 加”_”的命名 org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
# physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl # physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
hibernate: hibernate:
ddl-auto: update ddl-auto: update
show-sql: true show-sql: true
datasource: datasource:
# username: root # username: root
# password: youlingHR73! # password: youlingHR73!
username: youling8timer username: youling8timer
password: (!0YouLing8Timer0!) password: (!0YouLing8Timer0!)
# username: tang # username: tang
# password: Tang123456! # password: Tang123456!
# url: jdbc:mysql://120.24.172.51:3306/youlingrc_tang?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL # url: jdbc:mysql://120.24.172.51:3306/youlingrc_tang?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL
url: jdbc:mysql://120.24.24.239:3306/8timer_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL url: jdbc:mysql://120.24.24.239:3306/8timer_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL
# url: jdbc:mysql://192.168.172.200:3306/youlingrc_8timer201?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL # url: jdbc:mysql://192.168.172.200:3306/youlingrc_8timer201?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL
# url: jdbc:mysql://db.hhlsz.com:3306/youlingrc_8timer201?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL # url: jdbc:mysql://db.hhlsz.com:3306/youlingrc_8timer201?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&zeroDateTimeBehavior=CONVERT_TO_NULL
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
druid: druid:
# 下面为连接池的补充设置,应用到上面所有数据源中 # 下面为连接池的补充设置,应用到上面所有数据源中
# 初始化大小,最小,最大 # 初始化大小,最小,最大
initial-size: 5 initial-size: 5
min-idle: 5 min-idle: 5
max-active: 20 max-active: 20
max-wait: 60000 # 配置获取连接等待超时的时间 max-wait: 60000 # 配置获取连接等待超时的时间
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位是毫秒 min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位是毫秒
validation-query: SELECT 1 FROM DUAL validation-query: SELECT 1 FROM DUAL
test-while-idle: true # 当连接空闲时,是否执行连接测试 test-while-idle: true # 当连接空闲时,是否执行连接测试
test-on-borrow: false # 当从连接池借用连接时,是否测试该连接 test-on-borrow: false # 当从连接池借用连接时,是否测试该连接
test-on-return: false # 在连接归还到连接池时是否测试该连接 test-on-return: false # 在连接归还到连接池时是否测试该连接
# 打开PSCache,并且指定每个连接上PSCache的大小 # 打开PSCache,并且指定每个连接上PSCache的大小
pool-prepared-statements: true pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 20 max-pool-prepared-statement-per-connection-size: 20
# 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 ,不能用log4j,不然报错:Failed to bind properties under 'spring.datasource.druid' to javax.sql.DataSource: # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙 ,不能用log4j,不然报错:Failed to bind properties under 'spring.datasource.druid' to javax.sql.DataSource:
filters: stat,slf4j filters: stat,slf4j
use-global-data-source-stat: true use-global-data-source-stat: true
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录 # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
#connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 #connect-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
# 配置监控服务器 # 配置监控服务器
stat-view-servlet: stat-view-servlet:
login-username: Tang login-username: Tang
login-password: 123 login-password: 123
reset-enable: false reset-enable: false
url-pattern: /druid/* url-pattern: /druid/*
# 添加IP白名单 # 添加IP白名单
#allow: #allow:
# 添加IP黑名单,当白名单和黑名单重复时,黑名单优先级更高 # 添加IP黑名单,当白名单和黑名单重复时,黑名单优先级更高
#deny: #deny:
web-stat-filter: web-stat-filter:
# 添加过滤规则 # 添加过滤规则
url-pattern: /* url-pattern: /*
# 忽略过滤格式 # 忽略过滤格式
exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# 时间戳统一转换 # 时间戳统一转换
jackson: jackson:
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
# spring boot启动打印横幅 配置 # spring boot启动打印横幅 配置
banner: banner:
charset: UTF-8 # Banner file encoding. charset: UTF-8 # Banner file encoding.
location: banner.txt # Banner text resource location. location: banner.txt # Banner text resource location.
image: image:
location: banner.gif # Banner image file location (jpg or png can also be used). location: banner.gif # Banner image file location (jpg or png can also be used).
width: 76 # Width of the banner image in chars. width: 76 # Width of the banner image in chars.
height: 76 # Height of the banner image in chars (default based on image height). height: 76 # Height of the banner image in chars (default based on image height).
margin: 2 # Left hand image margin in chars. margin: 2 # Left hand image margin in chars.
invert: false # Whether images should be inverted for dark terminal themes. invert: false # Whether images should be inverted for dark terminal themes.
# mybatis-plus # mybatis-plus
mybatis-plus: mybatis-plus:
mapper-locations: classpath:mapping/**/*Mapper.xml # dao到xml文件映射 mapper-locations: classpath:mapping/**/*Mapper.xml # dao到xml文件映射
type-aliases-package: cn.timer.api.bean # xml中#全局类名别名 type-aliases-package: cn.timer.api.bean # xml中#全局类名别名
configuration: configuration:
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # sql日志打印 #log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # sql日志打印
call-setters-on-nulls: true # Map做返回体时 字段值为null依然返回 call-setters-on-nulls: true # Map做返回体时 字段值为null依然返回
cache-enabled: true cache-enabled: true
global-config: global-config:
db-config: db-config:
#主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID"; #主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
#id-type: uuid #id-type: uuid
id-type: auto id-type: auto
#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断" #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
# field-strategy: not_null # field-strategy: not_null
#驼峰下划线转换 #驼峰下划线转换
table-underline: true table-underline: true
#逻辑删除配置 #逻辑删除配置
#logic-delete-value: 0 #logic-delete-value: 0
#logic-not-delete-value: 1 #logic-not-delete-value: 1
# 分页插件 # 分页插件
pagehelper: pagehelper:
helperDialect: mysql helperDialect: mysql
reasonable: true reasonable: true
supportMethodsArguments: true supportMethodsArguments: true
params: count=countSql params: count=countSql
#showSql #showSql
logging: logging:
level: level:
root: DEBUG root: info
cn.timer.api.dao: error cn.timer.api.dao: error
pattern: pattern:
console: '--%p--%m%n' console: '--%p--%m%n'
#swagger: #swagger:
# ui-config: # ui-config:
# operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序 # operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序
\ No newline at end of file
<?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="cn.timer.api.dao.quartz.JobAndTriggerMapper">
<select id="getJobAndTriggerDetails"
resultType="cn.timer.api.bean.quartz.JobAndTrigger">
SELECT
qrtz_job_details.JOB_NAME,
qrtz_job_details.JOB_GROUP,
qrtz_job_details.JOB_CLASS_NAME,
qrtz_triggers.TRIGGER_NAME,
qrtz_triggers.TRIGGER_GROUP,
qrtz_cron_triggers.CRON_EXPRESSION,
qrtz_cron_triggers.TIME_ZONE_ID
FROM
qrtz_job_details
JOIN qrtz_triggers
JOIN qrtz_cron_triggers ON
qrtz_job_details.JOB_NAME =
qrtz_triggers.JOB_NAME
AND
qrtz_triggers.TRIGGER_NAME = qrtz_cron_triggers.TRIGGER_NAME
AND
qrtz_triggers.TRIGGER_GROUP = qrtz_cron_triggers.TRIGGER_GROUP
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment