Commit 38f78674 by shiwenbo

使用前端发请求的方式来处理集团自动关联部门的过程

parent 39cc872e
......@@ -53,7 +53,6 @@ public class OrganizationDataInitializer implements DataInitializer {
kObject.set(BaseConstants.CREATE_TIME, new Date());
dinasOrganizationService.save(kObject);
saveFollower(kObject);
dinasOrganizationService.createRelDepartment(kObject.getUuid("id"));
} else{
KObject organizationByName = dinasOrganizationService.queryOrganizationByName(kObject.getString("name"));
saveFollower(organizationByName);
......
......@@ -107,10 +107,7 @@ public class DinasOrganizationServiceImpl implements DinasOrganizationService {
department.set("orgId", quangongsi.getUuid("orgId"));
department.set("level", 1);
department.set("createTime", new Date());
KObject staff = getCurrentLoginStaff();
if(staff != null) {
department.set("createUser", staff.getUuid("id"));
}
department.set("createUser", getCurrentLoginStaff().getUuid("id"));
department.set("paths", quangongsi.getString("paths") + "$" + department.getUuid("id"));
department.set("enable", true);
departmentService.create(department);
......@@ -120,9 +117,6 @@ public class DinasOrganizationServiceImpl implements DinasOrganizationService {
}
private KObject getCurrentLoginStaff(){
if(RequestContextHolder.getRequestAttributes() == null) {
return null;
}
String currentStaff = (String) ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes())
.getRequest().getSession().getAttribute("currentStaff");
if (null == currentStaff || currentStaff.trim().length() == 0 ) {
......
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