bug修复
This commit is contained in:
+21
-1
@@ -185,6 +185,8 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
}
|
||||
// Map<String, MsCaseFlow> flowMap = caseFlows.stream().collect(Collectors.toMap(MsCaseFlow::getButtonAuthFlag, Function.identity()));
|
||||
List<String> caseStatusNames = caseFlows.stream().map(MsCaseFlow::getCaseStatusName).collect(Collectors.toList());
|
||||
// 是否调解员
|
||||
boolean isMediatorRole=false;
|
||||
// 如果是申请人,可以看见申请人为自己(即自然人)或者委托代理人为自己的案件(即机构)
|
||||
for (SysRole role : roles) {
|
||||
if(StrUtil.isNotEmpty(role.getRoleName())){
|
||||
@@ -209,6 +211,7 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
break;
|
||||
}
|
||||
if(StrUtil.equals(role.getRoleName(),"调解员")) {
|
||||
isMediatorRole=true;
|
||||
req.setMediatorId(String.valueOf(sysUser.getUserId()));
|
||||
break;
|
||||
}
|
||||
@@ -220,7 +223,21 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
}
|
||||
startPage();
|
||||
// 查询案件列表
|
||||
return msCaseApplicationMapper.list(req, caseStatusNames);
|
||||
List<MsCaseApplicationVO> list = msCaseApplicationMapper.list(req, caseStatusNames);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
// 判断调解员签名按钮权限,0-显示,1-不显示
|
||||
for (MsCaseApplicationVO vo : list) {
|
||||
if (isMediatorRole && vo.getMediaResult()!=null && vo.getMediaResult()==5) {
|
||||
// 是调解员并且是和解协议,不显示
|
||||
vo.setSignButtonFlag(1);
|
||||
|
||||
}else {
|
||||
vo.setSignButtonFlag(0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2027,6 +2044,9 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
||||
if(caseFlow != null){
|
||||
application.setCaseFlowId(caseFlow.getId());
|
||||
application.setCaseStatusName(caseFlow.getCaseStatusName());
|
||||
// 新增日志
|
||||
CaseLogUtils.insertCaseLog(application.getId(), currentFlow.getNodeId(), currentFlow.getCaseStatusName(),"");
|
||||
|
||||
}
|
||||
|
||||
application.setMediaResult(mediaResult);
|
||||
|
||||
+17
-12
@@ -53,8 +53,7 @@ import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
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.getPathFileName;
|
||||
import static com.ruoyi.common.utils.file.FileUploadUtils.*;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
@@ -454,23 +453,29 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
|
||||
String fileName = fileUrl.substring(fileUrl.lastIndexOf("/"));
|
||||
fileName = fileName.replace("/", "");
|
||||
fileName=fileId+fileName;
|
||||
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), fileName).getAbsolutePath();
|
||||
String annexName=System.currentTimeMillis()+fileName;
|
||||
String absPath = getAbsoluteFile(RuoYiConfig.getVideoUploadPath(), annexName).getAbsolutePath();
|
||||
staticAndMksDir = Paths.get(absPath).toFile().toString();
|
||||
long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
|
||||
if(downloadFile>0) {
|
||||
|
||||
Example example = new Example(MsCaseApplication.class);
|
||||
example.createCriteria().andEqualTo("roomId", roomId);
|
||||
MsCaseApplication caseApplication = caseApplicationMapper.selectOneByExample(example);
|
||||
if(caseApplication != null) {
|
||||
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
|
||||
// 存入数据库
|
||||
MsCaseAttach caseAttach = MsCaseAttach.builder().caseAppliId(caseApplication.getId())
|
||||
.annexName(fileName)
|
||||
.annexPath(annexName)
|
||||
.annexType(AnnexTypeEnum.MEETING_VIDEO.getCode())
|
||||
.build();
|
||||
caseAttachMapper.save(caseAttach);
|
||||
return annexName;
|
||||
// 根据文件名称查询附件,如果该视频已存在则不存入数据库
|
||||
int count= caseAttachMapper.countByfileName(fileName,caseApplication.getId());
|
||||
if(count<1) {
|
||||
annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), annexName);
|
||||
// 存入数据库
|
||||
MsCaseAttach caseAttach = MsCaseAttach.builder().caseAppliId(caseApplication.getId())
|
||||
.annexName(fileName)
|
||||
.annexPath(annexName)
|
||||
.annexType(AnnexTypeEnum.MEETING_VIDEO.getCode())
|
||||
.build();
|
||||
caseAttachMapper.save(caseAttach);
|
||||
return annexName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user