增加离职人员与组织架构的管理关系数据
This commit is contained in:
parent
6b93cb7d29
commit
fb16ae9c96
34
.idea/workspace.xml
generated
34
.idea/workspace.xml
generated
@ -3,8 +3,8 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e4baaf01-a2c2-445d-98a1-9f4c50c148cf" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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$/target/classes/mapper/generator/StaffDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/mapper/generator/StaffDao.xml" 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$/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" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
@ -44,6 +44,7 @@
|
||||
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="extract.method.default.visibility" value="private" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="settings.editor.selected.configurable" value="MavenSettings" />
|
||||
</component>
|
||||
@ -156,7 +157,7 @@
|
||||
<workItem from="1588161274115" duration="1691000" />
|
||||
<workItem from="1588163384182" duration="74761000" />
|
||||
<workItem from="1588936950753" duration="95758000" />
|
||||
<workItem from="1590038091791" duration="23054000" />
|
||||
<workItem from="1590038091791" duration="27886000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
@ -251,9 +252,34 @@
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java</url>
|
||||
<line>93</line>
|
||||
<line>97</line>
|
||||
<option name="timeStamp" value="90" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
|
||||
<line>225</line>
|
||||
<option name="timeStamp" value="91" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/src/main/java/com/lz/common/utils/ExcelUtil.java</url>
|
||||
<line>1057</line>
|
||||
<option name="timeStamp" value="92" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
|
||||
<line>229</line>
|
||||
<option name="timeStamp" value="93" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/controller/StaffController.java</url>
|
||||
<line>231</line>
|
||||
<option name="timeStamp" value="94" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" type="java-line">
|
||||
<url>file://$PROJECT_DIR$/src/main/java/com/lz/modules/app/service/impl/StaffServiceImpl.java</url>
|
||||
<line>180</line>
|
||||
<option name="timeStamp" value="95" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
</component>
|
||||
|
||||
@ -41,6 +41,10 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
||||
StaffProjectExperienceService staffProjectExperienceService;
|
||||
@Resource
|
||||
StaffWorkTransferRecordService staffWorkTransferRecordService;
|
||||
@Resource
|
||||
DepartmentsService departmentsService;
|
||||
@Resource
|
||||
DepartmentsStaffRelateService departmentsStaffRelateService;
|
||||
|
||||
@Override
|
||||
public PageUtils queryPage(Map<String, Object> params) {
|
||||
@ -184,6 +188,11 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
||||
staffEntity.setId(Staff.getId());
|
||||
this.updateById(staffEntity);
|
||||
}
|
||||
|
||||
createDepartmentInfo(staffEntity, map.get("primarySector"));
|
||||
createDepartmentInfo(staffEntity, map.get("secondarySector"));
|
||||
createDepartmentInfo(staffEntity, map.get("tertiarySector"));
|
||||
|
||||
StaffOccupationEntity occupation = staffOccupationService.getOne(new QueryWrapper<StaffOccupationEntity>().eq("staff_id", staffEntity.getId()));
|
||||
if (occupation == null) {
|
||||
occupationEntity.setStaffId(staffEntity.getId());
|
||||
@ -240,6 +249,19 @@ public class StaffServiceImpl extends ServiceImpl<StaffDao, StaffEntity> impleme
|
||||
}
|
||||
}
|
||||
|
||||
private void createDepartmentInfo(StaffEntity staffEntity, String departmentName) {
|
||||
DepartmentsEntity departmentsEntity = departmentsService.getOne(new QueryWrapper<DepartmentsEntity>().eq("department_name", departmentName));
|
||||
if (departmentsEntity != null) {
|
||||
DepartmentsStaffRelateEntity departmentsStaffRelateEntity = departmentsStaffRelateService.getOne(new QueryWrapper<DepartmentsStaffRelateEntity>().eq("department_id", departmentsEntity.getDepartmentId()).eq("staff_id", staffEntity.getId()));
|
||||
if (departmentsStaffRelateEntity == null) {
|
||||
departmentsStaffRelateEntity = new DepartmentsStaffRelateEntity();
|
||||
departmentsStaffRelateEntity.setStaffId(staffEntity.getId());
|
||||
departmentsStaffRelateEntity.setDepartmentId(departmentsEntity.getDepartmentId());
|
||||
departmentsStaffRelateService.save(departmentsStaffRelateEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private StaffEntity convertStaffEntity(DepartmentStaffBo staffBo) {
|
||||
StaffEntity staffEntity = new StaffEntity();
|
||||
staffEntity.setName(staffBo.getName());//员工姓名
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user