|
|
@@ -3755,7 +3755,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
3755
|
3755
|
String annexPath=resultFilePath.replace(RuoYiConfig.getProfile(),Constants.RESOURCE_PREFIX);
|
|
3756
|
3756
|
// 如果是调解书或者调解协议上传到onlyoffice服务器
|
|
3757
|
3757
|
if(annexType != null && annexType.equals(AnnexTypeEnum.MEDIATE_BOOK.getCode())){
|
|
3758
|
|
- JSONArray jsonArray = caseApplicationService.uploadOnlyOffice(annexPath);
|
|
|
3758
|
+ JSONArray jsonArray = caseApplicationService.uploadOnlyOffice(annexPath,application.getId());
|
|
3759
|
3759
|
if(jsonArray!=null && jsonArray.size() > 0){
|
|
3760
|
3760
|
for (Object obj : jsonArray) {
|
|
3761
|
3761
|
JSONObject jsonObject = (JSONObject) obj;
|
|
|
@@ -3784,13 +3784,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
3784
|
3784
|
*/
|
|
3785
|
3785
|
@Override
|
|
3786
|
3786
|
@Transactional
|
|
3787
|
|
- public JSONArray uploadOnlyOffice(String annexPath) {
|
|
|
3787
|
+ public JSONArray uploadOnlyOffice(String annexPath,Long caseId) {
|
|
3788
|
3788
|
annexPath=annexPath.replace("/profile","/home/ruoyi/uploadPath");
|
|
3789
|
3789
|
File file = new File(annexPath);
|
|
3790
|
3790
|
if (file.exists()) {
|
|
3791
|
3791
|
// 调用onlyoffice
|
|
3792
|
|
-// String url = "http://121.40.189.20:9090/files/upload";
|
|
3793
|
3792
|
try {
|
|
|
3793
|
+ onlyOfficeUrl= onlyOfficeUrl+ "?caseId="+caseId;
|
|
3794
|
3794
|
Map<String, Object> params = new HashMap<>();
|
|
3795
|
3795
|
params.put("file", file);
|
|
3796
|
3796
|
String postResult = HttpUtil.post(onlyOfficeUrl, params);
|
|
|
@@ -3806,7 +3806,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
3806
|
3806
|
}else {
|
|
3807
|
3807
|
throw new ServiceException("文件不存在");
|
|
3808
|
3808
|
}
|
|
3809
|
|
-return null;
|
|
|
3809
|
+ return null;
|
|
3810
|
3810
|
}
|
|
3811
|
3811
|
|
|
3812
|
3812
|
/**
|