diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index cb0da89a9..86dbc3a69 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -1746,6 +1746,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { private Map checkJsonMap(Map newMap, String oldJson) { Map oldMap = JSON.parseObject(oldJson, HashMap.class); + Map toDelMap = new HashMap<>(); //校验newMap中的value值是否为整数或者小数 for(Map.Entry newEntry : newMap.entrySet()) { String newValue = newEntry.getValue(); @@ -1754,7 +1755,17 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { if (newValue.length() > 0 && !isNumeric(newValue)) { throw new SalaryRunTimeException("请检查导入Excel中个人或单位对应的福利项数值是否为整数或小数!"); } + + if ("".equals(newEntry.getValue())) { + toDelMap.put(newEntry.getKey(), newEntry.getValue()); + } } + if (toDelMap.size() > 0) { + for (Map.Entry delEntry : toDelMap.entrySet()) { + newMap.remove(delEntry.getKey()); + } + } + if (oldMap == null) { return newMap; @@ -1768,7 +1779,6 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } } - return newMap; }