Commit 99f4fa01 authored by hongguangwu's avatar hongguangwu

MVP1.6.6-预入职相关_5删除重拉

parent f2689558
...@@ -30,5 +30,5 @@ import org.apache.ibatis.annotations.Param; ...@@ -30,5 +30,5 @@ import org.apache.ibatis.annotations.Param;
*/ */
@Mapper @Mapper
public interface TEmpFamilyMapper extends BaseMapper<TEmpFamily> { public interface TEmpFamilyMapper extends BaseMapper<TEmpFamily> {
void deleteByEmpId(@Param("empId") String empId, @Param("tableName") String tableName); void deleteByEmpId(@Param("empId") String empId);
} }
...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper; ...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpProfessionalQualification;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 员工职业资格信息表 * 员工职业资格信息表
...@@ -30,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -30,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface TEmpProfessionalQualificationMapper extends BaseMapper<TEmpProfessionalQualification> { public interface TEmpProfessionalQualificationMapper extends BaseMapper<TEmpProfessionalQualification> {
void deleteByEmpId(@Param("empId") String empId);
} }
...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper; ...@@ -20,6 +20,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpWorkRecording;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/** /**
* 员工工作履历信息表 * 员工工作履历信息表
...@@ -30,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper; ...@@ -30,4 +31,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface TEmpWorkRecordingMapper extends BaseMapper<TEmpWorkRecording> { public interface TEmpWorkRecordingMapper extends BaseMapper<TEmpWorkRecording> {
void deleteByEmpId(@Param("empId") String empId);
} }
...@@ -51,13 +51,12 @@ public interface TEmpFamilyService extends IService<TEmpFamily> { ...@@ -51,13 +51,12 @@ public interface TEmpFamilyService extends IService<TEmpFamily> {
/** /**
* @param empId * @param empId
* @param tableName
* @Description: 删除档案附属表信息(预入职清空附属信息专用,其余的请慎用) * @Description: 删除档案附属表信息(预入职清空附属信息专用,其余的请慎用)
* @Author: hgw * @Author: hgw
* @Date: 2024/6/19 18:27 * @Date: 2024/6/19 18:27
* @return: void * @return: void
**/ **/
void deleteByEmpIdAndTable(String empId, String tableName); void deleteByEmpId(String empId);
List<TEmpFamily> getListByEmpId(String empId); List<TEmpFamily> getListByEmpId(String empId);
......
...@@ -58,4 +58,13 @@ public interface TEmpProfessionalQualificationService extends IService<TEmpProfe ...@@ -58,4 +58,13 @@ public interface TEmpProfessionalQualificationService extends IService<TEmpProfe
**/ **/
List<TEmpProfessionalQualification> getListByEmpId(String empId); List<TEmpProfessionalQualification> getListByEmpId(String empId);
/**
* @param empId
* @Description: 删除档案附属表信息(预入职清空附属信息专用,其余的请慎用)
* @Author: hgw
* @Date: 2024/6/19 18:27
* @return: void
**/
void deleteByEmpId(String empId);
} }
...@@ -58,4 +58,13 @@ public interface TEmpWorkRecordingService extends IService<TEmpWorkRecording> { ...@@ -58,4 +58,13 @@ public interface TEmpWorkRecordingService extends IService<TEmpWorkRecording> {
**/ **/
List<TEmpWorkRecording> getListByEmpId(String empId); List<TEmpWorkRecording> getListByEmpId(String empId);
/**
* @param empId
* @Description: 删除档案附属表信息(预入职清空附属信息专用,其余的请慎用)
* @Author: hgw
* @Date: 2024/6/19 18:27
* @return: void
**/
void deleteByEmpId(String empId);
} }
...@@ -236,8 +236,8 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam ...@@ -236,8 +236,8 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
} }
@Override @Override
public void deleteByEmpIdAndTable(String empId, String tableName) { public void deleteByEmpId(String empId) {
baseMapper.deleteByEmpId(empId, tableName); baseMapper.deleteByEmpId(empId);
} }
private LambdaQueryWrapper buildQueryWrapper(FamilySearchVO entity){ private LambdaQueryWrapper buildQueryWrapper(FamilySearchVO entity){
......
...@@ -65,6 +65,11 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr ...@@ -65,6 +65,11 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
private final TEmployeeInfoMapper employeeInfoMapper; private final TEmployeeInfoMapper employeeInfoMapper;
@Override
public void deleteByEmpId(String empId) {
baseMapper.deleteByEmpId(empId);
}
@Override @Override
public R<Boolean> saveDiy(TEmpProfessionalQualification qualification) { public R<Boolean> saveDiy(TEmpProfessionalQualification qualification) {
......
...@@ -296,4 +296,9 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM ...@@ -296,4 +296,9 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
return baseMapper.selectList(Wrappers.<TEmpWorkRecording>query().lambda().eq(TEmpWorkRecording::getEmpId, empId).eq(TEmpWorkRecording::getDeleteFlag, CommonConstants.ZERO_STRING)); return baseMapper.selectList(Wrappers.<TEmpWorkRecording>query().lambda().eq(TEmpWorkRecording::getEmpId, empId).eq(TEmpWorkRecording::getDeleteFlag, CommonConstants.ZERO_STRING));
} }
@Override
public void deleteByEmpId(String empId) {
baseMapper.deleteByEmpId(empId);
}
} }
...@@ -155,6 +155,16 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -155,6 +155,16 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
"1", authorities, "1", "1", authorities, "1",
null, null, null, null,
null); null);
if (main != null && CommonConstants.FIVE_STRING.equals(main.getStatus())) {
// 清空信息
if (Common.isNotNull(main.getId())) {
tPreEmpWorkRecordingService.deleteByMainId(main.getId());
tPreEmpProfessionalQualificationService.deleteByMainId(main.getId());
tAttaInfoService.deleteByDomainId(main.getId());
}
baseMapper.deleteById(main);
main = null;
}
if (main != null) { if (main != null) {
if (CommonConstants.ONE_STRING.equals(main.getStatus()) if (CommonConstants.ONE_STRING.equals(main.getStatus())
|| CommonConstants.TWO_STRING.equals(main.getStatus()) || CommonConstants.TWO_STRING.equals(main.getStatus())
...@@ -1103,7 +1113,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1103,7 +1113,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
List<TPreEmpFamily> tPreEmpFamilyList = vo.getTpreEmpFamilyList(); List<TPreEmpFamily> tPreEmpFamilyList = vo.getTpreEmpFamilyList();
if (tPreEmpFamilyList != null) { if (tPreEmpFamilyList != null) {
// 先删除其他信息 // 先删除其他信息
tEmpFamilyService.deleteByEmpIdAndTable(empId, "t_emp_family"); tEmpFamilyService.deleteByEmpId(empId);
List<TEmpFamily> tEmpFamilyList = new ArrayList<>(); List<TEmpFamily> tEmpFamilyList = new ArrayList<>();
TEmpFamily tEmpFamily; TEmpFamily tEmpFamily;
for (TPreEmpFamily tPreEmpFamily : tPreEmpFamilyList) { for (TPreEmpFamily tPreEmpFamily : tPreEmpFamilyList) {
...@@ -1120,7 +1130,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1120,7 +1130,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualificationList = vo.getTpreEmpProfessionalQualificationList(); List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualificationList = vo.getTpreEmpProfessionalQualificationList();
if (tPreEmpProfessionalQualificationList != null) { if (tPreEmpProfessionalQualificationList != null) {
// 先删除其他信息 // 先删除其他信息
tEmpFamilyService.deleteByEmpIdAndTable(empId, "t_pre_emp_professional_qualification"); tEmpProfessionalQualificationService.deleteByEmpId(empId);
TEmpProfessionalQualification info; TEmpProfessionalQualification info;
for (TPreEmpProfessionalQualification preInfo : tPreEmpProfessionalQualificationList) { for (TPreEmpProfessionalQualification preInfo : tPreEmpProfessionalQualificationList) {
info = new TEmpProfessionalQualification(); info = new TEmpProfessionalQualification();
...@@ -1151,7 +1161,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -1151,7 +1161,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
List<TPreEmpWorkRecording> tPreEmpWorkRecordingList = vo.getTpreEmpWorkRecordingList(); List<TPreEmpWorkRecording> tPreEmpWorkRecordingList = vo.getTpreEmpWorkRecordingList();
if (tPreEmpWorkRecordingList != null) { if (tPreEmpWorkRecordingList != null) {
// 先删除其他信息 // 先删除其他信息
tEmpFamilyService.deleteByEmpIdAndTable(empId, "t_pre_emp_work_recording"); tEmpWorkRecordingService.deleteByEmpId(empId);
List<TEmpWorkRecording> tEmpWorkRecordingList = new ArrayList<>(); List<TEmpWorkRecording> tEmpWorkRecordingList = new ArrayList<>();
TEmpWorkRecording info; TEmpWorkRecording info;
for (TPreEmpWorkRecording preInfo : tPreEmpWorkRecordingList) { for (TPreEmpWorkRecording preInfo : tPreEmpWorkRecordingList) {
......
...@@ -45,6 +45,6 @@ ...@@ -45,6 +45,6 @@
</resultMap> </resultMap>
<delete id="deleteByEmpId"> <delete id="deleteByEmpId">
delete from #{tableName} where EMP_ID = #{empId} delete from t_emp_family where EMP_ID = #{empId}
</delete> </delete>
</mapper> </mapper>
...@@ -45,4 +45,9 @@ ...@@ -45,4 +45,9 @@
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
<result property="remark" column="REMARK"/> <result property="remark" column="REMARK"/>
</resultMap> </resultMap>
<delete id="deleteByEmpId">
delete from t_pre_emp_professional_qualification where EMP_ID = #{empId}
</delete>
</mapper> </mapper>
...@@ -46,4 +46,8 @@ ...@@ -46,4 +46,8 @@
<result property="remark" column="REMARK"/> <result property="remark" column="REMARK"/>
</resultMap> </resultMap>
<delete id="deleteByEmpId">
delete from t_pre_emp_work_recording where EMP_ID = #{empId}
</delete>
</mapper> </mapper>
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