Commit bc6da2ed authored by hongguangwu's avatar hongguangwu

MVP1.6.6-预入职相关_先删后加

parent acf437cc
...@@ -38,4 +38,7 @@ public interface TPreEmpFamilyMapper extends BaseMapper<TPreEmpFamily> { ...@@ -38,4 +38,7 @@ public interface TPreEmpFamilyMapper extends BaseMapper<TPreEmpFamily> {
* @return * @return
*/ */
List<TPreEmpFamily> getTPreEmpFamilyList(@Param("preMainId") String preMainId); List<TPreEmpFamily> getTPreEmpFamilyList(@Param("preMainId") String preMainId);
void deleteFamilyByMainId(@Param("preMainId") String preMainId);
} }
...@@ -35,4 +35,14 @@ public interface TPreEmpFamilyService extends IService<TPreEmpFamily> { ...@@ -35,4 +35,14 @@ public interface TPreEmpFamilyService extends IService<TPreEmpFamily> {
* @return * @return
*/ */
List<TPreEmpFamily> getTPreEmpFamilyList(String preMainId); List<TPreEmpFamily> getTPreEmpFamilyList(String preMainId);
/**
* @param preMainId
* @Description: 先删后加
* @Author: hgw
* @Date: 2024/6/27 16:26
* @return: void
**/
void deleteFamilyByMainId(String preMainId);
} }
...@@ -22,32 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpFamilyMapper; ...@@ -22,32 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpFamilyMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpFamilyService; import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpFamilyService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.util.List;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ArrayUtil;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.holder.ReadRowHolder;
import com.alibaba.excel.util.ListUtils;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import javax.servlet.ServletOutputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* 预入职-员工家庭信息表 * 预入职-员工家庭信息表
...@@ -67,4 +42,9 @@ public class TPreEmpFamilyServiceImpl extends ServiceImpl<TPreEmpFamilyMapper, T ...@@ -67,4 +42,9 @@ public class TPreEmpFamilyServiceImpl extends ServiceImpl<TPreEmpFamilyMapper, T
return baseMapper.getTPreEmpFamilyList(preMainId); return baseMapper.getTPreEmpFamilyList(preMainId);
} }
@Override
public void deleteFamilyByMainId(String preMainId) {
baseMapper.deleteFamilyByMainId(preMainId);
}
} }
...@@ -869,6 +869,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE ...@@ -869,6 +869,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 预入职-员工家庭信息表 // 预入职-员工家庭信息表
List<TPreEmpFamily> tPreEmpFamily = vo.getTpreEmpFamilyList(); List<TPreEmpFamily> tPreEmpFamily = vo.getTpreEmpFamilyList();
if (tPreEmpFamily != null) { if (tPreEmpFamily != null) {
tPreEmpFamilyService.deleteFamilyByMainId(mainId);
for (TPreEmpFamily info : tPreEmpFamily) { for (TPreEmpFamily info : tPreEmpFamily) {
info.setPreMainId(mainId); info.setPreMainId(mainId);
info.setCreateBy(user.getId()); info.setCreateBy(user.getId());
......
...@@ -135,4 +135,9 @@ ...@@ -135,4 +135,9 @@
FROM t_pre_emp_family a FROM t_pre_emp_family a
where PRE_MAIN_ID = #{preMainId} where PRE_MAIN_ID = #{preMainId}
</select> </select>
<delete id="deleteFamilyByMainId">
delete from t_pre_emp_family where PRE_MAIN_ID = #{preMainId}
</delete>
</mapper> </mapper>
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
</select> </select>
<delete id="deleteByMainId"> <delete id="deleteByMainId">
delete from t_pre_emp_professional_qualification where PRE_MAIN_ID = #{preMainId} delete from t_pre_emp_work_recording where PRE_MAIN_ID = #{preMainId}
</delete> </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