提交 a83aad48 作者: ZhangJingKun

新增根据名称模糊查询分类树

上级 2094cf51
...@@ -123,6 +123,19 @@ ...@@ -123,6 +123,19 @@
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
</plugins> </plugins>
<resources>
<resource>
<directory>${project.basedir}/lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build> </build>
</project> </project>
...@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
* @Content: * @Content:
*/ */
@RestController @RestController
@RequestMapping("/") @RequestMapping("/api")
@Slf4j @Slf4j
public class LeaderBaseController { public class LeaderBaseController {
......
...@@ -79,6 +79,61 @@ public class LeaderCategoryController { ...@@ -79,6 +79,61 @@ public class LeaderCategoryController {
} }
/**
* 根据名称模糊查询所有节点及父节点
* @param category
* @param typeName
* @return
*/
@GetMapping("/getByName")
public Result<?> getByName(
@RequestParam(name="category",required = false) String category,
@RequestParam(name="typeName",defaultValue = "0") String typeName){
return leaderCategoryService.getByName(category,typeName);
/*
CharacterCategoryStructureTreeVo ccs1 = new CharacterCategoryStructureTreeVo();
ccs1.setId("1764568128651616258");
ccs1.setTypeName("外包部门1");
ccs1.setHasChild("0");
ccs1.setCategory("领导人");
ccs1.setFullPath("1764567775726100481,1764567946836926465,1764568128651616258");
//ccs1.setChildren();
CharacterCategoryStructureTreeVo ccs2 = new CharacterCategoryStructureTreeVo();
ccs2.setId("1764568191536816130");
ccs2.setTypeName("外包部门2");
ccs2.setHasChild("0");
ccs2.setCategory("领导人");
ccs2.setFullPath("1764567775726100481,1764567946836926465,1764568191536816130");
// ccs2.setChildren();
CharacterCategoryStructureTreeVo ccs3 = new CharacterCategoryStructureTreeVo();
ccs3.setId("1764567946836926465");
ccs3.setTypeName("计算机与信息技术部");
ccs3.setHasChild("1");
ccs3.setCategory("领导人");
ccs3.setFullPath("1764567775726100481,1764567946836926465");
ccs3.getChildren().add(ccs1);
ccs3.getChildren().add(ccs2);
CharacterCategoryStructureTreeVo ccs4 = new CharacterCategoryStructureTreeVo();
ccs4.setId("1764567775726100481");
ccs4.setTypeName("审计局");
ccs4.setHasChild("1");
ccs4.setCategory("领导人");
ccs4.setFullPath("1764567775726100481");
ccs4.getChildren().add(ccs3);
List<CharacterCategoryStructureTreeVo> list = new ArrayList<>();
list.add(ccs4);
return Result.OK(list);
*/
}
// @GetMapping("/type") // @GetMapping("/type")
// public Result<?> type(){ // public Result<?> type(){
// return Result.OK(KnowTypeEnum.getAllAsMap()); // return Result.OK(KnowTypeEnum.getAllAsMap());
......
...@@ -43,6 +43,10 @@ public class CharacterChangeInfo extends Model<CharacterChangeInfo> { ...@@ -43,6 +43,10 @@ public class CharacterChangeInfo extends Model<CharacterChangeInfo> {
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date takeOfficeTime; private Date takeOfficeTime;
//任职结束时间
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date takeOfficeTimeEnd;
//任职状态 //任职状态
private String takeOfficeStatus; private String takeOfficeStatus;
//变更链接 //变更链接
......
...@@ -19,7 +19,7 @@ import java.util.List; ...@@ -19,7 +19,7 @@ import java.util.List;
public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo> { public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo> {
@Select("select " + @Select("select " +
"a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.status,b.company_original,b.department_original,b.duty_original,b.company,b.department,b.duty,b.take_office_time,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc,b.original_id,b.new_id,b.merge_status,a.create_by,a.create_time,a.update_by,a.update_time " + "a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.status,b.company_original,b.department_original,b.duty_original,b.company,b.department,b.duty,b.take_office_time,b.take_office_time_end,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc,b.original_id,b.new_id,b.merge_status,a.create_by,a.create_time,a.update_by,a.update_time " +
"from character_basic_info a " + "from character_basic_info a " +
"LEFT JOIN character_change_info b " + "LEFT JOIN character_change_info b " +
"on a.id = b.id " + "on a.id = b.id " +
...@@ -27,7 +27,7 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo> ...@@ -27,7 +27,7 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo>
CharacterVo getByUid(String uid); CharacterVo getByUid(String uid);
@Select("select " + @Select("select " +
"a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.status,b.company_original,b.department_original,b.duty_original,b.company,b.department,b.duty,b.take_office_time,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc,b.original_id,b.new_id,b.merge_status,a.create_by,a.create_time,a.update_by,a.update_time " + "a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.status,b.company_original,b.department_original,b.duty_original,b.company,b.department,b.duty,b.take_office_time,b.take_office_time_end,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc,b.original_id,b.new_id,b.merge_status,a.create_by,a.create_time,a.update_by,a.update_time " +
"from character_basic_info a " + "from character_basic_info a " +
"LEFT JOIN character_change_info b " + "LEFT JOIN character_change_info b " +
"on a.id = b.id " + "on a.id = b.id " +
...@@ -36,12 +36,12 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo> ...@@ -36,12 +36,12 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo>
List<CharacterVo> getList(CharacterListVo characterListVo); List<CharacterVo> getList(CharacterListVo characterListVo);
Integer getCount(); Integer getCount(CharacterListVo characterListVo);
List<CharacterVo> checkList(String articleId,String checkResult); List<CharacterVo> checkList(String articleId,String checkResult);
@Select("select " + @Select("select " +
"a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.status,b.company_original,b.department_original,b.duty_original,b.company,b.department,b.duty,b.take_office_time,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc,b.original_id,b.new_id,b.merge_status,a.create_by,a.create_time,a.update_by,a.update_time " + "a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.status,b.company_original,b.department_original,b.duty_original,b.company,b.department,b.duty,b.take_office_time,b.take_office_time_end,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc,b.original_id,b.new_id,b.merge_status,a.create_by,a.create_time,a.update_by,a.update_time " +
"from character_basic_info a " + "from character_basic_info a " +
"LEFT JOIN character_change_info b " + "LEFT JOIN character_change_info b " +
"on a.id = b.id " + "on a.id = b.id " +
...@@ -52,4 +52,15 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo> ...@@ -52,4 +52,15 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo>
"and a.id != #{id} " + "and a.id != #{id} " +
"and b.article_id != #{articleId}") "and b.article_id != #{articleId}")
List<CharacterVo> getListByName(String id, String name, String articleId); List<CharacterVo> getListByName(String id, String name, String articleId);
@Select("select count(1) " +
"from character_basic_info a " +
"LEFT JOIN character_change_info b " +
"on a.id = b.id " +
"where 1=1 " +
"and b.duty = #{duty} " +
"and b.company = #{company} " +
"and a.name = #{name}"
)
Integer deduplication(String duty, String company, String name);
} }
...@@ -26,4 +26,6 @@ public interface CharacterBasicInfoService extends IService<CharacterBasicInfo> ...@@ -26,4 +26,6 @@ public interface CharacterBasicInfoService extends IService<CharacterBasicInfo>
List<CharacterVo> checkList(String articleId,String checkResult); List<CharacterVo> checkList(String articleId,String checkResult);
List<CharacterVo> getListByName(String id, String name, String articleId); List<CharacterVo> getListByName(String id, String name, String articleId);
Integer deduplication(String duty, String company, String name);
} }
...@@ -27,6 +27,21 @@ public interface CharacterInfoService { ...@@ -27,6 +27,21 @@ public interface CharacterInfoService {
Result<?> getList(CharacterListVo characterListVo); Result<?> getList(CharacterListVo characterListVo);
/**
* 根据 根据职位 工作单位 姓名去重
* curStation, curWorkPlace, person
* duty, company, name
*
* 有重复数据时返回true
* 没有重复数据时返回false
* @param curStation
* @param curWorkPlace
* @param person
* @return
*/
boolean deduplication(String curStation, String curWorkPlace, String person);
Result<?> checkList(String articleId, String[] checkResultArr); Result<?> checkList(String articleId, String[] checkResultArr);
Result<?> getListByName(String id, String Name, String articleId); Result<?> getListByName(String id, String Name, String articleId);
......
...@@ -86,8 +86,15 @@ public class DealLeaderDataService { ...@@ -86,8 +86,15 @@ public class DealLeaderDataService {
JSONArray jsonArray = (JSONArray) JSONArray.parse(String.valueOf(dataResult.get("infos"))); JSONArray jsonArray = (JSONArray) JSONArray.parse(String.valueOf(dataResult.get("infos")));
for (Object data : jsonArray) { for (Object data : jsonArray) {
JSONObject temp = JSONObject.parseObject(data.toString()); JSONObject temp = JSONObject.parseObject(data.toString());
boolean b = characterInfoService.deduplication(temp.get("curStation") != null ? temp.get("curStation").toString() : "",
temp.get("curWorkPlace") != null ? temp.get("curWorkPlace").toString() : "",
temp.get("person") != null ? temp.get("person").toString() : "");
if(b){
log.info("数据重复:{}",data.toString());
} else {
list.add(CharacterVo.builder() list.add(CharacterVo.builder()
// .uid(UUID.randomUUID().toString().replace("-","")) // .uid(UUID.randomUUID().toString().replace("-",""))
//curStation curWorkPlace person
.category("领导人") .category("领导人")
.updateDesc(temp.get("updateDesc") != null ? temp.get("updateDesc").toString() : "") .updateDesc(temp.get("updateDesc") != null ? temp.get("updateDesc").toString() : "")
.takeOfficeStatus("在职") .takeOfficeStatus("在职")
...@@ -104,6 +111,7 @@ public class DealLeaderDataService { ...@@ -104,6 +111,7 @@ public class DealLeaderDataService {
} }
} }
} }
}
if (!list.isEmpty()) { if (!list.isEmpty()) {
try { try {
log.info("inserting"); log.info("inserting");
......
...@@ -31,6 +31,8 @@ public interface LeaderCategoryService extends IService<CharacterCategoryStructu ...@@ -31,6 +31,8 @@ public interface LeaderCategoryService extends IService<CharacterCategoryStructu
Result<?> lists(String sign, String pid, String category); Result<?> lists(String sign, String pid, String category);
Result<?> getByName(String category, String typeName);
/** /**
* 通过id获取子节点列表 * 通过id获取子节点列表
* @param id id * @param id id
......
...@@ -42,7 +42,7 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf ...@@ -42,7 +42,7 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
@Override @Override
public Integer getCount(CharacterListVo characterListVo) { public Integer getCount(CharacterListVo characterListVo) {
return characterBasicInfoMapper.getCount(); return characterBasicInfoMapper.getCount(characterListVo);
} }
@Override @Override
...@@ -54,4 +54,10 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf ...@@ -54,4 +54,10 @@ public class CharacterBasicInfoServiceImpl extends ServiceImpl<CharacterBasicInf
public List<CharacterVo> getListByName(String id, String name, String articleId) { public List<CharacterVo> getListByName(String id, String name, String articleId) {
return characterBasicInfoMapper.getListByName(id, name, articleId); return characterBasicInfoMapper.getListByName(id, name, articleId);
} }
@Override
public Integer deduplication(String duty, String company, String name) {
Integer count = characterBasicInfoMapper.deduplication(duty, company, name);
return count;
}
} }
...@@ -55,6 +55,12 @@ public class CharacterInfoServiceImpl implements CharacterInfoService { ...@@ -55,6 +55,12 @@ public class CharacterInfoServiceImpl implements CharacterInfoService {
String uid = generatorIdService.getIdNo(); String uid = generatorIdService.getIdNo();
characterVo.setUid(uid); characterVo.setUid(uid);
Long mergeStatus = characterVo.getMergeStatus();
if(mergeStatus == null){
//手动添加的数据赋值为0
characterVo.setMergeStatus(0L);
}
//vo对象获取转entity对象,基本信息 //vo对象获取转entity对象,基本信息
CharacterBasicInfo characterBasicInfo = new CharacterBasicInfo(); CharacterBasicInfo characterBasicInfo = new CharacterBasicInfo();
BeanUtils.copyProperties(characterVo, characterBasicInfo); BeanUtils.copyProperties(characterVo, characterBasicInfo);
...@@ -173,6 +179,17 @@ public class CharacterInfoServiceImpl implements CharacterInfoService { ...@@ -173,6 +179,17 @@ public class CharacterInfoServiceImpl implements CharacterInfoService {
return Result.OK(page); return Result.OK(page);
} }
@Override
public boolean deduplication(String curStation, String curWorkPlace, String person) {
Integer count = characterBasicInfoService.deduplication(curStation, curWorkPlace, person);
if(count == 0){
//数据不重复,返回false
return false;
} else {
return true;
}
}
@Override @Override
public Result<?> checkList(String articleId, String[] checkResultArr) { public Result<?> checkList(String articleId, String[] checkResultArr) {
......
...@@ -8,13 +8,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -8,13 +8,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzsn.leaderbase.entity.CharacterCategoryStructure; import com.zzsn.leaderbase.entity.CharacterCategoryStructure;
import com.zzsn.leaderbase.mapper.LeaderCategoryMapper; import com.zzsn.leaderbase.mapper.LeaderCategoryMapper;
import com.zzsn.leaderbase.service.LeaderCategoryService; import com.zzsn.leaderbase.service.LeaderCategoryService;
import com.zzsn.leaderbase.vo.CharacterCategoryStructureTreeVo;
import com.zzsn.leaderbase.vo.Result; import com.zzsn.leaderbase.vo.Result;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* <p> * <p>
...@@ -151,6 +154,60 @@ public class LeaderCategoryServiceImpl extends ServiceImpl<LeaderCategoryMapper, ...@@ -151,6 +154,60 @@ public class LeaderCategoryServiceImpl extends ServiceImpl<LeaderCategoryMapper,
} }
@Override
public Result<?> getByName(String category, String typeName) {
//根据名称模糊查询
List<CharacterCategoryStructure> characterCategoryStructure = super.list(Wrappers.<CharacterCategoryStructure>lambdaQuery()
.like(CharacterCategoryStructure::getTypeName,typeName)
.eq(StrUtil.isNotBlank(category),CharacterCategoryStructure::getCategory,category));
//根据所有子节点的pid路径查询所有父节点
Set<String> idSet = new HashSet<>();
for (CharacterCategoryStructure categoryStructure : characterCategoryStructure) {
String fullPath = categoryStructure.getFullPath();
String[] pidArr = fullPath.split(",");
idSet.addAll(Arrays.asList(pidArr));
}
List<CharacterCategoryStructure> characterCategoryStructurePid = super.list(
Wrappers.<CharacterCategoryStructure>lambdaQuery()
.in(CharacterCategoryStructure::getId, idSet)
);
//将查询的所有数据汇总到一个map中并根据id去重
Map<String, CharacterCategoryStructureTreeVo> map = new HashMap<>();
for (CharacterCategoryStructure categoryStructure : characterCategoryStructure) {
CharacterCategoryStructureTreeVo ccstvo = new CharacterCategoryStructureTreeVo();
BeanUtils.copyProperties(categoryStructure, ccstvo);
map.put(ccstvo.getId(), ccstvo);
}
for (CharacterCategoryStructure categoryStructure : characterCategoryStructurePid) {
CharacterCategoryStructureTreeVo ccstvo = new CharacterCategoryStructureTreeVo();
BeanUtils.copyProperties(categoryStructure, ccstvo);
map.put(ccstvo.getId(), ccstvo);
}
//所有数据的list列表
Collection<CharacterCategoryStructureTreeVo> list = map.values();
List<CharacterCategoryStructureTreeVo> collect = list.stream()
// 找出所有顶级(pid = 0 为顶级)
.filter(o -> StrUtil.equals("0", o.getPid()))
//给当前的父级的 children 设置子级
.peek(o -> o.setChildren(getChildList(o, list)))
//收集
.collect(Collectors.toList());
return Result.OK(collect);
}
// 根据当前父类 找出子类, 并通过递归找出子类的子类
private List<CharacterCategoryStructureTreeVo> getChildList(CharacterCategoryStructureTreeVo projectLeader, Collection<CharacterCategoryStructureTreeVo> list) {
return list.stream()
//筛选出父节点id == parentId 的所有对象 => list
.filter(o -> StrUtil.equals(String.valueOf(projectLeader.getId()), o.getPid()))
.peek(o -> o.setChildren(getChildList(o, list)))
.collect(Collectors.toList());
}
private void updateOldParentNode(String pid) { private void updateOldParentNode(String pid) {
if(!LeaderCategoryService.ROOT_PID_VALUE.equals(pid)) { if(!LeaderCategoryService.ROOT_PID_VALUE.equals(pid)) {
......
...@@ -18,6 +18,9 @@ import java.util.Calendar; ...@@ -18,6 +18,9 @@ import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentLinkedQueue;
/**
* 雪花算法生成id
*/
@Component @Component
@Slf4j @Slf4j
public class SnowFlakeGeneratorId implements IGeneratorIdService { public class SnowFlakeGeneratorId implements IGeneratorIdService {
...@@ -41,7 +44,7 @@ public class SnowFlakeGeneratorId implements IGeneratorIdService { ...@@ -41,7 +44,7 @@ public class SnowFlakeGeneratorId implements IGeneratorIdService {
private static final String FINANCE = "LEADER_UID:"; private static final String FINANCE = "LEADER_UID:";
private final static int NUM = 8; private final static int NUM = 8;
private static final String U = "u"; private static final String U = "U";
@Value("${server.port}") @Value("${server.port}")
......
package com.zzsn.leaderbase.vo;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* <p>
*5.1 人物分类体系表 分类树
* </p>
*
* @since
*/
@Data
public class CharacterCategoryStructureTreeVo extends Model<CharacterCategoryStructureTreeVo>
{
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 类别名称 公安部 财政部
*/
private String typeName;
/**
*类别编码
*/
private String typeCode;
/**
* 创建人
*/
private String createBy;
/**
* 创建时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
/**
* 更新人
*/
private String updateBy;
/**
* 更新时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/**
* 所属部门
*/
private String sysOrgCode;
/**
* 父级节点id
*/
private String pid;
/**
* 是否有子节点0,没有 1,有
*/
private String hasChild;
/**
* 分类类型: 领导人 专家 高管
*/
private String category;
/**
* 状态0启用,1禁用
*/
private Integer status;
/**
* 节点绝对路径
*/
private String fullPath;
/**
* 描述
*/
private String description;
/**
* 排序
*/
private Long sort;
/**
* 子节点
*/
private List<CharacterCategoryStructureTreeVo> children = new ArrayList<>();
}
...@@ -55,7 +55,7 @@ public class CharacterVo { ...@@ -55,7 +55,7 @@ public class CharacterVo {
private String headSculpture; private String headSculpture;
//个人简历 简介 //个人简历 简介
private String biographicalNotes; private String biographicalNotes;
//分类类型:领导人、专家、高管 //分类类型:领导人、专家、企业高管
private String category; private String category;
//任职经历,每一条任职经历用 \n(换行)分割 //任职经历,每一条任职经历用 \n(换行)分割
private String awardRecords; private String awardRecords;
...@@ -99,6 +99,10 @@ public class CharacterVo { ...@@ -99,6 +99,10 @@ public class CharacterVo {
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date takeOfficeTime; private Date takeOfficeTime;
//任职结束时间
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date takeOfficeTimeEnd;
//任职状态 //任职状态
private String takeOfficeStatus; private String takeOfficeStatus;
//变更链接 //变更链接
...@@ -124,7 +128,7 @@ public class CharacterVo { ...@@ -124,7 +128,7 @@ public class CharacterVo {
private String originalId; private String originalId;
//审核信息 新人物id //审核信息 新人物id
private String newId; private String newId;
//合并结果 1合并人物 2新增人物 3追加历任职务 //合并结果 0手动新增 1合并人物 2新增人物 3追加历任职务 -1取消操作
private Long mergeStatus; private Long mergeStatus;
} }
server: server:
port: 9098 port: 9098
servlet:
context-path: /userserver
spring: spring:
servlet: servlet:
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 -->
<property name="LOG_HOME" value="../clbLogs/leader" />
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{50}:%L) - %msg%n</pattern>
</encoder>
</appender>
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_HOME}/leader.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名 -->
<FileNamePattern>${LOG_HOME}/leader-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数 -->
<MaxHistory>10</MaxHistory>
<maxFileSize>10MB</maxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>
</encoder>
</appender>
<!--myibatis log configure -->
<logger name="com.apache.ibatis" level="TRACE" />
<logger name="java.sql.Connection" level="DEBUG" />
<logger name="java.sql.Statement" level="DEBUG" />
<logger name="java.sql.PreparedStatement" level="DEBUG" />
<!-- 日志输出级别 -->
<root level="INFO">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<select id="getList" resultType="com.zzsn.leaderbase.vo.CharacterVo"> <select id="getList" resultType="com.zzsn.leaderbase.vo.CharacterVo">
select * from ( select * from (
select a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.status,b.company_original,b.department_original,b.duty_original,b.company,b.department,b.duty,b.take_office_time,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc,b.original_id,b.new_id,b.merge_status,a.create_by,a.create_time,a.update_by,a.update_time select a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.status,b.company_original,b.department_original,b.duty_original,b.company,b.department,b.duty,b.take_office_time,b.take_office_time_end,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc,b.original_id,b.new_id,b.merge_status,a.create_by,a.create_time,a.update_by,a.update_time
from character_basic_info a from character_basic_info a
LEFT JOIN character_change_info b LEFT JOIN character_change_info b
on a.id = b.id on a.id = b.id
...@@ -62,12 +62,15 @@ ...@@ -62,12 +62,15 @@
<if test="checkResult != null"> <if test="checkResult != null">
AND b.check_result = #{checkResult} AND b.check_result = #{checkResult}
</if> </if>
<if test="category != null and category != ''">
AND a.category = #{category}
</if>
</select> </select>
<select id="checkList" resultType="com.zzsn.leaderbase.vo.CharacterVo"> <select id="checkList" resultType="com.zzsn.leaderbase.vo.CharacterVo">
select a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.status,b.company_original,b.department_original,b.duty_original,b.company,b.department,b.duty,b.take_office_time,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc,b.original_id,b.new_id,b.merge_status,a.create_by,a.create_time,a.update_by,a.update_time select a.id,a.uid,a.name,a.sex,a.birthplace,a.birthday,a.native_place,a.school,a.speciality,a.education,a.expert_occupation,a.head_sculpture,a.biographical_notes,a.category,a.award_records,a.part_time_job,a.research_field,a.evaluate,a.status,b.company_original,b.department_original,b.duty_original,b.company,b.department,b.duty,b.take_office_time,b.take_office_time_end,b.take_office_status,b.change_url,b.duties_update_time,b.duties_update_reason,b.check_status,b.check_result,b.article_id,b.article_title,b.update_desc,b.original_id,b.new_id,b.merge_status,a.create_by,a.create_time,a.update_by,a.update_time
from character_basic_info a from character_basic_info a
LEFT JOIN character_change_info b LEFT JOIN character_change_info b
on a.id = b.id on a.id = b.id
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论