|
@ -134,7 +134,9 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
SysDeptEntity entity = ConvertUtils.sourceToTarget(dto, SysDeptEntity.class); |
|
|
SysDeptEntity entity = ConvertUtils.sourceToTarget(dto, SysDeptEntity.class); |
|
|
|
|
|
if (!entity.getAllAreaCode().isEmpty()) { |
|
|
|
|
|
entity.setParentAreaCode(entity.getAllAreaCode().substring(0, entity.getAllAreaCode().lastIndexOf(","))); |
|
|
|
|
|
} |
|
|
entity.setPids(getPidList(entity.getPid())); |
|
|
entity.setPids(getPidList(entity.getPid())); |
|
|
insert(entity); |
|
|
insert(entity); |
|
|
|
|
|
|
|
@ -161,7 +163,9 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit |
|
|
if (entity.getId().equals(entity.getPid())) { |
|
|
if (entity.getId().equals(entity.getPid())) { |
|
|
throw new RenException(ErrorCode.SUPERIOR_DEPT_ERROR); |
|
|
throw new RenException(ErrorCode.SUPERIOR_DEPT_ERROR); |
|
|
} |
|
|
} |
|
|
|
|
|
if (!entity.getAllAreaCode().isEmpty()) { |
|
|
|
|
|
entity.setParentAreaCode(entity.getAllAreaCode().substring(0, entity.getAllAreaCode().lastIndexOf(","))); |
|
|
|
|
|
} |
|
|
entity.setPids(getPidList(entity.getPid())); |
|
|
entity.setPids(getPidList(entity.getPid())); |
|
|
|
|
|
|
|
|
// 发送消息
|
|
|
// 发送消息
|
|
|