Commit 29000779 authored by fangxinjiang's avatar fangxinjiang

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

parents 0922cbad 481ed42e
......@@ -162,6 +162,38 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return R.failed("根据id未找到档案!" + employeeInfo.getId());
}
// 校验手机号:
if (Common.isEmpty(employeeInfo.getEmpPhone())) {
return R.failed("手机号必填!");
} else {
TEmployeeInfo check = new TEmployeeInfo();
check.setDeleteFlag(CommonConstants.STATUS_NORMAL);
check.setEmpPhone(employeeInfo.getEmpPhone());
List<TEmployeeInfo> list = baseMapper.getList(check);
if (list != null && !list.isEmpty()) {
for (TEmployeeInfo e : list) {
if (!e.getEmpIdcard().equals(employeeInfo.getEmpIdcard())) {
return R.failed(MsgUtils.getMessage(ErrorCodes.ARCHIVES_IMPORT_EMP_PHONE_EXIST_ERROR, employeeInfo.getEmpIdcard()));
}
}
}
// 调用校验服务-校验手机号
TCheckMobile checkMobile = new TCheckMobile();
checkMobile.setMobile(employeeInfo.getEmpPhone());
R<TCheckMobile> a = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(), daprCheckProperties.getAppId()
, "/tcheckmobile/inner/checkOneMobile", checkMobile, TCheckMobile.class, SecurityConstants.FROM_IN);
if (a != null && a.getData() != null) {
checkMobile = a.getData();
if (checkMobile != null && Common.isNotNull(checkMobile.getStatus())) {
if (!CommonConstants.ONE_STRING.equals(checkMobile.getStatus())) {
return R.failed(checkMobile.getMessage());
}
} else {
return R.failed("校验服务错误,请联系管理员!");
}
}
}
employeeInfo.setUpdateBy(user.getId());
employeeInfo.setUpdateTime(LocalDateTime.now());
......
......@@ -397,6 +397,14 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
return R.failed("该人员存在其他进行中的项目,禁止同步减档!");
}
tEmployeeInfo.setFileStatus(CommonConstants.dingleDigitIntArray[1]);
tEmployeeInfo.setLeaveReason(tEmployeeProject.getLeaveReason());
if (Common.isNotNull(tEmployeeProject.getLeaveRemark())) {
tEmployeeInfo.setLeaveRemark(tEmployeeProject.getLeaveRemark());
}
tEmployeeInfo.setLeaveTime(DateUtil.getCurrentDateTime());
YifuUser user = SecurityUtils.getUser();
tEmployeeInfo.setLeaveUser(user.getId());
tEmployeeInfo.setLeaveUserName(user.getNickname());
code = CommonConstants.ONE_STRING;
} else {
//从剩下的项目档案中查找员工类型并更新
......@@ -414,11 +422,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
if (tEmployeeInfo.getProjectNum() != CommonConstants.ZERO_INT) {
tEmployeeInfo.setProjectNum(tEmployeeInfo.getProjectNum() - CommonConstants.ONE_INT);
}
tEmployeeInfo.setLeaveReason(tEmployeeProject.getLeaveReason());
if (Common.isNotNull(tEmployeeProject.getLeaveRemark())) {
tEmployeeInfo.setLeaveRemark(tEmployeeProject.getLeaveRemark());
}
tEmployeeInfo.setLeaveTime(DateUtil.getCurrentDateTime());
tEmployeeInfoMapper.updateById(tEmployeeInfo);
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], tEmployeeInfo.getId(), "", tEmployeeInfoOld, tEmployeeInfo);
......@@ -1006,7 +1009,8 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
List<TEmployeeProject> list = new ArrayList<>();
if (Common.isNotEmpty(idsList)) {
list = baseMapper.selectList(Wrappers.<TEmployeeProject>query().lambda().in(TEmployeeProject::getId, idsList));
list = baseMapper.selectList(Wrappers.<TEmployeeProject>query().lambda().in(TEmployeeProject::getId, idsList)
.eq(TEmployeeProject::getProjectStatus, CommonConstants.ZERO_INT));
}
if (Common.isNotEmpty(list)) {
int i = 0;
......
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