|
|
@@ -244,18 +244,18 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|
|
}
|
|
|
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
|
|
|
|
|
|
- if(info!=null && info.getDeptId()!=0L
|
|
|
- && info.getDepType()!=null && dept.getDepType()!=null
|
|
|
- && !info.getDepType().equals(dept.getDepType())){
|
|
|
- dept.setDepType(info.getDepType());
|
|
|
-// throw new ServiceException("下级部门业务类型必须和上级保持一致");
|
|
|
- }
|
|
|
- if(info!=null && info.getDeptId()!=0L
|
|
|
- && info.getOrgCode()!=null && dept.getOrgCode()!=null
|
|
|
- && !info.getOrgCode().equals(dept.getOrgCode())){
|
|
|
- dept.setOrgCode(info.getOrgCode());
|
|
|
-// throw new ServiceException("下级部门业务组织编码必须和上级保持一致");
|
|
|
- }
|
|
|
+// if(info!=null && info.getDeptId()!=0L
|
|
|
+// && info.getDepType()!=null && dept.getDepType()!=null
|
|
|
+// && !info.getDepType().equals(dept.getDepType())){
|
|
|
+// dept.setDepType(info.getDepType());
|
|
|
+//// throw new ServiceException("下级部门业务类型必须和上级保持一致");
|
|
|
+// }
|
|
|
+// if(info!=null && info.getDeptId()!=0L
|
|
|
+// && info.getOrgCode()!=null && dept.getOrgCode()!=null
|
|
|
+// && !info.getOrgCode().equals(dept.getOrgCode())){
|
|
|
+// dept.setOrgCode(info.getOrgCode());
|
|
|
+//// throw new ServiceException("下级部门业务组织编码必须和上级保持一致");
|
|
|
+// }
|
|
|
|
|
|
|
|
|
return deptMapper.insertDept(dept);
|
|
|
@@ -280,18 +280,18 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|
|
updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
|
|
|
}
|
|
|
|
|
|
- if(newParentDept!=null && newParentDept.getDeptId()!=0L
|
|
|
- && newParentDept.getDepType()!=null && dept.getDepType()!=null
|
|
|
- && !newParentDept.getDepType().equals(dept.getDepType())){
|
|
|
- dept.setDepType(newParentDept.getDepType());
|
|
|
-// throw new ServiceException("下级部门业务类型必须和上级保持一致");
|
|
|
- }
|
|
|
- if(newParentDept!=null && newParentDept.getDeptId()!=0L
|
|
|
- && dept.getOrgCode()!=null && dept.getOrgCode()!=null
|
|
|
- && !newParentDept.getOrgCode().equals(dept.getOrgCode())){
|
|
|
- dept.setOrgCode(newParentDept.getOrgCode());
|
|
|
-// throw new ServiceException("下级部门业务组织编码必须和上级保持一致");
|
|
|
- }
|
|
|
+// if(newParentDept!=null && newParentDept.getDeptId()!=0L
|
|
|
+// && newParentDept.getDepType()!=null && dept.getDepType()!=null
|
|
|
+// && !newParentDept.getDepType().equals(dept.getDepType())){
|
|
|
+// dept.setDepType(newParentDept.getDepType());
|
|
|
+//// throw new ServiceException("下级部门业务类型必须和上级保持一致");
|
|
|
+// }
|
|
|
+// if(newParentDept!=null && newParentDept.getDeptId()!=0L
|
|
|
+// && dept.getOrgCode()!=null && dept.getOrgCode()!=null
|
|
|
+// && !newParentDept.getOrgCode().equals(dept.getOrgCode())){
|
|
|
+// dept.setOrgCode(newParentDept.getOrgCode());
|
|
|
+//// throw new ServiceException("下级部门业务组织编码必须和上级保持一致");
|
|
|
+// }
|
|
|
|
|
|
int result = deptMapper.updateDept(dept);
|
|
|
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()) && StringUtils.isNotEmpty(dept.getAncestors())
|