Commit 99f4fa01 authored by hongguangwu's avatar hongguangwu

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

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