Просмотр исходного кода

【功能完善】+【反馈:2024080343】+【人员资料判断手机号是否重复时 排除离职人员】

DINGYL 3 недель назад
Родитель
Сommit
631b12cbd2
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/com/uas/erp/service/hr/impl/EmployeeManagerServiceImpl.java

+ 2 - 2
src/com/uas/erp/service/hr/impl/EmployeeManagerServiceImpl.java

@@ -93,7 +93,7 @@ public class EmployeeManagerServiceImpl implements EmployeeManagerService {
 		 */
 		Object em_mobile = store.get("em_mobile");
 		if (em_mobile != null && !"".equals(em_mobile) && !"0".equals(em_mobile)) {
-			int count = baseDao.getCountByCondition("Employee", "em_mobile='" + em_mobile + "'");
+			int count = baseDao.getCountByCondition("Employee", "nvl(EM_CLASS,' ')<>'离职' and em_mobile='" + em_mobile + "'");
 			if (count > 0) {
 				BaseUtil.showError("该手机号已经存在,不允许保存!");
 			}
@@ -253,7 +253,7 @@ public class EmployeeManagerServiceImpl implements EmployeeManagerService {
 		 */
 		Object em_mobile = store.get("em_mobile");
 		if (em_mobile != null && !"".equals(em_mobile) && !"0".equals(em_mobile)) {
-			int count = baseDao.getCount("select count(1) from employee where em_mobile='" + em_mobile + "' and em_id<>"
+			int count = baseDao.getCount("select count(1) from employee where nvl(EM_CLASS,' ')<>'离职' and em_mobile='" + em_mobile + "' and em_id<>"
 					+ store.get("em_id"));
 			if (count > 0) {
 				BaseUtil.showError("该手机号已被使用!");