Commit 08024472 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.7' into MVP1.7.7

parents d578d1ca b3e131aa
...@@ -3452,8 +3452,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -3452,8 +3452,16 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
// 1.9.7 : 校验年份不可为未来年份 // 1.9.7 : 校验年份不可为未来年份
if ("declareYear".equals(shuName) && Common.isNotNull(shuValue)){ if ("declareYear".equals(shuName) && Common.isNotNull(shuValue)){
Boolean isNum = true;
shuValue = shuValue.replaceAll("\\..*", ""); shuValue = shuValue.replaceAll("\\..*", "");
if(shuValue.length() == 4 && (Integer.parseInt(shuValue) > DateUtil.getYearOfInt(new Date()))){ for (char c : shuValue.toCharArray()) {
if (!Character.isDigit(c)) {
errorFormat.append(attr.name()).append("_只能是纯数字;");
isNum = false;
break;
}
}
if(isNum && shuValue.length() == 4 && (Integer.parseInt(shuValue) > DateUtil.getYearOfInt(new Date()))){
errorFormat.append(attr.name()).append("_不可为未来年份;"); errorFormat.append(attr.name()).append("_不可为未来年份;");
} }
} }
......
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