Commit 37a1bc04 authored by fangxinjiang's avatar fangxinjiang

附属信息调整

parent bb527187
......@@ -16,9 +16,7 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fadada.api.bean.req.seal.CancelSealAuthReq;
import com.fadada.api.bean.req.seal.CompanySealListReq;
......
......@@ -24,7 +24,6 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.FddSealInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.FddSealPersonAuth;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.FddSealInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.FddSealPersonAuthMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.FddSealInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.FddSealPersonAuthService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......
......@@ -37,7 +37,6 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.LocalDateTimeUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
......
......@@ -46,7 +46,9 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import java.io.*;
import java.util.*;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
......
......@@ -144,7 +144,6 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
private void importEmpBadRecord(List<EmpBadRecordVo> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
List<TEmpBadRecord> list = this.list();
TEmployeeInfo emp;
TEmployeeProject exist;
ErrorMessage errorMsg;
......@@ -160,7 +159,7 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
.eq(TEmployeeInfo::getEmpIdcard,excel.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
errorMsg = checkRes(list, emp, excel);
errorMsg = checkRes(emp, excel);
if (Common.isNotNull(errorMsg)){
errorMessageList.add(errorMsg);
continue;
......@@ -182,7 +181,7 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.SAVE_SUCCESS));
}
}
private ErrorMessage checkRes(List<TEmpBadRecord> list, TEmployeeInfo emp, EmpBadRecordVo excel) {
private ErrorMessage checkRes(TEmployeeInfo emp, EmpBadRecordVo excel) {
if (Common.isEmpty(emp)){
return new ErrorMessage(excel.getRowIndex(),MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_NOT_EXIST));
}
......
......@@ -20,9 +20,15 @@ import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpChangeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpChangeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.*;
import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TEmpChangeInfoVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
......
......@@ -47,6 +47,7 @@ import org.springframework.stereotype.Service;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 员工伤残信息表
......@@ -72,7 +73,9 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
@Override
public void importTmpDisability(List<EmpDisabilityExcelVO> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
List<TEmpDisabilityInfo> list = this.list();
List<TEmpDisabilityInfo> list = this.list(Wrappers.<TEmpDisabilityInfo>query().lambda()
.in(TEmpDisabilityInfo::getEmpIdcard,excelVOList.stream().map(EmpDisabilityExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpDisabilityInfo::getDeleteFlag,CommonConstants.ZERO_STRING));
TEmployeeInfo emp;
TEmpDisabilityInfo exist;
ErrorMessage errorMsg;
......
......@@ -50,6 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 员工学历信息表
......@@ -75,7 +76,9 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
@Override
public void importEmpEducation(List<EmpEducationExcelVO> excelVOList, List<ErrorMessage> errorMessageList) {
/// 个性化校验逻辑
List<TEmpEducation> list = this.list();
List<TEmpEducation> list = this.list(Wrappers.<TEmpEducation>query().lambda()
.in(TEmpEducation::getEmpIdcard,excelVOList.stream().map(EmpEducationExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpEducation::getDeleteFlag,CommonConstants.ZERO_STRING));
TEmployeeInfo emp;
TEmpEducation exist;
ErrorMessage errorMsg;
......@@ -163,10 +166,8 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
**/
@Override
public void importEmpEducationUpdate(List<EmpEducationUpdateExcelVo> excelVOList, List<ErrorMessage> errorMessageList) {
List<TEmpEducation> list = this.list();
TEmpEducation temp;
TEmpEducation exist;
ErrorMessage errorMsg;
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
// 已有验证报错直接下一个
......
......@@ -50,6 +50,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 员工家庭信息表
......@@ -74,7 +75,9 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
@Override
public void importEmpFamily(List<EmpFamilyExcelVO> excelVOList,List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
List<TEmpFamily> list = this.list();
List<TEmpFamily> list = this.list(Wrappers.<TEmpFamily>query().lambda()
.in(TEmpFamily::getEmpIdcard,excelVOList.stream().map(EmpFamilyExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpFamily::getDeleteFlag,CommonConstants.ZERO_STRING));
TEmployeeInfo emp;
TEmpFamily exist;
ErrorMessage errorMsg;
......
......@@ -48,6 +48,7 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 员工职业资格信息表
......@@ -93,7 +94,9 @@ public class TEmpProfessionalQualificationServiceImpl extends ServiceImpl<TEmpPr
@Override
public void importEmpCertificate(List<EmpCertificateExcelVO> excelVOList, List<ErrorMessage> errorMessageList) {
List<TEmpProfessionalQualification> list = this.list();
List<TEmpProfessionalQualification> list = this.list(Wrappers.<TEmpProfessionalQualification>query().lambda()
.in(TEmpProfessionalQualification::getEmpIdcard,excelVOList.stream().map(EmpCertificateExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpProfessionalQualification::getDeleteFlag,CommonConstants.ZERO_STRING));
TEmployeeInfo emp;
TEmpProfessionalQualification exist;
ErrorMessage errorMsg;
......
......@@ -48,6 +48,7 @@ import org.springframework.stereotype.Service;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* 员工工作履历信息表
......@@ -67,7 +68,9 @@ public class TEmpWorkRecordingServiceImpl extends ServiceImpl<TEmpWorkRecordingM
@Override
public void importEmpWorkRecord(List<EmpWorkRecordExcelVO> excelVOList, List<ErrorMessage> errorMessageList) {
// 个性化校验逻辑
List<TEmpWorkRecording> list = this.list();
List<TEmpWorkRecording> list = this.list(Wrappers.<TEmpWorkRecording>query().lambda()
.in(TEmpWorkRecording::getEmpIdcard,excelVOList.stream().map(EmpWorkRecordExcelVO::getEmpIdcard).collect(Collectors.toList()))
.eq(TEmpWorkRecording::getDeleteFlag,CommonConstants.ZERO_STRING));
TEmployeeInfo emp;
TEmpWorkRecording exist;
ErrorMessage errorMsg;
......
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