diff --git a/src/main/java/aiyh/utils/httpUtil/HttpMultipartFile.java b/src/main/java/aiyh/utils/httpUtil/HttpMultipartFile.java new file mode 100644 index 0000000..0d7f2fa --- /dev/null +++ b/src/main/java/aiyh/utils/httpUtil/HttpMultipartFile.java @@ -0,0 +1,35 @@ +package aiyh.utils.httpUtil; + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +import java.io.InputStream; + +/** + *
create: 2022-11-21 11:54
+ * + * @author youHong.ai + */ + +@Setter +@Getter +@ToString +public class HttpMultipartFile { + /** + * 文件名 + */ + String fileName; + /** + * 上传文件的key + */ + String fileKey; + /** + * 文件流信息 + */ + InputStream stream; + + Long fileSize; +} diff --git a/src/main/java/com/api/youhong/ai/pcn/organization/orgchart/controller/OrgChartController.java b/src/main/java/com/api/youhong/ai/pcn/organization/orgchart/controller/OrgChartController.java new file mode 100644 index 0000000..f07666b --- /dev/null +++ b/src/main/java/com/api/youhong/ai/pcn/organization/orgchart/controller/OrgChartController.java @@ -0,0 +1,42 @@ +package com.api.youhong.ai.pcn.organization.orgchart.controller; + +import aiyh.utils.ApiResult; +import com.api.youhong.ai.pcn.organization.orgchart.service.OrgChartService; +import com.api.youhong.ai.pcn.organization.orgchart.vo.OrgChartNodeVo; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import java.util.List; + +/** + *create: 2022-12-01 11:58
+ * + * @author youHong.ai + */ + +@Path("/aiyh/orgchart/") +public class OrgChartController { + + private final OrgChartService service = new OrgChartService(); + + + @Path("get") + @GET + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + public String getOrgChartTree(@Context HttpServletRequest request, @Context HttpServletResponse response) { + User logInUser = HrmUserVarify.getUser(request, response); + Listcreate: 2022-12-01 12:14
+ * + * @author youHong.ai + */ + +@SqlMapper +public interface OrgChartMapper { + + + @Select("select * from hrmresource") + Listcreate: 2022-12-01 15:10
+ * + * @author youHong.ai + */ + +@Setter +@Getter +@ToString +public class HrmResource { +} diff --git a/src/main/java/com/api/youhong/ai/pcn/organization/orgchart/service/OrgChartService.java b/src/main/java/com/api/youhong/ai/pcn/organization/orgchart/service/OrgChartService.java new file mode 100644 index 0000000..5a3b552 --- /dev/null +++ b/src/main/java/com/api/youhong/ai/pcn/organization/orgchart/service/OrgChartService.java @@ -0,0 +1,32 @@ +package com.api.youhong.ai.pcn.organization.orgchart.service; + +import aiyh.utils.Util; +import com.api.youhong.ai.pcn.organization.orgchart.mapper.OrgChartMapper; +import com.api.youhong.ai.pcn.organization.orgchart.vo.OrgChartNodeVo; +import weaver.hrm.User; + +import java.util.List; + +/** + *create: 2022-12-01 12:00
+ * + * @author youHong.ai + */ + +public class OrgChartService { + + private final OrgChartMapper mapper = Util.getMapper(OrgChartMapper.class); + + /** + *create: 2022-12-01 12:23
+ * + * @author youHong.ai + */ +@Setter +@Getter +@ToString +public class OrgChartNodeVo { + + /** + * 人员id + */ + private Integer id; + + /** + * 人员姓名 + */ + private String name; + + /** + * 人员头像 + */ + private String avatar; + + /** + * 人员部门 + */ + private String department; + + /** + * 人员职位 + */ + private String job; + + /** + * 人员国籍类型 + */ + private String type; + + /** + * 是否展示 + */ + private Integer show; + + /** + * 是否展示下级兄弟 + */ + private Integer showBrother; + + /** + * 是否是当前的登陆人员 + */ + private boolean current; + + /** + * 是否是当前登陆人员的直属上级 + */ + private boolean currenParent; + + /** + * 是否展示子节点 + */ + private Integer showChildren; + + /** + * 子节点 + */ + private List