Merge remote-tracking branch 'origin/master'

This commit is contained in:
高嵩
2024-04-16 17:18:58 +08:00
2 changed files with 8 additions and 3 deletions
@@ -526,8 +526,7 @@ public class BusProcessModelHisServiceImpl extends ServiceImpl<BusProcessModelHi
if (!dir.exists()) {
dir.mkdirs();
}
String fileName = model + ".docx";
modelHis.setFileName(fileName);
modelHis.setFileName(standName);
StringBuilder builder = new StringBuilder();
builder.append("model").append("/");
builder.append(taskId).append("/");
@@ -61,6 +61,7 @@ import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import org.springframework.core.io.Resource;
import org.springframework.web.util.UriComponentsBuilder;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -235,7 +236,12 @@ public class FileSpiltService {
HttpEntity<Map<String, String>> requestEntity = new HttpEntity<>(params, headers);
// 发送POST请求并获取响应
ResponseEntity<byte[]> responseEntity = restTemplate.postForEntity(bydDownLoadFileUrl, requestEntity, byte[].class);
// ResponseEntity<byte[]> responseEntity = restTemplate.postForEntity(bydDownLoadFileUrl, requestEntity, byte[].class);
Long fileIdLong = Long.valueOf(sarFileSplitInfoEO.getId());
UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(bydDownLoadFileUrl).queryParam("fileId", fileIdLong);
// 发送POST请求并获取响应
ResponseEntity<byte[]> responseEntity = restTemplate.postForEntity(builder.toUriString(), requestEntity, byte[].class);
// 获取文件流
splitFileIs = new ByteArrayInputStream(responseEntity.getBody());
}catch (Exception ex){