소스 검색

1,修改专题库自定义字段查出来所有的bug
2,修改查出部分专利事务信息查询报错的bug
3,梳理接口并添加代码注释

lwhhszx 2 년 전
부모
커밋
ad8a6a3c23
20개의 변경된 파일72개의 추가작업 그리고 79개의 파일을 삭제
  1. 1 0
      PAS/src/main/java/cn/cslg/pas/common/model/vo/ProjectFieldVO.java
  2. 1 1
      PAS/src/main/java/cn/cslg/pas/controller/PatentAnnotationController.java
  3. 0 13
      PAS/src/main/java/cn/cslg/pas/controller/PatentController.java
  4. 0 6
      PAS/src/main/java/cn/cslg/pas/controller/PatentFamilyController.java
  5. 0 4
      PAS/src/main/java/cn/cslg/pas/controller/PatentFieldController.java
  6. 4 0
      PAS/src/main/java/cn/cslg/pas/mapper/WebTaskFieldMapper.java
  7. 2 1
      PAS/src/main/java/cn/cslg/pas/service/OAuth2Service.java
  8. 3 1
      PAS/src/main/java/cn/cslg/pas/service/PatentAffairService.java
  9. 6 0
      PAS/src/main/java/cn/cslg/pas/service/PatentSimpleFamilyLinkService.java
  10. 0 37
      PAS/src/main/java/cn/cslg/pas/service/PatentSimpleFamilyService.java
  11. 4 2
      PAS/src/main/java/cn/cslg/pas/service/ProjectFieldService.java
  12. 7 1
      PAS/src/main/java/cn/cslg/pas/service/ProjectPatentLinkService.java
  13. 2 4
      PAS/src/main/java/cn/cslg/pas/service/UploadPatentBatchService.java
  14. 20 1
      PAS/src/main/java/cn/cslg/pas/service/WebTaskService.java
  15. 0 6
      PAS/src/main/java/cn/cslg/pas/service/impl/AssoProductPatentServiceImpl.java
  16. 0 1
      PAS/src/main/java/cn/cslg/pas/service/webImportService.java
  17. 1 1
      PAS/src/main/resources/application.yml
  18. 3 0
      PAS/src/main/resources/mapper/ProjectFieldMapper.xml
  19. 2 0
      PAS/src/main/resources/mapper/TaskMapper.xml
  20. 16 0
      PAS/src/main/resources/mapper/WebTaskMapper.xml

+ 1 - 0
PAS/src/main/java/cn/cslg/pas/common/model/vo/ProjectFieldVO.java

@@ -8,4 +8,5 @@ public class ProjectFieldVO extends BaseVO {
     private Integer type;
     private Integer status;
     private Integer projectId;
+    private Integer tenantId;
 }

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/controller/PatentAnnotationController.java

@@ -41,7 +41,7 @@ public class PatentAnnotationController {
     @checkAuth(FunId = "/workspace/details/notes/add")
     @Permission(roles = {1,2})
     @PostMapping("add")
-    @Operation(summary = "选择注释")
+    @Operation(summary = "添加注释")
     public String add(@RequestBody PatentAnnotation patentAnnotation) {
         return patentAnnotationService.add(patentAnnotation);
     }

+ 0 - 13
PAS/src/main/java/cn/cslg/pas/controller/PatentController.java

@@ -53,7 +53,6 @@ public class PatentController {
     private final ProjectFieldPatentLinkService projectFieldPatentLinkService;
     private final LoginUtils loginUtils;
     private final PatentRightService patentRightService;
-    private final FileUtils fileUtils;
     private final IPatentMarketDataService patentMarketDataService;
 
     @GetMapping("/read/total")
@@ -88,20 +87,17 @@ public class PatentController {
         PatentDTO patentDTO =patentService.getPatentDTOById(patentNo,projectId);
         return Response.success(patentDTO);
     }
-
     @GetMapping("id")
     @Operation(summary = "根据专利号获取专利")
     public String getPatentByPatentNo(String patentNo) {
         Patent patent = patentService.getByPatentNo(patentNo);
         return Response.success(patent);
     }
-
     @PostMapping("ids")
     @Operation(summary = "根据范围获取专利ID")
     public String getPatentListIds(@RequestBody PatentVO params) {
         return Response.success(patentService.getPatentListIds(params));
     }
-
     @checkAuth(FunId = "/workspace/folder/exportPatent")
     @PostMapping("export")
     @Operation(summary = "导出专利")
@@ -134,7 +130,6 @@ public class PatentController {
         return Response.success(patentService.getPatentQuerySourcePageList(params));
     }
 
-
     @PostMapping("/save/select")
     @Operation(summary = "保存选择的专利")
     public String saveSelectPatentIds(@RequestBody PatentVO params) {
@@ -197,14 +192,6 @@ public class PatentController {
     public String getPagination(@RequestBody PatentVO patentVO){
        return patentService.getPagination(patentVO.getPatentNos(),patentVO.getStartNumber());
     }
-    @GetMapping("test")
-    @Operation(summary = "141541")
-    public UploadFileDTO test(String url) throws Exception {
-        File pdfFile= FileUtils.getFile(url);
-   MultipartFile file =    FileUtils.fileToMultipartFile(pdfFile);
-        UploadFileDTO fileDTO = fileUtils.uploadFile(file);
-        return fileDTO;
-    }
 
     @Operation(summary = "查询专利价值曲线")
     @PostMapping("/showTrend")

+ 0 - 6
PAS/src/main/java/cn/cslg/pas/controller/PatentFamilyController.java

@@ -29,7 +29,6 @@ import java.util.List;
 @RequiredArgsConstructor(onConstructor_ = {@Lazy})
 public class PatentFamilyController {
 
-    private final PatentSimpleFamilyService patentSimpleFamilyService;
     private final PatentSimpleFamilyLinkService patentSimpleFamilyLinkService;
 
     @GetMapping("list")
@@ -37,9 +36,4 @@ public class PatentFamilyController {
     public String getPageList(PatentSimpleFamilyVO params) {
         return Response.success(patentSimpleFamilyLinkService.getPageList(params));
     }
-    @GetMapping("cleanDate")
-    @Operation(summary = "清理脏数据")
-    public List<String> cleanDate(Integer type) {
-        return patentSimpleFamilyService.cleanDate(type);
-    }
 }

+ 0 - 4
PAS/src/main/java/cn/cslg/pas/controller/PatentFieldController.java

@@ -24,21 +24,17 @@ import org.springframework.web.bind.annotation.*;
 @RequestMapping(Constants.API_VERSION_V2 + "/patent/field")
 @RequiredArgsConstructor(onConstructor_ = {@Lazy})
 public class PatentFieldController {
-
     private final PatentFieldService patentFieldService;
-
     @GetMapping("list")
     @Operation(summary = "字段列表")
     public String getList(String type, Integer projectId) {
         return Response.success(patentFieldService.getUserFieldDataList(projectId, type));
     }
-
     @GetMapping("setting")
     @Operation(summary = "获取用户设置")
     public String getUserSetting(SystemFieldVO params) {
         return Response.success(patentFieldService.getUserSetting(params));
     }
-
     @PostMapping("setting")
     @Operation(summary = "更新用户设置")
     public String setUserSetting(@RequestBody SystemFieldVO params) {

+ 4 - 0
PAS/src/main/java/cn/cslg/pas/mapper/WebTaskFieldMapper.java

@@ -1,7 +1,11 @@
 package cn.cslg.pas.mapper;
 
+import cn.cslg.pas.common.model.FileSource;
 import cn.cslg.pas.domain.WebTaskField;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import io.swagger.v3.oas.models.security.SecurityScheme;
+
+import java.util.List;
 
 /**
 * @author admin

+ 2 - 1
PAS/src/main/java/cn/cslg/pas/service/OAuth2Service.java

@@ -62,8 +62,9 @@ public class OAuth2Service {
     public Map<Integer, Integer> getPermissions() throws IOException {
         log.info("开始获得权限");
         Map<Integer, Integer> result = new HashMap<>();
+        //获取登录人的信息
         PersonnelVO user = this.getUserinfo();
-        log.info("获得用户信息"+user.getName()+user.getId());
+        //当登录人的姓账号为admin时,给登录人赋予所有专题库的管理员权限
         if (user.getUsername().equals(Constants.ADMIN_USERNAME)) {
             List<Project> projectList = projectService.list();
             for (Project project : projectList) {

+ 3 - 1
PAS/src/main/java/cn/cslg/pas/service/PatentAffairService.java

@@ -14,6 +14,7 @@ import cn.cslg.pas.common.model.params.PatentAffairParams;
 import cn.cslg.pas.common.utils.PatentUtils;
 import cn.hutool.json.JSONObject;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -51,7 +52,8 @@ public class PatentAffairService extends ServiceImpl<PatentAffairMapper, PatentA
         List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Arrays.asList(Constants.PATENT_STATUS, Constants.PATENT_SIMPLE_STATUS));
         dataList.forEach(item -> {
             if (item.getContent() != null) {
-                List<KeyValueVO> lst = JsonUtils.jsonToList(item.getContent(), KeyValueVO.class);
+                List<KeyValueVO> lst = JSONArray.parseArray(item.getContent(), KeyValueVO.class);
+//                List<KeyValueVO> lst = JsonUtils.jsonToList(item.getContent(), KeyValueVO.class);
                 KeyValueVO flag;
                 for (int i = 0; i < Objects.requireNonNull(lst).size() - 1; i++) {
                     for (int j = 0; j < lst.size() - i - 1; j++) {

+ 6 - 0
PAS/src/main/java/cn/cslg/pas/service/PatentSimpleFamilyLinkService.java

@@ -35,15 +35,21 @@ public class PatentSimpleFamilyLinkService extends ServiceImpl<PatentSimpleFamil
 
     public IPage<PatentSimpleFamilyLink> getPageList(PatentSimpleFamilyVO params) {
         LambdaQueryWrapper<PatentSimpleFamilyLink> queryWrapper = new LambdaQueryWrapper<>();
+        //从专利同族关联表里获取关联信息
         if (StringUtils.isNotEmpty(params.getPatentNo())) {
             queryWrapper.like(PatentSimpleFamilyLink::getPatentNo, params.getPatentNo());
         }
         queryWrapper.eq(PatentSimpleFamilyLink::getFamilyId, params.getFamilyId());
         IPage<PatentSimpleFamilyLink> pageList = this.page(new Page<>(params.getCurrent(), params.getSize()), queryWrapper);
+        //根据从关联信息里获得的专利号获得专利
         List<Patent> patentList = patentService.getPatentListByPatentNo(pageList.getRecords().stream().map(PatentSimpleFamilyLink::getPatentNo).collect(Collectors.toList()));
+        //根据专利号获得申请人信息
         List<PatentApplicant> patentApplicantList = patentApplicantService.getPatentApplicantByPatentIds(patentList.stream().map(Patent::getId).collect(Collectors.toList()));
+         //遍历关联信息
         pageList.getRecords().forEach(patentSimpleFamily -> {
+            //根据专利号从专利列表中获得专利
             Patent patent = patentList.stream().filter(item -> item.getPatentNo().equals(patentSimpleFamily.getPatentNo())).findFirst().orElse(null);
+            //根据专利装载信息,若专利未查询到,则设置名称为"暂未收录"
             if (patent == null) {
                 patentSimpleFamily.setPatentId(-1);
                 patentSimpleFamily.setName("暂未收录");

+ 0 - 37
PAS/src/main/java/cn/cslg/pas/service/PatentSimpleFamilyService.java

@@ -188,43 +188,6 @@ public class PatentSimpleFamilyService extends ServiceImpl<PatentSimpleFamilyMap
 
     }
 
-    public List<String> cleanDate(Integer type) {
-        List<String> patentNos =new ArrayList<>();
-        List<PatentSimpleFamily> patentSimpleFamilies = patentSimpleFamilyLinkService.getBaseMapper().getDirtyData(type);
-      for(PatentSimpleFamily item :patentSimpleFamilies) {
-            LambdaQueryWrapper<PatentSimpleFamily> wrapper = new LambdaQueryWrapper<>();
-            wrapper.eq(PatentSimpleFamily::getPatentNo, item.getPatentNo())
-                    .eq(PatentSimpleFamily::getType, type);
-            List<PatentSimpleFamily> patentSimpleFamilys = this.list(wrapper);
-            List<Integer> ids = patentSimpleFamilys.stream().map(PatentSimpleFamily::getId).collect(Collectors.toList());
-            PatentSimpleFamily mainFamily = patentSimpleFamilys.get(0);
-            Integer mainId = mainFamily.getId();
-             ids.remove(mainId);
-             this.removeByIds(ids);
-            UpdateWrapper<PatentSimpleFamilyLink> updateWrapper = new UpdateWrapper<>();
-            updateWrapper.in("family_id", ids).set("family_id", mainId);
-            patentSimpleFamilyLinkService.update(null, updateWrapper);
-
-            if (type == 1) {
-                UpdateWrapper<Patent> updateWrapper2 = new UpdateWrapper<>();
-                updateWrapper2.in("simple_family", ids).set("simple_family", mainId);
-                patentService.update(null, updateWrapper2);
-
-            } else if (type == 2) {
-                UpdateWrapper<Patent> updateWrapper2 = new UpdateWrapper<>();
-                updateWrapper2.in("inpadoc_family", ids).set("inpadoc_family", mainId);
-                patentService.update(null, updateWrapper2);
-
-            } else if (type == 3) {
-                UpdateWrapper<Patent> updateWrapper2 = new UpdateWrapper<>();
-                updateWrapper2.in("patsnap_family", ids).set("patsnap_family", mainId);
-                patentService.update(null, updateWrapper2);
 
-            }
-            patentNos.add(mainFamily.getPatentNo());
-
-        }
-return patentNos;
-    }
 
 }

+ 4 - 2
PAS/src/main/java/cn/cslg/pas/service/ProjectFieldService.java

@@ -1,5 +1,6 @@
 package cn.cslg.pas.service;
 
+import cn.cslg.pas.common.model.PersonnelVO;
 import cn.cslg.pas.common.model.dto.PatentDTO;
 import cn.cslg.pas.common.model.vo.ProjectFieldVO;
 import cn.cslg.pas.common.model.vo.UploadSettingVO;
@@ -44,6 +45,7 @@ public class ProjectFieldService extends ServiceImpl<ProjectFieldMapper, Project
     private final FileUtils fileUtils;
     private final LoginUtils loginUtils;
     private final OutInterfaceService outInterfaceService;
+    private final CacheUtils cacheUtils;
 
     public List<PatentDTO.Field> getPatentFieldByPatentIdAndProjectId(Integer projectId, Integer patentId) {
         List<PatentDTO.Field> dataList = new ArrayList<>();
@@ -313,9 +315,10 @@ public class ProjectFieldService extends ServiceImpl<ProjectFieldMapper, Project
         }
         return projectField;
     }
-
     public IPage<ProjectField> getPageList(ProjectFieldVO params) throws IOException {
+        PersonnelVO personnelVO =cacheUtils.getLoginUser(loginUtils.getId());
         //分页查询列表
+        params.setTenantId(personnelVO.getTenantId());
         IPage<ProjectField> pageList = baseMapper.getPageList(new Page<>(params.getCurrent(), params.getSize()), params);
         //从分页信息中获取列表
         List<ProjectField> projectFields = pageList.getRecords();
@@ -339,7 +342,6 @@ public class ProjectFieldService extends ServiceImpl<ProjectFieldMapper, Project
 
         return pageList;
     }
-
     public ProjectField getByProjectIdAndNameAndType(String name, Integer type, Integer projectId) {
         LambdaQueryWrapper<ProjectField> queryWrapper = new LambdaQueryWrapper<>();
         queryWrapper.eq(ProjectField::getName, name);

+ 7 - 1
PAS/src/main/java/cn/cslg/pas/service/ProjectPatentLinkService.java

@@ -82,7 +82,9 @@ public class ProjectPatentLinkService extends ServiceImpl<ProjectPatentLinkMappe
 
     public Map<String, Object> getPatentReadTotal(PatentReadVO params) {
         List<ProjectPatentLink> linkList = new ArrayList<>();
+        //当文件id不为null时
         if (StringUtils.isNotEmpty(params.getFolder())) {
+            //从文件夹专利关联表里获得数据
             linkList = projectFolderPatentLinkService.getProjectFolderLinkByProjectIdAndFolder(params.getProjectId(), Integer.parseInt(params.getFolder())).stream().map(item -> {
                 ProjectPatentLink projectPatentLink = new ProjectPatentLink();
                 projectPatentLink.setLook(item.getLook());
@@ -92,8 +94,10 @@ public class ProjectPatentLinkService extends ServiceImpl<ProjectPatentLinkMappe
                 return projectPatentLink;
             }).collect(Collectors.toList());
         } else {
+            //从专题库专利关联表里获得数据
             linkList = this.getProjectPatentsByProjectId(params.getProjectId());
         }
+        //根据获得的关联信息装载所有,已读,未读数据
         Map<String, Object> result = new ConcurrentHashMap<>();
         result.put("all", linkList.size());
         result.put("read", linkList.stream().filter(item -> item.getLook().equals(1)).count());
@@ -102,11 +106,13 @@ public class ProjectPatentLinkService extends ServiceImpl<ProjectPatentLinkMappe
     }
 
     public Boolean updatePatentReadStatus(PatentReadVO params) {
+        //当文件夹id不为null时更新文件夹专利关联表里的阅读状态
         if (StringUtils.isNotEmpty(params.getFolder())) {
             List<ProjectFolderPatentLink> projectFolderPatentLinkList = projectFolderPatentLinkService.getProjectFolderLinkByProjectIdAndFolderAndPatentIds(params.getProjectId(), Integer.parseInt(params.getFolder()), params.getPatentIds());
             projectFolderPatentLinkList.forEach(item -> item.setLook(params.getStatus()));
             return projectFolderPatentLinkService.saveOrUpdateBatch(projectFolderPatentLinkList);
-        } else {
+        } //当文件夹id为null时更新专题库专利关联表里的阅读状态
+        else {
             List<ProjectPatentLink> projectPatentLinkList = this.getProjectPatentByProIdAndPatentIds(params.getProjectId(), params.getPatentIds());
             projectPatentLinkList.forEach(item -> item.setLook(params.getStatus()));
             return this.saveOrUpdateBatch(projectPatentLinkList);

+ 2 - 4
PAS/src/main/java/cn/cslg/pas/service/UploadPatentBatchService.java

@@ -11,6 +11,7 @@ import cn.cslg.pas.common.model.vo.UploadSettingVO;
 import cn.cslg.pas.common.utils.*;
 import cn.cslg.pas.domain.*;
 import cn.cslg.pas.mapper.ImportErrorLogMapper;
+import cn.cslg.pas.mapper.WebTaskMapper;
 import cn.cslg.pas.service.asso.AssoProductPatentService;
 import cn.hutool.extra.spring.SpringUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -65,17 +66,14 @@ public class UploadPatentBatchService {
             List<UploadSettingVO.Column> jsonData = UploadPatentBatchUtil.parsingConfigurationFiles(projectImportPatentVO, getSettingJson);
 
             Map<String, PictureData> pictureDataMap = ExcelUtils.getDataFromExcel(params.getPath());
-
             //将数据进行装配并进行数据库操作
             for (int i = 0; i < params.getRowList().size(); i++) {
                 //获取每一行的数据
                 Map<Object, Object> row = params.getRowList().get(i);
                 //基础数据装配
                 UploadParamsVO uploadParamsVO = UploadPatentBatchUtil.processData(row, jsonData);
-
                 //查询数据是否存在 如果存在 返回该条数据 如果不存在 新增一条数据
                 getOneOrInsertOne(uploadParamsVO);
-
                 //专利信息需要特殊处理部分
                 //专利信息(摘要附图)数据装配
                 PictureData pictureData = pictureDataMap.get(String.valueOf(i + 1));
@@ -91,7 +89,6 @@ public class UploadPatentBatchService {
                     }
 
                 }
-
                 //将装配对象中的数据保存到数据库
                 dataToDB(params, uploadParamsVO, projectImportPatentVO);
                 //通过WebSocket 在每一次循环结束后 向前端发送完成进度
@@ -693,6 +690,7 @@ public class UploadPatentBatchService {
         if (patentCell.getPdf() != null) {
             patentInstructionService.edit(patentCell.getPatentNo(), patentCell.getPdf());
         }
+        getOneOrInsertOne(uploadParamsVO);
         //设置公开号
         patent.setPublicNo(patentCell.getPublicNo());
         uploadParamsVO.setSimpleStatus(patentCell.getStatue());

+ 20 - 1
PAS/src/main/java/cn/cslg/pas/service/WebTaskService.java

@@ -1,10 +1,27 @@
 package cn.cslg.pas.service;
 
+import cn.cslg.pas.common.model.FileSource;
+import cn.cslg.pas.common.utils.FileUtils;
+import cn.hutool.core.util.IdUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import cn.cslg.pas.domain.WebTask;
 import cn.cslg.pas.mapper.WebTaskMapper;
+import org.apache.poi.hssf.usermodel.*;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
 /**
 * @author admin
 * @description 针对表【web_task(网络拉取任务)】的数据库操作Service实现
@@ -12,13 +29,15 @@ import org.springframework.stereotype.Service;
 */
 @Service
 public class WebTaskService extends ServiceImpl<WebTaskMapper, WebTask>
+
    {
+       @Autowired
+       private FileUtils fileUtils;
   public Integer addWebTask(WebTask webTask){
      webTask.insert();
      return  webTask.getId();
 
   }
-
 }
 
 

+ 0 - 6
PAS/src/main/java/cn/cslg/pas/service/impl/AssoProductPatentServiceImpl.java

@@ -28,11 +28,9 @@ public class AssoProductPatentServiceImpl extends ServiceImpl<AssoProductPatentM
     @Override
     public void addNewAssoProductPatent(AssoProductPatentAddNewDTO assoProductPatentAddNewDTO) {
         log.info("开始处理【新增专利和产品关联】的业务,参数为:{}", assoProductPatentAddNewDTO);
-
         //从DTO中获取要新增关联的多个专利号和产品ids
         List<String> patentNos = assoProductPatentAddNewDTO.getPatentNos();
         List<Integer> newProductIds = assoProductPatentAddNewDTO.getProductIds();
-
         ArrayList<AssoProductPatent> newAssoProductPatents = new ArrayList<>();
         for (String patentNo : patentNos) {
             for (Integer newProductId : newProductIds) {
@@ -42,7 +40,6 @@ public class AssoProductPatentServiceImpl extends ServiceImpl<AssoProductPatentM
                 newAssoProductPatents.add(assoProductPatent);
             }
         }
-
         //先查库中已有的这些专利和产品的关联数据
         LambdaQueryWrapper<AssoProductPatent> wrapper = new LambdaQueryWrapper<>();
         wrapper.in(AssoProductPatent::getPatentNo, patentNos);
@@ -52,17 +49,14 @@ public class AssoProductPatentServiceImpl extends ServiceImpl<AssoProductPatentM
                 assoProductPatent.setId(null);
             }
         }
-
         //去重
         newAssoProductPatents.removeAll(oldAssoProductPatents);
-
         //去重后若还有,则为新的关联数据,入库
         if (newAssoProductPatents.size() > 0) {
             //产品和专利关联表插入数据
             log.info("数据入产品和专利关联表");
             this.saveBatch(newAssoProductPatents);
         }
-
         log.info("新增专利和产品关联完成");
 
     }

+ 0 - 1
PAS/src/main/java/cn/cslg/pas/service/webImportService.java

@@ -1,7 +1,6 @@
 package cn.cslg.pas.service;
 
 
-import cn.cslg.pas.common.config.WebSocketConfig;
 import cn.cslg.pas.domain.WebConfig;
 import cn.cslg.pas.domain.WebTask;
 import lombok.RequiredArgsConstructor;

+ 1 - 1
PAS/src/main/resources/application.yml

@@ -20,7 +20,7 @@ spring:
       max-file-size: 1000MB
       max-request-size: 1000MB
   profiles:
-    active: dev
+    active: prodNetOut
   jackson:
     default-property-inclusion: non_null
     serialization:

+ 3 - 0
PAS/src/main/resources/mapper/ProjectFieldMapper.xml

@@ -20,6 +20,9 @@
             <if test="params.projectId != null">
                 and a.project_id = #{params.projectId}
             </if>
+        <if test="params.tenantId">
+            and d.tenantId=#{params.tenantId}
+        </if>
         </where>
         order by a.createtime ${params.order}
     </select>

+ 2 - 0
PAS/src/main/resources/mapper/TaskMapper.xml

@@ -32,4 +32,6 @@
         </where>
         order by a.ctime ${params.order}
     </select>
+
+
 </mapper>

+ 16 - 0
PAS/src/main/resources/mapper/WebTaskMapper.xml

@@ -19,4 +19,20 @@
         success_num,default_num,search_condition,
         task_process
     </sql>
+
+    <select id="getTest" resultType="cn.cslg.pas.common.model.FileSource">
+        select a.patentno as patentNo,a.applicationno as appNo,FROM_UNIXTIME(a.publicdate) as publicdate,a.publictono as publictono,FROM_UNIXTIME(a.publictodate) as publictodate, a.abstract_path as pic,c.type as type,c.url as url
+    from  os_patent a
+            <if test="id!=null">
+            left join os_thematic_pid b on b.pid = a.id
+            </if>
+            left join os_patent_instruction c on c.patent_no =a.patentno
+        <where>
+            <if test="id!=null">
+          b.zid =#{id}
+            </if>
+
+        </where>
+        limit  #{t}, 1000
+    </select>
 </mapper>