diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PermissionReadingDataWindowValidateEvent.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PermissionReadingDataWindowValidateEvent.java index d880feea..2fdc0f3e 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PermissionReadingDataWindowValidateEvent.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PermissionReadingDataWindowValidateEvent.java @@ -5,6 +5,7 @@ import com.actionsoft.bpms.commons.database.RowMap; import com.actionsoft.bpms.dw.exec.event.ideimport.DataWindowValidateImport; import com.actionsoft.bpms.server.UserContext; import com.actionsoft.bpms.util.DBSql; +import org.apache.commons.lang.StringUtils; import java.util.List; import java.util.Map; @@ -33,22 +34,24 @@ public class PermissionReadingDataWindowValidateEvent extends DataWindowValidate * @author wangpf */ private void mapNameSToIds(BO bo, Map map, String permTypeName, int type) { - String[] names = permTypeName.split("\\s+|\\.|\\,|\\,|@"); - String ids = ""; - for (String name : names) { - String sql = generateSqlByType(type, name); - List maps = DBSql.getMaps(sql); - if (maps != null && maps.size() == 1) { - ids += maps.get(0).getString("ID") + ","; - } else { - if (type == 0) { - map.put("ORGPERM", "【" + name + "】,名称错误,请检查后再导入"); - } - if (type == 1) { - map.put("POSTPERM", "【" + name + "】,名称错误,请检查后再导入"); - } - if (type == 2) { - map.put("LEVELPERM", "【" + name + "】,名称错误,请检查后再导入"); + if (StringUtils.isNotEmpty(permTypeName)) { + String[] names = permTypeName.split("\\s+|\\.|\\,|\\,|@"); + String ids = ""; + for (String name : names) { + String sql = generateSqlByType(type, name); + List maps = DBSql.getMaps(sql); + if (maps != null && maps.size() == 1) { + ids += maps.get(0).getString("ID") + ","; + } else { + if (type == 0) { + map.put("ORGPERM", "【" + name + "】,名称错误,请检查后再导入"); + } + if (type == 1) { + map.put("POSTPERM", "【" + name + "】,名称错误,请检查后再导入"); + } + if (type == 2) { + map.put("LEVELPERM", "【" + name + "】,名称错误,请检查后再导入"); + } } } }