Commit d5f6f8fb authored by hongguangwu's avatar hongguangwu

1.7.21-r

parent 484295d0
...@@ -33,6 +33,8 @@ public class RegistConstants { ...@@ -33,6 +33,8 @@ public class RegistConstants {
public static final String BACK_RECEIVE = "拒绝入职"; public static final String BACK_RECEIVE = "拒绝入职";
public static final String IS_LEAVE = "已确认离职"; public static final String IS_LEAVE = "已确认离职";
public static final String HAVE_LEAVING = "该项目存在未完结的自动化离职信息,请处理完毕后,再次入离职登记!";
public static final String NO_ID_DEPT = "身份证与项目编码不可为空!!";
// //
public static final String BASE_REASON_TYPE = "1"; public static final String BASE_REASON_TYPE = "1";
......
...@@ -50,5 +50,8 @@ public interface EmployeeRegistrationMapper extends BaseMapper<EmployeeRegistrat ...@@ -50,5 +50,8 @@ public interface EmployeeRegistrationMapper extends BaseMapper<EmployeeRegistrat
List<EmployeeRegistration> selectRegistrationListBySure(@Param("idList") List<String> idList); List<EmployeeRegistration> selectRegistrationListBySure(@Param("idList") List<String> idList);
// 查询是否有处理中的离职信息,如果有,不允许再次登记入离职
int getEmployeeRegistrationLeavingCount(@Param("idCard") String idCard, @Param("idCard") String deptNo);
} }
...@@ -1929,6 +1929,14 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1929,6 +1929,14 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
return RegistConstants.EMP_PROJECT_EXIT_CHECK; return RegistConstants.EMP_PROJECT_EXIT_CHECK;
} }
} }
if (Common.isNotNull(registration.getEmpIdcard()) && Common.isNotNull(registration.getDeptNo())) {
int count = baseMapper.getEmployeeRegistrationLeavingCount(registration.getEmpIdcard(), registration.getDeptNo());
if (count > 0) {
return RegistConstants.HAVE_LEAVING;
}
} else {
return RegistConstants.NO_ID_DEPT;
}
return null; return null;
} }
......
...@@ -427,4 +427,14 @@ ...@@ -427,4 +427,14 @@
</if> </if>
</select> </select>
<!--查询是否有处理中的离职信息,如果有,不允许再次登记入离职-->
<select id="getEmployeeRegistrationLeavingCount" resultMap="employeeRegistrationMap">
SELECT
count(1)
FROM employee_registration a
join employee_registration_leave b on a.id = b.id
where a.emp_idcard = #{idCard} AND a.dept_no = #{deptNo} and b.leave_status != '3'
</select>
</mapper> </mapper>
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