案件修改
This commit is contained in:
@@ -50,5 +50,9 @@ public class CaseAttach {
|
||||
* 印章状态(0未启用,1已启用)
|
||||
*/
|
||||
private Integer sealStatus;
|
||||
/**
|
||||
* 是否是证据上传,0-否,1-是
|
||||
*/
|
||||
private Integer isBatchUpload;
|
||||
|
||||
}
|
||||
|
||||
@@ -39,6 +39,10 @@ public class ReservedConference {
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date scheduleEndTime;
|
||||
/**
|
||||
* 是否超过5分钟
|
||||
*/
|
||||
private Boolean isBeforeFiveMinutes;
|
||||
|
||||
|
||||
public ReservedConference() {
|
||||
|
||||
@@ -27,9 +27,9 @@ public interface CaseAttachMapper {
|
||||
CaseAttach queryAnnexById(Integer annexId);
|
||||
|
||||
/**
|
||||
* 根据案件id和附件类型删除
|
||||
* 根据案件id和附件类型删除和上传类型
|
||||
* @param caseAppliId
|
||||
* @param annexType
|
||||
*/
|
||||
void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType);
|
||||
void deleteByCasedIdAndType(@Param("caseAppliId")Long caseAppliId,@Param("annexType") int annexType,@Param("isBatchUpload") int isBatchUpload);
|
||||
}
|
||||
|
||||
+26
-8
@@ -146,10 +146,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
|
||||
// 更新记录附件表
|
||||
if(CollectionUtil.isNotEmpty(attachLogList)){
|
||||
caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2);
|
||||
// caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
|
||||
for (CaseAttach caseAttach : attachLogList) {
|
||||
caseAttach.setCaseAppliId(vo.getCaseId());
|
||||
caseAttachMapper.save(caseAttach);
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
|
||||
@@ -202,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());
|
||||
@@ -337,12 +336,12 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
|
||||
|
||||
}
|
||||
boolean notEmptyFlag = CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isEmpty(beforeCase.getCaseAttachList());
|
||||
boolean emptyFlag = CollectionUtil.isEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList());
|
||||
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(beforeCase.getCaseAttachList())){
|
||||
}else if(CollectionUtil.isNotEmpty(beforeCase.getCaseAttachList()) && CollectionUtil.isNotEmpty(afterCase.getCaseAttachList())){
|
||||
if(beforeCase.getCaseAttachList().size()!=afterCase.getCaseAttachList().size()){
|
||||
changeColumn.append("fileColumn");
|
||||
}else {
|
||||
@@ -360,6 +359,25 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
|
||||
}
|
||||
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);
|
||||
}
|
||||
@@ -406,10 +424,10 @@ public class CaseApplicationLogServiceImpl implements CaseApplicationLogService
|
||||
List<CaseAttach> attachLogList = caseAttachLogMapper.queryCaseAttachList(caseApplication);
|
||||
// 更新记录附件表
|
||||
if(CollectionUtil.isNotEmpty(attachLogList)){
|
||||
caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2);
|
||||
// caseAttachMapper.deleteByCasedIdAndType(vo.getCaseId(), 2,0);
|
||||
for (CaseAttach caseAttach : attachLogList) {
|
||||
caseAttach.setCaseAppliId(vo.getCaseId());
|
||||
caseAttachMapper.save(caseAttach);
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
}
|
||||
}
|
||||
// caseAffiliateMapper.updateCaseAffiliateByCaseId(caseApplicationLog.getCaseAppliId(), affiliateLogList);
|
||||
|
||||
+51
-13
@@ -969,7 +969,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);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1077,11 +1089,22 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
// 立案申请状态直接修改主表信息
|
||||
if (caseAttachList != null && caseAttachList.size() > 0
|
||||
&& caseApplication.getCaseStatus()!=null && caseApplication.getCaseStatus().equals(CaseApplicationConstants.CASE_APPLICATION)) {
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
caseAttach.setCaseAppliId(caseApplication.getId());
|
||||
caseAttachMapper.updateCaseAttach(caseAttach);
|
||||
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());
|
||||
@@ -1106,13 +1129,16 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliateLogMapper.batchCaseAffiliate(caseAffiliates);
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(caseAttachList)) {
|
||||
List<CaseAttach> filterList = caseAttachList.stream().filter(c -> c.getAnnexType().equals(2)).collect(Collectors.toList());
|
||||
// 插入日志附件表
|
||||
for (CaseAttach caseAttach : caseAttachList) {
|
||||
// 查询附件表
|
||||
CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
|
||||
attach.setCaseAppliLogId(caseApplication.getId());
|
||||
caseAttachLogMapper.save(attach);
|
||||
}
|
||||
if(CollectionUtil.isNotEmpty(filterList)) {
|
||||
for (CaseAttach caseAttach : filterList) {
|
||||
// 查询附件表
|
||||
CaseAttach attach = caseAttachMapper.queryAnnexById(caseAttach.getAnnexId());
|
||||
attach.setCaseAppliLogId(caseApplication.getId());
|
||||
caseAttachLogMapper.save(attach);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2731,8 +2757,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));
|
||||
@@ -2766,6 +2792,19 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
@Transactional
|
||||
public List<ReservedConference> reserveConferenceList(Long caseId) {
|
||||
List<ReservedConference> reservedConferences = reservedConferenceMapper.selectListByCaseId(caseId);
|
||||
if(CollectionUtil.isNotEmpty(reservedConferences)){
|
||||
for (ReservedConference reservedConference : reservedConferences) {
|
||||
Date startTime = reservedConference.getScheduleStartTime();
|
||||
if(null != startTime){
|
||||
long beforeMinutes = startTime.getTime() - 1000 * 60 * 5;
|
||||
if(System.currentTimeMillis()<beforeMinutes ){
|
||||
reservedConference.setIsBeforeFiveMinutes(true);
|
||||
}else {
|
||||
reservedConference.setIsBeforeFiveMinutes(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return reservedConferences;
|
||||
}
|
||||
@@ -2782,7 +2821,6 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
return success( reservedConferenceMapper.deleteByRoomId(roomId));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
+9
-1
@@ -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) {
|
||||
@@ -246,6 +253,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) {
|
||||
|
||||
+3
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user