Commit 77d3af0e authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/develop' into develop

parents d047debe 0aaf43f5
......@@ -45,7 +45,7 @@ public class EmployeeProjectExportVO extends BaseEntity {
@NotNull(message = "档案员工类型不能为空")
@Max(value = 1,message = "档案员工类型不可超过1位")
@ExcelProperty(value ="档案员工类型")
private String empNatrue;
private String proEmpNatrue;
/**
* 员工姓名
......@@ -210,7 +210,7 @@ public class EmployeeProjectExportVO extends BaseEntity {
* 人员档案状态(0草稿、1已审核)
*/
@ExcelProperty(value = "人员档案状态")
private Integer status;
private Integer proStatus;
/**
* 档案状态(0正常;1已减档)
......@@ -222,13 +222,13 @@ public class EmployeeProjectExportVO extends BaseEntity {
* 创建者-姓名
*/
@ExcelProperty(value = "人员档案创建人")
private String createName;
private String proCreateName;
/**
* 创建时间
*/
@ExcelProperty(value = "人员档案创建时间")
private LocalDateTime createTime;
private LocalDateTime proCreateTime;
/**
......@@ -291,7 +291,7 @@ public class EmployeeProjectExportVO extends BaseEntity {
* 项目员工类型
*/
@ExcelProperty(value ="项目员工类型")
private String proEmpNatrue;
private String empNatrue;
/**
* 员工编码
......@@ -363,19 +363,19 @@ public class EmployeeProjectExportVO extends BaseEntity {
* 项目档案状态(0草稿、1已审核)
*/
@ExcelProperty(value ="项目档案状态")
private Integer proStatus;
private Integer status;
/**
* 项目档案创建人
*/
@ExcelProperty(value ="项目档案创建人")
private String proCreateName;
private String createName;
/**
* 项目档案创建时间
*/
@ExcelProperty(value ="项目档案创建时间")
private LocalDateTime proCreateTime;
private LocalDateTime createTime;
private List<String> idList;
}
......@@ -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));
......@@ -88,8 +84,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (!Common.isEmpty(employeeProject)) {
//身份证实名认证
if (!tEmployeeProject.getEmpName().equals(tEmployeeInfo.getEmpName())) {
return R.failed("姓名和身份证不一致,请确认后再次新增");
if (!Common.isEmpty(tEmployeeInfo)) {
if (!tEmployeeProject.getEmpName().equals(tEmployeeInfo.getEmpName())) {
return R.failed("姓名和身份证不一致,请确认后再次新增");
}
}
//项目状态为已减项
if (CommonConstants.dingleDigitIntArray[1] == employeeProject.getProjectStatus()) {
......@@ -126,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)) {
//复项
......@@ -142,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);
......@@ -159,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())
......@@ -171,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);
......@@ -214,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 {
}
......@@ -98,7 +98,7 @@
<result property="enjoinDate" column="ENJOIN_DATE"/>
<result property="tryPeriod" column="TRY_PERIOD"/>
<result property="projectSource" column="PROJECT_SOURCE"/>
<result property="proEmpNatrue" column="EMP_NATRUE"/>
<result property="empNatrue" column="EMP_NATRUE"/>
<result property="proCreateName" column="PROCREATE_NAME"/>
<result property="proCreateTime" column="PROCREATE_TIME"/>
<result property="taxMonth" column="TAX_MONTH"/>
......@@ -168,7 +168,7 @@
<sql id="Base_Export_List">
a.EMP_CODE,
a.EMP_NATRUE AS PROEMP_NATRUE,
a.EMP_NATRUE,
a.EMP_NAME,
a.EMP_IDCARD,
a.BANK_NAME,
......@@ -189,9 +189,9 @@
a.TRY_PERIOD,
a.PROJECT_SOURCE,
a.TAX_MONTH,
a.STATUS AS PROSTATUS,
a.CREATE_NAME AS PROCREATE_NAME,
a.CREATE_TIME AS PROCREATE_TIME,
b.STATUS AS PROSTATUS,
b.CREATE_NAME AS PROCREATE_NAME,
b.CREATE_TIME AS PROCREATE_TIME,
b.EMP_PHONE,
b.INSURANCE_STATUS,
b.SOCIAL_STATUS,
......@@ -216,10 +216,10 @@
b.ADMISSION_DATE,
b.GRADUTION_DATE,
b.REMARK,
b.STATUS,
b.CREATE_NAME,
b.CREATE_TIME,
b.EMP_NATRUE
a.STATUS,
a.CREATE_NAME,
a.CREATE_TIME,
b.EMP_NATRUE AS PROEMP_NATRUE
</sql>
<sql id="tEmployeeProject_where">
......@@ -368,6 +368,122 @@
</if>
</sql>
<sql id="exportTEmployeeProject_where">
<if test="tEmployeeProject != null">
<if test="tEmployeeProject.empCode != null and tEmployeeProject.empCode.trim() != ''">
AND a.EMP_CODE = #{tEmployeeProject.empCode}
</if>
<if test="tEmployeeProject.empNatrue != null and tEmployeeProject.empNatrue.trim() != ''">
AND a.EMP_NATRUE = #{tEmployeeProject.empNatrue}
</if>
<if test="tEmployeeProject.empName != null and tEmployeeProject.empName.trim() != ''">
AND a.EMP_NAME = #{tEmployeeProject.empName}
</if>
<if test="tEmployeeProject.empIdcard != null and tEmployeeProject.empIdcard.trim() != ''">
AND a.EMP_IDCARD = #{tEmployeeProject.empIdcard}
</if>
<if test="tEmployeeProject.bankName != null and tEmployeeProject.bankName.trim() != ''">
AND a.BANK_NAME = #{tEmployeeProject.bankName}
</if>
<if test="tEmployeeProject.bankSubName != null and tEmployeeProject.bankSubName.trim() != ''">
AND a.BANK_SUB_NAME = #{tEmployeeProject.bankSubName}
</if>
<if test="tEmployeeProject.bankNo != null and tEmployeeProject.bankNo.trim() != ''">
AND a.BANK_NO = #{tEmployeeProject.bankNo}
</if>
<if test="tEmployeeProject.isLeaveEmployee != null">
AND a.IS_LEAVE_EMPLOYEE = #{tEmployeeProject.isLeaveEmployee}
</if>
<if test="tEmployeeProject.empNo != null and tEmployeeProject.empNo.trim() != ''">
AND a.EMP_NO = #{tEmployeeProject.empNo}
</if>
<if test="tEmployeeProject.unitId != null and tEmployeeProject.unitId.trim() != ''">
AND a.UNIT_ID = #{tEmployeeProject.unitId}
</if>
<if test="tEmployeeProject.unitName != null and tEmployeeProject.unitName.trim() != ''">
AND a.UNIT_NAME like concat('%',#{tEmployeeProject.unitName},'%')
</if>
<if test="tEmployeeProject.unitNo != null and tEmployeeProject.unitNo.trim() != ''">
AND a.UNIT_NO = #{tEmployeeProject.unitNo}
</if>
<if test="tEmployeeProject.deptId != null and tEmployeeProject.deptId.trim() != ''">
AND a.DEPT_ID = #{tEmployeeProject.deptId}
</if>
<if test="tEmployeeProject.deptName != null and tEmployeeProject.deptName.trim() != ''">
AND a.DEPT_NAME like concat('%',#{tEmployeeProject.deptName},'%')
</if>
<if test="tEmployeeProject.deptNo != null and tEmployeeProject.deptNo.trim() != ''">
AND a.DEPT_NO = #{tEmployeeProject.deptNo}
</if>
<if test="tEmployeeProject.businessPrimaryType != null and tEmployeeProject.businessPrimaryType.trim() != ''">
AND a.BUSINESS_PRIMARY_TYPE = #{tEmployeeProject.businessPrimaryType}
</if>
<if test="tEmployeeProject.businessSecondType != null and tEmployeeProject.businessSecondType.trim() != ''">
AND a.BUSINESS_SECOND_TYPE = #{tEmployeeProject.businessSecondType}
</if>
<if test="tEmployeeProject.businessThirdType != null and tEmployeeProject.businessThirdType.trim() != ''">
AND a.BUSINESS_THIRD_TYPE = #{tEmployeeProject.businessThirdType}
</if>
<if test="tEmployeeProject.contractType != null and tEmployeeProject.contractType.trim() != ''">
AND a.CONTRACT_TYPE = #{tEmployeeProject.contractType}
</if>
<if test="tEmployeeProject.workingHours != null and tEmployeeProject.workingHours.trim() != ''">
AND a.WORKING_HOURS = #{tEmployeeProject.workingHours}
</if>
<if test="tEmployeeProject.post != null and tEmployeeProject.post.trim() != ''">
AND a.POST = #{tEmployeeProject.post}
</if>
<if test="tEmployeeProject.enjoinDate != null">
AND a.ENJOIN_DATE = #{tEmployeeProject.enjoinDate}
</if>
<if test="tEmployeeProject.tryPeriod != null and tEmployeeProject.tryPeriod.trim() != ''">
AND a.TRY_PERIOD = #{tEmployeeProject.tryPeriod}
</if>
<if test="tEmployeeProject.projectSource != null and tEmployeeProject.projectSource.trim() != ''">
AND a.PROJECT_SOURCE = #{tEmployeeProject.projectSource}
</if>
<if test="tEmployeeProject.taxMonth != null and tEmployeeProject.taxMonth.trim() != ''">
AND a.TAX_MONTH = #{tEmployeeProject.taxMonth}
</if>
<if test="tEmployeeProject.proStatus != null">
AND a.STATUS = #{tEmployeeProject.proStatus}
</if>
<if test="tEmployeeProject.createName != null and tEmployeeProject.createName.trim() != ''">
AND a.CREATE_NAME = #{tEmployeeProject.createName}
</if>
<if test="tEmployeeProject.createTime != null">
AND a.CREATE_TIME = #{tEmployeeProject.createTime}
</if>
<if test="tEmployeeProject.remark != null and tEmployeeProject.remark.trim() != ''">
AND a.REMARK = #{tEmployeeProject.remark}
</if>
<if test="tEmployeeProject.empPhone != null and tEmployeeProject.empPhone.trim() != ''">
AND b.EMP_PHONE = #{tEmployeeProject.empPhone}
</if>
<if test="tEmployeeProject.insuranceStatus != null">
AND b.INSURANCE_STATUS = #{tEmployeeProject.insuranceStatus}
</if>
<if test="tEmployeeProject.socialStatus != null">
AND b.SOCIAL_STATUS = #{tEmployeeProject.socialStatus}
</if>
<if test="tEmployeeProject.fundStatus != null">
AND b.FUND_STATUS = #{tEmployeeProject.fundStatus}
</if>
<if test="tEmployeeProject.salaryStatus != null">
AND b.SALARY_STATUS = #{tEmployeeProject.salaryStatus}
</if>
<if test="tEmployeeProject.fileProvince != null">
AND b.FILE_PROVINCE = #{tEmployeeProject.fileProvince}
</if>
<if test="tEmployeeProject.fileCity != null">
AND b.FILE_CITY = #{tEmployeeProject.fileCity}
</if>
<if test="tEmployeeProject.fileTown != null">
AND b.FILE_TOWN = #{tEmployeeProject.fileTown}
</if>
</if>
</sql>
<update id="updateExcelEmpProject" parameterType="java.util.List">
update t_employee_project
<trim prefix="set" suffixOverrides=",">
......
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