|
@@ -132,6 +132,8 @@ public class OrgController extends ControllerSupport {
|
|
d.setRootId(next.getRootId());
|
|
d.setRootId(next.getRootId());
|
|
d.setTelephone(next.getTelephone());
|
|
d.setTelephone(next.getTelephone());
|
|
d.setDomainName(next.getDomainName());
|
|
d.setDomainName(next.getDomainName());
|
|
|
|
+ d.setCreationTime(next.getCreationTime());
|
|
|
|
+ d.setUpdateTime(next.getUpdateTime());
|
|
}
|
|
}
|
|
|
|
|
|
PageInfo<OrgDomain> ret = new PageInfo<OrgDomain>();
|
|
PageInfo<OrgDomain> ret = new PageInfo<OrgDomain>();
|
|
@@ -191,6 +193,10 @@ public class OrgController extends ControllerSupport {
|
|
@RequestParam(required = false) String code,
|
|
@RequestParam(required = false) String code,
|
|
@RequestParam(required = false) String name) {
|
|
@RequestParam(required = false) String name) {
|
|
|
|
|
|
|
|
+ if (null == parentId) {
|
|
|
|
+ throw new StatusException("B-001249", "parentId is null");
|
|
|
|
+ }
|
|
|
|
+
|
|
OrgEntity parentOrg = orgRepo.findOne(parentId);
|
|
OrgEntity parentOrg = orgRepo.findOne(parentId);
|
|
if (null == parentOrg) {
|
|
if (null == parentOrg) {
|
|
throw new StatusException("B-001250", "parentId is wrong");
|
|
throw new StatusException("B-001250", "parentId is wrong");
|
|
@@ -230,6 +236,8 @@ public class OrgController extends ControllerSupport {
|
|
d.setRemark(next.getRemark());
|
|
d.setRemark(next.getRemark());
|
|
d.setRootId(next.getRootId());
|
|
d.setRootId(next.getRootId());
|
|
d.setTelephone(next.getTelephone());
|
|
d.setTelephone(next.getTelephone());
|
|
|
|
+ d.setCreationTime(next.getCreationTime());
|
|
|
|
+ d.setUpdateTime(next.getUpdateTime());
|
|
}
|
|
}
|
|
|
|
|
|
PageInfo<OrgDomain> ret = new PageInfo<OrgDomain>();
|
|
PageInfo<OrgDomain> ret = new PageInfo<OrgDomain>();
|
|
@@ -482,11 +490,6 @@ public class OrgController extends ControllerSupport {
|
|
|
|
|
|
User accessUser = getAccessUser();
|
|
User accessUser = getAccessUser();
|
|
|
|
|
|
- OrgEntity subOrg = orgRepo.findByRootIdAndCode(accessUser.getRootOrgId(), domain.getCode());
|
|
|
|
- if (null != subOrg) {
|
|
|
|
- throw new StatusException("B-140001", "机构代码已存在");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
OrgInfo info = new OrgInfo();
|
|
OrgInfo info = new OrgInfo();
|
|
info.setCode(domain.getCode());
|
|
info.setCode(domain.getCode());
|
|
info.setName(domain.getName());
|
|
info.setName(domain.getName());
|