Commit e2aa6207 authored by huyuchen's avatar huyuchen

假勤信息优化修改

parent 8c1099cf
...@@ -181,7 +181,9 @@ public class TBusLeaveController { ...@@ -181,7 +181,9 @@ public class TBusLeaveController {
map.put(tBusLeave.getTeleNo(), tBusLeave.getName()); map.put(tBusLeave.getTeleNo(), tBusLeave.getName());
} }
} }
if (Common.isEmpty(tBusLeave.getLeaveDate()) || Common.isEmpty(tBusLeave.getLeavePostDate()) if (Common.isEmpty(tBusLeave.getTeleNo())) {
errorList.add(new ErrorMessage(i, "'" + "'电信工号不可为空!"));
} else if (Common.isEmpty(tBusLeave.getLeaveDate()) || Common.isEmpty(tBusLeave.getLeavePostDate())
|| Common.isEmpty(tBusLeave.getLeaveReason()) || tBusLeave.getLeaveReason().length() > 200) { || Common.isEmpty(tBusLeave.getLeaveReason()) || tBusLeave.getLeaveReason().length() > 200) {
// 判断并拦截 // 判断并拦截
this.judgeLeave(errorList, i, tBusLeave); this.judgeLeave(errorList, i, tBusLeave);
...@@ -209,27 +211,22 @@ public class TBusLeaveController { ...@@ -209,27 +211,22 @@ public class TBusLeaveController {
**/ **/
private void judgeLeave(List<ErrorMessage> errorList, int i, TBusLeave tBusLeave) { private void judgeLeave(List<ErrorMessage> errorList, int i, TBusLeave tBusLeave) {
String error; String error;
if (Common.isEmpty(tBusLeave.getTeleNo())) { if (Common.isEmpty(tBusLeave.getLeaveDate())) {
error = "'" + "'电信工号为空,无法导入!"; error = "'" + tBusLeave.getTeleNo() + "'工号无离职日期,无法导入!";
errorList.add(new ErrorMessage(i, error)); errorList.add(new ErrorMessage(i, error));
} else { }
if (Common.isEmpty(tBusLeave.getLeaveDate())) { if (Common.isEmpty(tBusLeave.getLeavePostDate())) {
error = "'" + tBusLeave.getTeleNo() + "'工号无离职日期,无法导入!"; error = "'" + tBusLeave.getTeleNo() + "'工号无离岗日期,无法导入!";
errorList.add(new ErrorMessage(i, error)); errorList.add(new ErrorMessage(i, error));
} }
if (Common.isEmpty(tBusLeave.getLeavePostDate())) { if (Common.isEmpty(tBusLeave.getLeaveReason())) {
error = "'" + tBusLeave.getTeleNo() + "'工号无离岗日期,无法导入!"; error = "'" + tBusLeave.getTeleNo() + "'工号无离职原因,无法导入!";
errorList.add(new ErrorMessage(i, error)); errorList.add(new ErrorMessage(i, error));
} }
if (Common.isEmpty(tBusLeave.getLeaveReason())) { if (Common.isNotNull(tBusLeave.getLeaveReason()) && tBusLeave.getLeaveReason().length() > 200) {
error = "'" + tBusLeave.getTeleNo() + "'工号无离职原因,无法导入!"; error = "'" + tBusLeave.getTeleNo() + "'工号离职原因超过200字符,无法导入!";
errorList.add(new ErrorMessage(i, error)); errorList.add(new ErrorMessage(i, error));
} }
if (Common.isNotNull(tBusLeave.getLeaveReason()) && tBusLeave.getLeaveReason().length() > 200) {
error = "'" + tBusLeave.getTeleNo() + "'工号离职原因超过200字符,无法导入!";
errorList.add(new ErrorMessage(i, error));
}
}
} }
/** /**
...@@ -269,9 +266,6 @@ public class TBusLeaveController { ...@@ -269,9 +266,6 @@ public class TBusLeaveController {
error = "电信工号未匹配到人员附属信息:'" + tBusLeave.getTeleNo() + "'"; error = "电信工号未匹配到人员附属信息:'" + tBusLeave.getTeleNo() + "'";
errorList.add(new ErrorMessage(i, error)); errorList.add(new ErrorMessage(i, error));
} }
} else {
error = "电信工号不可为空!";
errorList.add(new ErrorMessage(i, error));
} }
} }
......
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