在线修改

This commit is contained in:
18792927508
2024-03-14 17:16:38 +08:00
parent b22b49763c
commit 1cece4a0d1
4 changed files with 26 additions and 5 deletions
@@ -224,7 +224,7 @@ public interface MsCaseApplicationService {
* 调解书上传到onlyoffice服务器
* @param annexPath
*/
JSONArray uploadOnlyOffice(String annexPath);
JSONArray uploadOnlyOffice(String annexPath,Long id);
/**
* 案件受理
* @param application
@@ -3755,7 +3755,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
String annexPath=resultFilePath.replace(RuoYiConfig.getProfile(),Constants.RESOURCE_PREFIX);
// 如果是调解书或者调解协议上传到onlyoffice服务器
if(annexType != null && annexType.equals(AnnexTypeEnum.MEDIATE_BOOK.getCode())){
JSONArray jsonArray = caseApplicationService.uploadOnlyOffice(annexPath);
JSONArray jsonArray = caseApplicationService.uploadOnlyOffice(annexPath,application.getId());
if(jsonArray!=null && jsonArray.size() > 0){
for (Object obj : jsonArray) {
JSONObject jsonObject = (JSONObject) obj;
@@ -3784,13 +3784,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
*/
@Override
@Transactional
public JSONArray uploadOnlyOffice(String annexPath) {
public JSONArray uploadOnlyOffice(String annexPath,Long caseId) {
annexPath=annexPath.replace("/profile","/home/ruoyi/uploadPath");
File file = new File(annexPath);
if (file.exists()) {
// 调用onlyoffice
// String url = "http://121.40.189.20:9090/files/upload";
try {
onlyOfficeUrl= onlyOfficeUrl+ "?caseId="+caseId;
Map<String, Object> params = new HashMap<>();
params.put("file", file);
String postResult = HttpUtil.post(onlyOfficeUrl, params);
@@ -3806,7 +3806,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
}else {
throw new ServiceException("文件不存在");
}
return null;
return null;
}
/**