Commit 6e639dba authored by hongguangwu's avatar hongguangwu

MVP1.6.6-预入职相关_新校验

parent 2b2dc0e8
......@@ -38,4 +38,5 @@ public interface TPreEmpProfessionalQualificationMapper extends BaseMapper<TPreE
* @return
*/
List<TPreEmpProfessionalQualification> getTPreEmpProfessionalQualificationList(@Param("preMainId") String preMainId);
void deleteByMainId(@Param("preMainId") String preMainId);
}
......@@ -38,4 +38,6 @@ public interface TPreEmpWorkRecordingMapper extends BaseMapper<TPreEmpWorkRecord
* @return
*/
List<TPreEmpWorkRecording> getTPreEmpWorkRecordingList(@Param("preMainId") String preMainId);
void deleteByMainId(@Param("preMainId") String preMainId);
}
......@@ -36,4 +36,13 @@ public interface TPreEmpProfessionalQualificationService extends IService<TPreEm
*/
List<TPreEmpProfessionalQualification> getTPreEmpProfessionalQualificationList(String preMainId);
/**
* @param preMainId
* @Description: 先删后加
* @Author: hgw
* @Date: 2024/6/27 16:26
* @return: void
**/
void deleteByMainId(String preMainId);
}
......@@ -35,4 +35,14 @@ public interface TPreEmpWorkRecordingService extends IService<TPreEmpWorkRecordi
* @return
*/
List<TPreEmpWorkRecording> getTPreEmpWorkRecordingList(String preMainId);
/**
* @param preMainId
* @Description: 先删后加
* @Author: hgw
* @Date: 2024/6/27 16:26
* @return: void
**/
void deleteByMainId(String preMainId);
}
......@@ -860,6 +860,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 预入职-员工职业资格信息表
List<TPreEmpProfessionalQualification> tPreEmpProfessionalQualification = vo.getTpreEmpProfessionalQualificationList();
if (tPreEmpProfessionalQualification != null) {
// 先删除后增加
tPreEmpProfessionalQualificationService.deleteByMainId(mainId);
for (TPreEmpProfessionalQualification info : tPreEmpProfessionalQualification) {
info.setPreMainId(mainId);
info.setCreateBy(user.getId());
......@@ -885,6 +887,8 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 预入职-员工工作履历信息表
List<TPreEmpWorkRecording> tPreEmpWorkRecording = vo.getTpreEmpWorkRecordingList();
if (tPreEmpWorkRecording != null) {
// 先删除后增加
tPreEmpWorkRecordingService.deleteByMainId(mainId);
for (TPreEmpWorkRecording info : tPreEmpWorkRecording) {
info.setPreMainId(mainId);
info.setCreateBy(user.getId());
......@@ -893,9 +897,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
tPreEmpWorkRecordingService.saveOrUpdateBatch(tPreEmpWorkRecording);
}
// 预入职-员工工作履历信息表
// 预入职-附件
List<TAttaInfo> attaInfoList = vo.getAttaInfoList();
if (attaInfoList != null) {
// 先删除后增加
tAttaInfoService.deleteByDomainId(mainId);
for (TAttaInfo info : attaInfoList) {
info.setDomainId(mainId);
info.setCreateBy(user.getId());
......@@ -1765,7 +1771,6 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
ExcelWriter excelWriter = EasyExcelFactory.write(out).head(headList).build();
int index = 0;
if (count > CommonConstants.ZERO_INT) {
OnceAbsoluteMergeStrategy strategy;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
......
......@@ -43,4 +43,9 @@ public class TPreEmpProfessionalQualificationServiceImpl extends ServiceImpl<TPr
public List<TPreEmpProfessionalQualification> getTPreEmpProfessionalQualificationList(String preMainId) {
return baseMapper.getTPreEmpProfessionalQualificationList(preMainId);
}
@Override
public void deleteByMainId(String preMainId) {
baseMapper.deleteByMainId(preMainId);
}
}
......@@ -22,32 +22,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.mapper.TPreEmpWorkRecordingMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpWorkRecordingService;
import lombok.extern.log4j.Log4j2;
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;
/**
* 预入职-员工工作履历信息表
......@@ -67,4 +42,9 @@ public class TPreEmpWorkRecordingServiceImpl extends ServiceImpl<TPreEmpWorkReco
return baseMapper.getTPreEmpWorkRecordingList(preMainId);
}
@Override
public void deleteByMainId(String preMainId) {
baseMapper.deleteByMainId(preMainId);
}
}
......@@ -145,4 +145,9 @@
FROM t_pre_emp_professional_qualification a
where PRE_MAIN_ID = #{preMainId}
</select>
<delete id="deleteByMainId">
delete from t_pre_emp_professional_qualification where PRE_MAIN_ID = #{preMainId}
</delete>
</mapper>
......@@ -145,4 +145,9 @@
FROM t_pre_emp_work_recording a
where PRE_MAIN_ID = #{preMainId}
</select>
<delete id="deleteByMainId">
delete from t_pre_emp_professional_qualification where PRE_MAIN_ID = #{preMainId}
</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