# Conflicts:
#	ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/impl/CaseApplicationServiceImpl.java
This commit is contained in:
hejinbo
2023-11-25 18:06:05 +08:00
17 changed files with 424 additions and 65 deletions
@@ -166,6 +166,10 @@ public class CaseApplication extends BaseEntity {
/** 是否仲裁反请求 */
private Integer adjudicaCounter;
/**
* 仲裁反请求原因
*/
private String adjudicaCounterReason;
/** 被申请人是否缺席 */
private Integer isAbsence;
@@ -178,6 +182,14 @@ public class CaseApplication extends BaseEntity {
/** 申请人是否缺席 */
private Integer appliIsAbsen;
public String getAdjudicaCounterReason() {
return adjudicaCounterReason;
}
public void setAdjudicaCounterReason(String adjudicaCounterReason) {
this.adjudicaCounterReason = adjudicaCounterReason;
}
public Integer getAppliIsAbsen() {
return appliIsAbsen;
}
@@ -18,6 +18,10 @@ public class CaseAttach {
* 案件申请id
*/
private Long caseAppliId;
/**
* 案件记录id
*/
private Long caseAppliLogId;
/**
* 附件名称
*/
@@ -46,5 +50,9 @@ public class CaseAttach {
* 印章状态(0未启用,1已启用)
*/
private Integer sealStatus;
/**
* 是否是证据上传,0-否,1-是
*/
private Integer isBatchUpload;
}
@@ -21,6 +21,10 @@ public class ReservedConference {
* 用户id
*/
private Long userId;
/**
* 用户名
*/
private String userName;
/**
* 案件id
*/
@@ -39,6 +43,10 @@ public class ReservedConference {
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date scheduleEndTime;
/**
* 是否超过5分钟
*/
private Boolean isBeforeFiveMinutes;
public ReservedConference() {
@@ -31,6 +31,10 @@ public class CaseEvidenceDTO {
private Integer pendingAppointArbotrar;
/** 是否仲裁反请求 */
private Integer adjudicaCounter;
/**
* 仲裁反请求原因
*/
private String adjudicaCounterReason;
/** 是否管辖异议申请 */
private Integer objectiJuris;
@@ -35,4 +35,10 @@ public interface CaseAffiliateMapper {
* @param affiliateLogList
*/
void updateCaseAffiliateByCaseId(@Param("caseAppliId")Long caseAppliId,@Param("list") List<CaseAffiliate> affiliateLogList);
/**
* 根据案件id删除
* @param caseId
*/
void deleteByCaseId(@Param("caseAppliId") Long caseId);
}
@@ -43,4 +43,5 @@ public interface CaseApplicationLogMapper {
*/
void batchDeleteLog(@Param("ids") List<Long> ids);
CaseApplication selectBeforeCase(@Param("caseId") Long caseId, @Param("version")Integer version);
}
@@ -0,0 +1,30 @@
package com.ruoyi.wisdomarbitrate.mapper;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface CaseAttachLogMapper {
int save(CaseAttach caseAttach);
List<CaseAttach> queryAnnexPathByCaseId(Long id);
List<CaseAttach> queryCaseAttachList(CaseApplication caseApplication);
int updateCaseAttach(CaseAttach caseAttach);
int updateCaseAttachBycaseid(CaseAttach caseAttach);
int deleteByFileIds(@Param("ids") List<Integer> fileIds);
List<CaseAttach> getCaseAttachByCaseIdAndType(CaseAttach caseAttach);
CaseAttach queryAnnexById(Integer annexId);
}
@@ -25,4 +25,11 @@ public interface CaseAttachMapper {
List<CaseAttach> getCaseAttachByCaseIdAndType(CaseAttach caseAttach);
CaseAttach queryAnnexById(Integer annexId);
/**
* 根据案件id和附件类型删除和上传类型
* @param caseAppliId
* @param annexType
*/
void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload);
}
@@ -3,12 +3,14 @@ package com.ruoyi.wisdomarbitrate.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.enums.UpdateSubmitStatus;
import com.ruoyi.common.enums.YesOrNoEnum;
import com.ruoyi.common.utils.ObjectFieldUtils;
import com.ruoyi.common.utils.SmsUtils;
import com.ruoyi.wisdomarbitrate.domain.CaseAffiliate;
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
import com.ruoyi.wisdomarbitrate.domain.SmsSendRecord;
import com.ruoyi.wisdomarbitrate.domain.vo.CompareCaseVO;
import com.ruoyi.wisdomarbitrate.domain.vo.UpdateSubmitVO;
@@ -22,6 +24,7 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
import java.util.stream.Collectors;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
@@ -42,6 +45,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
@Autowired
private CaseAffiliateMapper caseAffiliateMapper;
@Autowired
private CaseAttachMapper caseAttachMapper;
@Autowired
private CaseAttachLogMapper caseAttachLogMapper;
@Autowired
private SmsRecordMapper smsRecordMapper;
@Override
public int insert(CaseApplication caseApplicationLog) {
@@ -105,6 +112,8 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
if (Objects.equals(vo.getIsAgree(), YesOrNoEnum.YES.getCode())) {
// 如果版本号为1,则直接返回
if(vo.getVersion() <= 1){
vo.setUpdateSubmitStatus(UpdateSubmitStatus.AGREE.getCode());
caseApplicationLogMapper.updateStatus(vo);
return AjaxResult.success();
}
// 同意,查询日志记录表本版本数据,将数据更新到主表,并将日志表改版本的状态改为同意
@@ -123,8 +132,24 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
// 更新相关人员主表
if(CollectionUtil.isNotEmpty(affiliateLogList)){
caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
for (CaseAffiliate caseAffiliate : affiliateLogList) {
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
caseAffiliate.setCaseAppliId(vo.getCaseId());
}
caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
}
// // 根据caseLogId查询案件记录附件表
CaseApplication caseApplication = new CaseApplication();
caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
caseApplication.setAnnexType(2);
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
// 更新记录附件表
if(CollectionUtil.isNotEmpty(attachLogList)){
// caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
for (CaseAttach caseAttach : attachLogList) {
caseAttach.setCaseAppliId(vo.getCaseId());
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
// caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
@@ -177,7 +202,6 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
return AjaxResult.success();
}
// todo 给申请人发送短信
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
request.setTemplateId("1996949");
request.setPhone(caseAffiliate.getContactTelphone());
@@ -209,20 +233,29 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
public AjaxResult selectCompareCase(UpdateSubmitVO vo) {
// 查询当前版本号和上一个版本号的案件
CaseApplication afterCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion());
CaseApplication beforeCase = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
CaseApplication beforeCase = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion());
// 查询案件关联人员
beforeCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(beforeCase.getCaseLogId()));
afterCase.setCaseAffiliates(caseAffiliateLogMapper.selectCaseAffiliate(afterCase.getCaseLogId()));
// 查询附件
CaseAttach caseAttach = new CaseAttach();
caseAttach.setCaseAppliLogId(beforeCase.getCaseLogId());
caseAttach.setAnnexType(2);
caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach);
beforeCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
caseAttach.setCaseAppliLogId(afterCase.getCaseLogId());
afterCase.setCaseAttachList(caseAttachLogMapper.getCaseAttachByCaseIdAndType(caseAttach));
CompareCaseVO compareCaseVO = new CompareCaseVO();
compareCaseVO.setBeforeCase(beforeCase);
compareCaseVO.setAfterCase(afterCase);
// 对比两个版本修改的字段
String[] columns = {"caseSubjectAmount","loanStartDate", "loanEndDate","contractNumber","claimInterestOwed","claimLiquidDamag",
"claimPrinciOwed","arbitratClaims","properPreser","requestRule"};
String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAdress","workTelphone","workAddress",
String[] affiliateColumns = {"name", "identityNum","contactTelphone","contactAddress","workTelphone","workAddress",
"nameAgent", "identityNumAgent","contactTelphoneAgent","contactAddressAgent","residenAffili","compLegalPerson",
"compLegalperPost","responSex","responBirth"};
StringBuilder changeColumn = new StringBuilder();
// 对比基本字段
for (String column : columns) {
String beforeValue = ObjectFieldUtils.getValue(beforeCase, column);
String afterValue = ObjectFieldUtils.getValue(afterCase, column);
@@ -241,6 +274,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
}
}
// 对比人员字段
List<CaseAffiliate> beforeCaseCaseAffiliates = beforeCase.getCaseAffiliates();
List<CaseAffiliate> afterCaseCaseAffiliates = afterCase.getCaseAffiliates();
Map<Integer, CaseAffiliate> beforeCaseCaseAffiliateMap = null;
@@ -257,8 +291,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
affiliateChangeColumn.append(column).append(",");
}
}
else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
} else if (beforeCaseCaseAffiliates == null && afterCaseCaseAffiliates != null) {
affiliateChangeColumn = new StringBuilder();
for (String column : affiliateColumns) {
@@ -302,8 +335,49 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
}
}
boolean notEmptyFlag = CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isEmpty(afterCase.getCaseAttachList());
boolean emptyFlag = CollectionUtil.isEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList());
// 对比附件
if(notEmptyFlag || emptyFlag){
changeColumn.append("fileColumn");
}else if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
if(beforeCase.getCaseAttachList().size()!=afterCase.getCaseAttachList().size()){
changeColumn.append("fileColumn");
}else {
Map<String, CaseAttach> afterAttachMap = afterCase.getCaseAttachList().stream().collect(Collectors.toMap(CaseAttach::getAnnexPath, Function.identity(), (n1, n2) -> n2));
for (CaseAttach beforeCaseAttach : beforeCase.getCaseAttachList()) {
if(!afterAttachMap.containsKey(beforeCaseAttach.getAnnexPath())) {
changeColumn.append("fileColumn");
break;
}
}
}
}
compareCaseVO.setChangeColumn(changeColumn.toString());
if(CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
List<CaseAttach> caseAttachList = afterCase.getCaseAttachList();
for (CaseAttach attach : caseAttachList) {
String annexName = attach.getAnnexName();
String prefix = "/profile";
int startIndex = annexName.indexOf(prefix);
startIndex += prefix.length();
String annexPath = "/uploadPath" + annexName.substring(startIndex);
attach.setAnnexPath(annexPath);
int startIndexnew = annexName.lastIndexOf("/");
if (startIndexnew != -1) {
String annexNamenew = annexName.substring(startIndexnew + 1);
attach.setAnnexName(annexNamenew);
}
}
afterCase.setCaseAttachList(caseAttachList);
}
return AjaxResult.success(compareCaseVO);
}
@@ -319,7 +393,7 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() );
}else {
caseApplicationLog = caseApplicationLogMapper.selectByCaseIdAndVersion(vo.getCaseId(), vo.getVersion() - 1);
caseApplicationLog = caseApplicationLogMapper.selectBeforeCase(vo.getCaseId(), vo.getVersion() );
}
if (caseApplicationLog == null) {
return;
@@ -330,13 +404,30 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
// 根据caseLogId查询相关人员表
List<CaseAffiliate> affiliateLogList = caseAffiliateLogMapper.selectCaseAffiliate(caseApplicationLog.getCaseLogId());
// 更新案件主表
caseApplicationMapper.updataCaseApplication(caseApplicationLog);
// 更新相关人员主表
if(CollectionUtil.isNotEmpty(affiliateLogList)){
caseAffiliateMapper.deleteByCaseId(vo.getCaseId());
for (CaseAffiliate caseAffiliate : affiliateLogList) {
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
caseAffiliate.setCaseAppliId(vo.getCaseId());
}
caseAffiliateMapper.batchCaseAffiliate(affiliateLogList);
}
// // 根据caseLogId查询案件记录附件表
CaseApplication caseApplication = new CaseApplication();
caseApplication.setCaseLogId(caseApplicationLog.getCaseLogId());
caseApplication.setAnnexType(2);
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
// 更新记录附件表
if(CollectionUtil.isNotEmpty(attachLogList)){
// caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
for (CaseAttach caseAttach : attachLogList) {
caseAttach.setCaseAppliId(vo.getCaseId());
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
// caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
@@ -127,6 +127,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
private CaseApplicationLogMapper caseApplicationLogMapper;
@Autowired
private CaseAffiliateLogMapper caseAffiliateLogMapper;
@Autowired
private CaseAttachLogMapper caseAttachLogMapper;
// 手机号正则
private static final Pattern TELEPHONE_REGX = Pattern.compile("^1(3\\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\\d|9[0-35-9])\\d{8}$");
@@ -978,7 +980,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
// 插入案件日志人员相关表
caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
if(CollectionUtil.isNotEmpty(caseAttachList)) {
List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
// 插入日志附件表
if(CollectionUtil.isNotEmpty(filterList)) {
for (CaseAttach caseAttach : filterList) {
// 查询附件表
CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
attach.setCaseAppliLogId(caseApplication.getId());
caseAttachLogMapper.save(attach);
}
}
} caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
}
});
@@ -1083,12 +1097,25 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
}
List<CaseAttach> caseAttachList = caseApplication.getCaseAttachList();
if (caseAttachList != null && caseAttachList.size() > 0) {
for (CaseAttach caseAttach : caseAttachList) {
caseAttach.setCaseAppliId(caseApplication.getId());
caseAttachMapper.updateCaseAttach(caseAttach);
// 立案申请状态直接修改主表信息
if (caseAttachList != null && caseAttachList.size() > 0
&& caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(filterList)){
// 先删除2的附件在新增
// caseAttachMapper.deleteByCasedIdAndType(caseApplication.getId(),2,0);
// for (CaseAttach caseAttach : filterList) {
// caseAttach.setCaseAppliId(caseApplication.getId());
// caseAttachMapper.save(caseAttach);
// }
for (CaseAttach caseAttach : caseAttachList) {
caseAttach.setCaseAppliId(caseApplication.getId());
caseAttachMapper.updateCaseAttach(caseAttach);
}
}
}
// 根据案件id查询最新版本号
Integer maxVersion = caseApplicationLogMapper.selectMaxVersionByCaseId(caseApplication.getId());
@@ -1103,12 +1130,31 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
// 异步新增案件日志
ThreadPoolUtil.execute(() -> {
caseApplication.setCaseAppliId(caseApplication.getId());
int insertRow = caseApplicationLogMapper.insert(caseApplication);
if (insertRow != 0 && CollectionUtil.isNotEmpty(caseAffiliates)) {
caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
// 插入案件日志人员相关表
caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
try {
caseApplication.setCaseAppliId(caseApplication.getId());
int insertRow = caseApplicationLogMapper.insert(caseApplication);
if (insertRow != 0 ) {
if( CollectionUtil.isNotEmpty(caseAffiliates)) {
caseAffiliates.forEach(caseAffiliate -> caseAffiliate.setCaseAppliLogId(caseApplication.getId()));
// 插入案件日志人员相关表
caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
}
if(CollectionUtil.isNotEmpty(caseAttachList)) {
List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
// 插入日志附件表
if(CollectionUtil.isNotEmpty(filterList)) {
for (CaseAttach caseAttach : filterList) {
// 查询附件表
CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
attach.setCaseAppliLogId(caseApplication.getId());
caseAttachLogMapper.save(attach);
}
}
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
});
@@ -2722,8 +2768,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
public long createRoomId(Long caseId) {
long roomId = generateRoomId();
// 新增预约会议表
// ReservedConference conference = new ReservedConference(caseId, roomId,
// null, null,0);
// ReservedConference conference = new ReservedConference(caseId, SecurityUtils.getUserId(),roomId,
// null, null);
// reservedConferenceMapper.insert(conference);
// 绑定案件与房间号
caseApplicationMapper.bindCaseId(caseId, String.valueOf(roomId));
@@ -2757,25 +2803,36 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
@Transactional
public List<ReservedConference> reserveConferenceList(Long caseId) {
List<ReservedConference> reservedConferences = reservedConferenceMapper.selectListByCaseId(caseId);
List<ReservedConference> result = new ArrayList<>();
// 判断当前时间是否大于结束时间,如果大于,则把该房间删掉
if (CollectionUtil.isNotEmpty(reservedConferences)) {
List<Long> ids = new ArrayList<>();
for (ReservedConference reservedConference : reservedConferences) {
Date endTime = reservedConference.getScheduleEndTime();
Date now = new Date();
if (now.after(endTime)) {
ids.add(reservedConference.getId());
} else {
result.add(reservedConference);
}
}
if (CollectionUtil.isNotEmpty(ids)) {
// 根据id批量删除
reservedConferenceMapper.batchDeleteByIds(ids);
if (CollectionUtil.isEmpty(reservedConferences)) {
return reservedConferences;
}
Map<Long,String> userIdMap = null;
List<Long> userIds = reservedConferences.stream().map(ReservedConference::getUserId).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(userIds)){
// 根据userids查询用户名
List<SysUser> userList = sysUserMapper.selectUserListByIds(userIds);
if(CollectionUtil.isNotEmpty(userList)){
userIdMap = userList.stream().collect(Collectors.toMap(SysUser::getUserId,SysUser::getUserName));
}
}
return result;
for (ReservedConference reservedConference : reservedConferences) {
if(null!=reservedConference.getUserId() && null!=userIdMap){
reservedConference.setUserName(userIdMap.get(reservedConference.getUserId()));
}
Date startTime = reservedConference.getScheduleStartTime();
if (null == startTime) {
continue;
}
long beforeMinutes = startTime.getTime() - 1000 * 60 * 5;
if (System.currentTimeMillis() < beforeMinutes) {
reservedConference.setIsBeforeFiveMinutes(true);
} else {
reservedConference.setIsBeforeFiveMinutes(false);
}
}
return reservedConferences;
}
/**
@@ -125,7 +125,14 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
}
CaseAttach caseAttachselect = new CaseAttach();
caseAttachselect.setAnnexId(caseAttach.getAnnexId());
caseAttachselect.setAnnexName(caseAttach.getAnnexName());
String annexName = caseAttach.getAnnexName();
if(StrUtil.isNotEmpty(annexName)) {
int startIndexnew = annexName.lastIndexOf("/");
if (startIndexnew != -1) {
String annexNamenew = annexName.substring(startIndexnew + 1);
caseAttach.setAnnexName(annexNamenew);
}
}
caseAttachselect.setAnnexType(caseAttach.getAnnexType());
return AjaxResult.success("上传成功", caseAttachselect);
} catch (IOException e) {
@@ -193,6 +200,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
caseApplication.setId(caseEvidenceDTO.getCaseId());
CaseApplication caseApplication1 = caseApplicationMapper.selectCaseApplication(caseApplication);
if (caseApplication1 != null) {
caseApplication1.setAdjudicaCounterReason(caseEvidenceDTO.getAdjudicaCounterReason());
int caseStatus = caseApplication1.getCaseStatus();
caseApplication1.setObjectionAddEviden(caseEvidenceDTO.getObjectionAddEviden());
//默认书面审理
@@ -246,6 +254,7 @@ public class CaseEvidenceServiceImpl implements ICaseEvidenceService {
.annexType(annexType)
.userId(userId)
.userName(userName)
.isBatchUpload(1)
.build();
int count = caseAttachMapper.save(caseAttach);
if (count > 0 && annexType != null && annexType != 8) {
@@ -365,7 +365,9 @@ public class VideoServiceImpl implements VideoService {
staticAndMksDir = Paths.get(absPath).toFile().toString();
long downloadFile = HttpUtil.downloadFile(fileUrl, staticAndMksDir);
if(downloadFile>0) {
log.info("下载成功roomId"+roomId);
Long caseId = caseApplicationMapper.selectCaseIdByRoomId(roomId);
log.info("下载成功caseId"+caseId);
String annexName = getPathFileName(RuoYiConfig.getVideoUploadPath(), fileName);
// 存入数据库
CaseAttach caseAttach = CaseAttach.builder().caseAppliId(caseId)
@@ -374,6 +376,7 @@ public class VideoServiceImpl implements VideoService {
.annexType(9)
.build();
caseAttachMapper.save(caseAttach);
log.info("保存附件号成功");
return annexName;
}
}