Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev
This commit was merged in pull request #150.
This commit is contained in:
@@ -23,6 +23,8 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.google.common.io.Files.getFileExtension;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用请求处理
|
* 通用请求处理
|
||||||
*
|
*
|
||||||
@@ -116,6 +118,7 @@ public class CommonController
|
|||||||
.annexType(annexType)
|
.annexType(annexType)
|
||||||
.useId(SecurityUtils.getUserId())
|
.useId(SecurityUtils.getUserId())
|
||||||
.useAccount(SecurityUtils.getUsername())
|
.useAccount(SecurityUtils.getUsername())
|
||||||
|
.suffix(getFileExtension(path))
|
||||||
.build();
|
.build();
|
||||||
msCaseAttachMapper.save(caseAttach);
|
msCaseAttachMapper.save(caseAttach);
|
||||||
return caseAttach.getAnnexId();
|
return caseAttach.getAnnexId();
|
||||||
|
|||||||
+24
-5
@@ -1,5 +1,6 @@
|
|||||||
package com.ruoyi.web.controller.wisdomarbitrate.miniprogress;
|
package com.ruoyi.web.controller.wisdomarbitrate.miniprogress;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.ruoyi.common.annotation.Anonymous;
|
import com.ruoyi.common.annotation.Anonymous;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
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 com.ruoyi.wisdomarbitrate.service.miniprogress.IdentityAuthenticationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/identityAuthentication")
|
@RequestMapping("/identityAuthentication")
|
||||||
@@ -25,7 +23,25 @@ public class IdentityAuthenticationController extends BaseController {
|
|||||||
@Anonymous
|
@Anonymous
|
||||||
@PostMapping("/selectIdentityAuthenticaEIDtoken")
|
@PostMapping("/selectIdentityAuthenticaEIDtoken")
|
||||||
public AjaxResult 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);
|
return success(tokenResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,6 +51,9 @@ public class IdentityAuthenticationController extends BaseController {
|
|||||||
@Anonymous
|
@Anonymous
|
||||||
@PostMapping("/selectIdentityAuthenticaRespon")
|
@PostMapping("/selectIdentityAuthenticaRespon")
|
||||||
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
|
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
|
||||||
|
if(StrUtil.isEmpty(ientityAuthentication.getEidToken())){
|
||||||
|
return error("EIDtoken不能为空");
|
||||||
|
}
|
||||||
AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
|
AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
|
||||||
return checkResult;
|
return checkResult;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-1
@@ -27,6 +27,8 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
import static com.google.common.io.Files.getFileExtension;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 视频会议控制层
|
* 视频会议控制层
|
||||||
* @Author wangqiong
|
* @Author wangqiong
|
||||||
@@ -69,6 +71,11 @@ public class MsVideoConferenceController extends BaseController {
|
|||||||
String filePath = RuoYiConfig.getUploadPath();
|
String filePath = RuoYiConfig.getUploadPath();
|
||||||
// 上传并返回新文件名称
|
// 上传并返回新文件名称
|
||||||
String fileName = FileUploadUtils.upload(filePath, file);
|
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;
|
String url = serverConfig.getUrl() + fileName;
|
||||||
if(officeFlag != null && officeFlag == 1){
|
if(officeFlag != null && officeFlag == 1){
|
||||||
// officeFlag,fileName为annexPath
|
// officeFlag,fileName为annexPath
|
||||||
@@ -83,7 +90,7 @@ public class MsVideoConferenceController extends BaseController {
|
|||||||
JSONObject jsonObject = (JSONObject) obj;
|
JSONObject jsonObject = (JSONObject) obj;
|
||||||
caseAttach = MsCaseAttach.builder()
|
caseAttach = MsCaseAttach.builder()
|
||||||
.caseAppliId(caseId)
|
.caseAppliId(caseId)
|
||||||
.annexName(jsonObject.getString("fileName"))
|
.annexName(jsonObject.get("fileName")!=null?jsonObject.getString("fileName"):"")
|
||||||
.annexType(annexType)
|
.annexType(annexType)
|
||||||
.onlyOfficeFileId(jsonObject.getString("fileId"))
|
.onlyOfficeFileId(jsonObject.getString("fileId"))
|
||||||
.build();
|
.build();
|
||||||
@@ -93,6 +100,7 @@ public class MsVideoConferenceController extends BaseController {
|
|||||||
caseAttach.setAnnexPath(replace);
|
caseAttach.setAnnexPath(replace);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
caseAttach.setSuffix( (getFileExtension(caseAttach.getAnnexPath())));
|
||||||
msCaseAttachMapper.save(caseAttach);
|
msCaseAttachMapper.save(caseAttach);
|
||||||
}
|
}
|
||||||
if(caseAttach==null){
|
if(caseAttach==null){
|
||||||
@@ -136,6 +144,7 @@ public class MsVideoConferenceController extends BaseController {
|
|||||||
.annexType(annexType)
|
.annexType(annexType)
|
||||||
.useId(SecurityUtils.getUserId())
|
.useId(SecurityUtils.getUserId())
|
||||||
.useAccount(SecurityUtils.getUsername())
|
.useAccount(SecurityUtils.getUsername())
|
||||||
|
.suffix(getFileExtension(path))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
msCaseAttachMapper.save(caseAttach);
|
msCaseAttachMapper.save(caseAttach);
|
||||||
|
|||||||
@@ -172,7 +172,10 @@ elegent:
|
|||||||
identityAuthentication:
|
identityAuthentication:
|
||||||
credentialSecretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
credentialSecretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
||||||
credentialSecretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
credentialSecretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
||||||
|
# 小程序端人脸核身商户id
|
||||||
merchantId: 0NSJ2309281116194321
|
merchantId: 0NSJ2309281116194321
|
||||||
|
# pc端人脸核身商户id
|
||||||
|
pcMerchantId: 0NSJ2309281116194321
|
||||||
privateKeyHexDecodeinfo: 4c3b311bf7b98969994e85928e069574a1e95777f24d1c510679cc3c2f460faf
|
privateKeyHexDecodeinfo: 4c3b311bf7b98969994e85928e069574a1e95777f24d1c510679cc3c2f460faf
|
||||||
# 腾讯云即时通信相关配置
|
# 腾讯云即时通信相关配置
|
||||||
imConfig:
|
imConfig:
|
||||||
|
|||||||
+5
@@ -82,4 +82,9 @@ public class MsCaseAttach {
|
|||||||
*/
|
*/
|
||||||
@Column(name = "other_sys_file_id")
|
@Column(name = "other_sys_file_id")
|
||||||
private String otherSysFileId;
|
private String otherSysFileId;
|
||||||
|
/**
|
||||||
|
* 附件后缀
|
||||||
|
*/
|
||||||
|
@Column(name = "suffix")
|
||||||
|
private String suffix;
|
||||||
}
|
}
|
||||||
+4
@@ -95,5 +95,9 @@ public class MsCaseApplicationVO extends MsCaseApplication {
|
|||||||
* 是否财务,部门长,秘书,0-否,1-是
|
* 是否财务,部门长,秘书,0-否,1-是
|
||||||
*/
|
*/
|
||||||
private Integer otherFlag;
|
private Integer otherFlag;
|
||||||
|
/**
|
||||||
|
* 调解书上传下载按钮权限,调解员,顾问在调节之后,送达之前显示,0-否,1-是
|
||||||
|
*/
|
||||||
|
private Integer mediationFileFlag=0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-7
@@ -47,6 +47,7 @@ import java.util.function.Function;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import static com.google.common.io.Files.getFileExtension;
|
||||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -256,6 +257,7 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode()); //10代表印章图片
|
caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode()); //10代表印章图片
|
||||||
caseAttach.setAnnexPath(savePath);
|
caseAttach.setAnnexPath(savePath);
|
||||||
caseAttach.setAnnexName(saveName);
|
caseAttach.setAnnexName(saveName);
|
||||||
|
caseAttach.setSuffix(getFileExtension(savePath));
|
||||||
int i1 = msCaseAttachMapper.save(caseAttach);
|
int i1 = msCaseAttachMapper.save(caseAttach);
|
||||||
if (i1 > 0) {
|
if (i1 > 0) {
|
||||||
//将附件id保存到公章管理表里
|
//将附件id保存到公章管理表里
|
||||||
@@ -668,11 +670,5 @@ public class DeptIdentifyServiceImpl implements IDeptIdentifyService {
|
|||||||
return ajax;
|
return ajax;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getFileExtension(String fileName) {
|
|
||||||
int lastDotIndex = fileName.lastIndexOf(".");
|
|
||||||
if (lastDotIndex > 0 && lastDotIndex < fileName.length() - 1) {
|
|
||||||
return fileName.substring(lastDotIndex + 1);
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-2
@@ -19,10 +19,10 @@ public interface IdentityAuthenticationService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取Eidtoken
|
* 获取Eidtoken
|
||||||
*
|
* isPC 是否PC端
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JSONObject selectIdentityAuthenticaEIDtoken();
|
JSONObject selectIdentityAuthenticaEIDtoken(boolean isPC);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小程序人脸核身后查询身份认证结果
|
* 小程序人脸核身后查询身份认证结果
|
||||||
@@ -31,4 +31,10 @@ public interface IdentityAuthenticationService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
AjaxResult selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication);
|
AjaxResult selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* H5轮询获取EIDtoken状态
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JSONObject selectPCEIDtokenStatus(String eidToken);
|
||||||
}
|
}
|
||||||
|
|||||||
+35
-3
@@ -8,6 +8,7 @@ import cn.hutool.crypto.symmetric.SymmetricCrypto;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.system.mapper.SysUserMapper;
|
import com.ruoyi.system.mapper.SysUserMapper;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
|
import com.ruoyi.wisdomarbitrate.domain.dto.miniprogress.IdentityAuthentication;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.miniprogress.IdentityAuthenticationMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.miniprogress.IdentityAuthenticationMapper;
|
||||||
@@ -39,6 +40,8 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
|||||||
private String credentialSecretKey;
|
private String credentialSecretKey;
|
||||||
@Value("${identityAuthentication.merchantId}")
|
@Value("${identityAuthentication.merchantId}")
|
||||||
private String merchantId;
|
private String merchantId;
|
||||||
|
@Value("${identityAuthentication.pcMerchantId}")
|
||||||
|
private String pcMerchantId;
|
||||||
@Value("${identityAuthentication.privateKeyHexDecodeinfo}")
|
@Value("${identityAuthentication.privateKeyHexDecodeinfo}")
|
||||||
private String privateKeyHexDecodeinfo;
|
private String privateKeyHexDecodeinfo;
|
||||||
|
|
||||||
@@ -87,7 +90,7 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public JSONObject selectIdentityAuthenticaEIDtoken() {
|
public JSONObject selectIdentityAuthenticaEIDtoken(boolean isPC) {
|
||||||
JSONObject objJSON = new JSONObject();
|
JSONObject objJSON = new JSONObject();
|
||||||
objJSON.put("EidToken", "");
|
objJSON.put("EidToken", "");
|
||||||
try {
|
try {
|
||||||
@@ -102,7 +105,11 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
|||||||
FaceidClient client = new FaceidClient(cred, "", clientProfile);
|
FaceidClient client = new FaceidClient(cred, "", clientProfile);
|
||||||
// 实例化一个请求对象,每个接口都会对应一个request对象
|
// 实例化一个请求对象,每个接口都会对应一个request对象
|
||||||
GetEidTokenRequest req = new GetEidTokenRequest();
|
GetEidTokenRequest req = new GetEidTokenRequest();
|
||||||
|
if(true){
|
||||||
req.setMerchantId(merchantId);
|
req.setMerchantId(merchantId);
|
||||||
|
}else {
|
||||||
|
req.setMerchantId(pcMerchantId);
|
||||||
|
}
|
||||||
// 返回的resp是一个GetEidTokenResponse的实例,与请求对象对应
|
// 返回的resp是一个GetEidTokenResponse的实例,与请求对象对应
|
||||||
GetEidTokenResponse resp = client.GetEidToken(req);
|
GetEidTokenResponse resp = client.GetEidToken(req);
|
||||||
// 输出json格式的字符串回包
|
// 输出json格式的字符串回包
|
||||||
@@ -138,7 +145,7 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小程序人脸核身后查询身份认证结果
|
* 人脸核身后查询身份认证结果
|
||||||
*
|
*
|
||||||
* @param ientityAuthentication
|
* @param ientityAuthentication
|
||||||
* @return
|
* @return
|
||||||
@@ -224,7 +231,32 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
|||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject selectPCEIDtokenStatus(String eidToken) {
|
||||||
|
JSONObject objJSON = null;
|
||||||
|
try {
|
||||||
|
Credential cred = new Credential(credentialSecretId, credentialSecretKey);
|
||||||
|
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||||
|
HttpProfile httpProfile = new HttpProfile();
|
||||||
|
httpProfile.setEndpoint("faceid.tencentcloudapi.com");
|
||||||
|
// 实例化一个client选项,可选的,没有特殊需求可以跳过
|
||||||
|
ClientProfile clientProfile = new ClientProfile();
|
||||||
|
clientProfile.setHttpProfile(httpProfile);
|
||||||
|
// 实例化要请求产品的client对象,clientProfile是可选的
|
||||||
|
FaceidClient client = new FaceidClient(cred, "", clientProfile);
|
||||||
|
// 实例化一个请求对象,每个接口都会对应一个request对象
|
||||||
|
GetEidResultRequest req = new GetEidResultRequest();
|
||||||
|
req.setEidToken(eidToken);
|
||||||
|
// 返回的resp是一个GetEidResultResponse的实例,与请求对象对应
|
||||||
|
GetEidResultResponse resp = client.GetEidResult(req);
|
||||||
|
// 输出json格式的字符串回包,Status String 枚举:init:token未验证 doing: 验证中 finished: 验证完成 timeout: token已超时
|
||||||
|
String s = GetEidResultResponse.toJsonString(resp);
|
||||||
|
objJSON = JSON.parseObject(s);
|
||||||
|
} catch (TencentCloudSDKException e) {
|
||||||
|
throw new ServiceException("获取E证通Token状态失败");
|
||||||
|
}
|
||||||
|
return objJSON;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+42
-11
@@ -79,6 +79,7 @@ import java.util.concurrent.ExecutorService;
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.google.common.io.Files.getFileExtension;
|
||||||
import static com.ruoyi.common.utils.BookMarkUtil.getBookmarkByDocx;
|
import static com.ruoyi.common.utils.BookMarkUtil.getBookmarkByDocx;
|
||||||
import static com.ruoyi.common.utils.PageUtils.startPage;
|
import static com.ruoyi.common.utils.PageUtils.startPage;
|
||||||
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
|
||||||
@@ -193,8 +194,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
|
public List<MsCaseApplicationVO> list(MsCaseApplicationReq req) {
|
||||||
// 是否调解员
|
// 查询所有流程
|
||||||
boolean isMediatorRole=false;
|
Example allFlowExample = new Example(MsCaseFlow.class);
|
||||||
|
allFlowExample.setOrderByClause("sort asc");
|
||||||
|
List<MsCaseFlow> allCaseFlows = caseFlowMapper.selectByExample(allFlowExample);
|
||||||
|
if (CollectionUtil.isEmpty(allCaseFlows)) {
|
||||||
|
throw new ServiceException("未配置案件流程");
|
||||||
|
}
|
||||||
// 根据用户查询角色
|
// 根据用户查询角色
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
// 根据id查询用户
|
// 根据id查询用户
|
||||||
@@ -205,7 +211,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
startPage();
|
startPage();
|
||||||
List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, null,null);
|
List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, null,null);
|
||||||
// 设置申请人被申请人及签名按钮限
|
// 设置申请人被申请人及签名按钮限
|
||||||
setAfflicate(isMediatorRole,list,loginUser.getUserId(),roles);
|
setAfflicate(new HashMap<>(),list,loginUser.getUserId(),roles);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
if(CollectionUtil.isEmpty(roles) ){
|
if(CollectionUtil.isEmpty(roles) ){
|
||||||
@@ -227,6 +233,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
throw new ServiceException("该角色为绑定案件流程");
|
throw new ServiceException("该角色为绑定案件流程");
|
||||||
}
|
}
|
||||||
List<Integer> caseFlowIds = caseFlows.stream().map(MsCaseFlow::getId).collect(Collectors.toList());
|
List<Integer> caseFlowIds = caseFlows.stream().map(MsCaseFlow::getId).collect(Collectors.toList());
|
||||||
|
// 流程名称分组
|
||||||
|
Map<String, Integer> flowNameMap = allCaseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getCaseStatusName, MsCaseFlow::getSort, (k1, k2) -> k2));
|
||||||
|
|
||||||
// 是否查询所有
|
// 是否查询所有
|
||||||
boolean isSelectAll = false;
|
boolean isSelectAll = false;
|
||||||
|
|
||||||
@@ -240,7 +249,6 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
roleIds=null;
|
roleIds=null;
|
||||||
}
|
}
|
||||||
if(StrUtil.equals(role.getRoleName(),"调解员")) {
|
if(StrUtil.equals(role.getRoleName(),"调解员")) {
|
||||||
isMediatorRole=true;
|
|
||||||
req.setMediatorId(String.valueOf(sysUser.getUserId()));
|
req.setMediatorId(String.valueOf(sysUser.getUserId()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -257,25 +265,26 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
// 查询案件列表
|
// 查询案件列表
|
||||||
List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, caseFlowIds,roleIds);
|
List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, caseFlowIds,roleIds);
|
||||||
// 设置申请人被申请人及签名按钮限
|
// 设置申请人被申请人及签名按钮限
|
||||||
setAfflicate(isMediatorRole,list,loginUser.getUserId(),roles);
|
setAfflicate(flowNameMap,list,loginUser.getUserId(),roles);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置申请人被申请人及签名按钮限
|
* 设置申请人被申请人及签名按钮限
|
||||||
* @param isMediatorRole 是否调解员
|
* @param
|
||||||
* @param list
|
* @param list
|
||||||
* @param loginUserId 当前登录用户id
|
* @param loginUserId 当前登录用户id
|
||||||
*/
|
*/
|
||||||
private void setAfflicate(boolean isMediatorRole,List<MsCaseApplicationVO> list,Long loginUserId, List<SysRole> roles ) {
|
private void setAfflicate( Map<String, Integer> flowNameMap,List<MsCaseApplicationVO> list,Long loginUserId, List<SysRole> roles ) {
|
||||||
if(CollectionUtil.isEmpty(list)){
|
if(CollectionUtil.isEmpty(list)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
isMediatorRole=false;
|
// 是否调解员
|
||||||
|
boolean isMediatorRole=false;
|
||||||
// 查询申请人和被申请人
|
// 查询申请人和被申请人
|
||||||
List<Long> caseIds = list.stream().map(MsCaseApplicationVO::getId).collect(Collectors.toList());
|
List<Long> caseIds = list.stream().map(MsCaseApplicationVO::getId).collect(Collectors.toList());
|
||||||
|
Integer mediatorSort = flowNameMap.get("待调解");
|
||||||
|
Integer sendSort = flowNameMap.get("待送达");
|
||||||
List<MsCaseAffiliate> affiliateList = msCaseAffiliateMapper.selectUserRoleByCaseIds(caseIds);
|
List<MsCaseAffiliate> affiliateList = msCaseAffiliateMapper.selectUserRoleByCaseIds(caseIds);
|
||||||
// 根据案件id分组
|
// 根据案件id分组
|
||||||
Map<Long, List<MsCaseAffiliate>> affiliateMap=null;
|
Map<Long, List<MsCaseAffiliate>> affiliateMap=null;
|
||||||
@@ -362,6 +371,13 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
}else {
|
}else {
|
||||||
vo.setSignButtonFlag(0);
|
vo.setSignButtonFlag(0);
|
||||||
}
|
}
|
||||||
|
// 调解员,并且在待调节后,送达前,显示
|
||||||
|
if(mediatorSort!=null && sendSort!=null && isMediatorRole
|
||||||
|
&& null!=flowNameMap.get(vo.getCaseStatusName())
|
||||||
|
&& flowNameMap.get(vo.getCaseStatusName())>mediatorSort
|
||||||
|
&& flowNameMap.get(vo.getCaseStatusName())<=sendSort){
|
||||||
|
vo.setMediationFileFlag(1);
|
||||||
|
}
|
||||||
for (SysRole role : roles) {
|
for (SysRole role : roles) {
|
||||||
if(StrUtil.isNotEmpty(role.getRoleName())){
|
if(StrUtil.isNotEmpty(role.getRoleName())){
|
||||||
if(StrUtil.contains(role.getRoleName(),"财务")
|
if(StrUtil.contains(role.getRoleName(),"财务")
|
||||||
@@ -371,6 +387,10 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
){
|
){
|
||||||
vo.setOtherFlag(1);
|
vo.setOtherFlag(1);
|
||||||
}
|
}
|
||||||
|
if(role.getRoleName().equals("法律顾问")){
|
||||||
|
// 顾问可以上传下载调解书
|
||||||
|
vo.setMediationFileFlag(1);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -413,6 +433,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
if (CollectionUtil.isEmpty(allCaseFlows)) {
|
if (CollectionUtil.isEmpty(allCaseFlows)) {
|
||||||
throw new ServiceException("未配置案件流程");
|
throw new ServiceException("未配置案件流程");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<MsCaseFlow> caseFlows = allCaseFlows;
|
List<MsCaseFlow> caseFlows = allCaseFlows;
|
||||||
MsCaseApplicationReq req = new MsCaseApplicationReq();
|
MsCaseApplicationReq req = new MsCaseApplicationReq();
|
||||||
if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
|
if (StrUtil.equals(SecurityUtils.getUsername(), "admin")) {
|
||||||
@@ -690,6 +711,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
if (CollectionUtil.isNotEmpty(caseAttachList)) {
|
if (CollectionUtil.isNotEmpty(caseAttachList)) {
|
||||||
for (MsCaseAttach caseAttach : caseAttachList) {
|
for (MsCaseAttach caseAttach : caseAttachList) {
|
||||||
caseAttach.setCaseAppliId(caseApplication.getId());
|
caseAttach.setCaseAppliId(caseApplication.getId());
|
||||||
|
if(StrUtil.isNotEmpty(caseAttach.getAnnexPath())){
|
||||||
|
caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!caseApplication.isImportFlag()) {
|
if(!caseApplication.isImportFlag()) {
|
||||||
// 修改案件附件
|
// 修改案件附件
|
||||||
@@ -1522,6 +1546,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
.annexType(annexType)
|
.annexType(annexType)
|
||||||
.useId(SecurityUtils.getUserId())
|
.useId(SecurityUtils.getUserId())
|
||||||
.useAccount(SecurityUtils.getUsername())
|
.useAccount(SecurityUtils.getUsername())
|
||||||
|
.suffix(getFileExtension(path))
|
||||||
.build();
|
.build();
|
||||||
int count = msCaseAttachMapper.save(caseAttach);
|
int count = msCaseAttachMapper.save(caseAttach);
|
||||||
if (count > 0 ) {
|
if (count > 0 ) {
|
||||||
@@ -2399,7 +2424,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
@Override
|
@Override
|
||||||
public AjaxResult saveOnlyOfficeFile(MsCaseAttach caseAttach) {
|
public AjaxResult saveOnlyOfficeFile(MsCaseAttach caseAttach) {
|
||||||
if(StrUtil.isEmpty(caseAttach.getAnnexName())) {
|
if(StrUtil.isEmpty(caseAttach.getAnnexName())) {
|
||||||
caseAttach.setAnnexName("调解书");
|
caseAttach.setAnnexName("调解书.docx");
|
||||||
}
|
}
|
||||||
if(StrUtil.isNotEmpty(caseAttach.getAnnexPath())) {
|
if(StrUtil.isNotEmpty(caseAttach.getAnnexPath())) {
|
||||||
String replace = caseAttach.getAnnexPath().replace("/home/ruoyi/uploadPath", "/profile");
|
String replace = caseAttach.getAnnexPath().replace("/home/ruoyi/uploadPath", "/profile");
|
||||||
@@ -2408,6 +2433,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
||||||
caseAttach.setUseId(getUserInfo().getUserId());
|
caseAttach.setUseId(getUserInfo().getUserId());
|
||||||
caseAttach.setUseAccount(getUserInfo().getUserName());
|
caseAttach.setUseAccount(getUserInfo().getUserName());
|
||||||
|
caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
|
||||||
// 先删除之前的在新增
|
// 先删除之前的在新增
|
||||||
msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), caseAttach.getAnnexType());
|
msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), caseAttach.getAnnexType());
|
||||||
msCaseAttachMapper.save(caseAttach);
|
msCaseAttachMapper.save(caseAttach);
|
||||||
@@ -2415,6 +2441,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询预约信息
|
* 查询预约信息
|
||||||
* @param id
|
* @param id
|
||||||
@@ -3434,6 +3461,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
|
||||||
|
|
||||||
//保存到附件表里,先删除之前的在保存
|
//保存到附件表里,先删除之前的在保存
|
||||||
msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), annexType);
|
msCaseAttachMapper.deleteCaseAttachByCasedIdAndType(caseAttach.getCaseAppliId(), annexType);
|
||||||
@@ -3471,6 +3499,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
|
||||||
msCaseAttachMapper.save(caseAttach);
|
msCaseAttachMapper.save(caseAttach);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3479,6 +3508,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调解书上传到onlyoffice服务器
|
* 调解书上传到onlyoffice服务器
|
||||||
* @param annexPath
|
* @param annexPath
|
||||||
|
|||||||
+3
@@ -76,6 +76,7 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.google.common.io.Files.getFileExtension;
|
||||||
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Service
|
@Service
|
||||||
@@ -1144,6 +1145,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|||||||
caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
caseAttach.setAnnexType(AnnexTypeEnum.MEDIATE_BOOK.getCode());
|
||||||
caseAttach.setAnnexPath(savePath);
|
caseAttach.setAnnexPath(savePath);
|
||||||
caseAttach.setAnnexName(saveName);
|
caseAttach.setAnnexName(saveName);
|
||||||
|
caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
|
||||||
log.info("调解书保存======="+downLoadFile);
|
log.info("调解书保存======="+downLoadFile);
|
||||||
caseAttachMapper.save(caseAttach);
|
caseAttachMapper.save(caseAttach);
|
||||||
// 对接北明,调用上传附件接口
|
// 对接北明,调用上传附件接口
|
||||||
@@ -1225,6 +1227,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
|||||||
caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode()); //10代表印章图片
|
caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode()); //10代表印章图片
|
||||||
caseAttach.setAnnexPath(savePath);
|
caseAttach.setAnnexPath(savePath);
|
||||||
caseAttach.setAnnexName(saveName);
|
caseAttach.setAnnexName(saveName);
|
||||||
|
caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
|
||||||
int i1 = caseAttachMapper.save(caseAttach);
|
int i1 = caseAttachMapper.save(caseAttach);
|
||||||
if (i1 > 0) {
|
if (i1 > 0) {
|
||||||
//将附件id保存到公章管理表里
|
//将附件id保存到公章管理表里
|
||||||
|
|||||||
+3
@@ -59,6 +59,7 @@ import java.nio.file.Paths;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.google.common.io.Files.getFileExtension;
|
||||||
import static com.ruoyi.common.core.domain.AjaxResult.error;
|
import static com.ruoyi.common.core.domain.AjaxResult.error;
|
||||||
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
import static com.ruoyi.common.core.domain.AjaxResult.success;
|
||||||
import static com.ruoyi.common.utils.file.FileUploadUtils.getAbsoluteFile;
|
import static com.ruoyi.common.utils.file.FileUploadUtils.getAbsoluteFile;
|
||||||
@@ -554,6 +555,7 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
|
|||||||
caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
|
||||||
caseAttachMapper.save(caseAttach);
|
caseAttachMapper.save(caseAttach);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}else {
|
}else {
|
||||||
@@ -607,6 +609,7 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
|
|||||||
caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
caseAttach.setOtherSysFileId(caseFileInfo.getFileId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
|
||||||
caseAttachMapper.save(caseAttach);
|
caseAttachMapper.save(caseAttach);
|
||||||
|
|
||||||
return annexName;
|
return annexName;
|
||||||
|
|||||||
+4
@@ -36,6 +36,8 @@ import java.util.List;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.google.common.io.Files.getFileExtension;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class FixSelectFlowDetailUtils {
|
public class FixSelectFlowDetailUtils {
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -121,6 +123,7 @@ public class FixSelectFlowDetailUtils {
|
|||||||
caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode()); //10代表印章图片
|
caseAttach.setAnnexType(AnnexTypeEnum.SEAL_PICTURE.getCode()); //10代表印章图片
|
||||||
caseAttach.setAnnexPath(savePath);
|
caseAttach.setAnnexPath(savePath);
|
||||||
caseAttach.setAnnexName(saveName);
|
caseAttach.setAnnexName(saveName);
|
||||||
|
caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
|
||||||
int i1 = caseAttachMapper.save(caseAttach);
|
int i1 = caseAttachMapper.save(caseAttach);
|
||||||
if (i1 > 0) {
|
if (i1 > 0) {
|
||||||
//将印章信息保存到公章管理表里
|
//将印章信息保存到公章管理表里
|
||||||
@@ -217,6 +220,7 @@ public class FixSelectFlowDetailUtils {
|
|||||||
caseAttach.setAnnexPath(savePath);
|
caseAttach.setAnnexPath(savePath);
|
||||||
caseAttach.setAnnexName(saveName);
|
caseAttach.setAnnexName(saveName);
|
||||||
int i1 = caseAttachMapper.save(caseAttach);
|
int i1 = caseAttachMapper.save(caseAttach);
|
||||||
|
caseAttach.setSuffix(getFileExtension(caseAttach.getAnnexPath()));
|
||||||
if (i1 > 0) {
|
if (i1 > 0) {
|
||||||
//将附件id保存到公章管理表里
|
//将附件id保存到公章管理表里
|
||||||
Long annexId1 = caseAttach.getAnnexId();
|
Long annexId1 = caseAttach.getAnnexId();
|
||||||
|
|||||||
+5
-4
@@ -15,18 +15,19 @@
|
|||||||
<result property="useAccount" column="use_account" />
|
<result property="useAccount" column="use_account" />
|
||||||
<result property="onlyOfficeFileId" column="only_office_file_id" />
|
<result property="onlyOfficeFileId" column="only_office_file_id" />
|
||||||
<result property="otherSysFileId" column="other_sys_file_id" />
|
<result property="otherSysFileId" column="other_sys_file_id" />
|
||||||
|
<result property="suffix" column="suffix" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
|
<insert id="save" useGeneratedKeys="true" keyProperty="annexId">
|
||||||
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id)
|
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id,suffix)
|
||||||
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{useId},#{useAccount},#{sealStatus},#{onlyOfficeFileId})
|
VALUES (#{caseAppliId}, #{annexName}, #{annexPath},#{annexType},#{note},#{useId},#{useAccount},#{sealStatus},#{onlyOfficeFileId},#{suffix})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="batchSave" useGeneratedKeys="true" keyProperty="annexId">
|
<insert id="batchSave" useGeneratedKeys="true" keyProperty="annexId">
|
||||||
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id)
|
INSERT INTO ms_case_attach (case_appli_id, annex_name, annex_path , annex_type,note,use_id,use_account,seal_status,only_office_file_id,suffix)
|
||||||
VALUES
|
VALUES
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
|
|
||||||
|
|
||||||
(#{item.caseAppliId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.useId},#{item.useAccount},#{item.sealStatus},#{item.onlyOfficeFileId})
|
(#{item.caseAppliId}, #{item.annexName}, #{item.annexPath},#{item.annexType},#{item.note},#{item.useId},#{item.useAccount},#{item.sealStatus},#{item.onlyOfficeFileId},#{item.suffix})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<delete id="deleteByFileIds">
|
<delete id="deleteByFileIds">
|
||||||
|
|||||||
Reference in New Issue
Block a user