Commit e906bdf6 authored by huyuchen's avatar huyuchen

法大大代码提交

parent 08caed7f
......@@ -496,7 +496,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
String errorMessage = excel.getEmpName() + ";" + excel.getEmpIdcard() + "," + excel.getDeptNo() + ";";
String errorMessage = excel.getEmpName()!=null?excel.getEmpName():" " + ";" + excel.getEmpIdcard() + ";" + excel.getDeptNo() + ";"
+ excel.getLeaveReason() + ";" + excel.getLeaveRemark()!=null?excel.getLeaveRemark():" " + ";";
if (Common.isNotNull(tEmployeeProject)) {
if (tEmployeeProject.getInsuranceStatus() != CommonConstants.dingleDigitIntArray[0] || tEmployeeProject.getSocialStatus() != CommonConstants.dingleDigitIntArray[0] ||
tEmployeeProject.getFundStatus() != CommonConstants.dingleDigitIntArray[0]) {
......@@ -521,7 +522,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_SEARCH_EXIT)));
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMessage + MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_SEARCH_EXIT)));
}
}
if (errorMessageList.size() > CommonConstants.ZERO_INT) {
......@@ -679,12 +680,12 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//档案有(在档人员),项目无
} else if (Common.isNotNull(tEmployeeInfo) && Common.isEmpty(tEmployeeProject)
&& CommonConstants.dingleDigitIntArray[0] == tEmployeeInfo.getFileStatus()) {
updateExcelPost(excel, updateList, tEmployeeInfo, CommonConstants.ONE_INT);
updateExcelPost(excel, updateList, tEmployeeInfo);
insertExcelPro(excel, proInsList);
//档案有(在档人员),项目有(草稿/已审核);
} else if (Common.isNotNull(tEmployeeInfo) && CommonConstants.dingleDigitIntArray[0] == tEmployeeInfo.getFileStatus()
&& Common.isNotNull(tEmployeeProject) && CommonConstants.dingleDigitIntArray[0] == tEmployeeProject.getProjectStatus()) {
updateExcelPost(excel, updateList, tEmployeeInfo, CommonConstants.ZERO_INT);
updateExcelPost(excel, updateList, tEmployeeInfo);
updateExcelPro(excel, proupdateList, tEmployeeProject);
}
......@@ -693,17 +694,17 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//档案有(离职库),项目(已减档)
if (Common.isNotNull(tEmployeeInfo) && CommonConstants.dingleDigitIntArray[1] == tEmployeeInfo.getFileStatus()
&& Common.isNotNull(tEmployeeProject) && CommonConstants.dingleDigitIntArray[1] == tEmployeeProject.getProjectStatus()) {
updateExcelPost(excel, updateList, tEmployeeInfo, CommonConstants.ZERO_INT);
updateExcelPost(excel, updateList, tEmployeeInfo);
updateExcelPro(excel, proupdateList, tEmployeeProject);
//档案有(离职库),项目无;
} else if (Common.isNotNull(tEmployeeInfo) && CommonConstants.dingleDigitIntArray[1] == tEmployeeInfo.getFileStatus()
&& Common.isEmpty(tEmployeeProject)) {
updateExcelPost(excel, updateList, tEmployeeInfo, CommonConstants.ONE_INT);
updateExcelPost(excel, updateList, tEmployeeInfo);
insertExcelPro(excel, proInsList);
//档案有(在档人员),项目(已减档)
} else if (Common.isNotNull(tEmployeeInfo) && CommonConstants.dingleDigitIntArray[0] == tEmployeeInfo.getFileStatus()
&& Common.isNotNull(tEmployeeProject) && CommonConstants.dingleDigitIntArray[1] == tEmployeeProject.getProjectStatus()) {
updateExcelPost(excel, updateList, tEmployeeInfo, CommonConstants.ZERO_INT);
updateExcelPost(excel, updateList, tEmployeeInfo);
updateExcelPro(excel, proupdateList, tEmployeeProject);
}
//不允许复档复项
......@@ -726,7 +727,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (CollUtil.isEmpty(errorMessageList)) {
try {
if (updateList.size() > CommonConstants.dingleDigitIntArray[0]) {
tEmployeeInfoMapper.updateExcelEmployeeInfo(updateList);
doJointTask.doUpdateEmployeeInfo(updateList);
}
if (proInsList.size() > CommonConstants.dingleDigitIntArray[0]) {
......@@ -968,7 +968,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
.eq(TEmployeeInfo::getDeleteFlag, CommonConstants.STATUS_NORMAL));
infoUpdList.add(tEmployeeInfo);
} else {
errorList.add(new ErrorMessage(i, delProject.getEmpName() + ";" + delProject.getEmpIdcard() + "," + delProject.getDeptNo() + ";" + "项目档案状态为已审核,禁止删除"));
errorList.add(new ErrorMessage(i, delProject.getEmpName() + ";" + delProject.getEmpIdcard() + ";" + delProject.getDeptNo() + ";" + "项目档案状态为已审核,禁止删除"));
}
} catch (Exception e) {
log.error("项目档案批量删除异常:" + e.getMessage());
......@@ -1101,17 +1101,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
/**
* 更新人员档案
*/
private void updateExcelPost(EmployeeProjectVO excel, List<TEmployeeInfo> updateList, TEmployeeInfo tEmployeeInfo, int num) {
private void updateExcelPost(EmployeeProjectVO excel, List<TEmployeeInfo> updateList, TEmployeeInfo tEmployeeInfo) {
BeanUtil.copyProperties(excel, tEmployeeInfo);
YifuUser user = SecurityUtils.getUser();
tEmployeeInfo.setUpdateBy(user.getId());
if (num == CommonConstants.ONE_INT) {
tEmployeeInfo.setProjectNum(tEmployeeInfo.getProjectNum().intValue() + CommonConstants.ONE_INT);
}
tEmployeeInfo.setFileStatus(CommonConstants.ZERO_INT);
updateList.add(tEmployeeInfo);
// 记录变更日志
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeInfo.getId());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(), "", tEmployeeInfoOld, tEmployeeInfo);
}
/**
......
......@@ -103,7 +103,7 @@
<include refid="Base_Column_List"/>,GROUP_CONCAT(distinct c.DEPT_NAME) as DEPT_NAME,GROUP_CONCAT(distinct c.UNIT_NAME) as UNIT_NAME,GROUP_CONCAT(distinct c.DEPT_NO) as DEPT_NO,GROUP_CONCAT(distinct c.EMP_NO) as EMP_NO
FROM t_elec_employee_info a
left join t_employee_info b on a.EMP_IDCARD = b.EMP_IDCARD
left join t_employee_project c on a.EMP_IDCARD = c.EMP_IDCARD
left join t_employee_project c on a.EMP_IDCARD = c.EMP_IDCARD AND c.DELETE_FLAG = '0' AND c.PROJECT_STATUS = '0'
<where>
1=1 AND a.DELETE_FLAG = '0'
<include refid="tElecEmployeeInfo_where"/>
......
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