Commit 528b4990 authored by hongguangwu's avatar hongguangwu

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

parent c5cb4eed
...@@ -786,7 +786,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -786,7 +786,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
private R<String> saveBase(PreEmpMainDetailVo vo, String status) { private R<String> saveBase(PreEmpMainDetailVo vo, String status) {
YifuUser user = getNewYifuUser(); YifuUser user = getNewYifuUser();
TPreEmpMain main = vo.getMain(); TPreEmpMain main = vo.getMain();
if (main != null && Common.isNotNull(main.getEmpIdcard())) { String idCard = main.getEmpIdcard();
if (main != null && Common.isNotNull(idCard)) {
TPreEmployeeProject tPreEmployeeProject = vo.getTpreEmployeeProject(); TPreEmployeeProject tPreEmployeeProject = vo.getTpreEmployeeProject();
if (tPreEmployeeProject != null && Common.isNotNull(tPreEmployeeProject.getOldId())) { if (tPreEmployeeProject != null && Common.isNotNull(tPreEmployeeProject.getOldId())) {
// 预入职-人员档案表 // 预入职-人员档案表
...@@ -861,6 +862,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -861,6 +862,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (tPreEmpFamily != null) { if (tPreEmpFamily != null) {
tPreEmpFamilyService.deleteFamilyByMainId(mainId); tPreEmpFamilyService.deleteFamilyByMainId(mainId);
for (TPreEmpFamily info : tPreEmpFamily) { for (TPreEmpFamily info : tPreEmpFamily) {
info.setEmpIdcard(idCard);
info.setPreMainId(mainId); info.setPreMainId(mainId);
info.setCreateBy(user.getId()); info.setCreateBy(user.getId());
info.setCreateName(user.getNickname()); info.setCreateName(user.getNickname());
...@@ -911,6 +913,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -911,6 +913,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 先删除后增加 // 先删除后增加
tPreEmpProfessionalService.deleteProfessionalByMainId(mainId); tPreEmpProfessionalService.deleteProfessionalByMainId(mainId);
for (TPreEmpProfessionalQualification info : tPreEmpProfessionalQualification) { for (TPreEmpProfessionalQualification info : tPreEmpProfessionalQualification) {
info.setEmpIdcard(idCard);
info.setPreMainId(mainId); info.setPreMainId(mainId);
info.setCreateBy(user.getId()); info.setCreateBy(user.getId());
info.setCreateName(user.getNickname()); info.setCreateName(user.getNickname());
...@@ -939,6 +942,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -939,6 +942,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 先删除后增加 // 先删除后增加
tPreEmpWorkRecordingService.deleteByMainId(mainId); tPreEmpWorkRecordingService.deleteByMainId(mainId);
for (TPreEmpWorkRecording info : tPreEmpWorkRecording) { for (TPreEmpWorkRecording info : tPreEmpWorkRecording) {
info.setEmpIdcard(idCard);
info.setPreMainId(mainId); info.setPreMainId(mainId);
info.setCreateBy(user.getId()); info.setCreateBy(user.getId());
info.setCreateName(user.getNickname()); info.setCreateName(user.getNickname());
......
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
left join t_pre_emp_work_recording ew on a.id=ew.PRE_MAIN_ID left join t_pre_emp_work_recording ew on a.id=ew.PRE_MAIN_ID
<where> <where>
a.STATUS != '5' and ew.id is not null and EXISTS ( a.STATUS != '5' and ew.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_work_recording a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ew.emp_id select 1 from (select a.EMP_IDCARD from t_pre_emp_work_recording a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ew.EMP_IDCARD
) )
<include refid="tPreEmpMain_where"/> <include refid="tPreEmpMain_where"/>
</where> </where>
...@@ -403,7 +403,7 @@ ...@@ -403,7 +403,7 @@
left join t_pre_emp_work_recording ew on a.id=ew.PRE_MAIN_ID left join t_pre_emp_work_recording ew on a.id=ew.PRE_MAIN_ID
<where> <where>
a.STATUS != '5' and ew.id is not null and EXISTS ( a.STATUS != '5' and ew.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_work_recording a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ew.emp_id select 1 from (select a.EMP_IDCARD from t_pre_emp_work_recording a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ew.EMP_IDCARD
) )
<include refid="tPreEmpMain_where"/> <include refid="tPreEmpMain_where"/>
</where> </where>
...@@ -424,7 +424,7 @@ ...@@ -424,7 +424,7 @@
left join t_pre_emp_family ef on a.id=ef.PRE_MAIN_ID left join t_pre_emp_family ef on a.id=ef.PRE_MAIN_ID
<where> <where>
a.STATUS != '5' and ef.id is not null and EXISTS ( a.STATUS != '5' and ef.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_family a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ef.emp_id select 1 from (select a.EMP_IDCARD from t_pre_emp_family a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ef.EMP_IDCARD
) )
<include refid="tPreEmpMain_where"/> <include refid="tPreEmpMain_where"/>
</where> </where>
...@@ -440,7 +440,7 @@ ...@@ -440,7 +440,7 @@
left join view_sys_dict_item family_relation on family_relation.value=ef.RELATIONSHIP_SELF and family_relation.type='family_relation' left join view_sys_dict_item family_relation on family_relation.value=ef.RELATIONSHIP_SELF and family_relation.type='family_relation'
<where> <where>
a.STATUS != '5' and ef.id is not null and EXISTS ( a.STATUS != '5' and ef.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_family a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ef.emp_id select 1 from (select a.EMP_IDCARD from t_pre_emp_family a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ef.EMP_IDCARD
) )
<include refid="tPreEmpMain_where"/> <include refid="tPreEmpMain_where"/>
</where> </where>
...@@ -461,7 +461,7 @@ ...@@ -461,7 +461,7 @@
left join t_pre_emp_professional_qualification ep on a.id=ep.PRE_MAIN_ID left join t_pre_emp_professional_qualification ep on a.id=ep.PRE_MAIN_ID
<where> <where>
a.STATUS != '5' and ep.id is not null and EXISTS ( a.STATUS != '5' and ep.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_professional_qualification a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ep.emp_id select 1 from (select a.EMP_IDCARD from t_pre_emp_professional_qualification a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ep.EMP_IDCARD
) )
<include refid="tPreEmpMain_where"/> <include refid="tPreEmpMain_where"/>
</where> </where>
...@@ -477,7 +477,7 @@ ...@@ -477,7 +477,7 @@
left join view_sys_dict_item qualification_type on qualification_type.value=ep.QUALIFICATION_TYPE and qualification_type.type='qualification_type' left join view_sys_dict_item qualification_type on qualification_type.value=ep.QUALIFICATION_TYPE and qualification_type.type='qualification_type'
<where> <where>
a.STATUS != '5' and ep.id is not null and EXISTS ( a.STATUS != '5' and ep.id is not null and EXISTS (
select 1 from (select a.emp_id from t_pre_emp_professional_qualification a GROUP BY a.EMP_ID HAVING count(1)>1) ea where ea.emp_id=ep.emp_id select 1 from (select a.EMP_IDCARD from t_pre_emp_professional_qualification a GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ep.EMP_IDCARD
) )
<include refid="tPreEmpMain_where"/> <include refid="tPreEmpMain_where"/>
</where> </where>
......
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