Commit 731aff24 authored by hongguangwu's avatar hongguangwu

MVP1.6.6-预入职相关_导出优化

parent e605149b
......@@ -235,6 +235,7 @@ public class TEmployeeProject extends BaseEntity {
* 入职日期
*/
@Schema(description ="入职日期")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private LocalDate enjoinDate;
/**
......
......@@ -1051,6 +1051,15 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
empIdCard = emp.getEmpIdcard();
project = tEmployeeProjectService.getById(tPreEmployeeProject.getOldId());
if (project != null) {
if (Common.isEmpty(tPreEmployeeProject.getWorkingHours())) {
tPreEmployeeProject.setWorkingHours("");
}
if (Common.isEmpty(tPreEmployeeProject.getPost())) {
tPreEmployeeProject.setPost("");
}
if (Common.isEmpty(tPreEmployeeProject.getTryPeriod())) {
tPreEmployeeProject.setTryPeriod("");
}
BeanUtil.copyProperties(tPreEmployeeInfo, project, ID);
if (CommonConstants.ONE_INT == project.getProjectStatus()) {
project.setCreateTime(LocalDateTime.now());
......@@ -1360,6 +1369,15 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
project = new TEmployeeProject();
}
String[] ignoreProperties = new String[]{"id","status"};
if (Common.isEmpty(tPreEmployeeProject.getWorkingHours())) {
tPreEmployeeProject.setWorkingHours("");
}
if (Common.isEmpty(tPreEmployeeProject.getPost())) {
tPreEmployeeProject.setPost("");
}
if (Common.isEmpty(tPreEmployeeProject.getTryPeriod())) {
tPreEmployeeProject.setTryPeriod("");
}
BeanUtil.copyProperties(tPreEmployeeProject, project, ignoreProperties);
if (Common.isEmpty(project.getStatus())) {
project.setStatus(CommonConstants.ZERO_INT);
......
......@@ -357,11 +357,41 @@
left join sys_area tf on tf.id=e.FILE_TOWN
left join view_sys_dict_item workingHours on workingHours.value=eci.WORKING_HOURS and workingHours.type='working_hours'
left join t_emp_contact_info ec on e.id=ec.EMP_ID
left join t_emp_education ee on e.id=ee.EMP_ID and ee.DELETE_FLAG = '0'
left join (
select
SUBSTRING_INDEX(GROUP_CONCAT(ee.EMP_ID ORDER BY ee.create_time desc),',',1) EMP_ID
,SUBSTRING_INDEX(GROUP_CONCAT(ee.SCHOOL ORDER BY ee.create_time desc),',',1) SCHOOL
,SUBSTRING_INDEX(GROUP_CONCAT(ee.MAJOR ORDER BY ee.create_time desc),',',1) MAJOR
,SUBSTRING_INDEX(GROUP_CONCAT(ee.EDUCATION_NAME ORDER BY ee.create_time desc),',',1) EDUCATION_NAME
,SUBSTRING_INDEX(GROUP_CONCAT(ee.ENTRY_DATE ORDER BY ee.create_time desc),',',1) ENTRY_DATE
,SUBSTRING_INDEX(GROUP_CONCAT(ee.GRADUTION_DATE ORDER BY ee.create_time desc),',',1) GRADUTION_DATE
from t_emp_education ee where ee.DELETE_FLAG = '0'
GROUP BY ee.EMP_ID
) ee on e.id=ee.EMP_ID
left join view_sys_dict_item education on education.value=ee.EDUCATION_NAME and education.type='education'
left join t_emp_disability_info ed on e.id=ed.EMP_ID and ed.DELETE_FLAG = '0'
left join (
select
SUBSTRING_INDEX(GROUP_CONCAT(ee.EMP_ID ORDER BY ee.create_time desc),',',1) EMP_ID
,SUBSTRING_INDEX(GROUP_CONCAT(ee.INJURY_IDENTIFICATION ORDER BY ee.create_time desc),',',1) INJURY_IDENTIFICATION
,SUBSTRING_INDEX(GROUP_CONCAT(ee.OCCUPATIONAL_DISEASE_FLAG ORDER BY ee.create_time desc),',',1) OCCUPATIONAL_DISEASE_FLAG
,SUBSTRING_INDEX(GROUP_CONCAT(ee.OCCUPATIONAL_DISEASE ORDER BY ee.create_time desc),',',1) OCCUPATIONAL_DISEASE
,SUBSTRING_INDEX(GROUP_CONCAT(ee.INFECTIOUS_DISEASE_FLAG ORDER BY ee.create_time desc),',',1) INFECTIOUS_DISEASE_FLAG
,SUBSTRING_INDEX(GROUP_CONCAT(ee.INFECTIOUS_NAME ORDER BY ee.create_time desc),',',1) INFECTIOUS_NAME
,SUBSTRING_INDEX(GROUP_CONCAT(ee.DISABILITY_FLAG ORDER BY ee.create_time desc),',',1) DISABILITY_FLAG
,SUBSTRING_INDEX(GROUP_CONCAT(ee.DISABILITY_NAME ORDER BY ee.create_time desc),',',1) DISABILITY_NAME
,SUBSTRING_INDEX(GROUP_CONCAT(ee.DISABILITY_LEVEL ORDER BY ee.create_time desc),',',1) DISABILITY_LEVEL
,SUBSTRING_INDEX(GROUP_CONCAT(ee.OTHER_FLAG ORDER BY ee.create_time desc),',',1) OTHER_FLAG
from t_emp_disability_info ee where ee.DELETE_FLAG = '0'
GROUP BY ee.EMP_ID
) ed on e.id=ed.EMP_ID
left join view_sys_dict_item disability_grade on disability_grade.value=ed.DISABILITY_LEVEL and disability_grade.type='disability_grade'
left join t_emp_bad_record eb on e.id=eb.EMP_ID
left join (
select
SUBSTRING_INDEX(GROUP_CONCAT(ee.EMP_ID ORDER BY ee.create_time desc),',',1) EMP_ID
,SUBSTRING_INDEX(GROUP_CONCAT(ee.REMARK ORDER BY ee.create_time desc),',',1) REMARK
from t_emp_bad_record ee
GROUP BY ee.EMP_ID
) eb on e.id=eb.EMP_ID
left join (
select
SUBSTRING_INDEX(GROUP_CONCAT(ee.EMP_ID ORDER BY ee.create_time desc),',',1) EMP_ID
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment