|
|
|
@ -4,20 +4,18 @@ import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
|
|
import cn.hutool.core.lang.Assert;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.supervision.common.constant.EvidenceConstants;
|
|
|
|
|
import com.supervision.minio.domain.MinioFile;
|
|
|
|
|
import com.supervision.minio.service.MinioService;
|
|
|
|
|
import com.supervision.police.dto.*;
|
|
|
|
|
import com.supervision.police.service.*;
|
|
|
|
|
import com.supervision.police.domain.CaseEvidence;
|
|
|
|
|
import com.supervision.police.domain.ComDictionary;
|
|
|
|
|
import com.supervision.police.domain.EvidenceFile;
|
|
|
|
|
import com.supervision.common.constant.EvidenceConstants;
|
|
|
|
|
import com.supervision.police.domain.*;
|
|
|
|
|
import com.supervision.police.dto.*;
|
|
|
|
|
import com.supervision.police.mapper.CaseEvidenceMapper;
|
|
|
|
|
import com.supervision.police.service.*;
|
|
|
|
|
import com.supervision.police.vo.EvidenceDirectoryReqVO;
|
|
|
|
|
import com.supervision.police.vo.VerifyEvidenceReqVO;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
@ -28,8 +26,6 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.function.Function;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
@ -286,8 +282,7 @@ public class CaseEvidenceServiceImpl extends ServiceImpl<CaseEvidenceMapper, Cas
|
|
|
|
|
updateById(caseEvidence);
|
|
|
|
|
// 根据证据目录id查询提示词
|
|
|
|
|
EvidenceDirectory directory = evidenceDirectoryService.getById(caseEvidence.getDirectoryId());
|
|
|
|
|
EvidenceCategory category = evidenceCategoryService.getById(directory.getCategoryId());
|
|
|
|
|
NotePrompt notePrompt = notePromptService.getById(category.getPromptId());
|
|
|
|
|
NotePrompt notePrompt = notePromptService.getOne(new QueryWrapper<NotePrompt>().eq("evidence_category_id", directory.getCategoryId()));
|
|
|
|
|
if (notePrompt != null) {
|
|
|
|
|
log.info("属性提取开始。");
|
|
|
|
|
long attrStart = System.currentTimeMillis();
|
|
|
|
@ -426,6 +421,7 @@ public class CaseEvidenceServiceImpl extends ServiceImpl<CaseEvidenceMapper, Cas
|
|
|
|
|
* 提取证据信息
|
|
|
|
|
* 1. 只对证据文件进行新增操作,不删除已有的文件
|
|
|
|
|
* 2. 如果第三级目录下已经存在文件,只新增证据文件,对证据进行ocr识别但不对证据进行重新提取操作
|
|
|
|
|
*
|
|
|
|
|
* @param caseId
|
|
|
|
|
* @param evidenceFileDTOS 文件信息
|
|
|
|
|
*/
|
|
|
|
@ -460,6 +456,7 @@ public class CaseEvidenceServiceImpl extends ServiceImpl<CaseEvidenceMapper, Cas
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新案件证据信息 note:这个方法中的事务是一个新的事务,不会与之前的事务保持原子操作
|
|
|
|
|
*
|
|
|
|
|
* @param caseEvidenceDetailDTOList 新旧证据信息
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -532,9 +529,9 @@ public class CaseEvidenceServiceImpl extends ServiceImpl<CaseEvidenceMapper, Cas
|
|
|
|
|
.map(EvidenceProcessDTO::new).collect(Collectors.toList());
|
|
|
|
|
List<EvidenceDirectoryDTO> evidenceDirectoryDTOS = evidenceDirectoryService.listDirectoryTree(caseId);
|
|
|
|
|
List<EvidenceCategory> categoryList = evidenceCategoryService.lambdaQuery().eq(EvidenceCategory::getCaseType, modelCase.getCaseType()).list();
|
|
|
|
|
|
|
|
|
|
List<NotePrompt> notePrompts = notePromptService.list();
|
|
|
|
|
for (EvidenceProcessDTO evidenceProcessDTO : processDTOList) {
|
|
|
|
|
evidenceProcessDTO.setTemplateInfo(evidenceDirectoryDTOS, categoryList);
|
|
|
|
|
evidenceProcessDTO.setTemplateInfo(evidenceDirectoryDTOS, categoryList, notePrompts);
|
|
|
|
|
evidenceProcessDTO.setEvidenceTypeName(categoryList);
|
|
|
|
|
}
|
|
|
|
|
return processDTOList;
|
|
|
|
@ -795,6 +792,7 @@ public class CaseEvidenceServiceImpl extends ServiceImpl<CaseEvidenceMapper, Cas
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查找发生改变的证据
|
|
|
|
|
*
|
|
|
|
|
* @param oldEvidenceList 旧证据列表
|
|
|
|
|
* @param newEvidenceFileList 新证据列表
|
|
|
|
|
* @return 发生改变的证据
|
|
|
|
@ -919,10 +917,9 @@ public class CaseEvidenceServiceImpl extends ServiceImpl<CaseEvidenceMapper, Cas
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 初始化案件证据目录
|
|
|
|
|
*
|
|
|
|
|
* @param evidenceCategoryDTOS 证据分类
|
|
|
|
|
* @param caseId 案件id
|
|
|
|
|
* @param parentId 父级目录id
|
|
|
|
@ -942,9 +939,9 @@ public class CaseEvidenceServiceImpl extends ServiceImpl<CaseEvidenceMapper, Cas
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* left 新增 right 删除
|
|
|
|
|
*
|
|
|
|
|
* @param newFileIdList
|
|
|
|
|
* @param oldFileIdList
|
|
|
|
|
* @return
|
|
|
|
@ -972,6 +969,7 @@ public class CaseEvidenceServiceImpl extends ServiceImpl<CaseEvidenceMapper, Cas
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
record TupleIdRecord(List<String> addFileList ,List<String> updateFileList, List<String> deleteFileList){}
|
|
|
|
|
record TupleIdRecord(List<String> addFileList, List<String> updateFileList, List<String> deleteFileList) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|