销售出货平台增加要货附件和出库附件打印
This commit is contained in:
parent
747d6f0c9c
commit
513b1ab882
@ -51,7 +51,8 @@ public class SapUtil {
|
||||
private static final String apikey = "hWS3L96a0h4NKCAjN9hG1OmOeEIsxCTz";
|
||||
private static final String env = "DEV";
|
||||
|
||||
private static final String EsbFileServerUrl = "https://agw.esb.nit.pub/oss/upload";
|
||||
private static final String EsbUploadFileServerUrl = "https://agw.esb.nit.pub/oss/upload";
|
||||
private static final String EsbGetFileServerUrl = "https://agw.esb.nit.pub/oss/file";
|
||||
|
||||
|
||||
public static String appendHead(String jsonStr) {
|
||||
@ -76,17 +77,17 @@ public class SapUtil {
|
||||
*/
|
||||
public static InvokeResponse sendFileToEsb(String fileDirValue, MultipartFile multipartFile) {
|
||||
String fileName = IdUtil.simpleUUID() + StrUtil.DOT + FileUtil.extName(multipartFile.getOriginalFilename());
|
||||
return callEsb("FILE_DIR",fileDirValue,fileName, multipartFile);
|
||||
return callEsb("FILE_DIR",fileDirValue,fileName, multipartFile,EsbUploadFileServerUrl);
|
||||
}
|
||||
|
||||
/*
|
||||
从ESB获取文件、获取销售订单的客户发货附件等
|
||||
*/
|
||||
public static InvokeResponse getFileFormEsb(String objectFilePath){
|
||||
return callEsb("OBJECT_PATH",objectFilePath,null, null);
|
||||
return callEsb("OBJECT_PATH",objectFilePath,null, null,EsbGetFileServerUrl);
|
||||
}
|
||||
|
||||
public static InvokeResponse callEsb(String jsonKey,String jsonValue,String fileName, MultipartFile multipartFile){
|
||||
public static InvokeResponse callEsb(String jsonKey,String jsonValue,String fileName, MultipartFile multipartFile,String serverUrl){
|
||||
InvokeResponse invokeResponse = new InvokeResponse();
|
||||
invokeResponse.setResult("S");
|
||||
try {
|
||||
@ -96,7 +97,7 @@ public class SapUtil {
|
||||
httpClient = (CloseableHttpClient) wrapClient(httpClient);
|
||||
|
||||
HttpPost httpPost = new HttpPost();
|
||||
httpPost.setURI(new URI(EsbFileServerUrl));
|
||||
httpPost.setURI(new URI(serverUrl));
|
||||
httpPost.setHeader("x-esb-apikey", apikey);
|
||||
httpPost.setHeader("x-esb-env", env);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user