上传下载调解书

This commit is contained in:
18792927508
2024-04-22 16:08:05 +08:00
parent e2c5fbf77d
commit 809e457480
14 changed files with 153 additions and 34 deletions
@@ -23,6 +23,8 @@ import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import static com.google.common.io.Files.getFileExtension;
/**
* 通用请求处理
*
@@ -116,6 +118,7 @@ public class CommonController
.annexType(annexType)
.useId(SecurityUtils.getUserId())
.useAccount(SecurityUtils.getUsername())
.suffix(getFileExtension(path))
.build();
msCaseAttachMapper.save(caseAttach);
return caseAttach.getAnnexId();
@@ -1,5 +1,6 @@
package com.ruoyi.web.controller.wisdomarbitrate.miniprogress;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
@@ -8,10 +9,7 @@ import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
import com.ruoyi.wisdomarbitrate.service.miniprogress.IdentityAuthenticationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/identityAuthentication")
@@ -25,7 +23,25 @@ public class IdentityAuthenticationController extends BaseController {
@Anonymous
@PostMapping("/selectIdentityAuthenticaEIDtoken")
public AjaxResult selectIdentityAuthenticaEIDtoken() {
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken(false);
return success(tokenResult);
}
/**
* 获取PC端EIDtoken
*/
@Anonymous
@PostMapping("/selectPCIdentityAuthenticaEIDtoken")
public AjaxResult selectPCIdentityAuthenticaEIDtoken() {
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken(true);
return success(tokenResult);
}
/**
* H5轮询获取E证通Token状态
*/
@Anonymous
@GetMapping("/selectPCEIDtokenStatus")
public AjaxResult selectPCEIDtokenStatus(@RequestParam String eidToken) {
JSONObject tokenResult = identityAuthenticationService.selectPCEIDtokenStatus(eidToken);
return success(tokenResult);
}
@@ -35,6 +51,9 @@ public class IdentityAuthenticationController extends BaseController {
@Anonymous
@PostMapping("/selectIdentityAuthenticaRespon")
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
if(StrUtil.isEmpty(ientityAuthentication.getEidToken())){
return error("EIDtoken不能为空");
}
AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
return checkResult;
}
@@ -27,6 +27,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.util.Objects;
import static com.google.common.io.Files.getFileExtension;
/**
* 视频会议控制层
* @Author wangqiong
@@ -69,6 +71,11 @@ public class MsVideoConferenceController extends BaseController {
String filePath = RuoYiConfig.getUploadPath();
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file);
String suffix = getFileExtension(fileName);
if(StrUtil.isNotEmpty(suffix)&& suffix.contains("doc")){
// 上传到onlyoffice
officeFlag=1;
}
String url = serverConfig.getUrl() + fileName;
if(officeFlag != null && officeFlag == 1){
// officeFlag,fileName为annexPath
@@ -83,7 +90,7 @@ public class MsVideoConferenceController extends BaseController {
JSONObject jsonObject = (JSONObject) obj;
caseAttach = MsCaseAttach.builder()
.caseAppliId(caseId)
.annexName(jsonObject.getString("fileName"))
.annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
.annexType(annexType)
.onlyOfficeFileId(jsonObject.getString("fileId"))
.build();
@@ -93,6 +100,7 @@ public class MsVideoConferenceController extends BaseController {
caseAttach.setAnnexPath(replace);
}
caseAttach.setSuffix( (getFileExtension(caseAttach.getAnnexPath())));
msCaseAttachMapper.save(caseAttach);
}
if(caseAttach==null){
@@ -136,6 +144,7 @@ public class MsVideoConferenceController extends BaseController {
.annexType(annexType)
.useId(SecurityUtils.getUserId())
.useAccount(SecurityUtils.getUsername())
.suffix(getFileExtension(path))
.build();
msCaseAttachMapper.save(caseAttach);