|
|
@@ -1,14 +1,15 @@
|
|
|
package com.zhongshu.card.server.core.service.user;
|
|
|
|
|
|
-import com.zhongshu.card.client.model.org.DepartmentModel;
|
|
|
-import com.zhongshu.card.client.model.org.DepartmentParam;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
|
import com.github.microservice.net.ResultMessage;
|
|
|
+import com.zhongshu.card.client.model.org.DepartmentModel;
|
|
|
+import com.zhongshu.card.client.model.org.DepartmentParam;
|
|
|
+import com.zhongshu.card.client.model.org.DepartmentSimpleModel;
|
|
|
import com.zhongshu.card.client.model.org.OidAboutInfo;
|
|
|
import com.zhongshu.card.client.service.org.DepartmentService;
|
|
|
+import com.zhongshu.card.client.type.DataState;
|
|
|
import com.zhongshu.card.client.utils.ITree;
|
|
|
import com.zhongshu.card.client.utils.TreeUtil;
|
|
|
-import com.zhongshu.card.client.type.DataState;
|
|
|
import com.zhongshu.card.server.core.dao.org.DepartmentDao;
|
|
|
import com.zhongshu.card.server.core.domain.org.Department;
|
|
|
import com.zhongshu.card.server.core.domain.org.Organization;
|
|
|
@@ -19,7 +20,6 @@ import com.zhongshu.card.server.core.util.CommonUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.kafka.common.protocol.types.Field;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@@ -201,4 +201,14 @@ public class DepartmentServiceImpl extends SuperService implements DepartmentSer
|
|
|
}
|
|
|
return model;
|
|
|
}
|
|
|
+
|
|
|
+ public DepartmentSimpleModel toSimpleModel(Department entity) {
|
|
|
+ DepartmentSimpleModel model = null;
|
|
|
+ if (ObjectUtils.isNotEmpty(entity)) {
|
|
|
+ model = new DepartmentSimpleModel();
|
|
|
+ BeanUtils.copyProperties(entity, model);
|
|
|
+ }
|
|
|
+ return model;
|
|
|
+ }
|
|
|
+
|
|
|
}
|