Commit 0aaf43f5 authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent 58ad914d
......@@ -29,10 +29,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeProjectMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService;
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.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectVO;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
......@@ -43,6 +41,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.NoUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.validation.BindingResult;
......@@ -58,17 +57,14 @@ import java.util.stream.Collectors;
* @date 2022-06-20 09:19:40
*/
@Service
@RequiredArgsConstructor
public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMapper, TEmployeeProject> implements TEmployeeProjectService {
private TEmployeeInfoService tEmployeeInfoService;
private final TEmployeeLogService tEmployeeLogService;
private TEmployeeLogService tEmployeeLogService;
private final TEmployeeInfoMapper tEmployeeInfoMapper;
private TEmployeeInfoMapper tEmployeeInfoMapper;
private TEmployeeProjectMapper tEmployeeProjectMapper;
private TSettleDomainService tSettleDomainService;
private final TEmployeeProjectMapper tEmployeeProjectMapper;
@Override
public R addCheck(TEmployeeProject tEmployeeProject) {
......@@ -76,7 +72,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
Map<String,Object> map = new HashMap<>();
//身份证系统中是否已有
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne(Wrappers.<TEmployeeInfo>query().lambda()
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, tEmployeeProject.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
......@@ -128,13 +124,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (Common.isNotNull(jsonObject)) {
String empId = jsonObject.getString("empId");
String empProId = jsonObject.getString("empProId");
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoService.getById(empId);
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(empId);
TEmployeeProject tEmployeeProjectOld = this.getById(empProId);
if (!Common.isEmpty(empId) && Common.isEmpty(empProId)) {
//复档
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getById(empId);
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(empId);
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[0]);
tEmployeeInfoService.updateById(tEmployeeInfo);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],empId,"",tEmployeeInfoOld,tEmployeeInfo);
} else if (Common.isEmpty(empId) && !Common.isEmpty(empProId)) {
//复项
......@@ -144,10 +140,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],"",empProId,tEmployeeProjectOld,tEmployeeProject);
} else {
//复档复项
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getById(empId);
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(empId);
TEmployeeProject tEmployeeProject = this.getById(empProId);
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[0]);
tEmployeeInfoService.updateById(tEmployeeInfo);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
tEmployeeProject.setProjectStatus(CommonConstants.dingleDigitIntArray[0]);
this.updateById(tEmployeeProject);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],"",empProId,tEmployeeProjectOld,tEmployeeProject);
......@@ -161,10 +157,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Override
public R deleteEmpPro(TEmployeeProject tEmployeeProject) {
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoService.getById(tEmployeeProject.getEmpId());
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId());
TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId());
if (Common.isNotNull(tEmployeeProject)) {
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getById(tEmployeeProject.getEmpId());
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId());
if (tEmployeeProject.getIsLeaveEmployee()== CommonConstants.dingleDigitIntArray[1]) {
Long count = this.count(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getEmpId,tEmployeeProject.getEmpId())
......@@ -173,7 +169,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.failed("该人员存在其他进行中的项目,禁止同步减档!");
}
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[1]);
tEmployeeInfoService.updateById(tEmployeeInfo);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
}
tEmployeeProject.setProjectStatus(CommonConstants.dingleDigitIntArray[1]);
this.updateById(tEmployeeProject);
......@@ -216,7 +212,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
//根据身份证获取人员档案
TEmployeeInfo tEmployeeInfo = tEmployeeInfoService.getOne(Wrappers.<TEmployeeInfo>query().lambda()
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard, excel.getEmpIdcard())
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
//根据身份证和项目编码获取项目档案
......
......@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain;
import com.yifu.cloud.plus.v1.yifu.archives.mapper.TSettleDomainMapper;
import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
/**
......@@ -29,6 +30,7 @@ import org.springframework.stereotype.Service;
* @date 2022-06-20 10:02:28
*/
@Service
@RequiredArgsConstructor
public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, TSettleDomain> implements TSettleDomainService {
}
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