Commit b26d53f9 authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

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