|
@@ -34,6 +34,7 @@ import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.ResourceUtils;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
+import javax.print.attribute.HashDocAttributeSet;
|
|
|
import java.beans.IntrospectionException;
|
|
|
import java.io.File;
|
|
|
import java.io.FileNotFoundException;
|
|
@@ -384,20 +385,30 @@ public class OrganizationServiceImpl extends BaseServiceImpl<Integer, Organizati
|
|
|
}
|
|
|
|
|
|
if (organizationColumn.getValue().equals("roleName")) {
|
|
|
+ boolean has = false;
|
|
|
for (SysRole organRole : organRoles) {
|
|
|
if (organRole.getRoleName().equals(row.get(s).toString())) {
|
|
|
user.setRoles(organRole.getId());
|
|
|
+ has = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ if (!has) {
|
|
|
+ throw new BizException(row.get(s).toString() + "角色不存在,请核查");
|
|
|
+ }
|
|
|
}
|
|
|
if (organizationColumn.getValue().equals("settlementType")) {
|
|
|
+ boolean has = false;
|
|
|
for (SettlementTypeEnum settlementType : SettlementTypeEnum.values()) {
|
|
|
if (settlementType.getMsg().equals(row.get(s).toString())) {
|
|
|
objectMap.put("settlementType", settlementType);
|
|
|
+ has = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ if (!has) {
|
|
|
+ throw new BizException(row.get(s).toString() + "分润方式不存在,请核查");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|