Commit 4e1a3944 authored by hongguangwu's avatar hongguangwu

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

parents adefbf31 697b9759
......@@ -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"/>
......
......@@ -622,7 +622,7 @@
insert into t_employee_project
(ID,EMP_ID,EMP_NATRUE,EMP_NAME,EMP_IDCARD,STATUS,PROJECT_STATUS,EMP_CODE,DEPT_NO,CONTRACT_TYPE,POST,
DEPT_ID,DEPT_NAME,UNIT_ID,UNIT_NAME,UNIT_NO,EMP_NO,TRY_PERIOD,ENJOIN_DATE,BANK_NAME,BANK_NO,BANK_SUB_NAME,
DELETE_FLAG,CREATE_BY,CREATE_NAME,CREATE_TIME,INSURANCE_STATUS,SOCIAL_STATUS,FUND_STATUS)
WORKING_HOURS,DELETE_FLAG,CREATE_BY,CREATE_NAME,CREATE_TIME,INSURANCE_STATUS,SOCIAL_STATUS,FUND_STATUS)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
......@@ -648,6 +648,7 @@
#{item.bankName,jdbcType=VARCHAR},
#{item.bankNo,jdbcType=VARCHAR},
#{item.bankSubName,jdbcType=VARCHAR},
#{item.workingHours,jdbcType=VARCHAR},
#{item.deleteFlag,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR},
#{item.createName,jdbcType=VARCHAR},
......
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