保时捷人员组织架构图修改、响应对象修改

main
youHong.ai 2022-12-07 19:38:35 +08:00
parent fdb7bac7f6
commit 01014bda04
13 changed files with 393 additions and 169 deletions

View File

@ -850,7 +850,7 @@ public class Util extends weaver.general.Util {
} else {
try {
System.out.println("已存在文件:" + packageName + "." + className + ".java");
System.out.print("你想如何处理该文件:替换[r/ApiResult] 重命名[w/W] 跳过[n/N] ? ");
System.out.print("你想如何处理该文件:替换[r/R] 重命名[w/W] 跳过[n/N] ? ");
Scanner scanner = new Scanner(System.in);
String next = scanner.next();
System.out.println(next);

View File

@ -2,11 +2,11 @@ package aiyh.utils.httpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.http.Header;
import org.apache.http.*;
import org.apache.http.params.HttpParams;
import java.io.InputStream;
import java.util.List;
@ -15,11 +15,10 @@ import java.util.Map;
/**
* @author EBU7-dev1-ayh
* @date 2021/8/31 0031 17:16
* http
* @date 2021/8/31 0031 17:16 http
*/
public class ResponeVo {
public class ResponeVo implements HttpResponse {
/**
*
*/
@ -31,19 +30,30 @@ public class ResponeVo {
/**
*
*/
@JSONField(serialize = false)
private Header[] allHeaders;
private Locale locale;
private InputStream content;
private byte[] contentByteArr;
private Map<String,Object> requestData;
private Map<String, Object> requestData;
private HttpResponse response;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public void setResponse(HttpResponse response) {
this.response = response;
}
public Map<String, Object> getRequestData() {
return requestData;
}
@ -54,6 +64,7 @@ public class ResponeVo {
/**
* map
*
* @return map
* @throws JsonProcessingException JSON
*/
@ -64,6 +75,7 @@ public class ResponeVo {
/**
*
*
* @param clazz
* @param <T>
* @return
@ -74,9 +86,9 @@ public class ResponeVo {
return mapper.readValue(this.getEntityString(), clazz);
}
/**
*
*
* @param <T>
* @return
* @throws JsonProcessingException JSON
@ -88,6 +100,7 @@ public class ResponeVo {
/**
*
*
* @param clazz
* @param <T>
* @return
@ -96,6 +109,46 @@ public class ResponeVo {
return JSON.parseArray(this.getEntityString(), clazz);
}
@Override
public StatusLine getStatusLine() {
return this.response.getStatusLine();
}
@Override
public void setStatusLine(StatusLine statusLine) {
}
@Override
public void setStatusLine(ProtocolVersion protocolVersion, int i) {
}
@Override
public void setStatusLine(ProtocolVersion protocolVersion, int i, String s) {
}
@Override
public void setStatusCode(int i) throws IllegalStateException {
}
@Override
public void setReasonPhrase(String s) throws IllegalStateException {
}
@Override
public HttpEntity getEntity() {
return null;
}
@Override
public void setEntity(HttpEntity httpEntity) {
}
public Locale getLocale() {
return locale;
}
@ -104,18 +157,92 @@ public class ResponeVo {
this.locale = locale;
}
public void setCode(int code) {
this.code = code;
@Override
public ProtocolVersion getProtocolVersion() {
return this.response.getProtocolVersion();
}
@Override
public boolean containsHeader(String s) {
return response.containsHeader(s);
}
@Override
public Header[] getHeaders(String s) {
return response.getHeaders(s);
}
@Override
public Header getFirstHeader(String s) {
return response.getFirstHeader(s);
}
@Override
public Header getLastHeader(String s) {
return response.getLastHeader(s);
}
public Header[] getAllHeaders() {
return allHeaders;
return response.getAllHeaders();
}
public void setAllHeaders(Header[] allHeaders) {
this.allHeaders = allHeaders;
@Override
public void addHeader(Header header) {
}
@Override
public void addHeader(String s, String s1) {
}
@Override
public void setHeader(Header header) {
}
@Override
public void setHeader(String s, String s1) {
}
@Override
public void setHeaders(Header[] headers) {
}
@Override
public void removeHeader(Header header) {
}
@Override
public void removeHeaders(String s) {
}
@Override
public HeaderIterator headerIterator() {
return response.headerIterator();
}
@Override
public HeaderIterator headerIterator(String s) {
return response.headerIterator(s);
}
@Override
@Deprecated
public HttpParams getParams() {
return response.getParams();
}
@Override
public void setParams(HttpParams httpParams) {
}
public String getEntityString() {
return entityString;
}
@ -128,6 +255,10 @@ public class ResponeVo {
return content;
}
public void setContent(InputStream content) {
this.content = content;
}
public byte[] getContentByteArr() {
return contentByteArr;
}
@ -136,10 +267,6 @@ public class ResponeVo {
this.contentByteArr = contentByteArr;
}
public void setContent(InputStream content) {
this.content = content;
}
@Override
public String toString() {
return "ResponeVo{" +

View File

@ -1,21 +1,20 @@
package aiyh.utils.httpUtil.httpAsync;
import aiyh.utils.httpUtil.ExtendedIOUtils;
import aiyh.utils.httpUtil.ResponeVo;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.util.EntityUtils;
import aiyh.utils.httpUtil.ExtendedIOUtils;
import aiyh.utils.httpUtil.ResponeVo;
import java.util.Locale;
import java.util.concurrent.Callable;
/**
* @author EBU7-dev1-ayh
* @date 2021/9/2 0002 22:55
* async
* @date 2021/9/2 0002 22:55 async
*/
@ -41,7 +40,6 @@ public class HttpAsyncThread implements Callable<ResponeVo> {
Header[] allHeaders = response.getAllHeaders();
Locale locale = response.getLocale();
responeVo.setLocale(locale);
responeVo.setAllHeaders(allHeaders);
responeVo.setEntityString(EntityUtils.toString(entity, DEFAULT_ENCODING));
responeVo.setCode(response.getStatusLine().getStatusCode());
} catch (Exception e) {

View File

@ -6,7 +6,6 @@ import aiyh.utils.httpUtil.ResponeVo;
import aiyh.utils.httpUtil.util.HttpUtilParamInfo;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpUriRequest;
@ -20,18 +19,16 @@ import java.util.function.Consumer;
/**
* @author EBU7-dev1-ayh
* @date 2021/9/2 0002 23:18
* callback
* @date 2021/9/2 0002 23:18 callback
*/
public class HttpAsyncThreadCallBack implements Runnable {
private static final Logger log = Util.getLogger("http_util");
private final CloseableHttpClient httpClient;
private final HttpUriRequest request;
private final Consumer<ResponeVo> consumer;
private String defaultEncoding = "UTF-8";
private static final Logger log = Util.getLogger("http_util");
private HttpUtilParamInfo httpUtilParamInfo = new HttpUtilParamInfo();
public HttpAsyncThreadCallBack(CloseableHttpClient httpClient, HttpUriRequest request, Consumer<ResponeVo> consumer) {
@ -54,11 +51,9 @@ public class HttpAsyncThreadCallBack implements Runnable {
response = httpClient.execute(request);
HttpEntity entity = response.getEntity();
Header[] allHeaders = response.getAllHeaders();
ResponeVo responeVo = new ResponeVo();
Locale locale = response.getLocale();
responeVo.setLocale(locale);
responeVo.setAllHeaders(allHeaders);
responeVo.setEntityString(EntityUtils.toString(entity, defaultEncoding));
responeVo.setCode(response.getStatusLine().getStatusCode());
httpUtilParamInfo.setResponse(responeVo);

View File

@ -33,19 +33,16 @@ import java.util.function.Consumer;
/**
* @author EBU7-dev1-ayh
* @date 2021/8/31 0031 17:16
* http
* @date 2021/8/31 0031 17:16 http
*/
public class HttpStaticUtils {
// 默认编码
public static String DEFAULT_ENCODING = "UTF-8";
private static final ToolUtil toolUtil = new ToolUtil();
// 线程池
public static final ThreadPoolExecutor executorService;
private static final ToolUtil toolUtil = new ToolUtil();
// 默认编码
public static String DEFAULT_ENCODING = "UTF-8";
static {
// private final ExecutorService executorService = Executors.newFixedThreadPool(3);
@ -423,7 +420,6 @@ public class HttpStaticUtils {
Header[] allHeaders = response.getAllHeaders();
Locale locale = response.getLocale();
responeVo.setLocale(locale);
responeVo.setAllHeaders(allHeaders);
responeVo.setEntityString(EntityUtils.toString(entity, DEFAULT_ENCODING));
responeVo.setCode(response.getStatusLine().getStatusCode());
} catch (Exception e) {

View File

@ -39,8 +39,7 @@ import java.util.function.Function;
/**
* @author EBU7-dev1-ayh
* @date 2021/8/31 0031 17:16
* http HttpStaticUtils使HttpStaticUtils
* @date 2021/8/31 0031 17:16 http HttpStaticUtils使HttpStaticUtils
*/
@ -700,9 +699,9 @@ public class HttpUtils {
Header[] allHeaders = response.getAllHeaders();
Locale locale = response.getLocale();
responeVo.setLocale(locale);
responeVo.setAllHeaders(allHeaders);
responeVo.setEntityString(EntityUtils.toString(entity, DEFAULT_ENCODING));
responeVo.setCode(response.getStatusLine().getStatusCode());
responeVo.setResponse(response);
httpUtilParamInfo.setResponse(responeVo);
httpUtilParamInfo.setResponseDate(new Date());
try {

View File

@ -61,4 +61,7 @@ public class HrmResourceDto {
/** 头像地址 */
private String avatar;
/** 当前所属分部 */
private Integer subCompanyId;
}

View File

@ -27,24 +27,28 @@ public interface OrgChartMapper {
*
* @param typeOfEmploymentField
* @return List<HrmResource>
* @author youHong.ai
* ******************************************
* @author youHong.ai ******************************************
*/
@Select("select hrm.id, " +
" hrm.subcompanyid1 sub_company_id," +
" hrm.messagerurl avatar," +
" cus.$t{lastNameEnField} last_name, " +
" (case when cus.$t{lastNameEnField} is null then hrm.lastname " +
" else cus.$t{lastNameEnField} end) last_name, " +
" hrm.managerstr manager_str, " +
" hrm.jobtitle job_title_id, " +
" hrm.managerid manager_id, " +
" hrm.departmentid department_id, " +
" dept.DEPARTMENTNAME department_name, " +
" job.JOBTITLENAME job_title_name, " +
" cus.$t{typeOfEmploymentFiled} type_of_employment " +
" cus1.$t{typeOfEmploymentFiled} type_of_employment " +
"from hrmresource hrm " +
" inner join hrmjobtitles job on hrm.JOBTITLE = job.id " +
" inner join cus_fielddata cus on cus.ID = hrm.ID " +
" and cus.SCOPE = 'HrmCustomFieldByInfoType' " +
" and cus.SCOPEID = 1 " +
" inner join cus_fielddata cus1 on cus1.id = hrm.id" +
" and cus1.scope = 'HrmCustomFieldByInfoType' " +
" and cus1.scopeid = -1" +
" inner join hrmdepartment dept on dept.id = hrm.DEPARTMENTID " +
"where hrm.status in (0, 1)")
List<HrmResource> selectAll(@ParamMapper("typeOfEmploymentFiled") String typeOfEmploymentField,
@ -58,8 +62,7 @@ public interface OrgChartMapper {
*
* @param userId id
* @return ShowPointOrAll
* @author youHong.ai
* ******************************************
* @author youHong.ai ******************************************
*/
@Select("select id,resources,show_all,show_type from uf_show_point_or_all " +
"where concat(',',resources,',') like concat('%,',#{userId},',%')")

View File

@ -47,5 +47,8 @@ public class HrmResource {
/** 用工类型 */
private Integer typeOfEmployment;
/** 当前所属分部 */
private Integer subCompanyId;
}

View File

@ -52,9 +52,28 @@ public class OrgChartService {
//List<HrmResourceDto> hrmResourceDtoList = new ArrayList();
AtomicReference<HrmResourceDto> currentUser = new AtomicReference<>();
/* ******************* 将pojo转换为Dto对象对节点属性默认值赋值找出当前用户并设置显示 ******************* */
List<HrmResourceDto> hrmResourceDtoList = hrmResourceList.stream().map(struct::hrmResourceToDto).peek(item -> Builder.startSet(item).with(HrmResourceDto::setShow, 0).with(HrmResourceDto::setShowBrother, 0).with(HrmResourceDto::setShowChildren, 0).endSet()).collect(Collectors.toList());
hrmResourceDtoList.stream().filter(item -> item.getId() == userId).forEach(item -> {
Builder.startSet(item).with(HrmResourceDto::setShow, 1).with(HrmResourceDto::setShowBrother, 1).with(HrmResourceDto::setShowChildren, 1).with(HrmResourceDto::setCurrent, true).endSet();
List<HrmResourceDto> hrmResourceDtoList = hrmResourceList.stream()
.map(struct::hrmResourceToDto)
.peek(item -> Builder.startSet(item)
.with(HrmResourceDto::setShow, 0)
.with(HrmResourceDto::setShowBrother, 0)
.with(HrmResourceDto::setShowChildren, 0)
.endSet())
.collect(Collectors.toList());
hrmResourceDtoList.stream()
.peek(item -> {
if (item.getManagerId() == userId) {
item.setShow(1);
}
})
.filter(item -> item.getId() == userId)
.forEach(item -> {
Builder.startSet(item)
.with(HrmResourceDto::setShow, 1)
.with(HrmResourceDto::setShowBrother, 1)
.with(HrmResourceDto::setShowChildren, 1)
.with(HrmResourceDto::setCurrent, true)
.endSet();
currentUser.set(item);
});
/* ******************* 系统管理员默认全部展开哦 ******************* */
@ -73,21 +92,32 @@ public class OrgChartService {
parentId -> parentId == null || parentId <= 0)
.stream().peek(item -> Builder.startSet(item)
.with(OrgChartNodeVo::setIsRoot, true)
.with(OrgChartNodeVo::setCurrentParent, true)
.with(OrgChartNodeVo::setCurrent, true)
.endSet())
.peek(item -> recursionChildrenNums(item, 0))
.collect(Collectors.toList());
}
Assert.notNull(currentUser.get(), "not find current login user info!");
/* ******************* 根据当前登陆人的分部来过滤 ******************* */
hrmResourceDtoList = hrmResourceDtoList.stream()
.filter(item -> logInUser.getUserSubCompany1() == item.getSubCompanyId())
.collect(Collectors.toList());
/* ******************* 查找当前登陆人员的所有上级 ******************* */
String currentUserManagerStr = currentUser.get().getManagerStr();
if (Objects.isNull(currentUserManagerStr)) {
currentUserManagerStr = "";
}
currentUserManagerStr = Util.removeSeparator(currentUserManagerStr, ",");
List<Integer> currentUserManagerList = Arrays.stream(currentUserManagerStr.split(",")).map(Integer::parseInt).collect(Collectors.toList());
List<Integer> currentUserManagerList = Arrays.stream(currentUserManagerStr.split(","))
.map(Integer::parseInt)
.collect(Collectors.toList());
/* ******************* 对当前用户的所有直接上级设置标识 ******************* */
hrmResourceDtoList.stream().filter(item -> currentUserManagerList.contains(item.getId())).forEach(item -> Builder.startSet(item).with(HrmResourceDto::setShowChildren, 1).with(HrmResourceDto::setCurrentParent, true).endSet());
hrmResourceDtoList.stream()
.filter(item -> currentUserManagerList.contains(item.getId()))
.forEach(item -> Builder.startSet(item)
.with(HrmResourceDto::setShowChildren, 1)
.with(HrmResourceDto::setCurrentParent, true)
.endSet());
/* ******************* 查询当前用户的是否全部展示或显示小红点的配置信息 ******************* */
ShowPointOrAll showPointOrAll = mapper.selectShowPointOrAll(userId);
@ -100,9 +130,15 @@ public class OrgChartService {
.collect(Collectors.toList());
} else {
/* ******************* 转换dto为Vo并且设置根节点标识 ******************* */
orgChartNodeVoList = hrmResourceDtoList.stream().map(struct::hrmResourceDtoToVo).peek(item -> {
orgChartNodeVoList = hrmResourceDtoList.stream()
.map(struct::hrmResourceDtoToVo)
.peek(item -> {
if (showPointOrAll.isShowAll()) {
Builder.startSet(item).with(OrgChartNodeVo::setShow, 1).with(OrgChartNodeVo::setShowBrother, 1).with(OrgChartNodeVo::setShowChildren, 1).endSet();
Builder.startSet(item)
.with(OrgChartNodeVo::setShow, 1)
.with(OrgChartNodeVo::setShowBrother, 1)
.with(OrgChartNodeVo::setShowChildren, 1)
.endSet();
}
if (!showPointOrAll.isShowType()) {
item.setType(-1);
@ -110,7 +146,14 @@ public class OrgChartService {
}).collect(Collectors.toList());
}
return Util.listToTree(orgChartNodeVoList, OrgChartNodeVo::getId, OrgChartNodeVo::getManagerId, OrgChartNodeVo::getChildren, OrgChartNodeVo::setChildren, parentId -> parentId == null || parentId <= 0).stream().peek(item -> item.setIsRoot(true)).peek(item -> recursionChildrenNums(item, 0)).collect(Collectors.toList());
return Util.listToTree(orgChartNodeVoList, OrgChartNodeVo::getId,
OrgChartNodeVo::getManagerId, OrgChartNodeVo::getChildren,
OrgChartNodeVo::setChildren,
parentId -> parentId == null || parentId <= 0)
.stream()
.peek(item -> item.setIsRoot(true))
.peek(item -> recursionChildrenNums(item, 0))
.collect(Collectors.toList());
}

View File

@ -2,10 +2,7 @@ package weaver.xiao.commons.config.dao;
import weaver.conn.RecordSet;
import weaver.general.Util;
import weaver.xiao.commons.config.entity.DocImageFile;
import weaver.xiao.commons.config.entity.FieldMessage;
import weaver.xiao.commons.config.entity.MappingDetail;
import weaver.xiao.commons.config.entity.RequestMappingConfig;
import weaver.xiao.commons.config.entity.*;
import weaver.xiao.commons.config.enumtype.DataSourceEnum;
import weaver.xiao.commons.exception.ValueDealException;
import weaver.xiao.commons.utils.SqlUtil;
@ -108,17 +105,22 @@ public class ConfigMappingCMD {
mappingDetails.add(mappingDetail);
}
requestMappingConfig.setConfigDetail(mappingDetails);
// //查询明细4的信息
// RecordSet detail4RecordSet = new RecordSet();
// List<ResponseMapping> responseMappingList = new ArrayList<>();
// String queryDetail4Sql = "select responseFieldName,workflowField,mainOrDetail,detailTableId,workflowFieldName from uf_request_config_dt4 where mainid = ?";
// toolUtil.writeDebuggerLog("执行查询的明细sql query detail4Sql >>>>"+queryDetail4Sql+" mainId:"+mainId);
// detail4RecordSet.executeQuery(queryDetail4Sql,mainId);
// while (detail4RecordSet.next()){
// ResponseMapping responseMapping = sqlUtil.recordSetToEntityByEntity(detail4RecordSet, ResponseMapping.class);
// responseMappingList.add(responseMapping);
// }
// requestMappingConfig.setResponseMappingList(responseMappingList);
try {
//查询明细4的信息
RecordSet detail4RecordSet = new RecordSet();
List<ResponseMapping> responseMappingList = new ArrayList<>();
String queryDetail4Sql = "select responseFieldName,workflowField,mainOrDetail,detailTableId,workflowFieldName from uf_request_config_dt4 where mainid = ?";
toolUtil.writeDebuggerLog("执行查询的明细sql query detail4Sql >>>>" + queryDetail4Sql + " mainId:" + mainId);
detail4RecordSet.executeQuery(queryDetail4Sql, mainId);
while (detail4RecordSet.next()) {
ResponseMapping responseMapping = sqlUtil.recordSetToEntityByEntity(detail4RecordSet, ResponseMapping.class);
responseMappingList.add(responseMapping);
}
requestMappingConfig.setResponseMappingList(responseMappingList);
} catch (Exception ignore) {
}
requestMappingConfig.setConfigDetail(mappingDetails);
}

View File

@ -1,6 +1,7 @@
package weaver.xiao.commons.config.entity;
import lombok.Data;
import weaver.xiao.commons.utils.annotation.SqlFieldMapping;
/**
* @author XiaoBokang
@ -9,9 +10,19 @@ import lombok.Data;
@Data
public class ResponseMapping {
@SqlFieldMapping("responseFieldName")
private String responseFieldName;
@SqlFieldMapping("workflowField")
private String workflowField;
private String mainOrDetail;
@SqlFieldMapping("mainOrDetail")
private Integer mainOrDetail;
@SqlFieldMapping("detailTableId")
private String detailTableId;
@SqlFieldMapping("workflowFieldName")
private String workflowFieldName;
}

View File

@ -5,11 +5,16 @@ import aiyh.utils.httpUtil.ResponeVo;
import aiyh.utils.httpUtil.util.HttpUtils;
import basetest.BaseTest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.api.youhong.ai.pcn.organization.orgchart.service.OrgChartService;
import com.api.youhong.ai.pcn.organization.orgchart.vo.OrgChartNodeVo;
import com.fasterxml.jackson.core.JsonProcessingException;
import ebu7common.youhong.ai.bean.Builder;
import ebu7common.youhong.ai.sftp.SftpConnectUtil;
import org.apache.http.Header;
import org.apache.http.HeaderElement;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.junit.Test;
import weaver.conn.RecordSet;
import weaver.general.GCONST;
@ -41,6 +46,27 @@ import java.util.regex.Pattern;
public class TestOrganization extends BaseTest {
public static String getFileName(HttpResponse response) {
Header contentHeader = response.getFirstHeader("Content-Disposition");
String filename = null;
if (contentHeader != null) {
HeaderElement[] values = contentHeader.getElements();
if (values.length == 1) {
NameValuePair param = values[0].getParameterByName("filename");
if (param != null) {
try {
//filename = new String(param.getValue().toString().getBytes(), "utf-8");
//filename=URLDecoder.decode(param.getValue(),"utf-8");
filename = param.getValue();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
return filename;
}
@Test
public void testSftp() throws IOException {
SftpConnectUtil sftpConnectUtil = new SftpConnectUtil(
@ -54,7 +80,6 @@ public class TestOrganization extends BaseTest {
System.out.println(hris_positionExport20221120);
}
@Test
public void testGeOrganizationData() {
GetOrganizationResult getOrganizationResult = new GetOrganizationResult();
@ -67,7 +92,6 @@ public class TestOrganization extends BaseTest {
log.info(JSON.toJSONString(positionList));
}
@Test
public void testStaticLog() {
log.info("哈哈哈好的方式");
@ -192,7 +216,6 @@ public class TestOrganization extends BaseTest {
}
}
@Test
public void testOrgChart() {
User user = new User(1);
@ -200,4 +223,25 @@ public class TestOrganization extends BaseTest {
List<OrgChartNodeVo> orgChartTree = orgChartService.getOrgChartTree(user);
System.out.println(JSON.toJSONString(orgChartTree));
}
@Test
public void testDownload() throws IOException {
HttpUtils httpUtils = new HttpUtils();
// String url = "http://e-sign-dev-yace-web-alb-1694614450.cn-north-1.elb.amazonaws.com.cn:8070/contract/download?appId=100000&signType=SHA256&sign=OEI4RDA5RjMwRTE3Qzk1ODI0RkM3OENCQTA3QzZEQUFBQTgwRjM5MDdDMkIzQTIxNDFERDkyNUI5RDVFRjc4Qg==&timestamp=2022-12-07%2014:32:08&bizContent=JTdCJTIyZG9jTm8lMjIlM0ElMjJjMGY5YzhjYTk5OTQ0MzZjYThjY2Y0MWVmMTZkMDUzYSUyMiU3RA==";
String url = "https://apigwaws-lite.porsche-cloudservice.com/env-101/econtract/econtract/contract/api/v1/contract/download";
String heard = "{\"apikey\":\"TulQxnZSRKeHoQfmeZzOUzGn6KpTDkDK\",\"appId\":\"100001\",\"bizContent\":\"JTdCJTIyY29udHJhY3RObyUyMiUzQSUyMjAwZDBkNmFlYzFkOTQzNGE4YjFlZjc5YzZjODcwNWFmJTIyJTdE\",\"sign\":\"M0I2NjhGRjgwNDY2RjM4MjRBMTg4RUQ0QUU0MkEzOUVEQTAxNTZCRTgwRDE3NzQ3RkQxMzZGOEE1M0FCODRGOA==\",\"signType\":\"SHA256\",\"Content-Type\":\"application/json\",\"timestamp\":\"2022-12-07 17:38:07\"} ";
Map<String, String> map = JSONObject.parseObject(heard, Map.class);
FaRequestUtils.downContract(new HashMap<String, Object>() {{
put("contractNo", "00d0d6aec1d9434a8b1ef79c6c8705af");
}}, (map1, response) -> {
getFileName(response);
Header[] allHeaders = response.getAllHeaders();
for (Header allHeader : allHeaders) {
System.out.println(allHeader);
}
return null;
}, url);
}
}