Commit b26d53f9 authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent 1b235638
......@@ -319,6 +319,24 @@ public class TEmployeeProject extends BaseEntity {
@TableField(exist = false)
private Integer fileTown;
/**
* 社保-省
*/
@Schema(description = "社保-省")
private Integer socialProvince;
/**
* 社保-市
*/
@Schema(description = "社保-市")
private Integer socialCity;
/**
* 社保-县
*/
@Schema(description = "社保-县")
private Integer socialTown;
/**
* 员工合同状态(字典)
*/
......
......@@ -96,13 +96,12 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateTEmployeeProject.setUnitName(tEmpChangeInfo.getNewDept());
tEmployeeProjectService.updateById(updateTEmployeeProject);
tEmpChangeInfo.setProId(updateTEmployeeProject.getId());
// 记录变更日志
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(updateTEmployeeProject.getId());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeeProject.getId(), tEmployeeProjectOld, updateTEmployeeProject);
}
//保存档案划转记录
this.save(tEmpChangeInfo);
// 记录变更日志
TEmployeeProject tEmployeeProjectOld = tEmployeeProjectService.getById(tEmpChangeInfo.getProId());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeeProject.getId(), tEmployeeProjectOld, updateTEmployeeProject);
return R.ok();
}
......
......@@ -408,7 +408,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (updateProjectList.size() > CommonConstants.dingleDigitIntArray[0]) {
for (EmployeeProjectNewOldVO newOldVO : updateProjectList) {
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1]
,"", newOldVO.getNewProjectEmployee().getId()
, "", newOldVO.getNewProjectEmployee().getId()
, newOldVO.getOldProjectEmployee(), newOldVO.getNewProjectEmployee());
}
}
......@@ -681,6 +681,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
List<TEmployeeProject> updateList = new ArrayList<>();
List<TEmployeeInfo> updTEmployeeList = new ArrayList();
Map<String, Integer> checkCountMap = new HashMap<>();
// 执行数据插入操作 组装
for (int i = 0; i < excelVOList.size(); i++) {
......@@ -707,11 +709,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.CHECKS_EMP_EXIT_ERROR)));
}
}
// 数据合法情况
if (CollUtil.isEmpty(errorMessageList)) {
} else {
updateExcelProj(excel, updateList, tEmployeeProject);
if (Common.isNotNull(excel.getEmpNatrue())) {
if (!excel.getEmpNatrue().equals(tEmployeeProject.getEmpNatrue())) {
......@@ -727,21 +725,30 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
} else if (CommonConstants.ONE_STRING.equals(excel.getEmpNatrue()) && !CommonConstants.ZERO_STRING.equals(empNature)) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
}
tEmployeeInfoMapper.updateById(tEmployeeInfo);
updTEmployeeList.add(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(), "", tEmployeeInfoCof, tEmployeeInfo);
}
}
}
}
}
// 数据合法情况
if (CollUtil.isEmpty(errorMessageList)) {
try {
if (updateList.size() > CommonConstants.dingleDigitIntArray[0]) {
baseMapper.updateExcelEmpProject(updateList);
}
if (updTEmployeeList.size()> CommonConstants.dingleDigitIntArray[0]) {
for (TEmployeeInfo tEmployeeInfo : updTEmployeeList) {
tEmployeeInfoMapper.updateById(tEmployeeInfo);
}
}
} catch (Exception e) {
log.error("数据更新异常", e);
}
}
}
/**
* 插入excel Pro
......
......@@ -47,6 +47,9 @@
<result property="fileProvince" column="FILE_PROVINCE"/>
<result property="fileCity" column="FILE_CITY"/>
<result property="fileTown" column="FILE_TOWN"/>
<result property="socialProvince" column="SOCIAL_PROVINCE"/>
<result property="socialCity" column="SOCIAL_CITY"/>
<result property="socialTown" column="SOCIAL_TOWN"/>
<result property="empPhone" column="EMP_PHONE"/>
<result property="salaryStatus" column="SALARY_STATUS"/>
<result property="insuranceStatus" column="INSURANCE_STATUS"/>
......@@ -162,6 +165,9 @@
b.FILE_PROVINCE,
b.FILE_CITY,
b.FILE_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a.SALARY_STATUS
</sql>
......@@ -198,6 +204,9 @@
b.FILE_PROVINCE,
b.FILE_CITY,
b.FILE_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a.SALARY_STATUS,
b.VALIDITY_START,
b.VALIDITY_END,
......@@ -365,6 +374,15 @@
<if test="tEmployeeProject.fileTown != null">
AND b.FILE_TOWN = #{tEmployeeProject.fileTown}
</if>
<if test="tEmployeeProject.socialProvince != null">
AND a.SOCIAL_PROVINCE = #{tEmployeeProject.socialProvince}
</if>
<if test="tEmployeeProject.fileCity != null">
AND a.SOCIAL_CITY = #{tEmployeeProject.socialCity}
</if>
<if test="tEmployeeProject.fileTown != null">
AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown}
</if>
</if>
</sql>
......@@ -472,6 +490,15 @@
<if test="tEmployeeProject.fileTown != null">
AND b.FILE_TOWN = #{tEmployeeProject.fileTown}
</if>
<if test="tEmployeeProject.socialProvince != null">
AND a.SOCIAL_PROVINCE = #{tEmployeeProject.socialProvince}
</if>
<if test="tEmployeeProject.fileCity != null">
AND a.SOCIAL_CITY = #{tEmployeeProject.socialCity}
</if>
<if test="tEmployeeProject.fileTown != null">
AND a.SOCIAL_TOWN = #{tEmployeeProject.socialTown}
</if>
<if test="tEmployeeProject.idList != null">
AND a.id in
<foreach item="idStr" index="index" collection="tEmployeeProject.idList" open="(" separator="," close=")">
......
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.yifu.common.core.config.JacksonConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.config.AsyncConfig,\
com.yifu.cloud.plus.v1.yifu.common.core.config.RedisTemplateConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.config.RestTemplateConfiguration,\
com.yifu.cloud.plus.v1.yifu.common.core.util.SpringContextHolder,\
......
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