提交 199b08af 作者: wangwenqi

人物审核、查询等相关逻辑调整

上级 03f520fd
......@@ -27,7 +27,7 @@ import java.util.Map;
@RestController
@RequestMapping("/api/character/basic")
public class CharacterBasicInfoController {
@Autowired
CharacterBasicInfoService characterBasicInfoService;
@Autowired
......@@ -36,7 +36,7 @@ public class CharacterBasicInfoController {
private static Map<String, String> importFieldMap1;
private static Map<String, String> importFieldMap2;
private static Map<String, String> importFieldMap3;
/**
* 资讯抽取人物信息分页查询
* 人物审核列表
......@@ -53,14 +53,14 @@ public class CharacterBasicInfoController {
IPage page = characterBasicInfoService.getList(basicInfoListVo);
return Result.OK(page);
}
@GetMapping("/getById")
public Result<?> getById(@RequestParam(name = "id", required = true) String id) {
log.info("人物审核根据人物id查询:{}", id);
CharacterBasicInfo info = characterBasicInfoService.getOneById(id);
return Result.OK(info);
}
/**
* 根据姓名查询 疑似人物查询
*
......@@ -73,7 +73,7 @@ public class CharacterBasicInfoController {
List<CharacterBasicInfo> list = characterBasicInfoService.getListByName(name);
return Result.OK(list);
}
/**
* 新增人物
*/
......@@ -82,7 +82,7 @@ public class CharacterBasicInfoController {
log.info("新增人物:{}", characterBasicInfo);
return characterBasicInfoService.add(characterBasicInfo);
}
/**
* 修改人物
*/
......@@ -94,7 +94,7 @@ public class CharacterBasicInfoController {
return Result.error("人物id不能为空");
return characterBasicInfoService.edit(characterBasicInfo);
}
/**
* 根据id删除人物
*
......@@ -107,7 +107,7 @@ public class CharacterBasicInfoController {
Boolean res = characterBasicInfoService.del(id);
return Result.OK(res);
}
/**
* 根据uid查询人物的历任职务
*
......@@ -115,12 +115,13 @@ public class CharacterBasicInfoController {
* @return
*/
@GetMapping("/getPreviousDuty")
public Result<?> getPreviousDuty(@RequestParam(name = "uid", required = true) String uid) {
public Result<?> getPreviousDuty(@RequestParam(name = "uid") String uid,
@RequestParam(name = "id") String id,@RequestParam(name = "category") String category) {
log.info("根据uid查询人物的历任职务:{}", uid);
List<CharacterBasicInfo> list = characterBasicInfoService.getPreviousDuty(uid);
List<CharacterBasicInfo> list = characterBasicInfoService.getPreviousDuty(uid,id,category);
return Result.OK(list);
}
/**
* 关联
*
......@@ -132,7 +133,7 @@ public class CharacterBasicInfoController {
log.info("关联:{}", characterBasicInfo.getId());
return characterBasicInfoService.correlation(characterBasicInfo);
}
/**
* 修改关联人物
*
......@@ -144,7 +145,7 @@ public class CharacterBasicInfoController {
log.info("修改关联人物:{}", characterBasicInfo.getId());
return characterBasicInfoService.correlationEdit(characterBasicInfo);
}
/**
* 企业查询
*
......@@ -160,7 +161,7 @@ public class CharacterBasicInfoController {
List<Map<String, String>> list = characterBasicInfoService.getDepartment(socialCreditCode, department, keyword);
return Result.OK(list);
}
/**
* @param basicInfoListVo 条件封装
* @描述 查询专家列表
......@@ -175,7 +176,7 @@ public class CharacterBasicInfoController {
List<CharacterBasicInfo> list = characterBasicInfoService.getAllList(basicInfoListVo);
return Result.OK(list);
}
/**
* @param basicInfoListVo 条件封装
* @描述 查询专家列表(分页,产业链关联专家时查询用)
......@@ -192,7 +193,7 @@ public class CharacterBasicInfoController {
IPage page = characterBasicInfoService.getList(basicInfoListVo);
return Result.OK(page);
}
@PostMapping("/importExcel")
public Result<?> importExcel(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam String category) {
if (file.isEmpty()) {
......@@ -212,7 +213,7 @@ public class CharacterBasicInfoController {
String result = characterBasicInfoService.importExcel(tempFile.getAbsolutePath(), category, importFieldMap);
return Result.OK(result);
}
@PostMapping("/exportExcel")
public ResponseEntity<byte[]> exportExcel(@RequestBody BasicInfoListVo basicInfoListVo) {
String category = basicInfoListVo.getCategory();
......@@ -227,7 +228,7 @@ public class CharacterBasicInfoController {
}
return responseEntity;
}
@GetMapping("/exportExcelByIds")
public ResponseEntity<byte[]> exportExcelByIds(@RequestParam String ids,@RequestParam String category) {
Map<String, String> importFieldMap = getImportFieldMap(category);
......@@ -239,7 +240,7 @@ public class CharacterBasicInfoController {
}
return responseEntity;
}
@GetMapping("/exportTemplate")
public ResponseEntity<byte[]> exportTemplate(@RequestParam String category) {
Map<String, String> importFieldMap = getImportFieldMap(category);
......@@ -251,7 +252,7 @@ public class CharacterBasicInfoController {
}
return responseEntity;
}
private Map<String, String> getImportFieldMap(String category) {
Map<String, String> importFieldMap;
switch (category) {
......@@ -269,7 +270,7 @@ public class CharacterBasicInfoController {
}
return importFieldMap;
}
static {
importFieldMap1 = new LinkedHashMap<>();
importFieldMap1.put("人物id", "uid");
......@@ -286,7 +287,7 @@ public class CharacterBasicInfoController {
importFieldMap1.put("任职结束时间", "takeOfficeTimeEnd");
importFieldMap1.put("分类", "typeId");
}
static {
importFieldMap2 = new LinkedHashMap<>();
importFieldMap2.put("人物id", "uid");
......@@ -312,7 +313,7 @@ public class CharacterBasicInfoController {
importFieldMap2.put("参加工作时间", "workDate");
importFieldMap2.put("分类", "typeId");
}
static {
importFieldMap3 = new LinkedHashMap<>();
importFieldMap3.put("人物id", "uid");
......
......@@ -181,9 +181,10 @@ public class CharacterInfoController {
* @return
*/
@GetMapping("/getPreviousDuty")
public Result<?> getPreviousDuty(@RequestParam(name="uid",required=true) String uid){
log.info("根据uid查询人物的历任职务:{}",uid);
return characterInfoService.getPreviousDuty(uid);
public Result<?> getPreviousDuty(@RequestParam(name="uid") String uid,@RequestParam(name="id") String id
,@RequestParam(name="category") String category){
log.info("根据uid查询人物的历任职务:{},{}",uid,id);
return characterInfoService.getPreviousDuty(uid,id,category);
}
/**
......@@ -209,4 +210,4 @@ public class CharacterInfoController {
}
}
\ No newline at end of file
}
......@@ -51,6 +51,17 @@ public class CharacterTagController {
return characterTagService.getTagList(id, name);
}
/**
* @description:获取指定id标签树及树下数据
* @param: [tagRootId]
* @return: Result<?>
**/
@GetMapping("/getTagAndDataTree")
public Result<?> getTagAndDataTree(@RequestParam(name="tagRootId",required=false) String tagRootId){
return characterTagService.getTagAndDataTreeByRootId(tagRootId);
}
/**
* 根据标签分页查询人物
* @param tagId
......
......@@ -54,7 +54,6 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo>
"from character_basic_info a " +
"where 1=1 " +
"and main_entry = 1 " +
"and category = '1' "+
"and a.name = #{name} ")
List<CharacterBasicInfo> getListByName(String name);
......@@ -69,14 +68,8 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo>
)
Integer deduplication(String duty, String company, String name);
@Select("select " +
"*" +
"from character_basic_info " +
"where 1=1 " +
"and uid = #{uid} " +
"and main_entry = 0 " +
"order by FIELD(take_office_status, '现任', '历任') ASC, create_time desc")
List<CharacterBasicInfo> getPreviousDuty(String uid);
List<CharacterBasicInfo> getPreviousDuty(String uid,String id,String category);
@Select("select " +
"id " +
......@@ -126,6 +119,6 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo>
"limit 20 " +
"</script>")
List<Map<String, String>> getDepartment(String socialCreditCode, String department, String keyword);
List<CharacterBasicInfo> getAllList(BasicInfoListVo basicInfoListVo);
}
......@@ -34,7 +34,7 @@ public interface CharacterBasicInfoService extends IService<CharacterBasicInfo>
List<CharacterBasicInfo> getData(String time);
List<CharacterBasicInfo> getPreviousDuty(String uid);
List<CharacterBasicInfo> getPreviousDuty(String uid,String id,String category);
List<String> getCorrelationByUid(String uid);
......@@ -55,18 +55,18 @@ public interface CharacterBasicInfoService extends IService<CharacterBasicInfo>
List<CharacterBasicInfo> getBasicInfoByCreditCode(String socialCreditCode);
List<Map<String, String>> getDepartment(String socialCreditCode, String department, String keyword);
List<CharacterBasicInfo> getAllList(BasicInfoListVo basicInfoListVo);
CharacterBasicInfo getBasicInfoByUid(String category,String uid);
CharacterBasicInfo getByNameAndByDepartment(String category, String typeId, String name, String department);
String importExcel(String absolutePath, String category, Map<String, String> importFieldMap);
ResponseEntity<byte[]> exportExcel(String category, List<CharacterBasicInfo> list, Map<String, String> importFieldMap) throws IOException;
ResponseEntity<byte[]> exportExcelByIds(String category, String ids, Map<String, String> importFieldMap) throws IOException;
ResponseEntity<byte[]> exportTemplate(Map<String, String> importFieldMap) throws IOException;
}
......@@ -50,7 +50,7 @@ public interface CharacterInfoService {
Result<?> mergeCancel(String id);
Result<?> getPreviousDuty(String uid);
Result<?> getPreviousDuty(String uid,String id,String category);
Result<?> correlation(CharacterVo characterVo);
......
......@@ -18,6 +18,8 @@ public interface CharacterTagService extends IService<LabelEntity> {
Result<?> getTagList(String id, String name);
Result<?> getTagAndDataTreeByRootId(String rootId);
Result<?> getCharacterListByTag(String tagId, Integer offset, Integer pageSize);
void addTagTop(CharacterTagTop characterTagTop);
......
......@@ -2,6 +2,7 @@ package com.zzsn.leaderbase.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -19,9 +20,7 @@ import com.zzsn.leaderbase.service.CharacterBasicInfoService;
import com.zzsn.leaderbase.service.CharacterTagService;
import com.zzsn.leaderbase.service.IGeneratorIdService;
import com.zzsn.leaderbase.service.LeaderCategoryService;
import com.zzsn.leaderbase.util.AuthUtil;
import com.zzsn.leaderbase.util.ExcelUtil;
import com.zzsn.leaderbase.util.LoginUser;
import com.zzsn.leaderbase.vo.BasicInfoListVo;
import com.zzsn.leaderbase.vo.CharacterVo;
import com.zzsn.leaderbase.vo.Result;
......@@ -64,7 +63,7 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
@Autowired
CharacterTagService characterTagService;
@Autowired
LeaderCategoryService leaderCategoryService;
......@@ -96,28 +95,23 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
page.setSize(pageSize);
return page;
}
private List<CharacterBasicInfo> setListValues(List<CharacterBasicInfo> list, BasicInfoListVo basicInfoListVo) {
//查询结果替换主数据
List<CharacterBasicInfo> listNew=new ArrayList<>(list.size());
for (CharacterBasicInfo characterBasicInfo : list) {
Integer mainEntry = characterBasicInfo.getMainEntry();
if(mainEntry == 0){
QueryWrapper<CharacterBasicInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("uid", characterBasicInfo.getUid())
.eq("main_entry",1);
List<CharacterBasicInfo> mainList = this.list(queryWrapper);
if(mainList.size() > 0){
listNew.add(mainList.get(0));
} else {
listNew.add(characterBasicInfo);
if(CollectionUtil.isNotEmpty(list)){
List<String> ids=list.stream().map(CharacterBasicInfo::getId).collect(Collectors.toList());
Set<String> uIds = list.stream().map(CharacterBasicInfo::getUid).collect(Collectors.toSet());
LambdaQueryWrapper<CharacterBasicInfo> queryWrapper=new LambdaQueryWrapper<>();
queryWrapper.in(CharacterBasicInfo::getUid,uIds);
queryWrapper.notIn(CharacterBasicInfo::getId,ids);
queryWrapper.select(CharacterBasicInfo::getUid);
List<CharacterBasicInfo> subList = this.list(queryWrapper);
Set<String> containsUIds= subList.stream().map(CharacterBasicInfo::getUid).collect(Collectors.toSet());
list.forEach(t->{
if(containsUIds.contains(t.getUid())){
t.setHasChild(1);
}
} else {
listNew.add(characterBasicInfo);
}
});
}
//判断是否有关联数据
hasChild(listNew);
//记录热门标签
String tagId = basicInfoListVo.getTagId();
if(tagId != null && tagId.length() >0){
......@@ -128,7 +122,7 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
}
return list;
}
//判断是否有关联数据
private List<CharacterBasicInfo> hasChild(List<CharacterBasicInfo> list){
if(list != null && list.size() > 0 ){
......@@ -182,8 +176,8 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
}
@Override
public List<CharacterBasicInfo> getPreviousDuty(String uid) {
return baseMapper.getPreviousDuty(uid);
public List<CharacterBasicInfo> getPreviousDuty(String uid,String id,String category) {
return baseMapper.getPreviousDuty(uid,id,category);
}
@Override
......@@ -201,7 +195,7 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
String id = Long.toString(generatorIdService.getOrderId());
characterBasicInfo.setId(id);
characterBasicInfo.setCreateTime(new Date());
characterBasicInfo.setUpdateTime(new Date());
String uid = generatorIdService.getIdNo();
characterBasicInfo.setUid(uid);
characterBasicInfo.setMainEntry(1);
......@@ -231,10 +225,15 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
String newId = Long.toString(generatorIdService.getOrderId());
characterBasicInfo.setId(newId);
characterBasicInfo.setMainEntry(0);
characterBasicInfo.setMainEntry(1);
characterBasicInfo.setCategory(newInfo.getCategory());
characterBasicInfo.setCreateTime(new Date());
characterBasicInfo.setUpdateTime(new Date());
Boolean res = this.save(characterBasicInfo);
//主条目重新设置
newInfo.setMainEntry(0);
this.updateById(newInfo);
return Result.OK(res);
}
......@@ -277,7 +276,7 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
}
return baseMapper.getDepartment(socialCreditCode, department, keyword);
}
@Override
public List<CharacterBasicInfo> getAllList(BasicInfoListVo basicInfoListVo) {
List<CharacterBasicInfo> list = baseMapper.getAllList(basicInfoListVo);
......@@ -306,7 +305,7 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
}
return null;
}
@Override
public String importExcel(String filePath, String category, Map<String, String> importFieldMap) {
List<String> sheetNameList = new ArrayList<>();
......@@ -349,7 +348,7 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
String titleName = cell.getStringCellValue();
if (importFieldMap.containsKey(titleName)) {
try {
String stringCellValue = sheetRow.getCell(cell.getColumnIndex()).getStringCellValue();
String stringCellValue =Objects.toString(sheetRow.getCell(cell.getColumnIndex()),"");
//如果是分类列,转换成id
if ("分类".equals(titleName) && "typeId".equals(importFieldMap.get(titleName))) {
stringCellValue = typeNameKeyMap.get(stringCellValue);
......@@ -529,23 +528,23 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
List<CharacterCategoryStructure> characterCategoryWrapper = leaderCategoryService.list(characterCategoryStructureLambdaQueryWrapper);
return characterCategoryWrapper;
}
@Override
public ResponseEntity<byte[]> exportExcel(String category, List<CharacterBasicInfo> characterBasicInfos, Map<String, String> importFieldMap) throws IOException {
return exportExcelByList(category, characterBasicInfos, importFieldMap);
}
@Override
public ResponseEntity<byte[]> exportExcelByIds(String category, String ids, Map<String, String> importFieldMap) throws IOException {
List<CharacterBasicInfo> characterBasicInfos = listByIds(Arrays.asList(ids.split(",")));
return exportExcelByList(category, characterBasicInfos, importFieldMap);
}
@Override
public ResponseEntity<byte[]> exportTemplate(Map<String, String> importFieldMap) throws IOException {
return generateTemplate(importFieldMap);
}
private ResponseEntity<byte[]> generateTemplate(Map<String, String> importFieldMap) throws IOException {
// 创建Excel工作簿
Workbook workbook = new XSSFWorkbook();
......@@ -584,7 +583,7 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
// 返回Excel文件作为字节数组响应
return new ResponseEntity<>(byteArrayOutputStream.toByteArray(), headers, HttpStatus.OK);
}
private ResponseEntity<byte[]> exportExcelByList(String category,List<CharacterBasicInfo> characterBasicInfos, Map<String, String> importFieldMap) throws IOException {
// 创建Excel工作簿
Workbook workbook = new XSSFWorkbook();
......
......@@ -404,8 +404,8 @@ public class CharacterInfoServiceImpl implements CharacterInfoService {
}
@Override
public Result<?> getPreviousDuty(String uid) {
return Result.OK(characterBasicInfoService.getPreviousDuty(uid));
public Result<?> getPreviousDuty(String uid,String id,String category) {
return Result.OK(characterBasicInfoService.getPreviousDuty(uid,id,category));
}
@Override
......
......@@ -17,11 +17,13 @@ import com.zzsn.leaderbase.service.CharacterBasicInfoService;
import com.zzsn.leaderbase.service.CharacterInfoService;
import com.zzsn.leaderbase.service.CharacterTagService;
import com.zzsn.leaderbase.vo.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Version 1.0
......@@ -104,7 +106,7 @@ public class CharacterTagServiceImpl extends ServiceImpl<CharacterTagMapper, Lab
// sysBaseLabelTypeVo.setHasChild("1");
List<SysBaseLabelTypeVo> list = characterTagMapper.getTagTypeListAll();
//只获取人物服务相关的类别
List<SysBaseLabelTypeVo> treeList = getBaseLabelTreeList(list,sys_base_label_type_id);
List<SysBaseLabelTypeVo> treeList = getBaseLabelTreeList(list,sys_base_label_type_id,null);
// sysBaseLabelTypeVo.setChildren(treeList);
// allList.add(sysBaseLabelTypeVo);
// return allList;
......@@ -174,36 +176,84 @@ public class CharacterTagServiceImpl extends ServiceImpl<CharacterTagMapper, Lab
}
//获取树状结构
private List<SysBaseLabelTypeVo> getBaseLabelTreeList(List<SysBaseLabelTypeVo> baseLabelTypeList, String id){
private List<SysBaseLabelTypeVo> getBaseLabelTreeList(List<SysBaseLabelTypeVo> baseLabelTypeList, String id,Map<String,List<SysLabelVo>> dataMap){
List<SysBaseLabelTypeVo> topList = new ArrayList<>();
baseLabelTypeList.forEach(e->{
if (id.equals(e.getId())) {
if(dataMap!=null && dataMap.containsKey(e.getId())){
e.setDataList(dataMap.get(e.getId()));
}
topList.add(e);
}
});
for (SysBaseLabelTypeVo sysLabelVo : topList) {
setBaseLabelChildren(sysLabelVo, baseLabelTypeList);
setBaseLabelChildren(sysLabelVo, baseLabelTypeList,dataMap);
}
return topList;
}
//递归获取树形结构数据
private void setBaseLabelChildren(SysBaseLabelTypeVo parent, List<SysBaseLabelTypeVo> list) {
Set<SysBaseLabelTypeVo> children = getBaseLabelChildren(list, parent.getId());
private void setBaseLabelChildren(SysBaseLabelTypeVo parent, List<SysBaseLabelTypeVo> list,Map<String,List<SysLabelVo>> dataMap) {
Set<SysBaseLabelTypeVo> children = getBaseLabelChildren(list, parent.getId(),dataMap);
parent.setChildren(new ArrayList<>(children));
for (SysBaseLabelTypeVo sysLabelVo : children) {
setBaseLabelChildren(sysLabelVo, list);
setBaseLabelChildren(sysLabelVo, list,dataMap);
}
}
private Set<SysBaseLabelTypeVo> getBaseLabelChildren(List<SysBaseLabelTypeVo> list, String id) {
private Set<SysBaseLabelTypeVo> getBaseLabelChildren(List<SysBaseLabelTypeVo> list, String id,Map<String,List<SysLabelVo>> dataMap) {
Set<SysBaseLabelTypeVo> children = new HashSet<>();
for (SysBaseLabelTypeVo sysLabelVo : list) {
if (sysLabelVo.getPid().equals(id)) {
if(dataMap!=null&&dataMap.containsKey(sysLabelVo.getId())){
sysLabelVo.setDataList(dataMap.get(sysLabelVo.getId()));
}
children.add(sysLabelVo);
}
}
return children;
}
@Override
public Result<?> getTagAndDataTreeByRootId(String rootId){
if(StringUtils.isEmpty(rootId)){
rootId = sys_base_label_type_id;
}
List<SysBaseLabelTypeVo> list = characterTagMapper.getTagTypeListAll();
List<SysBaseLabelTypeVo> originList =new ArrayList<>(list);
List<String> typeIds=getAllIdsByRootId(list, rootId);
List<SysLabelVo> dataList = characterTagMapper.queryCustomLabel(typeIds,null);
Map<String,List<SysLabelVo>> dataMap=dataList.stream().collect(Collectors.groupingBy(SysLabelVo::getLabelTypeId));
List<SysBaseLabelTypeVo> changeList =originList.stream().filter(t -> !list.contains(t)).collect(Collectors.toList());
String finalRootId = rootId;
SysBaseLabelTypeVo rootType=list.stream().filter(t->t.getId().equals(finalRootId)).findFirst().get();
setBaseLabelChildren(rootType, changeList,dataMap);
return Result.OK(rootType);
}
//获取指定根节点下所有子节点id集合
public static List<String> getAllIdsByRootId(List<SysBaseLabelTypeVo> baseTypeList, String rootId) {
if(StringUtils.isEmpty(rootId)||CollectionUtil.isEmpty(baseTypeList)){
return Collections.emptyList();
}
List<String> idList = new ArrayList<>();
Queue<String> queue = new LinkedList<>();
queue.offer(rootId);
while (!queue.isEmpty()) {
String currentId = queue.poll();
idList.add(currentId);
Iterator<SysBaseLabelTypeVo> iterator = baseTypeList.iterator();
while (iterator.hasNext()) {
SysBaseLabelTypeVo node = iterator.next();
if (currentId.equals(node.getPid())) {
queue.offer(node.getId());
iterator.remove();
}
}
}
return idList;
}
}
......
......@@ -4,6 +4,8 @@ import com.zzsn.leaderbase.entity.CharacterBasicInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 人物基本信息表
*/
......@@ -17,7 +19,10 @@ public class CheckVo {
//审核的抽取人物id
private String extractId;
//疑似人物id
//疑似人物id(主)
private String suspectedId;
//疑似人物id集合(不包含主疑似人物ID)
private List<String> subSuspectedIds;
}
......@@ -5,6 +5,8 @@ import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.List;
@Data
public class SysBaseLabelTypeVo {
/**主键*/
......@@ -42,4 +44,6 @@ public class SysBaseLabelTypeVo {
private String labelType;
/**下级节点*/
private java.util.List<SysBaseLabelTypeVo> children;
/**当前节点关联的数据*/
private List<SysLabelVo> dataList;
}
......@@ -5,16 +5,32 @@
<mapper namespace="com.zzsn.leaderbase.mapper.CharacterBasicInfoMapper">
<select id="getList" resultType="com.zzsn.leaderbase.entity.CharacterBasicInfo">
select
*
from character_basic_info
where 1 = 1
<include refid="getListWhere"/>
group by uid
ORDER BY CONVERT (${column} USING gbk) ${order}
limit #{offset}, #{pageSize}
SELECT cbi.*
FROM character_basic_info cbi
JOIN (
SELECT uid,max(create_time) create_time
FROM character_basic_info
where 1 = 1
<include refid="getListWhere"/>
group by uid
ORDER BY ${column} ${order}
limit #{offset}, #{pageSize}
) sub on cbi.uid = sub.uid and cbi.create_time = sub.create_time
</select>
<select id="getPreviousDuty" resultType="com.zzsn.leaderbase.entity.CharacterBasicInfo">
SELECT cbi.*
FROM character_basic_info cbi
JOIN (
SELECT id
FROM character_basic_info
where uid = #{uid} and id != #{id}
ORDER BY FIELD(category, #{category}, '1', '3', '2'),
FIELD(take_office_status, '在职', '历任') ,
update_time desc
) sub on cbi.id = sub.id
</select>
<select id="getAllList" resultType="com.zzsn.leaderbase.entity.CharacterBasicInfo">
select
*
......@@ -96,4 +112,4 @@ select count(1) from (
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论