Merge remote-tracking branch 'origin/dev_1.0.0' into dev_1.0.0

topo_dev
liu 9 months ago
commit a67e64ae72

@ -6,7 +6,7 @@ import com.supervision.police.domain.NotePrompt;
import com.supervision.police.domain.NoteRecord; import com.supervision.police.domain.NoteRecord;
import com.supervision.police.domain.TripleInfo; import com.supervision.police.domain.TripleInfo;
import com.supervision.police.dto.ListDTO; import com.supervision.police.dto.ListDTO;
import com.supervision.police.dto.NoteRecordDTO; import com.supervision.police.vo.NoteRecordReqVO;
import com.supervision.police.dto.TypeDTO; import com.supervision.police.dto.TypeDTO;
import com.supervision.police.service.ModelRecordTypeService; import com.supervision.police.service.ModelRecordTypeService;
import com.supervision.police.service.NoteRecordSplitService; import com.supervision.police.service.NoteRecordSplitService;
@ -106,7 +106,7 @@ public class RecordController {
* @return * @return
*/ */
@PostMapping("/addOrUpdRecords") @PostMapping("/addOrUpdRecords")
public R<String> uploadRecords(@RequestBody NoteRecordDTO records) throws IOException { public R<String> uploadRecords(@RequestBody NoteRecordReqVO records) throws IOException {
return R.ok(noteRecordSplitService.uploadRecords(records)); return R.ok(noteRecordSplitService.uploadRecords(records));
} }

@ -1,83 +1,63 @@
package com.supervision.police.dto; package com.supervision.police.dto;
import cn.hutool.core.collection.CollUtil;
import com.supervision.police.domain.NoteRecord;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.util.List; import java.time.LocalDateTime;
@Data @Data
public class NoteRecordDTO { public class NoteRecordDTO {
@Schema(description = "笔录ID")
private String id; private String id;
/** @Schema(description = "案件ID")
* id
*/
private String caseId; private String caseId;
/** @Schema(description = "笔录名称")
*
*/
private String recordName; private String recordName;
/**
* id
*/
private List<String> fileIdList;
@Schema(description = "文件ID")
private String fileIds;
@Schema(description = "笔录人员id")
private String personId;
/** @Schema(description = "案件人员ID")
* private String casePersonId;
*/
@Schema(description = "案件人员身份证号")
private String casePersonIdCard;
@Schema(description = "姓名")
private String name; private String name;
/**
* @Schema(description = "角色")
*/
private String role; private String role;
/**
* @Schema(description = "供述材料数量")
*/
private Integer confessionMaterial; private Integer confessionMaterial;
/**
* @Schema(description = "询问人")
*/
private String lawAsker; private String lawAsker;
/**
* @Schema(description = "供述开始时间")
*/
private String confessionStartTime; private String confessionStartTime;
/** /**
* *
*/ */
@Schema(description = "供述结束时间")
private String confessionEndTime; private String confessionEndTime;
public NoteRecord toNoteRecord(){ @Schema(description = "排序序号")
NoteRecord noteRecord = new NoteRecord(); private Integer indexNum;
noteRecord.setId(id);
noteRecord.setCaseId(caseId); @Schema(description = "创建时间")
noteRecord.setRecordName(recordName); private LocalDateTime createTime;
if (CollUtil.isNotEmpty(fileIdList)){
noteRecord.setFileIds(CollUtil.join(fileIdList, ","));
}
noteRecord.setName(name);
noteRecord.setRole(role);
noteRecord.setConfessionMaterial(confessionMaterial);
noteRecord.setLawAsker(lawAsker);
noteRecord.setConfessionStartTime(confessionStartTime);
noteRecord.setConfessionEndTime(confessionEndTime);
noteRecord.setCasePersonId(personId);
return noteRecord;
}
} }

@ -90,23 +90,24 @@ public class NoteRecordDetailDTO {
public NoteRecordDetailDTO() { public NoteRecordDetailDTO() {
} }
public NoteRecordDetailDTO(NoteRecord noteRecord, Map<String, MinioFile> fileMap) { public NoteRecordDetailDTO(NoteRecordDTO noteRecordDTO, Map<String, MinioFile> fileMap) {
if (Objects.isNull(noteRecord)){ if (Objects.isNull(noteRecordDTO)){
return; return;
} }
this.id = noteRecord.getId(); this.id = noteRecordDTO.getId();
this.caseId = noteRecord.getCaseId(); this.caseId = noteRecordDTO.getCaseId();
this.recordName = noteRecord.getRecordName(); this.recordName = noteRecordDTO.getRecordName();
this.personId = noteRecord.getCasePersonId(); this.personId = noteRecordDTO.getCasePersonId();
this.name = noteRecord.getName(); this.name = noteRecordDTO.getName();
this.role = noteRecord.getRole(); this.role = noteRecordDTO.getRole();
this.confessionMaterial = noteRecord.getConfessionMaterial(); this.confessionMaterial = noteRecordDTO.getConfessionMaterial();
this.lawAsker = noteRecord.getLawAsker(); this.lawAsker = noteRecordDTO.getLawAsker();
this.confessionStartTime = noteRecord.getConfessionStartTime(); this.confessionStartTime = noteRecordDTO.getConfessionStartTime();
this.confessionEndTime = noteRecord.getConfessionEndTime(); this.confessionEndTime = noteRecordDTO.getConfessionEndTime();
this.createTime = noteRecord.getCreateTime(); this.createTime = noteRecordDTO.getCreateTime();
if (StrUtil.isNotEmpty(noteRecord.getFileIds())){ this.personIdCard = noteRecordDTO.getCasePersonIdCard();
this.fileList = Arrays.stream(noteRecord.getFileIds().split(",")).map(fileId->{ if (StrUtil.isNotEmpty(noteRecordDTO.getFileIds())){
this.fileList = Arrays.stream(noteRecordDTO.getFileIds().split(",")).map(fileId->{
MinioFile minioFile = fileMap.get(fileId); MinioFile minioFile = fileMap.get(fileId);
if (Objects.isNull(minioFile)){ if (Objects.isNull(minioFile)){
return null; return null;

@ -2,6 +2,9 @@ package com.supervision.police.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.supervision.police.domain.NoteRecord; import com.supervision.police.domain.NoteRecord;
import com.supervision.police.dto.NoteRecordDTO;
import java.util.List;
/** /**
* (NoteRecord)访 * (NoteRecord)访
@ -11,5 +14,6 @@ import com.supervision.police.domain.NoteRecord;
*/ */
public interface NoteRecordMapper extends BaseMapper<NoteRecord> { public interface NoteRecordMapper extends BaseMapper<NoteRecord> {
List<NoteRecordDTO> selectNoteRecordDTOList(NoteRecord noteRecord);
} }

@ -13,5 +13,5 @@ public interface CasePersonService extends IService<CasePerson> {
* @param caseActorIdCard * @param caseActorIdCard
* @return true false * @return true false
*/ */
boolean saveCaseActor(String caseId,String caseActorName,String caseActorIdCard); boolean saveCaseActor(String caseId,String caseActorName,String caseActorIdCard);
} }

@ -12,6 +12,6 @@ public interface CaseTaskRecordService extends IService<CaseTaskRecord> {
void taskCountIncrement(String caseId,String recordId); void taskCountIncrement(String caseId,String recordId);
void finishCountIncrement(String caseId, String recordId); void finishCountIncrement(String caseId, String recordId);
} }

@ -0,0 +1,12 @@
package com.supervision.police.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.supervision.police.domain.NoteRecord;
import com.supervision.police.dto.NoteRecordDTO;
import java.util.List;
public interface NoteRecordService extends IService<NoteRecord> {
List<NoteRecordDTO> selectNoteRecordDTOList(NoteRecord noteRecord);
}

@ -3,14 +3,14 @@ package com.supervision.police.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.supervision.police.domain.NoteRecord; import com.supervision.police.domain.NoteRecord;
import com.supervision.police.domain.NoteRecordSplit; import com.supervision.police.domain.NoteRecordSplit;
import com.supervision.police.dto.NoteRecordDTO; import com.supervision.police.vo.NoteRecordReqVO;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
public interface NoteRecordSplitService extends IService<NoteRecordSplit> { public interface NoteRecordSplitService extends IService<NoteRecordSplit> {
String uploadRecords(NoteRecordDTO records) throws IOException; String uploadRecords(NoteRecordReqVO records) throws IOException;
Map<String, Object> queryRecords(NoteRecord noteRecord, Integer page, Integer size); Map<String, Object> queryRecords(NoteRecord noteRecord, Integer page, Integer size);

@ -1,11 +1,11 @@
package com.supervision.police.service.impl; package com.supervision.police.service.impl;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.supervision.police.domain.CasePerson; import com.supervision.police.domain.CasePerson;
import com.supervision.police.mapper.CasePersonMapper; import com.supervision.police.mapper.CasePersonMapper;
import com.supervision.police.service.CasePersonService; import com.supervision.police.service.CasePersonService;
import com.supervision.police.service.CaseStatusManageService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -14,6 +14,9 @@ import org.springframework.stereotype.Service;
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class CasePersonServiceImpl extends ServiceImpl<CasePersonMapper, CasePerson> implements CasePersonService { public class CasePersonServiceImpl extends ServiceImpl<CasePersonMapper, CasePerson> implements CasePersonService {
private final CaseStatusManageService caseStatusManageService;
@Override @Override
public boolean saveCaseActor(String caseId, String caseActorName, String caseActorIdCard) { public boolean saveCaseActor(String caseId, String caseActorName, String caseActorIdCard) {
@ -35,7 +38,12 @@ public class CasePersonServiceImpl extends ServiceImpl<CasePersonMapper, CasePer
casePerson.setCaseActorFlag(1); casePerson.setCaseActorFlag(1);
// 角色设置为行为人 // 角色设置为行为人
casePerson.setRoleCode("1"); casePerson.setRoleCode("1");
return super.save(casePerson); boolean save = super.save(casePerson);
if (save){
caseStatusManageService.whenSaveCasePeople(caseId, casePerson);
}
return save;
} }
} }

@ -219,6 +219,7 @@ public class ModelCaseServiceImpl extends ServiceImpl<ModelCaseMapper, ModelCase
} }
@Override @Override
@Transactional(transactionManager = "dataSourceTransactionManager", rollbackFor = Exception.class)
public boolean updatePerson(CasePerson person) { public boolean updatePerson(CasePerson person) {
Assert.notEmpty(person.getId(), "id不能为空"); Assert.notEmpty(person.getId(), "id不能为空");
@ -231,11 +232,15 @@ public class ModelCaseServiceImpl extends ServiceImpl<ModelCaseMapper, ModelCase
Assert.notNull(casePerson, "该人员不存在"); Assert.notNull(casePerson, "该人员不存在");
Assert.isFalse(Integer.valueOf(1).equals(casePerson.getCaseActorFlag()), "该人员为案件行为人,不能修改"); Assert.isFalse(Integer.valueOf(1).equals(casePerson.getCaseActorFlag()), "该人员为案件行为人,不能修改");
return casePersonService.lambdaUpdate().eq(CasePerson::getId, person.getId()) boolean update = casePersonService.lambdaUpdate().eq(CasePerson::getId, person.getId())
.set(CasePerson::getIdCard, person.getIdCard()) .set(CasePerson::getIdCard, person.getIdCard())
.set(CasePerson::getName, person.getName()) .set(CasePerson::getName, person.getName())
.set(CasePerson::getRoleCode, person.getRoleCode()) .set(CasePerson::getRoleCode, person.getRoleCode())
.update(); .update();
if (update){
caseStatusManageService.whenSaveCasePeople(person.getCaseId(), person);
}
return update;
} }

@ -0,0 +1,23 @@
package com.supervision.police.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.supervision.police.domain.NoteRecord;
import com.supervision.police.dto.NoteRecordDTO;
import com.supervision.police.mapper.NoteRecordMapper;
import com.supervision.police.service.NoteRecordService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
@Slf4j
@Service
@RequiredArgsConstructor
public class NoteRecordServiceImpl extends ServiceImpl<NoteRecordMapper, NoteRecord>
implements NoteRecordService {
@Override
public List<NoteRecordDTO> selectNoteRecordDTOList(NoteRecord noteRecord) {
return super.getBaseMapper().selectNoteRecordDTOList(noteRecord);
}
}

@ -22,9 +22,8 @@ import com.supervision.minio.service.MinioService;
import com.supervision.neo4j.service.Neo4jService; import com.supervision.neo4j.service.Neo4jService;
import com.supervision.police.domain.*; import com.supervision.police.domain.*;
import com.supervision.police.dto.NoteRecordDTO; import com.supervision.police.dto.NoteRecordDTO;
import com.supervision.police.vo.NoteRecordReqVO;
import com.supervision.police.dto.NoteRecordDetailDTO; import com.supervision.police.dto.NoteRecordDetailDTO;
import com.supervision.police.mapper.ModelAtomicResultMapper;
import com.supervision.police.mapper.NoteRecordMapper;
import com.supervision.police.mapper.NoteRecordSplitMapper; import com.supervision.police.mapper.NoteRecordSplitMapper;
import com.supervision.police.service.*; import com.supervision.police.service.*;
import com.supervision.utils.RecordRegexUtil; import com.supervision.utils.RecordRegexUtil;
@ -47,7 +46,7 @@ import java.util.stream.Collectors;
@RequiredArgsConstructor @RequiredArgsConstructor
public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMapper, NoteRecordSplit> implements NoteRecordSplitService { public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMapper, NoteRecordSplit> implements NoteRecordSplitService {
private final NoteRecordMapper noteRecordMapper; private final NoteRecordService noteRecordService;
private final MinioService minioService; private final MinioService minioService;
@ -56,7 +55,6 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
@Autowired @Autowired
private NoteRecordSplitService noteRecordSplitService; private NoteRecordSplitService noteRecordSplitService;
private final CaseTaskRecordService caseTaskRecordService; private final CaseTaskRecordService caseTaskRecordService;
private final TripleInfoService tripleInfoService; private final TripleInfoService tripleInfoService;
@ -84,7 +82,7 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
@Override @Override
@Transactional(transactionManager = "dataSourceTransactionManager", rollbackFor = Exception.class) @Transactional(transactionManager = "dataSourceTransactionManager", rollbackFor = Exception.class)
public String uploadRecords(NoteRecordDTO records) throws IOException { public String uploadRecords(NoteRecordReqVO records) throws IOException {
int i; int i;
ModelCase modelCase = modelCaseService.getById(records.getCaseId()); ModelCase modelCase = modelCaseService.getById(records.getCaseId());
if (StringUtils.isEmpty(modelCase.getCaseNo())){ if (StringUtils.isEmpty(modelCase.getCaseNo())){
@ -92,9 +90,9 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
} }
NoteRecord record = records.toNoteRecord(); NoteRecord record = records.toNoteRecord();
if (StringUtils.isEmpty(records.getId())) { if (StringUtils.isEmpty(records.getId())) {
i = noteRecordMapper.insert(record); i = noteRecordService.getBaseMapper().insert(record);
} else { } else {
i = noteRecordMapper.updateById(record); i = noteRecordService.getBaseMapper().updateById(record);
} }
//所有对话类型 //所有对话类型
List<ModelRecordType> allTypeList = modelRecordTypeService.lambdaQuery().list(); List<ModelRecordType> allTypeList = modelRecordTypeService.lambdaQuery().list();
@ -218,26 +216,21 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
@Override @Override
public Map<String, Object> queryRecords(NoteRecord noteRecords, Integer page, Integer size) { public Map<String, Object> queryRecords(NoteRecord noteRecords, Integer page, Integer size) {
LambdaQueryWrapper<NoteRecord> wrapper = Wrappers.lambdaQuery(NoteRecord.class)
.like(StringUtils.isNotEmpty(noteRecords.getName()), NoteRecord::getName, noteRecords.getName())
.eq(NoteRecord::getCaseId, noteRecords.getCaseId())
.eq(NoteRecord::getDataStatus, "1");
List<NoteRecord> list = noteRecordMapper.selectList(wrapper);
List<String> fileIdList = list.stream().map(NoteRecord::getFileIds).filter(StringUtils::isNotEmpty)
.flatMap(s -> Arrays.stream(s.split(","))).distinct().toList();
List<NoteRecordDTO> noteRecordDTOList = noteRecordService.selectNoteRecordDTOList(noteRecords);
// 查询关联角色字典
Map<String, String> caseRoleDicMap = comDictionaryService.getDictionaryMap("case_role"); Map<String, String> caseRoleDicMap = comDictionaryService.getDictionaryMap("case_role");
Map<String, CasePerson> casePersonMap = casePersonService.list(new LambdaQueryWrapper<CasePerson>().eq(CasePerson::getCaseId, noteRecords.getCaseId()))
.stream().collect(Collectors.toMap(CasePerson::getId, v -> v)); // 查询关联文件数据
List<String> fileIdList = noteRecordDTOList.stream().map(NoteRecordDTO::getFileIds).filter(StringUtils::isNotEmpty)
.flatMap(s -> Arrays.stream(s.split(","))).distinct().toList();
Map<String, MinioFile> fileMap = minioService.listMinioFile(fileIdList).stream().collect(Collectors.toMap(MinioFile::getId, Function.identity())); Map<String, MinioFile> fileMap = minioService.listMinioFile(fileIdList).stream().collect(Collectors.toMap(MinioFile::getId, Function.identity()));
// LinkedHashMap 保障顺序 // LinkedHashMap 保障顺序
Map<String, List<NoteRecordDetailDTO>> nameMap = list.stream().filter(item -> StringUtils.isNotBlank(item.getName())).map(item -> { Map<String, List<NoteRecordDetailDTO>> nameMap = noteRecordDTOList.stream().filter(item -> StringUtils.isNotBlank(item.getName())).map(item -> {
NoteRecordDetailDTO noteRecordDetailDTO = new NoteRecordDetailDTO(item, fileMap); NoteRecordDetailDTO noteRecordDetailDTO = new NoteRecordDetailDTO(item, fileMap);
noteRecordDetailDTO.setRoleName(caseRoleDicMap.get(item.getRole())); noteRecordDetailDTO.setRoleName(caseRoleDicMap.get(item.getRole()));
if (Objects.nonNull(casePersonMap.get(item.getCasePersonId()))){
noteRecordDetailDTO.setPersonIdCard(casePersonMap.get(item.getCasePersonId()).getIdCard());
}
return noteRecordDetailDTO; return noteRecordDetailDTO;
}) })
.collect(Collectors.groupingBy(NoteRecordDetailDTO::getName, LinkedHashMap::new, Collectors.toList())); .collect(Collectors.groupingBy(NoteRecordDetailDTO::getName, LinkedHashMap::new, Collectors.toList()));
@ -250,6 +243,7 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
NoteRecordDetailDTO noteRecordDetailDTO = new NoteRecordDetailDTO(); NoteRecordDetailDTO noteRecordDetailDTO = new NoteRecordDetailDTO();
noteRecordDetailDTO.setName(name); noteRecordDetailDTO.setName(name);
// 从key中获取noteRecordDetailDTO需要的数据
List<NoteRecordDetailDTO> noteRecordDetailDTOS = nameMap.get(name); List<NoteRecordDetailDTO> noteRecordDetailDTOS = nameMap.get(name);
NoteRecordDetailDTO first = CollUtil.getFirst(noteRecordDetailDTOS); NoteRecordDetailDTO first = CollUtil.getFirst(noteRecordDetailDTOS);
if (Objects.nonNull(first)){ if (Objects.nonNull(first)){
@ -292,7 +286,7 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
@Override @Override
@Transactional(transactionManager = "dataSourceTransactionManager", rollbackFor = Exception.class, noRollbackFor = BusinessException.class) @Transactional(transactionManager = "dataSourceTransactionManager", rollbackFor = Exception.class, noRollbackFor = BusinessException.class)
public void delRecords(String id) { public void delRecords(String id) {
NoteRecord noteRecord = noteRecordMapper.selectById(id); NoteRecord noteRecord = noteRecordService.getBaseMapper().selectById(id);
// 去掉逻辑删除,直接删除 // 去掉逻辑删除,直接删除
// noteRecord.setDataStatus(StringUtils.getUUID()); // noteRecord.setDataStatus(StringUtils.getUUID());
// noteRecordMapper.updateById(noteRecord); // noteRecordMapper.updateById(noteRecord);
@ -312,7 +306,7 @@ public class NoteRecordSplitServiceImpl extends ServiceImpl<NoteRecordSplitMappe
} }
} }
// 去掉逻辑删除,直接删除 // 去掉逻辑删除,直接删除
noteRecordMapper.deleteById(id); noteRecordService.getBaseMapper().deleteById(id);
// 删除拆分的笔录 // 删除拆分的笔录
noteRecordSplitService.lambdaUpdate().eq(NoteRecordSplit::getNoteRecordId, id).remove(); noteRecordSplitService.lambdaUpdate().eq(NoteRecordSplit::getNoteRecordId, id).remove();
// task也删除掉 // task也删除掉

@ -0,0 +1,83 @@
package com.supervision.police.vo;
import cn.hutool.core.collection.CollUtil;
import com.supervision.police.domain.NoteRecord;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Data
public class NoteRecordReqVO {
private String id;
/**
* id
*/
private String caseId;
/**
*
*/
private String recordName;
/**
* id
*/
private List<String> fileIdList;
@Schema(description = "笔录人员id")
private String personId;
/**
*
*/
private String name;
/**
*
*/
private String role;
/**
*
*/
private Integer confessionMaterial;
/**
*
*/
private String lawAsker;
/**
*
*/
private String confessionStartTime;
/**
*
*/
private String confessionEndTime;
public NoteRecord toNoteRecord(){
NoteRecord noteRecord = new NoteRecord();
noteRecord.setId(id);
noteRecord.setCaseId(caseId);
noteRecord.setRecordName(recordName);
if (CollUtil.isNotEmpty(fileIdList)){
noteRecord.setFileIds(CollUtil.join(fileIdList, ","));
}
noteRecord.setName(name);
noteRecord.setRole(role);
noteRecord.setConfessionMaterial(confessionMaterial);
noteRecord.setLawAsker(lawAsker);
noteRecord.setConfessionStartTime(confessionStartTime);
noteRecord.setConfessionEndTime(confessionEndTime);
noteRecord.setCasePersonId(personId);
return noteRecord;
}
}

@ -2,4 +2,34 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.supervision.police.mapper.NoteRecordMapper"> <mapper namespace="com.supervision.police.mapper.NoteRecordMapper">
<select id="selectNoteRecordDTOList" resultType="com.supervision.police.dto.NoteRecordDTO">
select r.id as id,
r.case_id as caseId,
r.case_person_id as casePersonId,
p.id_card as casePersonIdCard,
r.record_name as recordName,
r.file_ids as fileIds,
p.name as name,
p.role_code as role,
r.law_asker as lawAsker,
r.confession_material as confessionMaterial,
r.confession_start_time as confessionStartTime,
r.confession_end_time as confessionEndTime,
p.id_card as idCard,
r.create_time as createTime
from note_record r
left join case_person p on r.case_person_id = p.id
where r.data_status = '1'
<if test="caseId != null and caseId != ''">
and r.case_id = #{caseId}
</if>
<if test="name != null and name != ''">
and p.name like concat('%', #{name}, '%')
</if>
<if test="role != null and role != ''">
and p.role_code = #{role}
</if>
</select>
</mapper> </mapper>
Loading…
Cancel
Save