|
@@ -345,9 +345,28 @@ public class OrgServiceImpl implements OrgService {
|
|
|
msg.append(" 课程代码不能超过30个字符");
|
|
|
hasError = true;
|
|
|
}
|
|
|
-
|
|
|
org.setCode(code);
|
|
|
|
|
|
+ String contacts = trimAndNullIfBlank(line[2]);
|
|
|
+ if (StringUtils.isBlank(contacts)) {
|
|
|
+ msg.append(" 联系人不能为空");
|
|
|
+ hasError = true;
|
|
|
+ } else if (contacts.length() > 30) {
|
|
|
+ msg.append(" 联系人不能超过30个字符");
|
|
|
+ hasError = true;
|
|
|
+ }
|
|
|
+ org.setContacts(contacts);
|
|
|
+
|
|
|
+ String telephone = trimAndNullIfBlank(line[3]);
|
|
|
+ if (StringUtils.isBlank(telephone)) {
|
|
|
+ msg.append(" 联系人不能为空");
|
|
|
+ hasError = true;
|
|
|
+ } else if (telephone.length() > 30) {
|
|
|
+ msg.append(" 联系人不能超过30个字符");
|
|
|
+ hasError = true;
|
|
|
+ }
|
|
|
+ org.setTelephone(telephone);
|
|
|
+
|
|
|
if (hasError) {
|
|
|
failRecords.add(newError(i + 1, msg.toString()));
|
|
|
} else {
|
|
@@ -363,14 +382,15 @@ public class OrgServiceImpl implements OrgService {
|
|
|
for (OrgEntity cur : courseList) {
|
|
|
OrgInfo info = new OrgInfo();
|
|
|
info.setCode(cur.getCode());
|
|
|
- info.setParentId(cur.getParentId());
|
|
|
- info.setRootId(cur.getRootId());
|
|
|
+ info.setParentId(rootOrgId);
|
|
|
+ info.setRootId(rootOrgId);
|
|
|
|
|
|
info.setName(cur.getName());
|
|
|
info.setContacts(cur.getContacts());
|
|
|
info.setTelephone(cur.getTelephone());
|
|
|
- info.setRemark(cur.getRemark());
|
|
|
+
|
|
|
OrgEntity saved = saveSubOrg(info);
|
|
|
+
|
|
|
createLearnerCenterUser(saved);
|
|
|
}
|
|
|
|