add logic
This commit is contained in:
parent
6dbc53fdca
commit
e8c61568eb
93
.idea/workspace.xml
generated
93
.idea/workspace.xml
generated
@ -1,7 +1,57 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="e4baaf01-a2c2-445d-98a1-9f4c50c148cf" name="Default Changelist" comment="" />
|
<list default="true" id="e4baaf01-a2c2-445d-98a1-9f4c50c148cf" name="Default Changelist" comment="">
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/Dto/DepartmentsDto.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/Dto/StaffBaseInfoDto.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/Dto/StaffDto.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/Dto/StaffEducationInfoDto.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/Dto/StaffOccupationInfoDto.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/Dto/StaffProjectExperienceDto.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/Dto/StaffWorkTransferDto.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/enums/GenderEnum.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/enums/MaritalStatusEnum.java" afterDir="false" />
|
||||||
|
<change afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/utils/BeanConversionUtils.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/DepartmentsController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/DepartmentsController.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/dao/StaffDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/dao/StaffDao.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/dao/StaffEducationDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/dao/StaffEducationDao.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/dao/StaffOccupationDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/dao/StaffOccupationDao.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/dao/StaffProjectExperienceDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/dao/StaffProjectExperienceDao.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/dao/StaffWorkTransferRecordDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/dao/StaffWorkTransferRecordDao.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/StaffEducationService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/StaffEducationService.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/StaffOccupationService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/StaffOccupationService.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/StaffProjectExperienceService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/StaffProjectExperienceService.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/StaffService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/StaffService.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/StaffWorkTransferRecordService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/StaffWorkTransferRecordService.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/DepartmentsServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/DepartmentsServiceImpl.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffEducationServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffEducationServiceImpl.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffOccupationServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffOccupationServiceImpl.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffProjectExperienceServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffProjectExperienceServiceImpl.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffWorkTransferRecordServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffWorkTransferRecordServiceImpl.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lz/modules/sys/oauth2/OAuth2Filter.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffDao.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffEducationDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffEducationDao.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffOccupationDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffOccupationDao.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffProjectExperienceDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffProjectExperienceDao.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffWorkTransferRecordDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mapper/generator/StaffWorkTransferRecordDao.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/main/resources/static/swagger/index.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/static/swagger/index.yaml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/test/java/com/lz/FumeiaiTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/lz/FumeiaiTest.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/classes/com/lz/modules/app/controller/DepartmentsController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/lz/modules/app/controller/DepartmentsController.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/classes/com/lz/modules/app/controller/StaffController.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/lz/modules/app/controller/StaffController.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/classes/com/lz/modules/app/dao/StaffDao.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/lz/modules/app/dao/StaffDao.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/classes/com/lz/modules/app/service/StaffService.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/lz/modules/app/service/StaffService.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/classes/com/lz/modules/app/service/impl/DepartmentsServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/lz/modules/app/service/impl/DepartmentsServiceImpl.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/classes/com/lz/modules/app/service/impl/StaffServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/lz/modules/app/service/impl/StaffServiceImpl.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/classes/com/lz/modules/sys/oauth2/OAuth2Filter.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/lz/modules/sys/oauth2/OAuth2Filter.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/classes/mapper/generator/StaffDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/mapper/generator/StaffDao.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/classes/static/swagger/index.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/static/swagger/index.yaml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/test-classes/com/lz/FumeiaiTest$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/com/lz/FumeiaiTest$1.class" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/target/test-classes/com/lz/FumeiaiTest.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/test-classes/com/lz/FumeiaiTest.class" afterDir="false" />
|
||||||
|
</list>
|
||||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -37,6 +87,7 @@
|
|||||||
<property name="RequestMappingsPanelOrder1" value="1" />
|
<property name="RequestMappingsPanelOrder1" value="1" />
|
||||||
<property name="RequestMappingsPanelWidth0" value="75" />
|
<property name="RequestMappingsPanelWidth0" value="75" />
|
||||||
<property name="RequestMappingsPanelWidth1" value="75" />
|
<property name="RequestMappingsPanelWidth1" value="75" />
|
||||||
|
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
||||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||||
<property name="aspect.path.notification.shown" value="true" />
|
<property name="aspect.path.notification.shown" value="true" />
|
||||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||||
@ -44,11 +95,11 @@
|
|||||||
</component>
|
</component>
|
||||||
<component name="RecentsManager">
|
<component name="RecentsManager">
|
||||||
<key name="CopyClassDialog.RECENTS_KEY">
|
<key name="CopyClassDialog.RECENTS_KEY">
|
||||||
|
<recent name="com.lz.modules.app.Dto" />
|
||||||
|
<recent name="com.lz.modules.app.enums" />
|
||||||
<recent name="com.lz.modules.app.entity.excel" />
|
<recent name="com.lz.modules.app.entity.excel" />
|
||||||
<recent name="com.lz.modules.job.model.responseBo" />
|
<recent name="com.lz.modules.job.model.responseBo" />
|
||||||
<recent name="com.lz" />
|
<recent name="com.lz" />
|
||||||
<recent name="com.lz.common.utils" />
|
|
||||||
<recent name="com.lz.modules.job.business" />
|
|
||||||
</key>
|
</key>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunDashboard">
|
<component name="RunDashboard">
|
||||||
@ -63,7 +114,7 @@
|
|||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager" selected="Spring Boot.LinziApplication">
|
<component name="RunManager" selected="JUnit.FumeiaiTest.contextLoads">
|
||||||
<configuration name="FeishuBusiness.getFeishuDepartmentsIntoData" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
<configuration name="FeishuBusiness.getFeishuDepartmentsIntoData" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||||
<module name="lz_management" />
|
<module name="lz_management" />
|
||||||
<extension name="coverage">
|
<extension name="coverage">
|
||||||
@ -127,8 +178,8 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
<recent_temporary>
|
<recent_temporary>
|
||||||
<list>
|
<list>
|
||||||
<item itemvalue="Spring Boot.LinziApplication" />
|
|
||||||
<item itemvalue="JUnit.FumeiaiTest.contextLoads" />
|
<item itemvalue="JUnit.FumeiaiTest.contextLoads" />
|
||||||
|
<item itemvalue="Spring Boot.LinziApplication" />
|
||||||
<item itemvalue="JUnit.RedisTest.contextLoads" />
|
<item itemvalue="JUnit.RedisTest.contextLoads" />
|
||||||
<item itemvalue="JUnit.FeishuBusiness.getFeishuDepartmentsIntoData" />
|
<item itemvalue="JUnit.FeishuBusiness.getFeishuDepartmentsIntoData" />
|
||||||
</list>
|
</list>
|
||||||
@ -147,7 +198,7 @@
|
|||||||
<workItem from="1588159936850" duration="1226000" />
|
<workItem from="1588159936850" duration="1226000" />
|
||||||
<workItem from="1588161274115" duration="1691000" />
|
<workItem from="1588161274115" duration="1691000" />
|
||||||
<workItem from="1588163384182" duration="74761000" />
|
<workItem from="1588163384182" duration="74761000" />
|
||||||
<workItem from="1588936950753" duration="3889000" />
|
<workItem from="1588936950753" duration="52262000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
@ -176,14 +227,34 @@
|
|||||||
<option name="timeStamp" value="1" />
|
<option name="timeStamp" value="1" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
<line-breakpoint enabled="true" type="java-line">
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/DepartmentsServiceImpl.java</url>
|
<url>file://$PROJECT_DIR$/src/test/java/com/lz/FumeiaiTest.java</url>
|
||||||
<line>43</line>
|
<line>190</line>
|
||||||
<option name="timeStamp" value="11" />
|
<option name="timeStamp" value="43" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
<line-breakpoint enabled="true" type="java-line">
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
<url>file://$PROJECT_DIR$/src/test/java/com/lz/FumeiaiTest.java</url>
|
<url>file://$PROJECT_DIR$/src/test/java/com/lz/FumeiaiTest.java</url>
|
||||||
<line>100</line>
|
<line>168</line>
|
||||||
<option name="timeStamp" value="36" />
|
<option name="timeStamp" value="46" />
|
||||||
|
</line-breakpoint>
|
||||||
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
|
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/DepartmentsController.java</url>
|
||||||
|
<line>53</line>
|
||||||
|
<option name="timeStamp" value="49" />
|
||||||
|
</line-breakpoint>
|
||||||
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
|
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/sys/controller/SysRoleController.java</url>
|
||||||
|
<line>61</line>
|
||||||
|
<option name="timeStamp" value="50" />
|
||||||
|
</line-breakpoint>
|
||||||
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
|
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/sys/controller/SysMenuController.java</url>
|
||||||
|
<line>54</line>
|
||||||
|
<option name="timeStamp" value="51" />
|
||||||
|
</line-breakpoint>
|
||||||
|
<line-breakpoint enabled="true" type="java-line">
|
||||||
|
<url>file://$PROJECT_DIR$/src/test/java/com/lz/FumeiaiTest.java</url>
|
||||||
|
<line>85</line>
|
||||||
|
<option name="timeStamp" value="54" />
|
||||||
</line-breakpoint>
|
</line-breakpoint>
|
||||||
</breakpoints>
|
</breakpoints>
|
||||||
</breakpoint-manager>
|
</breakpoint-manager>
|
||||||
|
|||||||
32
pom.xml
32
pom.xml
@ -297,28 +297,18 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
<repositories>
|
|
||||||
|
<distributionManagement>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>snapshots</id>
|
||||||
|
<name>eb starter parent</name>
|
||||||
|
<url>http://nexus.ldxinyong.com/nexus/content/repositories/snapshots/</url>
|
||||||
|
</snapshotRepository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>public</id>
|
<id>release</id>
|
||||||
<name>aliyun nexus</name>
|
<name>Ueb starter parent</name>
|
||||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
<url>http://nexus.ldxinyong.com/nexus/content/repositories/snapshots/</url>
|
||||||
<releases>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</releases>
|
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</distributionManagement>
|
||||||
<pluginRepositories>
|
|
||||||
<pluginRepository>
|
|
||||||
<id>public</id>
|
|
||||||
<name>aliyun nexus</name>
|
|
||||||
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
|
|
||||||
<releases>
|
|
||||||
<enabled>true</enabled>
|
|
||||||
</releases>
|
|
||||||
<snapshots>
|
|
||||||
<enabled>false</enabled>
|
|
||||||
</snapshots>
|
|
||||||
</pluginRepository>
|
|
||||||
</pluginRepositories>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
36
src/main/java/com/lz/modules/app/Dto/DepartmentsDto.java
Normal file
36
src/main/java/com/lz/modules/app/Dto/DepartmentsDto.java
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
package com.lz.modules.app.Dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门表
|
||||||
|
*
|
||||||
|
* @author fumeiai
|
||||||
|
* @email fumeiai@linzikg.com
|
||||||
|
* @date 2020-04-30 16:59:50
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DepartmentsDto implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 飞书部门id
|
||||||
|
*/
|
||||||
|
private String departmentId;
|
||||||
|
/**
|
||||||
|
* 飞书上级部门id
|
||||||
|
*/
|
||||||
|
private String departmentParentId;
|
||||||
|
/**
|
||||||
|
* 飞书显示部门人数
|
||||||
|
*/
|
||||||
|
private Integer memberCount;
|
||||||
|
/**
|
||||||
|
* 组织架构名称/部门名称
|
||||||
|
*/
|
||||||
|
private String departmentName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
25
src/main/java/com/lz/modules/app/Dto/StaffBaseInfoDto.java
Normal file
25
src/main/java/com/lz/modules/app/Dto/StaffBaseInfoDto.java
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package com.lz.modules.app.Dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StaffBaseInfoDto {
|
||||||
|
|
||||||
|
//姓名
|
||||||
|
private String staffName;
|
||||||
|
//性别
|
||||||
|
private Integer gender;
|
||||||
|
//生日
|
||||||
|
private String birthday;
|
||||||
|
//婚姻状况
|
||||||
|
private Integer maritalStatus;
|
||||||
|
//民族
|
||||||
|
private String national;
|
||||||
|
//政治面貌
|
||||||
|
private String politicalLandscape;
|
||||||
|
//联系电话
|
||||||
|
private String mobile;
|
||||||
|
//现住址
|
||||||
|
private String currentAddress;
|
||||||
|
|
||||||
|
}
|
||||||
44
src/main/java/com/lz/modules/app/Dto/StaffDto.java
Normal file
44
src/main/java/com/lz/modules/app/Dto/StaffDto.java
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
package com.lz.modules.app.Dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工基本信息
|
||||||
|
*
|
||||||
|
* @author fumeiai
|
||||||
|
* @email fumeiai@linzikg.com
|
||||||
|
* @date 2020-04-29 20:59:20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StaffDto implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工Id
|
||||||
|
*/
|
||||||
|
private Long staffId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工工号
|
||||||
|
*/
|
||||||
|
private String staffNo;
|
||||||
|
/**
|
||||||
|
* 员工姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 职位
|
||||||
|
*/
|
||||||
|
private String position;
|
||||||
|
/**
|
||||||
|
* 人员状态【1:离职;0:在职】
|
||||||
|
*/
|
||||||
|
private Integer staffStatus;
|
||||||
|
/**
|
||||||
|
* 是否是部门负责人
|
||||||
|
*/
|
||||||
|
private Integer departmentLeader;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.lz.modules.app.Dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StaffEducationInfoDto {
|
||||||
|
|
||||||
|
//学历 (初中/高中/大专/本科/硕士及以上)
|
||||||
|
private String education;
|
||||||
|
//毕业院校
|
||||||
|
private String graduatedSchool;
|
||||||
|
//专业
|
||||||
|
private String specialty;
|
||||||
|
//毕业日期
|
||||||
|
private String graduationTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,79 @@
|
|||||||
|
package com.lz.modules.app.Dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工职业信息
|
||||||
|
*
|
||||||
|
* @author fumeiai
|
||||||
|
* @email fumeiai@linzikg.com
|
||||||
|
* @date 2020-04-29 20:59:20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StaffOccupationInfoDto implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 员工工号
|
||||||
|
*/
|
||||||
|
private String staffNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职位
|
||||||
|
*/
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入职时间
|
||||||
|
*/
|
||||||
|
private String entryTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 人员状态【1:离职;0:在职】
|
||||||
|
*/
|
||||||
|
private String staffStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 离职时间
|
||||||
|
*/
|
||||||
|
private String resignationTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 离职原因
|
||||||
|
*/
|
||||||
|
private String resignationReasons;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 劳动合同签订公司
|
||||||
|
*/
|
||||||
|
private String signingCompany;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 岗位最初从业时间
|
||||||
|
*/
|
||||||
|
private String jobBeginTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工作经历
|
||||||
|
*/
|
||||||
|
private String workExperience;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 简历附件url
|
||||||
|
*/
|
||||||
|
private String resumeUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目经历
|
||||||
|
*/
|
||||||
|
private List<StaffProjectExperienceDto> projectExperiences;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工作调转记录
|
||||||
|
*/
|
||||||
|
private List<StaffWorkTransferDto> workTransfers;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.lz.modules.app.Dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StaffProjectExperienceDto {
|
||||||
|
|
||||||
|
//项目名称
|
||||||
|
private String projectName;
|
||||||
|
//项目时间起
|
||||||
|
private String projectBeginTime;
|
||||||
|
//项目时间止
|
||||||
|
private String projectEndTime;
|
||||||
|
//工作内容
|
||||||
|
private String projectContent;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
package com.lz.modules.app.Dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StaffWorkTransferDto {
|
||||||
|
|
||||||
|
//时间
|
||||||
|
private String transferTime;
|
||||||
|
//调转记录
|
||||||
|
private String transferRecord;
|
||||||
|
//调转类型[平调/升职/降职]
|
||||||
|
private String transferType;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,8 +1,11 @@
|
|||||||
package com.lz.modules.app.controller;
|
package com.lz.modules.app.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.lz.modules.app.Dto.DepartmentsDto;
|
||||||
|
import com.lz.modules.app.utils.BeanConversionUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@ -17,7 +20,6 @@ import com.lz.common.utils.PageUtils;
|
|||||||
import com.lz.common.utils.R;
|
import com.lz.common.utils.R;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门表
|
* 部门表
|
||||||
*
|
*
|
||||||
@ -26,7 +28,7 @@ import com.lz.common.utils.R;
|
|||||||
* @date 2020-04-30 16:59:50
|
* @date 2020-04-30 16:59:50
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("generator/departments")
|
@RequestMapping("staff/structure")
|
||||||
public class DepartmentsController {
|
public class DepartmentsController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private DepartmentsService departmentsService;
|
private DepartmentsService departmentsService;
|
||||||
@ -35,11 +37,11 @@ public class DepartmentsController {
|
|||||||
* 列表
|
* 列表
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/list")
|
@RequestMapping("/list")
|
||||||
@RequiresPermissions("generator:departments:list")
|
// @RequiresPermissions("staff:structure:list")
|
||||||
public R list(@RequestParam Map<String, Object> params){
|
public List<DepartmentsDto> list() {
|
||||||
PageUtils page = departmentsService.queryPage(params);
|
List<DepartmentsDto> departmentList = BeanConversionUtils.listCopyToAnotherList(DepartmentsDto.class, departmentsService.list());
|
||||||
|
|
||||||
return R.ok().put("page", page);
|
return departmentList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -47,10 +49,9 @@ public class DepartmentsController {
|
|||||||
* 信息
|
* 信息
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/info/{id}")
|
@RequestMapping("/info/{id}")
|
||||||
@RequiresPermissions("generator:departments:info")
|
// @RequiresPermissions("staff:structure::info")
|
||||||
public R info(@PathVariable("id") Long id){
|
public R info(@PathVariable("id") Long id) {
|
||||||
DepartmentsEntity departments = departmentsService.getById(id);
|
DepartmentsEntity departments = departmentsService.getById(id);
|
||||||
|
|
||||||
return R.ok().put("departments", departments);
|
return R.ok().put("departments", departments);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,9 +59,9 @@ public class DepartmentsController {
|
|||||||
* 保存
|
* 保存
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/save")
|
@RequestMapping("/save")
|
||||||
@RequiresPermissions("generator:departments:save")
|
@RequiresPermissions("staff:structure:save")
|
||||||
public R save(@RequestBody DepartmentsEntity departments){
|
public R save(@RequestBody DepartmentsEntity departments) {
|
||||||
departmentsService.save(departments);
|
departmentsService.save(departments);
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@ -69,9 +70,9 @@ public class DepartmentsController {
|
|||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/update")
|
@RequestMapping("/update")
|
||||||
@RequiresPermissions("generator:departments:update")
|
@RequiresPermissions("staff:structure:update")
|
||||||
public R update(@RequestBody DepartmentsEntity departments){
|
public R update(@RequestBody DepartmentsEntity departments) {
|
||||||
departmentsService.updateById(departments);
|
departmentsService.updateById(departments);
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@ -80,9 +81,9 @@ public class DepartmentsController {
|
|||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/delete")
|
@RequestMapping("/delete")
|
||||||
@RequiresPermissions("generator:departments:delete")
|
@RequiresPermissions("staff:structure:delete")
|
||||||
public R delete(@RequestBody Long[] ids){
|
public R delete(@RequestBody Long[] ids) {
|
||||||
departmentsService.removeByIds(Arrays.asList(ids));
|
departmentsService.removeByIds(Arrays.asList(ids));
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,13 @@
|
|||||||
package com.lz.modules.app.controller;
|
package com.lz.modules.app.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.lz.modules.app.Dto.*;
|
||||||
|
import com.lz.modules.app.service.*;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@ -12,12 +17,9 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
import com.lz.modules.app.service.StaffService;
|
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.common.utils.R;
|
import com.lz.common.utils.R;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工基本信息表
|
* 员工基本信息表
|
||||||
*
|
*
|
||||||
@ -26,41 +28,102 @@ import com.lz.common.utils.R;
|
|||||||
* @date 2020-04-29 20:59:20
|
* @date 2020-04-29 20:59:20
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("generator/staff")
|
@RequestMapping("staff/info")
|
||||||
public class StaffController {
|
public class StaffController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private StaffService staffService;
|
private StaffService staffService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StaffEducationService staffEducationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StaffOccupationService staffOccupationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StaffProjectExperienceService staffProjectExperienceService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StaffWorkTransferRecordService staffWorkTransferRecordService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 列表
|
* 列表
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/list")
|
@RequestMapping("/list")
|
||||||
@RequiresPermissions("generator:staff:list")
|
// @RequiresPermissions("staff:info:list")
|
||||||
public R list(@RequestParam Map<String, Object> params){
|
public R list(@RequestParam String jsonString) {
|
||||||
PageUtils page = staffService.queryPage(params);
|
//当前页
|
||||||
|
int currentPage = 0;
|
||||||
|
//默认每页返回数量
|
||||||
|
int limit = 10;
|
||||||
|
//部门Id
|
||||||
|
String departmentId = "";
|
||||||
|
//员工姓名
|
||||||
|
String name = "";
|
||||||
|
//人员状态【1:离职;0:在职】
|
||||||
|
Integer staffStatus = 0;
|
||||||
|
|
||||||
return R.ok().put("page", page);
|
Map<String, Object> params = JSON.parseObject(jsonString, Map.class);
|
||||||
|
|
||||||
|
if (params.containsKey("page")) {
|
||||||
|
currentPage = Integer.parseInt(params.get("page").toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.containsKey("limit")) {
|
||||||
|
limit = Integer.parseInt(params.get("limit").toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.containsKey("departmentId")) {
|
||||||
|
departmentId = params.get("departmentId").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.containsKey("name")) {
|
||||||
|
name = params.get("name").toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.containsKey("staffStatus")) {
|
||||||
|
staffStatus = Integer.parseInt(params.get("staffStatus").toString());
|
||||||
|
}
|
||||||
|
List<StaffDto> staffInfos = staffService.getStaffInfos(currentPage, limit, departmentId, name, staffStatus);
|
||||||
|
//总页码
|
||||||
|
int maxCount = staffService.getStaffInfoCount(departmentId, name, staffStatus);
|
||||||
|
|
||||||
|
R ret = R.ok();
|
||||||
|
PageUtils pageInfo = new PageUtils(staffInfos, maxCount, limit, currentPage);
|
||||||
|
ret.put("page", pageInfo);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 信息
|
* 信息
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/info/{id}")
|
@RequestMapping("/query/{staffId}")
|
||||||
@RequiresPermissions("generator:staff:info")
|
@RequiresPermissions("staff:info:query")
|
||||||
public R info(@PathVariable("id") Long id){
|
public R info(@PathVariable("staffId") Long id) {
|
||||||
StaffEntity staff = staffService.getById(id);
|
StaffEntity staff = staffService.getById(id);
|
||||||
|
Map data = new HashMap();
|
||||||
return R.ok().put("staff", staff);
|
data.put("staffId", id);
|
||||||
|
StaffBaseInfoDto staffBaseInfoDto = staffService.getBaseInfo(id);
|
||||||
|
StaffEducationInfoDto staffEducationInfoDto = staffEducationService.getInfoByStaffId(id);
|
||||||
|
StaffOccupationInfoDto staffOccupationInfoDto = staffOccupationService.getOccupationByStaffId(id);
|
||||||
|
List<StaffProjectExperienceDto> staffProjectExperiences = staffProjectExperienceService.getProjectInfoByStaffId(id);
|
||||||
|
List<StaffWorkTransferDto> staffWorkTransfers = staffWorkTransferRecordService.getWorkInfoByStaffId(id);
|
||||||
|
staffOccupationInfoDto.setProjectExperiences(staffProjectExperiences);
|
||||||
|
staffOccupationInfoDto.setWorkTransfers(staffWorkTransfers);
|
||||||
|
data.put("baseInfo", staffBaseInfoDto);
|
||||||
|
data.put("educationInfo", staffEducationInfoDto);
|
||||||
|
data.put("occupationInfo", staffOccupationInfoDto);
|
||||||
|
return R.ok().put("data", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/save")
|
@RequestMapping("/save")
|
||||||
@RequiresPermissions("generator:staff:save")
|
@RequiresPermissions("staff:info:save")
|
||||||
public R save(@RequestBody StaffEntity staff){
|
public R save(@RequestBody StaffEntity staff) {
|
||||||
staffService.save(staff);
|
staffService.save(staff);
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@ -69,9 +132,9 @@ public class StaffController {
|
|||||||
* 修改
|
* 修改
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/update")
|
@RequestMapping("/update")
|
||||||
@RequiresPermissions("generator:staff:update")
|
@RequiresPermissions("staff:info:update")
|
||||||
public R update(@RequestBody StaffEntity staff){
|
public R update(@RequestBody StaffEntity staff) {
|
||||||
staffService.updateById(staff);
|
staffService.updateById(staff);
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
@ -80,9 +143,9 @@ public class StaffController {
|
|||||||
* 删除
|
* 删除
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/delete")
|
@RequestMapping("/delete")
|
||||||
@RequiresPermissions("generator:staff:delete")
|
@RequiresPermissions("staff:info:delete")
|
||||||
public R delete(@RequestBody Long[] ids){
|
public R delete(@RequestBody Long[] ids) {
|
||||||
staffService.removeByIds(Arrays.asList(ids));
|
staffService.removeByIds(Arrays.asList(ids));
|
||||||
|
|
||||||
return R.ok();
|
return R.ok();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
package com.lz.modules.app.dao;
|
package com.lz.modules.app.dao;
|
||||||
|
|
||||||
|
import com.lz.modules.app.Dto.StaffBaseInfoDto;
|
||||||
|
import com.lz.modules.app.Dto.StaffDto;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@ -23,4 +25,13 @@ public interface StaffDao extends BaseMapper<StaffEntity> {
|
|||||||
|
|
||||||
int addStaffBatch(@Param("staffs") List<StaffEntity> staffs);
|
int addStaffBatch(@Param("staffs") List<StaffEntity> staffs);
|
||||||
|
|
||||||
|
StaffEntity getByName(@Param("name") String name);
|
||||||
|
|
||||||
|
List<StaffDto> getStaffInfos(@Param("departmentId") String departmentId, @Param("name") String name, @Param("staffStatus") Integer staffStatus, @Param("pageLimit") int pageLimit, @Param("startIndex") int startIndex);
|
||||||
|
|
||||||
|
int getStaffInfoCount(@Param("departmentId") String departmentId, @Param("name") String name, @Param("staffStatus") Integer staffStatus);
|
||||||
|
|
||||||
|
StaffBaseInfoDto getBaseInfo(@Param("staffId") Long staffId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.lz.modules.app.dao;
|
package com.lz.modules.app.dao;
|
||||||
|
|
||||||
|
import com.lz.modules.app.Dto.StaffEducationInfoDto;
|
||||||
import com.lz.modules.app.entity.StaffEducationEntity;
|
import com.lz.modules.app.entity.StaffEducationEntity;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@ -14,4 +15,6 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface StaffEducationDao extends BaseMapper<StaffEducationEntity> {
|
public interface StaffEducationDao extends BaseMapper<StaffEducationEntity> {
|
||||||
|
|
||||||
|
StaffEducationInfoDto getInfoByStaffId(Long staffId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.lz.modules.app.dao;
|
package com.lz.modules.app.dao;
|
||||||
|
|
||||||
|
import com.lz.modules.app.Dto.StaffOccupationInfoDto;
|
||||||
import com.lz.modules.app.entity.StaffOccupationEntity;
|
import com.lz.modules.app.entity.StaffOccupationEntity;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
@ -24,5 +25,7 @@ public interface StaffOccupationDao extends BaseMapper<StaffOccupationEntity> {
|
|||||||
|
|
||||||
int addStaffOccupationBatch(@Param("staffOccupations") List<StaffOccupationEntity> staffOccupations);
|
int addStaffOccupationBatch(@Param("staffOccupations") List<StaffOccupationEntity> staffOccupations);
|
||||||
|
|
||||||
|
StaffOccupationInfoDto getOccupationByStaffId(@Param("staffId") Long staffId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
package com.lz.modules.app.dao;
|
package com.lz.modules.app.dao;
|
||||||
|
|
||||||
|
import com.lz.modules.app.Dto.StaffProjectExperienceDto;
|
||||||
import com.lz.modules.app.entity.StaffProjectExperienceEntity;
|
import com.lz.modules.app.entity.StaffProjectExperienceEntity;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工项目经历表
|
* 员工项目经历表
|
||||||
*
|
*
|
||||||
@ -14,4 +17,6 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface StaffProjectExperienceDao extends BaseMapper<StaffProjectExperienceEntity> {
|
public interface StaffProjectExperienceDao extends BaseMapper<StaffProjectExperienceEntity> {
|
||||||
|
|
||||||
|
List<StaffProjectExperienceDto> getProjectInfoByStaffId(Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,12 @@
|
|||||||
package com.lz.modules.app.dao;
|
package com.lz.modules.app.dao;
|
||||||
|
|
||||||
|
import com.lz.modules.app.Dto.StaffWorkTransferDto;
|
||||||
import com.lz.modules.app.entity.StaffWorkTransferRecordEntity;
|
import com.lz.modules.app.entity.StaffWorkTransferRecordEntity;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 员工工作调转记录表
|
* 员工工作调转记录表
|
||||||
@ -14,4 +18,6 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
@Mapper
|
@Mapper
|
||||||
public interface StaffWorkTransferRecordDao extends BaseMapper<StaffWorkTransferRecordEntity> {
|
public interface StaffWorkTransferRecordDao extends BaseMapper<StaffWorkTransferRecordEntity> {
|
||||||
|
|
||||||
|
List<StaffWorkTransferDto> getWorkInfoByStaffId(@Param("staffId") Long staffId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
44
src/main/java/com/lz/modules/app/enums/GenderEnum.java
Normal file
44
src/main/java/com/lz/modules/app/enums/GenderEnum.java
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
package com.lz.modules.app.enums;
|
||||||
|
|
||||||
|
|
||||||
|
public enum GenderEnum {
|
||||||
|
|
||||||
|
male("男", 1),
|
||||||
|
female("女", 2),
|
||||||
|
unknow("未知", 3);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
GenderEnum(String name, Integer code) {
|
||||||
|
this.name = name;
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Integer findCodeByName(String name) {
|
||||||
|
for (GenderEnum gender : GenderEnum.values()) {
|
||||||
|
if (gender.getName().equals(name)) {
|
||||||
|
return gender.getCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,43 @@
|
|||||||
|
package com.lz.modules.app.enums;
|
||||||
|
|
||||||
|
|
||||||
|
public enum MaritalStatusEnum {
|
||||||
|
|
||||||
|
unmarried("未婚", 0),
|
||||||
|
married("已婚", 1);
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
MaritalStatusEnum(String name, Integer code) {
|
||||||
|
this.name = name;
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Integer findCodeByName(String name) {
|
||||||
|
for (MaritalStatusEnum gender : MaritalStatusEnum.values()) {
|
||||||
|
if (gender.getName().equals(name)) {
|
||||||
|
return gender.getCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -2,6 +2,7 @@ package com.lz.modules.app.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
|
import com.lz.modules.app.Dto.StaffEducationInfoDto;
|
||||||
import com.lz.modules.app.entity.StaffEducationEntity;
|
import com.lz.modules.app.entity.StaffEducationEntity;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -16,5 +17,10 @@ import java.util.Map;
|
|||||||
public interface StaffEducationService extends IService<StaffEducationEntity> {
|
public interface StaffEducationService extends IService<StaffEducationEntity> {
|
||||||
|
|
||||||
PageUtils queryPage(Map<String, Object> params);
|
PageUtils queryPage(Map<String, Object> params);
|
||||||
|
|
||||||
|
StaffEducationInfoDto getInfoByStaffId(Long staffId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.lz.modules.app.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
|
import com.lz.modules.app.Dto.StaffOccupationInfoDto;
|
||||||
import com.lz.modules.app.entity.StaffOccupationEntity;
|
import com.lz.modules.app.entity.StaffOccupationEntity;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -24,5 +25,6 @@ public interface StaffOccupationService extends IService<StaffOccupationEntity>
|
|||||||
|
|
||||||
int addStaffOccupationBatch(List<StaffOccupationEntity> staffs);
|
int addStaffOccupationBatch(List<StaffOccupationEntity> staffs);
|
||||||
|
|
||||||
|
StaffOccupationInfoDto getOccupationByStaffId(Long id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,10 @@ package com.lz.modules.app.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
|
import com.lz.modules.app.Dto.StaffProjectExperienceDto;
|
||||||
import com.lz.modules.app.entity.StaffProjectExperienceEntity;
|
import com.lz.modules.app.entity.StaffProjectExperienceEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,5 +18,7 @@ import java.util.Map;
|
|||||||
public interface StaffProjectExperienceService extends IService<StaffProjectExperienceEntity> {
|
public interface StaffProjectExperienceService extends IService<StaffProjectExperienceEntity> {
|
||||||
|
|
||||||
PageUtils queryPage(Map<String, Object> params);
|
PageUtils queryPage(Map<String, Object> params);
|
||||||
|
|
||||||
|
List<StaffProjectExperienceDto> getProjectInfoByStaffId(Long id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,8 @@ package com.lz.modules.app.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
|
import com.lz.modules.app.Dto.StaffBaseInfoDto;
|
||||||
|
import com.lz.modules.app.Dto.StaffDto;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;
|
import com.lz.modules.job.model.responseBo.DepartmentStaffBo;
|
||||||
|
|
||||||
@ -23,5 +25,13 @@ public interface StaffService extends IService<StaffEntity> {
|
|||||||
|
|
||||||
StaffEntity getStaffInfoByOpenId(String openId);
|
StaffEntity getStaffInfoByOpenId(String openId);
|
||||||
|
|
||||||
|
StaffEntity getByName(String name);
|
||||||
|
|
||||||
|
List<StaffDto> getStaffInfos(int currentPage, int limit, String departmentId, String name, Integer staffStatus);
|
||||||
|
|
||||||
|
int getStaffInfoCount(String departmentId, String name, Integer staffStatus);
|
||||||
|
|
||||||
|
StaffBaseInfoDto getBaseInfo(Long staffId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,10 @@ package com.lz.modules.app.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
|
import com.lz.modules.app.Dto.StaffWorkTransferDto;
|
||||||
import com.lz.modules.app.entity.StaffWorkTransferRecordEntity;
|
import com.lz.modules.app.entity.StaffWorkTransferRecordEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,5 +18,7 @@ import java.util.Map;
|
|||||||
public interface StaffWorkTransferRecordService extends IService<StaffWorkTransferRecordEntity> {
|
public interface StaffWorkTransferRecordService extends IService<StaffWorkTransferRecordEntity> {
|
||||||
|
|
||||||
PageUtils queryPage(Map<String, Object> params);
|
PageUtils queryPage(Map<String, Object> params);
|
||||||
|
|
||||||
|
List<StaffWorkTransferDto> getWorkInfoByStaffId(Long staffId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,6 @@ import com.lz.common.utils.Query;
|
|||||||
import com.lz.modules.app.dao.DepartmentsDao;
|
import com.lz.modules.app.dao.DepartmentsDao;
|
||||||
import com.lz.modules.app.entity.DepartmentsEntity;
|
import com.lz.modules.app.entity.DepartmentsEntity;
|
||||||
import com.lz.modules.app.service.DepartmentsService;
|
import com.lz.modules.app.service.DepartmentsService;
|
||||||
import com.lz.modules.job.business.FeishuBusiness;
|
|
||||||
import com.lz.modules.job.model.responseBo.DepartmentInfosBo;
|
import com.lz.modules.job.model.responseBo.DepartmentInfosBo;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.lz.modules.app.service.impl;
|
package com.lz.modules.app.service.impl;
|
||||||
|
|
||||||
|
import com.lz.modules.app.Dto.StaffEducationInfoDto;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@ -12,10 +13,15 @@ import com.lz.modules.app.dao.StaffEducationDao;
|
|||||||
import com.lz.modules.app.entity.StaffEducationEntity;
|
import com.lz.modules.app.entity.StaffEducationEntity;
|
||||||
import com.lz.modules.app.service.StaffEducationService;
|
import com.lz.modules.app.service.StaffEducationService;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
||||||
@Service("staffEducationService")
|
@Service("staffEducationService")
|
||||||
public class StaffEducationServiceImpl extends ServiceImpl<StaffEducationDao, StaffEducationEntity> implements StaffEducationService {
|
public class StaffEducationServiceImpl extends ServiceImpl<StaffEducationDao, StaffEducationEntity> implements StaffEducationService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
StaffEducationDao staffEducationDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils queryPage(Map<String, Object> params) {
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
IPage<StaffEducationEntity> page = this.page(
|
IPage<StaffEducationEntity> page = this.page(
|
||||||
@ -26,4 +32,9 @@ public class StaffEducationServiceImpl extends ServiceImpl<StaffEducationDao, St
|
|||||||
return new PageUtils(page);
|
return new PageUtils(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StaffEducationInfoDto getInfoByStaffId(Long staffId) {
|
||||||
|
return staffEducationDao.getInfoByStaffId(staffId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.common.utils.Query;
|
import com.lz.common.utils.Query;
|
||||||
|
import com.lz.modules.app.Dto.StaffOccupationInfoDto;
|
||||||
import com.lz.modules.app.dao.StaffOccupationDao;
|
import com.lz.modules.app.dao.StaffOccupationDao;
|
||||||
import com.lz.modules.app.entity.StaffOccupationEntity;
|
import com.lz.modules.app.entity.StaffOccupationEntity;
|
||||||
import com.lz.modules.app.service.StaffOccupationService;
|
import com.lz.modules.app.service.StaffOccupationService;
|
||||||
@ -46,4 +47,9 @@ public class StaffOccupationServiceImpl extends ServiceImpl<StaffOccupationDao,
|
|||||||
return staffOccupationDao.addStaffOccupationBatch(staffs);
|
return staffOccupationDao.addStaffOccupationBatch(staffs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StaffOccupationInfoDto getOccupationByStaffId(Long staffId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
package com.lz.modules.app.service.impl;
|
package com.lz.modules.app.service.impl;
|
||||||
|
|
||||||
|
import com.lz.modules.app.Dto.StaffProjectExperienceDto;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -12,18 +15,27 @@ import com.lz.modules.app.dao.StaffProjectExperienceDao;
|
|||||||
import com.lz.modules.app.entity.StaffProjectExperienceEntity;
|
import com.lz.modules.app.entity.StaffProjectExperienceEntity;
|
||||||
import com.lz.modules.app.service.StaffProjectExperienceService;
|
import com.lz.modules.app.service.StaffProjectExperienceService;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
||||||
@Service("staffProjectExperienceService")
|
@Service("staffProjectExperienceService")
|
||||||
public class StaffProjectExperienceServiceImpl extends ServiceImpl<StaffProjectExperienceDao, StaffProjectExperienceEntity> implements StaffProjectExperienceService {
|
public class StaffProjectExperienceServiceImpl extends ServiceImpl<StaffProjectExperienceDao, StaffProjectExperienceEntity> implements StaffProjectExperienceService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
StaffProjectExperienceDao staffProjectExperienceDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils queryPage(Map<String, Object> params) {
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
IPage<StaffProjectExperienceEntity> page = this.page(
|
IPage<StaffProjectExperienceEntity> page = this.page(
|
||||||
new Query<StaffProjectExperienceEntity>().getPage(params),
|
new Query<StaffProjectExperienceEntity>().getPage(params),
|
||||||
new QueryWrapper<StaffProjectExperienceEntity>()
|
new QueryWrapper<StaffProjectExperienceEntity>()
|
||||||
);
|
);
|
||||||
|
|
||||||
return new PageUtils(page);
|
return new PageUtils(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffProjectExperienceDto> getProjectInfoByStaffId(Long staffId) {
|
||||||
|
return staffProjectExperienceDao.getProjectInfoByStaffId(staffId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.common.utils.Query;
|
import com.lz.common.utils.Query;
|
||||||
|
import com.lz.modules.app.Dto.StaffBaseInfoDto;
|
||||||
|
import com.lz.modules.app.Dto.StaffDto;
|
||||||
import com.lz.modules.app.dao.StaffDao;
|
import com.lz.modules.app.dao.StaffDao;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
import com.lz.modules.app.service.StaffService;
|
import com.lz.modules.app.service.StaffService;
|
||||||
@ -68,6 +70,36 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
|||||||
return staffDao.getStaffInfoByOpenId(openId);
|
return staffDao.getStaffInfoByOpenId(openId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StaffEntity getByName(String name) {
|
||||||
|
return staffDao.getByName(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffDto> getStaffInfos(int currentPage, int limit, String departmentId, String name, Integer intoStaffStatus) {
|
||||||
|
Integer staffStatus = 0;
|
||||||
|
if (intoStaffStatus == 1) {
|
||||||
|
staffStatus = intoStaffStatus;
|
||||||
|
}
|
||||||
|
List<StaffDto> staffInfos = staffDao.getStaffInfos(departmentId, name, staffStatus, limit, currentPage * limit);
|
||||||
|
|
||||||
|
return staffInfos;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getStaffInfoCount(String departmentId, String name, Integer intoStaffStatus) {
|
||||||
|
Integer staffStatus = 0;
|
||||||
|
if (intoStaffStatus == 1) {
|
||||||
|
staffStatus = intoStaffStatus;
|
||||||
|
}
|
||||||
|
return staffDao.getStaffInfoCount(departmentId, name, staffStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StaffBaseInfoDto getBaseInfo(Long staffId) {
|
||||||
|
return staffDao.getBaseInfo(staffId);
|
||||||
|
}
|
||||||
|
|
||||||
private StaffEntity convertStaffEntity(DepartmentStaffBo staffBo) {
|
private StaffEntity convertStaffEntity(DepartmentStaffBo staffBo) {
|
||||||
StaffEntity staffEntity = new StaffEntity();
|
StaffEntity staffEntity = new StaffEntity();
|
||||||
staffEntity.setName(staffBo.getName());//员工姓名
|
staffEntity.setName(staffBo.getName());//员工姓名
|
||||||
|
|||||||
@ -1,7 +1,12 @@
|
|||||||
package com.lz.modules.app.service.impl;
|
package com.lz.modules.app.service.impl;
|
||||||
|
|
||||||
|
import com.lz.modules.app.Dto.StaffWorkTransferDto;
|
||||||
|
import com.lz.modules.app.dao.StaffProjectExperienceDao;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@ -12,18 +17,27 @@ import com.lz.modules.app.dao.StaffWorkTransferRecordDao;
|
|||||||
import com.lz.modules.app.entity.StaffWorkTransferRecordEntity;
|
import com.lz.modules.app.entity.StaffWorkTransferRecordEntity;
|
||||||
import com.lz.modules.app.service.StaffWorkTransferRecordService;
|
import com.lz.modules.app.service.StaffWorkTransferRecordService;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
||||||
@Service("staffWorkTransferRecordService")
|
@Service("staffWorkTransferRecordService")
|
||||||
public class StaffWorkTransferRecordServiceImpl extends ServiceImpl<StaffWorkTransferRecordDao, StaffWorkTransferRecordEntity> implements StaffWorkTransferRecordService {
|
public class StaffWorkTransferRecordServiceImpl extends ServiceImpl<StaffWorkTransferRecordDao, StaffWorkTransferRecordEntity> implements StaffWorkTransferRecordService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
StaffWorkTransferRecordDao staffWorkTransferRecordDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageUtils queryPage(Map<String, Object> params) {
|
public PageUtils queryPage(Map<String, Object> params) {
|
||||||
IPage<StaffWorkTransferRecordEntity> page = this.page(
|
IPage<StaffWorkTransferRecordEntity> page = this.page(
|
||||||
new Query<StaffWorkTransferRecordEntity>().getPage(params),
|
new Query<StaffWorkTransferRecordEntity>().getPage(params),
|
||||||
new QueryWrapper<StaffWorkTransferRecordEntity>()
|
new QueryWrapper<StaffWorkTransferRecordEntity>()
|
||||||
);
|
);
|
||||||
|
|
||||||
return new PageUtils(page);
|
return new PageUtils(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StaffWorkTransferDto> getWorkInfoByStaffId(Long staffId) {
|
||||||
|
return staffWorkTransferRecordDao.getWorkInfoByStaffId(staffId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.lz.modules.app.utils;
|
||||||
|
|
||||||
|
import org.apache.shiro.util.CollectionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class BeanConversionUtils {
|
||||||
|
private static Logger logger = LoggerFactory.getLogger(BeanConversionUtils.class);
|
||||||
|
|
||||||
|
public static <T, F> List<F> listCopyToAnotherList(Class<F> target, List<T> soueceList) {
|
||||||
|
if (!CollectionUtils.isEmpty(soueceList)) {
|
||||||
|
List<F> targetList = new ArrayList<F>();
|
||||||
|
for (T t : soueceList) {
|
||||||
|
try {
|
||||||
|
F f = target.newInstance();
|
||||||
|
BeanUtils.copyProperties(t, f);
|
||||||
|
targetList.add(f);
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return targetList;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -56,19 +56,19 @@ public class OAuth2Filter extends AuthenticatingFilter {
|
|||||||
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
|
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
|
||||||
//获取请求token,如果token不存在,直接返回401
|
//获取请求token,如果token不存在,直接返回401
|
||||||
String token = getRequestToken((HttpServletRequest) request);
|
String token = getRequestToken((HttpServletRequest) request);
|
||||||
if(StringUtils.isBlank(token)){
|
// if(StringUtils.isBlank(token)){
|
||||||
HttpServletResponse httpResponse = (HttpServletResponse) response;
|
// HttpServletResponse httpResponse = (HttpServletResponse) response;
|
||||||
httpResponse.setHeader("Access-Control-Allow-Credentials", "true");
|
// httpResponse.setHeader("Access-Control-Allow-Credentials", "true");
|
||||||
httpResponse.setHeader("Access-Control-Allow-Origin", HttpContextUtils.getOrigin());
|
// httpResponse.setHeader("Access-Control-Allow-Origin", HttpContextUtils.getOrigin());
|
||||||
|
//
|
||||||
String json = new Gson().toJson(R.error(HttpStatus.SC_UNAUTHORIZED, "invalid token"));
|
// String json = new Gson().toJson(R.error(HttpStatus.SC_UNAUTHORIZED, "invalid token"));
|
||||||
|
//
|
||||||
httpResponse.getWriter().print(json);
|
// httpResponse.getWriter().print(json);
|
||||||
|
//
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
return true;
|
||||||
return executeLogin(request, response);
|
// return executeLogin(request, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<mapper namespace="com.lz.modules.app.dao.StaffDao">
|
<mapper namespace="com.lz.modules.app.dao.StaffDao">
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 -->
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
<resultMap type="com.lz.modules.app.entity.StaffEntity" id="staffMap">
|
<resultMap type="com.lz.modules.app.entity.StaffEntity" id="staffMap">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="isDelete" column="is_delete"/>
|
<result property="isDelete" column="is_delete"/>
|
||||||
@ -92,5 +92,43 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="getByName" resultType="com.lz.modules.app.entity.StaffEntity">
|
||||||
|
select * from lz_staff where is_delete=0 and name = #{name}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getStaffInfos" resultType="com.lz.modules.app.Dto.StaffDto">
|
||||||
|
select ls.id staffId,lso.employee_no staff_no,ls.name,lso.position,
|
||||||
|
case lso.staff_status when 0 then '在职' else '离职' end staffStatus,
|
||||||
|
if(ls.employee_id=ld.leader_employee_id,1,0) departmentLeader
|
||||||
|
from lz_staff ls,lz_staff_occupation lso,lz_departments_staff_relate dsr,lz_departments ld
|
||||||
|
where lso.staff_id=ls.id and ls.is_delete=0 and dsr.staff_id = ls.id and ld.department_id=dsr.department_id
|
||||||
|
and lso.staff_status=#{staffStatus}
|
||||||
|
<if test="departmentId != null and departmentId != ''">
|
||||||
|
and dsr.department_id=#{departmentId}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and dsr.name=#{name}
|
||||||
|
</if>
|
||||||
|
limit #{startIndex}, #{pageLimit}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getStaffInfoCount" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from lz_staff ls,lz_staff_occupation lso,lz_departments_staff_relate dsr,lz_departments ld
|
||||||
|
where lso.staff_id=ls.id and ls.is_delete=0 and dsr.staff_id = ls.id and ld.department_id=dsr.department_id
|
||||||
|
and lso.staff_status=#{staffStatus}
|
||||||
|
<if test="departmentId != null and departmentId != ''">
|
||||||
|
and dsr.department_id=#{departmentId}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and dsr.name=#{name}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getBaseInfo" resultType="com.lz.modules.app.Dto.StaffBaseInfoDto">
|
||||||
|
select name staffName,gender,birthday,marital_status,national,political_landscape,mobile,current_address from lz_staff where id=#{staffId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -16,5 +16,9 @@
|
|||||||
<result property="graduationTime" column="graduation_time"/>
|
<result property="graduationTime" column="graduation_time"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getInfoByStaffId" resultType="com.lz.modules.app.Dto.StaffEducationInfoDto">
|
||||||
|
select education,graduated_school,specialty,graduation_time from lz_staff_education where staff_id=#{staffId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<mapper namespace="com.lz.modules.app.dao.StaffOccupationDao">
|
<mapper namespace="com.lz.modules.app.dao.StaffOccupationDao">
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 -->
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
<resultMap type="com.lz.modules.app.entity.StaffOccupationEntity" id="staffOccupationMap">
|
<resultMap type="com.lz.modules.app.entity.StaffOccupationEntity" id="staffOccupationMap">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="isDelete" column="is_delete"/>
|
<result property="isDelete" column="is_delete"/>
|
||||||
@ -31,6 +31,10 @@
|
|||||||
<select id="getStaffOccupationByStaffId" resultType="com.lz.modules.app.entity.StaffOccupationEntity">
|
<select id="getStaffOccupationByStaffId" resultType="com.lz.modules.app.entity.StaffOccupationEntity">
|
||||||
select * from lz_staff_occupation where is_delete=0 and staff_id = #{staffId}
|
select * from lz_staff_occupation where is_delete=0 and staff_id = #{staffId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getOccupationByStaffId" resultType="com.lz.modules.app.Dto.StaffOccupationInfoDto">
|
||||||
|
select employee_no staff_no,position,entry_time,staff_status,resignation_time,resignation_reasons,signing_company,job_begin_time,work_experience,resume_url
|
||||||
|
from lz_staff_occupation where staff_id=#{staffId}
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateStatusByStaffId">
|
<update id="updateStatusByStaffId">
|
||||||
update lz_staff_occupation set status=#{status} where is_delete=0 and staff_id = #{staffId}
|
update lz_staff_occupation set status=#{status} where is_delete=0 and staff_id = #{staffId}
|
||||||
|
|||||||
@ -16,5 +16,9 @@
|
|||||||
<result property="projectContent" column="project_content"/>
|
<result property="projectContent" column="project_content"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getProjectInfoByStaffId" resultType="com.lz.modules.app.Dto.StaffProjectExperienceDto">
|
||||||
|
SELECT project_name,project_begin_time,project_end_time,project_content from lz_staff_project_experience where staff_id=#{staffId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -14,6 +14,9 @@
|
|||||||
<result property="transferRecord" column="transfer_record"/>
|
<result property="transferRecord" column="transfer_record"/>
|
||||||
<result property="transferType" column="transfer_type"/>
|
<result property="transferType" column="transfer_type"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<select id="getWorkInfoByStaffId" resultType="com.lz.modules.app.Dto.StaffWorkTransferDto">
|
||||||
|
select transfer_time,transfer_record,transfer_type from lz_staff_work_transfer_record where staff_id=#{staffId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
swagger: '2.0'
|
swagger: '2.0'
|
||||||
info:
|
info:
|
||||||
description: lz_management是一个轻量级的Java快速开发平台,能快速开发项目并交付【接私活利器】
|
description: 霖梓控股用于对员工进行数字化管理的平台
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: 人人快速开发平台
|
title: 企业员工数字化管理平台
|
||||||
|
|
||||||
basePath: /lz_management
|
basePath: /lz_management
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,18 @@
|
|||||||
package com.lz;
|
package com.lz;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.lz.common.utils.DateUtils;
|
import com.lz.common.utils.DateUtils;
|
||||||
|
import com.lz.common.utils.StringUtil;
|
||||||
import com.lz.modules.app.entity.*;
|
import com.lz.modules.app.entity.*;
|
||||||
import com.lz.modules.app.enums.ExcelStaffHeardEnum;
|
import com.lz.modules.app.enums.ExcelStaffHeardEnum;
|
||||||
|
import com.lz.modules.app.enums.GenderEnum;
|
||||||
|
import com.lz.modules.app.enums.MaritalStatusEnum;
|
||||||
|
import com.lz.modules.app.service.*;
|
||||||
import com.lz.modules.job.business.FeishuBusiness;
|
import com.lz.modules.job.business.FeishuBusiness;
|
||||||
|
import com.lz.modules.sys.entity.SysCaptchaEntity;
|
||||||
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@ -14,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
@ -30,7 +38,7 @@ public class FumeiaiTest {
|
|||||||
@Test
|
@Test
|
||||||
public void contextLoads() throws IOException, InvalidFormatException {
|
public void contextLoads() throws IOException, InvalidFormatException {
|
||||||
|
|
||||||
// feishuBusiness.getFeishuDepartmentsIntoData();
|
feishuBusiness.getFeishuDepartmentsIntoData();
|
||||||
|
|
||||||
File xlsFile = new File("/Users/fumeiai/tmp/员工档案字段表-0427.xlsx");
|
File xlsFile = new File("/Users/fumeiai/tmp/员工档案字段表-0427.xlsx");
|
||||||
// 获得工作簿
|
// 获得工作簿
|
||||||
@ -64,14 +72,21 @@ public class FumeiaiTest {
|
|||||||
if (row == 0) {
|
if (row == 0) {
|
||||||
headList.add(cellValue);
|
headList.add(cellValue);
|
||||||
} else {
|
} else {
|
||||||
|
if (StringUtil.equals(GenderEnum.female.getName(), cellValue) || StringUtil.equals(GenderEnum.male.getName(), cellValue)) {
|
||||||
|
cellValue = GenderEnum.findCodeByName(cellValue).toString();
|
||||||
|
} else if (StringUtil.equals(MaritalStatusEnum.unmarried.getName(), cellValue) || StringUtil.equals(MaritalStatusEnum.married.getName(), cellValue)) {
|
||||||
|
cellValue = MaritalStatusEnum.findCodeByName(cellValue).toString();
|
||||||
|
}
|
||||||
dataMap.put(ExcelStaffHeardEnum.findFieldByName(headList.get(col)), cellValue);
|
dataMap.put(ExcelStaffHeardEnum.findFieldByName(headList.get(col)), cellValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dataMap.size() > 0) {
|
if (dataMap.size() > 0) {
|
||||||
|
if (i == 1) {
|
||||||
|
dataMap.put("staffStatus", "1");
|
||||||
|
}
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 0:
|
case 0:
|
||||||
sheet12List.add(dataMap);
|
|
||||||
break;
|
|
||||||
case 1:
|
case 1:
|
||||||
sheet12List.add(dataMap);
|
sheet12List.add(dataMap);
|
||||||
break;
|
break;
|
||||||
@ -90,6 +105,17 @@ public class FumeiaiTest {
|
|||||||
enterDatabase(sheet12List, sheet3List, sheet4List);
|
enterDatabase(sheet12List, sheet3List, sheet4List);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
StaffService staffService;
|
||||||
|
@Resource
|
||||||
|
StaffOccupationService staffOccupationService;
|
||||||
|
@Resource
|
||||||
|
StaffEducationService staffEducationService;
|
||||||
|
@Resource
|
||||||
|
StaffProjectExperienceService staffProjectExperienceService;
|
||||||
|
@Resource
|
||||||
|
StaffWorkTransferRecordService staffWorkTransferRecordService;
|
||||||
|
|
||||||
public void enterDatabase(List<Map<String, String>> sheet12List, List<Map<String, String>> sheet3List, List<Map<String, String>> sheet4List) {
|
public void enterDatabase(List<Map<String, String>> sheet12List, List<Map<String, String>> sheet3List, List<Map<String, String>> sheet4List) {
|
||||||
List<StaffEntity> staffs = Lists.newArrayList();
|
List<StaffEntity> staffs = Lists.newArrayList();
|
||||||
List<StaffOccupationEntity> staffOccupations = Lists.newArrayList();
|
List<StaffOccupationEntity> staffOccupations = Lists.newArrayList();
|
||||||
@ -98,30 +124,94 @@ public class FumeiaiTest {
|
|||||||
List<StaffWorkTransferRecordEntity> staffWorkTransferRecords = Lists.newArrayList();
|
List<StaffWorkTransferRecordEntity> staffWorkTransferRecords = Lists.newArrayList();
|
||||||
|
|
||||||
for (Map<String, String> map : sheet12List) {
|
for (Map<String, String> map : sheet12List) {
|
||||||
staffs.add(JSON.parseObject(JSON.toJSONString(map), StaffEntity.class));
|
StaffEntity staffEntity = JSON.parseObject(JSON.toJSONString(map), StaffEntity.class);
|
||||||
staffOccupations.add(JSON.parseObject(JSON.toJSONString(map), StaffOccupationEntity.class));
|
StaffOccupationEntity occupationEntity = JSON.parseObject(JSON.toJSONString(map), StaffOccupationEntity.class);
|
||||||
staffEducations.add(JSON.parseObject(JSON.toJSONString(map), StaffEducationEntity.class));
|
StaffEducationEntity educationEntity = JSON.parseObject(JSON.toJSONString(map), StaffEducationEntity.class);
|
||||||
|
// staffs.add(JSON.parseObject(JSON.toJSONString(map), StaffEntity.class));
|
||||||
|
// staffOccupations.add(JSON.parseObject(JSON.toJSONString(map), StaffOccupationEntity.class));
|
||||||
|
// staffEducations.add(JSON.parseObject(JSON.toJSONString(map), StaffEducationEntity.class));
|
||||||
// for (Map.Entry<String, String> element : map.entrySet()) {
|
// for (Map.Entry<String, String> element : map.entrySet()) {
|
||||||
// System.out.print(element.getKey() + "=" + element.getValue() + " ");
|
// System.out.print(element.getKey() + "=" + element.getValue() + " ");
|
||||||
// }
|
// }
|
||||||
System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffEntity.class).toString());
|
StaffEntity Staff = staffService.getByName(staffEntity.getName());
|
||||||
System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffOccupationEntity.class).toString());
|
if (Staff == null) {
|
||||||
System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffEducationEntity.class).toString());
|
staffService.save(staffEntity);
|
||||||
|
} else {
|
||||||
|
staffEntity.setId(Staff.getId());
|
||||||
|
staffService.updateById(staffEntity);
|
||||||
|
}
|
||||||
|
StaffOccupationEntity occupation = staffOccupationService.getOne(new QueryWrapper<StaffOccupationEntity>().eq("staff_id", staffEntity.getId()));
|
||||||
|
if (occupation == null) {
|
||||||
|
occupationEntity.setStaffId(staffEntity.getId());
|
||||||
|
staffOccupationService.save(occupationEntity);
|
||||||
|
} else {
|
||||||
|
occupationEntity.setId(occupation.getId());
|
||||||
|
staffOccupationService.updateById(occupationEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
StaffEducationEntity education = staffEducationService.getOne(new QueryWrapper<StaffEducationEntity>().eq("staff_id", staffEntity.getId()));
|
||||||
|
if (education == null) {
|
||||||
|
educationEntity.setStaffId(staffEntity.getId());
|
||||||
|
staffEducationService.save(educationEntity);
|
||||||
|
} else {
|
||||||
|
educationEntity.setId(education.getId());
|
||||||
|
staffEducationService.updateById(educationEntity);
|
||||||
|
}
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffEntity.class).toString());
|
||||||
|
// System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffOccupationEntity.class).toString());
|
||||||
|
// System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffEducationEntity.class).toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
for (Map<String, String> map : sheet3List) {
|
for (Map<String, String> map : sheet3List) {
|
||||||
staffProjectExperiences.add(JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class));
|
StaffProjectExperienceEntity staffProjectExperienceEntity = JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class);
|
||||||
|
StaffEntity Staff = staffService.getByName(map.get("name"));
|
||||||
|
if (Staff == null) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
staffProjectExperienceService.update(new UpdateWrapper<StaffProjectExperienceEntity>().set("is_delete", 1).eq("staff_id", Staff.getId()));
|
||||||
|
StaffProjectExperienceEntity projectExperienceEntity = staffProjectExperienceService.getOne(new QueryWrapper<StaffProjectExperienceEntity>().eq("staff_id", Staff.getId()).eq("project_name", staffProjectExperienceEntity.getProjectName()));
|
||||||
|
if (projectExperienceEntity == null) {
|
||||||
|
staffProjectExperienceEntity.setStaffId(Staff.getId());
|
||||||
|
staffProjectExperienceService.save(staffProjectExperienceEntity);
|
||||||
|
} else {
|
||||||
|
staffProjectExperienceEntity.setId(projectExperienceEntity.getId());
|
||||||
|
staffProjectExperienceEntity.setIsDelete(0);
|
||||||
|
staffProjectExperienceService.updateById(staffProjectExperienceEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// staffProjectExperiences.add(JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class));
|
||||||
// for (Map.Entry<String, String> element : map.entrySet()) {
|
// for (Map.Entry<String, String> element : map.entrySet()) {
|
||||||
// System.out.print(element.getKey() + "=" + element.getValue() + " ");
|
// System.out.print(element.getKey() + "=" + element.getValue() + " ");
|
||||||
// }
|
// }
|
||||||
System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class).toString());
|
// System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffProjectExperienceEntity.class).toString());
|
||||||
}
|
}
|
||||||
for (Map<String, String> map : sheet4List) {
|
for (Map<String, String> map : sheet4List) {
|
||||||
staffWorkTransferRecords.add(JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class));
|
StaffWorkTransferRecordEntity staffWorkTransferRecordEntity = JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class);
|
||||||
|
StaffEntity Staff = staffService.getByName(map.get("name"));
|
||||||
|
if (Staff == null) {
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
staffWorkTransferRecordService.update(new UpdateWrapper<StaffWorkTransferRecordEntity>().set("is_delete", 1).eq("staff_id", Staff.getId()));
|
||||||
|
StaffWorkTransferRecordEntity workTransferRecordEntity = staffWorkTransferRecordService.getOne(new QueryWrapper<StaffWorkTransferRecordEntity>().eq("staff_id", Staff.getId()).eq("transfer_time", staffWorkTransferRecordEntity.getTransferTime()));
|
||||||
|
if (workTransferRecordEntity == null) {
|
||||||
|
staffWorkTransferRecordEntity.setStaffId(Staff.getId());
|
||||||
|
staffWorkTransferRecordService.save(staffWorkTransferRecordEntity);
|
||||||
|
} else {
|
||||||
|
staffWorkTransferRecordEntity.setId(workTransferRecordEntity.getId());
|
||||||
|
staffWorkTransferRecordEntity.setIsDelete(0);
|
||||||
|
staffWorkTransferRecordService.updateById(staffWorkTransferRecordEntity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// staffWorkTransferRecords.add(JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class));
|
||||||
// for (Map.Entry<String, String> element : map.entrySet()) {
|
// for (Map.Entry<String, String> element : map.entrySet()) {
|
||||||
// System.out.print(element.getKey() + "=" + element.getValue() + " ");
|
// System.out.print(element.getKey() + "=" + element.getValue() + " ");
|
||||||
// }
|
// }
|
||||||
System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class).toString());
|
// System.out.println(JSON.parseObject(JSON.toJSONString(map), StaffWorkTransferRecordEntity.class).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
target/classes/com/lz/modules/app/Dto/DepartmentsDto.class
Normal file
BIN
target/classes/com/lz/modules/app/Dto/DepartmentsDto.class
Normal file
Binary file not shown.
BIN
target/classes/com/lz/modules/app/Dto/StaffBaseInfoDto.class
Normal file
BIN
target/classes/com/lz/modules/app/Dto/StaffBaseInfoDto.class
Normal file
Binary file not shown.
BIN
target/classes/com/lz/modules/app/Dto/StaffDto.class
Normal file
BIN
target/classes/com/lz/modules/app/Dto/StaffDto.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
target/classes/com/lz/modules/app/Dto/StaffWorkTransferDto.class
Normal file
BIN
target/classes/com/lz/modules/app/Dto/StaffWorkTransferDto.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
target/classes/com/lz/modules/app/enums/GenderEnum.class
Normal file
BIN
target/classes/com/lz/modules/app/enums/GenderEnum.class
Normal file
Binary file not shown.
BIN
target/classes/com/lz/modules/app/enums/MaritalStatusEnum.class
Normal file
BIN
target/classes/com/lz/modules/app/enums/MaritalStatusEnum.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<mapper namespace="com.lz.modules.app.dao.StaffDao">
|
<mapper namespace="com.lz.modules.app.dao.StaffDao">
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 -->
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
<resultMap type="com.lz.modules.app.entity.StaffEntity" id="staffMap">
|
<resultMap type="com.lz.modules.app.entity.StaffEntity" id="staffMap">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="isDelete" column="is_delete"/>
|
<result property="isDelete" column="is_delete"/>
|
||||||
@ -92,5 +92,43 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
<select id="getByName" resultType="com.lz.modules.app.entity.StaffEntity">
|
||||||
|
select * from lz_staff where is_delete=0 and name = #{name}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getStaffInfos" resultType="com.lz.modules.app.Dto.StaffDto">
|
||||||
|
select ls.id staffId,lso.employee_no staff_no,ls.name,lso.position,
|
||||||
|
case lso.staff_status when 0 then '在职' else '离职' end staffStatus,
|
||||||
|
if(ls.employee_id=ld.leader_employee_id,1,0) departmentLeader
|
||||||
|
from lz_staff ls,lz_staff_occupation lso,lz_departments_staff_relate dsr,lz_departments ld
|
||||||
|
where lso.staff_id=ls.id and ls.is_delete=0 and dsr.staff_id = ls.id and ld.department_id=dsr.department_id
|
||||||
|
and lso.staff_status=#{staffStatus}
|
||||||
|
<if test="departmentId != null and departmentId != ''">
|
||||||
|
and dsr.department_id=#{departmentId}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and dsr.name=#{name}
|
||||||
|
</if>
|
||||||
|
limit #{startIndex}, #{pageLimit}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getStaffInfoCount" resultType="java.lang.Integer">
|
||||||
|
select count(1)
|
||||||
|
from lz_staff ls,lz_staff_occupation lso,lz_departments_staff_relate dsr,lz_departments ld
|
||||||
|
where lso.staff_id=ls.id and ls.is_delete=0 and dsr.staff_id = ls.id and ld.department_id=dsr.department_id
|
||||||
|
and lso.staff_status=#{staffStatus}
|
||||||
|
<if test="departmentId != null and departmentId != ''">
|
||||||
|
and dsr.department_id=#{departmentId}
|
||||||
|
</if>
|
||||||
|
<if test="name != null and name != ''">
|
||||||
|
and dsr.name=#{name}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getBaseInfo" resultType="com.lz.modules.app.Dto.StaffBaseInfoDto">
|
||||||
|
select name staffName,gender,birthday,marital_status,national,political_landscape,mobile,current_address from lz_staff where id=#{staffId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -16,5 +16,9 @@
|
|||||||
<result property="graduationTime" column="graduation_time"/>
|
<result property="graduationTime" column="graduation_time"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getInfoByStaffId" resultType="com.lz.modules.app.Dto.StaffEducationInfoDto">
|
||||||
|
select education,graduated_school,specialty,graduation_time from lz_staff_education where staff_id=#{staffId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<mapper namespace="com.lz.modules.app.dao.StaffOccupationDao">
|
<mapper namespace="com.lz.modules.app.dao.StaffOccupationDao">
|
||||||
|
|
||||||
<!-- 可根据自己的需求,是否要使用 -->
|
<!-- 可根据自己的需求,是否要使用 -->
|
||||||
<resultMap type="com.lz.modules.app.entity.StaffOccupationEntity" id="staffOccupationMap">
|
<resultMap type="com.lz.modules.app.entity.StaffOccupationEntity" id="staffOccupationMap">
|
||||||
<result property="id" column="id"/>
|
<result property="id" column="id"/>
|
||||||
<result property="isDelete" column="is_delete"/>
|
<result property="isDelete" column="is_delete"/>
|
||||||
@ -31,6 +31,10 @@
|
|||||||
<select id="getStaffOccupationByStaffId" resultType="com.lz.modules.app.entity.StaffOccupationEntity">
|
<select id="getStaffOccupationByStaffId" resultType="com.lz.modules.app.entity.StaffOccupationEntity">
|
||||||
select * from lz_staff_occupation where is_delete=0 and staff_id = #{staffId}
|
select * from lz_staff_occupation where is_delete=0 and staff_id = #{staffId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getOccupationByStaffId" resultType="com.lz.modules.app.Dto.StaffOccupationInfoDto">
|
||||||
|
select employee_no staff_no,position,entry_time,staff_status,resignation_time,resignation_reasons,signing_company,job_begin_time,work_experience,resume_url
|
||||||
|
from lz_staff_occupation where staff_id=#{staffId}
|
||||||
|
</select>
|
||||||
|
|
||||||
<update id="updateStatusByStaffId">
|
<update id="updateStatusByStaffId">
|
||||||
update lz_staff_occupation set status=#{status} where is_delete=0 and staff_id = #{staffId}
|
update lz_staff_occupation set status=#{status} where is_delete=0 and staff_id = #{staffId}
|
||||||
|
|||||||
@ -16,5 +16,9 @@
|
|||||||
<result property="projectContent" column="project_content"/>
|
<result property="projectContent" column="project_content"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="getProjectInfoByStaffId" resultType="com.lz.modules.app.Dto.StaffProjectExperienceDto">
|
||||||
|
SELECT project_name,project_begin_time,project_end_time,project_content from lz_staff_project_experience where staff_id=#{staffId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -14,6 +14,9 @@
|
|||||||
<result property="transferRecord" column="transfer_record"/>
|
<result property="transferRecord" column="transfer_record"/>
|
||||||
<result property="transferType" column="transfer_type"/>
|
<result property="transferType" column="transfer_type"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<select id="getWorkInfoByStaffId" resultType="com.lz.modules.app.Dto.StaffWorkTransferDto">
|
||||||
|
select transfer_time,transfer_record,transfer_type from lz_staff_work_transfer_record where staff_id=#{staffId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
swagger: '2.0'
|
swagger: '2.0'
|
||||||
info:
|
info:
|
||||||
description: lz_management是一个轻量级的Java快速开发平台,能快速开发项目并交付【接私活利器】
|
description: 霖梓控股用于对员工进行数字化管理的平台
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: 人人快速开发平台
|
title: 企业员工数字化管理平台
|
||||||
|
|
||||||
basePath: /lz_management
|
basePath: /lz_management
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user