Commit 44e53e33 authored by huyuchen's avatar huyuchen

划转和减项判断社保公积金状态修改

parent 6bf81332
......@@ -89,6 +89,11 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL).eq(TEmployeeProject::getProjectStatus,CommonConstants.ZERO_INT));
if (Common.isNotNull(updateTEmployeeProject)) {
if (updateTEmployeeProject.getSocialStatus() == CommonConstants.dingleDigitIntArray[1] ||
updateTEmployeeProject.getFundStatus() == CommonConstants.dingleDigitIntArray[1]) {
return R.failed("人员在原项目中存在在途的服务,请先终止后,再进行划转");
}
TSettleDomain tSettleDomain = tSettleDomainMapper.selectOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmpChangeInfo.getDeptNo()).eq(TSettleDomain::getDepartName, tEmpChangeInfo.getNewSettle())
.eq(TSettleDomain::getDeleteFlag, CommonConstants.ZERO_STRING).eq(TSettleDomain::getStopFlag, CommonConstants.ZERO_STRING));
......@@ -172,6 +177,10 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
.eq(TEmployeeProject::getEmpIdcard, excel.getEmpIdcard()).eq(TEmployeeProject::getDeptNo,excel.getOldSettleCode())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(updateTEmployeePro)) {
if (updateTEmployeePro.getSocialStatus() == CommonConstants.dingleDigitIntArray[1] ||
updateTEmployeePro.getFundStatus() == CommonConstants.dingleDigitIntArray[1]) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.QT_PROJECT_CHANGE_NOT_EXIST, excel.getOldSettleCode()));
}
if (CommonConstants.ONE_INT == updateTEmployeePro.getProjectStatus()) {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.PROJECT_PERSON_DELETE_EXIT, excel.getOldSettleCode()));
} else if (Common.isNotNull(tSettleDomain)) {
......
......@@ -188,7 +188,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
check.setBankNo(tEmployeeProject.getBankNo());
check.setIdNum(tEmployeeProject.getEmpIdcard());
check.setName(tEmployeeProject.getEmpName());
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
R<CheckBankNoVo> checkListR = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(),
daprCheckProperties.getAppId()
, "/tcheckbankno/inner/checkBankNo", check, CheckBankNoVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
CheckBankNoVo vo = checkListR.getData();
......@@ -209,7 +210,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//获取项目和单位信息
TSettleDomain tSettleDomain = tSettleDomainService.getOne(Wrappers.<TSettleDomain>query().lambda()
.eq(TSettleDomain::getDepartNo, tEmployeeProject.getDeptNo()).eq(TSettleDomain::getDeleteFlag, CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getDepartNo, tEmployeeProject.getDeptNo()).eq(TSettleDomain::getDeleteFlag,
CommonConstants.STATUS_NORMAL)
.eq(TSettleDomain::getStopFlag, CommonConstants.STATUS_NORMAL));
if (Common.isNotNull(tSettleDomain)) {
tEmployeeProject.setDeptId(tSettleDomain.getId());
......@@ -230,12 +232,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (CommonConstants.ZERO_STRING.equals(tEmployeeProject.getEmpNatrue())) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ZERO_STRING);
} else if (CommonConstants.ONE_STRING.equals(tEmployeeProject.getEmpNatrue()) && !CommonConstants.ZERO_STRING.equals(tEmployeeInfo.getEmpNatrue())) {
} else if (CommonConstants.ONE_STRING.equals(tEmployeeProject.getEmpNatrue()) &&
!CommonConstants.ZERO_STRING.equals(tEmployeeInfo.getEmpNatrue())) {
tEmployeeInfo.setEmpNatrue(CommonConstants.ONE_STRING);
}
tEmployeeInfo.setProjectNum(tEmployeeInfo.getProjectNum().intValue() + CommonConstants.ONE_INT);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfoCompare.getId(), "", tEmployeeInfoCompare, tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],
tEmployeeInfoCompare.getId(), "", tEmployeeInfoCompare, tEmployeeInfo);
return R.ok();
}
return R.failed("未在人员档案中查到身份信息");
......@@ -292,9 +296,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
tEmployeeInfoMapper.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfoCompare.getId(), "", tEmployeeInfoCompare, tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],
tEmployeeInfoCompare.getId(), "", tEmployeeInfoCompare, tEmployeeInfo);
}
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProject.getId(), compareProject, newProject);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "",
tEmployeeProject.getId(), compareProject, newProject);
return R.ok(flag);
}
......@@ -306,7 +312,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
//对比对象
TEmployeeProject compareProject = this.getById(id);
if (tEmployeeProject.getInsuranceStatus() != CommonConstants.dingleDigitIntArray[0] || tEmployeeProject.getSocialStatus() != CommonConstants.dingleDigitIntArray[0] ||
if (tEmployeeProject.getInsuranceStatus() != CommonConstants.dingleDigitIntArray[0] ||
tEmployeeProject.getSocialStatus() != CommonConstants.dingleDigitIntArray[0] ||
tEmployeeProject.getFundStatus() != CommonConstants.dingleDigitIntArray[0]) {
return R.failed("人员在该项目下存在进行中/未完结的服务,禁止删除");
......@@ -317,7 +324,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
baseMapper.updateById(tEmployeeProject);
//更新操作记录
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProject.getId(), compareProject, tEmployeeProject);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "",
tEmployeeProject.getId(), compareProject, tEmployeeProject);
List<TEmployeeInfo> updList = new ArrayList<>();
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
......@@ -347,7 +355,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(empId);
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[0]);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], empId, "", tEmployeeInfoOld, tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], empId,
"", tEmployeeInfoOld, tEmployeeInfo);
} else if (Common.isEmpty(empId) && !Common.isEmpty(empProId)) {
//复项
tEmployeeProjectOld = this.getById(empProId);
......@@ -381,9 +390,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
tEmployeeInfo.setProjectNum(tEmployeeInfo.getProjectNum() + CommonConstants.ONE_INT);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(), "", tEmployeeInfoOld, tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0],
tEmployeeInfo.getId(), "", tEmployeeInfoOld, tEmployeeInfo);
}
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", empProId, tEmployeeProjectOld, tEmployeeProject);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],
"", empProId, tEmployeeProjectOld, tEmployeeProject);
} else {
tEmployeeInfoOld = tEmployeeInfoMapper.selectById(empId);
tEmployeeProjectOld = this.getById(empProId);
......@@ -391,7 +402,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeProject tEmployeeProject = this.getById(empProId);
tEmployeeProject.setProjectStatus(CommonConstants.dingleDigitIntArray[0]);
this.updateById(tEmployeeProject);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", empProId, tEmployeeProjectOld, tEmployeeProject);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1],
"", empProId, tEmployeeProjectOld, tEmployeeProject);
TEmployeeInfo tEmployeeInfo = tEmployeeInfoMapper.selectById(empId);
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[0]);
......@@ -415,7 +427,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
tEmployeeInfo.setProjectNum(CommonConstants.ONE_INT);
tEmployeeInfoMapper.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], empId, "", tEmployeeInfoOld, tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], empId,
"", tEmployeeInfoOld, tEmployeeInfo);
}
} else {
return R.failed("传参为空!");
......@@ -425,16 +438,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Override
public R deleteEmpPro(TEmployeeProject tEmployeeProject) {
Long count = this.count(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getId, tEmployeeProject.getId())
.eq(TEmployeeProject::getInsuranceStatus, CommonConstants.dingleDigitIntArray[0])
.eq(TEmployeeProject::getSocialStatus, CommonConstants.dingleDigitIntArray[0])
.eq(TEmployeeProject::getFundStatus, CommonConstants.dingleDigitIntArray[0]));
if (count == CommonConstants.ONE_INT) {
if (Common.isNotNull(tEmployeeProject)) {
TEmployeeInfo tEmployeeInfoOld = tEmployeeInfoMapper.selectById(tEmployeeProject.getEmpId());
TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId());
String code = "";
if (Common.isNotNull(tEmployeeProject)) {
if (CommonConstants.ONE_INT == tEmployeeProject.getSocialStatus()
|| CommonConstants.ONE_INT == tEmployeeProject.getFundStatus()
|| CommonConstants.ZERO_INT != tEmployeeProject.getInsuranceStatus()) {
return R.failed("人员在该项目下存在进行中/未完结的服务");
}
tEmployeeProject.setProjectStatus(CommonConstants.dingleDigitIntArray[1]);
tEmployeeProject.setLeaveTime(LocalDateTime.now());
this.updateById(tEmployeeProject);
......@@ -481,16 +493,17 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeInfoMapper.updateById(tEmployeeInfo);
TEmployeeProject newInfo = this.getById(tEmployeeProject.getId());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(), "", tEmployeeInfoOld, tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProject.getId(), tEmployeeProjectOld, newInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(),
"", tEmployeeInfoOld, tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "",
tEmployeeProject.getId(), tEmployeeProjectOld, newInfo);
if (CommonConstants.ONE_STRING.equals(code)) {
return R.ok(null, "减项减档成功");
} else {
return R.ok(null, "减项成功,项目状态已更新为“已减项”");
}
}
}
return R.failed("人员在该项目下存在进行中/未完结的服务");
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
@Override
......@@ -575,7 +588,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 调用字典服务,渲染字典值
R<Map<String, Map<String, Map<String, String>>>> dictR = HttpDaprUtil.invokeMethodPost(daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId()
R<Map<String, Map<String, Map<String, String>>>> dictR = HttpDaprUtil.invokeMethodPost(
daprUpmsProperties.getAppUrl(), daprUpmsProperties.getAppId()
, "/dict/inner/getDictToValue", null, Map.class, SecurityConstants.FROM_IN);
Map<String, Map<String, Map<String, String>>> dictDataMap;
Map<String, Map<String, String>> dictMap;
......@@ -610,9 +624,11 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
errorMessage = errorMessage.concat(" ").concat(";");
}
if (Common.isNotNull(tEmployeeProject)) {
if (tEmployeeProject.getInsuranceStatus() != CommonConstants.dingleDigitIntArray[0] || tEmployeeProject.getSocialStatus() != CommonConstants.dingleDigitIntArray[0] ||
tEmployeeProject.getFundStatus() != CommonConstants.dingleDigitIntArray[0]) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMessage + MsgUtils.getMessage(ErrorCodes.ARCHIVES_PROJECT_CHANGE_NOT_EXIST)));
if (tEmployeeProject.getInsuranceStatus() != CommonConstants.dingleDigitIntArray[0] ||
tEmployeeProject.getSocialStatus() == CommonConstants.dingleDigitIntArray[1] ||
tEmployeeProject.getFundStatus() == CommonConstants.dingleDigitIntArray[1]) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMessage +
MsgUtils.getMessage(ErrorCodes.ARCHIVES_PROJECT_CHANGE_NOT_EXIST)));
} else {
TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId());
tEmployeeProject.setProjectStatus(CommonConstants.dingleDigitIntArray[1]);
......@@ -633,7 +649,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
} else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMessage + 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) {
......@@ -1143,7 +1160,8 @@ 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());
......@@ -1295,7 +1313,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
proupdateList.add(tEmployeeProject);
// 记录变更日志
TEmployeeProject tEmployeeProjectOld = this.getById(tEmployeeProject.getId());
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProject.getId(), tEmployeeProjectOld, tEmployeeProject);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "",
tEmployeeProject.getId(), tEmployeeProjectOld, tEmployeeProject);
}
/**
......
......@@ -300,7 +300,7 @@ public interface ErrorCodes {
*/
String ARCHIVES_PROJECT_CHANGE_NOT_EXIST = "archives.project.change.not.exist";
/**
* 该人员存在其他进行中的项目,禁止同步减档!
* 人员在原项目中存在在途的服务,请先终止后,再进行划转
*/
String QT_PROJECT_CHANGE_NOT_EXIST = "qt.project.change.not.exist";
/**
......
......@@ -99,7 +99,7 @@ archives.project.change.not.exist=\u4EBA\u5458\u5728\u8BE5\u9879\u76EE\u4E0B\u5B
archives.project.emp.lose.fee.not.empty=\u4E0D\u826F\u8BB0\u5F55\u8D39\u7528\u635F\u5931\u548C\u5176\u4ED6\u635F\u5931\u4E0D\u53EF\u540C\u65F6\u4E3A\u7A7A
qt.project.change.not.exist=\u8BE5\u4EBA\u5458\u5B58\u5728\u5176\u4ED6\u8FDB\u884C\u4E2D\u7684\u9879\u76EE\uFF0C\u7981\u6B62\u540C\u6B65\u51CF\u6863
qt.project.change.not.exist=\u4EBA\u5458\u5728\u539F\u9879\u76EE\u4E2D\u5B58\u5728\u5728\u9014\u7684\u670D\u52A1\uFF0C\u8BF7\u5148\u7EC8\u6B62\u540E\uFF0C\u518D\u8FDB\u884C\u5212\u8F6C
project.search.not.exist=\u672A\u627E\u5230\u5BF9\u5E94\u7684\u9879\u76EE\uFF0C\u8BF7\u6838\u5B9E
change.strat.month.exit=\u5212\u8F6C\u8D77\u59CB\u6708\u4E0D\u80FD\u4E3A\u7A7A
......
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