修改附件上传push缺少文件
parent
ff371a3cc9
commit
9bf767afb5
|
@ -0,0 +1,35 @@
|
|||
package aiyh.utils.httpUtil;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* <h1>文件上传类</h1>
|
||||
*
|
||||
* <p>create: 2022-11-21 11:54</p>
|
||||
*
|
||||
* @author youHong.ai
|
||||
*/
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@ToString
|
||||
public class HttpMultipartFile {
|
||||
/**
|
||||
* 文件名
|
||||
*/
|
||||
String fileName;
|
||||
/**
|
||||
* 上传文件的key
|
||||
*/
|
||||
String fileKey;
|
||||
/**
|
||||
* 文件流信息
|
||||
*/
|
||||
InputStream stream;
|
||||
|
||||
Long fileSize;
|
||||
}
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* <h1>人员组织架构图后端接口</h1>
|
||||
*
|
||||
* <p>create: 2022-12-01 11:58</p>
|
||||
*
|
||||
* @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);
|
||||
List<OrgChartNodeVo> treeList = service.getOrgChartTree(logInUser);
|
||||
return ApiResult.success(treeList);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.api.youhong.ai.pcn.organization.orgchart.mapper;
|
||||
|
||||
import aiyh.utils.annotation.recordset.Select;
|
||||
import aiyh.utils.annotation.recordset.SqlMapper;
|
||||
import com.api.youhong.ai.pcn.organization.orgchart.pojo.HrmResource;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <h1>人员组织架构图查询</h1>
|
||||
*
|
||||
* <p>create: 2022-12-01 12:14</p>
|
||||
*
|
||||
* @author youHong.ai
|
||||
*/
|
||||
|
||||
@SqlMapper
|
||||
public interface OrgChartMapper {
|
||||
|
||||
|
||||
@Select("select * from hrmresource")
|
||||
List<HrmResource> selectAll();
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.api.youhong.ai.pcn.organization.orgchart.pojo;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
/**
|
||||
* <h1>人员数据信息</h1>
|
||||
*
|
||||
* <p>create: 2022-12-01 15:10</p>
|
||||
*
|
||||
* @author youHong.ai
|
||||
*/
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@ToString
|
||||
public class HrmResource {
|
||||
}
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* <h1>人员组织架构图逻辑处理</h1>
|
||||
*
|
||||
* <p>create: 2022-12-01 12:00</p>
|
||||
*
|
||||
* @author youHong.ai
|
||||
*/
|
||||
|
||||
public class OrgChartService {
|
||||
|
||||
private final OrgChartMapper mapper = Util.getMapper(OrgChartMapper.class);
|
||||
|
||||
/**
|
||||
* <h2>获取人员组织架构图数据</h2>
|
||||
*
|
||||
* @param logInUser 当前登陆对象
|
||||
* @return 组织架构图数据
|
||||
*/
|
||||
public List<OrgChartNodeVo> getOrgChartTree(User logInUser) {
|
||||
int userId = logInUser.getUID();
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.api.youhong.ai.pcn.organization.orgchart.vo;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <h1>人员组织架构图节点VO对象</h1>
|
||||
*
|
||||
* <p>create: 2022-12-01 12:23</p>
|
||||
*
|
||||
* @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<OrgChartNodeVo> children;
|
||||
}
|
|
@ -308,6 +308,24 @@ public class DealWithMapping extends ToolUtil {
|
|||
return rootList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* <h2>方法重载 通过主表数据map转为请求参数</h2>
|
||||
*
|
||||
* @param mainMap 主表数据集合
|
||||
* @param requestMappingConfig 配置树
|
||||
* @return 请求参数
|
||||
*/
|
||||
public Map<String, Object> getRequestParam(Map<String, Object> mainMap, RequestMappingConfig requestMappingConfig) {
|
||||
this.fileInputStreams.clear();
|
||||
this.multipartFileList.clear();
|
||||
this.fileNames.clear();
|
||||
Map<String, Object> requestParam = new HashMap<>();
|
||||
List<MappingDetail> configDetail = requestMappingConfig.getConfigDetail();
|
||||
this.objValueDeal(mainMap, null, configDetail, requestParam);
|
||||
return requestParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析请求参数配置树,转换成请求参数
|
||||
*
|
||||
|
|
3
常用信息.md
3
常用信息.md
|
@ -416,7 +416,8 @@ from workflow_nodebase nb
|
|||
> 维护人员:xuanran.wang
|
||||
|
||||
```java
|
||||
User logInUser=HrmUserVarify.getUser(request,response));
|
||||
//@Context HttpServletRequest request, @Context HttpServletResponse response
|
||||
User logInUser=HrmUserVarify.getUser(request,response);
|
||||
// 传入id会将此人员信息带出
|
||||
User user=new User(id);
|
||||
// 获取人员id
|
||||
|
|
Loading…
Reference in New Issue