Commit c036e161 authored by hongguangwu's avatar hongguangwu

人员档案相关-默认草稿-非草稿不可删除

parent d719012d
......@@ -156,6 +156,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
public R<String> deleteEmployee(String id) {
TEmployeeInfo employee = this.getById(id);
if (employee != null) {
if (employee.getStatus() != CommonConstants.ZERO_INT) {
return R.failed("非草稿状态,无法删除!");
}
if (employee.getContractStatus() != CommonConstants.ZERO_INT) {
return R.failed("合同状态非初始,无法删除!");
}
......@@ -198,11 +201,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
String id;
List<TEmployeeInfo> canDeleteList = new ArrayList<>();
Set<String> errorMsg;
for (int i = 0; i<idArr.length; i++) {
for (int i = 0; i < idArr.length; i++) {
errorMsg = new HashSet<>();
id = idArr[i];
employee = this.getById(id);
if (employee != null) {
if (employee.getStatus() != CommonConstants.ZERO_INT) {
errorMsg.add("身份证【"+employee.getEmpIdcard()+"】的人员:非草稿状态,无法删除");
}
if (employee.getContractStatus() != CommonConstants.ZERO_INT) {
errorMsg.add("身份证【"+employee.getEmpIdcard()+"】的人员:合同状态非初始,无法删除");
}
......
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