diff --git a/src/main/java/aiyh/utils/action/SafeCusBaseAction.java b/src/main/java/aiyh/utils/action/SafeCusBaseAction.java index 92cdf9f..be9f5c8 100644 --- a/src/main/java/aiyh/utils/action/SafeCusBaseAction.java +++ b/src/main/java/aiyh/utils/action/SafeCusBaseAction.java @@ -200,6 +200,7 @@ public abstract class SafeCusBaseAction implements Action { String billTable = requestManager.getBillTableName(); String id = mapper.selectIdByRequest(billTable, requestInfo.getRequestid()); result.put("id", id); + result.put("requestid", requestInfo.getRequestid()); return result; } diff --git a/src/main/java/com/api/youhong/ai/pcn/download/service/DownloadFileService.java b/src/main/java/com/api/youhong/ai/pcn/download/service/DownloadFileService.java index 6585426..b7a802d 100644 --- a/src/main/java/com/api/youhong/ai/pcn/download/service/DownloadFileService.java +++ b/src/main/java/com/api/youhong/ai/pcn/download/service/DownloadFileService.java @@ -11,7 +11,9 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.StreamingOutput; import java.io.InputStream; +import java.io.UnsupportedEncodingException; import java.net.URLDecoder; +import java.net.URLEncoder; /** *

@@ -57,6 +59,11 @@ public class DownloadFileService { } }; String imageFileName = docImageInfo.getImageFileName(); + try { + imageFileName = URLEncoder.encode(imageFileName, "UTF-8"); + } catch (UnsupportedEncodingException ignore) { + } + return Response .ok(stream) .header("Content-Disposition", "attachment; filename=\"" + imageFileName + "\"") diff --git a/src/main/java/weaver/youhong/ai/haripijiu/action/sapdocking/VoucherPayableNewAction.java b/src/main/java/weaver/youhong/ai/haripijiu/action/sapdocking/VoucherPayableNewAction.java index b9ef555..8b1cc3c 100644 --- a/src/main/java/weaver/youhong/ai/haripijiu/action/sapdocking/VoucherPayableNewAction.java +++ b/src/main/java/weaver/youhong/ai/haripijiu/action/sapdocking/VoucherPayableNewAction.java @@ -172,7 +172,7 @@ public class VoucherPayableNewAction extends SafeCusBaseAction { } headKeys = sortKey(headKeys); for (String headKey : headKeys) { - sb.append(Util.null2String(heads.get(headKey)).replace(" ", " ")).append("\t"); + sb.append(Util.null2String(heads.get(headKey)).replace("
", " ").replace(" ", " ")).append("\t"); } sb.deleteCharAt(sb.lastIndexOf("\t")); sb.append("\r\n"); @@ -184,7 +184,7 @@ public class VoucherPayableNewAction extends SafeCusBaseAction { try { OutputStreamWriter out = new OutputStreamWriter( Files.newOutputStream(Paths.get(filePath)), StandardCharsets.UTF_8); - out.write(sb.toString().replace(" ", " ")); + out.write(sb.toString().replace("
", " ").replace(" ", " ")); out.close(); } catch (IOException e) {