|
@@ -41,13 +41,12 @@ public class ScratchWordsService extends ServiceImpl<ScratchWordsMapper, Scratch
|
|
|
|
|
|
/**
|
|
|
* 新增划词高亮
|
|
|
- *
|
|
|
* @param scratchWordsDTO
|
|
|
*/
|
|
|
public void add(ScratchWordsDTO scratchWordsDTO){
|
|
|
- ScratchWords scratchWords = new ScratchWords();
|
|
|
//判断传入列表不为空
|
|
|
if(scratchWordsDTO != null){
|
|
|
+ ScratchWords scratchWords = new ScratchWords();
|
|
|
BeanUtils.copyProperties(scratchWordsDTO, scratchWords);
|
|
|
//获取当前登陆人信息
|
|
|
PersonnelVO personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
@@ -67,9 +66,9 @@ public class ScratchWordsService extends ServiceImpl<ScratchWordsMapper, Scratch
|
|
|
* @param scratchWordsUpdateDTO
|
|
|
*/
|
|
|
public void update(ScratchWordsUpdateDTO scratchWordsUpdateDTO){
|
|
|
- ScratchWords scratchWords = new ScratchWords();
|
|
|
//判断传入列表不为空
|
|
|
if(scratchWordsUpdateDTO != null){
|
|
|
+ ScratchWords scratchWords = this.getById(scratchWordsUpdateDTO.getId());
|
|
|
BeanUtils.copyProperties(scratchWordsUpdateDTO, scratchWords);
|
|
|
scratchWords.updateById();
|
|
|
} else {
|
|
@@ -77,21 +76,25 @@ public class ScratchWordsService extends ServiceImpl<ScratchWordsMapper, Scratch
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 查询划词高亮
|
|
|
+ * @param swQueryDTO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
public List<ScratchWordsVO> queryAll(SWQueryDTO swQueryDTO){
|
|
|
if(swQueryDTO.getPatentNo() != null && swQueryDTO.getId() != null && swQueryDTO.getCreateFrom() != null) {
|
|
|
//获取当前登陆人信息
|
|
|
PersonnelVO personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
|
Integer tenantId = personnelVO.getTenantId();
|
|
|
Integer createId = personnelVO.getId();
|
|
|
-// Integer tenantId = 10;
|
|
|
-// Integer createId = 10;
|
|
|
+ //创建来源(默认0/专题库1/报告2)
|
|
|
if(swQueryDTO.getCreateFrom().equals(1)){
|
|
|
Integer projectId = swQueryDTO.getId();
|
|
|
Integer reportId = -1;
|
|
|
List<ScratchWordsVO> scratchWords = scratchWordsMapper.querySW(swQueryDTO.getPatentNo(), tenantId, createId, projectId, reportId);
|
|
|
return scratchWords;
|
|
|
}
|
|
|
+ //创建来源(默认0/专题库1/报告2)
|
|
|
if(swQueryDTO.getCreateFrom().equals(2)){
|
|
|
Integer reportId = swQueryDTO.getId();
|
|
|
Integer projectId = -1;
|
|
@@ -117,18 +120,4 @@ public class ScratchWordsService extends ServiceImpl<ScratchWordsMapper, Scratch
|
|
|
scratchWords.deleteById();
|
|
|
}
|
|
|
}
|
|
|
-//
|
|
|
-// public List<ScratchWordsVO> querySW(String patentNo, Integer id, Integer type){
|
|
|
-// //多重情况考虑
|
|
|
-// //根据tenantId(公司)、patentNo(专利号),
|
|
|
-// // permissionType为1,全公司人都可见的批注;
|
|
|
-// // 查询rangeType为F的(全部地方可见);
|
|
|
-// // 查询rangeType为T的(只在来源处可见),但是要判断传入type=createFrom创建来源,传入id=rangeId;
|
|
|
-// // permissionType为0,只有自己可见的批注,需要满足登陆人信息=createId;
|
|
|
-// // 查询rangeType为F的(全部地方可见);
|
|
|
-// // 查询rangeType为T的(只在来源处可见),但是要判断传入type=createFrom创建来源,传入id=rangeId;
|
|
|
-// List<ScratchWordsVO> swVOS = new ArrayList<>();
|
|
|
-// List<ScratchWordsVO> swvos = new ArrayList<>();
|
|
|
-// swVOS.add(swvos);
|
|
|
-// }
|
|
|
}
|