修改附件上传push缺少文件

main
youHong.ai 2022-12-01 16:35:18 +08:00
parent ff371a3cc9
commit 9bf767afb5
8 changed files with 251 additions and 1 deletions

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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();
}

View File

@ -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 {
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}
/**
*
*

View File

@ -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