|
@@ -46,6 +46,9 @@ public class ScratchWordsService extends ServiceImpl<ScratchWordsMapper, Scratch
|
|
|
public void add(ScratchWordsDTO scratchWordsDTO){
|
|
|
//判断传入列表不为空
|
|
|
if(scratchWordsDTO != null){
|
|
|
+ if(scratchWordsDTO.getCreateFrom() == null){
|
|
|
+ scratchWordsDTO.setCreateFrom(0);
|
|
|
+ }
|
|
|
ScratchWords scratchWords = new ScratchWords();
|
|
|
BeanUtils.copyProperties(scratchWordsDTO, scratchWords);
|
|
|
//获取当前登陆人信息
|
|
@@ -82,7 +85,7 @@ public class ScratchWordsService extends ServiceImpl<ScratchWordsMapper, Scratch
|
|
|
* @return
|
|
|
*/
|
|
|
public List<ScratchWordsVO> queryAll(SWQueryDTO swQueryDTO){
|
|
|
- if(swQueryDTO.getPatentNo() != null && swQueryDTO.getId() != null && swQueryDTO.getCreateFrom() != null) {
|
|
|
+ if(swQueryDTO.getPatentNo() != null) {
|
|
|
//获取当前登陆人信息
|
|
|
PersonnelVO personnelVO = cacheUtils.getLoginUser(loginUtils.getId());
|
|
|
Integer tenantId = personnelVO.getTenantId();
|
|
@@ -95,12 +98,19 @@ public class ScratchWordsService extends ServiceImpl<ScratchWordsMapper, Scratch
|
|
|
return scratchWords;
|
|
|
}
|
|
|
//创建来源(默认0/专题库1/报告2)
|
|
|
- if(swQueryDTO.getCreateFrom().equals(2)){
|
|
|
+ else if(swQueryDTO.getCreateFrom().equals(2)){
|
|
|
Integer reportId = swQueryDTO.getId();
|
|
|
Integer projectId = -1;
|
|
|
List<ScratchWordsVO> scratchWords = scratchWordsMapper.querySW(swQueryDTO.getPatentNo(), tenantId, createId, projectId, reportId);
|
|
|
return scratchWords;
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ //创建来源(默认0/专题库1/报告2)
|
|
|
+ else if(swQueryDTO.getCreateFrom().equals(0)){
|
|
|
+ Integer reportId = -1;
|
|
|
+ Integer projectId = -1;
|
|
|
+ List<ScratchWordsVO> scratchWords = scratchWordsMapper.querySW(swQueryDTO.getPatentNo(), tenantId, createId, projectId, reportId);
|
|
|
+ return scratchWords;
|
|
|
+ }else {
|
|
|
throw new XiaoShiException("暂无该情况");
|
|
|
}
|
|
|
} else {
|