From d25b0270e0bb9266ed92c7c74ee1cb8fb24aa51a Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期二, 14 一月 2025 10:53:02 +0800 Subject: [PATCH] add input_number --- pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/dyFile/FileOperate.java | 38 ++++++++++++++++++++++++++++++++++---- 1 files changed, 34 insertions(+), 4 deletions(-) diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/dyFile/FileOperate.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/dyFile/FileOperate.java index c9774c6..c30a98e 100644 --- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/dyFile/FileOperate.java +++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/dyFile/FileOperate.java @@ -124,10 +124,10 @@ rvo = this.restCreateFileName(fmUrl, fileExtName) ; if(rvo != null){ String relativeFilePath = this.restSaveFile(fileCtrlRqMp, fileMethodMp, file, regionNum, json, rvo); - //log.info("瀛樺偍鏂囦欢鐢熸垚鏂囦欢璺緞锛�" + relativeFilePath); - if(relativeFilePath != null){ - rvo.createFilePath(relativeFilePath, rvo.fileNameHash); - } + rvo.fileWebPath = relativeFilePath ; + //if(relativeFilePath != null){ + // rvo.createFilePath(relativeFilePath, rvo.fileNameHash); + //} } } return rvo ; @@ -276,6 +276,36 @@ return rvo ; } + + /** + * 瑙f瀽鏂囦欢鍝堝笇鍊� + * @param fmUrl + * @param hashCodes + * @return + */ + public List<FileRestVo> parseHashcode(String fmUrl, List<Integer> hashCodes){ + List<FileRestVo> rList = null ; + if(hashCodes != null && hashCodes.size() > 0) { + // 鍑嗗璇锋眰鏁版嵁 + MultiValueMap<String, Object> multipartRequestData = new LinkedMultiValueMap<>(); + multipartRequestData.add(FileConstant.fmPostMapping_parseHashcodeList_paramName, hashCodes); + + // 璁剧疆璇锋眰澶撮儴锛岃繖閲屽亣璁炬湇鍔″櫒鎺ユ敹multipart/form-data绫诲瀷鐨勬暟鎹� + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.MULTIPART_FORM_DATA); + + // 灏佽璇锋眰浣� + HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(multipartRequestData, headers); + + String webUrl = fmUrl + "/" + FileConstant.fmRequestMapping + "/" + FileConstant.fmPostMapping_parseHashcodeList; + // 鍙戦�丳OST璇锋眰 + FileRestVo[] rvos = restTemplate.postForObject(webUrl, requestEntity, FileRestVo[].class); + rList = Arrays.asList(rvos) ; + } + return rList ; + } + + /** * 瑙f瀽鏂囦欢鏂囦欢璺緞涓殑鍝堝笇鍊煎苟杩斿洖鍥剧墖瀹屾暣璺緞 * @param fmUrl -- Gitblit v1.8.0